eli-video-interview 1.2.38 → 1.2.39-alpha.2

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.
Files changed (181) hide show
  1. package/esm/components/react-photo-view/Photo.css +14 -0
  2. package/esm/components/react-photo-view/Photo.d.ts +18 -0
  3. package/esm/components/react-photo-view/Photo.js +54 -0
  4. package/esm/components/react-photo-view/PhotoBox.css +18 -0
  5. package/esm/components/react-photo-view/PhotoBox.d.ts +22 -0
  6. package/esm/components/react-photo-view/PhotoBox.js +302 -0
  7. package/esm/components/react-photo-view/PhotoPage.d.ts +9 -0
  8. package/esm/components/react-photo-view/PhotoPage.js +77 -0
  9. package/esm/components/react-photo-view/PhotoProvider.d.ts +14 -0
  10. package/esm/components/react-photo-view/PhotoProvider.js +98 -0
  11. package/esm/components/react-photo-view/PhotoSlider.css +125 -0
  12. package/esm/components/react-photo-view/PhotoSlider.d.ts +12 -0
  13. package/esm/components/react-photo-view/PhotoSlider.js +262 -0
  14. package/esm/components/react-photo-view/PhotoView.d.ts +30 -0
  15. package/esm/components/react-photo-view/PhotoView.js +48 -0
  16. package/esm/components/react-photo-view/components/ArrowLeft.d.ts +3 -0
  17. package/esm/components/react-photo-view/components/ArrowLeft.js +18 -0
  18. package/esm/components/react-photo-view/components/ArrowRight.d.ts +3 -0
  19. package/esm/components/react-photo-view/components/ArrowRight.js +18 -0
  20. package/esm/components/react-photo-view/components/CloseIcon.d.ts +3 -0
  21. package/esm/components/react-photo-view/components/CloseIcon.js +16 -0
  22. package/esm/components/react-photo-view/components/PreventScroll.d.ts +1 -0
  23. package/esm/components/react-photo-view/components/PreventScroll.js +12 -0
  24. package/esm/components/react-photo-view/components/SlidePortal.css +10 -0
  25. package/esm/components/react-photo-view/components/SlidePortal.d.ts +7 -0
  26. package/esm/components/react-photo-view/components/SlidePortal.js +30 -0
  27. package/esm/components/react-photo-view/components/Spinner.css +23 -0
  28. package/esm/components/react-photo-view/components/Spinner.d.ts +4 -0
  29. package/esm/components/react-photo-view/components/Spinner.js +29 -0
  30. package/esm/components/react-photo-view/hooks/useAdjacentImages.d.ts +5 -0
  31. package/esm/components/react-photo-view/hooks/useAdjacentImages.js +14 -0
  32. package/esm/components/react-photo-view/hooks/useAnimationOrigin.d.ts +6 -0
  33. package/esm/components/react-photo-view/hooks/useAnimationOrigin.js +72 -0
  34. package/esm/components/react-photo-view/hooks/useAnimationPosition.d.ts +2 -0
  35. package/esm/components/react-photo-view/hooks/useAnimationPosition.js +28 -0
  36. package/esm/components/react-photo-view/hooks/useAnimationVisible.d.ts +6 -0
  37. package/esm/components/react-photo-view/hooks/useAnimationVisible.js +49 -0
  38. package/esm/components/react-photo-view/hooks/useContinuousTap.d.ts +8 -0
  39. package/esm/components/react-photo-view/hooks/useContinuousTap.js +36 -0
  40. package/esm/components/react-photo-view/hooks/useDebounceCallback.d.ts +10 -0
  41. package/esm/components/react-photo-view/hooks/useDebounceCallback.js +48 -0
  42. package/esm/components/react-photo-view/hooks/useEventListener.d.ts +1 -0
  43. package/esm/components/react-photo-view/hooks/useEventListener.js +18 -0
  44. package/esm/components/react-photo-view/hooks/useForkedVariable.d.ts +5 -0
  45. package/esm/components/react-photo-view/hooks/useForkedVariable.js +17 -0
  46. package/esm/components/react-photo-view/hooks/useInitial.d.ts +1 -0
  47. package/esm/components/react-photo-view/hooks/useInitial.js +9 -0
  48. package/esm/components/react-photo-view/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  49. package/esm/components/react-photo-view/hooks/useIsomorphicLayoutEffect.js +3 -0
  50. package/esm/components/react-photo-view/hooks/useMethods.d.ts +4 -0
  51. package/esm/components/react-photo-view/hooks/useMethods.js +35 -0
  52. package/esm/components/react-photo-view/hooks/useMountedRef.d.ts +3 -0
  53. package/esm/components/react-photo-view/hooks/useMountedRef.js +12 -0
  54. package/esm/components/react-photo-view/hooks/useScrollPosition.d.ts +4 -0
  55. package/esm/components/react-photo-view/hooks/useScrollPosition.js +157 -0
  56. package/esm/components/react-photo-view/hooks/useSetState.d.ts +2 -0
  57. package/esm/components/react-photo-view/hooks/useSetState.js +15 -0
  58. package/esm/components/react-photo-view/hooks/useTargetScale.d.ts +4 -0
  59. package/esm/components/react-photo-view/hooks/useTargetScale.js +70 -0
  60. package/esm/components/react-photo-view/index.d.ts +4 -0
  61. package/esm/components/react-photo-view/index.js +4 -0
  62. package/esm/components/react-photo-view/photo-context.d.ts +11 -0
  63. package/esm/components/react-photo-view/photo-context.js +2 -0
  64. package/esm/components/react-photo-view/types.d.ts +196 -0
  65. package/esm/components/react-photo-view/types.js +1 -0
  66. package/esm/components/react-photo-view/utils/edgeHandle.d.ts +15 -0
  67. package/esm/components/react-photo-view/utils/edgeHandle.js +40 -0
  68. package/esm/components/react-photo-view/utils/getMultipleTouchPosition.d.ts +5 -0
  69. package/esm/components/react-photo-view/utils/getMultipleTouchPosition.js +11 -0
  70. package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.d.ts +9 -0
  71. package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.js +31 -0
  72. package/esm/components/react-photo-view/utils/getRotateSize.d.ts +4 -0
  73. package/esm/components/react-photo-view/utils/getRotateSize.js +11 -0
  74. package/esm/components/react-photo-view/utils/getSuitableImageSize.d.ts +10 -0
  75. package/esm/components/react-photo-view/utils/getSuitableImageSize.js +42 -0
  76. package/esm/components/react-photo-view/utils/isTouchDevice.d.ts +5 -0
  77. package/esm/components/react-photo-view/utils/isTouchDevice.js +5 -0
  78. package/esm/components/react-photo-view/utils/limitTarget.d.ts +5 -0
  79. package/esm/components/react-photo-view/utils/limitTarget.js +12 -0
  80. package/esm/components/react-photo-view/variables.d.ts +48 -0
  81. package/esm/components/react-photo-view/variables.js +48 -0
  82. package/esm/constants/ai-question.js +2 -2
  83. package/esm/modules/ai-question/components/QuestionModel/Interactive.js +4 -2
  84. package/esm/modules/ai-report/components/VideoQuestion/BodyImages.d.ts +7 -0
  85. package/esm/modules/ai-report/components/VideoQuestion/BodyImages.js +40 -0
  86. package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +3 -2
  87. package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -0
  88. package/esm/modules/ai-report/components/VideoQuestion/styled.js +6 -0
  89. package/esm/modules/ai-report/interface.d.ts +6 -0
  90. package/lib/components/react-photo-view/Photo.css +14 -0
  91. package/lib/components/react-photo-view/Photo.d.ts +18 -0
  92. package/lib/components/react-photo-view/Photo.js +60 -0
  93. package/lib/components/react-photo-view/PhotoBox.css +18 -0
  94. package/lib/components/react-photo-view/PhotoBox.d.ts +22 -0
  95. package/lib/components/react-photo-view/PhotoBox.js +308 -0
  96. package/lib/components/react-photo-view/PhotoPage.d.ts +9 -0
  97. package/lib/components/react-photo-view/PhotoPage.js +79 -0
  98. package/lib/components/react-photo-view/PhotoProvider.d.ts +14 -0
  99. package/lib/components/react-photo-view/PhotoProvider.js +104 -0
  100. package/lib/components/react-photo-view/PhotoSlider.css +125 -0
  101. package/lib/components/react-photo-view/PhotoSlider.d.ts +12 -0
  102. package/lib/components/react-photo-view/PhotoSlider.js +268 -0
  103. package/lib/components/react-photo-view/PhotoView.d.ts +30 -0
  104. package/lib/components/react-photo-view/PhotoView.js +53 -0
  105. package/lib/components/react-photo-view/components/ArrowLeft.d.ts +3 -0
  106. package/lib/components/react-photo-view/components/ArrowLeft.js +20 -0
  107. package/lib/components/react-photo-view/components/ArrowRight.d.ts +3 -0
  108. package/lib/components/react-photo-view/components/ArrowRight.js +20 -0
  109. package/lib/components/react-photo-view/components/CloseIcon.d.ts +3 -0
  110. package/lib/components/react-photo-view/components/CloseIcon.js +18 -0
  111. package/lib/components/react-photo-view/components/PreventScroll.d.ts +1 -0
  112. package/lib/components/react-photo-view/components/PreventScroll.js +15 -0
  113. package/lib/components/react-photo-view/components/SlidePortal.css +10 -0
  114. package/lib/components/react-photo-view/components/SlidePortal.d.ts +7 -0
  115. package/lib/components/react-photo-view/components/SlidePortal.js +32 -0
  116. package/lib/components/react-photo-view/components/Spinner.css +23 -0
  117. package/lib/components/react-photo-view/components/Spinner.d.ts +4 -0
  118. package/lib/components/react-photo-view/components/Spinner.js +31 -0
  119. package/lib/components/react-photo-view/hooks/useAdjacentImages.d.ts +5 -0
  120. package/lib/components/react-photo-view/hooks/useAdjacentImages.js +17 -0
  121. package/lib/components/react-photo-view/hooks/useAnimationOrigin.d.ts +6 -0
  122. package/lib/components/react-photo-view/hooks/useAnimationOrigin.js +78 -0
  123. package/lib/components/react-photo-view/hooks/useAnimationPosition.d.ts +2 -0
  124. package/lib/components/react-photo-view/hooks/useAnimationPosition.js +34 -0
  125. package/lib/components/react-photo-view/hooks/useAnimationVisible.d.ts +6 -0
  126. package/lib/components/react-photo-view/hooks/useAnimationVisible.js +55 -0
  127. package/lib/components/react-photo-view/hooks/useContinuousTap.d.ts +8 -0
  128. package/lib/components/react-photo-view/hooks/useContinuousTap.js +42 -0
  129. package/lib/components/react-photo-view/hooks/useDebounceCallback.d.ts +10 -0
  130. package/lib/components/react-photo-view/hooks/useDebounceCallback.js +51 -0
  131. package/lib/components/react-photo-view/hooks/useEventListener.d.ts +1 -0
  132. package/lib/components/react-photo-view/hooks/useEventListener.js +21 -0
  133. package/lib/components/react-photo-view/hooks/useForkedVariable.d.ts +5 -0
  134. package/lib/components/react-photo-view/hooks/useForkedVariable.js +20 -0
  135. package/lib/components/react-photo-view/hooks/useInitial.d.ts +1 -0
  136. package/lib/components/react-photo-view/hooks/useInitial.js +12 -0
  137. package/lib/components/react-photo-view/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  138. package/lib/components/react-photo-view/hooks/useIsomorphicLayoutEffect.js +5 -0
  139. package/lib/components/react-photo-view/hooks/useMethods.d.ts +4 -0
  140. package/lib/components/react-photo-view/hooks/useMethods.js +38 -0
  141. package/lib/components/react-photo-view/hooks/useMountedRef.d.ts +3 -0
  142. package/lib/components/react-photo-view/hooks/useMountedRef.js +14 -0
  143. package/lib/components/react-photo-view/hooks/useScrollPosition.d.ts +4 -0
  144. package/lib/components/react-photo-view/hooks/useScrollPosition.js +163 -0
  145. package/lib/components/react-photo-view/hooks/useSetState.d.ts +2 -0
  146. package/lib/components/react-photo-view/hooks/useSetState.js +18 -0
  147. package/lib/components/react-photo-view/hooks/useTargetScale.d.ts +4 -0
  148. package/lib/components/react-photo-view/hooks/useTargetScale.js +76 -0
  149. package/lib/components/react-photo-view/index.d.ts +4 -0
  150. package/lib/components/react-photo-view/index.js +12 -0
  151. package/lib/components/react-photo-view/photo-context.d.ts +11 -0
  152. package/lib/components/react-photo-view/photo-context.js +4 -0
  153. package/lib/components/react-photo-view/types.d.ts +196 -0
  154. package/lib/components/react-photo-view/types.js +2 -0
  155. package/lib/components/react-photo-view/utils/edgeHandle.d.ts +15 -0
  156. package/lib/components/react-photo-view/utils/edgeHandle.js +45 -0
  157. package/lib/components/react-photo-view/utils/getMultipleTouchPosition.d.ts +5 -0
  158. package/lib/components/react-photo-view/utils/getMultipleTouchPosition.js +14 -0
  159. package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.d.ts +9 -0
  160. package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.js +34 -0
  161. package/lib/components/react-photo-view/utils/getRotateSize.d.ts +4 -0
  162. package/lib/components/react-photo-view/utils/getRotateSize.js +14 -0
  163. package/lib/components/react-photo-view/utils/getSuitableImageSize.d.ts +10 -0
  164. package/lib/components/react-photo-view/utils/getSuitableImageSize.js +48 -0
  165. package/lib/components/react-photo-view/utils/isTouchDevice.d.ts +5 -0
  166. package/lib/components/react-photo-view/utils/isTouchDevice.js +7 -0
  167. package/lib/components/react-photo-view/utils/limitTarget.d.ts +5 -0
  168. package/lib/components/react-photo-view/utils/limitTarget.js +17 -0
  169. package/lib/components/react-photo-view/variables.d.ts +48 -0
  170. package/lib/components/react-photo-view/variables.js +51 -0
  171. package/lib/constants/ai-question.js +2 -2
  172. package/lib/modules/ai-question/components/QuestionModel/Interactive.js +4 -2
  173. package/lib/modules/ai-report/components/VideoQuestion/BodyImages.d.ts +7 -0
  174. package/lib/modules/ai-report/components/VideoQuestion/BodyImages.js +45 -0
  175. package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +3 -2
  176. package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -0
  177. package/lib/modules/ai-report/components/VideoQuestion/styled.js +7 -1
  178. package/lib/modules/ai-report/interface.d.ts +6 -0
  179. package/package.json +1 -1
  180. package/lib/modules/ai-ability-select/components/AiAbilityList/styled.d.ts +0 -0
  181. package/lib/modules/ai-ability-select/components/AiAbilityList/styled.js +0 -1
@@ -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,5 @@
1
+ /**
2
+ * 是否支持触摸设备
3
+ */
4
+ declare const isTouchDevice: boolean;
5
+ export default isTouchDevice;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * 是否支持触摸设备
5
+ */
6
+ var isTouchDevice = typeof window !== 'undefined' && 'ontouchstart' in window;
7
+ exports.default = isTouchDevice;
@@ -0,0 +1,5 @@
1
+ export declare const limitNumber: (value: number, min: number, max: number) => number;
2
+ /**
3
+ * 限制最大/最小缩放
4
+ */
5
+ export declare const limitScale: (scale: number, max?: number, buffer?: number) => number;
@@ -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;
@@ -55,8 +55,8 @@ exports.AiVideoStatus = {
55
55
  };
56
56
  exports.MAX_UPLOAD_FILE_SIZE = 1024 * 1024 * 20;
57
57
  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];
58
+ exports.TEST_TYPE_READONLY = [2, 3, 4, 7, 8, 9, 10, 11, 12, 16];
59
+ exports.DISABLED_REPEAT_TYPE = [2, 4, 7, 8, 9, 11, 12, 16];
60
60
  // 是否开启AI分析
61
61
  var IS_AI_ANALYSIS = function (step) { return step.aiType === 2; };
62
62
  exports.IS_AI_ANALYSIS = IS_AI_ANALYSIS;
@@ -27,7 +27,9 @@ var Interactive = function () {
27
27
  var questionModelData = (0, question_model_store_1.useQuestionModelStore)().questionModelData;
28
28
  var _c = (0, interview_room_store_1.useInterviewRoomStore)(), interactType = _c.interactType, aiInterviewerProfile = _c.aiInterviewerProfile;
29
29
  var _d = (0, react_1.useState)(false), bootVideoOpen = _d[0], setBootVideoOpen = _d[1];
30
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [bootVideoOpen && (0, jsx_runtime_1.jsx)(BootVideo_1.default, { open: bootVideoOpen, onClose: function () { return setBootVideoOpen(false); } }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", component: mui_1.Paper, variant: "outlined", height: 54, alignItems: "center", px: 2, mt: 2 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ display: "flex", alignItems: "center", variant: "body1", fontWeight: 500 }, { children: ["\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F\uFF1A".concat(ai_question_1.InteractiveModes[interactType]), interactType === 2 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["-".concat(aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.name), ((_a = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanToken) &&
31
- (aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.humanToken) === ((_b = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiInterviewerProfile) === null || _b === void 0 ? void 0 : _b.humanToken) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 2 }, { children: ai_question_1.AiVideoStatus[(questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiVideoStatus) || 1] })), (questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiVideoStatus) === 2 ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.CheckCircleOutlineIcon, { sx: { fontSize: '16px', ml: 1, color: 'RGBA(0, 0, 0, 0.56)' } })) : ('')] }))] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.VideocamOutlineIcon, {}), variant: "text", onClick: function () { return setBootVideoOpen(true); } }, { children: "\u5B9A\u5236\u9762\u8BD5\u95F4" }))] }))] }));
30
+ var ShowVideoStatus = (aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.humanType) === 2 &&
31
+ ((_a = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanToken) &&
32
+ (aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.humanToken) === ((_b = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiInterviewerProfile) === null || _b === void 0 ? void 0 : _b.humanToken);
33
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [bootVideoOpen && (0, jsx_runtime_1.jsx)(BootVideo_1.default, { open: bootVideoOpen, onClose: function () { return setBootVideoOpen(false); } }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", component: mui_1.Paper, variant: "outlined", height: 54, alignItems: "center", px: 2, mt: 2 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ display: "flex", alignItems: "center", variant: "body1", fontWeight: 500 }, { children: ["\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F\uFF1A".concat(ai_question_1.InteractiveModes[interactType]), interactType === 2 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["-".concat(aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.name), ShowVideoStatus && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 2 }, { children: ai_question_1.AiVideoStatus[(questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiVideoStatus) || 1] })), (questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiVideoStatus) === 2 ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.CheckCircleOutlineIcon, { sx: { fontSize: '16px', ml: 1, color: 'RGBA(0, 0, 0, 0.56)' } })) : ('')] }))] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.VideocamOutlineIcon, {}), variant: "text", onClick: function () { return setBootVideoOpen(true); } }, { children: "\u5B9A\u5236\u9762\u8BD5\u95F4" }))] }))] }));
32
34
  };
33
35
  exports.default = Interactive;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import '@components/react-photo-view/Photo';
3
+ import '@components/react-photo-view/PhotoSlider';
4
+ declare const BodyImages: ({ reviewImgs }: {
5
+ reviewImgs: any;
6
+ }) => JSX.Element;
7
+ export default BodyImages;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var jsx_runtime_1 = require("react/jsx-runtime");
18
+ var styled_1 = require("./styled");
19
+ var react_photo_view_1 = require("../../../../components/react-photo-view");
20
+ require("../../../../components/react-photo-view/Photo");
21
+ var PhotoPage_1 = __importDefault(require("../../../../components/react-photo-view/PhotoPage"));
22
+ require("../../../../components/react-photo-view/PhotoSlider");
23
+ var fbm_ui_1 = require("fbm-ui");
24
+ var mui_1 = require("fbm-ui/lib/mui");
25
+ var react_1 = require("react");
26
+ var BodyImages = function (_a) {
27
+ var reviewImgs = _a.reviewImgs;
28
+ var _b = (0, react_1.useState)(false), visible = _b[0], setVisible = _b[1];
29
+ var _c = (0, react_1.useState)(0), index = _c[0], setIndex = _c[1];
30
+ var handleSelected = (0, react_1.useCallback)(function (_, i) {
31
+ setIndex(i);
32
+ setVisible(true);
33
+ }, []);
34
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 2, direction: "row" }, { children: reviewImgs.map(function (_a, i) {
35
+ var url = _a.url, title = _a.title;
36
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 0.5, onClick: function () {
37
+ setIndex(i);
38
+ setVisible(true);
39
+ } }, { children: [(0, jsx_runtime_1.jsx)(styled_1.Image, { src: url, alt: "" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary", textAlign: "center" }, { children: title }))] }), url));
40
+ }) })), (0, jsx_runtime_1.jsx)(react_photo_view_1.PhotoSlider, { maskOpacity: 0.56, visible: visible, onClose: function () { return setVisible(false); }, index: index, onIndexChange: setIndex, images: reviewImgs.map(function (item) { return ({ src: item.url, key: item.url, title: item === null || item === void 0 ? void 0 : item.title }); }), overlayRender: function (_a) {
41
+ var images = _a.images, index = _a.index;
42
+ return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { width: 1, position: 'absolute', bottom: 0, zIndex: 50 } }, { children: (0, jsx_runtime_1.jsx)(PhotoPage_1.default, { onSelected: handleSelected, images: images, index: index }) })));
43
+ } })] }));
44
+ };
45
+ exports.default = BodyImages;
@@ -16,6 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var Abilities_1 = __importDefault(require("./Abilities"));
19
+ var BodyImages_1 = __importDefault(require("./BodyImages"));
19
20
  var ScoreSlider_1 = __importDefault(require("./ScoreSlider"));
20
21
  var styled_1 = require("./styled");
21
22
  var ai_question_1 = require("../../../../enum/ai-question");
@@ -30,7 +31,7 @@ var immutability_helper_1 = __importDefault(require("immutability-helper"));
30
31
  var react_1 = require("react");
31
32
  var STEP_NO_ANSWER = ai_report_1.INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = ai_report_1.INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
32
33
  var QuestionItem = function (props) {
33
- var token = props.token, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
34
+ var token = props.token, reviewImgs = props.reviewImgs, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
34
35
  var _d = (0, react_1.useState)(false), showAbilities = _d[0], setShowAbilities = _d[1];
35
36
  var _e = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.stepToken, store.operableButtons, store.showAbilitiesDetails]; }), reportResult = _e.reportResult, stepToken = _e.stepToken, operableButtons = _e.operableButtons, showAbilitiesDetails = _e.showAbilitiesDetails, updateState = _e.updateState, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange, onStepChange = _e.onStepChange;
36
37
  var steps = (reportResult || {}).steps;
@@ -91,6 +92,6 @@ var QuestionItem = function (props) {
91
92
  mt: 2,
92
93
  cursor: videoUrl ? 'pointer' : 'inherit',
93
94
  borderColor: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : '',
94
- }, variant: "outlined", onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: [index + 1, ".", desc] })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { originScore: originScore, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index })] }), token));
95
+ }, variant: "outlined", onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: [index + 1, ".", desc] })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(BodyImages_1.default, { reviewImgs: reviewImgs }), (0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { originScore: originScore, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index })] }), token));
95
96
  };
96
97
  exports.default = QuestionItem;
@@ -69,3 +69,4 @@ export declare const AiScoreRoot: import("@emotion/styled").StyledComponent<impo
69
69
  export declare const RankingRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
70
70
  children?: import("react").ReactNode;
71
71
  } & import("@mui/system/createStyled").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
72
+ export declare const Image: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RankingRoot = exports.AiScoreRoot = exports.QuestionDesc = exports.ScoreSliderRoot = exports.StyledSlider = void 0;
3
+ exports.Image = exports.RankingRoot = exports.AiScoreRoot = exports.QuestionDesc = exports.ScoreSliderRoot = exports.StyledSlider = void 0;
4
4
  var fbm_ui_1 = require("fbm-ui");
5
5
  var mui_1 = require("fbm-ui/lib/mui");
6
6
  exports.StyledSlider = (0, fbm_ui_1.styled)(mui_1.Slider)(function (_a) {
@@ -92,3 +92,9 @@ exports.RankingRoot = (0, fbm_ui_1.styled)(fbm_ui_1.Box)({
92
92
  boxShadow: '0px 0px 4px 0px rgba(0 0 0 / 50%)',
93
93
  },
94
94
  });
95
+ exports.Image = (0, fbm_ui_1.styled)('img')({
96
+ width: 48,
97
+ height: 84,
98
+ borderRadius: 4,
99
+ objectFit: 'contain',
100
+ });
@@ -89,6 +89,11 @@ export interface Suggestion {
89
89
  show: boolean;
90
90
  abilitys: SuggestionAbility[];
91
91
  }
92
+ export interface ReviewImg {
93
+ url: string;
94
+ step: number;
95
+ title: string;
96
+ }
92
97
  export interface AiInterviewReportStep {
93
98
  token: string;
94
99
  status: number;
@@ -96,6 +101,7 @@ export interface AiInterviewReportStep {
96
101
  answer: Answer;
97
102
  scoreInfo: ScoreInfo;
98
103
  aiEvaluation: AiEvaluation;
104
+ reviewImgs: ReviewImg[];
99
105
  }
100
106
  export interface FaceAnalysis {
101
107
  age: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.38",
3
+ "version": "1.2.39-alpha.2",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",