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,114 @@
1
+ import { ScoreRankInterval, ScoreRankIntervals } from './components/RankingRange/interface';
2
+ export interface AiModel {
3
+ token: string;
4
+ name: string;
5
+ }
6
+ export interface Question {
7
+ token: string;
8
+ name: string;
9
+ desc: string;
10
+ duration: number;
11
+ type: number;
12
+ }
13
+ export interface AnalysisResult {
14
+ text: string;
15
+ answer: string;
16
+ colorBlindAnswer: string;
17
+ img: string;
18
+ pass?: boolean;
19
+ letter: string;
20
+ pronAccuracy?: any;
21
+ pronCompletion?: any;
22
+ pronFluency?: any;
23
+ suggestedScore?: any;
24
+ words?: any;
25
+ score1?: number;
26
+ score2?: number;
27
+ }
28
+ export interface Answer {
29
+ videoUrl: string;
30
+ analysisResult: AnalysisResult;
31
+ }
32
+ export interface Ability {
33
+ originScore: number;
34
+ finalScore: number;
35
+ name: string;
36
+ type: number;
37
+ weight: number | string;
38
+ }
39
+ export interface ScoreInfo {
40
+ weight: number | string;
41
+ originScore: number;
42
+ finalScore: number;
43
+ score: number;
44
+ abilities: Ability[];
45
+ }
46
+ export interface AiEvaluation {
47
+ assessmentPoint: string[];
48
+ balancePoint: string[];
49
+ increasePoint: any[];
50
+ decreasePoint: any[];
51
+ }
52
+ export interface AiInterviewReportStep {
53
+ token: string;
54
+ status: number;
55
+ question: Question;
56
+ answer: Answer;
57
+ scoreInfo: ScoreInfo;
58
+ aiEvaluation: AiEvaluation;
59
+ }
60
+ export interface FaceAnalysis {
61
+ age: number;
62
+ beauty: number;
63
+ }
64
+ export interface AiInterviewReportList {
65
+ orderToken: string;
66
+ aiModel: AiModel;
67
+ faceUrl: string;
68
+ faceAnalysis: FaceAnalysis;
69
+ score: number;
70
+ status: number;
71
+ completedStatus: number;
72
+ createTime: number;
73
+ startTime: number;
74
+ completeTime: number;
75
+ steps: AiInterviewReportStep[];
76
+ }
77
+ export interface AiInterviewReportData {
78
+ list: AiInterviewReportList[];
79
+ }
80
+ export interface AiInterviewReportRes {
81
+ data: AiInterviewReportData;
82
+ }
83
+ export interface ScoreManualUpdateState {
84
+ flowStepToken: string;
85
+ type: 1 | 2;
86
+ aiAbilityChangeType?: number;
87
+ score: number;
88
+ }
89
+ export interface AiReportLoadedValues extends AiInterviewReportList {
90
+ pageStepIndexes: number[];
91
+ }
92
+ export interface InterviewCheat {
93
+ isCheat: boolean;
94
+ info: string;
95
+ }
96
+ export interface AiReportProps {
97
+ token: string;
98
+ scoreRankIntervals?: ScoreRankInterval[];
99
+ disabledScore?: boolean;
100
+ reminderSent?: boolean;
101
+ operableButtons?: Array<'export' | 'refresh' | 'scoreRank' | 'abilities' | 'sendReminder'>;
102
+ stepToken?: string;
103
+ interviewCheat?: InterviewCheat;
104
+ onLoad?: (values: AiReportLoadedValues) => void;
105
+ onExportReportClick?: () => void;
106
+ onScoreChange?: (scoreState?: ScoreManualUpdateState) => void;
107
+ onStepChange?: (stepToken: string) => void;
108
+ onSendReminderClick?: () => void;
109
+ onScoreRankIntervalsChange?: (scoreRankIntervals?: ScoreRankIntervals[]) => void;
110
+ onScoreRankIntervalsSubmit?: (scoreRankIntervals?: ScoreRankIntervals[]) => Promise<any>;
111
+ }
112
+ export interface AiReportRef {
113
+ handleRefresh: () => void;
114
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { AiReportProps, AiReportRef } from './interface';
3
+ export declare const useAiReport: (props: AiReportProps) => {
4
+ handleRefresh?: (() => void) | undefined;
5
+ token: string;
6
+ scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankInterval[] | undefined;
7
+ disabledScore?: boolean | undefined;
8
+ reminderSent?: boolean | undefined;
9
+ operableButtons?: ("export" | "refresh" | "scoreRank" | "abilities" | "sendReminder")[] | undefined;
10
+ stepToken?: string | undefined;
11
+ interviewCheat?: import("./interface").InterviewCheat | undefined;
12
+ onLoad?: ((values: import("./interface").AiReportLoadedValues) => void) | undefined;
13
+ onExportReportClick?: (() => void) | undefined;
14
+ onScoreChange?: ((scoreState?: import("./interface").ScoreManualUpdateState | undefined) => void) | undefined;
15
+ onStepChange?: ((stepToken: string) => void) | undefined;
16
+ onSendReminderClick?: (() => void) | undefined;
17
+ onScoreRankIntervalsChange?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => void) | undefined;
18
+ onScoreRankIntervalsSubmit?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => Promise<any>) | undefined;
19
+ ref: import("react").MutableRefObject<AiReportRef | undefined>;
20
+ };
@@ -0,0 +1,16 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { useRef } from 'react';
13
+ export var useAiReport = function (props) {
14
+ var ref = useRef();
15
+ return __assign(__assign({ ref: ref }, props), ref === null || ref === void 0 ? void 0 : ref.current);
16
+ };
@@ -0,0 +1,13 @@
1
+ export declare const PostCommonUpload: <R>(data: FormData) => import("axios").AxiosPromise<R>;
2
+ export declare const PostAiModelQuestions: <R>() => import("axios").AxiosPromise<R>;
3
+ export declare const PostAiModels: <R>() => import("axios").AxiosPromise<R>;
4
+ export declare const PostAiModelDetails: <R>(token: string) => import("axios").AxiosPromise<R>;
5
+ export declare const PostAiAbilities: <R>() => import("axios").AxiosPromise<R>;
6
+ export declare const PostAiModelUpsert: <R>(data: any) => import("axios").AxiosPromise<R>;
7
+ export declare const GetHistoryPatterns: <R>() => import("axios").AxiosPromise<R>;
8
+ interface PostAiInterviewData {
9
+ aiModelToken: string;
10
+ orderTokens: string[];
11
+ }
12
+ export declare const PostAiInterview: <R>(data: PostAiInterviewData) => import("axios").AxiosPromise<R>;
13
+ export {};
@@ -0,0 +1,17 @@
1
+ import { GET, POST } from "../utils/request";
2
+ // 公共上传
3
+ export var PostCommonUpload = function (data) { return POST({ url: '/common/upload', data: data }); };
4
+ // 题库模版列表
5
+ export var PostAiModelQuestions = function () { return POST({ url: '/standard/b/aiModel/questions' }); };
6
+ // AI模型列表
7
+ export var PostAiModels = function () { return POST({ url: '/standard/b/aiModels' }); };
8
+ // AI模型详情
9
+ export var PostAiModelDetails = function (token) { return POST({ url: "/standard/b/aiModel/".concat(token) }); };
10
+ // AI维度列表
11
+ export var PostAiAbilities = function () { return POST({ url: "/standard/b/aiAbilities" }); };
12
+ // 创建或修改AI模型
13
+ export var PostAiModelUpsert = function (data) { return POST({ url: '/standard/b/aiModel/upsert', data: data }); };
14
+ // 已有岗位模型
15
+ export var GetHistoryPatterns = function () { return GET({ url: '/aiProcess/historyPatterns' }); };
16
+ // 创建面试
17
+ export var PostAiInterview = function (data) { return POST({ url: '/standard/b/aiInterview', data: data }); };
@@ -0,0 +1,2 @@
1
+ export declare const PostAiInterviewResult: <R>(orderTokens: string[]) => import("axios").AxiosPromise<R>;
2
+ export declare const PostAiInterviewRefresh: <R>(orderID: string) => import("axios").AxiosPromise<R>;
@@ -0,0 +1,5 @@
1
+ import { POST } from "../utils/request";
2
+ // 查询面试结果
3
+ export var PostAiInterviewResult = function (orderTokens) { return POST({ url: "/standard/b/aiInterview/result", data: { orderTokens: orderTokens } }); };
4
+ // 刷新ai评分
5
+ export var PostAiInterviewRefresh = function (orderID) { return POST({ url: "/standard/b/aiInterview/aiScore/refresh/single", data: { orderID: orderID } }); };
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ import { QuestionParams } from '@/modules/ai-question/components/QuestionUpdate/interface';
3
+ import { AiAbilityItem } from '@/modules/ai-question/components/AiAssessmentCriteria/interface';
4
+ interface AnalysisStateParams extends Pick<QuestionParams, 'aiSwitch' | 'language'> {
5
+ }
6
+ export declare const useAiAnalysisStore: (depsFn?: import("hox/es/types").DepsFn<{
7
+ aiAbilities: AiAbilityItem[];
8
+ analysisState: AnalysisStateParams;
9
+ keyPointAnalysisError: number[];
10
+ updateState: (params: Partial<AnalysisStateParams>) => void;
11
+ updateAiAbilities: (data: AiAbilityItem[], inInit?: any) => void;
12
+ updateAiAbilitiesWeight: (value: string, index: number) => void;
13
+ removeAiAbilities: (index: number) => void;
14
+ setKeyPointAnalysisError: import("react").Dispatch<import("react").SetStateAction<number[]>>;
15
+ }> | undefined) => {
16
+ aiAbilities: AiAbilityItem[];
17
+ analysisState: AnalysisStateParams;
18
+ keyPointAnalysisError: number[];
19
+ updateState: (params: Partial<AnalysisStateParams>) => void;
20
+ updateAiAbilities: (data: AiAbilityItem[], inInit?: any) => void;
21
+ updateAiAbilitiesWeight: (value: string, index: number) => void;
22
+ removeAiAbilities: (index: number) => void;
23
+ setKeyPointAnalysisError: import("react").Dispatch<import("react").SetStateAction<number[]>>;
24
+ }, AiAnalysisStoreProvider: import("react").FC<{
25
+ children?: import("react").ReactNode;
26
+ }> | import("react").NamedExoticComponent<{
27
+ children?: import("react").ReactNode;
28
+ }>;
29
+ export {};
@@ -0,0 +1,132 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var _a;
13
+ import { useEffect, useState, useCallback } from 'react';
14
+ import update from 'immutability-helper';
15
+ import { createStore } from 'hox';
16
+ import { useSetState } from 'ahooks';
17
+ import { formatNumberDecimal, computeDecimalValue, uniqueId } from "../../utils/utils";
18
+ import { useUpdateQuestionStore } from "./question-update-store";
19
+ var defaultAnalysisState = { aiSwitch: 2, language: 1 };
20
+ export var useAiAnalysisStore = (_a = createStore(function () {
21
+ var questionState = useUpdateQuestionStore(function (store) { return [store.questionState]; }).questionState;
22
+ var _a = useState([]), aiAbilities = _a[0], setAiAbilities = _a[1];
23
+ var _b = useSetState(defaultAnalysisState), analysisState = _b[0], setState = _b[1];
24
+ var _c = useState([]), keyPointAnalysisError = _c[0], setKeyPointAnalysisError = _c[1];
25
+ var updateState = function (params) { return setState(params); };
26
+ /**
27
+ * 权重值计算
28
+ * @param steps 模型数据
29
+ */
30
+ var computeWeight = useCallback(function (data, inInit) {
31
+ if (inInit === void 0) { inInit = false; }
32
+ var weightList = data.filter(function (_a) {
33
+ var isNotCompute = _a.isNotCompute;
34
+ return !isNotCompute;
35
+ }).map(function (_a) {
36
+ var weight = _a.weight;
37
+ return Math.floor(Number(weight));
38
+ });
39
+ var weightsLen = Array.from(new Set(weightList)).length;
40
+ var lastToken = data.length ? data[data.length - 1].token : '';
41
+ var beforeTotalWeight = data.map(function (_a, i) {
42
+ var weight = _a.weight;
43
+ return (i < data.length - 1 ? Number(weight) : 0);
44
+ }).reduce(function (pv, i) { return pv + i; }, 0);
45
+ var getWeight = function (_a) {
46
+ var token = _a.token, weight = _a.weight;
47
+ if (weightsLen <= 1 && !inInit) {
48
+ var dataLength = data.length;
49
+ var averageWeight = 100 / dataLength;
50
+ var disableWeight = 100 - Math.floor(averageWeight * (dataLength - 1) * 100) / 100;
51
+ return token === data[dataLength - 1].token ? computeDecimalValue(disableWeight.toString()) : computeDecimalValue(averageWeight.toString());
52
+ }
53
+ else {
54
+ return lastToken !== token ? weight : computeDecimalValue((100 - beforeTotalWeight).toString());
55
+ }
56
+ };
57
+ var $splice = data.map(function (item, i) {
58
+ return [
59
+ i,
60
+ 1,
61
+ __assign(__assign({}, item), { isNotCompute: false, weight: getWeight(item) }),
62
+ ];
63
+ });
64
+ setAiAbilities(update(data, { $splice: $splice }));
65
+ }, []);
66
+ /**
67
+ * 更新AI分析维度
68
+ */
69
+ var updateAiAbilities = useCallback(function (data, inInit) {
70
+ if (inInit === void 0) { inInit = false; }
71
+ console.log(data);
72
+ data.forEach(function (item) {
73
+ if (item.isNotCompute === undefined) {
74
+ item.isNotCompute = true;
75
+ }
76
+ if (!item.extra) {
77
+ if (item.type === 6) {
78
+ item.extra = JSON.stringify([{ words: '', score: '0', color: 'rgb(249, 222, 148)', id: uniqueId() }]);
79
+ }
80
+ if (item.type === 8) {
81
+ item.extra = JSON.stringify({ expect: 'positive' });
82
+ }
83
+ }
84
+ });
85
+ computeWeight(data, inInit);
86
+ }, [computeWeight]);
87
+ /**
88
+ * 更新AI分析维度权重
89
+ */
90
+ var updateAiAbilitiesWeight = useCallback(function (value, index) {
91
+ var _a;
92
+ var formatValue = formatNumberDecimal(value);
93
+ var curOriginalWeight = Number(aiAbilities[index].weight);
94
+ var disabledWeight = Number(aiAbilities[aiAbilities.length - 1].weight);
95
+ var maxInputValue = computeDecimalValue((curOriginalWeight + disabledWeight).toString());
96
+ if (Number(formatValue) <= maxInputValue) {
97
+ var newAiAbilities = update(aiAbilities, (_a = {}, _a[index] = { weight: { $set: formatValue } }, _a));
98
+ computeWeight(newAiAbilities);
99
+ }
100
+ }, [aiAbilities, computeWeight]);
101
+ /**
102
+ * 删除AI分析维度
103
+ */
104
+ var removeAiAbilities = useCallback(function (index) {
105
+ var newAiAbilities = update(aiAbilities, { $splice: [[index, 1]] });
106
+ if (newAiAbilities.length) {
107
+ computeWeight(newAiAbilities);
108
+ }
109
+ else {
110
+ setAiAbilities(newAiAbilities);
111
+ }
112
+ }, [aiAbilities, computeWeight]);
113
+ useEffect(function () {
114
+ if (!questionState.open) {
115
+ setTimeout(function () {
116
+ setAiAbilities([]);
117
+ setState(defaultAnalysisState);
118
+ setKeyPointAnalysisError([]);
119
+ });
120
+ }
121
+ }, [questionState.open, setState]);
122
+ return {
123
+ aiAbilities: aiAbilities,
124
+ analysisState: analysisState,
125
+ keyPointAnalysisError: keyPointAnalysisError,
126
+ updateState: updateState,
127
+ updateAiAbilities: updateAiAbilities,
128
+ updateAiAbilitiesWeight: updateAiAbilitiesWeight,
129
+ removeAiAbilities: removeAiAbilities,
130
+ setKeyPointAnalysisError: setKeyPointAnalysisError,
131
+ };
132
+ }), _a[0]), AiAnalysisStoreProvider = _a[1];
@@ -0,0 +1,17 @@
1
+ import { Media } from '@/modules/ai-question/interface';
2
+ export declare const useBootVideoStore: (depsFn?: import("hox/es/types").DepsFn<{
3
+ updateBootVideo: (params: Media) => void;
4
+ mediaUrl?: string | undefined;
5
+ thumbUrl?: string | undefined;
6
+ appliedAllPosition?: boolean | undefined;
7
+ }> | undefined) => {
8
+ updateBootVideo: (params: Media) => void;
9
+ mediaUrl?: string | undefined;
10
+ thumbUrl?: string | undefined;
11
+ appliedAllPosition?: boolean | undefined;
12
+ }, getBootVideoStore: () => {
13
+ updateBootVideo: (params: Media) => void;
14
+ mediaUrl?: string | undefined;
15
+ thumbUrl?: string | undefined;
16
+ appliedAllPosition?: boolean | undefined;
17
+ } | undefined;
@@ -0,0 +1,21 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var _a;
13
+ import { useState } from 'react';
14
+ import { createGlobalStore } from 'hox';
15
+ export var useBootVideoStore = (_a = createGlobalStore(function () {
16
+ var _a = useState({ mediaUrl: '', thumbUrl: '', appliedAllPosition: false }), state = _a[0], setState = _a[1];
17
+ var updateBootVideo = function (params) {
18
+ setState(__assign(__assign({}, state), params));
19
+ };
20
+ return __assign(__assign({}, state), { updateBootVideo: updateBootVideo });
21
+ }), _a[0]), getBootVideoStore = _a[1];
@@ -0,0 +1,32 @@
1
+ import { AiQuestionProps } from '@/modules/ai-question/interface';
2
+ export declare const useAiQuestionStore: (depsFn?: import("hox/es/types").DepsFn<{
3
+ updateState: import("ahooks/lib/useSetState").SetState<AiQuestionProps>;
4
+ token: string;
5
+ name?: string | undefined;
6
+ historyPatterns?: any[] | undefined;
7
+ mediaList?: {
8
+ url: string;
9
+ thumbUrl: string;
10
+ }[] | undefined;
11
+ onLoad?: ((steps: import("../../modules/ai-question/components/QuestionModel/interface").QuestionModelStep[] | undefined) => void) | undefined;
12
+ }> | undefined) => {
13
+ updateState: import("ahooks/lib/useSetState").SetState<AiQuestionProps>;
14
+ token: string;
15
+ name?: string | undefined;
16
+ historyPatterns?: any[] | undefined;
17
+ mediaList?: {
18
+ url: string;
19
+ thumbUrl: string;
20
+ }[] | undefined;
21
+ onLoad?: ((steps: import("../../modules/ai-question/components/QuestionModel/interface").QuestionModelStep[] | undefined) => void) | undefined;
22
+ }, getAiQuestionStore: () => {
23
+ updateState: import("ahooks/lib/useSetState").SetState<AiQuestionProps>;
24
+ token: string;
25
+ name?: string | undefined;
26
+ historyPatterns?: any[] | undefined;
27
+ mediaList?: {
28
+ url: string;
29
+ thumbUrl: string;
30
+ }[] | undefined;
31
+ onLoad?: ((steps: import("../../modules/ai-question/components/QuestionModel/interface").QuestionModelStep[] | undefined) => void) | undefined;
32
+ } | undefined;
@@ -0,0 +1,23 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var _a;
13
+ import { useSetState } from 'ahooks';
14
+ import { createGlobalStore } from 'hox';
15
+ export var useAiQuestionStore = (_a = createGlobalStore(function () {
16
+ var _a = useSetState({
17
+ token: '',
18
+ name: '',
19
+ historyPatterns: [],
20
+ mediaList: [],
21
+ }), state = _a[0], updateState = _a[1];
22
+ return __assign(__assign({}, state), { updateState: updateState });
23
+ }), _a[0]), getAiQuestionStore = _a[1];
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ import { QuestionModelData, QuestionModelStep } from '@/modules/ai-question/components/QuestionModel/interface';
3
+ export declare const useQuestionModelStore: (depsFn?: import("hox/es/types").DepsFn<{
4
+ questionModelData: QuestionModelData | undefined;
5
+ addModel: (modelStep: QuestionModelStep | QuestionModelStep[]) => void;
6
+ editModel: (modelStep: QuestionModelStep, index: number) => void;
7
+ removeModel: (index: number) => void;
8
+ updateModel: import("react").Dispatch<import("react").SetStateAction<QuestionModelData | undefined>>;
9
+ updateModelWeight: (value: string, index: number) => void;
10
+ }> | undefined) => {
11
+ questionModelData: QuestionModelData | undefined;
12
+ addModel: (modelStep: QuestionModelStep | QuestionModelStep[]) => void;
13
+ editModel: (modelStep: QuestionModelStep, index: number) => void;
14
+ removeModel: (index: number) => void;
15
+ updateModel: import("react").Dispatch<import("react").SetStateAction<QuestionModelData | undefined>>;
16
+ updateModelWeight: (value: string, index: number) => void;
17
+ }, getQuestionModelStore: () => {
18
+ questionModelData: QuestionModelData | undefined;
19
+ addModel: (modelStep: QuestionModelStep | QuestionModelStep[]) => void;
20
+ editModel: (modelStep: QuestionModelStep, index: number) => void;
21
+ removeModel: (index: number) => void;
22
+ updateModel: import("react").Dispatch<import("react").SetStateAction<QuestionModelData | undefined>>;
23
+ updateModelWeight: (value: string, index: number) => void;
24
+ } | undefined;
@@ -0,0 +1,130 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var _a;
13
+ import { useState, useCallback } from 'react';
14
+ import { createGlobalStore } from 'hox';
15
+ import update from 'immutability-helper';
16
+ import { IS_AI_ANALYSIS } from "../../constants/ai-question";
17
+ import { formatNumberDecimal, computeDecimalValue, uniqueId, arrayUnique } from "../../utils/utils";
18
+ export var useQuestionModelStore = (_a = createGlobalStore(function () {
19
+ var _a = useState(), questionModelData = _a[0], updateModel = _a[1];
20
+ var _b = (questionModelData || {}).steps, steps = _b === void 0 ? [] : _b;
21
+ /**
22
+ * 权重值计算
23
+ * @param steps 模型数据
24
+ */
25
+ var computeWeight = useCallback(function (steps) {
26
+ var aiTypeList = steps.filter(function (step) { return IS_AI_ANALYSIS(step); }); // AI评分题
27
+ var uniqueAiTypeList = arrayUnique(aiTypeList, 'token'); // 去除重复AI评分题
28
+ var uniqueAiTypeListLength = uniqueAiTypeList.length;
29
+ var weightList = aiTypeList.filter(function (_a) {
30
+ var isNotCompute = _a.isNotCompute;
31
+ return !isNotCompute;
32
+ }).map(function (_a) {
33
+ var weight = _a.weight;
34
+ return Math.floor(Number(weight));
35
+ });
36
+ var weightsLen = Array.from(new Set(weightList)).length; // 权重值分组数量
37
+ var lastAiTestToken = aiTypeList.length ? aiTypeList[aiTypeList.length - 1].token : '';
38
+ var beforeTotalWeight = aiTypeList
39
+ .map(function (_a) {
40
+ var token = _a.token, weight = _a.weight;
41
+ return (lastAiTestToken !== token ? Number(weight) : 0);
42
+ })
43
+ .reduce(function (pv, i) { return pv + i; }, 0);
44
+ var totalDuration = 0;
45
+ var getWeight = function (_a) {
46
+ var token = _a.token, weight = _a.weight;
47
+ if (weightsLen <= 1) {
48
+ var averageWeight = 100 / uniqueAiTypeListLength;
49
+ var disableWeight = 100 - Math.floor(averageWeight * (uniqueAiTypeListLength - 1) * 100) / 100;
50
+ return token === uniqueAiTypeList[uniqueAiTypeListLength - 1].token
51
+ ? computeDecimalValue(disableWeight.toString())
52
+ : computeDecimalValue(averageWeight.toString());
53
+ }
54
+ else {
55
+ return lastAiTestToken !== token ? weight : computeDecimalValue((100 - beforeTotalWeight).toString());
56
+ }
57
+ };
58
+ var $splice = steps.map(function (step, i) {
59
+ totalDuration += step.duration;
60
+ delete step.isNotCompute;
61
+ return [
62
+ i,
63
+ 1,
64
+ __assign(__assign({}, step), { weight: IS_AI_ANALYSIS(step) ? getWeight(step) : 0 }),
65
+ ];
66
+ });
67
+ updateModel(__assign(__assign({}, questionModelData), { duration: totalDuration, steps: update(steps, { $splice: $splice }) }));
68
+ }, [questionModelData]);
69
+ /**
70
+ * 更新模型数据权重值
71
+ * @param value 权重值
72
+ * @param index 下标
73
+ */
74
+ var updateModelWeight = useCallback(function (value, index) {
75
+ var _a;
76
+ var formatValue = formatNumberDecimal(value);
77
+ var curOriginalWeight = Number(steps[index].weight);
78
+ var aiTypeList = steps.filter(function (step) { return IS_AI_ANALYSIS(step); });
79
+ var disabledStep = aiTypeList.length ? aiTypeList[aiTypeList.length - 1] : undefined;
80
+ var maxInputValue = computeDecimalValue((curOriginalWeight + ((disabledStep === null || disabledStep === void 0 ? void 0 : disabledStep.weight) ? Number(disabledStep === null || disabledStep === void 0 ? void 0 : disabledStep.weight) : 0)).toString());
81
+ if (Number(formatValue) <= maxInputValue) {
82
+ var newSteps = update(steps, (_a = {}, _a[index] = { weight: { $set: formatValue } }, _a));
83
+ computeWeight(newSteps);
84
+ }
85
+ }, [steps, computeWeight]);
86
+ /**
87
+ * 新增模型数据
88
+ * @param modelStep 新增数据项
89
+ */
90
+ var addModel = useCallback(function (modelStep) {
91
+ var stepArr = Array.isArray(modelStep)
92
+ ? modelStep.map(function (item) { return (__assign(__assign({}, item), { isNotCompute: true, uniqueId: uniqueId() })); })
93
+ : [__assign(__assign({}, modelStep), { isNotCompute: true, uniqueId: uniqueId() })];
94
+ var newSteps = update(steps, { $push: stepArr });
95
+ computeWeight(newSteps);
96
+ }, [computeWeight, steps]);
97
+ /**
98
+ * 编辑模型数据
99
+ * @param modelStep 编辑数据项
100
+ * @param index 下标
101
+ */
102
+ var editModel = useCallback(function (modelStep, index) {
103
+ var aiTypeList = steps.filter(function (step) { return IS_AI_ANALYSIS(step); });
104
+ var newSteps = update(steps, {
105
+ $splice: [[index, 1, __assign(__assign(__assign({}, steps[index]), modelStep), { weight: aiTypeList.length ? modelStep.weight : 100 })]],
106
+ });
107
+ computeWeight(newSteps);
108
+ }, [computeWeight, steps]);
109
+ /**
110
+ * 删除模型数据
111
+ * @param index 下标
112
+ */
113
+ var removeModel = useCallback(function (index) {
114
+ var newSteps = update(steps, { $splice: [[index, 1]] });
115
+ if (newSteps.length) {
116
+ computeWeight(newSteps);
117
+ }
118
+ else {
119
+ updateModel(__assign(__assign({}, questionModelData), { duration: 0, steps: newSteps }));
120
+ }
121
+ }, [computeWeight, questionModelData, steps]);
122
+ return {
123
+ questionModelData: questionModelData,
124
+ addModel: addModel,
125
+ editModel: editModel,
126
+ removeModel: removeModel,
127
+ updateModel: updateModel,
128
+ updateModelWeight: updateModelWeight,
129
+ };
130
+ }), _a[0]), getQuestionModelStore = _a[1];
@@ -0,0 +1,14 @@
1
+ import { AiEvaluationList } from '@@/src/modules/ai-question/components/QuestionTemplate/interface';
2
+ export declare const useQuestionPreviewStore: (depsFn?: import("hox/es/types").DepsFn<{
3
+ visible: boolean;
4
+ previewItem: AiEvaluationList | undefined;
5
+ updatePreview: (visible: boolean, item?: AiEvaluationList) => void;
6
+ }> | undefined) => {
7
+ visible: boolean;
8
+ previewItem: AiEvaluationList | undefined;
9
+ updatePreview: (visible: boolean, item?: AiEvaluationList) => void;
10
+ }, getQuestionPreviewStore: () => {
11
+ visible: boolean;
12
+ previewItem: AiEvaluationList | undefined;
13
+ updatePreview: (visible: boolean, item?: AiEvaluationList) => void;
14
+ } | undefined;
@@ -0,0 +1,21 @@
1
+ var _a;
2
+ import { useState, useCallback } from 'react';
3
+ import { createGlobalStore } from 'hox';
4
+ export var useQuestionPreviewStore = (_a = createGlobalStore(function () {
5
+ var _a = useState(false), visible = _a[0], setVisible = _a[1];
6
+ var _b = useState(), previewItem = _b[0], setPreviewItem = _b[1];
7
+ /**
8
+ * 更新预览数据
9
+ * @param visible 是否展示
10
+ * @param item 展示数据
11
+ */
12
+ var updatePreview = useCallback(function (visible, item) {
13
+ setVisible(visible);
14
+ setPreviewItem(item);
15
+ }, []);
16
+ return {
17
+ visible: visible,
18
+ previewItem: previewItem,
19
+ updatePreview: updatePreview,
20
+ };
21
+ }), _a[0]), getQuestionPreviewStore = _a[1];