eli-video-interview 1.4.7 → 1.6.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/esm/components/Charts/ReportPie.js +2 -2
- package/esm/index.d.ts +2 -0
- package/esm/index.js +2 -0
- package/esm/modules/ai-question/Root.js +13 -13
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +4 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +4 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +2 -5
- package/esm/modules/ai-question/components/QuestionUpdate/AudioUploader.d.ts +6 -0
- package/esm/modules/ai-question/components/QuestionUpdate/AudioUploader.js +74 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +16 -5
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +1 -1
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +3 -1
- package/esm/modules/ai-report/components/AIEvaluate/index.js +1 -1
- package/esm/modules/ai-report/interface.d.ts +28 -0
- package/esm/modules/ai-report-v3/Root.d.ts +4 -0
- package/esm/modules/ai-report-v3/Root.js +110 -0
- package/esm/modules/ai-report-v3/components/AIEvaluate/Evaluate.d.ts +11 -0
- package/esm/modules/ai-report-v3/components/AIEvaluate/Evaluate.js +79 -0
- package/esm/modules/ai-report-v3/components/AIEvaluate/Graph.d.ts +22 -0
- package/esm/modules/ai-report-v3/components/AIEvaluate/Graph.js +272 -0
- package/esm/modules/ai-report-v3/components/AIEvaluate/index.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/AIEvaluate/index.js +32 -0
- package/esm/modules/ai-report-v3/components/Candidate/Candidate.d.ts +7 -0
- package/esm/modules/ai-report-v3/components/Candidate/Candidate.js +55 -0
- package/esm/modules/ai-report-v3/components/Candidate/Interface.d.ts +16 -0
- package/esm/modules/ai-report-v3/components/Candidate/Interface.js +1 -0
- package/esm/modules/ai-report-v3/components/Candidate/Podium.d.ts +6 -0
- package/esm/modules/ai-report-v3/components/Candidate/Podium.js +50 -0
- package/esm/modules/ai-report-v3/components/Candidate/index.d.ts +2 -0
- package/esm/modules/ai-report-v3/components/Candidate/index.js +2 -0
- package/esm/modules/ai-report-v3/components/CapabilityTable/CapabilityTable.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/CapabilityTable/CapabilityTable.js +62 -0
- package/esm/modules/ai-report-v3/components/CheatRisk/CheatRisk.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/CheatRisk/CheatRisk.js +42 -0
- package/esm/modules/ai-report-v3/components/Form/Form.d.ts +23 -0
- package/esm/modules/ai-report-v3/components/Form/Form.js +67 -0
- package/esm/modules/ai-report-v3/components/Form/Forms.d.ts +9 -0
- package/esm/modules/ai-report-v3/components/Form/Forms.js +45 -0
- package/esm/modules/ai-report-v3/components/Form/Nps.d.ts +6 -0
- package/esm/modules/ai-report-v3/components/Form/Nps.js +57 -0
- package/esm/modules/ai-report-v3/components/Form/index.d.ts +1 -0
- package/esm/modules/ai-report-v3/components/Form/index.js +1 -0
- package/esm/modules/ai-report-v3/components/Form/interface.d.ts +57 -0
- package/esm/modules/ai-report-v3/components/Form/interface.js +1 -0
- package/esm/modules/ai-report-v3/components/MenuAnchor/index.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/MenuAnchor/index.js +130 -0
- package/esm/modules/ai-report-v3/components/ModuleTitle.d.ts +5 -0
- package/esm/modules/ai-report-v3/components/ModuleTitle.js +24 -0
- package/esm/modules/ai-report-v3/components/NotFinish/index.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/NotFinish/index.js +32 -0
- package/esm/modules/ai-report-v3/components/RankingRange/Item.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/RankingRange/Item.js +46 -0
- package/esm/modules/ai-report-v3/components/RankingRange/index.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/RankingRange/index.js +187 -0
- package/esm/modules/ai-report-v3/components/RankingRange/interface.d.ts +26 -0
- package/esm/modules/ai-report-v3/components/RankingRange/interface.js +1 -0
- package/esm/modules/ai-report-v3/components/RankingRange/styled.d.ts +7 -0
- package/esm/modules/ai-report-v3/components/RankingRange/styled.js +11 -0
- package/esm/modules/ai-report-v3/components/ReportHeader/ReportHeader.d.ts +17 -0
- package/esm/modules/ai-report-v3/components/ReportHeader/ReportHeader.js +105 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Bar.d.ts +6 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Bar.js +68 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Failed.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Failed.js +33 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/RecommendIcon.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/RecommendIcon.js +17 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Report.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Report.js +22 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Score.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Score.js +83 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/ScoreLegend.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/ScoreLegend.js +33 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Tips.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Tips.js +18 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/index.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/index.js +39 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/interface.d.ts +20 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/interface.js +1 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/styled.d.ts +22 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/styled.js +21 -0
- package/esm/modules/ai-report-v3/components/SectionTabs/SectionTabs.d.ts +11 -0
- package/esm/modules/ai-report-v3/components/SectionTabs/SectionTabs.js +114 -0
- package/esm/modules/ai-report-v3/components/Suggestion/Suggestion.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/Suggestion/Suggestion.js +31 -0
- package/esm/modules/ai-report-v3/components/Suggestion/index.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/Suggestion/index.js +27 -0
- package/esm/modules/ai-report-v3/components/V3Header/V3Header.d.ts +11 -0
- package/esm/modules/ai-report-v3/components/V3Header/V3Header.js +154 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/Abilities.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/Abilities.js +42 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/BodyImages.d.ts +7 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/BodyImages.js +56 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/Evaluate.d.ts +11 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/Evaluate.js +79 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/QuestionItem.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/QuestionItem.js +145 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/ScoreSlider.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/ScoreSlider.js +47 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/SingleChoice.d.ts +8 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/SingleChoice.js +31 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/Workplaces.d.ts +10 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/Workplaces.js +91 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/index.d.ts +6 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/index.js +24 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/interface.d.ts +17 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/interface.js +1 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/styled.d.ts +72 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/styled.js +93 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/ScoreSlider.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/ScoreSlider.js +24 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/WorkPlace.d.ts +12 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/WorkPlace.js +72 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/index.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/index.js +70 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/interface.d.ts +7 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/interface.js +1 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/styled.d.ts +62 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/styled.js +27 -0
- package/esm/modules/ai-report-v3/components/styled.d.ts +42 -0
- package/esm/modules/ai-report-v3/components/styled.js +140 -0
- package/esm/modules/ai-report-v3/index.d.ts +4 -0
- package/esm/modules/ai-report-v3/index.js +20 -0
- package/esm/modules/ai-report-v3/interface.d.ts +257 -0
- package/esm/modules/ai-report-v3/interface.js +1 -0
- package/esm/modules/ai-report-v3/useAiReport.d.ts +37 -0
- package/esm/modules/ai-report-v3/useAiReport.js +18 -0
- package/esm/modules/ai-report-v3/useAiReportVersion.d.ts +5 -0
- package/esm/modules/ai-report-v3/useAiReportVersion.js +45 -0
- package/esm/modules/ai-report-v3/utils.d.ts +1 -0
- package/esm/modules/ai-report-v3/utils.js +1 -0
- package/lib/components/Charts/ReportPie.js +2 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.js +5 -1
- package/lib/modules/ai-question/Root.js +13 -13
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +4 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +5 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +1 -4
- package/lib/modules/ai-question/components/QuestionUpdate/AudioUploader.d.ts +6 -0
- package/lib/modules/ai-question/components/QuestionUpdate/AudioUploader.js +76 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +18 -7
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +1 -1
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +3 -1
- package/lib/modules/ai-report/components/AIEvaluate/index.js +1 -1
- package/lib/modules/ai-report/interface.d.ts +28 -0
- package/lib/modules/ai-report-v3/Root.d.ts +4 -0
- package/lib/modules/ai-report-v3/Root.js +115 -0
- package/lib/modules/ai-report-v3/components/AIEvaluate/Evaluate.d.ts +11 -0
- package/lib/modules/ai-report-v3/components/AIEvaluate/Evaluate.js +81 -0
- package/lib/modules/ai-report-v3/components/AIEvaluate/Graph.d.ts +22 -0
- package/lib/modules/ai-report-v3/components/AIEvaluate/Graph.js +276 -0
- package/lib/modules/ai-report-v3/components/AIEvaluate/index.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/AIEvaluate/index.js +37 -0
- package/lib/modules/ai-report-v3/components/Candidate/Candidate.d.ts +7 -0
- package/lib/modules/ai-report-v3/components/Candidate/Candidate.js +57 -0
- package/lib/modules/ai-report-v3/components/Candidate/Interface.d.ts +16 -0
- package/lib/modules/ai-report-v3/components/Candidate/Interface.js +2 -0
- package/lib/modules/ai-report-v3/components/Candidate/Podium.d.ts +6 -0
- package/lib/modules/ai-report-v3/components/Candidate/Podium.js +52 -0
- package/lib/modules/ai-report-v3/components/Candidate/index.d.ts +2 -0
- package/lib/modules/ai-report-v3/components/Candidate/index.js +10 -0
- package/lib/modules/ai-report-v3/components/CapabilityTable/CapabilityTable.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/CapabilityTable/CapabilityTable.js +64 -0
- package/lib/modules/ai-report-v3/components/CheatRisk/CheatRisk.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/CheatRisk/CheatRisk.js +44 -0
- package/lib/modules/ai-report-v3/components/Form/Form.d.ts +23 -0
- package/lib/modules/ai-report-v3/components/Form/Form.js +73 -0
- package/lib/modules/ai-report-v3/components/Form/Forms.d.ts +9 -0
- package/lib/modules/ai-report-v3/components/Form/Forms.js +50 -0
- package/lib/modules/ai-report-v3/components/Form/Nps.d.ts +6 -0
- package/lib/modules/ai-report-v3/components/Form/Nps.js +59 -0
- package/lib/modules/ai-report-v3/components/Form/index.d.ts +1 -0
- package/lib/modules/ai-report-v3/components/Form/index.js +8 -0
- package/lib/modules/ai-report-v3/components/Form/interface.d.ts +57 -0
- package/lib/modules/ai-report-v3/components/Form/interface.js +2 -0
- package/lib/modules/ai-report-v3/components/MenuAnchor/index.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/MenuAnchor/index.js +132 -0
- package/lib/modules/ai-report-v3/components/ModuleTitle.d.ts +5 -0
- package/lib/modules/ai-report-v3/components/ModuleTitle.js +28 -0
- package/lib/modules/ai-report-v3/components/NotFinish/index.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/NotFinish/index.js +34 -0
- package/lib/modules/ai-report-v3/components/RankingRange/Item.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/RankingRange/Item.js +48 -0
- package/lib/modules/ai-report-v3/components/RankingRange/index.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/RankingRange/index.js +192 -0
- package/lib/modules/ai-report-v3/components/RankingRange/interface.d.ts +26 -0
- package/lib/modules/ai-report-v3/components/RankingRange/interface.js +2 -0
- package/lib/modules/ai-report-v3/components/RankingRange/styled.d.ts +7 -0
- package/lib/modules/ai-report-v3/components/RankingRange/styled.js +14 -0
- package/lib/modules/ai-report-v3/components/ReportHeader/ReportHeader.d.ts +17 -0
- package/lib/modules/ai-report-v3/components/ReportHeader/ReportHeader.js +110 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Bar.d.ts +6 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Bar.js +70 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Failed.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Failed.js +34 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/RecommendIcon.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/RecommendIcon.js +22 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Report.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Report.js +27 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Score.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Score.js +86 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/ScoreLegend.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/ScoreLegend.js +35 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Tips.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Tips.js +20 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/index.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/index.js +44 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/interface.d.ts +20 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/interface.js +2 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/styled.d.ts +22 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/styled.js +24 -0
- package/lib/modules/ai-report-v3/components/SectionTabs/SectionTabs.d.ts +11 -0
- package/lib/modules/ai-report-v3/components/SectionTabs/SectionTabs.js +116 -0
- package/lib/modules/ai-report-v3/components/Suggestion/Suggestion.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/Suggestion/Suggestion.js +33 -0
- package/lib/modules/ai-report-v3/components/Suggestion/index.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/Suggestion/index.js +32 -0
- package/lib/modules/ai-report-v3/components/V3Header/V3Header.d.ts +11 -0
- package/lib/modules/ai-report-v3/components/V3Header/V3Header.js +159 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/Abilities.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/Abilities.js +47 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/BodyImages.d.ts +7 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/BodyImages.js +61 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/Evaluate.d.ts +11 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/Evaluate.js +81 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/QuestionItem.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/QuestionItem.js +150 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/ScoreSlider.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/ScoreSlider.js +49 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/SingleChoice.d.ts +8 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/SingleChoice.js +33 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/Workplaces.d.ts +10 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/Workplaces.js +93 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/index.d.ts +6 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/index.js +29 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/interface.d.ts +17 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/interface.js +2 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/styled.d.ts +72 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/styled.js +96 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/ScoreSlider.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/ScoreSlider.js +26 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/WorkPlace.d.ts +12 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/WorkPlace.js +74 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/index.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/index.js +75 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/interface.d.ts +7 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/interface.js +2 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/styled.d.ts +62 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/styled.js +30 -0
- package/lib/modules/ai-report-v3/components/styled.d.ts +42 -0
- package/lib/modules/ai-report-v3/components/styled.js +146 -0
- package/lib/modules/ai-report-v3/index.d.ts +4 -0
- package/lib/modules/ai-report-v3/index.js +25 -0
- package/lib/modules/ai-report-v3/interface.d.ts +257 -0
- package/lib/modules/ai-report-v3/interface.js +2 -0
- package/lib/modules/ai-report-v3/useAiReport.d.ts +37 -0
- package/lib/modules/ai-report-v3/useAiReport.js +25 -0
- package/lib/modules/ai-report-v3/useAiReportVersion.d.ts +5 -0
- package/lib/modules/ai-report-v3/useAiReportVersion.js +49 -0
- package/lib/modules/ai-report-v3/utils.d.ts +1 -0
- package/lib/modules/ai-report-v3/utils.js +5 -0
- package/package.json +5 -5
|
@@ -115,8 +115,8 @@ var ReportPie = function (props) {
|
|
|
115
115
|
itemStyle: {
|
|
116
116
|
color: function (_a) {
|
|
117
117
|
var _b;
|
|
118
|
-
var
|
|
119
|
-
return (_b = levelMapping[level]) === null || _b === void 0 ? void 0 : _b.itemColor;
|
|
118
|
+
var _c = _a.data, avgScore = _c.avgScore, level = _c.level;
|
|
119
|
+
return (_b = levelMapping[avgScore != null ? getLevel(avgScore) : level]) === null || _b === void 0 ? void 0 : _b.itemColor;
|
|
120
120
|
},
|
|
121
121
|
shadowBlur: 4,
|
|
122
122
|
shadowColor: 'rgba(0, 0, 0, 0.16)',
|
package/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as AiQuestion } from './modules/ai-question';
|
|
2
2
|
export { default as AiReport } from './modules/ai-report';
|
|
3
3
|
export { default as AiReportV2 } from './modules/ai-report-v2';
|
|
4
|
+
export { default as AiReportV3 } from './modules/ai-report-v3';
|
|
4
5
|
export { default as AiTemplate } from './modules/ai-template';
|
|
5
6
|
export { default as AiAbility } from './modules/ai-ability';
|
|
6
7
|
export { default as AiAbilitySelect } from './modules/ai-ability-select';
|
|
@@ -8,4 +9,5 @@ export { default as VideoPreview } from './components/VideoPreview';
|
|
|
8
9
|
export { useAiQuestion } from './modules/ai-question/useAiQuestion';
|
|
9
10
|
export { useAiReport } from './modules/ai-report/useAiReport';
|
|
10
11
|
export { useAiReportV2 } from './modules/ai-report-v2/useAiReport';
|
|
12
|
+
export { useAiReportV3 } from './modules/ai-report-v3/useAiReport';
|
|
11
13
|
export { avocadoVideoInterview } from './utils/config';
|
package/esm/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as AiQuestion } from './modules/ai-question';
|
|
2
2
|
export { default as AiReport } from './modules/ai-report';
|
|
3
3
|
export { default as AiReportV2 } from './modules/ai-report-v2';
|
|
4
|
+
export { default as AiReportV3 } from './modules/ai-report-v3';
|
|
4
5
|
export { default as AiTemplate } from './modules/ai-template';
|
|
5
6
|
export { default as AiAbility } from './modules/ai-ability';
|
|
6
7
|
export { default as AiAbilitySelect } from './modules/ai-ability-select';
|
|
@@ -8,4 +9,5 @@ export { default as VideoPreview } from './components/VideoPreview';
|
|
|
8
9
|
export { useAiQuestion } from './modules/ai-question/useAiQuestion';
|
|
9
10
|
export { useAiReport } from './modules/ai-report/useAiReport';
|
|
10
11
|
export { useAiReportV2 } from './modules/ai-report-v2/useAiReport';
|
|
12
|
+
export { useAiReportV3 } from './modules/ai-report-v3/useAiReport';
|
|
11
13
|
export { avocadoVideoInterview } from './utils/config';
|
|
@@ -133,19 +133,19 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
|
|
|
133
133
|
}
|
|
134
134
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
135
135
|
}, [props]);
|
|
136
|
-
return (_jsxs(Box, __assign({ sx: {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
136
|
+
return (_jsx(AiAnalysisStoreProvider, { children: _jsxs(Box, __assign({ sx: {
|
|
137
|
+
display: 'flex',
|
|
138
|
+
height: '100%',
|
|
139
|
+
position: 'relative',
|
|
140
|
+
} }, { children: [_jsx(QuestionPreview, {}), _jsx(QuestionUpdate, {}), _jsx(Box, __assign({ sx: {
|
|
141
|
+
flex: '1 0',
|
|
142
|
+
height: '100%',
|
|
143
|
+
overflow: 'auto',
|
|
144
|
+
} }, { children: _jsx(QuestionModel, {}) })), _jsx(Box, __assign({ sx: {
|
|
145
|
+
width: '256px',
|
|
146
|
+
height: '100%',
|
|
147
|
+
overflow: 'auto',
|
|
148
|
+
} }, { children: _jsx(QuestionTemplate, { isOem: isOem }) }))] })) }));
|
|
149
149
|
});
|
|
150
150
|
AiQuestionRoot.displayName = 'AiQuestionRoot';
|
|
151
151
|
export default memo(AiQuestionRoot);
|
|
@@ -67,3 +67,7 @@ export var LANGUAGE_SHOW_NAMES = {
|
|
|
67
67
|
14: '斯瓦希里语',
|
|
68
68
|
};
|
|
69
69
|
export var LANGUAGE_SHOW_NAMES_ORDER = [1, 4, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
|
|
70
|
+
export var VOICE_LANGUAGE_OPTIONS = LANGUAGE_SHOW_NAMES_ORDER.map(function (ord) { return ({
|
|
71
|
+
value: ord,
|
|
72
|
+
label: LANGUAGE_SHOW_NAMES[ord],
|
|
73
|
+
}); });
|
|
@@ -35,7 +35,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
35
35
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
36
|
};
|
|
37
37
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
38
|
-
import { CATEGORY_NAME, LANGUAGE_SHOW_NAME,
|
|
38
|
+
import { CATEGORY_NAME, LANGUAGE_SHOW_NAME, SERVER_LANGUAGE_TYPE, VOICE_LANGUAGE_OPTIONS } from './const';
|
|
39
39
|
import { groupCategory } from './utils';
|
|
40
40
|
import ScrollDialogContent from "../../../../components/ScrollDialogContent";
|
|
41
41
|
import { CATEGORY_TYPE, LANGUAGE_TYPE } from "../../../../enum/ai-question";
|
|
@@ -113,10 +113,7 @@ var AiAssessmentCriteria = function (props) {
|
|
|
113
113
|
return fixSetCheckAbilities((_a = {}, _a[item.type] = item, _a));
|
|
114
114
|
});
|
|
115
115
|
}, [aiAbilities, fixSetCheckAbilities]);
|
|
116
|
-
return (_jsx(Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u7EF4\u5EA6", size: "sm", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: loading ? (_jsx(Box, __assign({ height: 400 }, { children: _jsx(Loading, { size: 40 }) }))) : (_jsxs(_Fragment, { children: [_jsxs(Stack, __assign({ spacing: 1, mb: 2 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9898\u76EE\u8BED\u79CD" })), _jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8FDB\u884C\u8BFB\u9898" }))] })), _jsx(Select, { onChange: function (e) { return setVoiceLanguage(Number(e.target.value)); }, value: voiceLanguage, options:
|
|
117
|
-
value: ord,
|
|
118
|
-
label: LANGUAGE_SHOW_NAMES[ord],
|
|
119
|
-
}); }), sx: {
|
|
116
|
+
return (_jsx(Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u7EF4\u5EA6", size: "sm", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: loading ? (_jsx(Box, __assign({ height: 400 }, { children: _jsx(Loading, { size: 40 }) }))) : (_jsxs(_Fragment, { children: [_jsxs(Stack, __assign({ spacing: 1, mb: 2 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9898\u76EE\u8BED\u79CD" })), _jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8FDB\u884C\u8BFB\u9898" }))] })), _jsx(Select, { onChange: function (e) { return setVoiceLanguage(Number(e.target.value)); }, value: voiceLanguage, options: VOICE_LANGUAGE_OPTIONS, sx: {
|
|
120
117
|
width: 240,
|
|
121
118
|
} })] })), groupData.map(function (_a) {
|
|
122
119
|
var name = _a.name, type = _a.type, list = _a.list;
|
|
@@ -0,0 +1,74 @@
|
|
|
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 __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
29
|
+
import { PostCommonUpload } from "../../../../services/ai-question";
|
|
30
|
+
import { isExceedMaxFileSize } from "../../../../utils/utils";
|
|
31
|
+
import { useRequest } from 'ahooks';
|
|
32
|
+
import { Box, Button, Message, Typography, Upload, UploadIcon } from 'fbm-ui';
|
|
33
|
+
import { CircularProgress, Stack } from 'fbm-ui/lib/mui';
|
|
34
|
+
var ACCEPT_AUDIO_TYPES = '.mp3,.wav,audio/mpeg,audio/wav,audio/x-wav';
|
|
35
|
+
var AUDIO_FILE_EXT_REG = /\.(mp3|wav)$/i;
|
|
36
|
+
var AudioUploader = function (_a) {
|
|
37
|
+
var audioUrl = _a.audioUrl, onChange = _a.onChange;
|
|
38
|
+
var _b = useRequest(PostCommonUpload, {
|
|
39
|
+
manual: true,
|
|
40
|
+
onSuccess: function (_a) {
|
|
41
|
+
var data = _a.data;
|
|
42
|
+
var _b = __read(data, 1), firstData = _b[0];
|
|
43
|
+
onChange === null || onChange === void 0 ? void 0 : onChange((firstData === null || firstData === void 0 ? void 0 : firstData.url) || '');
|
|
44
|
+
},
|
|
45
|
+
}), loading = _b.loading, postCommonUpload = _b.run;
|
|
46
|
+
var uploadProps = {
|
|
47
|
+
type: 'custom',
|
|
48
|
+
showUploadList: false,
|
|
49
|
+
accept: ACCEPT_AUDIO_TYPES,
|
|
50
|
+
customRequest: function (_a) {
|
|
51
|
+
var file = _a.file;
|
|
52
|
+
var fileName = (file === null || file === void 0 ? void 0 : file.name) || '';
|
|
53
|
+
var fileType = (file === null || file === void 0 ? void 0 : file.type) || '';
|
|
54
|
+
var isValidType = AUDIO_FILE_EXT_REG.test(fileName) || ['audio/mpeg', 'audio/wav', 'audio/x-wav'].includes(fileType);
|
|
55
|
+
if (!isValidType) {
|
|
56
|
+
Message.error('仅支持上传MP3、WAV格式录音文件');
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (isExceedMaxFileSize(file.size)) {
|
|
60
|
+
Message.error('录音文件大小超过20MB,请重新上传');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
var formData = new FormData();
|
|
64
|
+
formData.append('files', file);
|
|
65
|
+
postCommonUpload(formData);
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
return (_jsxs(Box, __assign({ mt: 1.5 }, { children: [_jsxs(Stack, __assign({ direction: "row", spacing: 1.5, alignItems: "center" }, { children: [_jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", size: "small", icon: !loading ? _jsx(UploadIcon, {}) : undefined }, { children: loading ? (_jsxs(Stack, __assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(CircularProgress, { size: 16, color: "inherit" }), _jsx("span", { children: "\u4E0A\u4F20\u4E2D..." })] }))) : ('上传录音') })) })), audioUrl && (_jsxs(_Fragment, { children: [_jsx("audio", { controls: true, src: audioUrl, style: {
|
|
69
|
+
width: 300,
|
|
70
|
+
maxWidth: '100%',
|
|
71
|
+
height: 35,
|
|
72
|
+
} }), _jsx(Button, __assign({ variant: "text", color: "error", size: "small", onClick: function () { return onChange === null || onChange === void 0 ? void 0 : onChange(''); } }, { children: "\u5220\u9664" }))] }))] })), _jsx(Typography, __assign({ variant: "caption", color: "text.secondary", display: "block", mt: 1 }, { children: "\u652F\u6301MP3\u3001WAV\u683C\u5F0F, \u6700\u592720MB" }))] })));
|
|
73
|
+
};
|
|
74
|
+
export default AudioUploader;
|
|
@@ -72,6 +72,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
72
72
|
};
|
|
73
73
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
74
74
|
import AiAnalysis from '../AiAnalysis';
|
|
75
|
+
import { VOICE_LANGUAGE_OPTIONS } from '../AiAssessmentCriteria/const';
|
|
76
|
+
import AudioUploader from './AudioUploader';
|
|
75
77
|
import Chioce from './Chioce';
|
|
76
78
|
import { broadcastModeOptions, durationOptions, prepareTimeOptions } from './const';
|
|
77
79
|
import FllowupSetting from './FllowupSetting';
|
|
@@ -81,15 +83,17 @@ import { useAiAbilityListStore } from "../../../../store/ai-ability-select/quest
|
|
|
81
83
|
import { useEnterpriseStore } from "../../../../store/enterprise/enterprise-store";
|
|
82
84
|
import { ADD_QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
83
85
|
import { GetAiAbilityList } from "../../../../services/ai-ability";
|
|
86
|
+
import { useAiAnalysisStore } from "../../../../store/ai-question/ai-analysis-store";
|
|
84
87
|
import { useRequest } from 'ahooks';
|
|
85
|
-
import { Autocomplete, Box, CloseIcon, DeleteIcon, Form, FormItem, IconButton, Select, useForm } from 'fbm-ui';
|
|
88
|
+
import { Autocomplete, Box, CloseIcon, DeleteIcon, Form, FormItem, IconButton, Select, Typography, useForm } from 'fbm-ui';
|
|
86
89
|
import { Paper, Stack } from 'fbm-ui/lib/mui';
|
|
87
90
|
import { FieldArray } from 'formik';
|
|
88
91
|
import { forwardRef, memo, useEffect, useImperativeHandle } from 'react';
|
|
89
92
|
var QuestionForm = forwardRef(function (props, ref) {
|
|
90
93
|
var aiShowType = props.aiShowType, initialValues = props.initialValues, values = props.values, preview = props.preview, onValuesChange = props.onValuesChange, onSubmit = props.onSubmit, onCategoryChange = props.onCategoryChange;
|
|
91
94
|
var _a = useAiAbilityListStore(), aiAbilityList = _a.aiAbilityList, setSpecialAiAbilityList = _a.setSpecialAiAbilityList;
|
|
92
|
-
var _b =
|
|
95
|
+
var _b = useAiAnalysisStore(), analysisState = _b.analysisState, updateState = _b.updateState;
|
|
96
|
+
var _c = useEnterpriseStore().enterprise, jobToken = _c.jobToken, thirdToken = _c.thirdToken;
|
|
93
97
|
var data = useRequest(function () { return GetAiAbilityList({ jobToken: jobToken, thirdToken: thirdToken }); }, {
|
|
94
98
|
refreshDeps: [jobToken, thirdToken],
|
|
95
99
|
manual: preview,
|
|
@@ -187,15 +191,18 @@ var QuestionForm = forwardRef(function (props, ref) {
|
|
|
187
191
|
}, sx: {
|
|
188
192
|
flexGrow: 1,
|
|
189
193
|
height: 'auto',
|
|
194
|
+
} }), _jsx(AudioUploader, { audioUrl: v.audioUrl, onChange: function (audioUrl) {
|
|
195
|
+
form.values.questions[index] = __assign(__assign({}, form.values.questions[index]), { audioUrl: audioUrl });
|
|
196
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions), false) }));
|
|
190
197
|
} }), _jsx(Chioce, { index: index, item: v, onChange: function (_, options, i) {
|
|
191
198
|
form.values.questions[index].options = options;
|
|
192
199
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions), false) }));
|
|
193
200
|
} })] }), index));
|
|
194
201
|
});
|
|
195
202
|
} }) })), !preview && aiShowType !== ADD_QUESTION_TYPE.LANGUAGE && (_jsx(RandomQuestion, { aiShowType: aiShowType, category: aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.find(function (v) { var _a; return v.name === ((_a = form.values.category) === null || _a === void 0 ? void 0 : _a.value); }), broadcastType: form.values.broadcastType, onAddCustonQuestion: function () {
|
|
196
|
-
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), [{ content: '', videoUrl: '' }], false) }));
|
|
203
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), [{ content: '', videoUrl: '', videoURLWide: '', audioUrl: '' }], false) }));
|
|
197
204
|
}, onAddRandomQuestion: function (qs) {
|
|
198
|
-
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), __read(qs.map(function (v) { return ({ content: v, videoUrl: '' }); })), false) }));
|
|
205
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), __read(qs.map(function (v) { return ({ content: v, videoUrl: '', videoURLWide: '', audioUrl: '' }); })), false) }));
|
|
199
206
|
} })), aiShowType === ADD_QUESTION_TYPE.LANGUAGE && (_jsx(FormItem, { sx: { height: 'auto', mb: 2 }, required: true, name: "readText", label: "\u6717\u8BFB\u5185\u5BB9", max: 240, InputProps: {
|
|
200
207
|
rows: 3,
|
|
201
208
|
multiline: true,
|
|
@@ -213,7 +220,11 @@ var QuestionForm = forwardRef(function (props, ref) {
|
|
|
213
220
|
placeholder: '最少回答时长',
|
|
214
221
|
sx: { padding: 0, pr: 1 },
|
|
215
222
|
endAdornment: 's',
|
|
216
|
-
}, onChange: handleMinResponseDurationChange }))] }))
|
|
223
|
+
}, onChange: handleMinResponseDurationChange }))] })), aiShowType === ADD_QUESTION_TYPE.SINGLECHIOCE && (_jsx(Box, __assign({ display: "flex", mt: 2, mb: 2.5 }, { children: _jsxs(Box, __assign({ sx: { width: 'calc((100% - 32px) / 3)' } }, { children: [_jsx(Typography, __assign({ variant: "body2", sx: {
|
|
224
|
+
color: 'rgba(0, 0, 0, 0.6)',
|
|
225
|
+
lineHeight: '22px',
|
|
226
|
+
mb: 0.5,
|
|
227
|
+
} }, { children: "\u9898\u76EE\u8BED\u79CD" })), _jsx(Select, { value: analysisState.voiceLanguage || 1, options: VOICE_LANGUAGE_OPTIONS, onChange: function (e) { return updateState({ voiceLanguage: Number(e.target.value) }); } })] })) })))] })), !preview && _jsx(AiAnalysis, {})] }));
|
|
217
228
|
});
|
|
218
229
|
QuestionForm.displayName = 'QuestionForm';
|
|
219
230
|
export default memo(QuestionForm);
|
|
@@ -7,7 +7,7 @@ export var defaultQuestionParams = {
|
|
|
7
7
|
answerStatus: 2,
|
|
8
8
|
broadcastType: 1,
|
|
9
9
|
desc: '',
|
|
10
|
-
questions: [{ content: '', videoUrl: '' }],
|
|
10
|
+
questions: [{ content: '', videoUrl: '', videoURLWide: '', audioUrl: '' }],
|
|
11
11
|
duration: 30,
|
|
12
12
|
category: undefined,
|
|
13
13
|
extra: {
|
|
@@ -46,7 +46,7 @@ var Index = function () {
|
|
|
46
46
|
// }, [expand]);
|
|
47
47
|
if (!showAiDimension || ((_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.length) === 0)
|
|
48
48
|
return null;
|
|
49
|
-
return (_jsxs(Box, __assign({ id: "report-
|
|
49
|
+
return (_jsxs(Box, __assign({ id: "report-ai-dimension", px: 2, mt: 2 }, { children: [_jsxs(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: [_jsx(AiHeaderTitle, { name: "AI\u57FA\u7840\u80FD\u529B" }), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u7ED3\u679C\u8BF4\u660E\uFF1A", _jsx("br", {}), "AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", _jsx("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }) }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center" }, { children: _jsx(InfoOutlineIcon, { sx: { fontSize: '16px' } }) })) }))] })), _jsxs(Collapse, __assign({ in: expand }, { children: [(_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _b === void 0 ? void 0 : _b.map(function (v) {
|
|
50
50
|
var _a;
|
|
51
51
|
var c = customInterviewDimRankMap === null || customInterviewDimRankMap === void 0 ? void 0 : customInterviewDimRankMap[v.evaluationToken];
|
|
52
52
|
var rank = rankPercent((c === null || c === void 0 ? void 0 : c.rank) || (v === null || v === void 0 ? void 0 : v.rank), (c === null || c === void 0 ? void 0 : c.total) || (v === null || v === void 0 ? void 0 : v.total));
|
|
@@ -115,10 +115,36 @@ export interface FollowupQuestion {
|
|
|
115
115
|
desc: string;
|
|
116
116
|
answer: string;
|
|
117
117
|
}
|
|
118
|
+
export interface ReportQuestionCollection {
|
|
119
|
+
token: string;
|
|
120
|
+
name: string;
|
|
121
|
+
tag?: string;
|
|
122
|
+
type?: number;
|
|
123
|
+
isWorkplace?: boolean;
|
|
124
|
+
define?: string;
|
|
125
|
+
keyPoints?: string[];
|
|
126
|
+
interviewQuestions?: string[];
|
|
127
|
+
}
|
|
128
|
+
export interface ReportTag {
|
|
129
|
+
token: string;
|
|
130
|
+
name: string;
|
|
131
|
+
sentiment?: number;
|
|
132
|
+
type?: number;
|
|
133
|
+
color?: number;
|
|
134
|
+
}
|
|
135
|
+
export interface AiCandidateInfo {
|
|
136
|
+
name: string;
|
|
137
|
+
mobile: string;
|
|
138
|
+
processName: string;
|
|
139
|
+
positionName: string;
|
|
140
|
+
avatar: string;
|
|
141
|
+
tags?: ReportTag[];
|
|
142
|
+
}
|
|
118
143
|
export interface AiInterviewReportStep {
|
|
119
144
|
token: string;
|
|
120
145
|
status: number;
|
|
121
146
|
question: Question;
|
|
147
|
+
questionCollection?: ReportQuestionCollection;
|
|
122
148
|
answer: Answer;
|
|
123
149
|
scoreInfo: ScoreInfo;
|
|
124
150
|
aiEvaluation: AiEvaluation;
|
|
@@ -137,6 +163,8 @@ export interface SummaryText {
|
|
|
137
163
|
export interface AiInterviewReportList {
|
|
138
164
|
orderToken: string;
|
|
139
165
|
aiModel: AiModel;
|
|
166
|
+
candidateInfo?: AiCandidateInfo;
|
|
167
|
+
tags?: ReportTag[];
|
|
140
168
|
collection: Collection[];
|
|
141
169
|
faceUrl: string;
|
|
142
170
|
faceAnalysis: FaceAnalysis;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AiReportProps, AiReportRef } from './interface';
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<AiReportProps & import("react").RefAttributes<AiReportRef>>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,110 @@
|
|
|
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 AIEvaluate from './components/AIEvaluate';
|
|
14
|
+
import CapabilityTable from './components/CapabilityTable/CapabilityTable';
|
|
15
|
+
import { FormReport } from './components/Form';
|
|
16
|
+
import NotFinish from './components/NotFinish';
|
|
17
|
+
import SectionTabs from './components/SectionTabs/SectionTabs';
|
|
18
|
+
import V3Header from './components/V3Header/V3Header';
|
|
19
|
+
import VideoQuestion from './components/VideoQuestion';
|
|
20
|
+
import { COMPLETED_STATUS, INTERVIEW_STATUS } from "../../enum/ai-report";
|
|
21
|
+
import { PostAiInterviewResult } from "../../services/ai-report";
|
|
22
|
+
import { useAiReportStore } from "../../store/ai-report/global-store";
|
|
23
|
+
import { useRequest } from 'ahooks';
|
|
24
|
+
import { Box, Button, Typography } from 'fbm-ui';
|
|
25
|
+
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
26
|
+
var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER;
|
|
27
|
+
var AiReportRoot = forwardRef(function (props, ref) {
|
|
28
|
+
var token = props.token, v3AssetBase = props.v3AssetBase, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onExportReportClick = props.onExportReportClick, onSendReminderClick = props.onSendReminderClick, fetchFormResult = props.fetchFormResult, fetchCandidateInfo = props.fetchCandidateInfo, fetchReportUrl = props.fetchReportUrl, isExportPdf = props.isExportPdf;
|
|
29
|
+
var firstLoad = useRef(true);
|
|
30
|
+
var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult, interviewCheat = _a.interviewCheat;
|
|
31
|
+
var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
|
|
32
|
+
var _c = reportResult || {}, _d = _c.completedStatus, completedStatus = _d === void 0 ? COMPLETED_STATUS.NOT_START : _d, _e = _c.screenSwitchCount, screenSwitchCount = _e === void 0 ? 0 : _e;
|
|
33
|
+
var hasRisk = completedStatus === COMPLETED_STATUS.NOT_COMPLETED || !!(interviewCheat === null || interviewCheat === void 0 ? void 0 : interviewCheat.isCheat) || screenSwitchCount > 0;
|
|
34
|
+
var _f = useRequest(function () { return PostAiInterviewResult([token]); }, {
|
|
35
|
+
manual: true,
|
|
36
|
+
onSuccess: function (_a) {
|
|
37
|
+
var list = _a.data.list;
|
|
38
|
+
var result = list[0];
|
|
39
|
+
updateReportResult(result);
|
|
40
|
+
if (firstLoad.current) {
|
|
41
|
+
var pageStepIndexes_1 = [];
|
|
42
|
+
result.steps.forEach(function (_a, index) {
|
|
43
|
+
var videoUrl = _a.answer.videoUrl;
|
|
44
|
+
if (videoUrl) {
|
|
45
|
+
pageStepIndexes_1.push(index);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
firstLoad.current = false;
|
|
49
|
+
onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
}), data = _f.data, loading = _f.loading, postAiInterviewResult = _f.run;
|
|
53
|
+
var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
|
|
54
|
+
var handleRefreshSuccess = useCallback(function () {
|
|
55
|
+
postAiInterviewResult();
|
|
56
|
+
}, [postAiInterviewResult]);
|
|
57
|
+
useImperativeHandle(ref, function () { return ({
|
|
58
|
+
handleRefresh: function () { return postAiInterviewResult(); },
|
|
59
|
+
}); });
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
firstLoad.current = true;
|
|
62
|
+
postAiInterviewResult();
|
|
63
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
|
+
}, [token]);
|
|
65
|
+
useEffect(function () {
|
|
66
|
+
updateState(props);
|
|
67
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
|
+
}, [JSON.stringify(props)]);
|
|
69
|
+
var content = useMemo(function () {
|
|
70
|
+
if (loading) {
|
|
71
|
+
return (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [_jsx(Box, { children: _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u62A5\u544A\u52A0\u8F7D\u4E2D\uFF0C\u8BF7\u7A0D\u540E" })) }))] })));
|
|
72
|
+
}
|
|
73
|
+
if (status === NO_ANSWER) {
|
|
74
|
+
return (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [_jsx(Box, { children: _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ style: { marginTop: '2px' } }, { children: _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
|
|
75
|
+
}
|
|
76
|
+
return (_jsxs(Box, __assign({ sx: { background: '#F7F8FA', minHeight: 618, px: 3 } }, { children: [_jsx(SectionTabs, { hasRisk: hasRisk, operableButtons: operableButtons, onExportReportClick: onExportReportClick, fetchReportUrl: fetchReportUrl }), _jsx(Box, __assign({ sx: {
|
|
77
|
+
py: 2,
|
|
78
|
+
} }, { children: _jsxs(Box, __assign({ sx: {
|
|
79
|
+
maxWidth: 1342,
|
|
80
|
+
mx: 'auto',
|
|
81
|
+
backgroundColor: '#fff',
|
|
82
|
+
border: '1px solid rgba(0,0,0,0.06)',
|
|
83
|
+
boxShadow: '0 6px 24px rgba(0,0,0,0.10)',
|
|
84
|
+
borderRadius: 2,
|
|
85
|
+
overflow: 'hidden',
|
|
86
|
+
pb: 3,
|
|
87
|
+
} }, { children: [hasRisk && (_jsx(Box, __assign({ id: "report-risk-alert" }, { children: _jsx(NotFinish, {}) }))), _jsx(V3Header, { v3AssetBase: v3AssetBase, status: status, customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo }), _jsxs(Box, __assign({ sx: { mx: 2, mt: 1.5 } }, { children: [((collection === null || collection === void 0 ? void 0 : collection.length) > 0 || !!(reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaceEvaluation)) && (_jsx(AIEvaluate, {})), _jsx(CapabilityTable, {}), fetchFormResult && _jsx(FormReport, { fetchFormResult: fetchFormResult }), _jsx(VideoQuestion, { isExportPdf: isExportPdf })] }))] })) }))] })));
|
|
88
|
+
}, [
|
|
89
|
+
loading,
|
|
90
|
+
status,
|
|
91
|
+
operableButtons,
|
|
92
|
+
reminderSent,
|
|
93
|
+
onSendReminderClick,
|
|
94
|
+
collection,
|
|
95
|
+
customScore,
|
|
96
|
+
handleRefreshSuccess,
|
|
97
|
+
fetchCandidateInfo,
|
|
98
|
+
fetchReportUrl,
|
|
99
|
+
fetchFormResult,
|
|
100
|
+
isExportPdf,
|
|
101
|
+
]);
|
|
102
|
+
return (_jsx(Box, __assign({ loading: firstLoad.current && loading, sx: {
|
|
103
|
+
width: '100%',
|
|
104
|
+
minHeight: 618,
|
|
105
|
+
background: '#F7F8FA',
|
|
106
|
+
fontFamily: '"Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif',
|
|
107
|
+
} }, { children: content })));
|
|
108
|
+
});
|
|
109
|
+
AiReportRoot.displayName = 'AiReportRoot';
|
|
110
|
+
export default memo(AiReportRoot);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Mode = 'edit' | 'show';
|
|
3
|
+
interface EvaluateProps {
|
|
4
|
+
title: string;
|
|
5
|
+
evaluation: string;
|
|
6
|
+
mode?: Mode;
|
|
7
|
+
canEdit?: boolean;
|
|
8
|
+
orderToken: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Evaluate: React.FC<EvaluateProps>;
|
|
11
|
+
export default Evaluate;
|
|
@@ -0,0 +1,79 @@
|
|
|
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 __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
import { PostInterviewEvaluation } from "../../../../services/ai-report";
|
|
30
|
+
import { Button, confirm, FormItem, Typography } from 'fbm-ui';
|
|
31
|
+
import { Box, Stack } from 'fbm-ui/lib/mui';
|
|
32
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
33
|
+
import { ModuleTitle } from '../ModuleTitle';
|
|
34
|
+
var Evaluate = function (_a) {
|
|
35
|
+
var title = _a.title, evaluation = _a.evaluation, orderToken = _a.orderToken, _b = _a.mode, mode = _b === void 0 ? 'show' : _b, _c = _a.canEdit, canEdit = _c === void 0 ? 'false' : _c;
|
|
36
|
+
var _d = __read(useState(evaluation), 2), content = _d[0], setContent = _d[1];
|
|
37
|
+
var _e = __read(useState('show'), 2), internalMode = _e[0], setInternalMode = _e[1];
|
|
38
|
+
var handleChange = useCallback(function (e) {
|
|
39
|
+
var value = e.target.value;
|
|
40
|
+
setContent(value);
|
|
41
|
+
}, []);
|
|
42
|
+
var handleModeChange = useCallback(function () {
|
|
43
|
+
setInternalMode(internalMode === 'show' ? 'edit' : 'show');
|
|
44
|
+
}, [internalMode]);
|
|
45
|
+
var isValidate = useMemo(function () {
|
|
46
|
+
return content.trim().length > 0;
|
|
47
|
+
}, [content]);
|
|
48
|
+
var handleSubmit = useCallback(function () {
|
|
49
|
+
if (!isValidate)
|
|
50
|
+
return;
|
|
51
|
+
confirm({
|
|
52
|
+
header: null,
|
|
53
|
+
content: '确认将评价内容修改吗?该动作无法被撤销。',
|
|
54
|
+
okText: '修改',
|
|
55
|
+
okProps: {
|
|
56
|
+
color: 'error',
|
|
57
|
+
variant: 'contained',
|
|
58
|
+
},
|
|
59
|
+
onOk: function (_a) {
|
|
60
|
+
var onClose = _a.onClose;
|
|
61
|
+
var data = {
|
|
62
|
+
orderToken: orderToken,
|
|
63
|
+
manualEvaluation: content,
|
|
64
|
+
};
|
|
65
|
+
PostInterviewEvaluation(data).then(handleModeChange).then(onClose).catch(console.error);
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
}, [isValidate, orderToken, content, handleModeChange]);
|
|
69
|
+
useEffect(function () {
|
|
70
|
+
setInternalMode(mode);
|
|
71
|
+
}, [mode]);
|
|
72
|
+
return (_jsxs(Stack, __assign({ sx: {
|
|
73
|
+
mt: 3,
|
|
74
|
+
} }, { children: [_jsx(Box, __assign({ mb: 1, position: "relative" }, { children: _jsx(ModuleTitle, { title: title, action: canEdit ? (_jsx("img", { onClick: handleModeChange, src: "https://webcdn.fbmms.cn/assets/pWED/KpgryvNScI7XZdjNBgTNC", alt: "", style: { width: 24, height: 24, cursor: 'pointer' } })) : undefined }) })), internalMode === 'edit' && (_jsxs(Box, __assign({ width: 1, pr: 2 }, { children: [_jsx(FormItem, { sx: { height: 'auto', pr: 0 }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, onChange: handleChange, error: !isValidate }), _jsxs(Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [_jsx(Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
|
|
75
|
+
handleModeChange();
|
|
76
|
+
setContent(evaluation);
|
|
77
|
+
} }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ size: "medium", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && (_jsx(Box, __assign({ sx: { border: '1px solid #EBFCF7', borderRadius: 2, padding: '12px 16px', background: '#fff' } }, { children: _jsx(Typography, __assign({ variant: "body2", color: "textSecondary", sx: { whiteSpace: 'pre-wrap', fontSize: 14, lineHeight: 1.8 } }, { children: content })) })))] })));
|
|
78
|
+
};
|
|
79
|
+
export default Evaluate;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface Dimension {
|
|
3
|
+
name: string;
|
|
4
|
+
score: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function getLevel(score: any): {
|
|
7
|
+
label: string;
|
|
8
|
+
width: number;
|
|
9
|
+
fontColor: string;
|
|
10
|
+
color: number[];
|
|
11
|
+
gradient: string[];
|
|
12
|
+
scoreGradient: string[];
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
shadowColor: string;
|
|
15
|
+
endScore: number;
|
|
16
|
+
pointColor: string[];
|
|
17
|
+
};
|
|
18
|
+
interface GraphProps {
|
|
19
|
+
items: Array<Dimension>;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: import("react").NamedExoticComponent<GraphProps>;
|
|
22
|
+
export default _default;
|