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
|
@@ -0,0 +1,33 @@
|
|
|
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 { useMemo } from 'react';
|
|
14
|
+
import { Box, InfoIcon, Tooltip, Typography } from 'fbm-ui';
|
|
15
|
+
import { INTERVIEW_STEP_STATUS } from "../../../../enum/ai-report";
|
|
16
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
17
|
+
import { formatScore } from "../../../../utils/utils";
|
|
18
|
+
var STEP_COMPLETED = INTERVIEW_STEP_STATUS.STEP_COMPLETED;
|
|
19
|
+
var ScoreLegend = function (props) {
|
|
20
|
+
var color = props.color;
|
|
21
|
+
var reportResult = useAiReportStore(function (store) { return [store.reportResult]; }).reportResult;
|
|
22
|
+
var _a = reportResult || {}, score = _a.score, steps = _a.steps;
|
|
23
|
+
var title = useMemo(function () {
|
|
24
|
+
return (_jsxs(Box, { children: [_jsx(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u8BA1\u7B97\u516C\u5F0F\uFF1A\u7EFC\u5408\u8BC4\u5206 = \u8BC4\u5206 * \u5355\u9898\u6743\u91CD" })), steps === null || steps === void 0 ? void 0 : steps.map(function (step, index) {
|
|
25
|
+
if (step.scoreInfo.weight && step.status === STEP_COMPLETED) {
|
|
26
|
+
return (_jsxs(Box, { children: [_jsxs(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: [index + 1, ".", step.question.name] })), _jsxs(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: ["\u5F97\u5206\uFF1A", formatScore(step.scoreInfo.score), "\u5206 = ", step.scoreInfo.finalScore.toFixed(0), " * ", step.scoreInfo.weight, "%"] }))] }, step.token));
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
})] }));
|
|
30
|
+
}, [steps]);
|
|
31
|
+
return (_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "center", sx: { mb: 2 } }, { children: [_jsx(Box, { style: { width: '8px', height: '8px', backgroundColor: color } }), _jsxs(Box, __assign({ display: "flex", alignItems: "center", sx: { margin: '0 4px' } }, { children: [_jsx(Typography, __assign({ sx: { fontSize: 12, color: color } }, { children: "\u89C6\u9891\u9762\u8BD5\u5F97\u5206\uFF1A" })), _jsxs(Typography, __assign({ sx: { fontSize: 18, color: color, fontWeight: 700 } }, { children: [formatScore(score || 0), _jsx("span", __assign({ style: { fontSize: 12, fontWeight: 'normal', marginLeft: 2 } }, { children: "\u5206" }))] }))] })), _jsx(Box, { children: _jsx(Tooltip, __assign({ title: title }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: color } }) })) })) })] })));
|
|
32
|
+
};
|
|
33
|
+
export default ScoreLegend;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { Typography } from 'fbm-ui';
|
|
14
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
15
|
+
var Tips = function () {
|
|
16
|
+
return (_jsxs(Stack, __assign({ width: 588, spacing: 3, pl: 3, pr: 2, py: 3, overflow: "scroll" }, { children: [_jsxs(Stack, __assign({ spacing: 2.5 }, { children: [_jsx(Typography, __assign({ color: "textSecondary" }, { children: "\u4E13\u4E1A\u7248\u8BF4\u660E" })), _jsx(Typography, __assign({ fontWeight: "medium" }, { children: "\u6CE8\u610F\uFF1A\u4E13\u4E1A\u7248\u62A5\u544A\u4EE5\u9AD8\u7EA7AI\u6280\u672F\u63D0\u4F9B\u66F4\u7CBE\u51C6\u8BC4\u4F30\uFF0C\u5C5E\u589E\u503C\u4EA7\u54C1\uFF0C\u6BCF\u4E13\u4E1A\u7248\u62A5\u544A\u6309\u6807\u51C6\u72482\u4EBA\u6B21\u8BA1\u8D39\uFF0C\u4EC5\u9996\u6B21\u5347\u7EA7\u6536\u8D39\u3002\u9ED8\u8BA4\u63D0\u4F9B\u6807\u51C6\u7248\uFF0C\u54A8\u8BE2\u5BA2\u6237\u987E\u95EE\u4E86\u89E3\u8D44\u8D39\u4F18\u60E0\u3002" }))] })), _jsxs(Stack, __assign({ spacing: 2.5 }, { children: [_jsx(Typography, __assign({ fontWeight: "medium" }, { children: "\u62A5\u544A\u8BF4\u660E" })), _jsxs(Stack, __assign({ spacing: 0.5 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "1.\u4E13\u4E1A\u7248\u62A5\u544A\u91C7\u7528\u4E86\u66F4\u4E3A\u9AD8\u7EA7\u7684AI\u7B97\u6CD5\u548C\u6280\u672F\uFF0C\u5728\u62E9\u4F18\u548C\u7565\u6C70\u65B9\u9762\u90FD\u80FD\u505A\u5230\u66F4\u9AD8\u51C6\u786E\u5EA6\u3002" })), _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "2.\u5728\u6807\u51C6\u6D4B\u8BD5\u96C6\u4E2D\u7ECF\u8FC7\u591A\u6B21\u6D4B\u8BD5\u5F97\u51FA\uFF0C\u5982\u679C\u9898\u76EE\u8003\u6838\u7684\u80FD\u529B\u7684\u540D\u79F0\u548C\u80FD\u529B\u7684\u8BC4\u5206\u5173\u952E\u70B9\u5185\u5BB9\u66F4\u8D34\u5408\u9898\u76EE\u5185\u5BB9\uFF0C\u6253\u5206\u51C6\u786E\u5EA6\u4E5F\u4F1A\u66F4\u9AD8\u3002\u5728\u76F8\u540C\u7684\u80FD\u529B\u540D\u79F0\u548C\u8BC4\u5206\u5173\u952E\u70B9\u65F6\uFF0C\u4E13\u4E1A\u7248\u8F83\u6807\u51C6\u7248\u7684\u5206\u6570\u51C6\u786E\u5EA6\u63D0\u534721%\u3002" })), _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "3.\u6807\u51C6\u6D4B\u8BD5\u96C6\u4E2D\u91C7\u7528\u7EBF\u4E0A\u771F\u5B9E\u6570\u636E\uFF0C\u4E14\u4FDD\u8BC1\u6570\u636E\u7684\u591A\u6837\u5316\uFF0C\u9002\u7528\u4E8E\u5404\u79CD\u62DB\u8058\u573A\u666F\u3002" })), _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "4.\u4E0B\u9762\u6848\u4F8B\u80FD\u591F\u5E2E\u52A9\u7406\u89E3\u4E24\u4E2A\u7248\u672C\u7684\u5DEE\u5F02\uFF1A" })), _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u95EE\u9898\uFF1A\u8BF7\u5206\u4EAB\u4E00\u4E0B\u60A8\u7684\u804C\u4E1A\u89C4\u5212\u548C\u76EE\u6807\uFF1F" })), _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u5019\u9009\u4EBA\u56DE\u7B54\uFF1A\u9996\u5148\u662F\u5165\u804C\u4E00\u4EFD\u8DDF\u6211\u4E13\u4E1A\u76F8\u5173\u7684\u3002 \u5DE5\u4F5C\uFF0C\u7136\u540E\u3002 \u5728\u63A5\u4E0B\u6765\u7684\u51E0\u5E74\u3002 \u6728\u95E8\u3002 \u5C31\u662F\u7A33\u6B65\u5DE5\u4F5C\uFF0C\u7136\u540E\u6709\u6240\u5B66\u4E60\uFF0C\u7136\u540E\u6709\u6240\u6536\u83B7\u3002 \u5E76\u4E14\u3002 \u719F\u6089\u7684\u4E86\u89E3\u3002 \u6211\u6240\u5DE5\u4F5C\u7684\u6A21\u5757\u7684\u3002 \u6240\u6709\u6D41\u7A0B\uFF0C\u5E76\u4E14\u80FD\u5728\u5176\u4E2D\u83B7\u5F97\u4E00\u4E9B\u77E5\u8BC6" })), _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u8003\u5BDF\u80FD\u529B\uFF1A\u804C\u4E1A\u89C4\u5212\u80FD\u529B" })), _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u8BC4\u5206\u5173\u952E\u70B9\uFF1A\u9700\u8981\u5305\u542B\u5177\u4F53\u7684\u5DE5\u4F5C\u5B89\u6392\u7EC6\u8282\u3002\u5982\u679C\u5019\u9009\u4EBA\u7684\u89C4\u5212\u4E0D\u5177\u6709\u660E\u786E\u6027\u548C\u5B9E\u9645\u6027\uFF0C\u5219\u5C06\u5206\u6570\u6263\u51CF\u523070\u5206\u4EE5\u4E0B\uFF1B" }))] }))] })), _jsxs(Stack, __assign({ direction: "row", spacing: 2 }, { children: [_jsxs(Stack, __assign({ p: 2, flex: 1, spacing: 1, sx: { backgroundColor: '#FAFAFA', borderRadius: 2 } }, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u57FA\u7840\u7248\uFF1A70\u5206" })), _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u5019\u9009\u4EBA\u7684\u56DE\u7B54\u7F3A\u4E4F\u660E\u786E\u6027\u548C\u5B9E\u9645\u6027\uFF0C\u8868\u8FBE\u80FD\u529B\u4E5F\u8F83\u5DEE\uFF0C\u6CA1\u6709\u63D0\u4F9B\u5177\u4F53\u7684\u5DE5\u4F5C\u5B89\u6392\u7EC6\u8282\u3002\u9700\u8981\u5728\u8FD9\u65B9\u9762\u8FDB\u884C\u6539\u8FDB\u3002" }))] })), _jsxs(Stack, __assign({ p: 2, flex: 1, spacing: 1, sx: { backgroundColor: '#FAFAFA', borderRadius: 2 } }, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u4E13\u4E1A\u7248\uFF1A60\u5206" })), _jsxs(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: ["\u5019\u9009\u4EBA\u7684\u56DE\u7B54\u867D\u7136\u8868\u8FBE\u4E86\u5BF9\u804C\u4E1A\u89C4\u5212\u7684\u4E00\u4E9B\u7406\u89E3\uFF0C\u4F46\u662F\u5728\u5B8C\u6574\u5EA6\u3001\u903B\u8F91\u6027\u548C\u8868\u8FBE\u80FD\u529B\u4E0A\u90FD\u5B58\u5728\u4E00\u5B9A\u7684\u95EE\u9898\uFF0C\u6CA1\u6709\u660E\u786E\u7684\u53D1\u5C55\u610F\u613F\u548C\u5BF9\u884C\u4E1A\u7684\u7406\u89E3\uFF0C\u4E5F\u6CA1\u6709\u8868\u73B0\u51FA\u5BF9\u751F\u6D3B\u7684\u70ED\u7231\u548C\u79EF\u6781\u7684\u6001\u5EA6\u3002", ' '] }))] }))] }))] })));
|
|
17
|
+
};
|
|
18
|
+
export default Tips;
|
|
@@ -0,0 +1,39 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
13
|
+
import Failed from './Failed';
|
|
14
|
+
import Score from './Score';
|
|
15
|
+
import { INTERVIEW_STATUS } from "../../../../enum/ai-report";
|
|
16
|
+
import { PostAiInterviewRefresh } from "../../../../services/ai-report";
|
|
17
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
18
|
+
import { useRequest } from 'ahooks';
|
|
19
|
+
import { Box, Message } from 'fbm-ui';
|
|
20
|
+
var FAILED = INTERVIEW_STATUS.FAILED, IN_CALCULATION = INTERVIEW_STATUS.IN_CALCULATION;
|
|
21
|
+
var ScoreReport = function (_a) {
|
|
22
|
+
var customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess, onSwitchReportModel = _a.onSwitchReportModel;
|
|
23
|
+
var _b = useAiReportStore(function (store) { return [store.token, store.reportResult]; }), token = _b.token, reportResult = _b.reportResult;
|
|
24
|
+
var _c = reportResult || {}, _d = _c.status, status = _d === void 0 ? 0 : _d, model = _c.model;
|
|
25
|
+
var _e = useRequest(function () { return PostAiInterviewRefresh(token); }, {
|
|
26
|
+
manual: true,
|
|
27
|
+
onSuccess: function () {
|
|
28
|
+
onRefreshSuccess();
|
|
29
|
+
Message.success('刷新成功');
|
|
30
|
+
},
|
|
31
|
+
}), run = _e.run, loading = _e.loading;
|
|
32
|
+
if ([FAILED, IN_CALCULATION].includes(status)) {
|
|
33
|
+
return (_jsx(Box, __assign({ id: "report-score" }, { children: _jsx(Failed, { status: status, loading: loading, onRefresh: run, model: model, onSwitchReportModel: onSwitchReportModel }) })));
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return (_jsx(Box, { children: _jsx(Score, { model: model, customScore: customScore, loading: loading, onRefresh: run, onSwitchReportModel: onSwitchReportModel }) }));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
export default ScoreReport;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ScoreLegendProps {
|
|
2
|
+
color: string;
|
|
3
|
+
}
|
|
4
|
+
export interface ScoreReportProps {
|
|
5
|
+
customScore?: number;
|
|
6
|
+
onRefreshSuccess: () => void;
|
|
7
|
+
onSwitchReportModel: () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface ScoreProps {
|
|
10
|
+
customScore?: number;
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
model?: 'pro' | 'standard';
|
|
13
|
+
onRefresh: () => void;
|
|
14
|
+
onSwitchReportModel?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export interface FailedProps extends ScoreProps {
|
|
17
|
+
status?: number;
|
|
18
|
+
model?: 'pro' | 'standard';
|
|
19
|
+
onSwitchReportModel: () => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ScoreTypography: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Typography").TypographyProps & {
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
+
export declare const ScoreUnitTypography: 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 RefreshIconRoot: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
children?: import("react").ReactNode;
|
|
10
|
+
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
11
|
+
color?: "inherit" | "disabled" | "action" | "primary" | "secondary" | "success" | "error" | "info" | "warning" | undefined;
|
|
12
|
+
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
13
|
+
htmlColor?: string | undefined;
|
|
14
|
+
shapeRendering?: string | undefined;
|
|
15
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
|
|
16
|
+
titleAccess?: string | undefined;
|
|
17
|
+
viewBox?: string | undefined;
|
|
18
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "name" | "type" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "children" | "key" | "id" | "lang" | "tabIndex" | "role" | "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" | "onLoad" | "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" | "d" | "y" | "values" | "end" | "href" | "viewBox" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "ideographic" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "local" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
|
|
19
|
+
ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
|
|
20
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "titleAccess" | "viewBox"> & {
|
|
21
|
+
children?: import("react").ReactNode;
|
|
22
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RefreshIcon, styled, Typography } from 'fbm-ui';
|
|
2
|
+
export var ScoreTypography = styled(Typography)(function (_a) {
|
|
3
|
+
var theme = _a.theme;
|
|
4
|
+
return ({
|
|
5
|
+
fontSize: 70,
|
|
6
|
+
fontWeight: 700,
|
|
7
|
+
});
|
|
8
|
+
});
|
|
9
|
+
export var ScoreUnitTypography = styled(Typography)(function (_a) {
|
|
10
|
+
var theme = _a.theme;
|
|
11
|
+
return ({
|
|
12
|
+
fontSize: 24,
|
|
13
|
+
marginLeft: 4,
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
export var RefreshIconRoot = styled(RefreshIcon)({
|
|
17
|
+
fontSize: 16,
|
|
18
|
+
position: 'relative',
|
|
19
|
+
top: 2,
|
|
20
|
+
cursor: 'pointer',
|
|
21
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface SectionTabsProps {
|
|
3
|
+
hasRisk?: boolean;
|
|
4
|
+
operableButtons?: Array<'export' | 'refresh' | 'scoreRank' | 'abilities' | 'sendReminder'>;
|
|
5
|
+
onExportReportClick?: () => void;
|
|
6
|
+
fetchReportUrl?: () => Promise<{
|
|
7
|
+
url: string;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
declare const SectionTabs: ({ hasRisk, operableButtons, onExportReportClick, fetchReportUrl }: SectionTabsProps) => JSX.Element;
|
|
11
|
+
export default SectionTabs;
|
|
@@ -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
|
+
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 { Box, Stack } from 'fbm-ui/lib/mui';
|
|
30
|
+
import { Typography } from 'fbm-ui';
|
|
31
|
+
import { ShareIcon } from 'fbm-icons';
|
|
32
|
+
import { useEffect, useRef, useState } from 'react';
|
|
33
|
+
var sections = [
|
|
34
|
+
{ id: 'report-header', name: '基本信息' },
|
|
35
|
+
{ id: 'report-evaluate', name: '综合评价' },
|
|
36
|
+
{ id: 'report-question', name: '答题解析' },
|
|
37
|
+
];
|
|
38
|
+
var SectionTabs = function (_a) {
|
|
39
|
+
var _b = _a.hasRisk, hasRisk = _b === void 0 ? true : _b, _c = _a.operableButtons, operableButtons = _c === void 0 ? [] : _c, onExportReportClick = _a.onExportReportClick, fetchReportUrl = _a.fetchReportUrl;
|
|
40
|
+
var _d = __read(useState('report-header'), 2), active = _d[0], setActive = _d[1];
|
|
41
|
+
var _e = __read(useState(''), 2), reportUrl = _e[0], setReportUrl = _e[1];
|
|
42
|
+
var rootRef = useRef(null);
|
|
43
|
+
useEffect(function () {
|
|
44
|
+
if (!fetchReportUrl)
|
|
45
|
+
return;
|
|
46
|
+
fetchReportUrl()
|
|
47
|
+
.then(function (_a) {
|
|
48
|
+
var url = _a.url;
|
|
49
|
+
return setReportUrl(url);
|
|
50
|
+
})
|
|
51
|
+
.catch(function () { return undefined; });
|
|
52
|
+
}, [fetchReportUrl]);
|
|
53
|
+
useEffect(function () {
|
|
54
|
+
var getScrollParent = function (node) {
|
|
55
|
+
var el = node;
|
|
56
|
+
while (el && el !== document.body) {
|
|
57
|
+
var s = getComputedStyle(el);
|
|
58
|
+
if (/(auto|scroll)/.test(s.overflowY) && el.scrollHeight > el.clientHeight)
|
|
59
|
+
return el;
|
|
60
|
+
el = el.parentElement;
|
|
61
|
+
}
|
|
62
|
+
return window;
|
|
63
|
+
};
|
|
64
|
+
var root = rootRef.current;
|
|
65
|
+
if (!root)
|
|
66
|
+
return;
|
|
67
|
+
var scrollParent = getScrollParent(root);
|
|
68
|
+
var ids = sections.map(function (s) { return s.id; });
|
|
69
|
+
var onScroll = function () {
|
|
70
|
+
var tabHeight = root.offsetHeight || 48;
|
|
71
|
+
var current = ids[0];
|
|
72
|
+
ids.forEach(function (id) {
|
|
73
|
+
var el = document.getElementById(id);
|
|
74
|
+
if (!el)
|
|
75
|
+
return;
|
|
76
|
+
var top = el.getBoundingClientRect().top;
|
|
77
|
+
if (top <= tabHeight)
|
|
78
|
+
current = id;
|
|
79
|
+
});
|
|
80
|
+
setActive(current);
|
|
81
|
+
};
|
|
82
|
+
scrollParent.addEventListener('scroll', onScroll, { passive: true });
|
|
83
|
+
onScroll();
|
|
84
|
+
return function () { return scrollParent.removeEventListener('scroll', onScroll); };
|
|
85
|
+
}, []);
|
|
86
|
+
var handleClick = function (id) {
|
|
87
|
+
var _a;
|
|
88
|
+
if (id === 'report-risk' && !hasRisk)
|
|
89
|
+
return;
|
|
90
|
+
setActive(id);
|
|
91
|
+
(_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
92
|
+
};
|
|
93
|
+
return (_jsx(Box, __assign({ ref: rootRef, sx: {
|
|
94
|
+
position: 'sticky',
|
|
95
|
+
top: 0,
|
|
96
|
+
zIndex: 99,
|
|
97
|
+
background: '#FFFFFF',
|
|
98
|
+
boxShadow: '0 4px 20px rgba(0,0,0,0.08)',
|
|
99
|
+
} }, { children: _jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between", px: 3, py: 1, sx: { maxWidth: 1342, mx: 'auto' } }, { children: [_jsx(Stack, __assign({ direction: "row", spacing: 4 }, { children: sections.map(function (section) { return (_jsxs(Box, __assign({ onClick: function () { return handleClick(section.id); }, sx: {
|
|
100
|
+
cursor: 'pointer',
|
|
101
|
+
position: 'relative',
|
|
102
|
+
opacity: section.id === 'report-risk' && !hasRisk ? 0.5 : 1,
|
|
103
|
+
} }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: 500, sx: { color: active === section.id ? 'rgba(0,0,0,0.8)' : 'rgba(0,0,0,0.4)', fontSize: 14 } }, { children: section.name })), active === section.id && (_jsx(Box, { sx: {
|
|
104
|
+
position: 'absolute',
|
|
105
|
+
left: '50%',
|
|
106
|
+
transform: 'translateX(-50%)',
|
|
107
|
+
bottom: -10,
|
|
108
|
+
width: 30,
|
|
109
|
+
height: 3,
|
|
110
|
+
backgroundColor: '#4BCA50',
|
|
111
|
+
borderRadius: 2,
|
|
112
|
+
} }))] }), section.id)); }) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) ? (_jsxs(Typography, __assign({ variant: "body2", onClick: onExportReportClick, sx: { color: '#4BCA50', display: 'flex', alignItems: 'center', gap: 0.5, cursor: 'pointer', fontSize: 14 } }, { children: ["\u5BFC\u51FA\u62A5\u544A", _jsx(ShareIcon, { sx: { width: 16, height: 16 } })] }))) : reportUrl ? (_jsxs(Typography, __assign({ variant: "body2", onClick: function () { return (window.location.href = reportUrl); }, sx: { color: '#4BCA50', display: 'flex', alignItems: 'center', gap: 0.5, cursor: 'pointer', fontSize: 14 } }, { children: ["\u67E5\u770B\u5728\u7EBF\u62A5\u544A", _jsx(ShareIcon, { sx: { width: 16, height: 16 } })] }))) : (_jsx(Box, { width: 80 }))] })) })));
|
|
113
|
+
};
|
|
114
|
+
export default SectionTabs;
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { BulbFilledIcon, CopyIcon, LayerIcon, styled, Typography } from 'fbm-ui';
|
|
14
|
+
import { Box, Stack } from 'fbm-ui/lib/mui';
|
|
15
|
+
var TagTitle = styled(Box)(function () { return ({
|
|
16
|
+
boxSizing: 'border-box',
|
|
17
|
+
padding: '0 16px',
|
|
18
|
+
minWidth: 100,
|
|
19
|
+
height: 32,
|
|
20
|
+
display: 'inline-block',
|
|
21
|
+
textAlign: 'center',
|
|
22
|
+
color: 'RGBA(0, 0, 0, 0.86)',
|
|
23
|
+
borderLeft: '4px solid #4CAF50',
|
|
24
|
+
backgroundColor: '#E8F5E9',
|
|
25
|
+
margin: '24px 0 16px',
|
|
26
|
+
}); });
|
|
27
|
+
var Suggestion = function (_a) {
|
|
28
|
+
var abilityName = _a.abilityName, interviewQuestion = _a.interviewQuestion, keyPoints = _a.keyPoints;
|
|
29
|
+
return (_jsxs(Stack, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center" }, { children: _jsx(TagTitle, { children: _jsx(Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px' } }, { children: abilityName })) }) })), _jsxs(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [_jsxs(Box, __assign({ display: "flex", flexDirection: "column", style: { background: '#FAFAFA', borderRadius: 8, padding: 16, flex: 1 }, mr: 2 }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", mb: 2 }, { children: [_jsx(BulbFilledIcon, { style: { color: '#4CAF50', fontSize: 16 } }), _jsx(Typography, __assign({ variant: "body2", style: { marginLeft: 4 } }, { children: "\u9762\u8BD5\u95EE\u9898" }))] })), interviewQuestion.map(function (v, index) { return (_jsxs(Box, __assign({ display: "flex", mb: 2 }, { children: [_jsx(CopyIcon, { style: { color: '#81C784', fontSize: 16, marginTop: 4 } }), _jsx(Typography, __assign({ variant: "body2", style: { marginLeft: 4 }, color: "secondary" }, { children: v }))] }), index)); })] })), _jsxs(Box, __assign({ display: "flex", flexDirection: "column", style: { background: '#FFF3E0', borderRadius: 8, padding: 16, flex: 1 } }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", mb: 2 }, { children: [_jsx(LayerIcon, { style: { color: '#FF9800', fontSize: 16 } }), _jsx(Typography, __assign({ variant: "body2", style: { marginLeft: 4 } }, { children: "\u8BC4\u5206\u5173\u952E\u70B9" }))] })), keyPoints.map(function (v, index) { return (_jsxs(Box, __assign({ display: "flex", mb: 2 }, { children: [_jsx(CopyIcon, { style: { color: '#FFB74D', fontSize: 16, marginTop: 4 } }), _jsx(Typography, __assign({ variant: "body2", style: { marginLeft: 4 }, color: "secondary" }, { children: v }))] }), index)); })] }))] }))] }));
|
|
30
|
+
};
|
|
31
|
+
export default Suggestion;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 Suggestion from './Suggestion';
|
|
14
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
15
|
+
import AiHeaderTitle from "../../../../components/AiHeaderTitleV2";
|
|
16
|
+
import { Typography } from 'fbm-ui';
|
|
17
|
+
import { Box, Collapse, Stack } from 'fbm-ui/lib/mui';
|
|
18
|
+
var Index = function () {
|
|
19
|
+
var _a, _b, _c, _d;
|
|
20
|
+
var _e = useAiReportStore(function (store) { return [store.reportResult]; }), reportResult = _e.reportResult, showAiDimension = _e.showAiDimension;
|
|
21
|
+
if (!showAiDimension || !((_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.suggestion) === null || _a === void 0 ? void 0 : _a.show))
|
|
22
|
+
return null;
|
|
23
|
+
return (_jsxs(Box, __assign({ id: "report-suggestion", px: 2, mt: 2, pb: 2 }, { children: [_jsx(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1 }, { children: _jsx(AiHeaderTitle, { name: "\u8003\u5BDF\u5EFA\u8BAE" }) })), _jsx(Typography, __assign({ variant: "body2", color: "secondary", mt: 1 }, { children: (_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.suggestion) === null || _b === void 0 ? void 0 : _b.text })), _jsx(Collapse, __assign({ in: true }, { children: (_d = (_c = reportResult === null || reportResult === void 0 ? void 0 : reportResult.suggestion) === null || _c === void 0 ? void 0 : _c.abilitys) === null || _d === void 0 ? void 0 : _d.map(function (v) {
|
|
24
|
+
return _jsx(Suggestion, { abilityName: v.abilityName, interviewQuestion: v.interviewQuestion, keyPoints: v.keyPoints }, v.abilityName);
|
|
25
|
+
}) }))] })));
|
|
26
|
+
};
|
|
27
|
+
export default Index;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CandidateInfo } from '../Candidate/Interface';
|
|
3
|
+
interface V3HeaderProps {
|
|
4
|
+
status: number;
|
|
5
|
+
customScore?: number;
|
|
6
|
+
onRefreshSuccess: () => void;
|
|
7
|
+
fetchCandidateInfo?: () => Promise<CandidateInfo>;
|
|
8
|
+
v3AssetBase?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const V3Header: ({ status, customScore, onRefreshSuccess, fetchCandidateInfo, v3AssetBase }: V3HeaderProps) => JSX.Element;
|
|
11
|
+
export default V3Header;
|
|
@@ -0,0 +1,154 @@
|
|
|
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 { Box, Stack } from 'fbm-ui/lib/mui';
|
|
30
|
+
import { Button, IconButton, Message, Popover, Typography } from 'fbm-ui';
|
|
31
|
+
import { RefreshIcon } from 'fbm-icons';
|
|
32
|
+
import { useRequest } from 'ahooks';
|
|
33
|
+
import dayjs from 'dayjs';
|
|
34
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
35
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
36
|
+
import { PostAiInterviewRefresh } from "../../../../services/ai-report";
|
|
37
|
+
import { INTERVIEW_STATUS } from "../../../../enum/ai-report";
|
|
38
|
+
import { formatScore } from "../../../../utils/utils";
|
|
39
|
+
var matchLevel = function (score) {
|
|
40
|
+
if (score >= 80)
|
|
41
|
+
return 'high';
|
|
42
|
+
if (score >= 60)
|
|
43
|
+
return 'middle';
|
|
44
|
+
return 'low';
|
|
45
|
+
};
|
|
46
|
+
var matchText = function (level) {
|
|
47
|
+
switch (level) {
|
|
48
|
+
case 'high':
|
|
49
|
+
return '非常匹配';
|
|
50
|
+
case 'middle':
|
|
51
|
+
return '中等匹配';
|
|
52
|
+
default:
|
|
53
|
+
return '匹配度低';
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var matchColor = function (level) {
|
|
57
|
+
switch (level) {
|
|
58
|
+
case 'high':
|
|
59
|
+
return '#FF8908';
|
|
60
|
+
case 'middle':
|
|
61
|
+
return '#18C01F';
|
|
62
|
+
default:
|
|
63
|
+
return '#2360FF';
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var tagColors = [
|
|
67
|
+
{ color: '#009908', bg: '#E7FBF0' },
|
|
68
|
+
{ color: '#FE9D0D', bg: '#FFF3E0' },
|
|
69
|
+
{ color: '#629CFF', bg: '#EAF2FF' },
|
|
70
|
+
{ color: '#FF6C6C', bg: '#FFEBEE' },
|
|
71
|
+
];
|
|
72
|
+
var DefaultAvatar = function () { return (_jsxs("svg", __assign({ viewBox: "0 0 137 192", width: "100%", height: "100%", preserveAspectRatio: "xMidYMid slice" }, { children: [_jsx("defs", { children: _jsxs("linearGradient", __assign({ id: "avbg", x1: "0", y1: "0", x2: "0", y2: "1" }, { children: [_jsx("stop", { offset: "0", stopColor: "#EDF4F0" }), _jsx("stop", { offset: "1", stopColor: "#E2EEE6" })] })) }), _jsx("rect", { width: "137", height: "192", fill: "url(#avbg)" }), _jsx("circle", { cx: "68.5", cy: "78", r: "33", fill: "#C6D8CD" }), _jsx("path", { d: "M26 192c4-45 22-64 42.5-64s38.5 19 42.5 64z", fill: "#C6D8CD" })] }))); };
|
|
73
|
+
var V3Header = function (_a) {
|
|
74
|
+
var _b;
|
|
75
|
+
var status = _a.status, customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess, fetchCandidateInfo = _a.fetchCandidateInfo, _c = _a.v3AssetBase, v3AssetBase = _c === void 0 ? '' : _c;
|
|
76
|
+
var _d = useAiReportStore(function (store) { return [store.token, store.reportResult, store.operableButtons]; }), token = _d.token, reportResult = _d.reportResult, operableButtons = _d.operableButtons;
|
|
77
|
+
var _e = reportResult || {}, _f = _e.score, score = _f === void 0 ? 0 : _f, _g = _e.createTime, createTime = _g === void 0 ? 0 : _g, _h = _e.steps, steps = _h === void 0 ? [] : _h, _j = _e.tags, tags = _j === void 0 ? [] : _j, candidateInfo = _e.candidateInfo;
|
|
78
|
+
var _k = __read(useState(score || 0), 2), feScore = _k[0], setFeScore = _k[1];
|
|
79
|
+
var _l = __read(useState(false), 2), openRefresh = _l[0], setOpenRefresh = _l[1];
|
|
80
|
+
var _m = __read(useState(null), 2), candidate = _m[0], setCandidate = _m[1];
|
|
81
|
+
var _o = __read(useState(false), 2), avatarErr = _o[0], setAvatarErr = _o[1];
|
|
82
|
+
var _p = useRequest(function () { return PostAiInterviewRefresh(token); }, {
|
|
83
|
+
manual: true,
|
|
84
|
+
onSuccess: function () {
|
|
85
|
+
onRefreshSuccess();
|
|
86
|
+
Message.success('刷新成功');
|
|
87
|
+
},
|
|
88
|
+
}), run = _p.run, loading = _p.loading;
|
|
89
|
+
useEffect(function () {
|
|
90
|
+
if (candidateInfo)
|
|
91
|
+
setCandidate(__assign(__assign({}, candidateInfo), { tags: (candidateInfo.tags || []) }));
|
|
92
|
+
}, [candidateInfo]);
|
|
93
|
+
useEffect(function () {
|
|
94
|
+
setAvatarErr(false);
|
|
95
|
+
}, [candidate === null || candidate === void 0 ? void 0 : candidate.avatar]);
|
|
96
|
+
useEffect(function () {
|
|
97
|
+
if (!fetchCandidateInfo)
|
|
98
|
+
return;
|
|
99
|
+
fetchCandidateInfo()
|
|
100
|
+
.then(setCandidate)
|
|
101
|
+
.catch(function () { return Message.error('获取候选人信息失败'); });
|
|
102
|
+
}, [fetchCandidateInfo]);
|
|
103
|
+
useEffect(function () {
|
|
104
|
+
if (typeof customScore === 'number' && customScore > -1) {
|
|
105
|
+
setFeScore(customScore);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
setFeScore(score || 0);
|
|
109
|
+
}
|
|
110
|
+
if (!loading)
|
|
111
|
+
setOpenRefresh(false);
|
|
112
|
+
}, [customScore, score, loading]);
|
|
113
|
+
var durationSeconds = useMemo(function () { return (steps || []).reduce(function (acc, step) { var _a, _b; return acc + (((_b = (_a = step.answer) === null || _a === void 0 ? void 0 : _a.media) === null || _b === void 0 ? void 0 : _b.durationTime) || 0); }, 0); }, [steps]);
|
|
114
|
+
var durationText = useMemo(function () {
|
|
115
|
+
var m = Math.floor(durationSeconds / 60);
|
|
116
|
+
var s = durationSeconds % 60;
|
|
117
|
+
return "".concat(String(m).padStart(2, '0'), ":").concat(String(s).padStart(2, '0'));
|
|
118
|
+
}, [durationSeconds]);
|
|
119
|
+
var level = matchLevel(feScore);
|
|
120
|
+
var labelFile = level === 'high' ? 'high' : level === 'middle' ? 'mid' : 'low';
|
|
121
|
+
var showTags = ((_b = candidate === null || candidate === void 0 ? void 0 : candidate.tags) === null || _b === void 0 ? void 0 : _b.length) ? candidate.tags : (tags === null || tags === void 0 ? void 0 : tags.length) ? tags.map(function (t) { return ({ name: t.name, token: t.token }); }) : [];
|
|
122
|
+
var refreshContent = (_jsxs(Box, __assign({ padding: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", color: "secondary" }, { children: "\u5237\u65B0\u540E\u5C06\u6309\u6700\u65B0\u7B97\u5206\u89C4\u5219\u8BA1\u7B97\uFF0C\u662F\u5426\u786E\u8BA4\u5237\u65B0" })), _jsx(Box, __assign({ paddingTop: 1, textAlign: "right" }, { children: _jsx(Button, __assign({ loading: loading, onClick: run }, { children: "\u5237\u65B0" })) }))] })));
|
|
123
|
+
return (_jsxs(Box, __assign({ id: "report-header", sx: {
|
|
124
|
+
backgroundColor: '#fff',
|
|
125
|
+
backgroundImage: v3AssetBase ? "url('".concat(v3AssetBase, "/01_background.png')") : undefined,
|
|
126
|
+
backgroundRepeat: 'no-repeat',
|
|
127
|
+
backgroundSize: '100% auto',
|
|
128
|
+
backgroundPosition: 'top center',
|
|
129
|
+
} }, { children: [_jsx(Box, __assign({ sx: {
|
|
130
|
+
px: 3,
|
|
131
|
+
pt: 2,
|
|
132
|
+
pb: 1.5,
|
|
133
|
+
} }, { children: _jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 1.5 }, { children: [v3AssetBase && _jsx("img", { src: "".concat(v3AssetBase, "/02_logo.png"), alt: "", width: 18, height: 30 }), _jsx(Typography, __assign({ sx: {
|
|
134
|
+
fontFamily: 'TBMCYXT, "Source Han Sans", sans-serif',
|
|
135
|
+
fontWeight: 400,
|
|
136
|
+
fontSize: 28,
|
|
137
|
+
lineHeight: '39px',
|
|
138
|
+
color: 'rgba(0,0,0,0.86)',
|
|
139
|
+
} }, { children: "AI\u9762\u8BD5\u62A5\u544A" })), _jsxs(Typography, __assign({ variant: "body2", color: "rgba(74,74,74,0.72)", sx: { ml: 1 } }, { children: ["\u62A5\u544A\u751F\u6210\u65F6\u95F4\uFF1A", dayjs(createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: refreshContent, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(IconButton, __assign({ onClick: function () { return setOpenRefresh(true); }, size: "small" }, { children: _jsx(RefreshIcon, { sx: { color: '#009908' } }) })) })))] })) })), _jsx(Box, __assign({ sx: { px: 3, py: 2 } }, { children: _jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 3 }, { children: [_jsx(Box, __assign({ width: 137, height: 170, borderRadius: 2, overflow: "hidden", flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center", bgcolor: "#F2F5F3" }, { children: (candidate === null || candidate === void 0 ? void 0 : candidate.avatar) && !avatarErr ? (_jsx("img", { src: candidate.avatar, alt: "", onError: function () { return setAvatarErr(true); }, style: { width: '100%', height: '100%', objectFit: 'cover' } })) : (_jsx(DefaultAvatar, {})) })), _jsx(Box, __assign({ flex: "1 1 auto", minWidth: 0, sx: {
|
|
140
|
+
background: '#FBFDFC',
|
|
141
|
+
borderRadius: 2,
|
|
142
|
+
px: 2,
|
|
143
|
+
py: 1.5,
|
|
144
|
+
border: '1px solid #EEF6F1',
|
|
145
|
+
alignSelf: 'stretch',
|
|
146
|
+
display: 'flex',
|
|
147
|
+
flexDirection: 'column',
|
|
148
|
+
justifyContent: 'center',
|
|
149
|
+
} }, { children: _jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 3 }, { children: [_jsxs(Box, __assign({ flex: "1 1 auto", minWidth: 0 }, { children: [_jsx(Typography, __assign({ variant: "subtitle1", fontWeight: "bold", sx: { fontSize: 18, color: 'rgba(0,0,0,0.86)' } }, { children: (candidate === null || candidate === void 0 ? void 0 : candidate.positionName) || '' })), _jsxs(Typography, __assign({ variant: "body1", sx: { color: 'rgba(0,0,0,0.6)', mt: 0.5 } }, { children: [(candidate === null || candidate === void 0 ? void 0 : candidate.name) || '', " ", (candidate === null || candidate === void 0 ? void 0 : candidate.mobile) || ''] })), _jsxs(Typography, __assign({ variant: "body2", color: "rgba(0,0,0,0.6)", mt: 1 }, { children: ["\u9762\u8BD5\u65F6\u957F\uFF1A", durationText] })), showTags && showTags.length > 0 && (_jsx(Stack, __assign({ direction: "row", flexWrap: "wrap", gap: 1, mt: 1 }, { children: showTags.map(function (tag, i) {
|
|
150
|
+
var color = tagColors[i % tagColors.length];
|
|
151
|
+
return (_jsx(Box, __assign({ px: 1.2, py: 0.3, borderRadius: 10, sx: { color: color.color, bgcolor: color.bg } }, { children: _jsx(Typography, __assign({ variant: "body2" }, { children: tag.name })) }), tag.token || tag.name));
|
|
152
|
+
}) })))] })), _jsxs(Box, __assign({ alignItems: "flex-end", sx: { display: 'flex', flexDirection: 'column', alignItems: 'flex-end', minWidth: 160 } }, { children: [status === INTERVIEW_STATUS.COMPLETED && v3AssetBase ? (_jsx("img", { src: "".concat(v3AssetBase, "/label_").concat(labelFile, ".png"), alt: matchText(level), width: 134, height: 42 })) : (_jsx(Box, __assign({ sx: { bgcolor: matchColor(level), px: 2, py: 0.75, borderRadius: 2, display: 'inline-flex', alignItems: 'center' } }, { children: _jsx(Typography, __assign({ sx: { color: '#fff', fontSize: 18, fontWeight: 600 } }, { children: status === INTERVIEW_STATUS.COMPLETED ? matchText(level) : '计算中' })) }))), _jsxs(Stack, __assign({ direction: "row", alignItems: "baseline", spacing: 0.5, mt: 1 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "rgba(0,0,0,0.3)", fontWeight: 700 }, { children: "\u603B\u5206\uFF1A" })), _jsx(Typography, __assign({ sx: { fontFamily: 'TBMCYXT, sans-serif', fontWeight: 800, fontSize: 40, lineHeight: 1, color: matchColor(level) } }, { children: formatScore(feScore) })), _jsx(Typography, __assign({ variant: "body2", color: "rgba(0,0,0,0.3)", fontWeight: 700 }, { children: "\u5206" }))] })), v3AssetBase && _jsx("img", { src: "".concat(v3AssetBase, "/04_path.png"), alt: "", width: 110, height: 12 })] }))] })) }))] })) }))] })));
|
|
153
|
+
};
|
|
154
|
+
export default V3Header;
|