eli-video-interview 1.2.42-alpha.7 → 1.2.42-alpha.8
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/modules/ai-report-v2/Root.js +3 -3
- package/esm/modules/ai-report-v2/components/Form/Forms.d.ts +3 -3
- package/esm/modules/ai-report-v2/components/Form/Forms.js +4 -4
- package/esm/modules/ai-report-v2/interface.d.ts +1 -1
- package/esm/modules/ai-report-v2/useAiReport.d.ts +1 -1
- package/lib/modules/ai-report-v2/Root.js +3 -3
- package/lib/modules/ai-report-v2/components/Form/Forms.d.ts +3 -3
- package/lib/modules/ai-report-v2/components/Form/Forms.js +4 -4
- package/lib/modules/ai-report-v2/interface.d.ts +1 -1
- package/lib/modules/ai-report-v2/useAiReport.d.ts +1 -1
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ import { Box, Button, Paper, Typography } from 'fbm-ui';
|
|
|
22
22
|
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
23
23
|
var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER;
|
|
24
24
|
var AiReportRoot = forwardRef(function (props, ref) {
|
|
25
|
-
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick,
|
|
25
|
+
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, fetchFormResult = props.fetchFormResult, fetchCandidateInfo = props.fetchCandidateInfo;
|
|
26
26
|
var firstLoad = useRef(true);
|
|
27
27
|
var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
28
28
|
var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
|
|
@@ -73,7 +73,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
73
73
|
backgroundRepeat: 'no-repeat',
|
|
74
74
|
backgroundPosition: 'center top',
|
|
75
75
|
paddingTop: (collection === null || collection === void 0 ? void 0 : collection.length) > 0 ? 0 : 3,
|
|
76
|
-
} }, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ReportHeader, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status })), _jsx(FormReport, {
|
|
76
|
+
} }, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ReportHeader, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status })), _jsx(FormReport, { fetchFormResult: fetchFormResult }), _jsx(Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: _jsx(VideoQuestion, {}) }))] })));
|
|
77
77
|
}
|
|
78
78
|
}, [
|
|
79
79
|
status,
|
|
@@ -84,7 +84,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
84
84
|
customScore,
|
|
85
85
|
handleRefreshSuccess,
|
|
86
86
|
fetchCandidateInfo,
|
|
87
|
-
|
|
87
|
+
fetchFormResult,
|
|
88
88
|
]);
|
|
89
89
|
return (_jsx(Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '618px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
90
90
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FormReports } from './interface';
|
|
3
3
|
export interface FormsProps {
|
|
4
|
-
|
|
4
|
+
fetchFormResult: () => Promise<FormReports>;
|
|
5
5
|
}
|
|
6
|
-
declare const Forms: ({
|
|
7
|
-
|
|
6
|
+
declare const Forms: ({ fetchFormResult }: {
|
|
7
|
+
fetchFormResult: any;
|
|
8
8
|
}) => JSX.Element;
|
|
9
9
|
export default Forms;
|
|
@@ -29,17 +29,17 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
29
29
|
import Form from './Form';
|
|
30
30
|
import { useEffect, useState } from 'react';
|
|
31
31
|
var Forms = function (_a) {
|
|
32
|
-
var
|
|
32
|
+
var fetchFormResult = _a.fetchFormResult;
|
|
33
33
|
var _b = __read(useState([]), 2), data = _b[0], setData = _b[1];
|
|
34
34
|
useEffect(function () {
|
|
35
|
-
if (
|
|
36
|
-
|
|
35
|
+
if (fetchFormResult) {
|
|
36
|
+
fetchFormResult()
|
|
37
37
|
.then(function (res) {
|
|
38
38
|
setData(res);
|
|
39
39
|
})
|
|
40
40
|
.catch(console);
|
|
41
41
|
}
|
|
42
|
-
}, [
|
|
42
|
+
}, [fetchFormResult]);
|
|
43
43
|
return (_jsx(_Fragment, { children: data.map(function (item, index) { return (_jsx(Form, __assign({}, item), index)); }) }));
|
|
44
44
|
};
|
|
45
45
|
export default Forms;
|
|
@@ -206,7 +206,7 @@ export interface AiReportProps {
|
|
|
206
206
|
onSendReminderClick?: () => void;
|
|
207
207
|
onScoreRankIntervalsChange?: (scoreRankIntervals?: ScoreRankIntervals[]) => void;
|
|
208
208
|
onScoreRankIntervalsSubmit?: (scoreRankIntervals?: ScoreRankIntervals[]) => Promise<any>;
|
|
209
|
-
|
|
209
|
+
fetchFormResult?: () => Promise<FormReports>;
|
|
210
210
|
fetchCandidateInfo?: () => Promise<CandidateInfo>;
|
|
211
211
|
}
|
|
212
212
|
export interface AiReportRef {
|
|
@@ -25,7 +25,7 @@ export declare const useAiReportV2: (props: AiReportProps) => {
|
|
|
25
25
|
onSendReminderClick?: (() => void) | undefined;
|
|
26
26
|
onScoreRankIntervalsChange?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => void) | undefined;
|
|
27
27
|
onScoreRankIntervalsSubmit?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => Promise<any>) | undefined;
|
|
28
|
-
|
|
28
|
+
fetchFormResult?: (() => Promise<import("./components/Form/interface").FormReports>) | undefined;
|
|
29
29
|
fetchCandidateInfo?: (() => Promise<import("./components/Candidate/Interface").CandidateInfo>) | undefined;
|
|
30
30
|
ref: import("react").MutableRefObject<AiReportRef | undefined>;
|
|
31
31
|
};
|
|
@@ -27,7 +27,7 @@ var fbm_ui_1 = require("fbm-ui");
|
|
|
27
27
|
var react_1 = require("react");
|
|
28
28
|
var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER;
|
|
29
29
|
var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
30
|
-
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick,
|
|
30
|
+
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, fetchFormResult = props.fetchFormResult, fetchCandidateInfo = props.fetchCandidateInfo;
|
|
31
31
|
var firstLoad = (0, react_1.useRef)(true);
|
|
32
32
|
var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
33
33
|
var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
|
|
@@ -78,7 +78,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
78
78
|
backgroundRepeat: 'no-repeat',
|
|
79
79
|
backgroundPosition: 'center top',
|
|
80
80
|
paddingTop: (collection === null || collection === void 0 ? void 0 : collection.length) > 0 ? 0 : 3,
|
|
81
|
-
} }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ReportHeader_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status })), (0, jsx_runtime_1.jsx)(Form_1.FormReport, {
|
|
81
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ReportHeader_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status })), (0, jsx_runtime_1.jsx)(Form_1.FormReport, { fetchFormResult: fetchFormResult }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {}) }))] })));
|
|
82
82
|
}
|
|
83
83
|
}, [
|
|
84
84
|
status,
|
|
@@ -89,7 +89,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
89
89
|
customScore,
|
|
90
90
|
handleRefreshSuccess,
|
|
91
91
|
fetchCandidateInfo,
|
|
92
|
-
|
|
92
|
+
fetchFormResult,
|
|
93
93
|
]);
|
|
94
94
|
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '618px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
95
95
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FormReports } from './interface';
|
|
3
3
|
export interface FormsProps {
|
|
4
|
-
|
|
4
|
+
fetchFormResult: () => Promise<FormReports>;
|
|
5
5
|
}
|
|
6
|
-
declare const Forms: ({
|
|
7
|
-
|
|
6
|
+
declare const Forms: ({ fetchFormResult }: {
|
|
7
|
+
fetchFormResult: any;
|
|
8
8
|
}) => JSX.Element;
|
|
9
9
|
export default Forms;
|
|
@@ -34,17 +34,17 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
34
34
|
var Form_1 = __importDefault(require("./Form"));
|
|
35
35
|
var react_1 = require("react");
|
|
36
36
|
var Forms = function (_a) {
|
|
37
|
-
var
|
|
37
|
+
var fetchFormResult = _a.fetchFormResult;
|
|
38
38
|
var _b = __read((0, react_1.useState)([]), 2), data = _b[0], setData = _b[1];
|
|
39
39
|
(0, react_1.useEffect)(function () {
|
|
40
|
-
if (
|
|
41
|
-
|
|
40
|
+
if (fetchFormResult) {
|
|
41
|
+
fetchFormResult()
|
|
42
42
|
.then(function (res) {
|
|
43
43
|
setData(res);
|
|
44
44
|
})
|
|
45
45
|
.catch(console);
|
|
46
46
|
}
|
|
47
|
-
}, [
|
|
47
|
+
}, [fetchFormResult]);
|
|
48
48
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: data.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(Form_1.default, __assign({}, item), index)); }) }));
|
|
49
49
|
};
|
|
50
50
|
exports.default = Forms;
|
|
@@ -206,7 +206,7 @@ export interface AiReportProps {
|
|
|
206
206
|
onSendReminderClick?: () => void;
|
|
207
207
|
onScoreRankIntervalsChange?: (scoreRankIntervals?: ScoreRankIntervals[]) => void;
|
|
208
208
|
onScoreRankIntervalsSubmit?: (scoreRankIntervals?: ScoreRankIntervals[]) => Promise<any>;
|
|
209
|
-
|
|
209
|
+
fetchFormResult?: () => Promise<FormReports>;
|
|
210
210
|
fetchCandidateInfo?: () => Promise<CandidateInfo>;
|
|
211
211
|
}
|
|
212
212
|
export interface AiReportRef {
|
|
@@ -25,7 +25,7 @@ export declare const useAiReportV2: (props: AiReportProps) => {
|
|
|
25
25
|
onSendReminderClick?: (() => void) | undefined;
|
|
26
26
|
onScoreRankIntervalsChange?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => void) | undefined;
|
|
27
27
|
onScoreRankIntervalsSubmit?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => Promise<any>) | undefined;
|
|
28
|
-
|
|
28
|
+
fetchFormResult?: (() => Promise<import("./components/Form/interface").FormReports>) | undefined;
|
|
29
29
|
fetchCandidateInfo?: (() => Promise<import("./components/Candidate/Interface").CandidateInfo>) | undefined;
|
|
30
30
|
ref: import("react").MutableRefObject<AiReportRef | undefined>;
|
|
31
31
|
};
|