eli-video-interview 1.2.35 → 1.2.36-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/Charts/Chart.js +1 -1
- 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/modules/ai-ability/Root.js +12 -3
- package/esm/modules/ai-ability/components/AddAbility/index.js +2 -2
- package/esm/modules/ai-ability/components/UpdateAbility/index.js +2 -2
- package/esm/modules/ai-ability/interface.d.ts +8 -1
- package/esm/modules/ai-ability-select/Root.d.ts +4 -0
- package/esm/modules/ai-ability-select/Root.js +47 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +4 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +22 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +4 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +42 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/interface.d.ts +13 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/interface.js +1 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +2 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.js +8 -0
- package/esm/modules/ai-ability-select/components/AiAbilityList/index.d.ts +4 -0
- package/esm/modules/ai-ability-select/components/AiAbilityList/index.js +19 -0
- package/esm/modules/ai-ability-select/components/AiAbilityList/interface.d.ts +4 -0
- package/esm/modules/ai-ability-select/components/AiAbilityList/interface.js +1 -0
- package/esm/modules/ai-ability-select/index.d.ts +4 -0
- package/esm/modules/ai-ability-select/index.js +20 -0
- package/esm/modules/ai-ability-select/interface.d.ts +33 -0
- package/esm/modules/ai-ability-select/interface.js +1 -0
- package/esm/modules/ai-question/Root.d.ts +1 -1
- package/esm/modules/ai-question/Root.js +6 -6
- package/esm/modules/ai-question/components/QuestionModel/AutoCombine.d.ts +4 -0
- package/esm/modules/ai-question/components/QuestionModel/AutoCombine.js +19 -0
- package/esm/modules/ai-question/components/QuestionModel/Interactive.d.ts +3 -0
- package/esm/modules/ai-question/components/QuestionModel/Interactive.js +30 -0
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.d.ts +4 -0
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +58 -0
- package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.d.ts +8 -0
- package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +62 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.d.ts +6 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.js +47 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +7 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +60 -0
- package/esm/modules/ai-question/components/QuestionUpdate/styled.d.ts +6 -0
- package/esm/modules/ai-question/components/QuestionUpdate/styled.js +52 -0
- package/esm/modules/ai-report/components/ScoreReport/styled.d.ts +1 -1
- 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-template/Root.js +32 -10
- package/esm/modules/ai-template/components/CapabilityModel/index.js +1 -1
- package/esm/modules/ai-template/components/QuestionList/Item.d.ts +2 -2
- package/esm/modules/ai-template/components/QuestionList/Item.js +28 -7
- package/esm/modules/ai-template/components/QuestionList/index.d.ts +2 -1
- package/esm/modules/ai-template/components/QuestionList/index.js +15 -4
- package/esm/modules/ai-template/components/QuestionList/interface.d.ts +6 -1
- package/esm/modules/ai-template/components/TemplateList/index.js +4 -4
- package/esm/modules/ai-template/components/TemplateList/styled.d.ts +1 -1
- package/esm/modules/ai-template/index.js +2 -2
- package/esm/modules/ai-template/interface.d.ts +2 -0
- package/esm/store/ai-ability-select/question-ability-store.d.ts +21 -0
- package/esm/store/ai-ability-select/question-ability-store.js +21 -0
- package/esm/store/ai-question/interview-room-store.d.ts +20 -0
- package/esm/store/ai-question/interview-room-store.js +21 -0
- package/esm/store/ai-template/global-store.d.ts +3 -0
- package/esm/store/ai-template/global-store.js +3 -3
- package/esm/store/enterprise/enterprise-store.d.ts +29 -0
- package/esm/store/enterprise/enterprise-store.js +13 -0
- package/lib/components/Charts/Chart.js +1 -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/modules/ai-ability/Root.js +12 -3
- package/lib/modules/ai-ability/components/AddAbility/index.js +2 -2
- package/lib/modules/ai-ability/components/UpdateAbility/index.js +2 -2
- package/lib/modules/ai-ability/interface.d.ts +8 -1
- package/lib/modules/ai-ability-select/Root.d.ts +4 -0
- package/lib/modules/ai-ability-select/Root.js +52 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +4 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +24 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +4 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +47 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/interface.d.ts +13 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/interface.js +2 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +2 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.js +11 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/index.d.ts +4 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/index.js +24 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/interface.d.ts +4 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/interface.js +2 -0
- package/lib/modules/ai-ability-select/index.d.ts +4 -0
- package/lib/modules/ai-ability-select/index.js +25 -0
- package/lib/modules/ai-ability-select/interface.d.ts +33 -0
- package/lib/modules/ai-ability-select/interface.js +2 -0
- package/lib/modules/ai-question/Root.d.ts +1 -1
- package/lib/modules/ai-question/Root.js +6 -6
- package/lib/modules/ai-question/components/QuestionModel/AutoCombine.d.ts +4 -0
- package/lib/modules/ai-question/components/QuestionModel/AutoCombine.js +21 -0
- package/lib/modules/ai-question/components/QuestionModel/Interactive.d.ts +3 -0
- package/lib/modules/ai-question/components/QuestionModel/Interactive.js +35 -0
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.d.ts +4 -0
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +63 -0
- package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.d.ts +8 -0
- package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +64 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.d.ts +6 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.js +49 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +7 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +62 -0
- package/lib/modules/ai-question/components/QuestionUpdate/styled.d.ts +6 -0
- package/lib/modules/ai-question/components/QuestionUpdate/styled.js +55 -0
- package/lib/modules/ai-report/components/ScoreReport/styled.d.ts +1 -1
- 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-template/Root.js +32 -10
- package/lib/modules/ai-template/components/CapabilityModel/index.js +1 -1
- package/lib/modules/ai-template/components/QuestionList/Item.d.ts +2 -2
- package/lib/modules/ai-template/components/QuestionList/Item.js +27 -6
- package/lib/modules/ai-template/components/QuestionList/index.d.ts +2 -1
- package/lib/modules/ai-template/components/QuestionList/index.js +15 -4
- package/lib/modules/ai-template/components/QuestionList/interface.d.ts +6 -1
- package/lib/modules/ai-template/components/TemplateList/index.js +4 -4
- package/lib/modules/ai-template/components/TemplateList/styled.d.ts +1 -1
- package/lib/modules/ai-template/index.js +2 -2
- package/lib/modules/ai-template/interface.d.ts +2 -0
- package/lib/store/ai-ability-select/question-ability-store.d.ts +21 -0
- package/lib/store/ai-ability-select/question-ability-store.js +24 -0
- package/lib/store/ai-question/interview-room-store.d.ts +20 -0
- package/lib/store/ai-question/interview-room-store.js +24 -0
- package/lib/store/ai-template/global-store.d.ts +3 -0
- package/lib/store/ai-template/global-store.js +3 -3
- package/lib/store/enterprise/enterprise-store.d.ts +29 -0
- package/lib/store/enterprise/enterprise-store.js +16 -0
- package/package.json +2 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* 从 Touch 事件中获取两个触控中心位置
|
|
5
|
+
*/
|
|
6
|
+
function getMultipleTouchPosition(evt) {
|
|
7
|
+
var _a = evt.touches[0], clientX = _a.clientX, clientY = _a.clientY;
|
|
8
|
+
if (evt.touches.length >= 2) {
|
|
9
|
+
var _b = evt.touches[1], nextClientX = _b.clientX, nextClientY = _b.clientY;
|
|
10
|
+
return [(clientX + nextClientX) / 2, (clientY + nextClientY) / 2, Math.sqrt(Math.pow((nextClientX - clientX), 2) + Math.pow((nextClientY - clientY), 2))];
|
|
11
|
+
}
|
|
12
|
+
return [clientX, clientY, 0];
|
|
13
|
+
}
|
|
14
|
+
exports.default = getMultipleTouchPosition;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取移动或缩放之后的中心点
|
|
3
|
+
*/
|
|
4
|
+
export default function getPositionOnMoveOrScale(x: number, y: number, width: number, height: number, scale: number, toScale: number, clientX?: number, clientY?: number, offsetX?: number, offsetY?: number): {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
lastCX: number;
|
|
8
|
+
lastCY: number;
|
|
9
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var variables_1 = require("../variables");
|
|
4
|
+
var edgeHandle_1 = require("./edgeHandle");
|
|
5
|
+
/**
|
|
6
|
+
* 获取移动或缩放之后的中心点
|
|
7
|
+
*/
|
|
8
|
+
function getPositionOnMoveOrScale(x, y, width, height, scale, toScale, clientX, clientY, offsetX, offsetY) {
|
|
9
|
+
if (clientX === void 0) { clientX = window.innerWidth / 2; }
|
|
10
|
+
if (clientY === void 0) { clientY = window.innerWidth / 2; }
|
|
11
|
+
if (offsetX === void 0) { offsetX = 0; }
|
|
12
|
+
if (offsetY === void 0) { offsetY = 0; }
|
|
13
|
+
// 是否接触边缘
|
|
14
|
+
var closedEdgeX = (0, edgeHandle_1.computePositionEdge)(x, toScale, width, window.innerWidth)[0];
|
|
15
|
+
var closedEdgeY = (0, edgeHandle_1.computePositionEdge)(y, toScale, height, window.innerWidth)[0];
|
|
16
|
+
var centerClientX = window.innerWidth / 2;
|
|
17
|
+
var centerClientY = window.innerWidth / 2;
|
|
18
|
+
// 坐标偏移
|
|
19
|
+
var lastPositionX = centerClientX + x;
|
|
20
|
+
var lastPositionY = centerClientY + y;
|
|
21
|
+
// 偏移位置
|
|
22
|
+
var originX = clientX - (clientX - lastPositionX) * (toScale / scale) - centerClientX;
|
|
23
|
+
var originY = clientY - (clientY - lastPositionY) * (toScale / scale) - centerClientY;
|
|
24
|
+
// 长图模式无左右反馈
|
|
25
|
+
var longModeEdge = height / width >= variables_1.longModeRatio && width * toScale === window.innerWidth;
|
|
26
|
+
// 超出边缘距离减半
|
|
27
|
+
return {
|
|
28
|
+
x: originX + (longModeEdge ? 0 : closedEdgeX ? offsetX / 2 : offsetX),
|
|
29
|
+
y: originY + (closedEdgeY ? offsetY / 2 : offsetY),
|
|
30
|
+
lastCX: clientX,
|
|
31
|
+
lastCY: clientY,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
exports.default = getPositionOnMoveOrScale;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* 获取旋转后的宽高
|
|
5
|
+
*/
|
|
6
|
+
function getRotateSize(rotate, width, height) {
|
|
7
|
+
var isVertical = rotate % 180 !== 0;
|
|
8
|
+
// 若图片不是水平则调换属性
|
|
9
|
+
if (isVertical) {
|
|
10
|
+
return [height, width, isVertical];
|
|
11
|
+
}
|
|
12
|
+
return [width, height, isVertical];
|
|
13
|
+
}
|
|
14
|
+
exports.default = getRotateSize;
|
|
@@ -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;
|
|
@@ -60,7 +60,7 @@ var dayjs_1 = __importDefault(require("dayjs"));
|
|
|
60
60
|
var fbm_ui_1 = require("fbm-ui");
|
|
61
61
|
var react_1 = require("react");
|
|
62
62
|
var AiAbilityRoot = function (_a) {
|
|
63
|
-
var _b = _a.ablilityNameLength, ablilityNameLength = _b === void 0 ? 30 : _b;
|
|
63
|
+
var _b = _a.ablilityNameLength, ablilityNameLength = _b === void 0 ? 30 : _b, onCreate = _a.onCreate, onDelete = _a.onDelete, onEdit = _a.onEdit;
|
|
64
64
|
var _c = (0, ahooks_1.useSetState)({
|
|
65
65
|
name: '',
|
|
66
66
|
token: '',
|
|
@@ -105,6 +105,7 @@ var AiAbilityRoot = function (_a) {
|
|
|
105
105
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
106
106
|
return __generator(this, function (_b) {
|
|
107
107
|
deleteList(token);
|
|
108
|
+
onDelete === null || onDelete === void 0 ? void 0 : onDelete({ token: token });
|
|
108
109
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
109
110
|
return [2 /*return*/];
|
|
110
111
|
});
|
|
@@ -112,12 +113,20 @@ var AiAbilityRoot = function (_a) {
|
|
|
112
113
|
},
|
|
113
114
|
});
|
|
114
115
|
}
|
|
115
|
-
}, [deleteList]);
|
|
116
|
+
}, [deleteList, onDelete]);
|
|
116
117
|
var handleClose = (0, react_1.useCallback)(function () {
|
|
117
118
|
setState({ name: '' });
|
|
118
119
|
setAddAbilityOpen(false);
|
|
119
120
|
setUpdateAbilityOpen(false);
|
|
120
121
|
}, [setState, setAddAbilityOpen, setUpdateAbilityOpen]);
|
|
122
|
+
var handleCreateSuccess = (0, react_1.useCallback)(function (data) {
|
|
123
|
+
onCreate === null || onCreate === void 0 ? void 0 : onCreate(data);
|
|
124
|
+
getList();
|
|
125
|
+
}, [getList, onCreate]);
|
|
126
|
+
var handleEditSuccess = (0, react_1.useCallback)(function (data) {
|
|
127
|
+
onEdit === null || onEdit === void 0 ? void 0 : onEdit(data);
|
|
128
|
+
getList();
|
|
129
|
+
}, [getList, onEdit]);
|
|
121
130
|
var columns = [
|
|
122
131
|
{
|
|
123
132
|
id: 'name',
|
|
@@ -148,6 +157,6 @@ var AiAbilityRoot = function (_a) {
|
|
|
148
157
|
},
|
|
149
158
|
},
|
|
150
159
|
];
|
|
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:
|
|
160
|
+
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: handleCreateSuccess }))), UpdateAbilityOpen && ((0, jsx_runtime_1.jsx)(UpdateAbility_1.default, __assign({}, state, { open: UpdateAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: handleEditSuccess }))), (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 }) }))] }));
|
|
152
161
|
};
|
|
153
162
|
exports.default = AiAbilityRoot;
|
|
@@ -98,10 +98,10 @@ var AddAbility = function (props) {
|
|
|
98
98
|
var _e = (0, react_1.useState)(InitialValues.workPlaceItems), workPlaceItems = _e[0], setWorkPlaceItems = _e[1];
|
|
99
99
|
var _f = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionUpsert, {
|
|
100
100
|
manual: true,
|
|
101
|
-
onSuccess: function () {
|
|
101
|
+
onSuccess: function (data) {
|
|
102
102
|
fbm_ui_1.Message.success('新增能力成功');
|
|
103
103
|
onClose();
|
|
104
|
-
onSuccess();
|
|
104
|
+
onSuccess(data === null || data === void 0 ? void 0 : data.data);
|
|
105
105
|
},
|
|
106
106
|
}), run = _f.run, loading = _f.loading;
|
|
107
107
|
var _g = (0, ahooks_1.useRequest)(ai_ability_1.CheckDuplicateCollection, {
|
|
@@ -68,10 +68,10 @@ var UpdateAbility = function (props) {
|
|
|
68
68
|
var _g = (0, react_1.useState)(const_1.InitialValues.workPlaceItems), workPlaceItems = _g[0], setWorkPlaceItems = _g[1];
|
|
69
69
|
var _h = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionUpsert, {
|
|
70
70
|
manual: true,
|
|
71
|
-
onSuccess: function () {
|
|
71
|
+
onSuccess: function (data) {
|
|
72
72
|
fbm_ui_1.Message.success("\u7F16\u8F91\u80FD\u529B\u6210\u529F");
|
|
73
73
|
onClose();
|
|
74
|
-
onSuccess();
|
|
74
|
+
onSuccess(data === null || data === void 0 ? void 0 : data.data);
|
|
75
75
|
},
|
|
76
76
|
onError: function (err) {
|
|
77
77
|
console.log(err);
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
interface AiAbilityToken {
|
|
2
|
+
token: string;
|
|
3
|
+
}
|
|
1
4
|
export interface AiAbilityProps {
|
|
2
5
|
ablilityNameLength?: number;
|
|
6
|
+
onCreate?: (data: AiAbilityToken) => void;
|
|
7
|
+
onEdit?: (data: AiAbilityToken) => void;
|
|
8
|
+
onDelete?: (data: AiAbilityToken) => void;
|
|
3
9
|
}
|
|
4
10
|
export interface QuestionCollectionList {
|
|
5
11
|
name: string;
|
|
@@ -28,7 +34,7 @@ export interface AbilityProps {
|
|
|
28
34
|
token?: string;
|
|
29
35
|
ablilityNameLength?: number;
|
|
30
36
|
onClose: () => void;
|
|
31
|
-
onSuccess: () => void;
|
|
37
|
+
onSuccess: (data: any) => void;
|
|
32
38
|
}
|
|
33
39
|
export interface AiDefineItem {
|
|
34
40
|
name: string;
|
|
@@ -51,3 +57,4 @@ export interface CheckDuplicateCollectionData {
|
|
|
51
57
|
export interface CheckDuplicateCollectionRes {
|
|
52
58
|
data: CheckDuplicateCollectionData;
|
|
53
59
|
}
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AiAbilitySelectProps } from './interface';
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<AiAbilitySelectProps & import("react").RefAttributes<any>>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
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 AiAbilityList_1 = __importDefault(require("./components/AiAbilityList"));
|
|
19
|
+
var ai_ability_1 = require("../../services/ai-ability");
|
|
20
|
+
var question_ability_store_1 = require("../../store/ai-ability-select/question-ability-store");
|
|
21
|
+
var enterprise_store_1 = require("../../store/enterprise/enterprise-store");
|
|
22
|
+
var ahooks_1 = require("ahooks");
|
|
23
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
24
|
+
var fbm_ui_2 = require("fbm-ui");
|
|
25
|
+
var mui_1 = require("fbm-ui/lib/mui");
|
|
26
|
+
var react_1 = require("react");
|
|
27
|
+
var ScrollDialogContent = (0, fbm_ui_2.styled)(fbm_ui_1.Box)({
|
|
28
|
+
maxHeight: 'calc(100vh - 192px)',
|
|
29
|
+
overflow: 'scroll',
|
|
30
|
+
});
|
|
31
|
+
var AiAbilitySelectRoot = (0, react_1.forwardRef)(function (_a, ref) {
|
|
32
|
+
var jobToken = _a.jobToken, thirdToken = _a.thirdToken, token = _a.token;
|
|
33
|
+
var _b = (0, question_ability_store_1.useAiAbilityListStore)(), aiAbilityList = _b.aiAbilityList, setAiAbilityList = _b.setAiAbilityList, selctedAbilitys = _b.selctedAbilitys;
|
|
34
|
+
var setEnterprise = (0, enterprise_store_1.useEnterpriseStore)().setEnterprise;
|
|
35
|
+
var data = (0, ahooks_1.useRequest)(function () { return (0, ai_ability_1.GetAiAbilityList)({ jobToken: jobToken, thirdToken: thirdToken }); }, {
|
|
36
|
+
refreshDeps: [jobToken, thirdToken],
|
|
37
|
+
}).data;
|
|
38
|
+
(0, react_1.useEffect)(function () {
|
|
39
|
+
var _a;
|
|
40
|
+
setAiAbilityList(((_a = data === null || data === void 0 ? void 0 : data.data.list) === null || _a === void 0 ? void 0 : _a.filter(function (v) {
|
|
41
|
+
return !token || !v.isNew || selctedAbilitys.includes(v.token);
|
|
42
|
+
})) || []);
|
|
43
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44
|
+
}, [data, token, selctedAbilitys]);
|
|
45
|
+
(0, react_1.useEffect)(function () {
|
|
46
|
+
setEnterprise({ jobToken: jobToken, thirdToken: thirdToken });
|
|
47
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
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: "\u8BF7\u9009\u62E9\u8981\u4F18\u5148\u4F7F\u7528\u7684\u8003\u5BDF\u80FD\u529B\uFF0C\u4E5F\u53EF\u4EE5\u70B9\u51FB\u300C\u4E0B\u4E00\u6B65\u300D\u76F4\u63A5\u51FA\u9898" })), (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
|
+
});
|
|
51
|
+
AiAbilitySelectRoot.displayName = 'AiAbilitySelectRoot';
|
|
52
|
+
exports.default = (0, react_1.memo)(AiAbilitySelectRoot);
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
15
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
16
|
+
var mui_1 = require("fbm-ui/lib/mui");
|
|
17
|
+
var AiAbilityDetail = function (_a) {
|
|
18
|
+
var detail = _a.detail;
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ p: 2, maxHeight: 582, overflow: "scroll" }, { children: detail === null || detail === void 0 ? void 0 : detail.map(function (v) {
|
|
20
|
+
var _a;
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ mb: 2, spacing: 1, width: 300 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: 500 }, { children: v.name })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: (_a = v.items) === null || _a === void 0 ? void 0 : _a.join('\n') }))] }), v.name));
|
|
22
|
+
}) })));
|
|
23
|
+
};
|
|
24
|
+
exports.default = AiAbilityDetail;
|
|
@@ -0,0 +1,47 @@
|
|
|
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 __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
+
if (ar || !(i in from)) {
|
|
16
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
+
ar[i] = from[i];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
+
};
|
|
22
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
|
+
var AiAbilityDetail_1 = __importDefault(require("./AiAbilityDetail"));
|
|
28
|
+
var styled_1 = require("./styled");
|
|
29
|
+
var question_ability_store_1 = require("../../../../store/ai-ability-select/question-ability-store");
|
|
30
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
31
|
+
var AiAbilityItem = function (_a) {
|
|
32
|
+
var name = _a.name, isNew = _a.isNew, token = _a.token, detail = _a.detail;
|
|
33
|
+
var _b = (0, question_ability_store_1.useAiAbilityListStore)(), selctedAbilitys = _b.selctedAbilitys, setSelctedAbilitys = _b.setSelctedAbilitys;
|
|
34
|
+
var handleChange = function (_, checked) {
|
|
35
|
+
return setSelctedAbilitys(__spreadArray(__spreadArray([], selctedAbilitys.filter(function (v) { return v !== token; }), true), (checked ? [token] : []), true));
|
|
36
|
+
};
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Paper, __assign({ variant: "outlined" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: { pl: 2, width: 240, height: 54, display: 'flex', alignItems: 'center', position: 'relative' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { onChange: handleChange, label: (0, jsx_runtime_1.jsx)(AiAbilityLable, { name: name, detail: detail }), checked: selctedAbilitys.includes(token),
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
sx: { width: 1, height: 1 } }), isNew && (0, jsx_runtime_1.jsx)(styled_1.NewBadge, { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn" })] })) })));
|
|
40
|
+
};
|
|
41
|
+
var AiAbilityLable = function (_a) {
|
|
42
|
+
var name = _a.name, detail = _a.detail;
|
|
43
|
+
if ((detail === null || detail === void 0 ? void 0 : detail.length) > 0)
|
|
44
|
+
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ content: (0, jsx_runtime_1.jsx)(AiAbilityDetail_1.default, { detail: detail }), trigger: "hover", placement: "right" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ noWrap: true, maxWidth: 180, variant: "body2", sx: { mt: 0.5 } }, { children: name })) })));
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ noWrap: true, maxWidth: 180, variant: "body2" }, { children: name })));
|
|
46
|
+
};
|
|
47
|
+
exports.default = AiAbilityItem;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface AiAbilityDetail {
|
|
2
|
+
name: string;
|
|
3
|
+
items: string[];
|
|
4
|
+
}
|
|
5
|
+
export interface AiAbilityDetailProps {
|
|
6
|
+
detail: AiAbilityDetail[];
|
|
7
|
+
}
|
|
8
|
+
export interface AiAbilityItemProps extends AiAbilityDetailProps {
|
|
9
|
+
name: string;
|
|
10
|
+
isNew?: boolean;
|
|
11
|
+
token: string;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const NewBadge: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NewBadge = void 0;
|
|
4
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
5
|
+
exports.NewBadge = (0, fbm_ui_1.styled)('img')({
|
|
6
|
+
position: 'absolute',
|
|
7
|
+
right: 0,
|
|
8
|
+
top: 0,
|
|
9
|
+
width: 38,
|
|
10
|
+
height: 16,
|
|
11
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
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 AiAbilityItem_1 = __importDefault(require("../AiAbilityItem"));
|
|
19
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
20
|
+
var AiAbilityList = function (_a) {
|
|
21
|
+
var items = _a.items;
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Grid, __assign({ container: true, spacing: 1, rowSpacing: 1, columnSpacing: 1 }, { children: items === null || items === void 0 ? void 0 : items.map(function (item) { return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(AiAbilityItem_1.default, __assign({}, item)) }), item.token)); }) })));
|
|
23
|
+
};
|
|
24
|
+
exports.default = AiAbilityList;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AiAbilitySelectProps } from './interface';
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<AiAbilitySelectProps & import("react").RefAttributes<any>>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 Root_1 = __importDefault(require("./Root"));
|
|
19
|
+
var RootProvider_1 = __importDefault(require("../../components/RootProvider"));
|
|
20
|
+
var react_1 = require("react");
|
|
21
|
+
var AiAbilitySelect = (0, react_1.forwardRef)(function (props, ref) {
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(RootProvider_1.default, { children: (0, jsx_runtime_1.jsx)(Root_1.default, __assign({ ref: ref }, props)) }));
|
|
23
|
+
});
|
|
24
|
+
AiAbilitySelect.displayName = 'AiAbilitySelect';
|
|
25
|
+
exports.default = (0, react_1.memo)(AiAbilitySelect);
|