eli-video-interview 1.2.1 → 1.2.3-5.alpha

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 (379) hide show
  1. package/README.md +1 -1
  2. package/esm/assets/icons/AI.svg +1 -0
  3. package/esm/components/AiHeaderTitle/index.d.ts +4 -0
  4. package/esm/components/AiHeaderTitle/index.js +19 -0
  5. package/esm/components/AiHeaderTitle/interface.d.ts +4 -0
  6. package/esm/components/BigBallSvg/index.js +1 -1
  7. package/esm/components/Charts/Chart.d.ts +1 -1
  8. package/esm/components/Charts/Chart.js +8 -8
  9. package/esm/components/Charts/ReportPie.js +15 -4
  10. package/esm/components/RootProvider/index.js +2 -2
  11. package/esm/components/ScoreBigBall/index.js +1 -1
  12. package/esm/components/ScrollDialogContent/index.js +1 -1
  13. package/esm/components/VideoPreview/index.js +2 -3
  14. package/esm/constants/ai-question.d.ts +1 -1
  15. package/esm/constants/ai-report.d.ts +27 -0
  16. package/esm/constants/ai-report.js +27 -0
  17. package/esm/index.d.ts +1 -0
  18. package/esm/index.js +1 -0
  19. package/esm/modules/ai-ability/Root.d.ts +3 -2
  20. package/esm/modules/ai-ability/Root.js +32 -19
  21. package/esm/modules/ai-ability/components/AbilityFormItem/index.d.ts +14 -0
  22. package/esm/modules/ai-ability/components/AbilityFormItem/index.js +129 -0
  23. package/esm/modules/ai-ability/components/AddAbility/index.d.ts +4 -0
  24. package/esm/modules/ai-ability/components/AddAbility/index.js +191 -0
  25. package/esm/modules/ai-ability/components/UpdateAbility/index.d.ts +2 -2
  26. package/esm/modules/ai-ability/components/UpdateAbility/index.js +98 -23
  27. package/esm/modules/ai-ability/const.d.ts +8 -0
  28. package/esm/modules/ai-ability/const.js +34 -0
  29. package/esm/modules/ai-ability/index.d.ts +3 -1
  30. package/esm/modules/ai-ability/index.js +14 -3
  31. package/esm/modules/ai-ability/interface.d.ts +38 -0
  32. package/esm/modules/ai-ability/styled.d.ts +3 -0
  33. package/esm/modules/ai-ability/styled.js +5 -1
  34. package/esm/modules/ai-ability-select/Root.d.ts +4 -0
  35. package/esm/modules/ai-ability-select/Root.js +40 -0
  36. package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +4 -0
  37. package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +22 -0
  38. package/esm/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +4 -0
  39. package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +40 -0
  40. package/esm/modules/ai-ability-select/components/AiAbilityItem/interface.d.ts +13 -0
  41. package/esm/modules/ai-ability-select/components/AiAbilityItem/interface.js +1 -0
  42. package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +2 -0
  43. package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.js +8 -0
  44. package/esm/modules/ai-ability-select/components/AiAbilityList/index.d.ts +4 -0
  45. package/esm/modules/ai-ability-select/components/AiAbilityList/index.js +19 -0
  46. package/esm/modules/ai-ability-select/components/AiAbilityList/interface.d.ts +4 -0
  47. package/esm/modules/ai-ability-select/components/AiAbilityList/interface.js +1 -0
  48. package/esm/modules/ai-ability-select/index.d.ts +4 -0
  49. package/esm/modules/ai-ability-select/index.js +20 -0
  50. package/esm/modules/ai-ability-select/interface.d.ts +27 -0
  51. package/esm/modules/ai-ability-select/interface.js +1 -0
  52. package/esm/modules/ai-question/Root.d.ts +1 -1
  53. package/esm/modules/ai-question/Root.js +22 -11
  54. package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +1 -1
  55. package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +14 -9
  56. package/esm/modules/ai-question/components/AiAnalysis/MainPoints.js +2 -2
  57. package/esm/modules/ai-question/components/AiAnalysis/MainPointsItem.js +1 -1
  58. package/esm/modules/ai-question/components/AiAnalysis/index.js +10 -18
  59. package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +6 -0
  60. package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +7 -0
  61. package/esm/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +1 -1
  62. package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +40 -28
  63. package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +6 -0
  64. package/esm/modules/ai-question/components/AiAssessmentCriteria/utils.d.ts +1 -1
  65. package/esm/modules/ai-question/components/BaseAccordion/index.js +8 -8
  66. package/esm/modules/ai-question/components/BaseAccordion/styled.js +1 -1
  67. package/esm/modules/ai-question/components/BootVideo/index.d.ts +1 -1
  68. package/esm/modules/ai-question/components/BootVideo/index.js +27 -14
  69. package/esm/modules/ai-question/components/BootVideo/styled.js +6 -5
  70. package/esm/modules/ai-question/components/QuestionModel/AutoCombine.d.ts +4 -0
  71. package/esm/modules/ai-question/components/QuestionModel/AutoCombine.js +19 -0
  72. package/esm/modules/ai-question/components/QuestionModel/Header.js +6 -6
  73. package/esm/modules/ai-question/components/QuestionModel/Interactive.d.ts +6 -0
  74. package/esm/modules/ai-question/components/QuestionModel/Interactive.js +26 -0
  75. package/esm/modules/ai-question/components/QuestionModel/Item.d.ts +2 -2
  76. package/esm/modules/ai-question/components/QuestionModel/Item.js +14 -7
  77. package/esm/modules/ai-question/components/QuestionModel/List.js +28 -8
  78. package/esm/modules/ai-question/components/QuestionModel/Skeleton.js +1 -1
  79. package/esm/modules/ai-question/components/QuestionModel/index.js +12 -8
  80. package/esm/modules/ai-question/components/QuestionModel/interface.d.ts +5 -0
  81. package/esm/modules/ai-question/components/QuestionModel/styled.js +1 -1
  82. package/esm/modules/ai-question/components/QuestionPreview/index.js +6 -6
  83. package/esm/modules/ai-question/components/QuestionPreview/styled.d.ts +1 -1
  84. package/esm/modules/ai-question/components/QuestionPreview/styled.js +1 -1
  85. package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +10 -10
  86. package/esm/modules/ai-question/components/QuestionTemplate/Skeleton.js +1 -1
  87. package/esm/modules/ai-question/components/QuestionTemplate/index.d.ts +2 -1
  88. package/esm/modules/ai-question/components/QuestionTemplate/index.js +7 -6
  89. package/esm/modules/ai-question/components/QuestionTemplate/interface.d.ts +10 -0
  90. package/esm/modules/ai-question/components/QuestionUpdate/Form.d.ts +2 -2
  91. package/esm/modules/ai-question/components/QuestionUpdate/Form.js +49 -13
  92. package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.d.ts +4 -0
  93. package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +60 -0
  94. package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.d.ts +8 -0
  95. package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +52 -0
  96. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.d.ts +2 -2
  97. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +45 -49
  98. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.d.ts +6 -0
  99. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.js +47 -0
  100. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +5 -0
  101. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +65 -0
  102. package/esm/modules/ai-question/components/QuestionUpdate/const.js +1 -0
  103. package/esm/modules/ai-question/components/QuestionUpdate/index.js +84 -23
  104. package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +13 -0
  105. package/esm/modules/ai-question/components/QuestionUpdate/styled.d.ts +6 -0
  106. package/esm/modules/ai-question/components/QuestionUpdate/styled.js +52 -0
  107. package/esm/modules/ai-question/index.js +3 -5
  108. package/esm/modules/ai-question/interface.d.ts +4 -0
  109. package/esm/modules/ai-question/useAiQuestion.d.ts +1 -0
  110. package/esm/modules/ai-report/Root.d.ts +1 -1
  111. package/esm/modules/ai-report/Root.js +17 -13
  112. package/esm/modules/ai-report/components/AIEvaluate/Evaluate.d.ts +13 -0
  113. package/esm/modules/ai-report/components/AIEvaluate/Evaluate.js +60 -0
  114. package/esm/modules/ai-report/components/AIEvaluate/Graph.d.ts +13 -0
  115. package/esm/modules/ai-report/components/AIEvaluate/Graph.js +225 -0
  116. package/esm/modules/ai-report/components/AIEvaluate/index.d.ts +3 -0
  117. package/esm/modules/ai-report/components/AIEvaluate/index.js +40 -0
  118. package/esm/modules/ai-report/components/MenuAnchor/index.d.ts +4 -0
  119. package/esm/modules/ai-report/components/MenuAnchor/index.js +115 -0
  120. package/esm/modules/ai-report/components/NotFinish/index.js +2 -2
  121. package/esm/modules/ai-report/components/RankingRange/Item.js +2 -2
  122. package/esm/modules/ai-report/components/RankingRange/index.js +1 -1
  123. package/esm/modules/ai-report/components/RankingRange/styled.js +1 -1
  124. package/esm/modules/ai-report/components/ScoreReport/Bar.js +16 -10
  125. package/esm/modules/ai-report/components/ScoreReport/Failed.js +1 -1
  126. package/esm/modules/ai-report/components/ScoreReport/Report.js +14 -6
  127. package/esm/modules/ai-report/components/ScoreReport/Score.d.ts +1 -1
  128. package/esm/modules/ai-report/components/ScoreReport/Score.js +13 -9
  129. package/esm/modules/ai-report/components/ScoreReport/ScoreLegend.js +2 -2
  130. package/esm/modules/ai-report/components/ScoreReport/index.d.ts +1 -1
  131. package/esm/modules/ai-report/components/ScoreReport/index.js +11 -11
  132. package/esm/modules/ai-report/components/ScoreReport/interface.d.ts +2 -0
  133. package/esm/modules/ai-report/components/ScoreReport/styled.d.ts +3 -3
  134. package/esm/modules/ai-report/components/ScoreReport/styled.js +1 -1
  135. package/esm/modules/ai-report/components/Suggestion/Suggestion.d.ts +4 -0
  136. package/esm/modules/ai-report/components/Suggestion/Suggestion.js +31 -0
  137. package/esm/modules/ai-report/components/Suggestion/index.d.ts +3 -0
  138. package/esm/modules/ai-report/components/Suggestion/index.js +27 -0
  139. package/esm/modules/ai-report/components/VideoQuestion/Abilities.d.ts +1 -1
  140. package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +5 -5
  141. package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +6 -3
  142. package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.d.ts +1 -1
  143. package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.js +6 -9
  144. package/esm/modules/ai-report/components/VideoQuestion/index.js +4 -3
  145. package/esm/modules/ai-report/components/VideoQuestion/interface.d.ts +1 -1
  146. package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -1
  147. package/esm/modules/ai-report/components/WorkPlaces/ScoreSlider.d.ts +4 -0
  148. package/esm/modules/ai-report/components/WorkPlaces/ScoreSlider.js +24 -0
  149. package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +11 -0
  150. package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.js +55 -0
  151. package/esm/modules/ai-report/components/WorkPlaces/index.d.ts +3 -0
  152. package/esm/modules/ai-report/components/WorkPlaces/index.js +69 -0
  153. package/esm/modules/ai-report/components/WorkPlaces/interface.d.ts +7 -0
  154. package/esm/modules/ai-report/components/WorkPlaces/interface.js +1 -0
  155. package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +62 -0
  156. package/esm/modules/ai-report/components/WorkPlaces/styled.js +27 -0
  157. package/esm/modules/ai-report/index.js +3 -2
  158. package/esm/modules/ai-report/interface.d.ts +63 -0
  159. package/esm/modules/ai-report/useAiReport.d.ts +8 -0
  160. package/esm/modules/ai-report/utils.d.ts +1 -0
  161. package/esm/modules/ai-report/utils.js +1 -0
  162. package/esm/modules/ai-template/Root.js +5 -5
  163. package/esm/modules/ai-template/components/CapabilityModel/index.js +1 -1
  164. package/esm/modules/ai-template/components/QuestionList/Item.js +1 -1
  165. package/esm/modules/ai-template/components/TemplateHeader/index.js +2 -2
  166. package/esm/modules/ai-template/components/TemplateList/index.js +4 -4
  167. package/esm/modules/ai-template/components/TemplateList/styled.d.ts +3 -3
  168. package/esm/modules/ai-template/components/TemplateList/styled.js +1 -1
  169. package/esm/modules/ai-template/components/TemplateMenu/index.js +3 -3
  170. package/esm/modules/ai-template/components/TemplateMenu/styled.d.ts +1 -1
  171. package/esm/modules/ai-template/components/TemplateMenu/styled.js +1 -1
  172. package/esm/modules/ai-template/interface.d.ts +1 -1
  173. package/esm/services/ai-ability.d.ts +15 -3
  174. package/esm/services/ai-ability.js +23 -3
  175. package/esm/services/ai-question.d.ts +1 -1
  176. package/esm/services/ai-question.js +1 -1
  177. package/esm/services/ai-report.d.ts +12 -0
  178. package/esm/services/ai-report.js +8 -0
  179. package/esm/store/ai-ability/question-ability-store.d.ts +12 -0
  180. package/esm/store/ai-ability/question-ability-store.js +10 -0
  181. package/esm/store/ai-ability-select/question-ability-store.d.ts +18 -0
  182. package/esm/store/ai-ability-select/question-ability-store.js +13 -0
  183. package/esm/store/ai-question/ai-analysis-store.d.ts +7 -3
  184. package/esm/store/ai-question/ai-analysis-store.js +39 -14
  185. package/esm/store/ai-question/boot-video-store.js +7 -2
  186. package/esm/store/ai-question/global-store.d.ts +3 -0
  187. package/esm/store/ai-question/global-store.js +1 -0
  188. package/esm/store/ai-question/question-model-store.js +2 -2
  189. package/esm/store/ai-question/question-preview-store.js +1 -1
  190. package/esm/store/ai-question/question-template-store.js +1 -1
  191. package/esm/store/ai-question/question-update-store.js +1 -1
  192. package/esm/store/ai-report/global-store.d.ts +24 -0
  193. package/esm/store/ai-report/global-store.js +5 -1
  194. package/esm/store/ai-template/global-store.js +1 -1
  195. package/esm/utils/interceptor.js +2 -2
  196. package/lib/assets/icons/AI.svg +1 -0
  197. package/lib/components/AiHeaderTitle/index.d.ts +4 -0
  198. package/lib/components/AiHeaderTitle/index.js +24 -0
  199. package/lib/components/AiHeaderTitle/interface.d.ts +4 -0
  200. package/lib/components/Charts/Chart.d.ts +1 -1
  201. package/lib/components/Charts/Chart.js +8 -8
  202. package/lib/components/Charts/ReportPie.js +15 -4
  203. package/lib/components/RootProvider/index.js +1 -1
  204. package/lib/components/ScoreBigBall/index.js +1 -1
  205. package/lib/components/ScrollDialogContent/index.js +1 -1
  206. package/lib/components/VideoPreview/index.js +1 -2
  207. package/lib/constants/ai-question.d.ts +1 -1
  208. package/lib/constants/ai-report.d.ts +27 -0
  209. package/lib/constants/ai-report.js +28 -1
  210. package/lib/index.d.ts +1 -0
  211. package/lib/index.js +3 -1
  212. package/lib/modules/ai-ability/Root.d.ts +3 -2
  213. package/lib/modules/ai-ability/Root.js +32 -19
  214. package/lib/modules/ai-ability/components/AbilityFormItem/index.d.ts +14 -0
  215. package/lib/modules/ai-ability/components/AbilityFormItem/index.js +131 -0
  216. package/lib/modules/ai-ability/components/AddAbility/index.d.ts +4 -0
  217. package/lib/modules/ai-ability/components/AddAbility/index.js +196 -0
  218. package/lib/modules/ai-ability/components/UpdateAbility/index.d.ts +2 -2
  219. package/lib/modules/ai-ability/components/UpdateAbility/index.js +100 -22
  220. package/lib/modules/ai-ability/const.d.ts +8 -0
  221. package/lib/modules/ai-ability/const.js +37 -0
  222. package/lib/modules/ai-ability/index.d.ts +3 -1
  223. package/lib/modules/ai-ability/index.js +14 -3
  224. package/lib/modules/ai-ability/interface.d.ts +38 -0
  225. package/lib/modules/ai-ability/styled.d.ts +3 -0
  226. package/lib/modules/ai-ability/styled.js +5 -1
  227. package/lib/modules/ai-ability-select/Root.d.ts +4 -0
  228. package/lib/modules/ai-ability-select/Root.js +45 -0
  229. package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +4 -0
  230. package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +24 -0
  231. package/lib/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +4 -0
  232. package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +45 -0
  233. package/lib/modules/ai-ability-select/components/AiAbilityItem/interface.d.ts +13 -0
  234. package/lib/modules/ai-ability-select/components/AiAbilityItem/interface.js +2 -0
  235. package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +2 -0
  236. package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.js +11 -0
  237. package/lib/modules/ai-ability-select/components/AiAbilityList/index.d.ts +4 -0
  238. package/lib/modules/ai-ability-select/components/AiAbilityList/index.js +24 -0
  239. package/lib/modules/ai-ability-select/components/AiAbilityList/interface.d.ts +4 -0
  240. package/lib/modules/ai-ability-select/components/AiAbilityList/interface.js +2 -0
  241. package/lib/modules/ai-ability-select/components/AiAbilityList/styled.d.ts +0 -0
  242. package/lib/modules/ai-ability-select/components/AiAbilityList/styled.js +1 -0
  243. package/lib/modules/ai-ability-select/index.d.ts +4 -0
  244. package/lib/modules/ai-ability-select/index.js +25 -0
  245. package/lib/modules/ai-ability-select/interface.d.ts +27 -0
  246. package/lib/modules/ai-ability-select/interface.js +2 -0
  247. package/lib/modules/ai-question/Root.d.ts +1 -1
  248. package/lib/modules/ai-question/Root.js +22 -11
  249. package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +1 -1
  250. package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +13 -8
  251. package/lib/modules/ai-question/components/AiAnalysis/MainPoints.js +1 -1
  252. package/lib/modules/ai-question/components/AiAnalysis/index.js +9 -17
  253. package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +6 -0
  254. package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +8 -1
  255. package/lib/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +1 -1
  256. package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +40 -28
  257. package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +6 -0
  258. package/lib/modules/ai-question/components/AiAssessmentCriteria/utils.d.ts +1 -1
  259. package/lib/modules/ai-question/components/BaseAccordion/index.js +3 -3
  260. package/lib/modules/ai-question/components/BootVideo/index.d.ts +1 -1
  261. package/lib/modules/ai-question/components/BootVideo/index.js +31 -18
  262. package/lib/modules/ai-question/components/BootVideo/styled.js +5 -4
  263. package/lib/modules/ai-question/components/QuestionModel/AutoCombine.d.ts +4 -0
  264. package/lib/modules/ai-question/components/QuestionModel/AutoCombine.js +21 -0
  265. package/lib/modules/ai-question/components/QuestionModel/Header.js +5 -8
  266. package/lib/modules/ai-question/components/QuestionModel/Interactive.d.ts +6 -0
  267. package/lib/modules/ai-question/components/QuestionModel/Interactive.js +31 -0
  268. package/lib/modules/ai-question/components/QuestionModel/Item.d.ts +2 -2
  269. package/lib/modules/ai-question/components/QuestionModel/Item.js +14 -7
  270. package/lib/modules/ai-question/components/QuestionModel/List.js +27 -7
  271. package/lib/modules/ai-question/components/QuestionModel/index.js +12 -8
  272. package/lib/modules/ai-question/components/QuestionModel/interface.d.ts +5 -0
  273. package/lib/modules/ai-question/components/QuestionPreview/index.js +6 -6
  274. package/lib/modules/ai-question/components/QuestionPreview/styled.d.ts +1 -1
  275. package/lib/modules/ai-question/components/QuestionPreview/styled.js +1 -1
  276. package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +10 -10
  277. package/lib/modules/ai-question/components/QuestionTemplate/index.d.ts +2 -1
  278. package/lib/modules/ai-question/components/QuestionTemplate/index.js +7 -6
  279. package/lib/modules/ai-question/components/QuestionTemplate/interface.d.ts +10 -0
  280. package/lib/modules/ai-question/components/QuestionUpdate/Form.d.ts +2 -2
  281. package/lib/modules/ai-question/components/QuestionUpdate/Form.js +49 -13
  282. package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.d.ts +4 -0
  283. package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +65 -0
  284. package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.d.ts +8 -0
  285. package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +54 -0
  286. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.d.ts +2 -2
  287. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +46 -47
  288. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.d.ts +6 -0
  289. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.js +49 -0
  290. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +5 -0
  291. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +67 -0
  292. package/lib/modules/ai-question/components/QuestionUpdate/const.js +1 -0
  293. package/lib/modules/ai-question/components/QuestionUpdate/index.js +84 -23
  294. package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +13 -0
  295. package/lib/modules/ai-question/components/QuestionUpdate/styled.d.ts +6 -0
  296. package/lib/modules/ai-question/components/QuestionUpdate/styled.js +55 -0
  297. package/lib/modules/ai-question/index.js +3 -5
  298. package/lib/modules/ai-question/interface.d.ts +4 -0
  299. package/lib/modules/ai-question/useAiQuestion.d.ts +1 -0
  300. package/lib/modules/ai-report/Root.d.ts +1 -1
  301. package/lib/modules/ai-report/Root.js +18 -14
  302. package/lib/modules/ai-report/components/AIEvaluate/Evaluate.d.ts +13 -0
  303. package/lib/modules/ai-report/components/AIEvaluate/Evaluate.js +62 -0
  304. package/lib/modules/ai-report/components/AIEvaluate/Graph.d.ts +13 -0
  305. package/lib/modules/ai-report/components/AIEvaluate/Graph.js +227 -0
  306. package/lib/modules/ai-report/components/AIEvaluate/index.d.ts +3 -0
  307. package/lib/modules/ai-report/components/AIEvaluate/index.js +45 -0
  308. package/lib/modules/ai-report/components/MenuAnchor/index.d.ts +4 -0
  309. package/lib/modules/ai-report/components/MenuAnchor/index.js +117 -0
  310. package/lib/modules/ai-report/components/NotFinish/index.js +1 -1
  311. package/lib/modules/ai-report/components/ScoreReport/Bar.js +15 -9
  312. package/lib/modules/ai-report/components/ScoreReport/Report.js +14 -6
  313. package/lib/modules/ai-report/components/ScoreReport/Score.d.ts +1 -1
  314. package/lib/modules/ai-report/components/ScoreReport/Score.js +13 -9
  315. package/lib/modules/ai-report/components/ScoreReport/ScoreLegend.js +1 -1
  316. package/lib/modules/ai-report/components/ScoreReport/index.d.ts +1 -1
  317. package/lib/modules/ai-report/components/ScoreReport/index.js +12 -12
  318. package/lib/modules/ai-report/components/ScoreReport/interface.d.ts +2 -0
  319. package/lib/modules/ai-report/components/ScoreReport/styled.d.ts +3 -3
  320. package/lib/modules/ai-report/components/Suggestion/Suggestion.d.ts +4 -0
  321. package/lib/modules/ai-report/components/Suggestion/Suggestion.js +33 -0
  322. package/lib/modules/ai-report/components/Suggestion/index.d.ts +3 -0
  323. package/lib/modules/ai-report/components/Suggestion/index.js +32 -0
  324. package/lib/modules/ai-report/components/VideoQuestion/Abilities.d.ts +1 -1
  325. package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +5 -5
  326. package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +4 -1
  327. package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.d.ts +1 -1
  328. package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.js +6 -9
  329. package/lib/modules/ai-report/components/VideoQuestion/index.js +4 -3
  330. package/lib/modules/ai-report/components/VideoQuestion/interface.d.ts +1 -1
  331. package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -1
  332. package/lib/modules/ai-report/components/WorkPlaces/ScoreSlider.d.ts +4 -0
  333. package/lib/modules/ai-report/components/WorkPlaces/ScoreSlider.js +26 -0
  334. package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +11 -0
  335. package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.js +57 -0
  336. package/lib/modules/ai-report/components/WorkPlaces/index.d.ts +3 -0
  337. package/lib/modules/ai-report/components/WorkPlaces/index.js +74 -0
  338. package/lib/modules/ai-report/components/WorkPlaces/interface.d.ts +7 -0
  339. package/lib/modules/ai-report/components/WorkPlaces/interface.js +2 -0
  340. package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +62 -0
  341. package/lib/modules/ai-report/components/WorkPlaces/styled.js +30 -0
  342. package/lib/modules/ai-report/index.js +3 -2
  343. package/lib/modules/ai-report/interface.d.ts +63 -0
  344. package/lib/modules/ai-report/useAiReport.d.ts +8 -0
  345. package/lib/modules/ai-report/utils.d.ts +1 -0
  346. package/lib/modules/ai-report/utils.js +5 -0
  347. package/lib/modules/ai-template/Root.js +3 -3
  348. package/lib/modules/ai-template/components/CapabilityModel/index.js +1 -1
  349. package/lib/modules/ai-template/components/TemplateHeader/index.js +1 -1
  350. package/lib/modules/ai-template/components/TemplateList/index.js +2 -2
  351. package/lib/modules/ai-template/components/TemplateList/styled.d.ts +3 -3
  352. package/lib/modules/ai-template/components/TemplateMenu/index.js +1 -1
  353. package/lib/modules/ai-template/components/TemplateMenu/styled.d.ts +1 -1
  354. package/lib/modules/ai-template/interface.d.ts +1 -1
  355. package/lib/services/ai-ability.d.ts +15 -3
  356. package/lib/services/ai-ability.js +28 -4
  357. package/lib/services/ai-question.d.ts +1 -1
  358. package/lib/services/ai-question.js +1 -1
  359. package/lib/services/ai-report.d.ts +12 -0
  360. package/lib/services/ai-report.js +11 -1
  361. package/lib/store/ai-ability/question-ability-store.d.ts +12 -0
  362. package/lib/store/ai-ability/question-ability-store.js +13 -0
  363. package/lib/store/ai-ability-select/question-ability-store.d.ts +18 -0
  364. package/lib/store/ai-ability-select/question-ability-store.js +16 -0
  365. package/lib/store/ai-question/ai-analysis-store.d.ts +7 -3
  366. package/lib/store/ai-question/ai-analysis-store.js +39 -14
  367. package/lib/store/ai-question/boot-video-store.js +7 -2
  368. package/lib/store/ai-question/global-store.d.ts +3 -0
  369. package/lib/store/ai-question/global-store.js +1 -0
  370. package/lib/store/ai-question/question-template-store.js +1 -1
  371. package/lib/store/ai-question/question-update-store.js +1 -1
  372. package/lib/store/ai-report/global-store.d.ts +24 -0
  373. package/lib/store/ai-report/global-store.js +5 -1
  374. package/lib/utils/interceptor.js +2 -2
  375. package/package.json +9 -3
  376. package/esm/modules/ai-ability/components/UpdateAbility/interface.d.ts +0 -7
  377. package/lib/modules/ai-ability/components/UpdateAbility/interface.d.ts +0 -7
  378. /package/esm/{modules/ai-ability/components/UpdateAbility → components/AiHeaderTitle}/interface.js +0 -0
  379. /package/lib/{modules/ai-ability/components/UpdateAbility → components/AiHeaderTitle}/interface.js +0 -0
@@ -0,0 +1,225 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useRef, useState } from 'react';
3
+ function setupCanvas(canvas) {
4
+ var dpr = window.devicePixelRatio || 1;
5
+ var rect = canvas.getBoundingClientRect();
6
+ canvas.width = rect.width * dpr;
7
+ canvas.height = rect.height * dpr;
8
+ var ctx = canvas.getContext('2d');
9
+ ctx.scale(dpr, dpr);
10
+ return ctx;
11
+ }
12
+ var levelOrder = ['Bad', 'Good', 'Best'];
13
+ var serverLevelMap = [
14
+ {
15
+ level: 'Best',
16
+ start: 134 + 171 + 10,
17
+ width: 125 - 12,
18
+ },
19
+ {
20
+ level: 'Good',
21
+ start: 134 + 5,
22
+ width: 171 - 10,
23
+ },
24
+ {
25
+ level: 'Bad',
26
+ start: 0,
27
+ width: 134 - 10,
28
+ },
29
+ {
30
+ level: 'Bad',
31
+ start: 0,
32
+ width: 0,
33
+ },
34
+ ];
35
+ var levelConf = {
36
+ Bad: {
37
+ label: '欠佳',
38
+ width: 134,
39
+ color: [229, 115, 115],
40
+ endScore: 30,
41
+ pointColor: ['RGB(229, 115, 115)', 'RGB(255, 67, 102)'],
42
+ },
43
+ Good: {
44
+ label: '适中',
45
+ width: 171,
46
+ color: [255, 183, 77],
47
+ endScore: 70,
48
+ pointColor: ['RGB(255, 183, 77)', 'RGB(255, 152, 0)'],
49
+ },
50
+ Best: {
51
+ label: '优秀',
52
+ width: 125,
53
+ color: [0, 217, 157],
54
+ endScore: 100,
55
+ pointColor: ['RGB(0, 217, 157)', 'RGB(0, 176, 127)'],
56
+ },
57
+ };
58
+ var tipEl = document.createElement('div');
59
+ var measureTextWidth = function (ctx, text) {
60
+ var width = ctx.measureText(text).width;
61
+ return width;
62
+ };
63
+ function isInPath(x, y, tx, ty, ctx) {
64
+ var dpr = window.devicePixelRatio || 1;
65
+ ctx.beginPath();
66
+ ctx.arc(tx / dpr, ty / dpr, 10 / dpr, 0, Math.PI * 2, true);
67
+ var ret = ctx.isPointInPath(x, y);
68
+ ctx.closePath();
69
+ return ret;
70
+ }
71
+ var drawTop = function (layout, ctx) {
72
+ ctx.font = '12px sans-serif';
73
+ ctx.fillText('排名(%)', 10, 10);
74
+ ctx.fillStyle = '#ccc';
75
+ ctx.fillText('0', layout.leftLableWidth, 10);
76
+ ctx.strokeStyle = '#ccc';
77
+ var offset = 0;
78
+ levelOrder.forEach(function (x, i) {
79
+ var c = levelConf[x];
80
+ var labelWidth = measureTextWidth(ctx, c.label);
81
+ var endScoreWidth = measureTextWidth(ctx, c.endScore);
82
+ ctx.moveTo(layout.leftLableWidth + offset + endScoreWidth / 2 + 5, 6);
83
+ ctx.lineTo(layout.leftLableWidth + offset + c.width / 2 - labelWidth / 2 - 5, 6);
84
+ ctx.fillStyle = 'black';
85
+ ctx.fillText(c.label, layout.leftLableWidth + offset + c.width / 2 - labelWidth / 2, 10);
86
+ ctx.moveTo(layout.leftLableWidth + offset + c.width / 2 + labelWidth / 2 + 5, 6);
87
+ ctx.lineTo(layout.leftLableWidth + offset + c.width - endScoreWidth - 5, 6);
88
+ ctx.fillStyle = '#ccc';
89
+ ctx.fillText(c.endScore, layout.leftLableWidth + offset + c.width - endScoreWidth + (i === 0 ? 0 : 5), 10);
90
+ ctx.stroke();
91
+ offset += c.width;
92
+ });
93
+ };
94
+ var drowBackground = function (layout, ctx) {
95
+ var leftOffset = layout.leftLableWidth;
96
+ levelOrder.forEach(function (x) {
97
+ var c = levelConf[x];
98
+ ctx.fillStyle = "rgb(".concat(c.color.join(','), ")");
99
+ drawRoundedRect(0 + leftOffset, layout.topLableHeight, c.width, 4, 2, true, false, ctx);
100
+ var linearGradient0 = ctx.createLinearGradient(0, 0, 0, layout.height - layout.topLableHeight);
101
+ linearGradient0.addColorStop(0, "RGBA(".concat(c.color.join(','), ", 0.3)"));
102
+ linearGradient0.addColorStop(1, "RGBA(".concat(c.color.join(','), ", 0.05)"));
103
+ ctx.fillStyle = linearGradient0;
104
+ ctx.fillRect(0 + leftOffset, layout.topLableHeight, c.width, layout.height - layout.topLableHeight);
105
+ leftOffset += c.width + 4;
106
+ });
107
+ };
108
+ var percent = function (_a) {
109
+ var rank = _a.rank, total = _a.total;
110
+ return Math.min(0.975, parseFloat((1 - rank / total).toFixed(2)));
111
+ };
112
+ var getPointColor = function (s) {
113
+ return levelConf[s].pointColor;
114
+ };
115
+ var drawLable = function (lable, x, y, ctx) {
116
+ ctx.fillStyle = 'black';
117
+ ctx.fillText(lable, x, y + 5);
118
+ ctx.strokeStyle = '#ccc';
119
+ };
120
+ var drawLine = function (sx, ex, ey, ctx) {
121
+ ctx.beginPath();
122
+ ctx.setLineDash([2, 1]);
123
+ ctx.moveTo(sx, ey);
124
+ ctx.lineTo(ex, ey);
125
+ ctx.stroke();
126
+ };
127
+ var drawPoint = function (fill, stroke, x, y, ctx) {
128
+ ctx.save();
129
+ ctx.setLineDash([]);
130
+ ctx.fillStyle = fill;
131
+ ctx.strokeStyle = stroke;
132
+ ctx.lineWidth = 1;
133
+ ctx.beginPath();
134
+ ctx.arc(x, y, 4, 0, Math.PI * 2, true);
135
+ ctx.closePath();
136
+ ctx.fill();
137
+ ctx.stroke();
138
+ ctx.restore();
139
+ };
140
+ var drawRoundedRect = function (x, y, width, height, r, fill, stroke, ctx) {
141
+ ctx.save();
142
+ ctx.beginPath();
143
+ ctx.moveTo(x + r, y);
144
+ ctx.arcTo(x + width, y, x + width, y + r, r);
145
+ ctx.arcTo(x + width, y + height, x + width - r, y + height, r);
146
+ ctx.arcTo(x, y + height, x, y + height - r, r);
147
+ ctx.arcTo(x, y, x + r, y, r);
148
+ if (fill) {
149
+ ctx.fill();
150
+ }
151
+ if (stroke) {
152
+ ctx.stroke();
153
+ }
154
+ ctx.restore();
155
+ };
156
+ var draw = function (layout, color, dimensions, pathRef, ctx) {
157
+ drawTop(layout, ctx);
158
+ drowBackground(layout, ctx);
159
+ dimensions.forEach(function (v, i) {
160
+ var level = serverLevelMap[v.level - 1];
161
+ var p = percent(v);
162
+ var target = level.width * p + 4;
163
+ var endPointX = level.start + target + layout.leftLableWidth;
164
+ var endPointY = 65 + layout.itemSpacing * i;
165
+ drawLable(v.name, 10, endPointY, ctx);
166
+ drawLine(layout.leftLableWidth, endPointX, endPointY, ctx);
167
+ var _a = getPointColor(level.level), fill = _a[0], stroke = _a[1];
168
+ drawPoint(fill, stroke, endPointX, endPointY, ctx);
169
+ pathRef.push({ x: endPointX, y: endPointY, tips: "".concat(v === null || v === void 0 ? void 0 : v.name, "\u5F97\u5206:").concat(v === null || v === void 0 ? void 0 : v.score.toFixed(2), "\u5206") });
170
+ });
171
+ };
172
+ var Graph = function (_a) {
173
+ var _b = _a.items, items = _b === void 0 ? [] : _b;
174
+ var ref = useRef(null);
175
+ var pathRef = useRef([]);
176
+ var _c = useState(), ctx = _c[0], setCtx = _c[1];
177
+ useEffect(function () {
178
+ var currentCtx = setupCanvas(ref.current);
179
+ setCtx(currentCtx);
180
+ tipEl.style.background = 'rgba(0,0,0,.7)';
181
+ tipEl.style.color = '#fff';
182
+ tipEl.style.borderRadius = '2px';
183
+ tipEl.style.padding = '2px 5px';
184
+ tipEl.style.position = 'absolute';
185
+ tipEl.style.zIndex = '9999';
186
+ tipEl.style.fontSize = '12px';
187
+ tipEl.style.display = 'none';
188
+ document.body.appendChild(tipEl);
189
+ }, [ref]);
190
+ useEffect(function () {
191
+ if (ctx) {
192
+ var layout = {
193
+ leftLableWidth: 80,
194
+ topLableHeight: 40,
195
+ itemSpacing: 32,
196
+ height: 32 * items.length + 40 + 16,
197
+ };
198
+ var gradeColor = {
199
+ Bad: [229, 115, 115],
200
+ Good: [255, 183, 77],
201
+ Best: [0, 217, 157],
202
+ };
203
+ draw(layout, gradeColor, items, pathRef.current, ctx);
204
+ }
205
+ }, [ctx, items]);
206
+ useEffect(function () {
207
+ console.log(pathRef);
208
+ }, [pathRef]);
209
+ var handleMouseMove = useCallback(function (e) {
210
+ if (ctx) {
211
+ var p = pathRef.current.find(function (p) { return isInPath(e.nativeEvent.offsetX, e.nativeEvent.offsetY, p.x, p.y, ctx); });
212
+ if (p) {
213
+ tipEl.style.left = e.pageX + 10 + 'px';
214
+ tipEl.style.top = e.pageY + 10 + 'px';
215
+ tipEl.innerHTML = p.tips;
216
+ tipEl.style.display = 'block';
217
+ }
218
+ else {
219
+ tipEl.style.display = 'none';
220
+ }
221
+ }
222
+ }, [ctx, pathRef]);
223
+ return (_jsx("canvas", { ref: ref, onMouseOut: function () { return (tipEl.style.display = 'none'); }, onMouseMove: handleMouseMove, style: { width: '100%', height: 32 * items.length + 40 + 16 } }));
224
+ };
225
+ export default Graph;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Index: () => JSX.Element | null;
3
+ export default Index;
@@ -0,0 +1,40 @@
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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { rankPercent } from '../../utils';
14
+ import Evaluate from './Evaluate';
15
+ import Graph from './Graph';
16
+ import { useAiReportStore } from "../../../../store/ai-report/global-store";
17
+ import AiHeaderTitle from "../../../../components/AiHeaderTitle";
18
+ import { InfoOutlineIcon, Tooltip, Typography } from 'fbm-ui';
19
+ import { Box, Collapse, Divider, Paper, Stack } from 'fbm-ui/lib/mui';
20
+ import { useState } from 'react';
21
+ var Index = function () {
22
+ var _a, _b;
23
+ var _c = useAiReportStore(function (store) { return [
24
+ store.reportResult,
25
+ store.operableButtons,
26
+ ]; }), reportResult = _c.reportResult, showAiDimension = _c.showAiDimension, canEditAiDimension = _c.canEditAiDimension, customInterviewDimRankMap = _c.customInterviewDimRankMap;
27
+ var expand = useState(true)[0];
28
+ // const handleExpandChange = useCallback(() => {
29
+ // setExpand(!expand);
30
+ // }, [expand]);
31
+ if (!showAiDimension || ((_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.length) === 0)
32
+ return null;
33
+ return (_jsxs(Box, __assign({ id: "report-evaluate", component: Paper, variant: "outlined", px: 2, mt: 2 }, { children: [_jsxs(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: [_jsx(AiHeaderTitle, { name: "AI\u57FA\u7840\u80FD\u529B" }), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u7ED3\u679C\u8BF4\u660E\uFF1A", _jsx("br", {}), "AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", _jsx("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }) }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center" }, { children: _jsx(InfoOutlineIcon, { sx: { fontSize: '16px' } }) })) }))] })), _jsxs(Collapse, __assign({ in: expand }, { children: [(_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _b === void 0 ? void 0 : _b.map(function (v) {
34
+ var _a;
35
+ var c = customInterviewDimRankMap === null || customInterviewDimRankMap === void 0 ? void 0 : customInterviewDimRankMap[v.evaluationToken];
36
+ var rank = rankPercent((c === null || c === void 0 ? void 0 : c.rank) || (v === null || v === void 0 ? void 0 : v.rank), (c === null || c === void 0 ? void 0 : c.total) || (v === null || v === void 0 ? void 0 : v.total));
37
+ return (_jsxs(Box, __assign({ component: Paper, elevation: 0, bgcolor: "#f9f9f9", mb: 2, pb: 2 }, { children: [_jsxs(Stack, __assign({ px: 2, pt: 2 }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 2 }, { children: [_jsx(Typography, __assign({ variant: "h6", fontWeight: "medium", sx: { fontWeight: 500 } }, { children: v.evaluationDimensionName })), !isNaN(rank) && (_jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u51FB\u8D25\u4E86", _jsxs(Typography, __assign({ variant: "body2", fontWeight: "medium", display: "inline", color: "#4caf50" }, { children: [rank.toFixed(2), "%"] })), "\u7684\u5019\u9009\u4EBA"] })))] })), _jsx(Typography, __assign({ mt: 1, mb: 2, variant: "body2", fontWeight: "medium", color: "#4caf50" }, { children: v.impressions.join('、') }))] })), _jsx(Divider, { sx: { borderColor: 'rgba(0,0,0,0.08)' } }), _jsxs(Stack, __assign({ px: 2 }, { children: [((_a = v.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && (_jsx(Box, __assign({ mt: 2 }, { children: _jsx(Graph, { items: v.items }) }))), _jsxs(Stack, __assign({ spacing: 2, mt: 2 }, { children: [_jsx(Evaluate, { canEdit: canEditAiDimension, token: v.evaluationToken, evaluations: v.evaluations, title: "\u8BC4\u4EF7\u5185\u5BB9", field: "evaluations", mode: "show" }), _jsx(Evaluate, { canEdit: canEditAiDimension, token: v.evaluationToken, evaluations: v.suggestions, title: "\u63D0\u9AD8\u5EFA\u8BAE", field: "suggestions", mode: "show" })] }))] }))] }), v.evaluationToken));
38
+ }), _jsxs(Stack, __assign({ spacing: 1, mt: 4, pb: 2 }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", color: "textSecondary" }, { children: "\u7ED3\u679C\u8BF4\u660E" })), _jsxs(Typography, __assign({ variant: "caption", color: "rgba(0,0,0,0.26)" }, { children: ["AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", _jsx("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }))] }))] }))] })));
39
+ };
40
+ export default Index;
@@ -0,0 +1,4 @@
1
+ import { MenuAnchorProps } from '../../interface';
2
+ import React from 'react';
3
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<MenuAnchorProps & React.RefAttributes<any>>>;
4
+ export default _default;
@@ -0,0 +1,115 @@
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 { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { REPORT_MODULE_MAP } from "../../../../constants/ai-report";
14
+ import { PostAiInterviewResult } from "../../../../services/ai-report";
15
+ import { useAiReportStore } from "../../../../store/ai-report/global-store";
16
+ import { useRequest } from 'ahooks';
17
+ import { Box, MenuIcon } from 'fbm-ui';
18
+ import { List, ListItem, ListItemButton, ListItemText, Popover } from 'fbm-ui/lib/mui';
19
+ import { forwardRef, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
20
+ var MenuAnchor = forwardRef(function (props) {
21
+ var _a = useState(null), anchorEl = _a[0], setAnchorEl = _a[1];
22
+ var open = Boolean(anchorEl);
23
+ // 接口请求
24
+ var token = props.token, showAiDimension = props.showAiDimension;
25
+ var firstLoad = useRef(true);
26
+ var _b = useState([]), list = _b[0], setList = _b[1];
27
+ var _c = useAiReportStore(), reportResult = _c.reportResult, updateState = _c.updateState, updateReportResult = _c.updateReportResult;
28
+ var postAiInterviewResult = useRequest(function () { return PostAiInterviewResult([token]); }, {
29
+ manual: true,
30
+ onSuccess: function (_a) {
31
+ var list = _a.data.list;
32
+ var result = list[0];
33
+ updateReportResult(result);
34
+ if (firstLoad.current) {
35
+ firstLoad.current = false;
36
+ handleMenuList(result);
37
+ }
38
+ },
39
+ }).run;
40
+ useEffect(function () {
41
+ firstLoad.current = true;
42
+ postAiInterviewResult();
43
+ // eslint-disable-next-line react-hooks/exhaustive-deps
44
+ }, [token]);
45
+ useEffect(function () {
46
+ updateState(props);
47
+ // eslint-disable-next-line react-hooks/exhaustive-deps
48
+ }, [props]);
49
+ // 处理菜单数据
50
+ var handleMenuList = function (reportResult) {
51
+ if (!reportResult.status) {
52
+ return;
53
+ }
54
+ var resList = [REPORT_MODULE_MAP['videoQuestion']];
55
+ var _a = reportResult.collection, collection = _a === void 0 ? [] : _a, _b = reportResult.workplaces, workplaces = _b === void 0 ? [] : _b, _c = reportResult.suggestion, suggestion = _c === void 0 ? { show: false } : _c, _d = reportResult.evaluations, evaluations = _d === void 0 ? [] : _d;
56
+ if (showAiDimension) {
57
+ if (suggestion === null || suggestion === void 0 ? void 0 : suggestion.show) {
58
+ resList.unshift(REPORT_MODULE_MAP['suggestion']);
59
+ }
60
+ if (collection.length > 0 && evaluations.length > 0) {
61
+ resList.unshift(REPORT_MODULE_MAP['evaluate']);
62
+ }
63
+ if (workplaces.length > 0) {
64
+ resList.unshift(REPORT_MODULE_MAP['workplace']);
65
+ }
66
+ }
67
+ if (collection.length > 0) {
68
+ resList.unshift(REPORT_MODULE_MAP['score']);
69
+ }
70
+ console.log(resList);
71
+ setList(resList);
72
+ };
73
+ var handlePopoverOpen = function (event) {
74
+ setAnchorEl(event.currentTarget);
75
+ };
76
+ var handlePopoverClose = function () {
77
+ setAnchorEl(null);
78
+ };
79
+ var scrollToAnchor = useCallback(function (id) {
80
+ if (id) {
81
+ var anchorEle = document.getElementById(id);
82
+ if (anchorEle) {
83
+ anchorEle.scrollIntoView({ block: 'start', behavior: 'smooth' });
84
+ }
85
+ }
86
+ }, []);
87
+ var content = useMemo(function () {
88
+ return (_jsx(List, __assign({ style: { minWidth: 150 }, onMouseLeave: handlePopoverClose }, { children: list.map(function (_a) {
89
+ var name = _a.name, id = _a.id;
90
+ return (_jsx(ListItem, __assign({ disablePadding: true }, { children: _jsx(ListItemButton, __assign({ onClick: function () { return scrollToAnchor(id); } }, { children: _jsx(ListItemText, { primary: name }) })) }), id));
91
+ }) })));
92
+ }, [scrollToAnchor, list]);
93
+ return (_jsxs(_Fragment, { children: [(reportResult === null || reportResult === void 0 ? void 0 : reportResult.status) && (_jsx(Box, __assign({ style: {
94
+ display: 'flex',
95
+ alignItems: 'center',
96
+ justifyContent: 'center',
97
+ position: 'absolute',
98
+ top: 20,
99
+ right: -10,
100
+ zIndex: 999,
101
+ height: 32,
102
+ width: 32,
103
+ backgroundColor: '#fff',
104
+ borderRadius: 4,
105
+ boxShadow: '0px 2px 4px rgba(0,0,0, 0.08)',
106
+ }, "aria-owns": open ? 'menu-anchor-popover' : undefined, "aria-haspopup": "true", onClick: handlePopoverOpen, onMouseEnter: handlePopoverOpen }, { children: _jsx(MenuIcon, {}) }))), _jsx(Popover, __assign({ id: "menu-anchor-popover", open: open, anchorEl: anchorEl, anchorOrigin: {
107
+ vertical: 'bottom',
108
+ horizontal: 'right',
109
+ }, transformOrigin: {
110
+ vertical: -8,
111
+ horizontal: 'right',
112
+ }, onClose: handlePopoverClose }, { children: content }))] }));
113
+ });
114
+ MenuAnchor.displayName = 'MenuAnchor';
115
+ export default memo(MenuAnchor);
@@ -10,9 +10,9 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- import { Box, Typography, Alert } from 'fbm-ui';
14
- import { useAiReportStore } from "../../../../store/ai-report/global-store";
13
+ import { Alert, Box, Typography } from 'fbm-ui';
15
14
  import { COMPLETED_STATUS } from "../../../../enum/ai-report";
15
+ import { useAiReportStore } from "../../../../store/ai-report/global-store";
16
16
  var NotFinish = function () {
17
17
  var _a = useAiReportStore(function (store) { return [store.reportResult, store.interviewCheat]; }), reportResult = _a.reportResult, interviewCheat = _a.interviewCheat;
18
18
  var _b = (reportResult || {}).completedStatus, completedStatus = _b === void 0 ? 1 : _b;
@@ -10,8 +10,8 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useEffect, useCallback, useState, memo } from 'react';
14
- import { Box, Typography, IconButton, CloseIcon } from 'fbm-ui';
13
+ import { memo, useCallback, useEffect, useState } from 'react';
14
+ import { Box, CloseIcon, IconButton, Typography } from 'fbm-ui';
15
15
  import { RangeInput, RangeTypography } from './styled';
16
16
  var RankingRangeItem = function (props) {
17
17
  var item = props.item, disabled = props.disabled, index = props.index, onChange = props.onChange, onDelete = props.onDelete;
@@ -47,7 +47,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
47
47
  };
48
48
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
49
49
  import { useCallback, useEffect, useRef, useState } from 'react';
50
- import { Box, Typography, Button, AddIcon, Message, Dialog } from 'fbm-ui';
50
+ import { AddIcon, Box, Button, Dialog, Message, Typography } from 'fbm-ui';
51
51
  import { useImmer } from 'use-immer';
52
52
  import ScrollDialogContent from "../../../../components/ScrollDialogContent";
53
53
  import { useAiReportStore } from "../../../../store/ai-report/global-store";
@@ -1,4 +1,4 @@
1
- import { Input, Typography, styled } from 'fbm-ui';
1
+ import { Input, styled, Typography } from 'fbm-ui';
2
2
  export var RangeInput = styled(Input)({
3
3
  width: 82,
4
4
  });
@@ -9,27 +9,33 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useEffect, useState } from 'react';
14
- import { Box, Typography } from 'fbm-ui';
15
- import { useAiReportStore } from "../../../../store/ai-report/global-store";
12
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
+ import { rankPercent } from '../../utils';
16
14
  import { scoreRankIntervalColors } from "../../../../constants/ai-report";
15
+ import { useAiReportStore } from "../../../../store/ai-report/global-store";
16
+ import { Box, Typography } from 'fbm-ui';
17
+ import { useEffect, useState } from 'react';
17
18
  var Bar = function () {
18
19
  var _a = useState(1), currentRank = _a[0], setCurrentRank = _a[1];
19
- var _b = useState('前0% ~ 100%'), text = _b[0], setText = _b[1];
20
- var _c = useAiReportStore(function (store) { return [store.reportResult, store.scoreRankIntervals]; }), reportResult = _c.reportResult, scoreRankIntervals = _c.scoreRankIntervals;
20
+ var _b = useState(''), text = _b[0], setText = _b[1];
21
+ var _c = useAiReportStore(function (store) { return [store.reportResult, store.scoreRankIntervals]; }), reportResult = _c.reportResult, scoreRankIntervals = _c.scoreRankIntervals, reportRank = _c.reportRank;
21
22
  var _d = (reportResult || {}).score, score = _d === void 0 ? 0 : _d;
22
23
  useEffect(function () {
23
24
  var floatInterval = scoreRankIntervals === null || scoreRankIntervals === void 0 ? void 0 : scoreRankIntervals.find(function (interval) { return score >= interval.score.startScore && score <= interval.score.endScore; });
24
25
  if (floatInterval) {
25
- var rank = floatInterval.rank, _a = floatInterval.scoreRankIntervals, startRankProportion = _a.startRankProportion, endRankProportion = _a.endRankProportion;
26
+ var rank = floatInterval.rank;
26
27
  setCurrentRank(rank);
27
- setText("\u524D".concat(startRankProportion * 100, "% ~ ").concat(endRankProportion * 100, "%"));
28
28
  }
29
- }, [score, scoreRankIntervals]);
29
+ if (reportRank === null || reportRank === void 0 ? void 0 : reportRank.total) {
30
+ setText("\u51FB\u8D25\u4E86".concat(rankPercent((reportRank === null || reportRank === void 0 ? void 0 : reportRank.rank) || 0, (reportRank === null || reportRank === void 0 ? void 0 : reportRank.total) || 0).toFixed(0), "%\u5019\u9009\u4EBA"));
31
+ }
32
+ else {
33
+ setText('');
34
+ }
35
+ }, [score, reportRank, scoreRankIntervals]);
30
36
  if (!scoreRankIntervals || (scoreRankIntervals === null || scoreRankIntervals === void 0 ? void 0 : scoreRankIntervals.length) === 0)
31
37
  return null;
32
- return (_jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: text })), _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { height: 12, mt: 0.5 } }, { children: scoreRankIntervals === null || scoreRankIntervals === void 0 ? void 0 : scoreRankIntervals.map(function (_a, index) {
38
+ return (_jsxs(Box, { children: [_jsxs(Typography, __assign({ variant: "body2", flexShrink: 0 }, { children: [text, "\u00A0"] })), _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { height: 12, mt: 0.5 } }, { children: scoreRankIntervals === null || scoreRankIntervals === void 0 ? void 0 : scoreRankIntervals.map(function (_a, index) {
33
39
  var rank = _a.rank, _b = _a.scoreRankIntervals, startRankProportion = _b.startRankProportion, endRankProportion = _b.endRankProportion;
34
40
  return [
35
41
  _jsx(Box, { sx: {
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { Box, CancelIcon, Typography, Button, RefreshIcon } from 'fbm-ui';
13
+ import { Box, Button, CancelIcon, RefreshIcon, Typography } from 'fbm-ui';
14
14
  import { INTERVIEW_STATUS } from "../../../../enum/ai-report";
15
15
  var FAILED = INTERVIEW_STATUS.FAILED;
16
16
  var Failed = function (_a) {
@@ -10,18 +10,26 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useMemo } from 'react';
14
- import { Box, Typography, Tooltip, InfoOutlineIcon } from 'fbm-ui';
15
- import { useAiReportStore } from "../../../../store/ai-report/global-store";
13
+ import AiHeaderTitle from "../../../../components/AiHeaderTitle";
16
14
  import ReportPie from "../../../../components/Charts/ReportPie";
17
15
  // import ScoreLegend from './ScoreLegend';
18
16
  import ScoreBigBall from "../../../../components/ScoreBigBall";
17
+ import { useAiReportStore } from "../../../../store/ai-report/global-store";
18
+ import { Box, InfoOutlineIcon, Tooltip, Typography } from 'fbm-ui';
19
+ import { useMemo } from 'react';
19
20
  var Report = function () {
20
21
  var reportResult = useAiReportStore(function (store) { return [store.reportResult]; }).reportResult;
21
- var _a = reportResult || {}, orderToken = _a.orderToken, score = _a.score, status = _a.status, _b = _a.collection, collection = _b === void 0 ? [] : _b;
22
+ var _a = reportResult || {}, orderToken = _a.orderToken, score = _a.score, status = _a.status, _b = _a.collection, collection = _b === void 0 ? [] : _b, _c = _a.summaryText, summaryText = _c === void 0 ? { sprintf: '', variables: [] } : _c;
22
23
  var title = useMemo(function () {
23
- return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u4F18\u79C0 \u4EE3\u8868\u5019\u9009\u4EBA\u8BE5\u9879\u80FD\u529B\u5728\u672C\u6B65\u9AA4\u6240\u6709\u5019\u9009\u4EBA\u4E2D\u6392\u540D\u5728\u524D30%" })), _jsx(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u9002\u4E2D \u4EE3\u8868\u5019\u9009\u4EBA\u8BE5\u9879\u80FD\u529B\u5728\u672C\u6B65\u9AA4\u6240\u6709\u5019\u9009\u4EBA\u4E2D\u6392\u540D\u572830%~70%" })), _jsx(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u6B20\u4F73 \u4EE3\u8868\u5019\u9009\u4EBA\u8BE5\u9879\u80FD\u529B\u5728\u672C\u6B65\u9AA4\u6240\u6709\u5019\u9009\u4EBA\u4E2D\u6392\u540D\u5728\u540E30%" })), _jsx(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u4EBA\u6570\u5C0F\u4E8E5\u4EBA\u65F6\uFF0C\u8BC4\u4EF7\u4E0D\u751F\u6548" }))] }));
24
+ return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u804C\u573A\u80FD\u529B\u4EE5\u53CA\u82F1\u6587\u8868\u8FBE\u80FD\u529B\u7684\u8BC4\u4EF7\u6807\u51C6\uFF1A" })), _jsx(Typography, __assign({ fontSize: 12, color: "#fff", style: { textIndent: '2em' } }, { children: "\u5F53\u5019\u9009\u4EBA\u7684\u8BE5\u9879\u80FD\u529B\u7EFC\u5408\u5F97\u5206\u5927\u4E8E\u7B49\u4E8E80\u65F6\u4E3A\u4F18\u79C0\uFF1B" })), _jsx(Typography, __assign({ fontSize: 12, color: "#fff", style: { textIndent: '2em' } }, { children: "\u5F53\u5019\u9009\u4EBA\u7684\u8BE5\u9879\u80FD\u529B\u7EFC\u5408\u5F97\u5206\u5927\u4E8E\u7B49\u4E8E60\u5C0F\u4E8E80\u65F6\u4E3A\u9002\u4E2D\uFF1B" })), _jsx(Typography, __assign({ fontSize: 12, color: "#fff", style: { textIndent: '2em' } }, { children: "\u5F53\u5019\u9009\u4EBA\u7684\u8BE5\u9879\u80FD\u529B\u7EFC\u5408\u5F97\u5206\u5C0F\u4E8E60\u65F6\u4E3A\u6B20\u4F73\uFF1B" })), _jsx(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u5176\u4ED6AI\u57FA\u7840\u80FD\u529B\u7684\u8BC4\u4EF7\u6807\u51C6\uFF1A" })), _jsx(Typography, __assign({ fontSize: 12, color: "#fff", style: { textIndent: '2em' } }, { children: "AI\u57FA\u7840\u80FD\u529B\u7684\u8BC4\u4EF7\u6807\u51C6\u4E3A\uFF1A\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u4EE5\u5168\u56FD\u6570\u636E\u7684\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2AAI\u57FA\u7840\u80FD\u529B\u7684\u6700\u7EC8\u5F97\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002" })), _jsx(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002" }))] }));
24
25
  }, []);
25
- return (_jsxs(Box, __assign({ width: "100%" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", pl: 3, pt: 2 }, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u80FD\u529B\u6807\u51C6" })), _jsx(Tooltip, __assign({ title: title }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '4px' } }, { children: _jsx(InfoOutlineIcon, { sx: { fontSize: 14, color: 'RGBA(0, 0, 0, 0.86)' } }) })) }))] })), _jsxs(Box, __assign({ height: 300, sx: { position: 'relative' } }, { children: [_jsx(ReportPie, { id: orderToken || '', source: collection }), _jsx(ScoreBigBall, { score: score || 0, status: status })] }))] })));
26
+ var showSummaryText = useMemo(function () {
27
+ var _a = summaryText.sprintf, sprintf = _a === void 0 ? '' : _a, _b = summaryText.variables, variables = _b === void 0 ? [] : _b;
28
+ var textList = (sprintf === null || sprintf === void 0 ? void 0 : sprintf.split('%s')) || [];
29
+ return textList.map(function (text, index) {
30
+ return (_jsxs(_Fragment, { children: [_jsx("span", __assign({ style: { fontSize: 14, color: 'RGBA(0, 0, 0, 0.56)' } }, { children: text })), _jsx("span", __assign({ style: { fontSize: 14, color: '#4CAF50', fontWeight: 500 } }, { children: variables[index] || '' }))] }));
31
+ });
32
+ }, [summaryText]);
33
+ return (_jsxs(Box, __assign({ width: "100%" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pl: 2, pt: 2, pr: 2 }, { children: [_jsx(AiHeaderTitle, { name: "\u7EFC\u5408\u8868\u73B0" }), _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u80FD\u529B\u6807\u51C6" })), _jsx(Tooltip, __assign({ title: title }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '4px' } }, { children: _jsx(InfoOutlineIcon, { sx: { fontSize: 14, color: 'RGBA(0, 0, 0, 0.86)' } }) })) }))] }))] })), _jsxs(Box, __assign({ height: 300, sx: { position: 'relative' } }, { children: [_jsx(ReportPie, { id: orderToken || '', source: collection }), _jsx(ScoreBigBall, { score: score || 0, status: status })] })), showSummaryText.length > 0 && (_jsx(Box, __assign({ display: "block", width: 498, style: { backgroundColor: '#FAFAFA', padding: 8, margin: '0 auto 16px' } }, { children: showSummaryText })))] })));
26
34
  };
27
35
  export default Report;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
2
1
  import { ScoreProps } from './interface';
2
+ import { FC } from 'react';
3
3
  declare const Score: FC<ScoreProps>;
4
4
  export default Score;
@@ -10,25 +10,29 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useEffect, useState } from 'react';
14
- import dayjs from 'dayjs';
15
- import { Box, Popover, Typography, Button, DownloadIcon } from 'fbm-ui';
16
- import { useAiReportStore } from "../../../../store/ai-report/global-store";
17
- import { formatScore } from "../../../../utils/utils";
18
- import { ScoreTypography, ScoreUnitTypography, RefreshIconRoot } from './styled';
19
13
  import RankingRange from '../RankingRange';
20
14
  import Bar from './Bar';
15
+ import { RefreshIconRoot, ScoreTypography, ScoreUnitTypography } from './styled';
16
+ import { useAiReportStore } from "../../../../store/ai-report/global-store";
17
+ import { formatScore } from "../../../../utils/utils";
18
+ import dayjs from 'dayjs';
19
+ import { Box, Button, DownloadIcon, Popover, Typography } from 'fbm-ui';
20
+ import { useEffect, useState } from 'react';
21
21
  var Score = function (_a) {
22
- var loading = _a.loading, onRefresh = _a.onRefresh;
22
+ var customScore = _a.customScore, loading = _a.loading, onRefresh = _a.onRefresh;
23
23
  var _b = useState(false), openRankingRange = _b[0], setOpenRankingRange = _b[1];
24
24
  var _c = useState(false), openRefresh = _c[0], setOpenRefresh = _c[1];
25
25
  var _d = useAiReportStore(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _d.reportResult, operableButtons = _d.operableButtons, onExportReportClick = _d.onExportReportClick;
26
26
  var _e = reportResult || {}, score = _e.score, createTime = _e.createTime;
27
+ var _f = useState(score || 0), feScore = _f[0], setScore = _f[1];
27
28
  useEffect(function () {
29
+ if (typeof customScore === 'number' && customScore > -1) {
30
+ setScore(customScore);
31
+ }
28
32
  if (!loading)
29
33
  setOpenRefresh(false);
30
- }, [loading]);
34
+ }, [loading, customScore]);
31
35
  var content = (_jsxs(Box, __assign({ padding: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", color: "secondary" }, { children: "\u5237\u65B0\u540E\u5C06\u6309\u6700\u65B0\u7B97\u5206\u89C4\u5219\u8BA1\u7B97\uFF0C\u662F\u5426\u786E\u8BA4\u5237\u65B0" })), _jsx(Box, __assign({ paddingTop: 1, textAlign: "right" }, { children: _jsx(Button, __assign({ loading: loading, onClick: onRefresh }, { children: "\u5237\u65B0" })) }))] })));
32
- return (_jsxs(Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [_jsx(RankingRange, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), _jsxs(Box, __assign({ flex: "1 0" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsxs(ScoreTypography, { children: [formatScore(score || 0), _jsx(ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && (_jsx(Button, __assign({ variant: "outlined", size: "small", icon: _jsx(DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), _jsxs(Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", dayjs(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && (_jsx(Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), _jsx(Box, __assign({ width: 200 }, { children: _jsx(Bar, {}) }))] })));
36
+ return (_jsxs(Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [_jsx(RankingRange, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), _jsxs(Box, __assign({ flex: "1 0" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsxs(ScoreTypography, { children: [formatScore(feScore || 0), _jsx(ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), _jsx(Box, __assign({ width: 50, height: 50 }, { children: !!feScore && feScore >= 80 && _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && (_jsx(Button, __assign({ variant: "outlined", size: "small", icon: _jsx(DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), _jsxs(Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", dayjs(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && (_jsx(Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), _jsx(Box, __assign({ width: 200 }, { children: _jsx(Bar, {}) }))] })));
33
37
  };
34
38
  export default Score;
@@ -11,9 +11,9 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { useMemo } from 'react';
14
- import { Box, Typography, Tooltip, InfoIcon } from 'fbm-ui';
15
- import { useAiReportStore } from "../../../../store/ai-report/global-store";
14
+ import { Box, InfoIcon, Tooltip, Typography } from 'fbm-ui';
16
15
  import { INTERVIEW_STEP_STATUS } from "../../../../enum/ai-report";
16
+ import { useAiReportStore } from "../../../../store/ai-report/global-store";
17
17
  import { formatScore } from "../../../../utils/utils";
18
18
  var STEP_COMPLETED = INTERVIEW_STEP_STATUS.STEP_COMPLETED;
19
19
  var ScoreLegend = function (props) {
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
2
1
  import { ScoreReportProps } from './interface';
2
+ import { FC } from 'react';
3
3
  declare const ScoreReport: FC<ScoreReportProps>;
4
4
  export default ScoreReport;