eli-video-interview 1.2.39 → 1.2.40-alpha.10
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/react-photo-view/Photo.css +14 -0
- package/esm/components/react-photo-view/Photo.d.ts +18 -0
- package/esm/components/react-photo-view/Photo.js +54 -0
- package/esm/components/react-photo-view/PhotoBox.css +18 -0
- package/esm/components/react-photo-view/PhotoBox.d.ts +22 -0
- package/esm/components/react-photo-view/PhotoBox.js +302 -0
- package/esm/components/react-photo-view/PhotoPage.d.ts +9 -0
- package/esm/components/react-photo-view/PhotoPage.js +77 -0
- package/esm/components/react-photo-view/PhotoProvider.d.ts +14 -0
- package/esm/components/react-photo-view/PhotoProvider.js +98 -0
- package/esm/components/react-photo-view/PhotoSlider.css +125 -0
- package/esm/components/react-photo-view/PhotoSlider.d.ts +12 -0
- package/esm/components/react-photo-view/PhotoSlider.js +262 -0
- package/esm/components/react-photo-view/PhotoView.d.ts +30 -0
- package/esm/components/react-photo-view/PhotoView.js +48 -0
- package/esm/components/react-photo-view/components/ArrowLeft.d.ts +3 -0
- package/esm/components/react-photo-view/components/ArrowLeft.js +18 -0
- package/esm/components/react-photo-view/components/ArrowRight.d.ts +3 -0
- package/esm/components/react-photo-view/components/ArrowRight.js +18 -0
- package/esm/components/react-photo-view/components/CloseIcon.d.ts +3 -0
- package/esm/components/react-photo-view/components/CloseIcon.js +16 -0
- package/esm/components/react-photo-view/components/PreventScroll.d.ts +1 -0
- package/esm/components/react-photo-view/components/PreventScroll.js +12 -0
- package/esm/components/react-photo-view/components/SlidePortal.css +10 -0
- package/esm/components/react-photo-view/components/SlidePortal.d.ts +7 -0
- package/esm/components/react-photo-view/components/SlidePortal.js +30 -0
- package/esm/components/react-photo-view/components/Spinner.css +23 -0
- package/esm/components/react-photo-view/components/Spinner.d.ts +4 -0
- package/esm/components/react-photo-view/components/Spinner.js +29 -0
- package/esm/components/react-photo-view/hooks/useAdjacentImages.d.ts +5 -0
- package/esm/components/react-photo-view/hooks/useAdjacentImages.js +14 -0
- package/esm/components/react-photo-view/hooks/useAnimationOrigin.d.ts +6 -0
- package/esm/components/react-photo-view/hooks/useAnimationOrigin.js +72 -0
- package/esm/components/react-photo-view/hooks/useAnimationPosition.d.ts +2 -0
- package/esm/components/react-photo-view/hooks/useAnimationPosition.js +28 -0
- package/esm/components/react-photo-view/hooks/useAnimationVisible.d.ts +6 -0
- package/esm/components/react-photo-view/hooks/useAnimationVisible.js +49 -0
- package/esm/components/react-photo-view/hooks/useContinuousTap.d.ts +8 -0
- package/esm/components/react-photo-view/hooks/useContinuousTap.js +36 -0
- package/esm/components/react-photo-view/hooks/useDebounceCallback.d.ts +10 -0
- package/esm/components/react-photo-view/hooks/useDebounceCallback.js +48 -0
- package/esm/components/react-photo-view/hooks/useEventListener.d.ts +1 -0
- package/esm/components/react-photo-view/hooks/useEventListener.js +18 -0
- package/esm/components/react-photo-view/hooks/useForkedVariable.d.ts +5 -0
- package/esm/components/react-photo-view/hooks/useForkedVariable.js +17 -0
- package/esm/components/react-photo-view/hooks/useInitial.d.ts +1 -0
- package/esm/components/react-photo-view/hooks/useInitial.js +9 -0
- package/esm/components/react-photo-view/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/esm/components/react-photo-view/hooks/useIsomorphicLayoutEffect.js +3 -0
- package/esm/components/react-photo-view/hooks/useMethods.d.ts +4 -0
- package/esm/components/react-photo-view/hooks/useMethods.js +35 -0
- package/esm/components/react-photo-view/hooks/useMountedRef.d.ts +3 -0
- package/esm/components/react-photo-view/hooks/useMountedRef.js +12 -0
- package/esm/components/react-photo-view/hooks/useScrollPosition.d.ts +4 -0
- package/esm/components/react-photo-view/hooks/useScrollPosition.js +157 -0
- package/esm/components/react-photo-view/hooks/useSetState.d.ts +2 -0
- package/esm/components/react-photo-view/hooks/useSetState.js +15 -0
- package/esm/components/react-photo-view/hooks/useTargetScale.d.ts +4 -0
- package/esm/components/react-photo-view/hooks/useTargetScale.js +70 -0
- package/esm/components/react-photo-view/index.d.ts +4 -0
- package/esm/components/react-photo-view/index.js +4 -0
- package/esm/components/react-photo-view/photo-context.d.ts +11 -0
- package/esm/components/react-photo-view/photo-context.js +2 -0
- package/esm/components/react-photo-view/types.d.ts +196 -0
- package/esm/components/react-photo-view/types.js +1 -0
- package/esm/components/react-photo-view/utils/edgeHandle.d.ts +15 -0
- package/esm/components/react-photo-view/utils/edgeHandle.js +40 -0
- package/esm/components/react-photo-view/utils/getMultipleTouchPosition.d.ts +5 -0
- package/esm/components/react-photo-view/utils/getMultipleTouchPosition.js +11 -0
- package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.d.ts +9 -0
- package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.js +31 -0
- package/esm/components/react-photo-view/utils/getRotateSize.d.ts +4 -0
- package/esm/components/react-photo-view/utils/getRotateSize.js +11 -0
- package/esm/components/react-photo-view/utils/getSuitableImageSize.d.ts +10 -0
- package/esm/components/react-photo-view/utils/getSuitableImageSize.js +42 -0
- package/esm/components/react-photo-view/utils/isTouchDevice.d.ts +5 -0
- package/esm/components/react-photo-view/utils/isTouchDevice.js +5 -0
- package/esm/components/react-photo-view/utils/limitTarget.d.ts +5 -0
- package/esm/components/react-photo-view/utils/limitTarget.js +12 -0
- package/esm/components/react-photo-view/variables.d.ts +48 -0
- package/esm/components/react-photo-view/variables.js +48 -0
- package/esm/constants/ai-question.d.ts +9 -0
- package/esm/constants/ai-question.js +33 -4
- package/esm/enum/ai-question.d.ts +5 -2
- package/esm/enum/ai-question.js +3 -0
- package/esm/modules/ai-ability/Root.js +15 -4
- package/esm/modules/ai-ability-select/Root.js +2 -2
- package/esm/modules/ai-ability-select/interface.d.ts +1 -0
- package/esm/modules/ai-question/components/AiAnalysis/index.js +4 -1
- package/esm/modules/ai-question/components/BootVideo/index.js +1 -1
- package/esm/modules/ai-question/components/QuestionModel/Item.js +14 -9
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +17 -6
- package/esm/modules/ai-question/components/QuestionUpdate/Chioce.d.ts +17 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Chioce.js +97 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +37 -12
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +14 -4
- package/esm/modules/ai-question/components/QuestionUpdate/Score.d.ts +15 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Score.js +53 -0
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +4 -0
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +35 -17
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +10 -0
- package/esm/modules/ai-question/components/QuestionUpdate/styled.d.ts +15 -0
- package/esm/modules/ai-question/components/QuestionUpdate/styled.js +56 -1
- package/esm/modules/ai-report/Root.js +1 -1
- package/esm/modules/ai-report/components/ScoreReport/Score.js +4 -1
- package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +5 -3
- package/esm/modules/ai-report/components/VideoQuestion/BodyImages.d.ts +7 -0
- package/esm/modules/ai-report/components/VideoQuestion/BodyImages.js +40 -0
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +9 -4
- package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.js +4 -4
- package/esm/modules/ai-report/components/VideoQuestion/SingleChoice.d.ts +8 -0
- package/esm/modules/ai-report/components/VideoQuestion/SingleChoice.js +31 -0
- package/esm/modules/ai-report/components/VideoQuestion/index.js +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/interface.d.ts +2 -0
- package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -0
- package/esm/modules/ai-report/components/VideoQuestion/styled.js +7 -1
- package/esm/modules/ai-report/interface.d.ts +19 -0
- package/esm/services/ai-ability.d.ts +1 -1
- package/esm/services/ai-ability.js +1 -1
- package/esm/store/ai-question/ai-analysis-store.js +0 -1
- package/lib/components/react-photo-view/Photo.css +14 -0
- package/lib/components/react-photo-view/Photo.d.ts +18 -0
- package/lib/components/react-photo-view/Photo.js +60 -0
- package/lib/components/react-photo-view/PhotoBox.css +18 -0
- package/lib/components/react-photo-view/PhotoBox.d.ts +22 -0
- package/lib/components/react-photo-view/PhotoBox.js +308 -0
- package/lib/components/react-photo-view/PhotoPage.d.ts +9 -0
- package/lib/components/react-photo-view/PhotoPage.js +79 -0
- package/lib/components/react-photo-view/PhotoProvider.d.ts +14 -0
- package/lib/components/react-photo-view/PhotoProvider.js +104 -0
- package/lib/components/react-photo-view/PhotoSlider.css +125 -0
- package/lib/components/react-photo-view/PhotoSlider.d.ts +12 -0
- package/lib/components/react-photo-view/PhotoSlider.js +268 -0
- package/lib/components/react-photo-view/PhotoView.d.ts +30 -0
- package/lib/components/react-photo-view/PhotoView.js +53 -0
- package/lib/components/react-photo-view/components/ArrowLeft.d.ts +3 -0
- package/lib/components/react-photo-view/components/ArrowLeft.js +20 -0
- package/lib/components/react-photo-view/components/ArrowRight.d.ts +3 -0
- package/lib/components/react-photo-view/components/ArrowRight.js +20 -0
- package/lib/components/react-photo-view/components/CloseIcon.d.ts +3 -0
- package/lib/components/react-photo-view/components/CloseIcon.js +18 -0
- package/lib/components/react-photo-view/components/PreventScroll.d.ts +1 -0
- package/lib/components/react-photo-view/components/PreventScroll.js +15 -0
- package/lib/components/react-photo-view/components/SlidePortal.css +10 -0
- package/lib/components/react-photo-view/components/SlidePortal.d.ts +7 -0
- package/lib/components/react-photo-view/components/SlidePortal.js +32 -0
- package/lib/components/react-photo-view/components/Spinner.css +23 -0
- package/lib/components/react-photo-view/components/Spinner.d.ts +4 -0
- package/lib/components/react-photo-view/components/Spinner.js +31 -0
- package/lib/components/react-photo-view/hooks/useAdjacentImages.d.ts +5 -0
- package/lib/components/react-photo-view/hooks/useAdjacentImages.js +17 -0
- package/lib/components/react-photo-view/hooks/useAnimationOrigin.d.ts +6 -0
- package/lib/components/react-photo-view/hooks/useAnimationOrigin.js +78 -0
- package/lib/components/react-photo-view/hooks/useAnimationPosition.d.ts +2 -0
- package/lib/components/react-photo-view/hooks/useAnimationPosition.js +34 -0
- package/lib/components/react-photo-view/hooks/useAnimationVisible.d.ts +6 -0
- package/lib/components/react-photo-view/hooks/useAnimationVisible.js +55 -0
- package/lib/components/react-photo-view/hooks/useContinuousTap.d.ts +8 -0
- package/lib/components/react-photo-view/hooks/useContinuousTap.js +42 -0
- package/lib/components/react-photo-view/hooks/useDebounceCallback.d.ts +10 -0
- package/lib/components/react-photo-view/hooks/useDebounceCallback.js +51 -0
- package/lib/components/react-photo-view/hooks/useEventListener.d.ts +1 -0
- package/lib/components/react-photo-view/hooks/useEventListener.js +21 -0
- package/lib/components/react-photo-view/hooks/useForkedVariable.d.ts +5 -0
- package/lib/components/react-photo-view/hooks/useForkedVariable.js +20 -0
- package/lib/components/react-photo-view/hooks/useInitial.d.ts +1 -0
- package/lib/components/react-photo-view/hooks/useInitial.js +12 -0
- package/lib/components/react-photo-view/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/lib/components/react-photo-view/hooks/useIsomorphicLayoutEffect.js +5 -0
- package/lib/components/react-photo-view/hooks/useMethods.d.ts +4 -0
- package/lib/components/react-photo-view/hooks/useMethods.js +38 -0
- package/lib/components/react-photo-view/hooks/useMountedRef.d.ts +3 -0
- package/lib/components/react-photo-view/hooks/useMountedRef.js +14 -0
- package/lib/components/react-photo-view/hooks/useScrollPosition.d.ts +4 -0
- package/lib/components/react-photo-view/hooks/useScrollPosition.js +163 -0
- package/lib/components/react-photo-view/hooks/useSetState.d.ts +2 -0
- package/lib/components/react-photo-view/hooks/useSetState.js +18 -0
- package/lib/components/react-photo-view/hooks/useTargetScale.d.ts +4 -0
- package/lib/components/react-photo-view/hooks/useTargetScale.js +76 -0
- package/lib/components/react-photo-view/index.d.ts +4 -0
- package/lib/components/react-photo-view/index.js +12 -0
- package/lib/components/react-photo-view/photo-context.d.ts +11 -0
- package/lib/components/react-photo-view/photo-context.js +4 -0
- package/lib/components/react-photo-view/types.d.ts +196 -0
- package/lib/components/react-photo-view/types.js +2 -0
- package/lib/components/react-photo-view/utils/edgeHandle.d.ts +15 -0
- package/lib/components/react-photo-view/utils/edgeHandle.js +45 -0
- package/lib/components/react-photo-view/utils/getMultipleTouchPosition.d.ts +5 -0
- package/lib/components/react-photo-view/utils/getMultipleTouchPosition.js +14 -0
- package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.d.ts +9 -0
- package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.js +34 -0
- package/lib/components/react-photo-view/utils/getRotateSize.d.ts +4 -0
- package/lib/components/react-photo-view/utils/getRotateSize.js +14 -0
- package/lib/components/react-photo-view/utils/getSuitableImageSize.d.ts +10 -0
- package/lib/components/react-photo-view/utils/getSuitableImageSize.js +48 -0
- package/lib/components/react-photo-view/utils/isTouchDevice.d.ts +5 -0
- package/lib/components/react-photo-view/utils/isTouchDevice.js +7 -0
- package/lib/components/react-photo-view/utils/limitTarget.d.ts +5 -0
- package/lib/components/react-photo-view/utils/limitTarget.js +17 -0
- package/lib/components/react-photo-view/variables.d.ts +48 -0
- package/lib/components/react-photo-view/variables.js +51 -0
- package/lib/constants/ai-question.d.ts +9 -0
- package/lib/constants/ai-question.js +34 -5
- package/lib/enum/ai-question.d.ts +5 -2
- package/lib/enum/ai-question.js +3 -0
- package/lib/modules/ai-ability/Root.js +15 -4
- package/lib/modules/ai-ability-select/Root.js +2 -2
- package/lib/modules/ai-ability-select/interface.d.ts +1 -0
- package/lib/modules/ai-question/components/AiAnalysis/index.js +4 -1
- package/lib/modules/ai-question/components/BootVideo/index.js +1 -1
- package/lib/modules/ai-question/components/QuestionModel/Item.js +11 -6
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +15 -4
- package/lib/modules/ai-question/components/QuestionUpdate/Chioce.d.ts +17 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Chioce.js +104 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +35 -10
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +12 -2
- package/lib/modules/ai-question/components/QuestionUpdate/Score.d.ts +15 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Score.js +57 -0
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +4 -0
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +34 -16
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +10 -0
- package/lib/modules/ai-question/components/QuestionUpdate/styled.d.ts +15 -0
- package/lib/modules/ai-question/components/QuestionUpdate/styled.js +56 -1
- package/lib/modules/ai-report/Root.js +1 -1
- package/lib/modules/ai-report/components/ScoreReport/Score.js +4 -1
- package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +5 -3
- package/lib/modules/ai-report/components/VideoQuestion/BodyImages.d.ts +7 -0
- package/lib/modules/ai-report/components/VideoQuestion/BodyImages.js +45 -0
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +8 -3
- package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.js +4 -4
- package/lib/modules/ai-report/components/VideoQuestion/SingleChoice.d.ts +8 -0
- package/lib/modules/ai-report/components/VideoQuestion/SingleChoice.js +33 -0
- package/lib/modules/ai-report/components/VideoQuestion/index.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/interface.d.ts +2 -0
- package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -0
- package/lib/modules/ai-report/components/VideoQuestion/styled.js +8 -2
- package/lib/modules/ai-report/interface.d.ts +19 -0
- package/lib/services/ai-ability.d.ts +1 -1
- package/lib/services/ai-ability.js +1 -1
- package/lib/store/ai-question/ai-analysis-store.js +0 -1
- package/package.json +2 -2
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var variables_1 = require("../variables");
|
|
7
|
+
var getRotateSize_1 = __importDefault(require("./getRotateSize"));
|
|
8
|
+
/**
|
|
9
|
+
* 获取图片合适的大小
|
|
10
|
+
*/
|
|
11
|
+
function getSuitableImageSize(naturalWidth, naturalHeight, rotate) {
|
|
12
|
+
var _a = (0, getRotateSize_1.default)(rotate, window.innerWidth, window.innerHeight), currentWidth = _a[0], currentHeight = _a[1], isVertical = _a[2];
|
|
13
|
+
var y = 0;
|
|
14
|
+
var width = currentWidth;
|
|
15
|
+
var height = currentHeight;
|
|
16
|
+
// 自适应宽高
|
|
17
|
+
var autoWidth = (naturalWidth / naturalHeight) * currentHeight;
|
|
18
|
+
var autoHeight = (naturalHeight / naturalWidth) * currentWidth;
|
|
19
|
+
if (naturalWidth < currentWidth && naturalHeight < currentHeight) {
|
|
20
|
+
width = naturalWidth;
|
|
21
|
+
height = naturalHeight;
|
|
22
|
+
}
|
|
23
|
+
else if (naturalWidth < currentWidth && naturalHeight >= currentHeight) {
|
|
24
|
+
width = autoWidth;
|
|
25
|
+
}
|
|
26
|
+
else if (naturalWidth >= currentWidth && naturalHeight < currentHeight) {
|
|
27
|
+
height = autoHeight;
|
|
28
|
+
}
|
|
29
|
+
else if (naturalWidth / naturalHeight > currentWidth / currentHeight) {
|
|
30
|
+
height = autoHeight;
|
|
31
|
+
}
|
|
32
|
+
// 长图模式
|
|
33
|
+
else if (naturalHeight / naturalWidth >= variables_1.longModeRatio && !isVertical) {
|
|
34
|
+
height = autoHeight;
|
|
35
|
+
y = (height - currentHeight) / 2;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
width = autoWidth;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
width: width,
|
|
42
|
+
height: height,
|
|
43
|
+
x: 0,
|
|
44
|
+
y: y,
|
|
45
|
+
pause: true,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
exports.default = getSuitableImageSize;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.limitScale = exports.limitNumber = void 0;
|
|
4
|
+
var variables_1 = require("../variables");
|
|
5
|
+
var limitNumber = function (value, min, max) {
|
|
6
|
+
return Math.max(Math.min(value, max), min);
|
|
7
|
+
};
|
|
8
|
+
exports.limitNumber = limitNumber;
|
|
9
|
+
/**
|
|
10
|
+
* 限制最大/最小缩放
|
|
11
|
+
*/
|
|
12
|
+
var limitScale = function (scale, max, buffer) {
|
|
13
|
+
if (max === void 0) { max = 0; }
|
|
14
|
+
if (buffer === void 0) { buffer = 0; }
|
|
15
|
+
return (0, exports.limitNumber)(scale, variables_1.minScale * (1 - buffer), Math.max(variables_1.maxScale, max) * (1 + buffer));
|
|
16
|
+
};
|
|
17
|
+
exports.limitScale = limitScale;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 最大触摸时间
|
|
3
|
+
*/
|
|
4
|
+
export declare const maxTouchTime = 200;
|
|
5
|
+
/**
|
|
6
|
+
* 默认动画速度
|
|
7
|
+
*/
|
|
8
|
+
export declare const defaultSpeed = 400;
|
|
9
|
+
/**
|
|
10
|
+
* 默认动画函数
|
|
11
|
+
*/
|
|
12
|
+
export declare const defaultEasing = "cubic-bezier(0.25, 0.8, 0.25, 1)";
|
|
13
|
+
/**
|
|
14
|
+
* 最大滑动切换图片距离
|
|
15
|
+
*/
|
|
16
|
+
export declare const maxMoveOffset = 40;
|
|
17
|
+
/**
|
|
18
|
+
* 图片的间隔
|
|
19
|
+
*/
|
|
20
|
+
export declare const horizontalOffset = 20;
|
|
21
|
+
/**
|
|
22
|
+
* 最小初始响应距离
|
|
23
|
+
*/
|
|
24
|
+
export declare const minStartTouchOffset = 20;
|
|
25
|
+
/**
|
|
26
|
+
* 默认背景透明度
|
|
27
|
+
*/
|
|
28
|
+
export declare const defaultOpacity = 1;
|
|
29
|
+
/**
|
|
30
|
+
* 最小缩放度
|
|
31
|
+
*/
|
|
32
|
+
export declare const minScale = 1;
|
|
33
|
+
/**
|
|
34
|
+
* 最大缩放度(若图片足够大,则会超出)
|
|
35
|
+
*/
|
|
36
|
+
export declare const maxScale = 6;
|
|
37
|
+
/**
|
|
38
|
+
* 最小长图模式比例
|
|
39
|
+
*/
|
|
40
|
+
export declare const longModeRatio = 3;
|
|
41
|
+
/**
|
|
42
|
+
* 缩放弹性缓冲
|
|
43
|
+
*/
|
|
44
|
+
export declare const scaleBuffer = 0.2;
|
|
45
|
+
/**
|
|
46
|
+
* 最大等待动画时间
|
|
47
|
+
*/
|
|
48
|
+
export declare const maxWaitAnimationTime = 250;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.maxWaitAnimationTime = exports.scaleBuffer = exports.longModeRatio = exports.maxScale = exports.minScale = exports.defaultOpacity = exports.minStartTouchOffset = exports.horizontalOffset = exports.maxMoveOffset = exports.defaultEasing = exports.defaultSpeed = exports.maxTouchTime = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* 最大触摸时间
|
|
6
|
+
*/
|
|
7
|
+
exports.maxTouchTime = 200;
|
|
8
|
+
/**
|
|
9
|
+
* 默认动画速度
|
|
10
|
+
*/
|
|
11
|
+
exports.defaultSpeed = 400;
|
|
12
|
+
/**
|
|
13
|
+
* 默认动画函数
|
|
14
|
+
*/
|
|
15
|
+
exports.defaultEasing = 'cubic-bezier(0.25, 0.8, 0.25, 1)';
|
|
16
|
+
/**
|
|
17
|
+
* 最大滑动切换图片距离
|
|
18
|
+
*/
|
|
19
|
+
exports.maxMoveOffset = 40;
|
|
20
|
+
/**
|
|
21
|
+
* 图片的间隔
|
|
22
|
+
*/
|
|
23
|
+
exports.horizontalOffset = 20;
|
|
24
|
+
/**
|
|
25
|
+
* 最小初始响应距离
|
|
26
|
+
*/
|
|
27
|
+
exports.minStartTouchOffset = 20;
|
|
28
|
+
/**
|
|
29
|
+
* 默认背景透明度
|
|
30
|
+
*/
|
|
31
|
+
exports.defaultOpacity = 1;
|
|
32
|
+
/**
|
|
33
|
+
* 最小缩放度
|
|
34
|
+
*/
|
|
35
|
+
exports.minScale = 1;
|
|
36
|
+
/**
|
|
37
|
+
* 最大缩放度(若图片足够大,则会超出)
|
|
38
|
+
*/
|
|
39
|
+
exports.maxScale = 6;
|
|
40
|
+
/**
|
|
41
|
+
* 最小长图模式比例
|
|
42
|
+
*/
|
|
43
|
+
exports.longModeRatio = 3;
|
|
44
|
+
/**
|
|
45
|
+
* 缩放弹性缓冲
|
|
46
|
+
*/
|
|
47
|
+
exports.scaleBuffer = 0.2;
|
|
48
|
+
/**
|
|
49
|
+
* 最大等待动画时间
|
|
50
|
+
*/
|
|
51
|
+
exports.maxWaitAnimationTime = 250;
|
|
@@ -2,9 +2,17 @@ import { QuestionParams } from '@/modules/ai-question/components/QuestionUpdate/
|
|
|
2
2
|
import { ADD_QUESTION_TYPE } from '@enum/ai-question';
|
|
3
3
|
export declare const ADD_QUESTION_TYPE_LIST: {
|
|
4
4
|
type: ADD_QUESTION_TYPE;
|
|
5
|
+
hide: boolean;
|
|
5
6
|
title: string;
|
|
6
7
|
desc: string;
|
|
7
8
|
}[];
|
|
9
|
+
export declare const ADD_QUESTION_TYPE_SHOW_LIST: {
|
|
10
|
+
type: ADD_QUESTION_TYPE;
|
|
11
|
+
hide: boolean;
|
|
12
|
+
title: string;
|
|
13
|
+
desc: string;
|
|
14
|
+
}[];
|
|
15
|
+
export declare const QUESTION_TYPE_TITLE_MAP: {};
|
|
8
16
|
export declare const QUESTION_TYPE_MAPPING_LABEL: {
|
|
9
17
|
1: string;
|
|
10
18
|
2: string;
|
|
@@ -41,4 +49,5 @@ export declare const MAX_UPLOAD_FILE_SIZE: number;
|
|
|
41
49
|
export declare const MAX_UPLOAD_VIDEO_FILE_SIZE: number;
|
|
42
50
|
export declare const TEST_TYPE_READONLY: number[];
|
|
43
51
|
export declare const DISABLED_REPEAT_TYPE: number[];
|
|
52
|
+
export declare const DISABLED_COST_TYPE: number[];
|
|
44
53
|
export declare const IS_AI_ANALYSIS: (step: Pick<QuestionParams, 'aiType'>) => boolean;
|
|
@@ -1,22 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.IS_AI_ANALYSIS = exports.DISABLED_REPEAT_TYPE = exports.TEST_TYPE_READONLY = exports.MAX_UPLOAD_VIDEO_FILE_SIZE = exports.MAX_UPLOAD_FILE_SIZE = exports.AiVideoStatus = exports.InteractiveModes = exports.DEFAULT_VITUAL_HUMAN_LIST = exports.DEFAULT_GUIDE_VIDEO = exports.DEFAULT_GUIDE_VIDEO_THUMB_URL = exports.DEFAULT_GUIDE_VIDEO_URL = exports.QUESTION_TYPE_MAPPING_LABEL = exports.ADD_QUESTION_TYPE_LIST = void 0;
|
|
4
|
+
exports.IS_AI_ANALYSIS = exports.DISABLED_COST_TYPE = exports.DISABLED_REPEAT_TYPE = exports.TEST_TYPE_READONLY = exports.MAX_UPLOAD_VIDEO_FILE_SIZE = exports.MAX_UPLOAD_FILE_SIZE = exports.AiVideoStatus = exports.InteractiveModes = exports.DEFAULT_VITUAL_HUMAN_LIST = exports.DEFAULT_GUIDE_VIDEO = exports.DEFAULT_GUIDE_VIDEO_THUMB_URL = exports.DEFAULT_GUIDE_VIDEO_URL = exports.QUESTION_TYPE_MAPPING_LABEL = exports.QUESTION_TYPE_TITLE_MAP = exports.ADD_QUESTION_TYPE_SHOW_LIST = exports.ADD_QUESTION_TYPE_LIST = void 0;
|
|
5
5
|
var ai_question_1 = require("../enum/ai-question");
|
|
6
|
-
var FREE = ai_question_1.ADD_QUESTION_TYPE.FREE, LANGUAGE = ai_question_1.ADD_QUESTION_TYPE.LANGUAGE;
|
|
6
|
+
var FREE = ai_question_1.ADD_QUESTION_TYPE.FREE, LANGUAGE = ai_question_1.ADD_QUESTION_TYPE.LANGUAGE, EVALUATION = ai_question_1.ADD_QUESTION_TYPE.EVALUATION, SINGLECHIOCE = ai_question_1.ADD_QUESTION_TYPE.SINGLECHIOCE;
|
|
7
7
|
var QA = ai_question_1.QUESTION_TYPE.QA, COLOR_BLINDNESS = ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS, ALPHABETIC_DICTATION = ai_question_1.QUESTION_TYPE.ALPHABETIC_DICTATION, AI_ANALYSIS = ai_question_1.QUESTION_TYPE.AI_ANALYSIS, POLICY_DECISION_GAME = ai_question_1.QUESTION_TYPE.POLICY_DECISION_GAME, MEMORY_GAME = ai_question_1.QUESTION_TYPE.MEMORY_GAME, EMOTION_GAME = ai_question_1.QUESTION_TYPE.EMOTION_GAME;
|
|
8
|
+
/*
|
|
9
|
+
* 题目类型列表
|
|
10
|
+
*/
|
|
8
11
|
exports.ADD_QUESTION_TYPE_LIST = [
|
|
9
12
|
{
|
|
10
13
|
type: FREE,
|
|
11
|
-
|
|
14
|
+
hide: false,
|
|
15
|
+
title: '问答题',
|
|
12
16
|
desc: '以问答的形式要求候选人对你定问题作答。',
|
|
13
17
|
},
|
|
14
18
|
{
|
|
15
19
|
type: LANGUAGE,
|
|
20
|
+
hide: false,
|
|
16
21
|
title: '朗读题',
|
|
17
22
|
desc: '候选人根据所提供的文案进行朗读。',
|
|
18
23
|
},
|
|
24
|
+
{
|
|
25
|
+
type: EVALUATION,
|
|
26
|
+
hide: true,
|
|
27
|
+
title: '评测题',
|
|
28
|
+
desc: '候选人根据所提供的文案进行朗读。',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: SINGLECHIOCE,
|
|
32
|
+
hide: false,
|
|
33
|
+
title: '单选题',
|
|
34
|
+
desc: '以单选的形式要求候选人对问题进行作答。',
|
|
35
|
+
},
|
|
19
36
|
];
|
|
37
|
+
/*
|
|
38
|
+
* 可以自定义的题目类型列表
|
|
39
|
+
*/
|
|
40
|
+
exports.ADD_QUESTION_TYPE_SHOW_LIST = exports.ADD_QUESTION_TYPE_LIST.filter(function (v) { return !v.hide; });
|
|
41
|
+
/*
|
|
42
|
+
* 题目类型名称映射表
|
|
43
|
+
*/
|
|
44
|
+
exports.QUESTION_TYPE_TITLE_MAP = exports.ADD_QUESTION_TYPE_LIST.reduce(function (acc, cur) {
|
|
45
|
+
acc[cur.type] = cur.title;
|
|
46
|
+
return acc;
|
|
47
|
+
}, {});
|
|
20
48
|
exports.QUESTION_TYPE_MAPPING_LABEL = (_a = {},
|
|
21
49
|
_a[QA] = '问答题',
|
|
22
50
|
_a[COLOR_BLINDNESS] = '色盲题',
|
|
@@ -55,8 +83,9 @@ exports.AiVideoStatus = {
|
|
|
55
83
|
};
|
|
56
84
|
exports.MAX_UPLOAD_FILE_SIZE = 1024 * 1024 * 20;
|
|
57
85
|
exports.MAX_UPLOAD_VIDEO_FILE_SIZE = 1024 * 1024 * 500;
|
|
58
|
-
exports.TEST_TYPE_READONLY = [2, 3, 4, 7, 8, 9, 10, 11, 12];
|
|
59
|
-
exports.DISABLED_REPEAT_TYPE = [2, 4, 7, 8, 9, 11, 12];
|
|
86
|
+
exports.TEST_TYPE_READONLY = [2, 3, 4, 7, 8, 9, 10, 11, 12, 16];
|
|
87
|
+
exports.DISABLED_REPEAT_TYPE = [2, 4, 7, 8, 9, 11, 12, 16, 17];
|
|
88
|
+
exports.DISABLED_COST_TYPE = [7, 9, 8, 4, 11, 2, 16];
|
|
60
89
|
// 是否开启AI分析
|
|
61
90
|
var IS_AI_ANALYSIS = function (step) { return step.aiType === 2; };
|
|
62
91
|
exports.IS_AI_ANALYSIS = IS_AI_ANALYSIS;
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare enum ADD_QUESTION_TYPE {
|
|
5
5
|
FREE = 1,
|
|
6
|
-
LANGUAGE = 2
|
|
6
|
+
LANGUAGE = 2,
|
|
7
|
+
EVALUATION = 3,
|
|
8
|
+
SINGLECHIOCE = 4
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* AI考核标准类型
|
|
@@ -34,5 +36,6 @@ export declare enum QUESTION_TYPE {
|
|
|
34
36
|
AI_ANALYSIS = 6,
|
|
35
37
|
POLICY_DECISION_GAME = 7,
|
|
36
38
|
MEMORY_GAME = 8,
|
|
37
|
-
EMOTION_GAME = 9
|
|
39
|
+
EMOTION_GAME = 9,
|
|
40
|
+
SINGLECHIOCE = 17
|
|
38
41
|
}
|
package/lib/enum/ai-question.js
CHANGED
|
@@ -8,6 +8,8 @@ var ADD_QUESTION_TYPE;
|
|
|
8
8
|
(function (ADD_QUESTION_TYPE) {
|
|
9
9
|
ADD_QUESTION_TYPE[ADD_QUESTION_TYPE["FREE"] = 1] = "FREE";
|
|
10
10
|
ADD_QUESTION_TYPE[ADD_QUESTION_TYPE["LANGUAGE"] = 2] = "LANGUAGE";
|
|
11
|
+
ADD_QUESTION_TYPE[ADD_QUESTION_TYPE["EVALUATION"] = 3] = "EVALUATION";
|
|
12
|
+
ADD_QUESTION_TYPE[ADD_QUESTION_TYPE["SINGLECHIOCE"] = 4] = "SINGLECHIOCE";
|
|
11
13
|
})(ADD_QUESTION_TYPE = exports.ADD_QUESTION_TYPE || (exports.ADD_QUESTION_TYPE = {}));
|
|
12
14
|
/**
|
|
13
15
|
* AI考核标准类型
|
|
@@ -42,4 +44,5 @@ var QUESTION_TYPE;
|
|
|
42
44
|
QUESTION_TYPE[QUESTION_TYPE["POLICY_DECISION_GAME"] = 7] = "POLICY_DECISION_GAME";
|
|
43
45
|
QUESTION_TYPE[QUESTION_TYPE["MEMORY_GAME"] = 8] = "MEMORY_GAME";
|
|
44
46
|
QUESTION_TYPE[QUESTION_TYPE["EMOTION_GAME"] = 9] = "EMOTION_GAME";
|
|
47
|
+
QUESTION_TYPE[QUESTION_TYPE["SINGLECHIOCE"] = 17] = "SINGLECHIOCE";
|
|
45
48
|
})(QUESTION_TYPE = exports.QUESTION_TYPE || (exports.QUESTION_TYPE = {}));
|
|
@@ -59,6 +59,7 @@ var ahooks_1 = require("ahooks");
|
|
|
59
59
|
var dayjs_1 = __importDefault(require("dayjs"));
|
|
60
60
|
var fbm_ui_1 = require("fbm-ui");
|
|
61
61
|
var react_1 = require("react");
|
|
62
|
+
var PAGE_SIZE = 20;
|
|
62
63
|
var AiAbilityRoot = function (_a) {
|
|
63
64
|
var _b = _a.ablilityNameLength, ablilityNameLength = _b === void 0 ? 30 : _b;
|
|
64
65
|
var _c = (0, ahooks_1.useSetState)({
|
|
@@ -67,9 +68,12 @@ var AiAbilityRoot = function (_a) {
|
|
|
67
68
|
type: 3,
|
|
68
69
|
isWorkplace: false,
|
|
69
70
|
}), state = _c[0], setState = _c[1];
|
|
70
|
-
var _d = (0, react_1.useState)(
|
|
71
|
-
var _e = (0, react_1.useState)(false),
|
|
72
|
-
var _f = (0,
|
|
71
|
+
var _d = (0, react_1.useState)(0), page = _d[0], setPage = _d[1];
|
|
72
|
+
var _e = (0, react_1.useState)(false), AddAbilityOpen = _e[0], setAddAbilityOpen = _e[1];
|
|
73
|
+
var _f = (0, react_1.useState)(false), UpdateAbilityOpen = _f[0], setUpdateAbilityOpen = _f[1];
|
|
74
|
+
var _g = (0, ahooks_1.useRequest)(function () { return (0, ai_ability_1.PostQuestionCollectionList)({ page: page, pageSize: PAGE_SIZE }); }, {
|
|
75
|
+
refreshDeps: [page],
|
|
76
|
+
}), data = _g.data, getList = _g.run, listLoading = _g.loading;
|
|
73
77
|
var deleteList = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionDelete, {
|
|
74
78
|
manual: true,
|
|
75
79
|
onSuccess: function () {
|
|
@@ -148,6 +152,13 @@ var AiAbilityRoot = function (_a) {
|
|
|
148
152
|
},
|
|
149
153
|
},
|
|
150
154
|
];
|
|
151
|
-
return ((0, jsx_runtime_1.jsxs)(styled_1.AbilityRoot, { children: [AddAbilityOpen && ((0, jsx_runtime_1.jsx)(AddAbility_1.default, __assign({}, state, { open: AddAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: getList }))), UpdateAbilityOpen && ((0, jsx_runtime_1.jsx)(UpdateAbility_1.default, __assign({}, state, { open: UpdateAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: getList }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.Header, { title: "\u8003\u5BDF\u80FD\u529B\u7BA1\u7406", renderAction: function () { return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: handleAdd }, { children: "\u65B0\u589E\u80FD\u529B" }))); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2, border: "1px solid rgba(0, 0, 0, 0.08)", borderRadius: 0.5, overflow: "hidden" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Table, { emptyText: "\u6682\u65E0\u6570\u636E", nameText: "\u8003\u5BDF\u80FD\u529B", loading: listLoading, data: data === null || data === void 0 ? void 0 : data.data.list, columns: columns
|
|
155
|
+
return ((0, jsx_runtime_1.jsxs)(styled_1.AbilityRoot, { children: [AddAbilityOpen && ((0, jsx_runtime_1.jsx)(AddAbility_1.default, __assign({}, state, { open: AddAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: getList }))), UpdateAbilityOpen && ((0, jsx_runtime_1.jsx)(UpdateAbility_1.default, __assign({}, state, { open: UpdateAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: getList }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.Header, { title: "\u8003\u5BDF\u80FD\u529B\u7BA1\u7406", renderAction: function () { return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: handleAdd }, { children: "\u65B0\u589E\u80FD\u529B" }))); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2, border: "1px solid rgba(0, 0, 0, 0.08)", borderRadius: 0.5, overflow: "hidden" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Table, { emptyText: "\u6682\u65E0\u6570\u636E", nameText: "\u8003\u5BDF\u80FD\u529B", loading: listLoading, data: data === null || data === void 0 ? void 0 : data.data.list, columns: columns, PaginationProps: {
|
|
156
|
+
total: (data === null || data === void 0 ? void 0 : data.data.total) || 0,
|
|
157
|
+
pageSize: PAGE_SIZE,
|
|
158
|
+
onPageChange: function (page) {
|
|
159
|
+
setPage(Math.max(0, page - 1));
|
|
160
|
+
return true;
|
|
161
|
+
},
|
|
162
|
+
} }) }))] }));
|
|
152
163
|
};
|
|
153
164
|
exports.default = AiAbilityRoot;
|
|
@@ -29,7 +29,7 @@ var ScrollDialogContent = (0, fbm_ui_2.styled)(fbm_ui_1.Box)({
|
|
|
29
29
|
overflow: 'scroll',
|
|
30
30
|
});
|
|
31
31
|
var AiAbilitySelectRoot = (0, react_1.forwardRef)(function (_a, ref) {
|
|
32
|
-
var jobToken = _a.jobToken, thirdToken = _a.thirdToken, token = _a.token;
|
|
32
|
+
var jobToken = _a.jobToken, thirdToken = _a.thirdToken, token = _a.token, hiddenTips = _a.hiddenTips;
|
|
33
33
|
var _b = (0, question_ability_store_1.useAiAbilityListStore)(), aiAbilityList = _b.aiAbilityList, setAiAbilityList = _b.setAiAbilityList, selctedAbilitys = _b.selctedAbilitys;
|
|
34
34
|
var setEnterprise = (0, enterprise_store_1.useEnterpriseStore)().setEnterprise;
|
|
35
35
|
var data = (0, ahooks_1.useRequest)(function () { return (0, ai_ability_1.GetAiAbilityList)({ jobToken: jobToken, thirdToken: thirdToken }); }, {
|
|
@@ -46,7 +46,7 @@ var AiAbilitySelectRoot = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
46
46
|
setEnterprise({ jobToken: jobToken, thirdToken: thirdToken });
|
|
47
47
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
48
48
|
}, [jobToken, thirdToken]);
|
|
49
|
-
return ((0, jsx_runtime_1.jsx)(ScrollDialogContent, __assign({ ref: ref }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", flexDirection: "column", width: 760 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 2, mb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500 }, { children:
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)(ScrollDialogContent, __assign({ ref: ref }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", flexDirection: "column", width: 760 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 2, mb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: !hiddenTips ? '请选择要优先使用的考察能力,也可以点击「下一步」直接出题' : '已选择的考察能力会优先在面试题目中展示' })), (aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.some(function (v) { return v.isNew; })) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn", alt: "", width: 38, height: 16 }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "AI\u6839\u636E\u5C97\u4F4D\u4FE1\u606F\u751F\u6210\u7684\u80FD\u529B\uFF0C\u521B\u5EFA\u5B8C\u6B65\u9AA4\u540E\uFF0C\u4F1A\u81EA\u52A8\u5C06\u9009\u62E9\u7684\u65B0\u589E\u80FD\u529B\u52A0\u5165\u5230\u8BBE\u7F6E\u9875\u7684\u8003\u5BDF\u80FD\u529B\u5217\u8868\u4E2D\u3002" }))] })))] })), (0, jsx_runtime_1.jsx)(AiAbilityList_1.default, { items: aiAbilityList })] })) })));
|
|
50
50
|
});
|
|
51
51
|
AiAbilitySelectRoot.displayName = 'AiAbilitySelectRoot';
|
|
52
52
|
exports.default = (0, react_1.memo)(AiAbilitySelectRoot);
|
|
@@ -18,15 +18,18 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
18
18
|
var AiAssessmentCriteria_1 = __importDefault(require("../AiAssessmentCriteria"));
|
|
19
19
|
var const_1 = require("../AiAssessmentCriteria/const");
|
|
20
20
|
var AnalysisItem_1 = __importDefault(require("./AnalysisItem"));
|
|
21
|
+
var question_update_store_1 = require("../../../../store/ai-question/question-update-store");
|
|
22
|
+
var ai_question_1 = require("../../../../enum/ai-question");
|
|
21
23
|
var ai_analysis_store_1 = require("../../../../store/ai-question/ai-analysis-store");
|
|
22
24
|
var fbm_ui_1 = require("fbm-ui");
|
|
23
25
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
24
26
|
var react_1 = require("react");
|
|
25
27
|
var AiAnalysis = function () {
|
|
28
|
+
var aiShowType = (0, question_update_store_1.useUpdateQuestionStore)(function (store) { return [store.questionState]; }).questionState.aiShowType;
|
|
26
29
|
var _a = (0, ai_analysis_store_1.useAiAnalysisStore)(function (store) { return [store.aiAbilities, store.analysisState]; }), aiAbilities = _a.aiAbilities, analysisState = _a.analysisState;
|
|
27
30
|
var _b = (0, react_1.useState)(false), aiAnalysisOpen = _b[0], setAiAnalysisOpen = _b[1];
|
|
28
31
|
var language = analysisState.language;
|
|
29
32
|
var isOpenAiAnalysis = aiAbilities.length > 0;
|
|
30
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [aiAnalysisOpen && (0, jsx_runtime_1.jsx)(AiAssessmentCriteria_1.default, { open: aiAnalysisOpen, onClose: function () { return setAiAnalysisOpen(false); } }), isOpenAiAnalysis && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: "\u6743\u91CD\u8BBE\u7F6E" })), language && const_1.LANGUAGE_NAMES[language] ? ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: "8px" }, { children: ["\u8BED\u79CD\uFF1A", language && const_1.LANGUAGE_NAMES[language]] }))) : ('')] })) }))), aiAbilities.length > 0 && ((0, jsx_runtime_1.jsx)(mui_1.List, { children: aiAbilities.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(AnalysisItem_1.default, __assign({ index: index }, item), item.token)); }) })), (0, jsx_runtime_1.jsx)(mui_1.Divider, { sx: { mb: 1 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: function () { return setAiAnalysisOpen(true); } }, { children: "\u6DFB\u52A0AI\u8003\u6838\u7EF4\u5EA6" }))] }));
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [aiAnalysisOpen && (0, jsx_runtime_1.jsx)(AiAssessmentCriteria_1.default, { open: aiAnalysisOpen, onClose: function () { return setAiAnalysisOpen(false); } }), isOpenAiAnalysis && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: "\u6743\u91CD\u8BBE\u7F6E" })), language && const_1.LANGUAGE_NAMES[language] ? ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: "8px" }, { children: ["\u8BED\u79CD\uFF1A", language && const_1.LANGUAGE_NAMES[language]] }))) : ('')] })) }))), aiAbilities.length > 0 && ((0, jsx_runtime_1.jsx)(mui_1.List, { children: aiAbilities.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(AnalysisItem_1.default, __assign({ index: index }, item), item.token)); }) })), (0, jsx_runtime_1.jsx)(mui_1.Divider, { sx: { mb: 1 } }), aiShowType !== ai_question_1.ADD_QUESTION_TYPE.SINGLECHIOCE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: function () { return setAiAnalysisOpen(true); } }, { children: "\u6DFB\u52A0AI\u8003\u6838\u7EF4\u5EA6" })))] }));
|
|
31
34
|
};
|
|
32
35
|
exports.default = AiAnalysis;
|
|
@@ -133,7 +133,7 @@ var BootVideo = function (props) {
|
|
|
133
133
|
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk, width: 768 }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between' } }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.RadioGroup, __assign({ defaultValue: "outlined", onChange: handleInteractTypeChange, value: interviewRoomState.interactType }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: 1, label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: 2, label: "AI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F" })] })), interviewRoomState.interactType === 2 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u9762\u8BD5\u5B98\u5F62\u8C61" })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: virtualManList.map(function (human) {
|
|
134
134
|
var _a;
|
|
135
135
|
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { src: human.virtualHumanAvatar, style: { borderColor: ((_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanToken) === human.humanToken ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectHumanType(human); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", textAlign: "center" }, { children: human.name }))] }, human.humanToken));
|
|
136
|
-
}) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 462, color: "disabled", mb: 1 }, { children: "\u8BF4\u660E\uFF1A\u6B65\u9AA4\u4E0B\u7684\u6240\u6709\u9898\u76EE\u7684\u865A\u62DF\u4EBA\u64AD\u653E\u89C6\u9891\u5747\u751F\u6210\u540E\uFF0C\u624D\u80FD\u751F\u6548\u865A\u62DF\u4EBA\u6548\u679C\u3002\u5426\u5219\uFF0C\u5C06\u4EE5\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F\u8FDB\u884C\u4EA4\u4E92\u3002" }))] })), interviewRoomState.interactType === 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
|
|
136
|
+
}) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 462, color: "disabled", mb: 1 }, { children: "\u8BF4\u660E\uFF1A\u6B65\u9AA4\u4E0B\u7684\u6240\u6709\u9898\u76EE\u7684\u865A\u62DF\u4EBA\u64AD\u653E\u89C6\u9891\u5747\u751F\u6210\u540E\uFF0C\u624D\u80FD\u751F\u6548\u865A\u62DF\u4EBA\u6548\u679C\u3002\u5426\u5219\uFF0C\u5C06\u4EE5\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F\u8FDB\u884C\u4EA4\u4E92\u3002\u76EE\u524D\u53EA\u6709\u5C0F\u9762\u652F\u6301\u5BF9\u9898\u76EE\u8FFD\u95EE\uFF0C\u5176\u4ED6\u5F62\u8C61\u6682\u4E0D\u652F\u6301\u3002" }))] })), interviewRoomState.interactType === 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
|
|
137
137
|
var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
|
|
138
138
|
return ((0, jsx_runtime_1.jsx)("img", { src: frameUrl, style: { borderColor: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
|
|
139
139
|
}) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 462, color: "text.disabled", mb: 1 }, { children: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm" })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(styled_1.CustomUploadButtonRoot, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ ml: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: mediaState.appliedAllPosition, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u5E94\u7528\u5230\u6240\u6709AI\u89C6\u9891" })), onChange: function (e, checked) { return setMediaState({ appliedAllPosition: checked }); } }) }))] }))] }))] }), interviewRoomState.interactType === 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: loading, sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: (0, jsx_runtime_1.jsx)("video", { width: 160, height: 286, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsxs)(styled_1.CustomUploadCardRoot, { children: [(0, jsx_runtime_1.jsxs)(styled_1.CustomUploadCardTitle, { children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.default, { name: "video" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))) }))), interviewRoomState.interactType === 2 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: (0, jsx_runtime_1.jsx)("video", { width: 160, height: 286, src: (_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.virtualPreviewMedia, controls: true }) })) })))] })) }) })));
|
|
@@ -23,6 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
|
+
var interview_room_store_1 = require("../../../../store/ai-question/interview-room-store");
|
|
26
27
|
var ai_question_1 = require("../../../../constants/ai-question");
|
|
27
28
|
var question_model_store_1 = require("../../../../store/ai-question/question-model-store");
|
|
28
29
|
var question_update_store_1 = require("../../../../store/ai-question/question-update-store");
|
|
@@ -31,10 +32,11 @@ var fbm_ui_1 = require("fbm-ui");
|
|
|
31
32
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
32
33
|
var react_1 = require("react");
|
|
33
34
|
var QuestionModelListItem = function (props) {
|
|
35
|
+
var _a = (0, interview_room_store_1.useInterviewRoomStore)(), interactType = _a.interactType, aiInterviewerProfile = _a.aiInterviewerProfile;
|
|
34
36
|
var index = props.index, disabledWeight = props.disabledWeight, steps = props.steps, step = __rest(props, ["index", "disabledWeight", "steps"]);
|
|
35
|
-
var token = step.token, name = step.name, questions = step.questions, duration = step.duration, weight = step.weight, type = step.type, aiShowType = step.aiShowType, aiType = step.aiType, answerStatus = step.answerStatus, category = step.category;
|
|
37
|
+
var token = step.token, name = step.name, questions = step.questions, duration = step.duration, weight = step.weight, type = step.type, aiShowType = step.aiShowType, aiType = step.aiType, answerStatus = step.answerStatus, category = step.category, isOpenAIFollowUp = step.isOpenAIFollowUp;
|
|
36
38
|
var isAiAnalysis = (0, ai_question_1.IS_AI_ANALYSIS)(step);
|
|
37
|
-
var
|
|
39
|
+
var _b = (0, question_model_store_1.useQuestionModelStore)(), editModel = _b.editModel, removeModel = _b.removeModel, updateModelWeight = _b.updateModelWeight;
|
|
38
40
|
var updateQuestionState = (0, question_update_store_1.useUpdateQuestionStore)().updateQuestionState;
|
|
39
41
|
var handleEdit = (0, react_1.useCallback)(function () {
|
|
40
42
|
updateQuestionState({ open: true, token: token, index: index, aiShowType: aiShowType, item: step });
|
|
@@ -68,14 +70,17 @@ var QuestionModelListItem = function (props) {
|
|
|
68
70
|
var handleAnswerStatus = (0, react_1.useCallback)(function () {
|
|
69
71
|
editModel(__assign(__assign({}, step), { answerStatus: answerStatus === 2 ? 1 : 2 }), index);
|
|
70
72
|
}, [editModel, answerStatus, step, index]);
|
|
73
|
+
var handleOpenAIFollowUpStatus = (0, react_1.useCallback)(function () {
|
|
74
|
+
editModel(__assign(__assign({}, step), { isOpenAIFollowUp: !isOpenAIFollowUp }), index);
|
|
75
|
+
}, [editModel, isOpenAIFollowUp, step, index]);
|
|
71
76
|
var formatQuestion = (0, react_1.useMemo)(function () {
|
|
72
77
|
if ((questions === null || questions === void 0 ? void 0 : questions.length) > 1) {
|
|
73
|
-
return ((0, jsx_runtime_1.
|
|
78
|
+
return ((0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row", spacing: 1 }, { children: (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 1 }, { children: questions.map(function (v, i) { return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "text.secondary" }, { children: ["\u2022\u00A0", v.content] }), i)); }) })) })));
|
|
74
79
|
}
|
|
75
80
|
return questions.map(function (v) { return v.content; }).join('\n');
|
|
76
81
|
}, [questions]);
|
|
77
|
-
return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [(0, jsx_runtime_1.
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", borderBottom: !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", padding: "8px 0px 16px 16px" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium" }, { children: ["\u9898\u76EE", index + 1] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DragHandleIcon, { className: "dragHandle" }) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!ai_question_1.TEST_TYPE_READONLY.includes(type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleEdit }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium", mr: 0.5 }, { children: ["[", ai_question_1.QUESTION_TYPE_TITLE_MAP[aiShowType], "]"] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
|
|
83
|
+
return label && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
|
|
84
|
+
}), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", (0, utils_1.getSecondToTime)(Number(duration))] }))] }))] })) })), (!ai_question_1.DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }), type === 1 && aiShowType === 1 && ((aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.humanType) !== 2 || interactType === 1) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
|
|
80
85
|
};
|
|
81
86
|
exports.default = (0, react_1.memo)(QuestionModelListItem);
|
|
@@ -13,12 +13,12 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
|
+
var _a;
|
|
16
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
18
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
19
|
var BaseAccordion_1 = __importDefault(require("../BaseAccordion"));
|
|
19
20
|
var const_1 = require("../QuestionUpdate/const");
|
|
20
21
|
var question_ability_store_1 = require("../../../../store/ai-ability-select/question-ability-store");
|
|
21
|
-
var SvgIcon_1 = __importDefault(require("../../../../components/SvgIcon"));
|
|
22
22
|
var ai_question_1 = require("../../../../constants/ai-question");
|
|
23
23
|
var ai_question_2 = require("../../../../enum/ai-question");
|
|
24
24
|
var global_store_1 = require("../../../../store/ai-question/global-store");
|
|
@@ -30,6 +30,11 @@ var ahooks_1 = require("ahooks");
|
|
|
30
30
|
var fbm_ui_1 = require("fbm-ui");
|
|
31
31
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
32
32
|
var react_1 = require("react");
|
|
33
|
+
var ICONS = (_a = {},
|
|
34
|
+
_a[ai_question_2.ADD_QUESTION_TYPE.FREE] = (0, jsx_runtime_1.jsx)(fbm_ui_1.SMSOneIcon, { color: "secondary" }),
|
|
35
|
+
_a[ai_question_2.ADD_QUESTION_TYPE.LANGUAGE] = (0, jsx_runtime_1.jsx)(fbm_ui_1.MicIcon, { color: "secondary" }),
|
|
36
|
+
_a[ai_question_2.ADD_QUESTION_TYPE.SINGLECHIOCE] = (0, jsx_runtime_1.jsx)(fbm_ui_1.RadioCheckedIcon, { color: "secondary" }),
|
|
37
|
+
_a);
|
|
33
38
|
var AiEvaluation = function () {
|
|
34
39
|
var onOpenTemplate = (0, global_store_1.useAiQuestionStore)(function (store) { return [store.onOpenTemplate]; }).onOpenTemplate;
|
|
35
40
|
var updateQuestionState = (0, question_update_store_1.useUpdateQuestionStore)(function (store) { return [store.updateQuestionState]; }).updateQuestionState;
|
|
@@ -44,11 +49,17 @@ var AiEvaluation = function () {
|
|
|
44
49
|
var addQuestionOpen = state.addQuestionOpen, showOnlyAITest = state.showOnlyAITest;
|
|
45
50
|
var handleClickAdd = (0, react_1.useCallback)(function (aiShowType) {
|
|
46
51
|
setState({ addQuestionOpen: false });
|
|
47
|
-
updateQuestionState({
|
|
52
|
+
updateQuestionState({
|
|
53
|
+
open: true,
|
|
54
|
+
aiShowType: aiShowType,
|
|
55
|
+
token: '',
|
|
56
|
+
index: -1,
|
|
57
|
+
item: __assign(__assign({}, const_1.defaultQuestionParams), { aiShowType: aiShowType, type: aiShowType === ai_question_2.ADD_QUESTION_TYPE.SINGLECHIOCE ? 17 : 1, token: (0, utils_1.uniqueId)() }),
|
|
58
|
+
});
|
|
48
59
|
}, [setState, updateQuestionState]);
|
|
49
|
-
var content = ((0, jsx_runtime_1.jsx)(mui_1.List, { children: ai_question_1.
|
|
60
|
+
var content = ((0, jsx_runtime_1.jsx)(mui_1.List, { children: ai_question_1.ADD_QUESTION_TYPE_SHOW_LIST.map(function (_a) {
|
|
50
61
|
var title = _a.title, desc = _a.desc, type = _a.type;
|
|
51
|
-
return ((0, jsx_runtime_1.jsx)(mui_1.ListItem, __assign({ disablePadding: true }, { children: (0, jsx_runtime_1.jsxs)(mui_1.ListItemButton, __assign({ onClick: function () { return handleClickAdd(type); } }, { children: [(0, jsx_runtime_1.jsx)(mui_1.ListItemIcon, __assign({ sx: { minWidth: 40 } }, { children: type
|
|
62
|
+
return ((0, jsx_runtime_1.jsx)(mui_1.ListItem, __assign({ disablePadding: true }, { children: (0, jsx_runtime_1.jsxs)(mui_1.ListItemButton, __assign({ onClick: function () { return handleClickAdd(type); } }, { children: [(0, jsx_runtime_1.jsx)(mui_1.ListItemIcon, __assign({ sx: { minWidth: 40 } }, { children: ICONS[type] })), (0, jsx_runtime_1.jsx)(mui_1.ListItemText, { primary: title, secondary: desc })] })) }), "question_type_".concat(type)));
|
|
52
63
|
}) }));
|
|
53
64
|
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.LayerOutlineIcon, {}), onClick: function () { return onOpenTemplate === null || onOpenTemplate === void 0 ? void 0 : onOpenTemplate(questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps); } }, { children: "\u5C97\u4F4D\u6A21\u7248\u5E93" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ open: addQuestionOpen, arrow: false, content: content, onClickAway: function () { return setState({ addQuestionOpen: false }); } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: function () { return setState({ addQuestionOpen: true }); } }, { children: "\u81EA\u5B9A\u4E49\u9898\u76EE" })) }))] })), aiEvaluationData.map(function (_a, index) {
|
|
54
65
|
var name = _a.name, list = _a.list;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* 验证0-9的整数
|
|
4
|
+
*/
|
|
5
|
+
export declare const IS_INTEGER_REG: RegExp;
|
|
6
|
+
/**
|
|
7
|
+
* 可输入最大分值
|
|
8
|
+
*/
|
|
9
|
+
export declare const MAX_SCORE_VALUE = 100;
|
|
10
|
+
export declare const VERIFICATION_SCORE: (value: string) => boolean;
|
|
11
|
+
export interface QuestionItemProps {
|
|
12
|
+
index: number;
|
|
13
|
+
item: any;
|
|
14
|
+
onChange: (key: string, value: any, index: number) => void;
|
|
15
|
+
}
|
|
16
|
+
declare const Choice: React.FC<QuestionItemProps>;
|
|
17
|
+
export default Choice;
|