eli-video-interview 1.1.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 (397) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +411 -0
  3. package/esm/assets/icons/free.svg +1 -0
  4. package/esm/assets/icons/video.svg +1 -0
  5. package/esm/components/BigBallSvg/index.d.ts +3 -0
  6. package/esm/components/BigBallSvg/index.js +17 -0
  7. package/esm/components/BigBallSvg/index.module.css +37 -0
  8. package/esm/components/Charts/Chart.d.ts +4 -0
  9. package/esm/components/Charts/Chart.js +38 -0
  10. package/esm/components/Charts/const.d.ts +382 -0
  11. package/esm/components/Charts/const.js +382 -0
  12. package/esm/components/Charts/interface.d.ts +3 -0
  13. package/esm/components/Charts/interface.js +1 -0
  14. package/esm/components/ScrollDialogContent/index.d.ts +5 -0
  15. package/esm/components/ScrollDialogContent/index.js +6 -0
  16. package/esm/components/SvgIcon/index.d.ts +4 -0
  17. package/esm/components/SvgIcon/index.js +31 -0
  18. package/esm/components/SvgIcon/interface.d.ts +3 -0
  19. package/esm/components/SvgIcon/interface.js +1 -0
  20. package/esm/components/VideoPreview/index.d.ts +4 -0
  21. package/esm/components/VideoPreview/index.js +20 -0
  22. package/esm/components/VideoPreview/interface.d.ts +15 -0
  23. package/esm/components/VideoPreview/interface.js +1 -0
  24. package/esm/components/VideoPreview/styled.d.ts +10 -0
  25. package/esm/components/VideoPreview/styled.js +24 -0
  26. package/esm/constants/ai-question.d.ts +27 -0
  27. package/esm/constants/ai-question.js +39 -0
  28. package/esm/constants/ai-report.d.ts +2 -0
  29. package/esm/constants/ai-report.js +12 -0
  30. package/esm/enum/ai-question.d.ts +38 -0
  31. package/esm/enum/ai-question.js +42 -0
  32. package/esm/enum/ai-report.d.ts +27 -0
  33. package/esm/enum/ai-report.js +30 -0
  34. package/esm/index.d.ts +6 -0
  35. package/esm/index.js +6 -0
  36. package/esm/modules/ai-question/Root.d.ts +4 -0
  37. package/esm/modules/ai-question/Root.js +141 -0
  38. package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +4 -0
  39. package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +39 -0
  40. package/esm/modules/ai-question/components/AiAnalysis/MainPoints.d.ts +4 -0
  41. package/esm/modules/ai-question/components/AiAnalysis/MainPoints.js +54 -0
  42. package/esm/modules/ai-question/components/AiAnalysis/MainPointsItem.d.ts +4 -0
  43. package/esm/modules/ai-question/components/AiAnalysis/MainPointsItem.js +62 -0
  44. package/esm/modules/ai-question/components/AiAnalysis/const.d.ts +5 -0
  45. package/esm/modules/ai-question/components/AiAnalysis/const.js +11 -0
  46. package/esm/modules/ai-question/components/AiAnalysis/index.d.ts +3 -0
  47. package/esm/modules/ai-question/components/AiAnalysis/index.js +35 -0
  48. package/esm/modules/ai-question/components/AiAnalysis/interface.d.ts +23 -0
  49. package/esm/modules/ai-question/components/AiAnalysis/interface.js +1 -0
  50. package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +19 -0
  51. package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +23 -0
  52. package/esm/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +4 -0
  53. package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +114 -0
  54. package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +27 -0
  55. package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.js +1 -0
  56. package/esm/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +39 -0
  57. package/esm/modules/ai-question/components/AiAssessmentCriteria/styled.js +20 -0
  58. package/esm/modules/ai-question/components/AiAssessmentCriteria/utils.d.ts +9 -0
  59. package/esm/modules/ai-question/components/AiAssessmentCriteria/utils.js +29 -0
  60. package/esm/modules/ai-question/components/BaseAccordion/const.d.ts +1 -0
  61. package/esm/modules/ai-question/components/BaseAccordion/const.js +1 -0
  62. package/esm/modules/ai-question/components/BaseAccordion/index.d.ts +4 -0
  63. package/esm/modules/ai-question/components/BaseAccordion/index.js +98 -0
  64. package/esm/modules/ai-question/components/BaseAccordion/interface.d.ts +9 -0
  65. package/esm/modules/ai-question/components/BaseAccordion/interface.js +1 -0
  66. package/esm/modules/ai-question/components/BaseAccordion/styled.d.ts +10 -0
  67. package/esm/modules/ai-question/components/BaseAccordion/styled.js +73 -0
  68. package/esm/modules/ai-question/components/BootVideo/index.d.ts +4 -0
  69. package/esm/modules/ai-question/components/BootVideo/index.js +100 -0
  70. package/esm/modules/ai-question/components/BootVideo/interface.d.ts +8 -0
  71. package/esm/modules/ai-question/components/BootVideo/interface.js +1 -0
  72. package/esm/modules/ai-question/components/BootVideo/styled.d.ts +33 -0
  73. package/esm/modules/ai-question/components/BootVideo/styled.js +49 -0
  74. package/esm/modules/ai-question/components/QuestionModel/Header.d.ts +3 -0
  75. package/esm/modules/ai-question/components/QuestionModel/Header.js +23 -0
  76. package/esm/modules/ai-question/components/QuestionModel/Item.d.ts +4 -0
  77. package/esm/modules/ai-question/components/QuestionModel/Item.js +74 -0
  78. package/esm/modules/ai-question/components/QuestionModel/List.d.ts +3 -0
  79. package/esm/modules/ai-question/components/QuestionModel/List.js +39 -0
  80. package/esm/modules/ai-question/components/QuestionModel/Skeleton.d.ts +3 -0
  81. package/esm/modules/ai-question/components/QuestionModel/Skeleton.js +17 -0
  82. package/esm/modules/ai-question/components/QuestionModel/index.d.ts +3 -0
  83. package/esm/modules/ai-question/components/QuestionModel/index.js +64 -0
  84. package/esm/modules/ai-question/components/QuestionModel/interface.d.ts +18 -0
  85. package/esm/modules/ai-question/components/QuestionModel/interface.js +1 -0
  86. package/esm/modules/ai-question/components/QuestionModel/styled.d.ts +9 -0
  87. package/esm/modules/ai-question/components/QuestionModel/styled.js +9 -0
  88. package/esm/modules/ai-question/components/QuestionPreview/index.d.ts +3 -0
  89. package/esm/modules/ai-question/components/QuestionPreview/index.js +31 -0
  90. package/esm/modules/ai-question/components/QuestionPreview/styled.d.ts +23 -0
  91. package/esm/modules/ai-question/components/QuestionPreview/styled.js +11 -0
  92. package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.d.ts +3 -0
  93. package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +47 -0
  94. package/esm/modules/ai-question/components/QuestionTemplate/HistoryPattern.d.ts +3 -0
  95. package/esm/modules/ai-question/components/QuestionTemplate/HistoryPattern.js +20 -0
  96. package/esm/modules/ai-question/components/QuestionTemplate/Skeleton.d.ts +3 -0
  97. package/esm/modules/ai-question/components/QuestionTemplate/Skeleton.js +17 -0
  98. package/esm/modules/ai-question/components/QuestionTemplate/index.d.ts +3 -0
  99. package/esm/modules/ai-question/components/QuestionTemplate/index.js +38 -0
  100. package/esm/modules/ai-question/components/QuestionTemplate/interface.d.ts +43 -0
  101. package/esm/modules/ai-question/components/QuestionTemplate/interface.js +1 -0
  102. package/esm/modules/ai-question/components/QuestionTemplate/styled.d.ts +87 -0
  103. package/esm/modules/ai-question/components/QuestionTemplate/styled.js +33 -0
  104. package/esm/modules/ai-question/components/QuestionUpdate/Form.d.ts +4 -0
  105. package/esm/modules/ai-question/components/QuestionUpdate/Form.js +91 -0
  106. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.d.ts +3 -0
  107. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +63 -0
  108. package/esm/modules/ai-question/components/QuestionUpdate/const.d.ts +14 -0
  109. package/esm/modules/ai-question/components/QuestionUpdate/const.js +53 -0
  110. package/esm/modules/ai-question/components/QuestionUpdate/index.d.ts +3 -0
  111. package/esm/modules/ai-question/components/QuestionUpdate/index.js +203 -0
  112. package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +57 -0
  113. package/esm/modules/ai-question/components/QuestionUpdate/interface.js +1 -0
  114. package/esm/modules/ai-question/index.d.ts +4 -0
  115. package/esm/modules/ai-question/index.js +22 -0
  116. package/esm/modules/ai-question/interface.d.ts +74 -0
  117. package/esm/modules/ai-question/interface.js +1 -0
  118. package/esm/modules/ai-question/useAiQuestion.d.ts +15 -0
  119. package/esm/modules/ai-question/useAiQuestion.js +18 -0
  120. package/esm/modules/ai-report/Root.d.ts +4 -0
  121. package/esm/modules/ai-report/Root.js +73 -0
  122. package/esm/modules/ai-report/components/NotFinish/index.d.ts +3 -0
  123. package/esm/modules/ai-report/components/NotFinish/index.js +25 -0
  124. package/esm/modules/ai-report/components/RankingRange/Item.d.ts +4 -0
  125. package/esm/modules/ai-report/components/RankingRange/Item.js +30 -0
  126. package/esm/modules/ai-report/components/RankingRange/index.d.ts +4 -0
  127. package/esm/modules/ai-report/components/RankingRange/index.js +171 -0
  128. package/esm/modules/ai-report/components/RankingRange/interface.d.ts +26 -0
  129. package/esm/modules/ai-report/components/RankingRange/interface.js +1 -0
  130. package/esm/modules/ai-report/components/RankingRange/styled.d.ts +7 -0
  131. package/esm/modules/ai-report/components/RankingRange/styled.js +11 -0
  132. package/esm/modules/ai-report/components/ScoreReport/Bar.d.ts +3 -0
  133. package/esm/modules/ai-report/components/ScoreReport/Bar.js +44 -0
  134. package/esm/modules/ai-report/components/ScoreReport/Failed.d.ts +4 -0
  135. package/esm/modules/ai-report/components/ScoreReport/Failed.js +25 -0
  136. package/esm/modules/ai-report/components/ScoreReport/Report.d.ts +3 -0
  137. package/esm/modules/ai-report/components/ScoreReport/Report.js +45 -0
  138. package/esm/modules/ai-report/components/ScoreReport/RosePie.d.ts +4 -0
  139. package/esm/modules/ai-report/components/ScoreReport/RosePie.js +19 -0
  140. package/esm/modules/ai-report/components/ScoreReport/Score.d.ts +4 -0
  141. package/esm/modules/ai-report/components/ScoreReport/Score.js +34 -0
  142. package/esm/modules/ai-report/components/ScoreReport/ScoreBigBall.d.ts +4 -0
  143. package/esm/modules/ai-report/components/ScoreReport/ScoreBigBall.js +26 -0
  144. package/esm/modules/ai-report/components/ScoreReport/ScoreLegend.d.ts +4 -0
  145. package/esm/modules/ai-report/components/ScoreReport/ScoreLegend.js +33 -0
  146. package/esm/modules/ai-report/components/ScoreReport/const.d.ts +34 -0
  147. package/esm/modules/ai-report/components/ScoreReport/const.js +77 -0
  148. package/esm/modules/ai-report/components/ScoreReport/index.d.ts +4 -0
  149. package/esm/modules/ai-report/components/ScoreReport/index.js +41 -0
  150. package/esm/modules/ai-report/components/ScoreReport/interface.d.ts +20 -0
  151. package/esm/modules/ai-report/components/ScoreReport/interface.js +1 -0
  152. package/esm/modules/ai-report/components/ScoreReport/styled.d.ts +25 -0
  153. package/esm/modules/ai-report/components/ScoreReport/styled.js +36 -0
  154. package/esm/modules/ai-report/components/VideoQuestion/Abilities.d.ts +4 -0
  155. package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +40 -0
  156. package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.d.ts +4 -0
  157. package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +89 -0
  158. package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.d.ts +4 -0
  159. package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.js +34 -0
  160. package/esm/modules/ai-report/components/VideoQuestion/index.d.ts +3 -0
  161. package/esm/modules/ai-report/components/VideoQuestion/index.js +21 -0
  162. package/esm/modules/ai-report/components/VideoQuestion/interface.d.ts +14 -0
  163. package/esm/modules/ai-report/components/VideoQuestion/interface.js +1 -0
  164. package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +71 -0
  165. package/esm/modules/ai-report/components/VideoQuestion/styled.js +90 -0
  166. package/esm/modules/ai-report/index.d.ts +4 -0
  167. package/esm/modules/ai-report/index.js +22 -0
  168. package/esm/modules/ai-report/interface.d.ts +114 -0
  169. package/esm/modules/ai-report/interface.js +1 -0
  170. package/esm/modules/ai-report/useAiReport.d.ts +20 -0
  171. package/esm/modules/ai-report/useAiReport.js +16 -0
  172. package/esm/services/ai-question.d.ts +13 -0
  173. package/esm/services/ai-question.js +17 -0
  174. package/esm/services/ai-report.d.ts +2 -0
  175. package/esm/services/ai-report.js +5 -0
  176. package/esm/store/ai-question/ai-analysis-store.d.ts +29 -0
  177. package/esm/store/ai-question/ai-analysis-store.js +132 -0
  178. package/esm/store/ai-question/boot-video-store.d.ts +17 -0
  179. package/esm/store/ai-question/boot-video-store.js +21 -0
  180. package/esm/store/ai-question/global-store.d.ts +32 -0
  181. package/esm/store/ai-question/global-store.js +23 -0
  182. package/esm/store/ai-question/question-model-store.d.ts +24 -0
  183. package/esm/store/ai-question/question-model-store.js +130 -0
  184. package/esm/store/ai-question/question-preview-store.d.ts +14 -0
  185. package/esm/store/ai-question/question-preview-store.js +21 -0
  186. package/esm/store/ai-question/question-template-store.d.ts +12 -0
  187. package/esm/store/ai-question/question-template-store.js +10 -0
  188. package/esm/store/ai-question/question-update-store.d.ts +11 -0
  189. package/esm/store/ai-question/question-update-store.js +33 -0
  190. package/esm/store/ai-report/global-store.d.ts +57 -0
  191. package/esm/store/ai-report/global-store.js +28 -0
  192. package/esm/utils/config.d.ts +11 -0
  193. package/esm/utils/config.js +17 -0
  194. package/esm/utils/interceptor.d.ts +2 -0
  195. package/esm/utils/interceptor.js +119 -0
  196. package/esm/utils/request.d.ts +3 -0
  197. package/esm/utils/request.js +14 -0
  198. package/esm/utils/utils.d.ts +58 -0
  199. package/esm/utils/utils.js +115 -0
  200. package/lib/assets/icons/free.svg +1 -0
  201. package/lib/assets/icons/video.svg +1 -0
  202. package/lib/components/BigBallSvg/index.d.ts +3 -0
  203. package/lib/components/BigBallSvg/index.js +22 -0
  204. package/lib/components/BigBallSvg/index.module.css +37 -0
  205. package/lib/components/Charts/Chart.d.ts +4 -0
  206. package/lib/components/Charts/Chart.js +43 -0
  207. package/lib/components/Charts/const.d.ts +382 -0
  208. package/lib/components/Charts/const.js +385 -0
  209. package/lib/components/Charts/interface.d.ts +3 -0
  210. package/lib/components/Charts/interface.js +2 -0
  211. package/lib/components/ScrollDialogContent/index.d.ts +5 -0
  212. package/lib/components/ScrollDialogContent/index.js +8 -0
  213. package/lib/components/SvgIcon/index.d.ts +4 -0
  214. package/lib/components/SvgIcon/index.js +33 -0
  215. package/lib/components/SvgIcon/interface.d.ts +3 -0
  216. package/lib/components/SvgIcon/interface.js +2 -0
  217. package/lib/components/VideoPreview/index.d.ts +4 -0
  218. package/lib/components/VideoPreview/index.js +22 -0
  219. package/lib/components/VideoPreview/interface.d.ts +15 -0
  220. package/lib/components/VideoPreview/interface.js +2 -0
  221. package/lib/components/VideoPreview/styled.d.ts +10 -0
  222. package/lib/components/VideoPreview/styled.js +27 -0
  223. package/lib/constants/ai-question.d.ts +27 -0
  224. package/lib/constants/ai-question.js +43 -0
  225. package/lib/constants/ai-report.d.ts +2 -0
  226. package/lib/constants/ai-report.js +15 -0
  227. package/lib/enum/ai-question.d.ts +38 -0
  228. package/lib/enum/ai-question.js +45 -0
  229. package/lib/enum/ai-report.d.ts +27 -0
  230. package/lib/enum/ai-report.js +33 -0
  231. package/lib/index.d.ts +6 -0
  232. package/lib/index.js +18 -0
  233. package/lib/modules/ai-question/Root.d.ts +4 -0
  234. package/lib/modules/ai-question/Root.js +146 -0
  235. package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +4 -0
  236. package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +44 -0
  237. package/lib/modules/ai-question/components/AiAnalysis/MainPoints.d.ts +4 -0
  238. package/lib/modules/ai-question/components/AiAnalysis/MainPoints.js +59 -0
  239. package/lib/modules/ai-question/components/AiAnalysis/MainPointsItem.d.ts +4 -0
  240. package/lib/modules/ai-question/components/AiAnalysis/MainPointsItem.js +64 -0
  241. package/lib/modules/ai-question/components/AiAnalysis/const.d.ts +5 -0
  242. package/lib/modules/ai-question/components/AiAnalysis/const.js +14 -0
  243. package/lib/modules/ai-question/components/AiAnalysis/index.d.ts +3 -0
  244. package/lib/modules/ai-question/components/AiAnalysis/index.js +40 -0
  245. package/lib/modules/ai-question/components/AiAnalysis/interface.d.ts +23 -0
  246. package/lib/modules/ai-question/components/AiAnalysis/interface.js +2 -0
  247. package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +19 -0
  248. package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +26 -0
  249. package/lib/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +4 -0
  250. package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +119 -0
  251. package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +27 -0
  252. package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.js +2 -0
  253. package/lib/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +39 -0
  254. package/lib/modules/ai-question/components/AiAssessmentCriteria/styled.js +26 -0
  255. package/lib/modules/ai-question/components/AiAssessmentCriteria/utils.d.ts +9 -0
  256. package/lib/modules/ai-question/components/AiAssessmentCriteria/utils.js +33 -0
  257. package/lib/modules/ai-question/components/BaseAccordion/const.d.ts +1 -0
  258. package/lib/modules/ai-question/components/BaseAccordion/const.js +4 -0
  259. package/lib/modules/ai-question/components/BaseAccordion/index.d.ts +4 -0
  260. package/lib/modules/ai-question/components/BaseAccordion/index.js +100 -0
  261. package/lib/modules/ai-question/components/BaseAccordion/interface.d.ts +9 -0
  262. package/lib/modules/ai-question/components/BaseAccordion/interface.js +2 -0
  263. package/lib/modules/ai-question/components/BaseAccordion/styled.d.ts +10 -0
  264. package/lib/modules/ai-question/components/BaseAccordion/styled.js +76 -0
  265. package/lib/modules/ai-question/components/BootVideo/index.d.ts +4 -0
  266. package/lib/modules/ai-question/components/BootVideo/index.js +105 -0
  267. package/lib/modules/ai-question/components/BootVideo/interface.d.ts +8 -0
  268. package/lib/modules/ai-question/components/BootVideo/interface.js +2 -0
  269. package/lib/modules/ai-question/components/BootVideo/styled.d.ts +33 -0
  270. package/lib/modules/ai-question/components/BootVideo/styled.js +55 -0
  271. package/lib/modules/ai-question/components/QuestionModel/Header.d.ts +3 -0
  272. package/lib/modules/ai-question/components/QuestionModel/Header.js +28 -0
  273. package/lib/modules/ai-question/components/QuestionModel/Item.d.ts +4 -0
  274. package/lib/modules/ai-question/components/QuestionModel/Item.js +76 -0
  275. package/lib/modules/ai-question/components/QuestionModel/List.d.ts +3 -0
  276. package/lib/modules/ai-question/components/QuestionModel/List.js +44 -0
  277. package/lib/modules/ai-question/components/QuestionModel/Skeleton.d.ts +3 -0
  278. package/lib/modules/ai-question/components/QuestionModel/Skeleton.js +19 -0
  279. package/lib/modules/ai-question/components/QuestionModel/index.d.ts +3 -0
  280. package/lib/modules/ai-question/components/QuestionModel/index.js +69 -0
  281. package/lib/modules/ai-question/components/QuestionModel/interface.d.ts +18 -0
  282. package/lib/modules/ai-question/components/QuestionModel/interface.js +2 -0
  283. package/lib/modules/ai-question/components/QuestionModel/styled.d.ts +9 -0
  284. package/lib/modules/ai-question/components/QuestionModel/styled.js +15 -0
  285. package/lib/modules/ai-question/components/QuestionPreview/index.d.ts +3 -0
  286. package/lib/modules/ai-question/components/QuestionPreview/index.js +36 -0
  287. package/lib/modules/ai-question/components/QuestionPreview/styled.d.ts +23 -0
  288. package/lib/modules/ai-question/components/QuestionPreview/styled.js +17 -0
  289. package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.d.ts +3 -0
  290. package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +52 -0
  291. package/lib/modules/ai-question/components/QuestionTemplate/HistoryPattern.d.ts +3 -0
  292. package/lib/modules/ai-question/components/QuestionTemplate/HistoryPattern.js +25 -0
  293. package/lib/modules/ai-question/components/QuestionTemplate/Skeleton.d.ts +3 -0
  294. package/lib/modules/ai-question/components/QuestionTemplate/Skeleton.js +19 -0
  295. package/lib/modules/ai-question/components/QuestionTemplate/index.d.ts +3 -0
  296. package/lib/modules/ai-question/components/QuestionTemplate/index.js +43 -0
  297. package/lib/modules/ai-question/components/QuestionTemplate/interface.d.ts +43 -0
  298. package/lib/modules/ai-question/components/QuestionTemplate/interface.js +2 -0
  299. package/lib/modules/ai-question/components/QuestionTemplate/styled.d.ts +87 -0
  300. package/lib/modules/ai-question/components/QuestionTemplate/styled.js +39 -0
  301. package/lib/modules/ai-question/components/QuestionUpdate/Form.d.ts +4 -0
  302. package/lib/modules/ai-question/components/QuestionUpdate/Form.js +96 -0
  303. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.d.ts +3 -0
  304. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +65 -0
  305. package/lib/modules/ai-question/components/QuestionUpdate/const.d.ts +14 -0
  306. package/lib/modules/ai-question/components/QuestionUpdate/const.js +56 -0
  307. package/lib/modules/ai-question/components/QuestionUpdate/index.d.ts +3 -0
  308. package/lib/modules/ai-question/components/QuestionUpdate/index.js +208 -0
  309. package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +57 -0
  310. package/lib/modules/ai-question/components/QuestionUpdate/interface.js +2 -0
  311. package/lib/modules/ai-question/index.d.ts +4 -0
  312. package/lib/modules/ai-question/index.js +27 -0
  313. package/lib/modules/ai-question/interface.d.ts +74 -0
  314. package/lib/modules/ai-question/interface.js +2 -0
  315. package/lib/modules/ai-question/useAiQuestion.d.ts +15 -0
  316. package/lib/modules/ai-question/useAiQuestion.js +22 -0
  317. package/lib/modules/ai-report/Root.d.ts +4 -0
  318. package/lib/modules/ai-report/Root.js +78 -0
  319. package/lib/modules/ai-report/components/NotFinish/index.d.ts +3 -0
  320. package/lib/modules/ai-report/components/NotFinish/index.js +27 -0
  321. package/lib/modules/ai-report/components/RankingRange/Item.d.ts +4 -0
  322. package/lib/modules/ai-report/components/RankingRange/Item.js +32 -0
  323. package/lib/modules/ai-report/components/RankingRange/index.d.ts +4 -0
  324. package/lib/modules/ai-report/components/RankingRange/index.js +176 -0
  325. package/lib/modules/ai-report/components/RankingRange/interface.d.ts +26 -0
  326. package/lib/modules/ai-report/components/RankingRange/interface.js +2 -0
  327. package/lib/modules/ai-report/components/RankingRange/styled.d.ts +7 -0
  328. package/lib/modules/ai-report/components/RankingRange/styled.js +14 -0
  329. package/lib/modules/ai-report/components/ScoreReport/Bar.d.ts +3 -0
  330. package/lib/modules/ai-report/components/ScoreReport/Bar.js +46 -0
  331. package/lib/modules/ai-report/components/ScoreReport/Failed.d.ts +4 -0
  332. package/lib/modules/ai-report/components/ScoreReport/Failed.js +27 -0
  333. package/lib/modules/ai-report/components/ScoreReport/Report.d.ts +3 -0
  334. package/lib/modules/ai-report/components/ScoreReport/Report.js +50 -0
  335. package/lib/modules/ai-report/components/ScoreReport/RosePie.d.ts +4 -0
  336. package/lib/modules/ai-report/components/ScoreReport/RosePie.js +24 -0
  337. package/lib/modules/ai-report/components/ScoreReport/Score.d.ts +4 -0
  338. package/lib/modules/ai-report/components/ScoreReport/Score.js +39 -0
  339. package/lib/modules/ai-report/components/ScoreReport/ScoreBigBall.d.ts +4 -0
  340. package/lib/modules/ai-report/components/ScoreReport/ScoreBigBall.js +31 -0
  341. package/lib/modules/ai-report/components/ScoreReport/ScoreLegend.d.ts +4 -0
  342. package/lib/modules/ai-report/components/ScoreReport/ScoreLegend.js +35 -0
  343. package/lib/modules/ai-report/components/ScoreReport/const.d.ts +34 -0
  344. package/lib/modules/ai-report/components/ScoreReport/const.js +80 -0
  345. package/lib/modules/ai-report/components/ScoreReport/index.d.ts +4 -0
  346. package/lib/modules/ai-report/components/ScoreReport/index.js +46 -0
  347. package/lib/modules/ai-report/components/ScoreReport/interface.d.ts +20 -0
  348. package/lib/modules/ai-report/components/ScoreReport/interface.js +2 -0
  349. package/lib/modules/ai-report/components/ScoreReport/styled.d.ts +25 -0
  350. package/lib/modules/ai-report/components/ScoreReport/styled.js +39 -0
  351. package/lib/modules/ai-report/components/VideoQuestion/Abilities.d.ts +4 -0
  352. package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +45 -0
  353. package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.d.ts +4 -0
  354. package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +94 -0
  355. package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.d.ts +4 -0
  356. package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.js +36 -0
  357. package/lib/modules/ai-report/components/VideoQuestion/index.d.ts +3 -0
  358. package/lib/modules/ai-report/components/VideoQuestion/index.js +26 -0
  359. package/lib/modules/ai-report/components/VideoQuestion/interface.d.ts +14 -0
  360. package/lib/modules/ai-report/components/VideoQuestion/interface.js +2 -0
  361. package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +71 -0
  362. package/lib/modules/ai-report/components/VideoQuestion/styled.js +93 -0
  363. package/lib/modules/ai-report/index.d.ts +4 -0
  364. package/lib/modules/ai-report/index.js +27 -0
  365. package/lib/modules/ai-report/interface.d.ts +114 -0
  366. package/lib/modules/ai-report/interface.js +2 -0
  367. package/lib/modules/ai-report/useAiReport.d.ts +20 -0
  368. package/lib/modules/ai-report/useAiReport.js +20 -0
  369. package/lib/services/ai-question.d.ts +13 -0
  370. package/lib/services/ai-question.js +28 -0
  371. package/lib/services/ai-report.d.ts +2 -0
  372. package/lib/services/ai-report.js +10 -0
  373. package/lib/store/ai-question/ai-analysis-store.d.ts +29 -0
  374. package/lib/store/ai-question/ai-analysis-store.js +138 -0
  375. package/lib/store/ai-question/boot-video-store.d.ts +17 -0
  376. package/lib/store/ai-question/boot-video-store.js +24 -0
  377. package/lib/store/ai-question/global-store.d.ts +32 -0
  378. package/lib/store/ai-question/global-store.js +26 -0
  379. package/lib/store/ai-question/question-model-store.d.ts +24 -0
  380. package/lib/store/ai-question/question-model-store.js +136 -0
  381. package/lib/store/ai-question/question-preview-store.d.ts +14 -0
  382. package/lib/store/ai-question/question-preview-store.js +24 -0
  383. package/lib/store/ai-question/question-template-store.d.ts +12 -0
  384. package/lib/store/ai-question/question-template-store.js +13 -0
  385. package/lib/store/ai-question/question-update-store.d.ts +11 -0
  386. package/lib/store/ai-question/question-update-store.js +36 -0
  387. package/lib/store/ai-report/global-store.d.ts +57 -0
  388. package/lib/store/ai-report/global-store.js +31 -0
  389. package/lib/utils/config.d.ts +11 -0
  390. package/lib/utils/config.js +20 -0
  391. package/lib/utils/interceptor.d.ts +2 -0
  392. package/lib/utils/interceptor.js +124 -0
  393. package/lib/utils/request.d.ts +3 -0
  394. package/lib/utils/request.js +22 -0
  395. package/lib/utils/utils.d.ts +58 -0
  396. package/lib/utils/utils.js +129 -0
  397. package/package.json +153 -0
@@ -0,0 +1,208 @@
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (_) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ var __rest = (this && this.__rest) || function (s, e) {
50
+ var t = {};
51
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
52
+ t[p] = s[p];
53
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
54
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
55
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
56
+ t[p[i]] = s[p[i]];
57
+ }
58
+ return t;
59
+ };
60
+ var __importDefault = (this && this.__importDefault) || function (mod) {
61
+ return (mod && mod.__esModule) ? mod : { "default": mod };
62
+ };
63
+ Object.defineProperty(exports, "__esModule", { value: true });
64
+ var jsx_runtime_1 = require("react/jsx-runtime");
65
+ var react_1 = require("react");
66
+ var fbm_ui_1 = require("fbm-ui");
67
+ var material_1 = require("@mui/material");
68
+ var ai_question_1 = require("../../../../enum/ai-question");
69
+ var question_model_store_1 = require("../../../../store/ai-question/question-model-store");
70
+ var question_update_store_1 = require("../../../../store/ai-question/question-update-store");
71
+ var ai_analysis_store_1 = require("../../../../store/ai-question/ai-analysis-store");
72
+ var ScrollDialogContent_1 = __importDefault(require("../../../../components/ScrollDialogContent"));
73
+ var const_1 = require("./const");
74
+ var Form_1 = __importDefault(require("./Form"));
75
+ var QuestionUpdate = function () {
76
+ var _a;
77
+ var formRef = (0, react_1.useRef)();
78
+ var _b = (0, react_1.useState)(false), switchTypeOpen = _b[0], setSwitchTypeOpen = _b[1];
79
+ var _c = (0, question_model_store_1.useQuestionModelStore)(), addModel = _c.addModel, editModel = _c.editModel;
80
+ var _d = (0, question_update_store_1.useUpdateQuestionStore)(function (store) { return [store.questionState]; }), questionState = _d.questionState, updateQuestionState = _d.updateQuestionState;
81
+ var _e = (0, ai_analysis_store_1.useAiAnalysisStore)(function (store) { return [
82
+ store.aiAbilities,
83
+ store.analysisState,
84
+ ]; }), aiAbilities = _e.aiAbilities, analysisState = _e.analysisState, setKeyPointAnalysisError = _e.setKeyPointAnalysisError, updateAiAbilities = _e.updateAiAbilities, updateState = _e.updateState;
85
+ var open = questionState.open, item = questionState.item, aiShowType = questionState.aiShowType, token = questionState.token, index = questionState.index;
86
+ var initialValues = {
87
+ name: item === null || item === void 0 ? void 0 : item.name,
88
+ broadcastType: item === null || item === void 0 ? void 0 : item.broadcastType,
89
+ desc: item === null || item === void 0 ? void 0 : item.desc,
90
+ readText: (_a = item === null || item === void 0 ? void 0 : item.extra) === null || _a === void 0 ? void 0 : _a.readText,
91
+ prepareTime: item === null || item === void 0 ? void 0 : item.prepareTime,
92
+ duration: item === null || item === void 0 ? void 0 : item.duration,
93
+ };
94
+ var CustomHeader = function () {
95
+ var content = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ sx: { backgroundColor: aiShowType === ai_question_1.ADD_QUESTION_TYPE.FREE ? 'rgba(76, 175, 80, 0.08)' : 'rgba(255, 255, 255, 1)' }, onClick: function () {
96
+ var _a;
97
+ setSwitchTypeOpen(false);
98
+ (_a = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _a === void 0 ? void 0 : _a.setFormValues({ broadcastType: const_1.defaultQuestionParams.broadcastType });
99
+ updateQuestionState({ aiShowType: ai_question_1.ADD_QUESTION_TYPE.FREE });
100
+ } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u81EA\u7531\u4F5C\u7B54" })) })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ sx: { backgroundColor: aiShowType === ai_question_1.ADD_QUESTION_TYPE.LANGUAGE ? 'rgba(76, 175, 80, 0.08)' : 'rgba(255, 255, 255, 1)' }, onClick: function () {
101
+ var _a;
102
+ setSwitchTypeOpen(false);
103
+ (_a = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _a === void 0 ? void 0 : _a.setFormValues({ broadcastType: const_1.defaultQuestionParams.broadcastType });
104
+ updateQuestionState({ aiShowType: ai_question_1.ADD_QUESTION_TYPE.LANGUAGE });
105
+ } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u8DDF\u8BFB\u80FD\u529B" })) }))] }));
106
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", height: 56 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: aiShowType === ai_question_1.ADD_QUESTION_TYPE.FREE ? '自由作答' : '跟读能力' })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ open: switchTypeOpen, content: content, onClickAway: function () { return setSwitchTypeOpen(false); } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", size: "small", sx: { fontSize: 12, color: 'rgb(87, 107, 149)' }, onClick: function () { return setSwitchTypeOpen(true); } }, { children: "\u5207\u6362\u9898\u578B" })) }))] })));
107
+ };
108
+ var getModelParams = (0, react_1.useCallback)(function (values, isSubmit) {
109
+ return new Promise(function (resolve, reject) {
110
+ var errorIndexes = [];
111
+ var newAiAbilities = aiAbilities.map(function (item) {
112
+ item.isNotCompute = true;
113
+ if (item.type === 6) {
114
+ var extra_1 = {};
115
+ var extraJson = JSON.parse(item.extra);
116
+ extraJson.forEach(function (_a, index) {
117
+ var words = _a.words, score = _a.score, color = _a.color;
118
+ if (!words)
119
+ errorIndexes.push(index);
120
+ extra_1[words] = { score: score, color: color };
121
+ });
122
+ setKeyPointAnalysisError(errorIndexes);
123
+ if (!errorIndexes.length && isSubmit) {
124
+ if (Object.keys(extra_1).length !== extraJson.length) {
125
+ fbm_ui_1.Message.error('关键词不可重复');
126
+ reject();
127
+ }
128
+ }
129
+ return __assign(__assign({}, item), { extra: JSON.stringify(extra_1) });
130
+ }
131
+ return item;
132
+ });
133
+ var _a = values || {}, _b = _a.readText, readText = _b === void 0 ? '' : _b, otherValues = __rest(_a, ["readText"]);
134
+ resolve({
135
+ errorIndexes: errorIndexes,
136
+ params: __assign(__assign(__assign(__assign({}, item), otherValues), analysisState), { extra: readText && item.extra ? __assign(__assign({}, item.extra), { readText: readText }) : item.extra, aiType: newAiAbilities.length > 0 && analysisState.aiSwitch === 1 ? 2 : 1, aiShowType: aiShowType, aiAbilities: newAiAbilities }),
137
+ });
138
+ });
139
+ }, [aiAbilities, aiShowType, analysisState, item, setKeyPointAnalysisError]);
140
+ var handleClose = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
141
+ var values, params;
142
+ var _a;
143
+ return __generator(this, function (_b) {
144
+ switch (_b.label) {
145
+ case 0:
146
+ values = (_a = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _a === void 0 ? void 0 : _a.handleValues();
147
+ return [4 /*yield*/, getModelParams(values, false)];
148
+ case 1:
149
+ params = (_b.sent()).params;
150
+ if (item.extra === null) {
151
+ item.extra = params.extra;
152
+ }
153
+ console.log(item, params);
154
+ if (JSON.stringify(item) !== JSON.stringify(params)) {
155
+ (0, fbm_ui_1.confirm)({
156
+ header: null,
157
+ content: '你还未保存当前修改,确认离开吗?',
158
+ okText: '离开',
159
+ okProps: {
160
+ color: 'error',
161
+ variant: 'contained',
162
+ },
163
+ onOk: function (_a) {
164
+ var onClose = _a.onClose;
165
+ updateQuestionState({ open: false });
166
+ onClose === null || onClose === void 0 ? void 0 : onClose();
167
+ },
168
+ });
169
+ }
170
+ else {
171
+ updateQuestionState({ open: false });
172
+ }
173
+ return [2 /*return*/];
174
+ }
175
+ });
176
+ }); }, [getModelParams, item, updateQuestionState]);
177
+ var handleOk = function () { return __awaiter(void 0, void 0, void 0, function () { var _a; return __generator(this, function (_b) {
178
+ return [2 /*return*/, (_a = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _a === void 0 ? void 0 : _a.handleSubmit()];
179
+ }); }); };
180
+ var handleSubmit = (0, react_1.useCallback)(function (values) { return __awaiter(void 0, void 0, void 0, function () {
181
+ var _a, errorIndexes, params;
182
+ return __generator(this, function (_b) {
183
+ switch (_b.label) {
184
+ case 0: return [4 /*yield*/, getModelParams(values, true)];
185
+ case 1:
186
+ _a = _b.sent(), errorIndexes = _a.errorIndexes, params = _a.params;
187
+ if (values.broadcastType === 2 && !(item === null || item === void 0 ? void 0 : item.videoBroadcast.videoUrl)) {
188
+ fbm_ui_1.Message.error('请上传视频素材');
189
+ return [2 /*return*/, false];
190
+ }
191
+ if (!errorIndexes.length) {
192
+ token ? editModel(params, index) : addModel(params);
193
+ updateQuestionState({ open: false });
194
+ }
195
+ return [2 /*return*/];
196
+ }
197
+ });
198
+ }); }, [getModelParams, item === null || item === void 0 ? void 0 : item.videoBroadcast.videoUrl, token, editModel, index, addModel, updateQuestionState]);
199
+ (0, react_1.useEffect)(function () {
200
+ if (open) {
201
+ updateState({ language: item.language, aiSwitch: item.aiSwitch });
202
+ updateAiAbilities(item.aiAbilities, true);
203
+ }
204
+ // eslint-disable-next-line react-hooks/exhaustive-deps
205
+ }, [open]);
206
+ return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, header: CustomHeader, size: "sm", okText: "\u786E\u8BA4", onClose: handleClose, onOk: handleOk }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { mt: 1 } }, { children: (0, jsx_runtime_1.jsx)(Form_1.default, { ref: formRef, initialValues: initialValues, aiShowType: aiShowType, onSubmit: handleSubmit }) })) }) })));
207
+ };
208
+ exports.default = QuestionUpdate;
@@ -0,0 +1,57 @@
1
+ import { BaseAiAbilityParams, BaseExtraParams } from '@/modules/ai-question/interface';
2
+ export interface VideoBroadcastParams {
3
+ videoRetry?: number;
4
+ videoUrl?: string;
5
+ }
6
+ export interface QuestionParams {
7
+ name: string;
8
+ token: string;
9
+ originToken: string;
10
+ type: number;
11
+ desc: string;
12
+ prepareTime: number;
13
+ duration: number;
14
+ category: string[];
15
+ extra: BaseExtraParams;
16
+ broadcastType: number;
17
+ aiSwitch?: number;
18
+ aiType: number;
19
+ weight: number | string;
20
+ language?: number;
21
+ aiShowType: number;
22
+ videoBroadcast: VideoBroadcastParams;
23
+ answerStatus: number;
24
+ aiAbilities: BaseAiAbilityParams[];
25
+ }
26
+ export interface SubmitModelParams {
27
+ name: string;
28
+ questions: QuestionParams[];
29
+ }
30
+ export interface QuestionFormValues {
31
+ name: string;
32
+ desc: string;
33
+ prepareTime: number;
34
+ duration: number;
35
+ broadcastType: number;
36
+ readText?: string;
37
+ }
38
+ export interface QuestionFormProps {
39
+ initialValues: QuestionFormValues;
40
+ values?: QuestionFormValues;
41
+ preview?: boolean;
42
+ aiShowType: number;
43
+ onValuesChange?: (values: QuestionFormValues) => void;
44
+ onSubmit?: (values: QuestionFormValues) => void;
45
+ }
46
+ export interface UpdateQuestionState {
47
+ open: boolean;
48
+ aiShowType: number;
49
+ token: string;
50
+ item: QuestionParams;
51
+ index: number;
52
+ }
53
+ export interface FormRef {
54
+ handleValues: () => QuestionFormValues;
55
+ handleSubmit: () => void;
56
+ setFormValues: (values: Partial<QuestionFormValues>) => void;
57
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { AiQuestionProps } from './interface';
3
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<AiQuestionProps & React.RefAttributes<any>>>;
4
+ export default _default;
@@ -0,0 +1,27 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var jsx_runtime_1 = require("react/jsx-runtime");
18
+ var react_1 = require("react");
19
+ var hox_1 = require("hox");
20
+ var fbm_ui_1 = require("fbm-ui");
21
+ var styles_1 = require("@mui/material/styles");
22
+ var Root_1 = __importDefault(require("./Root"));
23
+ var AiQuestion = (0, react_1.forwardRef)(function (props, ref) {
24
+ return ((0, jsx_runtime_1.jsx)(fbm_ui_1.ThemeProvider, { children: (0, jsx_runtime_1.jsx)(styles_1.StyledEngineProvider, __assign({ injectFirst: true }, { children: (0, jsx_runtime_1.jsx)(hox_1.HoxRoot, { children: (0, jsx_runtime_1.jsx)(Root_1.default, __assign({ ref: ref }, props)) }) })) }));
25
+ });
26
+ AiQuestion.displayName = 'AiQuestion';
27
+ exports.default = (0, react_1.memo)(AiQuestion);
@@ -0,0 +1,74 @@
1
+ import { QuestionModelStep } from './components/QuestionModel/interface';
2
+ export interface BaseExtraParams {
3
+ expect?: string;
4
+ target?: string;
5
+ model?: number;
6
+ readText: string;
7
+ decisionMaxScore?: number;
8
+ icon?: string;
9
+ riskMaxScore?: number;
10
+ maxScore?: number;
11
+ }
12
+ export interface BaseAiAbilityParams {
13
+ token: string;
14
+ name: string;
15
+ type: number;
16
+ category: number;
17
+ config?: {};
18
+ extra: string;
19
+ relatedAbilities: number[];
20
+ sort: number;
21
+ weight: number | string;
22
+ }
23
+ export interface MineExtra {
24
+ firstFrameUrl: string;
25
+ }
26
+ export interface CommonUploadData {
27
+ length: number;
28
+ mineExtra: MineExtra;
29
+ url: string;
30
+ }
31
+ export interface CommonUploadDataRes {
32
+ data: CommonUploadData[];
33
+ }
34
+ export interface SaveAiModelData {
35
+ token: string;
36
+ }
37
+ export interface SaveAiModelDataRes {
38
+ data: SaveAiModelData;
39
+ }
40
+ export interface Media {
41
+ mediaUrl?: string;
42
+ thumbUrl?: string;
43
+ appliedAllPosition?: boolean;
44
+ }
45
+ export interface AiQuestionProps {
46
+ token: string;
47
+ name?: string;
48
+ historyPatterns?: any[];
49
+ mediaList?: Array<{
50
+ url: string;
51
+ thumbUrl: string;
52
+ }>;
53
+ onLoad?: (steps: QuestionModelStep[] | undefined) => void;
54
+ }
55
+ export interface AiQuestionValues {
56
+ data: {
57
+ name?: string;
58
+ token?: string;
59
+ steps: QuestionModelStep[] | undefined;
60
+ };
61
+ media: Media;
62
+ }
63
+ export interface AiQuestionSubmitData extends Media {
64
+ token: string;
65
+ }
66
+ export interface AiQuestionSubmitRes {
67
+ code: number;
68
+ data: AiQuestionSubmitData | undefined;
69
+ message: string;
70
+ }
71
+ export interface AiQuestionRef {
72
+ handleValues: () => Promise<AiQuestionValues>;
73
+ handleSubmit: () => Promise<AiQuestionSubmitRes>;
74
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import { AiQuestionProps, AiQuestionRef } from './interface';
3
+ export declare const useAiQuestion: (props: AiQuestionProps) => {
4
+ ref: import("react").MutableRefObject<AiQuestionRef | undefined>;
5
+ handleValues: () => Promise<import("./interface").AiQuestionValues>;
6
+ handleSubmit: () => Promise<import("./interface").AiQuestionSubmitRes>;
7
+ token: string;
8
+ name?: string | undefined;
9
+ historyPatterns?: any[] | undefined;
10
+ mediaList?: {
11
+ url: string;
12
+ thumbUrl: string;
13
+ }[] | undefined;
14
+ onLoad?: ((steps: import("./components/QuestionModel/interface").QuestionModelStep[] | undefined) => void) | undefined;
15
+ };
@@ -0,0 +1,22 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.useAiQuestion = void 0;
15
+ var react_1 = require("react");
16
+ var useAiQuestion = function (props) {
17
+ var ref = (0, react_1.useRef)();
18
+ var handleValues = function () { var _a; return (ref.current ? (_a = ref.current) === null || _a === void 0 ? void 0 : _a.handleValues() : Promise.reject()); };
19
+ var handleSubmit = function () { var _a; return (ref.current ? (_a = ref.current) === null || _a === void 0 ? void 0 : _a.handleSubmit() : Promise.reject()); };
20
+ return __assign(__assign({}, props), { ref: ref, handleValues: handleValues, handleSubmit: handleSubmit });
21
+ };
22
+ exports.useAiQuestion = useAiQuestion;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { AiReportProps } from './interface';
3
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<AiReportProps & React.RefAttributes<any>>>;
4
+ export default _default;
@@ -0,0 +1,78 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var jsx_runtime_1 = require("react/jsx-runtime");
18
+ var react_1 = require("react");
19
+ var fbm_ui_1 = require("fbm-ui");
20
+ var ahooks_1 = require("ahooks");
21
+ var global_store_1 = require("../../store/ai-report/global-store");
22
+ var ai_report_1 = require("../../services/ai-report");
23
+ var ai_report_2 = require("../../enum/ai-report");
24
+ var ScoreReport_1 = __importDefault(require("./components/ScoreReport"));
25
+ var VideoQuestion_1 = __importDefault(require("./components/VideoQuestion"));
26
+ var NotFinish_1 = __importDefault(require("./components/NotFinish"));
27
+ var NO_ANSWER = ai_report_2.INTERVIEW_STATUS.NO_ANSWER;
28
+ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
29
+ var token = props.token, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
30
+ var firstLoad = (0, react_1.useRef)(true);
31
+ var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult;
32
+ var _b = (0, ahooks_1.useRequest)(function () { return (0, ai_report_1.PostAiInterviewResult)([token]); }, {
33
+ manual: true,
34
+ onSuccess: function (_a) {
35
+ var list = _a.data.list;
36
+ var result = list[0];
37
+ updateReportResult(result);
38
+ if (firstLoad.current) {
39
+ var pageStepIndexes_1 = [];
40
+ result.steps.forEach(function (_a, index) {
41
+ var videoUrl = _a.answer.videoUrl;
42
+ if (videoUrl) {
43
+ pageStepIndexes_1.push(index);
44
+ }
45
+ });
46
+ firstLoad.current = false;
47
+ onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
48
+ }
49
+ },
50
+ }), data = _b.data, loading = _b.loading, postAiInterviewResult = _b.run;
51
+ var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
52
+ var handleRefreshSuccess = (0, react_1.useCallback)(function () {
53
+ postAiInterviewResult();
54
+ }, [postAiInterviewResult]);
55
+ (0, react_1.useImperativeHandle)(ref, function () { return ({
56
+ handleRefresh: function () { return postAiInterviewResult(); },
57
+ }); });
58
+ (0, react_1.useEffect)(function () {
59
+ firstLoad.current = true;
60
+ postAiInterviewResult();
61
+ // eslint-disable-next-line react-hooks/exhaustive-deps
62
+ }, [token]);
63
+ (0, react_1.useEffect)(function () {
64
+ updateState(props);
65
+ // eslint-disable-next-line react-hooks/exhaustive-deps
66
+ }, [props]);
67
+ var aiReportResult = (0, react_1.useMemo)(function () {
68
+ if (status === NO_ANSWER) {
69
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ style: { marginTop: '2px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
70
+ }
71
+ else {
72
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (0, jsx_runtime_1.jsx)(ScoreReport_1.default, { onRefreshSuccess: handleRefreshSuccess }), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }));
73
+ }
74
+ }, [handleRefreshSuccess, onSendReminderClick, reminderSent, status, operableButtons]);
75
+ return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '584px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
76
+ });
77
+ AiReportRoot.displayName = 'AiReportRoot';
78
+ exports.default = (0, react_1.memo)(AiReportRoot);
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ declare const NotFinish: FC;
3
+ export default NotFinish;
@@ -0,0 +1,27 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var jsx_runtime_1 = require("react/jsx-runtime");
15
+ var fbm_ui_1 = require("fbm-ui");
16
+ var global_store_1 = require("../../../../store/ai-report/global-store");
17
+ var ai_report_1 = require("../../../../enum/ai-report");
18
+ var NotFinish = function () {
19
+ var _a = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.interviewCheat]; }), reportResult = _a.reportResult, interviewCheat = _a.interviewCheat;
20
+ var _b = (reportResult || {}).completedStatus, completedStatus = _b === void 0 ? 1 : _b;
21
+ var _c = interviewCheat || {}, isCheat = _c.isCheat, info = _c.info;
22
+ if (completedStatus === ai_report_1.COMPLETED_STATUS.NOT_COMPLETED || isCheat) {
23
+ return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mb: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Alert, __assign({ type: isCheat ? 'error' : 'warning' }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: info || '该候选人尚未回答完所有题目,建议提醒候选人完成面试' })) })) })));
24
+ }
25
+ return null;
26
+ };
27
+ exports.default = NotFinish;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { RankingRangeItemProps } from './interface';
3
+ declare const _default: React.NamedExoticComponent<RankingRangeItemProps>;
4
+ export default _default;
@@ -0,0 +1,32 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var jsx_runtime_1 = require("react/jsx-runtime");
15
+ var react_1 = require("react");
16
+ var fbm_ui_1 = require("fbm-ui");
17
+ var styled_1 = require("./styled");
18
+ var RankingRangeItem = function (props) {
19
+ var item = props.item, disabled = props.disabled, index = props.index, onChange = props.onChange, onDelete = props.onDelete;
20
+ var _a = (0, react_1.useState)('0'), endRankProportion = _a[0], setEndRankProportion = _a[1];
21
+ (0, react_1.useEffect)(function () {
22
+ setEndRankProportion(item.scoreRankIntervals.endRankProportion.toString());
23
+ }, [item]);
24
+ var handleChange = (0, react_1.useCallback)(function (value) {
25
+ var isIntegerReg = /^[1-9]\d*$/;
26
+ if (isIntegerReg.test(value) || !value) {
27
+ setEndRankProportion(value);
28
+ }
29
+ }, []);
30
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", sx: { mb: 1 } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(styled_1.RangeInput, { size: "small", disabled: true, value: item.scoreRankIntervals.startRankProportion, endAdornment: "%" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { pl: 1, pr: 1 } }, { children: "-" })), (0, jsx_runtime_1.jsx)(styled_1.RangeInput, { size: "small", disabled: disabled, endAdornment: "%", value: endRankProportion, onChange: function (e) { return handleChange(e.target.value); }, onBlur: function () { return onChange(endRankProportion ? Number(endRankProportion) : 1, index); } }), index !== 0 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ sx: { ml: 1 }, onClick: function () { return onDelete(index); } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) })))] })) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", flex: "1 0" }, { children: [(0, jsx_runtime_1.jsx)(styled_1.RangeTypography, __assign({ variant: "body1" }, { children: item.score.startScore.toFixed(2) })), (0, jsx_runtime_1.jsx)(styled_1.RangeTypography, __assign({ variant: "body1", sx: { pl: 1, pr: 1 } }, { children: "-" })), (0, jsx_runtime_1.jsx)(styled_1.RangeTypography, __assign({ variant: "body1" }, { children: item.score.endScore.toFixed(2) })), (0, jsx_runtime_1.jsx)(styled_1.RangeTypography, __assign({ variant: "body1", sx: { pl: 1 } }, { children: "\u5206" }))] }))] })));
31
+ };
32
+ exports.default = (0, react_1.memo)(RankingRangeItem);
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { RankingRangeProps } from './interface';
3
+ declare const RankingRange: FC<RankingRangeProps>;
4
+ export default RankingRange;