eli-video-interview 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +411 -0
- package/esm/assets/icons/free.svg +1 -0
- package/esm/assets/icons/video.svg +1 -0
- package/esm/components/BigBallSvg/index.d.ts +3 -0
- package/esm/components/BigBallSvg/index.js +17 -0
- package/esm/components/BigBallSvg/index.module.css +37 -0
- package/esm/components/Charts/Chart.d.ts +4 -0
- package/esm/components/Charts/Chart.js +38 -0
- package/esm/components/Charts/const.d.ts +382 -0
- package/esm/components/Charts/const.js +382 -0
- package/esm/components/Charts/interface.d.ts +3 -0
- package/esm/components/Charts/interface.js +1 -0
- package/esm/components/ScrollDialogContent/index.d.ts +5 -0
- package/esm/components/ScrollDialogContent/index.js +6 -0
- package/esm/components/SvgIcon/index.d.ts +4 -0
- package/esm/components/SvgIcon/index.js +31 -0
- package/esm/components/SvgIcon/interface.d.ts +3 -0
- package/esm/components/SvgIcon/interface.js +1 -0
- package/esm/components/VideoPreview/index.d.ts +4 -0
- package/esm/components/VideoPreview/index.js +20 -0
- package/esm/components/VideoPreview/interface.d.ts +15 -0
- package/esm/components/VideoPreview/interface.js +1 -0
- package/esm/components/VideoPreview/styled.d.ts +10 -0
- package/esm/components/VideoPreview/styled.js +24 -0
- package/esm/constants/ai-question.d.ts +27 -0
- package/esm/constants/ai-question.js +39 -0
- package/esm/constants/ai-report.d.ts +2 -0
- package/esm/constants/ai-report.js +12 -0
- package/esm/enum/ai-question.d.ts +38 -0
- package/esm/enum/ai-question.js +42 -0
- package/esm/enum/ai-report.d.ts +27 -0
- package/esm/enum/ai-report.js +30 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.js +6 -0
- package/esm/modules/ai-question/Root.d.ts +4 -0
- package/esm/modules/ai-question/Root.js +141 -0
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +4 -0
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +39 -0
- package/esm/modules/ai-question/components/AiAnalysis/MainPoints.d.ts +4 -0
- package/esm/modules/ai-question/components/AiAnalysis/MainPoints.js +54 -0
- package/esm/modules/ai-question/components/AiAnalysis/MainPointsItem.d.ts +4 -0
- package/esm/modules/ai-question/components/AiAnalysis/MainPointsItem.js +62 -0
- package/esm/modules/ai-question/components/AiAnalysis/const.d.ts +5 -0
- package/esm/modules/ai-question/components/AiAnalysis/const.js +11 -0
- package/esm/modules/ai-question/components/AiAnalysis/index.d.ts +3 -0
- package/esm/modules/ai-question/components/AiAnalysis/index.js +35 -0
- package/esm/modules/ai-question/components/AiAnalysis/interface.d.ts +23 -0
- package/esm/modules/ai-question/components/AiAnalysis/interface.js +1 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +19 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +23 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +4 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +114 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +27 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.js +1 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +39 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/styled.js +20 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/utils.d.ts +9 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/utils.js +29 -0
- package/esm/modules/ai-question/components/BaseAccordion/const.d.ts +1 -0
- package/esm/modules/ai-question/components/BaseAccordion/const.js +1 -0
- package/esm/modules/ai-question/components/BaseAccordion/index.d.ts +4 -0
- package/esm/modules/ai-question/components/BaseAccordion/index.js +98 -0
- package/esm/modules/ai-question/components/BaseAccordion/interface.d.ts +9 -0
- package/esm/modules/ai-question/components/BaseAccordion/interface.js +1 -0
- package/esm/modules/ai-question/components/BaseAccordion/styled.d.ts +10 -0
- package/esm/modules/ai-question/components/BaseAccordion/styled.js +73 -0
- package/esm/modules/ai-question/components/BootVideo/index.d.ts +4 -0
- package/esm/modules/ai-question/components/BootVideo/index.js +100 -0
- package/esm/modules/ai-question/components/BootVideo/interface.d.ts +8 -0
- package/esm/modules/ai-question/components/BootVideo/interface.js +1 -0
- package/esm/modules/ai-question/components/BootVideo/styled.d.ts +33 -0
- package/esm/modules/ai-question/components/BootVideo/styled.js +49 -0
- package/esm/modules/ai-question/components/QuestionModel/Header.d.ts +3 -0
- package/esm/modules/ai-question/components/QuestionModel/Header.js +23 -0
- package/esm/modules/ai-question/components/QuestionModel/Item.d.ts +4 -0
- package/esm/modules/ai-question/components/QuestionModel/Item.js +74 -0
- package/esm/modules/ai-question/components/QuestionModel/List.d.ts +3 -0
- package/esm/modules/ai-question/components/QuestionModel/List.js +39 -0
- package/esm/modules/ai-question/components/QuestionModel/Skeleton.d.ts +3 -0
- package/esm/modules/ai-question/components/QuestionModel/Skeleton.js +17 -0
- package/esm/modules/ai-question/components/QuestionModel/index.d.ts +3 -0
- package/esm/modules/ai-question/components/QuestionModel/index.js +64 -0
- package/esm/modules/ai-question/components/QuestionModel/interface.d.ts +18 -0
- package/esm/modules/ai-question/components/QuestionModel/interface.js +1 -0
- package/esm/modules/ai-question/components/QuestionModel/styled.d.ts +9 -0
- package/esm/modules/ai-question/components/QuestionModel/styled.js +9 -0
- package/esm/modules/ai-question/components/QuestionPreview/index.d.ts +3 -0
- package/esm/modules/ai-question/components/QuestionPreview/index.js +31 -0
- package/esm/modules/ai-question/components/QuestionPreview/styled.d.ts +23 -0
- package/esm/modules/ai-question/components/QuestionPreview/styled.js +11 -0
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.d.ts +3 -0
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +47 -0
- package/esm/modules/ai-question/components/QuestionTemplate/HistoryPattern.d.ts +3 -0
- package/esm/modules/ai-question/components/QuestionTemplate/HistoryPattern.js +20 -0
- package/esm/modules/ai-question/components/QuestionTemplate/Skeleton.d.ts +3 -0
- package/esm/modules/ai-question/components/QuestionTemplate/Skeleton.js +17 -0
- package/esm/modules/ai-question/components/QuestionTemplate/index.d.ts +3 -0
- package/esm/modules/ai-question/components/QuestionTemplate/index.js +38 -0
- package/esm/modules/ai-question/components/QuestionTemplate/interface.d.ts +43 -0
- package/esm/modules/ai-question/components/QuestionTemplate/interface.js +1 -0
- package/esm/modules/ai-question/components/QuestionTemplate/styled.d.ts +87 -0
- package/esm/modules/ai-question/components/QuestionTemplate/styled.js +33 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Form.d.ts +4 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +91 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.d.ts +3 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +63 -0
- package/esm/modules/ai-question/components/QuestionUpdate/const.d.ts +14 -0
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +53 -0
- package/esm/modules/ai-question/components/QuestionUpdate/index.d.ts +3 -0
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +203 -0
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +57 -0
- package/esm/modules/ai-question/components/QuestionUpdate/interface.js +1 -0
- package/esm/modules/ai-question/index.d.ts +4 -0
- package/esm/modules/ai-question/index.js +22 -0
- package/esm/modules/ai-question/interface.d.ts +74 -0
- package/esm/modules/ai-question/interface.js +1 -0
- package/esm/modules/ai-question/useAiQuestion.d.ts +15 -0
- package/esm/modules/ai-question/useAiQuestion.js +18 -0
- package/esm/modules/ai-report/Root.d.ts +4 -0
- package/esm/modules/ai-report/Root.js +73 -0
- package/esm/modules/ai-report/components/NotFinish/index.d.ts +3 -0
- package/esm/modules/ai-report/components/NotFinish/index.js +25 -0
- package/esm/modules/ai-report/components/RankingRange/Item.d.ts +4 -0
- package/esm/modules/ai-report/components/RankingRange/Item.js +30 -0
- package/esm/modules/ai-report/components/RankingRange/index.d.ts +4 -0
- package/esm/modules/ai-report/components/RankingRange/index.js +171 -0
- package/esm/modules/ai-report/components/RankingRange/interface.d.ts +26 -0
- package/esm/modules/ai-report/components/RankingRange/interface.js +1 -0
- package/esm/modules/ai-report/components/RankingRange/styled.d.ts +7 -0
- package/esm/modules/ai-report/components/RankingRange/styled.js +11 -0
- package/esm/modules/ai-report/components/ScoreReport/Bar.d.ts +3 -0
- package/esm/modules/ai-report/components/ScoreReport/Bar.js +44 -0
- package/esm/modules/ai-report/components/ScoreReport/Failed.d.ts +4 -0
- package/esm/modules/ai-report/components/ScoreReport/Failed.js +25 -0
- package/esm/modules/ai-report/components/ScoreReport/Report.d.ts +3 -0
- package/esm/modules/ai-report/components/ScoreReport/Report.js +45 -0
- package/esm/modules/ai-report/components/ScoreReport/RosePie.d.ts +4 -0
- package/esm/modules/ai-report/components/ScoreReport/RosePie.js +19 -0
- package/esm/modules/ai-report/components/ScoreReport/Score.d.ts +4 -0
- package/esm/modules/ai-report/components/ScoreReport/Score.js +34 -0
- package/esm/modules/ai-report/components/ScoreReport/ScoreBigBall.d.ts +4 -0
- package/esm/modules/ai-report/components/ScoreReport/ScoreBigBall.js +26 -0
- package/esm/modules/ai-report/components/ScoreReport/ScoreLegend.d.ts +4 -0
- package/esm/modules/ai-report/components/ScoreReport/ScoreLegend.js +33 -0
- package/esm/modules/ai-report/components/ScoreReport/const.d.ts +34 -0
- package/esm/modules/ai-report/components/ScoreReport/const.js +77 -0
- package/esm/modules/ai-report/components/ScoreReport/index.d.ts +4 -0
- package/esm/modules/ai-report/components/ScoreReport/index.js +41 -0
- package/esm/modules/ai-report/components/ScoreReport/interface.d.ts +20 -0
- package/esm/modules/ai-report/components/ScoreReport/interface.js +1 -0
- package/esm/modules/ai-report/components/ScoreReport/styled.d.ts +25 -0
- package/esm/modules/ai-report/components/ScoreReport/styled.js +36 -0
- package/esm/modules/ai-report/components/VideoQuestion/Abilities.d.ts +4 -0
- package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +40 -0
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.d.ts +4 -0
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +89 -0
- package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.d.ts +4 -0
- package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.js +34 -0
- package/esm/modules/ai-report/components/VideoQuestion/index.d.ts +3 -0
- package/esm/modules/ai-report/components/VideoQuestion/index.js +21 -0
- package/esm/modules/ai-report/components/VideoQuestion/interface.d.ts +14 -0
- package/esm/modules/ai-report/components/VideoQuestion/interface.js +1 -0
- package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +71 -0
- package/esm/modules/ai-report/components/VideoQuestion/styled.js +90 -0
- package/esm/modules/ai-report/index.d.ts +4 -0
- package/esm/modules/ai-report/index.js +22 -0
- package/esm/modules/ai-report/interface.d.ts +114 -0
- package/esm/modules/ai-report/interface.js +1 -0
- package/esm/modules/ai-report/useAiReport.d.ts +20 -0
- package/esm/modules/ai-report/useAiReport.js +16 -0
- package/esm/services/ai-question.d.ts +13 -0
- package/esm/services/ai-question.js +17 -0
- package/esm/services/ai-report.d.ts +2 -0
- package/esm/services/ai-report.js +5 -0
- package/esm/store/ai-question/ai-analysis-store.d.ts +29 -0
- package/esm/store/ai-question/ai-analysis-store.js +132 -0
- package/esm/store/ai-question/boot-video-store.d.ts +17 -0
- package/esm/store/ai-question/boot-video-store.js +21 -0
- package/esm/store/ai-question/global-store.d.ts +32 -0
- package/esm/store/ai-question/global-store.js +23 -0
- package/esm/store/ai-question/question-model-store.d.ts +24 -0
- package/esm/store/ai-question/question-model-store.js +130 -0
- package/esm/store/ai-question/question-preview-store.d.ts +14 -0
- package/esm/store/ai-question/question-preview-store.js +21 -0
- package/esm/store/ai-question/question-template-store.d.ts +12 -0
- package/esm/store/ai-question/question-template-store.js +10 -0
- package/esm/store/ai-question/question-update-store.d.ts +11 -0
- package/esm/store/ai-question/question-update-store.js +33 -0
- package/esm/store/ai-report/global-store.d.ts +57 -0
- package/esm/store/ai-report/global-store.js +28 -0
- package/esm/utils/config.d.ts +11 -0
- package/esm/utils/config.js +17 -0
- package/esm/utils/interceptor.d.ts +2 -0
- package/esm/utils/interceptor.js +119 -0
- package/esm/utils/request.d.ts +3 -0
- package/esm/utils/request.js +14 -0
- package/esm/utils/utils.d.ts +58 -0
- package/esm/utils/utils.js +115 -0
- package/lib/assets/icons/free.svg +1 -0
- package/lib/assets/icons/video.svg +1 -0
- package/lib/components/BigBallSvg/index.d.ts +3 -0
- package/lib/components/BigBallSvg/index.js +22 -0
- package/lib/components/BigBallSvg/index.module.css +37 -0
- package/lib/components/Charts/Chart.d.ts +4 -0
- package/lib/components/Charts/Chart.js +43 -0
- package/lib/components/Charts/const.d.ts +382 -0
- package/lib/components/Charts/const.js +385 -0
- package/lib/components/Charts/interface.d.ts +3 -0
- package/lib/components/Charts/interface.js +2 -0
- package/lib/components/ScrollDialogContent/index.d.ts +5 -0
- package/lib/components/ScrollDialogContent/index.js +8 -0
- package/lib/components/SvgIcon/index.d.ts +4 -0
- package/lib/components/SvgIcon/index.js +33 -0
- package/lib/components/SvgIcon/interface.d.ts +3 -0
- package/lib/components/SvgIcon/interface.js +2 -0
- package/lib/components/VideoPreview/index.d.ts +4 -0
- package/lib/components/VideoPreview/index.js +22 -0
- package/lib/components/VideoPreview/interface.d.ts +15 -0
- package/lib/components/VideoPreview/interface.js +2 -0
- package/lib/components/VideoPreview/styled.d.ts +10 -0
- package/lib/components/VideoPreview/styled.js +27 -0
- package/lib/constants/ai-question.d.ts +27 -0
- package/lib/constants/ai-question.js +43 -0
- package/lib/constants/ai-report.d.ts +2 -0
- package/lib/constants/ai-report.js +15 -0
- package/lib/enum/ai-question.d.ts +38 -0
- package/lib/enum/ai-question.js +45 -0
- package/lib/enum/ai-report.d.ts +27 -0
- package/lib/enum/ai-report.js +33 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +18 -0
- package/lib/modules/ai-question/Root.d.ts +4 -0
- package/lib/modules/ai-question/Root.js +146 -0
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +4 -0
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +44 -0
- package/lib/modules/ai-question/components/AiAnalysis/MainPoints.d.ts +4 -0
- package/lib/modules/ai-question/components/AiAnalysis/MainPoints.js +59 -0
- package/lib/modules/ai-question/components/AiAnalysis/MainPointsItem.d.ts +4 -0
- package/lib/modules/ai-question/components/AiAnalysis/MainPointsItem.js +64 -0
- package/lib/modules/ai-question/components/AiAnalysis/const.d.ts +5 -0
- package/lib/modules/ai-question/components/AiAnalysis/const.js +14 -0
- package/lib/modules/ai-question/components/AiAnalysis/index.d.ts +3 -0
- package/lib/modules/ai-question/components/AiAnalysis/index.js +40 -0
- package/lib/modules/ai-question/components/AiAnalysis/interface.d.ts +23 -0
- package/lib/modules/ai-question/components/AiAnalysis/interface.js +2 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +19 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +26 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +4 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +119 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +27 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.js +2 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +39 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/styled.js +26 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/utils.d.ts +9 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/utils.js +33 -0
- package/lib/modules/ai-question/components/BaseAccordion/const.d.ts +1 -0
- package/lib/modules/ai-question/components/BaseAccordion/const.js +4 -0
- package/lib/modules/ai-question/components/BaseAccordion/index.d.ts +4 -0
- package/lib/modules/ai-question/components/BaseAccordion/index.js +100 -0
- package/lib/modules/ai-question/components/BaseAccordion/interface.d.ts +9 -0
- package/lib/modules/ai-question/components/BaseAccordion/interface.js +2 -0
- package/lib/modules/ai-question/components/BaseAccordion/styled.d.ts +10 -0
- package/lib/modules/ai-question/components/BaseAccordion/styled.js +76 -0
- package/lib/modules/ai-question/components/BootVideo/index.d.ts +4 -0
- package/lib/modules/ai-question/components/BootVideo/index.js +105 -0
- package/lib/modules/ai-question/components/BootVideo/interface.d.ts +8 -0
- package/lib/modules/ai-question/components/BootVideo/interface.js +2 -0
- package/lib/modules/ai-question/components/BootVideo/styled.d.ts +33 -0
- package/lib/modules/ai-question/components/BootVideo/styled.js +55 -0
- package/lib/modules/ai-question/components/QuestionModel/Header.d.ts +3 -0
- package/lib/modules/ai-question/components/QuestionModel/Header.js +28 -0
- package/lib/modules/ai-question/components/QuestionModel/Item.d.ts +4 -0
- package/lib/modules/ai-question/components/QuestionModel/Item.js +76 -0
- package/lib/modules/ai-question/components/QuestionModel/List.d.ts +3 -0
- package/lib/modules/ai-question/components/QuestionModel/List.js +44 -0
- package/lib/modules/ai-question/components/QuestionModel/Skeleton.d.ts +3 -0
- package/lib/modules/ai-question/components/QuestionModel/Skeleton.js +19 -0
- package/lib/modules/ai-question/components/QuestionModel/index.d.ts +3 -0
- package/lib/modules/ai-question/components/QuestionModel/index.js +69 -0
- package/lib/modules/ai-question/components/QuestionModel/interface.d.ts +18 -0
- package/lib/modules/ai-question/components/QuestionModel/interface.js +2 -0
- package/lib/modules/ai-question/components/QuestionModel/styled.d.ts +9 -0
- package/lib/modules/ai-question/components/QuestionModel/styled.js +15 -0
- package/lib/modules/ai-question/components/QuestionPreview/index.d.ts +3 -0
- package/lib/modules/ai-question/components/QuestionPreview/index.js +36 -0
- package/lib/modules/ai-question/components/QuestionPreview/styled.d.ts +23 -0
- package/lib/modules/ai-question/components/QuestionPreview/styled.js +17 -0
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.d.ts +3 -0
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +52 -0
- package/lib/modules/ai-question/components/QuestionTemplate/HistoryPattern.d.ts +3 -0
- package/lib/modules/ai-question/components/QuestionTemplate/HistoryPattern.js +25 -0
- package/lib/modules/ai-question/components/QuestionTemplate/Skeleton.d.ts +3 -0
- package/lib/modules/ai-question/components/QuestionTemplate/Skeleton.js +19 -0
- package/lib/modules/ai-question/components/QuestionTemplate/index.d.ts +3 -0
- package/lib/modules/ai-question/components/QuestionTemplate/index.js +43 -0
- package/lib/modules/ai-question/components/QuestionTemplate/interface.d.ts +43 -0
- package/lib/modules/ai-question/components/QuestionTemplate/interface.js +2 -0
- package/lib/modules/ai-question/components/QuestionTemplate/styled.d.ts +87 -0
- package/lib/modules/ai-question/components/QuestionTemplate/styled.js +39 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Form.d.ts +4 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +96 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.d.ts +3 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +65 -0
- package/lib/modules/ai-question/components/QuestionUpdate/const.d.ts +14 -0
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +56 -0
- package/lib/modules/ai-question/components/QuestionUpdate/index.d.ts +3 -0
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +208 -0
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +57 -0
- package/lib/modules/ai-question/components/QuestionUpdate/interface.js +2 -0
- package/lib/modules/ai-question/index.d.ts +4 -0
- package/lib/modules/ai-question/index.js +27 -0
- package/lib/modules/ai-question/interface.d.ts +74 -0
- package/lib/modules/ai-question/interface.js +2 -0
- package/lib/modules/ai-question/useAiQuestion.d.ts +15 -0
- package/lib/modules/ai-question/useAiQuestion.js +22 -0
- package/lib/modules/ai-report/Root.d.ts +4 -0
- package/lib/modules/ai-report/Root.js +78 -0
- package/lib/modules/ai-report/components/NotFinish/index.d.ts +3 -0
- package/lib/modules/ai-report/components/NotFinish/index.js +27 -0
- package/lib/modules/ai-report/components/RankingRange/Item.d.ts +4 -0
- package/lib/modules/ai-report/components/RankingRange/Item.js +32 -0
- package/lib/modules/ai-report/components/RankingRange/index.d.ts +4 -0
- package/lib/modules/ai-report/components/RankingRange/index.js +176 -0
- package/lib/modules/ai-report/components/RankingRange/interface.d.ts +26 -0
- package/lib/modules/ai-report/components/RankingRange/interface.js +2 -0
- package/lib/modules/ai-report/components/RankingRange/styled.d.ts +7 -0
- package/lib/modules/ai-report/components/RankingRange/styled.js +14 -0
- package/lib/modules/ai-report/components/ScoreReport/Bar.d.ts +3 -0
- package/lib/modules/ai-report/components/ScoreReport/Bar.js +46 -0
- package/lib/modules/ai-report/components/ScoreReport/Failed.d.ts +4 -0
- package/lib/modules/ai-report/components/ScoreReport/Failed.js +27 -0
- package/lib/modules/ai-report/components/ScoreReport/Report.d.ts +3 -0
- package/lib/modules/ai-report/components/ScoreReport/Report.js +50 -0
- package/lib/modules/ai-report/components/ScoreReport/RosePie.d.ts +4 -0
- package/lib/modules/ai-report/components/ScoreReport/RosePie.js +24 -0
- package/lib/modules/ai-report/components/ScoreReport/Score.d.ts +4 -0
- package/lib/modules/ai-report/components/ScoreReport/Score.js +39 -0
- package/lib/modules/ai-report/components/ScoreReport/ScoreBigBall.d.ts +4 -0
- package/lib/modules/ai-report/components/ScoreReport/ScoreBigBall.js +31 -0
- package/lib/modules/ai-report/components/ScoreReport/ScoreLegend.d.ts +4 -0
- package/lib/modules/ai-report/components/ScoreReport/ScoreLegend.js +35 -0
- package/lib/modules/ai-report/components/ScoreReport/const.d.ts +34 -0
- package/lib/modules/ai-report/components/ScoreReport/const.js +80 -0
- package/lib/modules/ai-report/components/ScoreReport/index.d.ts +4 -0
- package/lib/modules/ai-report/components/ScoreReport/index.js +46 -0
- package/lib/modules/ai-report/components/ScoreReport/interface.d.ts +20 -0
- package/lib/modules/ai-report/components/ScoreReport/interface.js +2 -0
- package/lib/modules/ai-report/components/ScoreReport/styled.d.ts +25 -0
- package/lib/modules/ai-report/components/ScoreReport/styled.js +39 -0
- package/lib/modules/ai-report/components/VideoQuestion/Abilities.d.ts +4 -0
- package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +45 -0
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.d.ts +4 -0
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +94 -0
- package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.d.ts +4 -0
- package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.js +36 -0
- package/lib/modules/ai-report/components/VideoQuestion/index.d.ts +3 -0
- package/lib/modules/ai-report/components/VideoQuestion/index.js +26 -0
- package/lib/modules/ai-report/components/VideoQuestion/interface.d.ts +14 -0
- package/lib/modules/ai-report/components/VideoQuestion/interface.js +2 -0
- package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +71 -0
- package/lib/modules/ai-report/components/VideoQuestion/styled.js +93 -0
- package/lib/modules/ai-report/index.d.ts +4 -0
- package/lib/modules/ai-report/index.js +27 -0
- package/lib/modules/ai-report/interface.d.ts +114 -0
- package/lib/modules/ai-report/interface.js +2 -0
- package/lib/modules/ai-report/useAiReport.d.ts +20 -0
- package/lib/modules/ai-report/useAiReport.js +20 -0
- package/lib/services/ai-question.d.ts +13 -0
- package/lib/services/ai-question.js +28 -0
- package/lib/services/ai-report.d.ts +2 -0
- package/lib/services/ai-report.js +10 -0
- package/lib/store/ai-question/ai-analysis-store.d.ts +29 -0
- package/lib/store/ai-question/ai-analysis-store.js +138 -0
- package/lib/store/ai-question/boot-video-store.d.ts +17 -0
- package/lib/store/ai-question/boot-video-store.js +24 -0
- package/lib/store/ai-question/global-store.d.ts +32 -0
- package/lib/store/ai-question/global-store.js +26 -0
- package/lib/store/ai-question/question-model-store.d.ts +24 -0
- package/lib/store/ai-question/question-model-store.js +136 -0
- package/lib/store/ai-question/question-preview-store.d.ts +14 -0
- package/lib/store/ai-question/question-preview-store.js +24 -0
- package/lib/store/ai-question/question-template-store.d.ts +12 -0
- package/lib/store/ai-question/question-template-store.js +13 -0
- package/lib/store/ai-question/question-update-store.d.ts +11 -0
- package/lib/store/ai-question/question-update-store.js +36 -0
- package/lib/store/ai-report/global-store.d.ts +57 -0
- package/lib/store/ai-report/global-store.js +31 -0
- package/lib/utils/config.d.ts +11 -0
- package/lib/utils/config.js +20 -0
- package/lib/utils/interceptor.d.ts +2 -0
- package/lib/utils/interceptor.js +124 -0
- package/lib/utils/request.d.ts +3 -0
- package/lib/utils/request.js +22 -0
- package/lib/utils/utils.d.ts +58 -0
- package/lib/utils/utils.js +129 -0
- package/package.json +153 -0
|
@@ -0,0 +1,114 @@
|
|
|
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 { useEffect, useCallback, useState } from 'react';
|
|
14
|
+
import { Dialog, Loading, Typography, RadioGroup, Radio, Checkbox } from 'fbm-ui';
|
|
15
|
+
import { Box, FormControl, FormLabel, List, ListItemIcon, ListItemText } from '@mui/material';
|
|
16
|
+
import { useRequest, useSetState } from 'ahooks';
|
|
17
|
+
import { groupCategory } from './utils';
|
|
18
|
+
import { CATEGORY_TYPE, LANGUAGE_TYPE } from "../../../../enum/ai-question";
|
|
19
|
+
import { PostAiAbilities } from "../../../../services/ai-question";
|
|
20
|
+
import { useAiAnalysisStore } from "../../../../store/ai-question/ai-analysis-store";
|
|
21
|
+
import ScrollDialogContent from "../../../../components/ScrollDialogContent";
|
|
22
|
+
import { CATEGORY_NAME, SERVER_LANGUAGE_TYPE } from './const';
|
|
23
|
+
import { ListItemButtonRoot } from './styled';
|
|
24
|
+
var MANDARIN = LANGUAGE_TYPE.MANDARIN, CANTONESE = LANGUAGE_TYPE.CANTONESE;
|
|
25
|
+
var AiAssessmentCriteria = function (props) {
|
|
26
|
+
var open = props.open, onClose = props.onClose;
|
|
27
|
+
var _a = useAiAnalysisStore(function (store) { return [store.aiAbilities, store.analysisState]; }), aiAbilities = _a.aiAbilities, analysisState = _a.analysisState, updateState = _a.updateState, updateAiAbilities = _a.updateAiAbilities;
|
|
28
|
+
var _b = useState([]), groupData = _b[0], setGroupData = _b[1];
|
|
29
|
+
var _c = useState(1), language = _c[0], setLanguage = _c[1];
|
|
30
|
+
var _d = useState(false), checkedChinese = _d[0], setCheckedChinese = _d[1];
|
|
31
|
+
var _e = useState([]), relatedAbilities = _e[0], setRelatedAbilities = _e[1];
|
|
32
|
+
var _f = useSetState({}), checkAbilities = _f[0], setCheckAbilities = _f[1];
|
|
33
|
+
var loading = useRequest(PostAiAbilities, {
|
|
34
|
+
manual: false,
|
|
35
|
+
onSuccess: function (_a) {
|
|
36
|
+
var data = _a.data;
|
|
37
|
+
var ret = groupCategory(data.list, 'category', CATEGORY_NAME);
|
|
38
|
+
var _b = ret[0].list.find(function (_a) {
|
|
39
|
+
var type = _a.type;
|
|
40
|
+
return SERVER_LANGUAGE_TYPE[type] === (analysisState.language || language);
|
|
41
|
+
}) || {}, type = _b.type, relatedAbilities = _b.relatedAbilities;
|
|
42
|
+
setRelatedAbilities(relatedAbilities);
|
|
43
|
+
setLanguage(type || language);
|
|
44
|
+
setCheckedChinese([MANDARIN, CANTONESE].includes(type || language));
|
|
45
|
+
setGroupData(ret);
|
|
46
|
+
},
|
|
47
|
+
}).loading;
|
|
48
|
+
var onLanguageChange = function (_a, list) {
|
|
49
|
+
var value = _a.target.value;
|
|
50
|
+
var language = Number(value === '0' ? MANDARIN : value);
|
|
51
|
+
var item = list.find(function (_a) {
|
|
52
|
+
var type = _a.type;
|
|
53
|
+
return type === language;
|
|
54
|
+
});
|
|
55
|
+
Object.keys(checkAbilities).forEach(function (key) {
|
|
56
|
+
var _a;
|
|
57
|
+
if (!(item === null || item === void 0 ? void 0 : item.relatedAbilities.includes(Number(key)))) {
|
|
58
|
+
setCheckAbilities((_a = {}, _a[key] = undefined, _a));
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
setLanguage(language);
|
|
62
|
+
setCheckedChinese([MANDARIN, CANTONESE].includes(language));
|
|
63
|
+
setRelatedAbilities(item === null || item === void 0 ? void 0 : item.relatedAbilities);
|
|
64
|
+
};
|
|
65
|
+
var handleOk = useCallback(function () {
|
|
66
|
+
updateAiAbilities(Object.values(checkAbilities)
|
|
67
|
+
.filter(function (item) { return item; })
|
|
68
|
+
.sort(function (a, b) { return ((a === null || a === void 0 ? void 0 : a.sort) && (b === null || b === void 0 ? void 0 : b.sort) ? (a === null || a === void 0 ? void 0 : a.sort) - (b === null || b === void 0 ? void 0 : b.sort) : 0); }));
|
|
69
|
+
updateState({ language: SERVER_LANGUAGE_TYPE[language], aiSwitch: 1 });
|
|
70
|
+
onClose();
|
|
71
|
+
}, [checkAbilities, language, onClose, updateAiAbilities, updateState]);
|
|
72
|
+
useEffect(function () {
|
|
73
|
+
aiAbilities.forEach(function (item) {
|
|
74
|
+
var _a;
|
|
75
|
+
return setCheckAbilities((_a = {}, _a[item.type] = item, _a));
|
|
76
|
+
});
|
|
77
|
+
}, [aiAbilities, setCheckAbilities]);
|
|
78
|
+
return (_jsx(Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u6807\u51C6", size: "sm", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: loading ? (_jsx(Box, __assign({ height: 400 }, { children: _jsx(Loading, { size: 40 }) }))) : (groupData.map(function (_a) {
|
|
79
|
+
var name = _a.name, type = _a.type, list = _a.list;
|
|
80
|
+
return (_jsxs(Box, { children: [(list.filter(function (_a) {
|
|
81
|
+
var type = _a.type;
|
|
82
|
+
return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
|
|
83
|
+
}).length > 0 || type === CATEGORY_TYPE.LANGUAGE) && (_jsx(FormControl, { children: _jsxs(FormLabel, __assign({ component: "legend", style: { fontSize: 14, color: 'rgba(0,0,0,0.86)' } }, { children: [name, type === CATEGORY_TYPE.LANGUAGE && (_jsx(Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })), type === CATEGORY_TYPE.LANGUAGE ? (_jsxs(RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [_jsx(Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), _jsx(RadioGroup, __assign({ value: language, sx: { ml: 2 }, onChange: function (e) { return onLanguageChange(e, list); } }, { children: list
|
|
84
|
+
.filter(function (_a) {
|
|
85
|
+
var type = _a.type;
|
|
86
|
+
return [MANDARIN, CANTONESE].includes(type);
|
|
87
|
+
})
|
|
88
|
+
.map(function (_a) {
|
|
89
|
+
var name = _a.name, type = _a.type, token = _a.token;
|
|
90
|
+
return checkedChinese && _jsx(Radio, { value: type, label: name }, token);
|
|
91
|
+
}) })), list
|
|
92
|
+
.filter(function (_a) {
|
|
93
|
+
var type = _a.type;
|
|
94
|
+
return ![MANDARIN, CANTONESE].includes(type);
|
|
95
|
+
})
|
|
96
|
+
.map(function (_a) {
|
|
97
|
+
var name = _a.name, type = _a.type, token = _a.token;
|
|
98
|
+
return (_jsx(Radio, { value: type, label: name }, token));
|
|
99
|
+
})] }))) : (_jsx(List, __assign({ sx: { padding: 0 } }, { children: list.map(function (item) {
|
|
100
|
+
var name = item.name, desc = item.desc, type = item.type, token = item.token;
|
|
101
|
+
if (relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type)) {
|
|
102
|
+
return (_jsxs(ListItemButtonRoot, __assign({ onClick: function () {
|
|
103
|
+
var _a;
|
|
104
|
+
return setCheckAbilities((_a = {}, _a[type] = checkAbilities[type] ? undefined : item, _a));
|
|
105
|
+
} }, { children: [_jsx(ListItemIcon, { children: _jsx(Checkbox, { CheckboxProps: { sx: { mr: 0 } }, checked: !!checkAbilities[type], onChange: function (e, checked) {
|
|
106
|
+
var _a;
|
|
107
|
+
return setCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
|
|
108
|
+
} }) }), _jsx(ListItemText, { primary: name, secondary: desc })] }), token));
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}) })))] }, "".concat(name, "-").concat(type)));
|
|
112
|
+
})) }) })));
|
|
113
|
+
};
|
|
114
|
+
export default AiAssessmentCriteria;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseAiAbilityParams } from '@/modules/ai-question/interface';
|
|
2
|
+
export interface Mapping {
|
|
3
|
+
[field: string | number]: string;
|
|
4
|
+
}
|
|
5
|
+
export interface AiAbilityItem extends BaseAiAbilityParams {
|
|
6
|
+
isDefault?: boolean;
|
|
7
|
+
desc?: string;
|
|
8
|
+
groupId?: number;
|
|
9
|
+
groupName?: string;
|
|
10
|
+
isNotCompute?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare type GroupCategoryRet = Array<{
|
|
13
|
+
name: string;
|
|
14
|
+
type: number;
|
|
15
|
+
list: AiAbilityItem[];
|
|
16
|
+
}>;
|
|
17
|
+
export interface AiAbilityData {
|
|
18
|
+
total: number;
|
|
19
|
+
list: AiAbilityItem[];
|
|
20
|
+
}
|
|
21
|
+
export interface AiAbilityRes {
|
|
22
|
+
data: AiAbilityData;
|
|
23
|
+
}
|
|
24
|
+
export interface AiAssessmentCriteriaProps {
|
|
25
|
+
open: boolean;
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ListItemButtonRoot: import("@mui/styles/styled").StyledComponent<Omit<import("@mui/material").ListItemButtonBaseProps & Omit<{
|
|
3
|
+
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
4
|
+
centerRipple?: boolean | undefined;
|
|
5
|
+
children?: import("react").ReactNode;
|
|
6
|
+
classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
disableRipple?: boolean | undefined;
|
|
9
|
+
disableTouchRipple?: boolean | undefined;
|
|
10
|
+
focusRipple?: boolean | undefined;
|
|
11
|
+
focusVisibleClassName?: string | undefined;
|
|
12
|
+
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
13
|
+
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
14
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
|
|
15
|
+
tabIndex?: number | undefined;
|
|
16
|
+
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
17
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
18
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
19
|
+
}, "children" | "className" | "style" | "tabIndex" | "classes" | "alignItems" | "sx" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "autoFocus" | "selected" | "dense" | "disableGutters" | "divider">, "className" | "classes"> & import("@mui/styles/withStyles").StyledComponentProps<"root"> & Omit<Pick<import("@mui/material").ListItemButtonBaseProps & Omit<{
|
|
20
|
+
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
21
|
+
centerRipple?: boolean | undefined;
|
|
22
|
+
children?: import("react").ReactNode;
|
|
23
|
+
classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
|
|
24
|
+
disabled?: boolean | undefined;
|
|
25
|
+
disableRipple?: boolean | undefined;
|
|
26
|
+
disableTouchRipple?: boolean | undefined;
|
|
27
|
+
focusRipple?: boolean | undefined;
|
|
28
|
+
focusVisibleClassName?: string | undefined;
|
|
29
|
+
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
30
|
+
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
31
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
|
|
32
|
+
tabIndex?: number | undefined;
|
|
33
|
+
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
34
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
35
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
36
|
+
}, "children" | "className" | "style" | "tabIndex" | "classes" | "alignItems" | "sx" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "autoFocus" | "selected" | "dense" | "disableGutters" | "divider">, "onLoad" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "classes" | "alignItems" | "sx" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "autoFocus" | "selected" | "dense" | "disableGutters" | "divider">, "className" | "theme"> & {
|
|
37
|
+
className?: string | undefined;
|
|
38
|
+
theme?: import("@mui/private-theming").DefaultTheme | undefined;
|
|
39
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ListItemButton } from '@mui/material';
|
|
2
|
+
import styled from '@mui/styles/styled';
|
|
3
|
+
export var ListItemButtonRoot = styled(ListItemButton)({
|
|
4
|
+
padding: '4px 0 4px 8px',
|
|
5
|
+
'& .MuiFormControlLabel-root': {
|
|
6
|
+
marginRight: 0,
|
|
7
|
+
},
|
|
8
|
+
'& .MuiCheckbox-root': {
|
|
9
|
+
padding: 0,
|
|
10
|
+
},
|
|
11
|
+
'& .MuiListItemText-primary': {
|
|
12
|
+
fontSize: 14,
|
|
13
|
+
},
|
|
14
|
+
'& .MuiListItemText-secondary': {
|
|
15
|
+
fontSize: 12,
|
|
16
|
+
},
|
|
17
|
+
'& .MuiListItemIcon-root': {
|
|
18
|
+
minWidth: 36,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Mapping, AiAbilityItem, GroupCategoryRet } from './interface';
|
|
2
|
+
/**
|
|
3
|
+
* 根据field对AI考核标准数据进行分组
|
|
4
|
+
* @param list 源数组
|
|
5
|
+
* @param field 分组字段
|
|
6
|
+
* @param mapping 映射关系
|
|
7
|
+
* @returns 分组后的新数组
|
|
8
|
+
*/
|
|
9
|
+
export declare const groupCategory: (list: AiAbilityItem[], field: string, mapping: Mapping) => GroupCategoryRet;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* 根据field对AI考核标准数据进行分组
|
|
12
|
+
* @param list 源数组
|
|
13
|
+
* @param field 分组字段
|
|
14
|
+
* @param mapping 映射关系
|
|
15
|
+
* @returns 分组后的新数组
|
|
16
|
+
*/
|
|
17
|
+
export var groupCategory = function (list, field, mapping) {
|
|
18
|
+
var map = new Map();
|
|
19
|
+
list.forEach(function (item, index, arr) {
|
|
20
|
+
if (!map.has(item[field])) {
|
|
21
|
+
map.set(item[field], arr.filter(function (a) { return a[field] === item[field]; }));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return Array.from(map).map(function (item) { return ({
|
|
25
|
+
name: mapping[item[0]],
|
|
26
|
+
type: item[0],
|
|
27
|
+
list: __spreadArray([], item[1], true),
|
|
28
|
+
}); });
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MAX_DISPLAY_SIZE = 5;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var MAX_DISPLAY_SIZE = 5;
|
|
@@ -0,0 +1,98 @@
|
|
|
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 { useCallback, useEffect, useState, useRef, memo } from 'react';
|
|
14
|
+
import { Box, Button, confirm } from 'fbm-ui';
|
|
15
|
+
import { List, ListItem, ListItemText, Accordion, AccordionSummary, AccordionDetails } from '@mui/material';
|
|
16
|
+
import { useHover, useDebounceFn } from 'ahooks';
|
|
17
|
+
import { ExpandMore, Done } from '@mui/icons-material';
|
|
18
|
+
import { useQuestionPreviewStore } from "../../../../store/ai-question/question-preview-store";
|
|
19
|
+
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
20
|
+
import { IS_AI_ANALYSIS } from "../../../../constants/ai-question";
|
|
21
|
+
import { uniqueId } from "../../../../utils/utils";
|
|
22
|
+
import { LANGUAGE_TYPE } from "../../../../enum/ai-question";
|
|
23
|
+
import { defaultQuestionParams } from '../QuestionUpdate/const';
|
|
24
|
+
import { MAX_DISPLAY_SIZE } from './const';
|
|
25
|
+
import { AccordionRoot, AccordionTitle, AccordionSubTitle } from './styled';
|
|
26
|
+
var LANGUAGE_TYPE_LIST = [LANGUAGE_TYPE.MANDARIN, LANGUAGE_TYPE.CANTONESE, LANGUAGE_TYPE.JAPANESE, LANGUAGE_TYPE.ENGLISH];
|
|
27
|
+
var BaseAccordion = function (props) {
|
|
28
|
+
var name = props.name, positionName = props.positionName, list = props.list, index = props.index, isShowOnlyAITest = props.isShowOnlyAITest, _a = props.isShowDesc, isShowDesc = _a === void 0 ? false : _a, _b = props.isShowSummaryAction, isShowSummaryAction = _b === void 0 ? false : _b, _c = props.isShowConfirm, isShowConfirm = _c === void 0 ? false : _c, _d = props.isShowPreview, isShowPreview = _d === void 0 ? true : _d;
|
|
29
|
+
var ref = useRef(null);
|
|
30
|
+
var isHovering = useHover(ref);
|
|
31
|
+
var updatePreview = useQuestionPreviewStore().updatePreview;
|
|
32
|
+
var _e = useQuestionModelStore(), questionModelData = _e.questionModelData, addModel = _e.addModel;
|
|
33
|
+
var _f = useState(false), isPaging = _f[0], setIsPaging = _f[1];
|
|
34
|
+
var _g = useState([]), questionsList = _g[0], setQuestionsList = _g[1];
|
|
35
|
+
var _h = useState(), hoverItem = _h[0], setHoverItem = _h[1];
|
|
36
|
+
var handlePreview = useDebounceFn(function () {
|
|
37
|
+
isShowPreview && updatePreview(isHovering, isHovering ? hoverItem : undefined);
|
|
38
|
+
}, {
|
|
39
|
+
wait: 300,
|
|
40
|
+
}).run;
|
|
41
|
+
var handleShowAll = useCallback(function () {
|
|
42
|
+
var filterList = list.filter(function (item) { return !isShowOnlyAITest || IS_AI_ANALYSIS(item); });
|
|
43
|
+
setIsPaging(false);
|
|
44
|
+
setQuestionsList(filterList);
|
|
45
|
+
}, [list, isShowOnlyAITest]);
|
|
46
|
+
var getQuestionStep = function (item) { return (__assign(__assign(__assign({}, defaultQuestionParams), item), { aiAbilities: item.aiAbilities.filter(function (_a) {
|
|
47
|
+
var type = _a.type;
|
|
48
|
+
return !LANGUAGE_TYPE_LIST.includes(type);
|
|
49
|
+
}), uniqueId: uniqueId(), originToken: item.token })); };
|
|
50
|
+
var handleUseQuestion = useCallback(function (item) {
|
|
51
|
+
addModel(getQuestionStep(item));
|
|
52
|
+
}, [addModel]);
|
|
53
|
+
var handleUseAllQuestion = useCallback(function (e) {
|
|
54
|
+
e.stopPropagation();
|
|
55
|
+
var confirmUseAllQuestion = function () {
|
|
56
|
+
addModel(list.map(function (item) { return getQuestionStep(item); }));
|
|
57
|
+
};
|
|
58
|
+
if (isShowConfirm) {
|
|
59
|
+
confirm({
|
|
60
|
+
title: '确认添加?',
|
|
61
|
+
content: '确认后,该套题中的所有题目都将添加到面试内容里。',
|
|
62
|
+
isShowClose: false,
|
|
63
|
+
onOk: function (_a) {
|
|
64
|
+
var onClose = _a.onClose;
|
|
65
|
+
confirmUseAllQuestion();
|
|
66
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
confirmUseAllQuestion();
|
|
72
|
+
}
|
|
73
|
+
}, [addModel, isShowConfirm, list]);
|
|
74
|
+
var handleMouseOver = useCallback(function (item) { return setHoverItem(item); }, [setHoverItem]);
|
|
75
|
+
useEffect(function () {
|
|
76
|
+
isHovering ? handlePreview() : isShowPreview && updatePreview(isHovering);
|
|
77
|
+
}, [handlePreview, hoverItem, isHovering, isShowPreview, updatePreview]);
|
|
78
|
+
useEffect(function () {
|
|
79
|
+
var filterList = list.filter(function (item) { return !isShowOnlyAITest || IS_AI_ANALYSIS(item); });
|
|
80
|
+
if (filterList.length > MAX_DISPLAY_SIZE) {
|
|
81
|
+
setIsPaging(true);
|
|
82
|
+
setQuestionsList(filterList.slice(0, MAX_DISPLAY_SIZE));
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
setIsPaging(false);
|
|
86
|
+
setQuestionsList(filterList);
|
|
87
|
+
}
|
|
88
|
+
}, [list, isShowOnlyAITest]);
|
|
89
|
+
return (_jsx(_Fragment, { children: questionsList.length > 0 && (_jsx(AccordionRoot, { children: _jsxs(Accordion, __assign({ defaultExpanded: index === 0 }, { children: [_jsx(AccordionSummary, __assign({ expandIcon: _jsx(ExpandMore, {}) }, { children: _jsxs(Box, __assign({ flex: "1 0", display: "flex", justifyContent: "space-between", alignItems: "center", overflow: "hidden" }, { children: [_jsxs(Box, __assign({ flex: "1 0", overflow: "hidden" }, { children: [_jsx(AccordionTitle, { children: positionName || name }), positionName && _jsxs(AccordionSubTitle, __assign({ color: "secondary" }, { children: ["\u6B65\u9AA4\uFF1A", name] }))] })), isShowSummaryAction && (_jsx(Button, __assign({ sx: { mr: 1, flexShrink: 0, height: 24 }, variant: "outlined", color: "inherit", size: "small", onClick: handleUseAllQuestion }, { children: "\u4F7F\u7528" })))] })) })), _jsxs(AccordionDetails, { children: [_jsx(List, __assign({ ref: ref }, { children: questionsList.map(function (item) {
|
|
90
|
+
var token = item.token, name = item.name, category = item.category;
|
|
91
|
+
var isUsed = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps.find(function (step) { return step.originToken === token; });
|
|
92
|
+
return (_jsx(ListItem, __assign({ secondaryAction: [
|
|
93
|
+
isUsed && _jsx(Done, {}, "icon"),
|
|
94
|
+
_jsx(Button, __assign({ variant: "outlined", color: "inherit", size: "small", onClick: function () { return handleUseQuestion(item); } }, { children: "\u4F7F\u7528" }), "use"),
|
|
95
|
+
], onMouseOver: function () { return handleMouseOver(item); } }, { children: _jsx(ListItemText, { primary: name, secondary: isShowDesc && category ? category[0] : '' }) }), token));
|
|
96
|
+
}) })), isPaging && (_jsx(Button, __assign({ variant: "text", sx: { width: '100%', justifyContent: 'start', color: '#576B95' }, onClick: handleShowAll }, { children: "\u5C55\u793A\u5168\u90E8" })))] })] })) })) }));
|
|
97
|
+
};
|
|
98
|
+
export default memo(BaseAccordion);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AiEvaluationDataList } from '../QuestionTemplate/interface';
|
|
2
|
+
export interface BaseAccordionProps extends AiEvaluationDataList {
|
|
3
|
+
index?: number;
|
|
4
|
+
isShowOnlyAITest: boolean;
|
|
5
|
+
isShowDesc?: boolean;
|
|
6
|
+
isShowPreview?: boolean;
|
|
7
|
+
isShowSummaryAction?: boolean;
|
|
8
|
+
isShowConfirm?: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const AccordionRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
+
export declare const AccordionTitle: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Typography").TypographyProps & {
|
|
6
|
+
children?: import("react").ReactNode;
|
|
7
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
|
+
export declare const AccordionSubTitle: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Typography").TypographyProps & {
|
|
9
|
+
children?: import("react").ReactNode;
|
|
10
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Box, Typography, styled } from 'fbm-ui';
|
|
2
|
+
export var AccordionRoot = styled(Box)(function (_a) {
|
|
3
|
+
var theme = _a.theme;
|
|
4
|
+
return ({
|
|
5
|
+
position: 'relative',
|
|
6
|
+
marginBottom: 12,
|
|
7
|
+
'& .MuiAccordion-root': {
|
|
8
|
+
border: '1px solid rgba(0, 0, 0, 0.08)',
|
|
9
|
+
boxShadow: 'none',
|
|
10
|
+
},
|
|
11
|
+
'& .MuiAccordionSummary-root.Mui-expanded': {
|
|
12
|
+
borderBottom: '1px solid rgba(0, 0, 0, 0.08)',
|
|
13
|
+
},
|
|
14
|
+
'& .MuiAccordionDetails-root': {
|
|
15
|
+
padding: 0,
|
|
16
|
+
},
|
|
17
|
+
'& .MuiListItemText-primary': {
|
|
18
|
+
fontSize: 14,
|
|
19
|
+
color: 'rgba(0, 0, 0, 0.86)',
|
|
20
|
+
},
|
|
21
|
+
'& .MuiListItemText-secondary': {
|
|
22
|
+
fontSize: 12,
|
|
23
|
+
color: 'rgba(0, 0, 0, 0.56)',
|
|
24
|
+
},
|
|
25
|
+
'& .MuiListItemSecondaryAction-root': {
|
|
26
|
+
'& .MuiSvgIcon-root': {
|
|
27
|
+
color: theme.palette.primary.main,
|
|
28
|
+
},
|
|
29
|
+
'& .MuiButton-root': {
|
|
30
|
+
display: 'none',
|
|
31
|
+
background: '#fff',
|
|
32
|
+
position: 'absolute',
|
|
33
|
+
width: 48,
|
|
34
|
+
height: 24,
|
|
35
|
+
top: 0,
|
|
36
|
+
bottom: 0,
|
|
37
|
+
right: 0,
|
|
38
|
+
margin: 'auto 0',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
'& .MuiListItem-root:hover': {
|
|
42
|
+
background: 'rgba(0, 0, 0, 0.04)',
|
|
43
|
+
'& .MuiListItemSecondaryAction-root': {
|
|
44
|
+
'& .MuiButton-root': {
|
|
45
|
+
display: 'block',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
'& .MuiAccordionSummary-content': {
|
|
50
|
+
flex: '1 0',
|
|
51
|
+
overflow: 'hidden',
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
export var AccordionTitle = styled(Typography)({
|
|
56
|
+
fontSize: 14,
|
|
57
|
+
color: 'rgba(0, 0, 0, 0.86)',
|
|
58
|
+
fontWeight: 500,
|
|
59
|
+
paddingRight: '8px',
|
|
60
|
+
overflow: 'hidden',
|
|
61
|
+
textOverflow: 'ellipsis',
|
|
62
|
+
whiteSpace: 'nowrap',
|
|
63
|
+
});
|
|
64
|
+
export var AccordionSubTitle = styled(Typography)(function (_a) {
|
|
65
|
+
var theme = _a.theme;
|
|
66
|
+
return ({
|
|
67
|
+
fontSize: 12,
|
|
68
|
+
paddingRight: '8px',
|
|
69
|
+
overflow: 'hidden',
|
|
70
|
+
textOverflow: 'ellipsis',
|
|
71
|
+
whiteSpace: 'nowrap',
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import { useState, useCallback, useEffect } from 'react';
|
|
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 '@mui/material';
|
|
26
|
+
import SvgIcon from "../../../../components/SvgIcon";
|
|
27
|
+
import ScrollDialogContent from "../../../../components/ScrollDialogContent";
|
|
28
|
+
import { PostCommonUpload } from "../../../../services/ai-question";
|
|
29
|
+
import { DEFAULT_GUIDE_VIDEO } from "../../../../constants/ai-question";
|
|
30
|
+
import { useBootVideoStore } from "../../../../store/ai-question/boot-video-store";
|
|
31
|
+
import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
|
|
32
|
+
import { CustomUploadCardRoot, CustomUploadCardTitle, CustomUploadButtonRoot, CustomUploadedImgRoot } from './styled';
|
|
33
|
+
var BootVideo = function (props) {
|
|
34
|
+
var open = props.open, onClose = props.onClose;
|
|
35
|
+
var _a = useBootVideoStore(), mediaUrl = _a.mediaUrl, thumbUrl = _a.thumbUrl, updateBootVideo = _a.updateBootVideo;
|
|
36
|
+
var _b = useState(DEFAULT_GUIDE_VIDEO), mediaList = _b[0], setMediaList = _b[1];
|
|
37
|
+
var _c = useSetState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), mediaState = _c[0], setMediaState = _c[1];
|
|
38
|
+
var _d = useRequest(PostCommonUpload, {
|
|
39
|
+
manual: true,
|
|
40
|
+
onSuccess: function (_a) {
|
|
41
|
+
var data = _a.data;
|
|
42
|
+
var item = data[0];
|
|
43
|
+
setMediaList(__spreadArray(__spreadArray([], mediaList, true), [
|
|
44
|
+
{
|
|
45
|
+
videoUrl: item.url,
|
|
46
|
+
frameUrl: item.mineExtra.firstFrameUrl,
|
|
47
|
+
},
|
|
48
|
+
], false));
|
|
49
|
+
setMediaState({ mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
|
|
50
|
+
},
|
|
51
|
+
}), loading = _d.loading, postCommonUpload = _d.run;
|
|
52
|
+
var handleSelectVideo = useCallback(function (mediaUrl, thumbUrl) {
|
|
53
|
+
setMediaState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl });
|
|
54
|
+
}, [setMediaState]);
|
|
55
|
+
var handleOk = function () {
|
|
56
|
+
console.log(mediaState);
|
|
57
|
+
updateBootVideo(mediaState);
|
|
58
|
+
onClose();
|
|
59
|
+
};
|
|
60
|
+
var uploadProps = {
|
|
61
|
+
type: 'custom',
|
|
62
|
+
showUploadList: false,
|
|
63
|
+
accept: '.mp4,.mov,.m4v,.3gp,.avi,.webm',
|
|
64
|
+
maxCount: 1,
|
|
65
|
+
customRequest: function (_a) {
|
|
66
|
+
var file = _a.file;
|
|
67
|
+
if (isExceedMaxVideoFileSize(file.size)) {
|
|
68
|
+
Message.error('视频大小超过500M,请重新上传!');
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
var formData = new FormData();
|
|
72
|
+
formData.append('files', file);
|
|
73
|
+
postCommonUpload(formData);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
useEffect(function () {
|
|
78
|
+
if (open) {
|
|
79
|
+
setMediaState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl });
|
|
80
|
+
if (mediaUrl && thumbUrl && mediaUrl !== mediaList[0].videoUrl) {
|
|
81
|
+
setMediaList(__spreadArray(__spreadArray([], mediaList, true), [
|
|
82
|
+
{
|
|
83
|
+
videoUrl: mediaUrl,
|
|
84
|
+
frameUrl: thumbUrl,
|
|
85
|
+
},
|
|
86
|
+
], false));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
setMediaState({ mediaUrl: '', thumbUrl: '' });
|
|
91
|
+
setMediaList(DEFAULT_GUIDE_VIDEO);
|
|
92
|
+
}
|
|
93
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
94
|
+
}, [open]);
|
|
95
|
+
return (_jsx(Dialog, __assign({ open: open, title: "\u66F4\u6362\u5F15\u5BFC\u89C6\u9891", onClose: onClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: _jsxs(Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto' } }, { children: [(mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? (_jsx(Box, __assign({ loading: loading, sx: { width: 180, height: 330, margin: '0 auto', cursor: 'pointer' } }, { children: _jsx("video", { width: 180, height: 330, 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" }))] }) }))), _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(Divider, {}), _jsx(CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
|
|
96
|
+
var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
|
|
97
|
+
return (_jsx("img", { src: frameUrl, height: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? 70 : 64, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
|
|
98
|
+
}) }), _jsx(Divider, {}), _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 }); } }) }))] })) }) })));
|
|
99
|
+
};
|
|
100
|
+
export default BootVideo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|