eli-video-interview 1.2.2 → 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.
- package/README.md +1 -1
- package/esm/assets/icons/AI.svg +1 -0
- package/esm/components/AiHeaderTitle/index.d.ts +4 -0
- package/esm/components/AiHeaderTitle/index.js +19 -0
- package/esm/components/AiHeaderTitle/interface.d.ts +4 -0
- package/esm/components/BigBallSvg/index.js +1 -1
- package/esm/components/Charts/Chart.d.ts +1 -1
- package/esm/components/Charts/Chart.js +8 -8
- package/esm/components/Charts/ReportPie.js +15 -4
- package/esm/components/RootProvider/index.js +2 -2
- package/esm/components/ScoreBigBall/index.js +1 -1
- package/esm/components/ScrollDialogContent/index.js +1 -1
- package/esm/components/VideoPreview/index.js +2 -3
- package/esm/constants/ai-question.d.ts +1 -1
- package/esm/constants/ai-report.d.ts +27 -0
- package/esm/constants/ai-report.js +27 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/modules/ai-ability/Root.d.ts +3 -2
- package/esm/modules/ai-ability/Root.js +32 -19
- package/esm/modules/ai-ability/components/AbilityFormItem/index.d.ts +14 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/index.js +129 -0
- package/esm/modules/ai-ability/components/AddAbility/index.d.ts +4 -0
- package/esm/modules/ai-ability/components/AddAbility/index.js +191 -0
- package/esm/modules/ai-ability/components/UpdateAbility/index.d.ts +2 -2
- package/esm/modules/ai-ability/components/UpdateAbility/index.js +98 -23
- package/esm/modules/ai-ability/const.d.ts +8 -0
- package/esm/modules/ai-ability/const.js +34 -0
- package/esm/modules/ai-ability/index.d.ts +3 -1
- package/esm/modules/ai-ability/index.js +14 -3
- package/esm/modules/ai-ability/interface.d.ts +38 -0
- package/esm/modules/ai-ability/styled.d.ts +3 -0
- package/esm/modules/ai-ability/styled.js +5 -1
- package/esm/modules/ai-ability-select/Root.d.ts +4 -0
- package/esm/modules/ai-ability-select/Root.js +40 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +4 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +22 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +4 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +40 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/interface.d.ts +13 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/interface.js +1 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +2 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.js +8 -0
- package/esm/modules/ai-ability-select/components/AiAbilityList/index.d.ts +4 -0
- package/esm/modules/ai-ability-select/components/AiAbilityList/index.js +19 -0
- package/esm/modules/ai-ability-select/components/AiAbilityList/interface.d.ts +4 -0
- package/esm/modules/ai-ability-select/components/AiAbilityList/interface.js +1 -0
- package/esm/modules/ai-ability-select/index.d.ts +4 -0
- package/esm/modules/ai-ability-select/index.js +20 -0
- package/esm/modules/ai-ability-select/interface.d.ts +27 -0
- package/esm/modules/ai-ability-select/interface.js +1 -0
- package/esm/modules/ai-question/Root.d.ts +1 -1
- package/esm/modules/ai-question/Root.js +22 -11
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +1 -1
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +14 -9
- package/esm/modules/ai-question/components/AiAnalysis/MainPoints.js +2 -2
- package/esm/modules/ai-question/components/AiAnalysis/MainPointsItem.js +1 -1
- package/esm/modules/ai-question/components/AiAnalysis/index.js +10 -18
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +6 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +7 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +1 -1
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +40 -28
- package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +6 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/utils.d.ts +1 -1
- package/esm/modules/ai-question/components/BaseAccordion/index.js +8 -8
- package/esm/modules/ai-question/components/BaseAccordion/styled.js +1 -1
- package/esm/modules/ai-question/components/BootVideo/index.d.ts +1 -1
- package/esm/modules/ai-question/components/BootVideo/index.js +27 -14
- package/esm/modules/ai-question/components/BootVideo/styled.js +6 -5
- package/esm/modules/ai-question/components/QuestionModel/AutoCombine.d.ts +4 -0
- package/esm/modules/ai-question/components/QuestionModel/AutoCombine.js +19 -0
- package/esm/modules/ai-question/components/QuestionModel/Header.js +6 -6
- package/esm/modules/ai-question/components/QuestionModel/Interactive.d.ts +6 -0
- package/esm/modules/ai-question/components/QuestionModel/Interactive.js +26 -0
- package/esm/modules/ai-question/components/QuestionModel/Item.d.ts +2 -2
- package/esm/modules/ai-question/components/QuestionModel/Item.js +14 -7
- package/esm/modules/ai-question/components/QuestionModel/List.js +28 -8
- package/esm/modules/ai-question/components/QuestionModel/Skeleton.js +1 -1
- package/esm/modules/ai-question/components/QuestionModel/index.js +12 -8
- package/esm/modules/ai-question/components/QuestionModel/interface.d.ts +5 -0
- package/esm/modules/ai-question/components/QuestionModel/styled.js +1 -1
- package/esm/modules/ai-question/components/QuestionPreview/index.js +6 -6
- package/esm/modules/ai-question/components/QuestionPreview/styled.d.ts +1 -1
- package/esm/modules/ai-question/components/QuestionPreview/styled.js +1 -1
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +10 -10
- package/esm/modules/ai-question/components/QuestionTemplate/Skeleton.js +1 -1
- package/esm/modules/ai-question/components/QuestionTemplate/index.d.ts +2 -1
- package/esm/modules/ai-question/components/QuestionTemplate/index.js +7 -6
- package/esm/modules/ai-question/components/QuestionTemplate/interface.d.ts +10 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Form.d.ts +2 -2
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +49 -13
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.d.ts +4 -0
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +60 -0
- package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.d.ts +8 -0
- package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +52 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.d.ts +2 -2
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +45 -49
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.d.ts +6 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.js +47 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +5 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +65 -0
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +1 -0
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +84 -23
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +13 -0
- package/esm/modules/ai-question/components/QuestionUpdate/styled.d.ts +6 -0
- package/esm/modules/ai-question/components/QuestionUpdate/styled.js +52 -0
- package/esm/modules/ai-question/index.js +3 -5
- package/esm/modules/ai-question/interface.d.ts +4 -0
- package/esm/modules/ai-question/useAiQuestion.d.ts +1 -0
- package/esm/modules/ai-report/Root.js +11 -8
- package/esm/modules/ai-report/components/AIEvaluate/Evaluate.js +28 -13
- package/esm/modules/ai-report/components/AIEvaluate/Graph.d.ts +1 -0
- package/esm/modules/ai-report/components/AIEvaluate/Graph.js +55 -25
- package/esm/modules/ai-report/components/AIEvaluate/index.d.ts +1 -0
- package/esm/modules/ai-report/components/AIEvaluate/index.js +20 -14
- package/esm/modules/ai-report/components/MenuAnchor/index.d.ts +4 -0
- package/esm/modules/ai-report/components/MenuAnchor/index.js +115 -0
- package/esm/modules/ai-report/components/NotFinish/index.js +2 -2
- package/esm/modules/ai-report/components/RankingRange/Item.js +2 -2
- package/esm/modules/ai-report/components/RankingRange/index.js +1 -1
- package/esm/modules/ai-report/components/RankingRange/styled.js +1 -1
- package/esm/modules/ai-report/components/ScoreReport/Bar.js +16 -10
- package/esm/modules/ai-report/components/ScoreReport/Failed.js +1 -1
- package/esm/modules/ai-report/components/ScoreReport/Report.js +14 -6
- package/esm/modules/ai-report/components/ScoreReport/Score.d.ts +1 -1
- package/esm/modules/ai-report/components/ScoreReport/Score.js +13 -9
- package/esm/modules/ai-report/components/ScoreReport/ScoreLegend.js +2 -2
- package/esm/modules/ai-report/components/ScoreReport/index.d.ts +1 -1
- package/esm/modules/ai-report/components/ScoreReport/index.js +11 -11
- package/esm/modules/ai-report/components/ScoreReport/interface.d.ts +2 -0
- package/esm/modules/ai-report/components/ScoreReport/styled.d.ts +3 -3
- package/esm/modules/ai-report/components/ScoreReport/styled.js +1 -1
- package/esm/modules/ai-report/components/Suggestion/Suggestion.d.ts +4 -0
- package/esm/modules/ai-report/components/Suggestion/Suggestion.js +31 -0
- package/esm/modules/ai-report/components/Suggestion/index.d.ts +3 -0
- package/esm/modules/ai-report/components/Suggestion/index.js +27 -0
- package/esm/modules/ai-report/components/VideoQuestion/Abilities.d.ts +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +5 -5
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.d.ts +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +15 -12
- package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.d.ts +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.js +6 -9
- package/esm/modules/ai-report/components/VideoQuestion/index.js +4 -3
- package/esm/modules/ai-report/components/VideoQuestion/interface.d.ts +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +2 -2
- package/esm/modules/ai-report/components/WorkPlaces/ScoreSlider.d.ts +4 -0
- package/esm/modules/ai-report/components/WorkPlaces/ScoreSlider.js +24 -0
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +11 -0
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.js +55 -0
- package/esm/modules/ai-report/components/WorkPlaces/index.d.ts +3 -0
- package/esm/modules/ai-report/components/WorkPlaces/index.js +69 -0
- package/esm/modules/ai-report/components/WorkPlaces/interface.d.ts +7 -0
- package/esm/modules/ai-report/components/WorkPlaces/interface.js +1 -0
- package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +62 -0
- package/esm/modules/ai-report/components/WorkPlaces/styled.js +27 -0
- package/esm/modules/ai-report/index.js +1 -0
- package/esm/modules/ai-report/interface.d.ts +60 -0
- package/esm/modules/ai-report/useAiReport.d.ts +6 -0
- package/esm/modules/ai-report/utils.d.ts +1 -0
- package/esm/modules/ai-report/utils.js +1 -0
- package/esm/modules/ai-template/Root.js +5 -5
- package/esm/modules/ai-template/components/CapabilityModel/index.js +1 -1
- package/esm/modules/ai-template/components/QuestionList/Item.js +1 -1
- package/esm/modules/ai-template/components/TemplateHeader/index.js +2 -2
- package/esm/modules/ai-template/components/TemplateList/index.js +4 -4
- package/esm/modules/ai-template/components/TemplateList/styled.d.ts +3 -3
- package/esm/modules/ai-template/components/TemplateList/styled.js +1 -1
- package/esm/modules/ai-template/components/TemplateMenu/index.js +3 -3
- package/esm/modules/ai-template/components/TemplateMenu/styled.d.ts +1 -1
- package/esm/modules/ai-template/components/TemplateMenu/styled.js +1 -1
- package/esm/modules/ai-template/interface.d.ts +1 -1
- package/esm/services/ai-ability.d.ts +15 -3
- package/esm/services/ai-ability.js +23 -3
- package/esm/services/ai-question.d.ts +1 -1
- package/esm/services/ai-question.js +1 -1
- package/esm/services/ai-report.d.ts +5 -0
- package/esm/services/ai-report.js +4 -0
- package/esm/store/ai-ability/question-ability-store.d.ts +12 -0
- package/esm/store/ai-ability/question-ability-store.js +10 -0
- package/esm/store/ai-ability-select/question-ability-store.d.ts +18 -0
- package/esm/store/ai-ability-select/question-ability-store.js +13 -0
- package/esm/store/ai-question/ai-analysis-store.d.ts +7 -3
- package/esm/store/ai-question/ai-analysis-store.js +39 -14
- package/esm/store/ai-question/boot-video-store.js +7 -2
- package/esm/store/ai-question/global-store.d.ts +3 -0
- package/esm/store/ai-question/global-store.js +1 -0
- package/esm/store/ai-question/question-model-store.js +2 -2
- package/esm/store/ai-question/question-preview-store.js +1 -1
- package/esm/store/ai-question/question-template-store.js +1 -1
- package/esm/store/ai-question/question-update-store.js +1 -1
- package/esm/store/ai-report/global-store.d.ts +18 -0
- package/esm/store/ai-report/global-store.js +2 -0
- package/esm/store/ai-template/global-store.js +1 -1
- package/esm/utils/interceptor.js +2 -2
- package/lib/assets/icons/AI.svg +1 -0
- package/lib/components/AiHeaderTitle/index.d.ts +4 -0
- package/lib/components/AiHeaderTitle/index.js +24 -0
- package/lib/components/AiHeaderTitle/interface.d.ts +4 -0
- package/lib/components/Charts/Chart.d.ts +1 -1
- package/lib/components/Charts/Chart.js +8 -8
- package/lib/components/Charts/ReportPie.js +15 -4
- package/lib/components/RootProvider/index.js +1 -1
- package/lib/components/ScoreBigBall/index.js +1 -1
- package/lib/components/ScrollDialogContent/index.js +1 -1
- package/lib/components/VideoPreview/index.js +1 -2
- package/lib/constants/ai-question.d.ts +1 -1
- package/lib/constants/ai-report.d.ts +27 -0
- package/lib/constants/ai-report.js +28 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/modules/ai-ability/Root.d.ts +3 -2
- package/lib/modules/ai-ability/Root.js +32 -19
- package/lib/modules/ai-ability/components/AbilityFormItem/index.d.ts +14 -0
- package/lib/modules/ai-ability/components/AbilityFormItem/index.js +131 -0
- package/lib/modules/ai-ability/components/AddAbility/index.d.ts +4 -0
- package/lib/modules/ai-ability/components/AddAbility/index.js +196 -0
- package/lib/modules/ai-ability/components/UpdateAbility/index.d.ts +2 -2
- package/lib/modules/ai-ability/components/UpdateAbility/index.js +100 -22
- package/lib/modules/ai-ability/const.d.ts +8 -0
- package/lib/modules/ai-ability/const.js +37 -0
- package/lib/modules/ai-ability/index.d.ts +3 -1
- package/lib/modules/ai-ability/index.js +14 -3
- package/lib/modules/ai-ability/interface.d.ts +38 -0
- package/lib/modules/ai-ability/styled.d.ts +3 -0
- package/lib/modules/ai-ability/styled.js +5 -1
- package/lib/modules/ai-ability-select/Root.d.ts +4 -0
- package/lib/modules/ai-ability-select/Root.js +45 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +4 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +24 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +4 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +45 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/interface.d.ts +13 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/interface.js +2 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +2 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.js +11 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/index.d.ts +4 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/index.js +24 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/interface.d.ts +4 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/interface.js +2 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/styled.d.ts +0 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/styled.js +1 -0
- package/lib/modules/ai-ability-select/index.d.ts +4 -0
- package/lib/modules/ai-ability-select/index.js +25 -0
- package/lib/modules/ai-ability-select/interface.d.ts +27 -0
- package/lib/modules/ai-ability-select/interface.js +2 -0
- package/lib/modules/ai-question/Root.d.ts +1 -1
- package/lib/modules/ai-question/Root.js +22 -11
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +1 -1
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +13 -8
- package/lib/modules/ai-question/components/AiAnalysis/MainPoints.js +1 -1
- package/lib/modules/ai-question/components/AiAnalysis/index.js +9 -17
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +6 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +8 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +1 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +40 -28
- package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +6 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/utils.d.ts +1 -1
- package/lib/modules/ai-question/components/BaseAccordion/index.js +3 -3
- package/lib/modules/ai-question/components/BootVideo/index.d.ts +1 -1
- package/lib/modules/ai-question/components/BootVideo/index.js +31 -18
- package/lib/modules/ai-question/components/BootVideo/styled.js +5 -4
- package/lib/modules/ai-question/components/QuestionModel/AutoCombine.d.ts +4 -0
- package/lib/modules/ai-question/components/QuestionModel/AutoCombine.js +21 -0
- package/lib/modules/ai-question/components/QuestionModel/Header.js +5 -8
- package/lib/modules/ai-question/components/QuestionModel/Interactive.d.ts +6 -0
- package/lib/modules/ai-question/components/QuestionModel/Interactive.js +31 -0
- package/lib/modules/ai-question/components/QuestionModel/Item.d.ts +2 -2
- package/lib/modules/ai-question/components/QuestionModel/Item.js +14 -7
- package/lib/modules/ai-question/components/QuestionModel/List.js +27 -7
- package/lib/modules/ai-question/components/QuestionModel/index.js +12 -8
- package/lib/modules/ai-question/components/QuestionModel/interface.d.ts +5 -0
- package/lib/modules/ai-question/components/QuestionPreview/index.js +6 -6
- package/lib/modules/ai-question/components/QuestionPreview/styled.d.ts +1 -1
- package/lib/modules/ai-question/components/QuestionPreview/styled.js +1 -1
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +10 -10
- package/lib/modules/ai-question/components/QuestionTemplate/index.d.ts +2 -1
- package/lib/modules/ai-question/components/QuestionTemplate/index.js +7 -6
- package/lib/modules/ai-question/components/QuestionTemplate/interface.d.ts +10 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Form.d.ts +2 -2
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +49 -13
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.d.ts +4 -0
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +65 -0
- package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.d.ts +8 -0
- package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +54 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.d.ts +2 -2
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +46 -47
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.d.ts +6 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.js +49 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +5 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +67 -0
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +1 -0
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +84 -23
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +13 -0
- package/lib/modules/ai-question/components/QuestionUpdate/styled.d.ts +6 -0
- package/lib/modules/ai-question/components/QuestionUpdate/styled.js +55 -0
- package/lib/modules/ai-question/index.js +3 -5
- package/lib/modules/ai-question/interface.d.ts +4 -0
- package/lib/modules/ai-question/useAiQuestion.d.ts +1 -0
- package/lib/modules/ai-report/Root.js +9 -6
- package/lib/modules/ai-report/components/AIEvaluate/Evaluate.js +26 -11
- package/lib/modules/ai-report/components/AIEvaluate/Graph.d.ts +1 -0
- package/lib/modules/ai-report/components/AIEvaluate/Graph.js +55 -25
- package/lib/modules/ai-report/components/AIEvaluate/index.d.ts +1 -0
- package/lib/modules/ai-report/components/AIEvaluate/index.js +17 -11
- package/lib/modules/ai-report/components/MenuAnchor/index.d.ts +4 -0
- package/lib/modules/ai-report/components/MenuAnchor/index.js +117 -0
- package/lib/modules/ai-report/components/NotFinish/index.js +1 -1
- package/lib/modules/ai-report/components/ScoreReport/Bar.js +15 -9
- package/lib/modules/ai-report/components/ScoreReport/Report.js +14 -6
- package/lib/modules/ai-report/components/ScoreReport/Score.d.ts +1 -1
- package/lib/modules/ai-report/components/ScoreReport/Score.js +13 -9
- package/lib/modules/ai-report/components/ScoreReport/ScoreLegend.js +1 -1
- package/lib/modules/ai-report/components/ScoreReport/index.d.ts +1 -1
- package/lib/modules/ai-report/components/ScoreReport/index.js +12 -12
- package/lib/modules/ai-report/components/ScoreReport/interface.d.ts +2 -0
- package/lib/modules/ai-report/components/ScoreReport/styled.d.ts +3 -3
- package/lib/modules/ai-report/components/Suggestion/Suggestion.d.ts +4 -0
- package/lib/modules/ai-report/components/Suggestion/Suggestion.js +33 -0
- package/lib/modules/ai-report/components/Suggestion/index.d.ts +3 -0
- package/lib/modules/ai-report/components/Suggestion/index.js +32 -0
- package/lib/modules/ai-report/components/VideoQuestion/Abilities.d.ts +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +5 -5
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.d.ts +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +14 -11
- package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.d.ts +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.js +6 -9
- package/lib/modules/ai-report/components/VideoQuestion/index.js +4 -3
- package/lib/modules/ai-report/components/VideoQuestion/interface.d.ts +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +2 -2
- package/lib/modules/ai-report/components/WorkPlaces/ScoreSlider.d.ts +4 -0
- package/lib/modules/ai-report/components/WorkPlaces/ScoreSlider.js +26 -0
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +11 -0
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.js +57 -0
- package/lib/modules/ai-report/components/WorkPlaces/index.d.ts +3 -0
- package/lib/modules/ai-report/components/WorkPlaces/index.js +74 -0
- package/lib/modules/ai-report/components/WorkPlaces/interface.d.ts +7 -0
- package/lib/modules/ai-report/components/WorkPlaces/interface.js +2 -0
- package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +62 -0
- package/lib/modules/ai-report/components/WorkPlaces/styled.js +30 -0
- package/lib/modules/ai-report/index.js +1 -0
- package/lib/modules/ai-report/interface.d.ts +60 -0
- package/lib/modules/ai-report/useAiReport.d.ts +6 -0
- package/lib/modules/ai-report/utils.d.ts +1 -0
- package/lib/modules/ai-report/utils.js +5 -0
- package/lib/modules/ai-template/Root.js +3 -3
- package/lib/modules/ai-template/components/CapabilityModel/index.js +1 -1
- package/lib/modules/ai-template/components/TemplateHeader/index.js +1 -1
- package/lib/modules/ai-template/components/TemplateList/index.js +2 -2
- package/lib/modules/ai-template/components/TemplateList/styled.d.ts +3 -3
- package/lib/modules/ai-template/components/TemplateMenu/index.js +1 -1
- package/lib/modules/ai-template/components/TemplateMenu/styled.d.ts +1 -1
- package/lib/modules/ai-template/interface.d.ts +1 -1
- package/lib/services/ai-ability.d.ts +15 -3
- package/lib/services/ai-ability.js +28 -4
- package/lib/services/ai-question.d.ts +1 -1
- package/lib/services/ai-question.js +1 -1
- package/lib/services/ai-report.d.ts +5 -0
- package/lib/services/ai-report.js +6 -1
- package/lib/store/ai-ability/question-ability-store.d.ts +12 -0
- package/lib/store/ai-ability/question-ability-store.js +13 -0
- package/lib/store/ai-ability-select/question-ability-store.d.ts +18 -0
- package/lib/store/ai-ability-select/question-ability-store.js +16 -0
- package/lib/store/ai-question/ai-analysis-store.d.ts +7 -3
- package/lib/store/ai-question/ai-analysis-store.js +39 -14
- package/lib/store/ai-question/boot-video-store.js +7 -2
- package/lib/store/ai-question/global-store.d.ts +3 -0
- package/lib/store/ai-question/global-store.js +1 -0
- package/lib/store/ai-question/question-template-store.js +1 -1
- package/lib/store/ai-question/question-update-store.js +1 -1
- package/lib/store/ai-report/global-store.d.ts +18 -0
- package/lib/store/ai-report/global-store.js +2 -0
- package/lib/utils/interceptor.js +2 -2
- package/package.json +8 -2
- package/esm/modules/ai-ability/components/UpdateAbility/interface.d.ts +0 -7
- package/lib/modules/ai-ability/components/UpdateAbility/interface.d.ts +0 -7
- /package/esm/{modules/ai-ability/components/UpdateAbility → components/AiHeaderTitle}/interface.js +0 -0
- /package/lib/{modules/ai-ability/components/UpdateAbility → components/AiHeaderTitle}/interface.js +0 -0
|
@@ -19,17 +19,17 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
19
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
20
|
};
|
|
21
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
-
import {
|
|
23
|
-
import { Box, Dialog, Upload, Typography, Button, AddIcon, Tooltip, InfoIcon, Message, Checkbox } from 'fbm-ui';
|
|
24
|
-
import { useRequest, useSetState } from 'ahooks';
|
|
25
|
-
import { Divider } from 'fbm-ui/lib/mui';
|
|
26
|
-
import SvgIcon from "../../../../components/SvgIcon";
|
|
22
|
+
import { CustomUploadButtonRoot, CustomUploadCardRoot, CustomUploadCardTitle, CustomUploadedImgRoot } from './styled';
|
|
27
23
|
import ScrollDialogContent from "../../../../components/ScrollDialogContent";
|
|
28
|
-
import
|
|
24
|
+
import SvgIcon from "../../../../components/SvgIcon";
|
|
29
25
|
import { DEFAULT_GUIDE_VIDEO } from "../../../../constants/ai-question";
|
|
26
|
+
import { PostCommonUpload } from "../../../../services/ai-question";
|
|
30
27
|
import { useBootVideoStore } from "../../../../store/ai-question/boot-video-store";
|
|
31
28
|
import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
|
|
32
|
-
import {
|
|
29
|
+
import { useRequest, useSetState } from 'ahooks';
|
|
30
|
+
import { AddIcon, Box, Button, Checkbox, Dialog, InfoIcon, Message, Radio, RadioGroup, Tooltip, Typography, Upload } from 'fbm-ui';
|
|
31
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
32
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
33
33
|
var BootVideo = function (props) {
|
|
34
34
|
var open = props.open, onClose = props.onClose;
|
|
35
35
|
var _a = useBootVideoStore(), mediaUrl = _a.mediaUrl, thumbUrl = _a.thumbUrl, updateBootVideo = _a.updateBootVideo;
|
|
@@ -40,12 +40,14 @@ var BootVideo = function (props) {
|
|
|
40
40
|
onSuccess: function (_a) {
|
|
41
41
|
var data = _a.data;
|
|
42
42
|
var item = data[0];
|
|
43
|
-
|
|
43
|
+
var OfficialMedia = mediaList[0];
|
|
44
|
+
setMediaList([
|
|
45
|
+
OfficialMedia,
|
|
44
46
|
{
|
|
45
47
|
videoUrl: item.url,
|
|
46
48
|
frameUrl: item.mineExtra.firstFrameUrl,
|
|
47
49
|
},
|
|
48
|
-
]
|
|
50
|
+
]);
|
|
49
51
|
setMediaState({ mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
|
|
50
52
|
},
|
|
51
53
|
}), loading = _d.loading, postCommonUpload = _d.run;
|
|
@@ -61,9 +63,10 @@ var BootVideo = function (props) {
|
|
|
61
63
|
type: 'custom',
|
|
62
64
|
showUploadList: false,
|
|
63
65
|
accept: '.mp4,.mov,.m4v,.3gp,.avi,.webm',
|
|
64
|
-
maxCount:
|
|
66
|
+
maxCount: 7,
|
|
65
67
|
customRequest: function (_a) {
|
|
66
68
|
var file = _a.file;
|
|
69
|
+
console.log('customRequest file', file);
|
|
67
70
|
if (isExceedMaxVideoFileSize(file.size)) {
|
|
68
71
|
Message.error('视频大小超过500M,请重新上传!');
|
|
69
72
|
}
|
|
@@ -73,6 +76,16 @@ var BootVideo = function (props) {
|
|
|
73
76
|
postCommonUpload(formData);
|
|
74
77
|
}
|
|
75
78
|
},
|
|
79
|
+
// onChange: ({ file }: any) => {
|
|
80
|
+
// console.log('onChange', file);
|
|
81
|
+
// if (isExceedMaxVideoFileSize(file.size)) {
|
|
82
|
+
// Message.error('视频大小超过500M,请重新上传!');
|
|
83
|
+
// } else {
|
|
84
|
+
// const formData = new FormData();
|
|
85
|
+
// formData.append('files', file.originFileObj);
|
|
86
|
+
// postCommonUpload(formData);
|
|
87
|
+
// }
|
|
88
|
+
// },
|
|
76
89
|
};
|
|
77
90
|
useEffect(function () {
|
|
78
91
|
if (open) {
|
|
@@ -92,9 +105,9 @@ var BootVideo = function (props) {
|
|
|
92
105
|
}
|
|
93
106
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
94
107
|
}, [open]);
|
|
95
|
-
return (_jsx(Dialog, __assign({ open: open, title: "\
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
108
|
+
return (_jsx(Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", onClose: onClose, onOk: handleOk, width: 768 }, { children: _jsx(ScrollDialogContent, { children: _jsxs(Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between' } }, { children: [_jsxs(Stack, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), _jsx(RadioGroup, __assign({ defaultValue: "outlined", value: 1 }, { children: _jsx(Radio, { value: "1", label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }) })), _jsx(Typography, __assign({ variant: "body1", fontWeight: 500, mt: 3, mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), _jsx(CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
|
|
109
|
+
var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
|
|
110
|
+
return (_jsx("img", { src: frameUrl, style: { borderColor: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
|
|
111
|
+
}) }), _jsx(Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 344, color: "text.disabled", mb: 2, mt: 1 }, { children: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm" })), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsxs(CustomUploadButtonRoot, { children: [_jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })), _jsx(Tooltip, __assign({ title: "\u8BF7\u52FF\u4E0A\u4F20\u8272\u60C5\u53CA\u53CD\u52A8\u8FDD\u89C4\u89C6\u9891\uFF0C\u5EFA\u8BAE\u4F7F\u7528360\u6D4F\u89C8\u5668\u3002 \u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm\uFF0C\u652F\u6301\u7F16\u7801\u683C\u5F0F\uFF1AH.264\u3001HEV4\u3001 MPRG-4\u3001VP9" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: 8 } }, { children: _jsx(InfoIcon, { sx: { fontSize: 18, color: 'rgb(118, 118, 118)' } }) })) }))] }), _jsx(Box, __assign({ ml: 0.5 }, { children: _jsx(Checkbox, { checked: mediaState.appliedAllPosition, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5E94\u7528\u5230\u6240\u6709AI\u89C6\u9891" })), onChange: function (e, checked) { return setMediaState({ appliedAllPosition: checked }); } }) }))] }))] }), _jsx(Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? (_jsx(Box, __assign({ loading: loading, sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: _jsx("video", { width: 160, height: 286, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : (_jsx(Upload, __assign({}, uploadProps, { children: _jsxs(CustomUploadCardRoot, { children: [_jsxs(CustomUploadCardTitle, { children: [_jsx(SvgIcon, { name: "video" }), _jsx(Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), _jsx(Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))) }))] })) }) })));
|
|
99
112
|
};
|
|
100
113
|
export default BootVideo;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Box, styled } from 'fbm-ui';
|
|
2
2
|
export var CustomUploadCardRoot = styled(Box)({
|
|
3
3
|
backgroundColor: '#fff',
|
|
4
4
|
border: '1px dashed #e0e0e0',
|
|
@@ -30,18 +30,19 @@ export var CustomUploadButtonRoot = styled(Box)({
|
|
|
30
30
|
margin: '8px 0',
|
|
31
31
|
});
|
|
32
32
|
export var CustomUploadedImgRoot = styled(Box)({
|
|
33
|
-
minHeight:
|
|
33
|
+
minHeight: 100,
|
|
34
34
|
display: 'flex',
|
|
35
35
|
flexWrap: 'wrap',
|
|
36
36
|
alignItems: 'center',
|
|
37
37
|
padding: '8px 0',
|
|
38
38
|
boxSizing: 'content-box',
|
|
39
39
|
'& img': {
|
|
40
|
-
|
|
40
|
+
boxSizing: 'border-box',
|
|
41
|
+
width: 56,
|
|
41
42
|
objectFit: 'cover',
|
|
42
|
-
transition: 'all 0.3s ease 0s',
|
|
43
|
+
// transition: 'all 0.3s ease 0s',
|
|
43
44
|
cursor: 'pointer',
|
|
44
|
-
border: '
|
|
45
|
+
border: '2px solid transparent',
|
|
45
46
|
borderRadius: 4,
|
|
46
47
|
marginRight: 4,
|
|
47
48
|
},
|
|
@@ -0,0 +1,19 @@
|
|
|
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 { Button, Typography } from 'fbm-ui';
|
|
14
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
15
|
+
var AutoCombine = function (_a) {
|
|
16
|
+
var onAutoCombine = _a.onAutoCombine;
|
|
17
|
+
return (_jsx(Stack, { children: _jsxs(Stack, __assign({ width: 210, alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u6682\u65E0\u9898\u76EE" })), _jsxs(Typography, __assign({ textAlign: "center", variant: "caption", color: "text.disabled", mb: 2 }, { children: ["\u70B9\u51FB\u300CAI\u81EA\u52A8\u7EC4\u9898\u300D\u6309\u94AE", _jsx("br", {}), "\u53EF\u6839\u636E\u60A8\u9009\u62E9\u7684\u80FD\u529B\u5B9E\u73B0\u4E00\u952E\u7EC4\u9898"] })), _jsx(Button, __assign({ onClick: onAutoCombine }, { children: "AI\u81EA\u52A8\u7EC4\u9898" }))] })) }));
|
|
18
|
+
};
|
|
19
|
+
export default AutoCombine;
|
|
@@ -9,15 +9,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import {
|
|
13
|
-
import { useState } from 'react';
|
|
14
|
-
import { Box, Button, Typography, VideocamOutlineIcon, Tooltip, InfoOutlineIcon } from 'fbm-ui';
|
|
12
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
15
13
|
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
16
14
|
import { getSecondToTime } from "../../../../utils/utils";
|
|
17
|
-
import
|
|
15
|
+
import { Typography } from 'fbm-ui';
|
|
16
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
18
17
|
var QuestionHeader = function () {
|
|
19
18
|
var questionModelData = useQuestionModelStore().questionModelData;
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
if (!questionModelData)
|
|
20
|
+
return null;
|
|
21
|
+
return (_jsxs(Stack, __assign({ width: "100%", direction: "row", spacing: 2, alignItems: "center" }, { children: [_jsxs(Typography, __assign({ variant: "body2", fontWeight: 500 }, { children: ["\u9884\u8BA1\u9762\u8BD5\u65F6\u957F\uFF1A", getSecondToTime((questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.duration) || 0)] })), _jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u62D6\u52A8\u8BD5\u9898\u5361\u7247\u53EF\u6539\u53D8\u8BD5\u9898\u987A\u5E8F" }))] })));
|
|
22
22
|
};
|
|
23
23
|
export default QuestionHeader;
|
|
@@ -0,0 +1,26 @@
|
|
|
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, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import BootVideo from '../BootVideo';
|
|
14
|
+
import { Button, Typography, VideocamOutlineIcon } from 'fbm-ui';
|
|
15
|
+
import { Paper, Stack } from 'fbm-ui/lib/mui';
|
|
16
|
+
import { useState } from 'react';
|
|
17
|
+
var InteractiveModes = {
|
|
18
|
+
Traditional: '传统读题模式',
|
|
19
|
+
Chat: 'AI面试官对话模式',
|
|
20
|
+
};
|
|
21
|
+
var Interactive = function (_a) {
|
|
22
|
+
var mode = _a.mode;
|
|
23
|
+
var _b = useState(false), bootVideoOpen = _b[0], setBootVideoOpen = _b[1];
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsx(BootVideo, { open: bootVideoOpen, onClose: function () { return setBootVideoOpen(false); } }), _jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", component: Paper, variant: "outlined", height: 54, alignItems: "center", px: 2, mt: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F\uFF1A".concat(InteractiveModes[mode]) })), _jsx(Button, __assign({ icon: _jsx(VideocamOutlineIcon, {}), variant: "text", onClick: function () { return setBootVideoOpen(true); } }, { children: "\u5B9A\u5236\u9762\u8BD5\u95F4" }))] }))] }));
|
|
25
|
+
};
|
|
26
|
+
export default Interactive;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { QuestionModelListItemProps } from './interface';
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: import("react").NamedExoticComponent<QuestionModelListItemProps>;
|
|
4
4
|
export default _default;
|
|
@@ -21,16 +21,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import {
|
|
25
|
-
import { Box, Chip, Input, Typography, IconButton, DragIndicatorIcon, EditIcon, DeleteIcon, Switch, confirm } from 'fbm-ui';
|
|
26
|
-
import { Paper } from 'fbm-ui/lib/mui';
|
|
24
|
+
import { DISABLED_REPEAT_TYPE, IS_AI_ANALYSIS, TEST_TYPE_READONLY } from "../../../../constants/ai-question";
|
|
27
25
|
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
28
26
|
import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
|
|
29
27
|
import { getSecondToTime } from "../../../../utils/utils";
|
|
30
|
-
import {
|
|
28
|
+
import { Box, Chip, confirm, DeleteIcon, DragIndicatorIcon, EditIcon, IconButton, InfoIcon, Input, Switch, Tooltip, Typography } from 'fbm-ui';
|
|
29
|
+
import { Paper, Stack } from 'fbm-ui/lib/mui';
|
|
30
|
+
import { memo, useCallback, useMemo } from 'react';
|
|
31
31
|
var QuestionModelListItem = function (props) {
|
|
32
32
|
var index = props.index, disabledWeight = props.disabledWeight, steps = props.steps, step = __rest(props, ["index", "disabledWeight", "steps"]);
|
|
33
|
-
var token = step.token, name = step.name,
|
|
33
|
+
var token = step.token, name = step.name, questions = step.questions, duration = step.duration, weight = step.weight, type = step.type, aiShowType = step.aiShowType, aiType = step.aiType, answerStatus = step.answerStatus, category = step.category;
|
|
34
34
|
var isAiAnalysis = IS_AI_ANALYSIS(step);
|
|
35
35
|
var _a = useQuestionModelStore(), editModel = _a.editModel, removeModel = _a.removeModel, updateModelWeight = _a.updateModelWeight;
|
|
36
36
|
var updateQuestionState = useUpdateQuestionStore().updateQuestionState;
|
|
@@ -64,9 +64,16 @@ var QuestionModelListItem = function (props) {
|
|
|
64
64
|
}
|
|
65
65
|
}, [updateModelWeight, index]);
|
|
66
66
|
var handleAnswerStatus = useCallback(function () {
|
|
67
|
-
console.log(answerStatus);
|
|
68
67
|
editModel(__assign(__assign({}, step), { answerStatus: answerStatus === 2 ? 1 : 2 }), index);
|
|
69
68
|
}, [editModel, answerStatus, step, index]);
|
|
70
|
-
|
|
69
|
+
var formatQuestion = useMemo(function () {
|
|
70
|
+
if ((questions === null || questions === void 0 ? void 0 : questions.length) > 1) {
|
|
71
|
+
return (_jsxs(Stack, __assign({ direction: "row", spacing: 1 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "#F5C441" }, { children: "[\u5185\u5BB9\u968F\u673A]" })), _jsx(Stack, __assign({ spacing: 1 }, { children: questions.map(function (v, index) { return (_jsxs(Typography, __assign({ variant: "body2", color: "text.secondary" }, { children: ["\u2022\u00A0", v.content] }), index)); }) }))] })));
|
|
72
|
+
}
|
|
73
|
+
return questions.map(function (v) { return v.content; }).join('\n');
|
|
74
|
+
}, [questions]);
|
|
75
|
+
return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsxs(Box, __assign({ display: "flex", borderBottom: isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: [_jsx(Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: _jsx(DragIndicatorIcon, { className: "dragHandle" }) })), _jsxs(Box, __assign({ flex: "1 0", padding: "16px 0" }, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [_jsxs(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
|
|
76
|
+
return label && (_jsx(Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: _jsx(Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
|
|
77
|
+
}), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), _jsx(Typography, __assign({ sx: { ml: 2 }, variant: "body2", color: "secondary" }, { children: getSecondToTime(Number(duration)) }))] })), _jsxs(Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!TEST_TYPE_READONLY.includes(type) && (_jsx(IconButton, __assign({ size: "small", onClick: handleEdit }, { children: _jsx(EditIcon, {}) }))), _jsx(IconButton, __assign({ size: "small", onClick: handleRemove }, { children: _jsx(DeleteIcon, {}) }))] }))] })), _jsxs(Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), _jsxs(Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", getSecondToTime(Number(duration))] }))] }))] }))] })), isAiAnalysis && (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 40px" }, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 82 }, size: "small", value: weight, endAdornment: "%", disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), _jsx(Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsx(Stack, __assign({ direction: "row" }, { children: _jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }) })))] })))] })));
|
|
71
78
|
};
|
|
72
79
|
export default memo(QuestionModelListItem);
|
|
@@ -10,23 +10,39 @@ 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 {
|
|
14
|
-
import
|
|
15
|
-
import Sortable from 'sortablejs';
|
|
16
|
-
import { arrayMoveImmutable } from 'array-move';
|
|
17
|
-
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
18
|
-
import { IS_AI_ANALYSIS } from "../../../../constants/ai-question";
|
|
13
|
+
import { defaultQuestionParams } from '../QuestionUpdate/const';
|
|
14
|
+
import AutoCombine from './AutoCombine';
|
|
19
15
|
import QuestionModelListItem from './Item';
|
|
16
|
+
import { useAiQuestionStore } from "../../../../store/ai-question/global-store";
|
|
17
|
+
import { useQuestionTemplateStore } from "../../../../store/ai-question/question-template-store";
|
|
18
|
+
import { uniqueId } from "../../../../utils/utils";
|
|
19
|
+
import { IS_AI_ANALYSIS } from "../../../../constants/ai-question";
|
|
20
|
+
import { LANGUAGE_TYPE } from "../../../../enum/ai-question";
|
|
21
|
+
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
22
|
+
import { arrayMoveImmutable } from 'array-move';
|
|
23
|
+
import { Box } from 'fbm-ui';
|
|
24
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
25
|
+
import Sortable from 'sortablejs';
|
|
26
|
+
var LANGUAGE_TYPE_LIST = [LANGUAGE_TYPE.MANDARIN, LANGUAGE_TYPE.CANTONESE, LANGUAGE_TYPE.JAPANESE, LANGUAGE_TYPE.ENGLISH];
|
|
20
27
|
var QuestionModelList = function () {
|
|
21
28
|
var ref = useRef();
|
|
22
29
|
var sortable = useRef();
|
|
23
|
-
var _a = useQuestionModelStore(), questionModelData = _a.questionModelData, updateModel = _a.updateModel;
|
|
30
|
+
var _a = useQuestionModelStore(), questionModelData = _a.questionModelData, updateModel = _a.updateModel, addModel = _a.addModel;
|
|
31
|
+
var extraAbilityTokens = useAiQuestionStore().extraAbilityTokens;
|
|
32
|
+
var aiEvaluationData = useQuestionTemplateStore(function (store) { return [store.aiEvaluationData]; }).aiEvaluationData;
|
|
24
33
|
var _b = (questionModelData || {}).steps, steps = _b === void 0 ? [] : _b;
|
|
25
34
|
var lastAiTestIndex = 0;
|
|
26
35
|
steps.forEach(function (step, i) {
|
|
27
36
|
if (IS_AI_ANALYSIS(step))
|
|
28
37
|
lastAiTestIndex = i;
|
|
29
38
|
});
|
|
39
|
+
var getQuestionStep = function (item) { return (__assign(__assign(__assign({}, defaultQuestionParams), item), { aiAbilities: item.aiAbilities.filter(function (_a) {
|
|
40
|
+
var type = _a.type;
|
|
41
|
+
return !LANGUAGE_TYPE_LIST.includes(type);
|
|
42
|
+
}), uniqueId: uniqueId(), originToken: item.token })); };
|
|
43
|
+
var handleUseQuestion = useCallback(function (items) {
|
|
44
|
+
addModel(items.map(getQuestionStep));
|
|
45
|
+
}, [addModel]);
|
|
30
46
|
useEffect(function () {
|
|
31
47
|
if (steps) {
|
|
32
48
|
sortable.current && sortable.current.destroy();
|
|
@@ -42,6 +58,10 @@ var QuestionModelList = function () {
|
|
|
42
58
|
}, [questionModelData, updateModel, steps]);
|
|
43
59
|
return (_jsx(Box, __assign({ width: "100%", sx: steps.length > 0 ? {} : { height: 'calc(100% - 100px)', display: 'flex', alignItems: 'center', justifyContent: 'center' }, ref: ref }, { children: steps.length > 0 ? (steps.map(function (item, index) {
|
|
44
60
|
return (_jsx(QuestionModelListItem, __assign({ steps: steps, index: index, disabledWeight: index === lastAiTestIndex }, item), item.uniqueId || item.token));
|
|
45
|
-
})) : (_jsx(
|
|
61
|
+
})) : (_jsx(AutoCombine, { onAutoCombine: function () {
|
|
62
|
+
console.log('steps', extraAbilityTokens, aiEvaluationData);
|
|
63
|
+
var random = aiEvaluationData[0].list.filter(function (item) { return extraAbilityTokens === null || extraAbilityTokens === void 0 ? void 0 : extraAbilityTokens.includes(item === null || item === void 0 ? void 0 : item.token); }).map(function (v) { return v.list; }) || [];
|
|
64
|
+
handleUseQuestion(random.map(function (item) { return item[Math.floor(Math.random() * item.length)]; }));
|
|
65
|
+
} })) })));
|
|
46
66
|
};
|
|
47
67
|
export default QuestionModelList;
|
|
@@ -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,
|
|
13
|
+
import { Box, Paper, Skeleton, Stack } from 'fbm-ui/lib/mui';
|
|
14
14
|
var QuestionModelSkeleton = function () {
|
|
15
15
|
return (_jsxs(Box, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 2, sx: { mb: 3 } }, { children: [_jsx(Skeleton, { variant: "text", width: 120, height: 28 }), _jsx(Skeleton, { variant: "text", width: 120, height: 18 })] })), _jsxs(Stack, __assign({ spacing: 3 }, { children: [_jsxs(Paper, __assign({ elevation: 2, sx: { height: 80, padding: 3 } }, { children: [_jsx(Skeleton, { variant: "text", width: 128, height: 8, sx: { mb: 3 } }), _jsx(Skeleton, { variant: "text", width: 360, height: 8 })] })), _jsxs(Paper, __assign({ elevation: 2, sx: { height: 80, padding: 3 } }, { children: [_jsx(Skeleton, { variant: "text", width: 128, height: 8, sx: { mb: 3 } }), _jsx(Skeleton, { variant: "text", width: 360, height: 8 })] }))] }))] }));
|
|
16
16
|
};
|
|
@@ -10,27 +10,31 @@ 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 { useEffect, useRef } from 'react';
|
|
14
|
-
import { useRequest } from 'ahooks';
|
|
15
|
-
import { PostAiModelDetails } from "../../../../services/ai-question";
|
|
16
|
-
import { useAiQuestionStore } from "../../../../store/ai-question/global-store";
|
|
17
|
-
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
18
|
-
import { useQuestionTemplateStore } from "../../../../store/ai-question/question-template-store";
|
|
19
13
|
import { defaultQuestionParams } from '../QuestionUpdate/const';
|
|
20
|
-
import { QuestionModelRoot } from './styled';
|
|
21
14
|
import QuestionModelHeader from './Header';
|
|
15
|
+
import Interactive from './Interactive';
|
|
22
16
|
import QuestionModelList from './List';
|
|
23
17
|
import Skeleton from './Skeleton';
|
|
18
|
+
import { QuestionModelRoot } from './styled';
|
|
19
|
+
import { useAiAbilityListStore } from "../../../../store/ai-ability-select/question-ability-store";
|
|
20
|
+
import { PostAiModelDetails } from "../../../../services/ai-question";
|
|
21
|
+
import { useAiQuestionStore } from "../../../../store/ai-question/global-store";
|
|
22
|
+
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
23
|
+
import { useQuestionTemplateStore } from "../../../../store/ai-question/question-template-store";
|
|
24
|
+
import { useRequest } from 'ahooks';
|
|
25
|
+
import { useEffect, useRef } from 'react';
|
|
24
26
|
var Question = function () {
|
|
25
27
|
var isDefaultAdded = useRef(false);
|
|
26
28
|
var _a = useAiQuestionStore(function (store) { return [store.token, store.name, store.templateList]; }), token = _a.token, name = _a.name, templateList = _a.templateList, onLoad = _a.onLoad;
|
|
27
29
|
var aiEvaluationData = useQuestionTemplateStore(function (store) { return [store.aiEvaluationData]; }).aiEvaluationData;
|
|
28
30
|
var _b = useQuestionModelStore(function (store) { return [store.questionModelData]; }), questionModelData = _b.questionModelData, updateModel = _b.updateModel, addModel = _b.addModel;
|
|
31
|
+
var setSelctedAbilitys = useAiAbilityListStore().setSelctedAbilitys;
|
|
29
32
|
var _c = useRequest(function () { return PostAiModelDetails(token); }, {
|
|
30
33
|
manual: true,
|
|
31
34
|
onSuccess: function (_a) {
|
|
32
35
|
var data = _a.data;
|
|
33
36
|
updateModel(data);
|
|
37
|
+
setSelctedAbilitys((data === null || data === void 0 ? void 0 : data.selectAbilities) || []);
|
|
34
38
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(data.steps);
|
|
35
39
|
},
|
|
36
40
|
}), postAiModelDetails = _c.run, loading = _c.loading;
|
|
@@ -66,6 +70,6 @@ var Question = function () {
|
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
}, [token, aiEvaluationData, questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps, templateList, addModel]);
|
|
69
|
-
return (_jsx(QuestionModelRoot, { children: loading ? (_jsx(Skeleton, {})) : (_jsxs(_Fragment, { children: [_jsx(QuestionModelHeader, {}), _jsx(QuestionModelList, {})] })) }));
|
|
73
|
+
return (_jsx(QuestionModelRoot, { children: loading ? (_jsx(Skeleton, {})) : (_jsxs(_Fragment, { children: [_jsx(QuestionModelHeader, {}), _jsx(Interactive, { mode: "Chat" }), _jsx(QuestionModelList, {})] })) }));
|
|
70
74
|
};
|
|
71
75
|
export default Question;
|
|
@@ -7,6 +7,8 @@ export interface QuestionModelData {
|
|
|
7
7
|
name?: string | undefined;
|
|
8
8
|
token?: string;
|
|
9
9
|
duration?: number;
|
|
10
|
+
selectAbilities?: string[];
|
|
11
|
+
interactType?: string;
|
|
10
12
|
steps: QuestionModelStep[];
|
|
11
13
|
}
|
|
12
14
|
export interface QuestionModelDataRes {
|
|
@@ -17,3 +19,6 @@ export interface QuestionModelListItemProps extends QuestionModelStep {
|
|
|
17
19
|
index: number;
|
|
18
20
|
disabledWeight: boolean;
|
|
19
21
|
}
|
|
22
|
+
export interface AutoCombineProps {
|
|
23
|
+
onAutoCombine: () => void;
|
|
24
|
+
}
|
|
@@ -10,20 +10,20 @@ 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 { Box, Typography } from 'fbm-ui';
|
|
15
|
-
import { useQuestionPreviewStore } from "../../../../store/ai-question/question-preview-store";
|
|
16
|
-
import { QUESTION_TYPE_MAPPING_LABEL } from "../../../../constants/ai-question";
|
|
17
|
-
import { ADD_QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
18
13
|
import Form from '../QuestionUpdate/Form';
|
|
19
14
|
import { PreviewRoot } from './styled';
|
|
15
|
+
import { QUESTION_TYPE_MAPPING_LABEL } from "../../../../constants/ai-question";
|
|
16
|
+
import { ADD_QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
17
|
+
import { useQuestionPreviewStore } from "../../../../store/ai-question/question-preview-store";
|
|
18
|
+
import { Box, Typography } from 'fbm-ui';
|
|
19
|
+
import { useEffect, useState } from 'react';
|
|
20
20
|
var QuestionPreview = function () {
|
|
21
21
|
var _a = useQuestionPreviewStore(), visible = _a.visible, previewItem = _a.previewItem;
|
|
22
22
|
var _b = previewItem || {}, _c = _b.name, name = _c === void 0 ? '' : _c, _d = _b.type, type = _d === void 0 ? 1 : _d, _e = _b.broadcastType, broadcastType = _e === void 0 ? 1 : _e, _f = _b.desc, desc = _f === void 0 ? '' : _f, _g = _b.prepareTime, prepareTime = _g === void 0 ? 3 : _g, _h = _b.duration, duration = _h === void 0 ? 30 : _h, extra = _b.extra;
|
|
23
23
|
var _j = useState(), values = _j[0], setValues = _j[1];
|
|
24
24
|
var _k = useState('none'), display = _k[0], setDisplay = _k[1];
|
|
25
25
|
useEffect(function () {
|
|
26
|
-
setValues({ name: name, broadcastType: broadcastType, desc: desc, prepareTime: prepareTime, duration: duration });
|
|
26
|
+
setValues({ name: name, broadcastType: broadcastType, desc: desc, prepareTime: prepareTime, duration: duration, questions: [] });
|
|
27
27
|
setDisplay(visible ? 'block' : 'none');
|
|
28
28
|
}, [name, broadcastType, desc, prepareTime, duration, visible]);
|
|
29
29
|
return (_jsx(PreviewRoot, __assign({ style: { display: display } }, { children: (extra === null || extra === void 0 ? void 0 : extra.icon) ? (_jsx("img", { src: extra === null || extra === void 0 ? void 0 : extra.icon, alt: "", style: { width: 250 } })) : (_jsxs(Box, __assign({ width: 500 }, { children: [_jsxs(Typography, __assign({ variant: "h5", textAlign: "center", mb: 3 }, { children: [QUESTION_TYPE_MAPPING_LABEL[type], "\uFF08\u9884\u89C8\uFF09"] })), values && _jsx(Form, { preview: true, aiShowType: ADD_QUESTION_TYPE.FREE, initialValues: values, values: values })] }))) })));
|
|
@@ -8,4 +8,4 @@ export declare const PreviewRoot: import("@emotion/styled").StyledComponent<{
|
|
|
8
8
|
variant?: "elevation" | "outlined" | undefined;
|
|
9
9
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
10
10
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
11
|
-
},
|
|
11
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "elevation" | "square" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
@@ -10,20 +10,20 @@ 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
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
13
|
+
import BaseAccordion from '../BaseAccordion';
|
|
14
|
+
import { defaultQuestionParams } from '../QuestionUpdate/const';
|
|
15
|
+
import SvgIcon from "../../../../components/SvgIcon";
|
|
16
|
+
import { ADD_QUESTION_TYPE_LIST } from "../../../../constants/ai-question";
|
|
17
|
+
import { ADD_QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
17
18
|
import { useAiQuestionStore } from "../../../../store/ai-question/global-store";
|
|
18
19
|
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
19
|
-
import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
|
|
20
20
|
import { useQuestionTemplateStore } from "../../../../store/ai-question/question-template-store";
|
|
21
|
-
import {
|
|
22
|
-
import { ADD_QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
23
|
-
import SvgIcon from "../../../../components/SvgIcon";
|
|
21
|
+
import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
|
|
24
22
|
import { uniqueId } from "../../../../utils/utils";
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
23
|
+
import { useSetState } from 'ahooks';
|
|
24
|
+
import { AddIcon, Box, Button, LayerOutlineIcon, Popover, SMSOneIcon, Typography } from 'fbm-ui';
|
|
25
|
+
import { List, ListItem, ListItemButton, ListItemIcon, ListItemText } from 'fbm-ui/lib/mui';
|
|
26
|
+
import { useCallback } from 'react';
|
|
27
27
|
var AiEvaluation = function () {
|
|
28
28
|
var onOpenTemplate = useAiQuestionStore(function (store) { return [store.onOpenTemplate]; }).onOpenTemplate;
|
|
29
29
|
var updateQuestionState = useUpdateQuestionStore(function (store) { return [store.updateQuestionState]; }).updateQuestionState;
|
|
@@ -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 {
|
|
13
|
+
import { Paper, Skeleton, Stack } from 'fbm-ui/lib/mui';
|
|
14
14
|
var QuestionTemplateSkeleton = function () {
|
|
15
15
|
return (_jsxs(Stack, __assign({ spacing: 2 }, { children: [_jsx(Paper, __assign({ elevation: 2 }, { children: _jsx(Skeleton, { variant: "text", width: 127, height: 8, sx: { margin: '25px 16px' } }) })), _jsx(Paper, __assign({ elevation: 2 }, { children: _jsx(Skeleton, { variant: "text", width: 127, height: 8, sx: { margin: '25px 16px' } }) })), _jsx(Paper, __assign({ elevation: 2 }, { children: _jsx(Skeleton, { variant: "text", width: 127, height: 8, sx: { margin: '25px 16px' } }) }))] })));
|
|
16
16
|
};
|
|
@@ -10,15 +10,16 @@ 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 { useRequest } from 'ahooks';
|
|
14
|
-
import { Box } from 'fbm-ui';
|
|
15
|
-
import { PostAiModelQuestions } from "../../../../services/ai-question";
|
|
16
|
-
import { useQuestionTemplateStore } from "../../../../store/ai-question/question-template-store";
|
|
17
13
|
import AiEvaluation from './AiEvaluation';
|
|
18
14
|
import Skeleton from './Skeleton';
|
|
19
|
-
|
|
15
|
+
import { PostAiModelQuestions } from "../../../../services/ai-question";
|
|
16
|
+
import { useQuestionTemplateStore } from "../../../../store/ai-question/question-template-store";
|
|
17
|
+
import { useRequest } from 'ahooks';
|
|
18
|
+
import { Box } from 'fbm-ui';
|
|
19
|
+
var QuestionTemplate = function (_a) {
|
|
20
|
+
var _b = _a.extraAbilityTokens, extraAbilityTokens = _b === void 0 ? [] : _b;
|
|
20
21
|
var updateAiEvaluationData = useQuestionTemplateStore().updateAiEvaluationData;
|
|
21
|
-
var loading = useRequest(PostAiModelQuestions, {
|
|
22
|
+
var loading = useRequest(function () { return PostAiModelQuestions({ extraAbilityTokens: extraAbilityTokens }); }, {
|
|
22
23
|
manual: false,
|
|
23
24
|
onSuccess: function (_a) {
|
|
24
25
|
var data = _a.data;
|
|
@@ -9,6 +9,10 @@ export interface AiEvaluationListExtra {
|
|
|
9
9
|
riskMaxScore?: number;
|
|
10
10
|
maxScore?: number;
|
|
11
11
|
}
|
|
12
|
+
interface Question {
|
|
13
|
+
content: '';
|
|
14
|
+
videoUrl: '';
|
|
15
|
+
}
|
|
12
16
|
export interface AiEvaluationList {
|
|
13
17
|
aiAbilities: BaseAiAbilityParams[];
|
|
14
18
|
name: string;
|
|
@@ -19,6 +23,7 @@ export interface AiEvaluationList {
|
|
|
19
23
|
isDefault: boolean;
|
|
20
24
|
duration: number;
|
|
21
25
|
prepareTime: number;
|
|
26
|
+
questions: Question[];
|
|
22
27
|
extra: AiEvaluationListExtra;
|
|
23
28
|
broadcastType: number;
|
|
24
29
|
aiSwitch: number;
|
|
@@ -27,6 +32,7 @@ export interface AiEvaluationList {
|
|
|
27
32
|
}
|
|
28
33
|
export interface AiEvaluationDataList {
|
|
29
34
|
name: string;
|
|
35
|
+
token: string;
|
|
30
36
|
positionName?: string;
|
|
31
37
|
list: AiEvaluationList[];
|
|
32
38
|
}
|
|
@@ -41,3 +47,7 @@ export interface AiEvaluationState {
|
|
|
41
47
|
addQuestionOpen: boolean;
|
|
42
48
|
showOnlyAITest: boolean;
|
|
43
49
|
}
|
|
50
|
+
export interface QuestionTemplateProps {
|
|
51
|
+
extraAbilityTokens?: string[];
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { QuestionFormProps } from './interface';
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<QuestionFormProps & import("react").RefAttributes<any>>>;
|
|
4
4
|
export default _default;
|