eli-video-interview 1.2.29-beta.2 → 1.2.29-beta.3
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/BigBallSvg/styled.d.ts +2 -2
- package/esm/components/ScoreBigBall/styled.d.ts +1 -1
- package/esm/components/ScrollDialogContent/index.d.ts +1 -1
- package/esm/components/VideoPreview/styled.d.ts +3 -3
- package/esm/index.d.ts +0 -1
- package/esm/index.js +0 -1
- package/esm/modules/ai-ability/Root.js +29 -17
- package/esm/modules/ai-ability/components/AbilityFormItem/index.d.ts +13 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/index.js +126 -0
- package/esm/modules/ai-ability/components/AddAbility/index.d.ts +4 -0
- package/esm/modules/ai-ability/components/AddAbility/index.js +178 -0
- package/esm/modules/ai-ability/components/UpdateAbility/index.d.ts +2 -2
- package/esm/modules/ai-ability/components/UpdateAbility/index.js +125 -21
- package/esm/modules/ai-ability/index.js +1 -1
- package/esm/modules/ai-ability/interface.d.ts +27 -0
- package/esm/modules/ai-ability/styled.d.ts +4 -1
- package/esm/modules/ai-ability/styled.js +5 -1
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +3 -3
- package/esm/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +1 -1
- package/esm/modules/ai-question/components/BaseAccordion/styled.d.ts +3 -3
- package/esm/modules/ai-question/components/BootVideo/styled.d.ts +4 -4
- package/esm/modules/ai-question/components/QuestionModel/styled.d.ts +1 -1
- package/esm/modules/ai-question/components/QuestionPreview/styled.d.ts +2 -2
- package/esm/modules/ai-report/components/MenuAnchor/index.d.ts +3 -3
- package/esm/modules/ai-report/components/MenuAnchor/index.js +103 -8
- package/esm/modules/ai-report/components/RankingRange/styled.d.ts +2 -2
- package/esm/modules/ai-report/components/ScoreReport/styled.d.ts +5 -5
- package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +7 -7
- package/esm/modules/ai-report/components/WorkPlaces/index.js +2 -3
- package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +4 -4
- package/esm/modules/ai-report/index.js +1 -0
- package/esm/modules/ai-report/interface.d.ts +10 -0
- package/esm/modules/ai-template/components/TemplateList/styled.d.ts +10 -10
- package/esm/modules/ai-template/components/TemplateMenu/styled.d.ts +4 -4
- package/esm/services/ai-ability.d.ts +12 -3
- package/esm/services/ai-ability.js +5 -2
- package/lib/components/BigBallSvg/styled.d.ts +2 -2
- package/lib/components/ScoreBigBall/styled.d.ts +1 -1
- package/lib/components/ScrollDialogContent/index.d.ts +1 -1
- package/lib/components/VideoPreview/styled.d.ts +3 -3
- package/lib/index.d.ts +0 -1
- package/lib/index.js +1 -3
- package/lib/modules/ai-ability/Root.js +29 -17
- package/lib/modules/ai-ability/components/AbilityFormItem/index.d.ts +13 -0
- package/lib/modules/ai-ability/components/AbilityFormItem/index.js +128 -0
- package/lib/modules/ai-ability/components/AddAbility/index.d.ts +4 -0
- package/lib/modules/ai-ability/components/AddAbility/index.js +183 -0
- package/lib/modules/ai-ability/components/UpdateAbility/index.d.ts +2 -2
- package/lib/modules/ai-ability/components/UpdateAbility/index.js +127 -20
- package/lib/modules/ai-ability/index.js +1 -1
- package/lib/modules/ai-ability/interface.d.ts +27 -0
- package/lib/modules/ai-ability/styled.d.ts +4 -1
- package/lib/modules/ai-ability/styled.js +5 -1
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +1 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +1 -1
- package/lib/modules/ai-question/components/BaseAccordion/styled.d.ts +3 -3
- package/lib/modules/ai-question/components/BootVideo/styled.d.ts +4 -4
- package/lib/modules/ai-question/components/QuestionModel/styled.d.ts +1 -1
- package/lib/modules/ai-question/components/QuestionPreview/styled.d.ts +2 -2
- package/lib/modules/ai-report/components/MenuAnchor/index.d.ts +3 -3
- package/lib/modules/ai-report/components/MenuAnchor/index.js +101 -9
- package/lib/modules/ai-report/components/RankingRange/styled.d.ts +2 -2
- package/lib/modules/ai-report/components/ScoreReport/styled.d.ts +5 -5
- package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +7 -7
- package/lib/modules/ai-report/components/WorkPlaces/index.js +1 -2
- package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +4 -4
- package/lib/modules/ai-report/index.js +1 -0
- package/lib/modules/ai-report/interface.d.ts +10 -0
- package/lib/modules/ai-template/components/TemplateList/styled.d.ts +10 -10
- package/lib/modules/ai-template/components/TemplateMenu/styled.d.ts +4 -4
- package/lib/services/ai-ability.d.ts +12 -3
- package/lib/services/ai-ability.js +9 -4
- package/package.json +1 -1
- package/esm/modules/ai-ability/components/UpdateAbility/interface.d.ts +0 -7
- package/esm/modules/ai-ability/components/UpdateAbility/interface.js +0 -1
- package/esm/modules/ai-report/components/MenuAnchor/MenuAnchor.d.ts +0 -4
- package/esm/modules/ai-report/components/MenuAnchor/MenuAnchor.js +0 -106
- package/esm/modules/ai-report/components/MenuAnchor/interface.d.ts +0 -10
- package/esm/modules/ai-report/components/MenuAnchor/interface.js +0 -1
- package/lib/modules/ai-ability/components/UpdateAbility/interface.d.ts +0 -7
- package/lib/modules/ai-ability/components/UpdateAbility/interface.js +0 -2
- package/lib/modules/ai-report/components/MenuAnchor/MenuAnchor.d.ts +0 -4
- package/lib/modules/ai-report/components/MenuAnchor/MenuAnchor.js +0 -108
- package/lib/modules/ai-report/components/MenuAnchor/interface.d.ts +0 -10
- package/lib/modules/ai-report/components/MenuAnchor/interface.js +0 -2
|
@@ -15,7 +15,7 @@ import WorkPlace from './WorkPlace';
|
|
|
15
15
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
16
16
|
import AiHeaderTitle from "../../../../components/AiHeaderTitle";
|
|
17
17
|
import { blue, orange, purple } from '@mui/material/colors';
|
|
18
|
-
import { InfoOutlineIcon, styled, Tooltip, Typography } from 'fbm-ui';
|
|
18
|
+
import { Chip, InfoOutlineIcon, styled, Tooltip, Typography } from 'fbm-ui';
|
|
19
19
|
import { Box, Collapse, Paper, Stack } from 'fbm-ui/lib/mui';
|
|
20
20
|
var TagTitle = styled(Box)(function (bgcolor) { return ({
|
|
21
21
|
position: 'relative',
|
|
@@ -24,7 +24,6 @@ var TagTitle = styled(Box)(function (bgcolor) { return ({
|
|
|
24
24
|
display: 'inline-block',
|
|
25
25
|
textAlign: 'center',
|
|
26
26
|
backgroundColor: bgcolor[200],
|
|
27
|
-
margin: '8px 0 16px',
|
|
28
27
|
'&:before': {
|
|
29
28
|
position: 'absolute',
|
|
30
29
|
content: '""',
|
|
@@ -61,7 +60,7 @@ var Index = function () {
|
|
|
61
60
|
if (!showAiDimension)
|
|
62
61
|
return null;
|
|
63
62
|
return (_jsxs(Box, __assign({ id: "report-workplace", component: Paper, variant: "outlined", px: 2, mt: 2 }, { children: [_jsx(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: _jsx(AiHeaderTitle, { name: "\u804C\u573A\u80FD\u529B\u8868\u73B0" }) })), _jsx(Collapse, __assign({ in: true }, { children: (_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaces) === null || _a === void 0 ? void 0 : _a.map(function (v, idx) {
|
|
64
|
-
return (_jsxs(Box, __assign({ component: Paper, variant: "outlined", elevation: 0, mb: 2, pb: 2, pr: 2 }, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between", alignItems: "center" }, { children: [_jsx(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: _jsx(Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff' } }, { children: v.dimensionName })) })), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u9AD8\u5206\u8868\u73B0\uFF1A", v.abilityExpression.good, _jsx("br", {}), "\u4F4E\u5206\u8868\u73B0\uFF1A", v.abilityExpression.bad] }) }, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body2", style: { lineHeight: '32px' }, mr: 1 }, { children: "\u4F18\u6B21\u8868\u73B0" })), _jsx(InfoOutlineIcon, { sx: { fontSize: '16px' } })] })) }))] })), _jsx(Typography, __assign({ variant: "body2", color: "secondary", ml: 2, style: { background: '#F5F5F5', borderRadius: 4, padding: 8 } }, { children: v.define })), _jsxs(Stack, __assign({ pl: 2 }, { children: [_jsx(Box, __assign({ mt: 2 }, { children: _jsx(ScoreSlider, { width: "100%", isShowLabel: true, score: v.score, scoreText: v.scoreText, scoreLevel: v.scoreLevel }) })), _jsx(Stack, __assign({ spacing: 2 }, { children: _jsx(WorkPlace, { token: v.token, canEdit: canEditAiDimension, answer: v.answer, mode: "show", bgcolor: ColorIndexMap[idx % 3][50] }) }))] }))] }), v.token));
|
|
63
|
+
return (_jsxs(Box, __assign({ component: Paper, variant: "outlined", elevation: 0, mb: 2, pb: 2, pr: 2 }, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between", alignItems: "center" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", mb: 2, mt: 1 }, { children: [_jsx(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: _jsx(Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff' } }, { children: v.dimensionName })) })), v.dimensionType === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } })] })), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u9AD8\u5206\u8868\u73B0\uFF1A", v.abilityExpression.good, _jsx("br", {}), "\u4F4E\u5206\u8868\u73B0\uFF1A", v.abilityExpression.bad] }) }, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body2", style: { lineHeight: '32px' }, mr: 1 }, { children: "\u4F18\u6B21\u8868\u73B0" })), _jsx(InfoOutlineIcon, { sx: { fontSize: '16px' } })] })) }))] })), _jsx(Typography, __assign({ variant: "body2", color: "secondary", ml: 2, style: { background: '#F5F5F5', borderRadius: 4, padding: 8 } }, { children: v.define })), _jsxs(Stack, __assign({ pl: 2 }, { children: [_jsx(Box, __assign({ mt: 2 }, { children: _jsx(ScoreSlider, { width: "100%", isShowLabel: true, score: v.score, scoreText: v.scoreText, scoreLevel: v.scoreLevel }) })), _jsx(Stack, __assign({ spacing: 2 }, { children: _jsx(WorkPlace, { token: v.token, canEdit: canEditAiDimension, answer: v.answer, mode: "show", bgcolor: ColorIndexMap[idx % 3][50] }) }))] }))] }), v.token));
|
|
65
64
|
}) }))] })));
|
|
66
65
|
};
|
|
67
66
|
export default Index;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const WorkplaceStyledSlider: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
color?: "
|
|
3
|
+
color?: "primary" | "secondary" | undefined;
|
|
4
4
|
classes?: (Partial<import("fbm-ui/lib/mui").SliderUnstyledClasses> & {
|
|
5
5
|
colorPrimary?: string | undefined;
|
|
6
6
|
colorSecondary?: string | undefined;
|
|
@@ -10,7 +10,7 @@ export declare const WorkplaceStyledSlider: import("@emotion/styled").StyledComp
|
|
|
10
10
|
thumbSizeSmall?: string | undefined;
|
|
11
11
|
}) | undefined;
|
|
12
12
|
size?: "small" | "medium" | undefined;
|
|
13
|
-
sx?: import("@mui/system").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
|
|
13
|
+
sx?: import("@mui/system/styleFunctionSx").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
|
|
14
14
|
} & {
|
|
15
15
|
'aria-label'?: string | undefined;
|
|
16
16
|
'aria-labelledby'?: string | undefined;
|
|
@@ -56,7 +56,7 @@ export declare const WorkplaceStyledSlider: import("@emotion/styled").StyledComp
|
|
|
56
56
|
valueLabelFormat?: string | ((value: number, index: number) => import("react").ReactNode) | undefined;
|
|
57
57
|
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
|
|
58
58
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
59
|
-
}, "track" | "name" | "classes" | "color" | "scale" | "sx" | "defaultValue" | "tabIndex" | "aria-label" | "aria-labelledby" | "aria-valuetext" | "onChange" | "disabled" | "max" | "min" | "orientation" | "size" | "step" | "value" | "components" | "componentsProps" | "disableSwap" | "getAriaLabel" | "getAriaValueText" | "isRtl" | "marks" | "onChangeCommitted" | "valueLabelDisplay" | "valueLabelFormat"> & import("@mui/system").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
59
|
+
}, "track" | "name" | "classes" | "color" | "scale" | "sx" | "defaultValue" | "tabIndex" | "aria-label" | "aria-labelledby" | "aria-valuetext" | "onChange" | "disabled" | "max" | "min" | "orientation" | "size" | "step" | "value" | "components" | "componentsProps" | "disableSwap" | "getAriaLabel" | "getAriaValueText" | "isRtl" | "marks" | "onChangeCommitted" | "valueLabelDisplay" | "valueLabelFormat"> & import("@mui/system/createStyled").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
60
60
|
export declare const ScoreSliderRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
61
61
|
children?: import("react").ReactNode;
|
|
62
|
-
} & import("@mui/system").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
62
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
@@ -14,6 +14,7 @@ import ReportRoot from './Root';
|
|
|
14
14
|
import RootProvider from "../../components/RootProvider";
|
|
15
15
|
import { forwardRef, memo } from 'react';
|
|
16
16
|
var AiReport = forwardRef(function (props, ref) {
|
|
17
|
+
// const { token, showAiDimension = true } = props;
|
|
17
18
|
return (_jsx(RootProvider, { children: _jsx(ReportRoot, __assign({ ref: ref }, props)) }));
|
|
18
19
|
});
|
|
19
20
|
AiReport.displayName = 'AiReport';
|
|
@@ -175,3 +175,13 @@ export interface AiReportProps {
|
|
|
175
175
|
export interface AiReportRef {
|
|
176
176
|
handleRefresh: () => void;
|
|
177
177
|
}
|
|
178
|
+
export interface AnchorItem {
|
|
179
|
+
type: string;
|
|
180
|
+
name: string;
|
|
181
|
+
id: string;
|
|
182
|
+
}
|
|
183
|
+
export interface MenuAnchorProps {
|
|
184
|
+
list?: AnchorItem[];
|
|
185
|
+
token: string;
|
|
186
|
+
showAiDimension: boolean;
|
|
187
|
+
}
|
|
@@ -2,36 +2,36 @@
|
|
|
2
2
|
export declare const AddIconRoot: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
4
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
5
|
-
color?: "inherit" | "disabled" | "action" | "
|
|
5
|
+
color?: "inherit" | "disabled" | "action" | "primary" | "secondary" | "success" | "error" | "info" | "warning" | undefined;
|
|
6
6
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
7
7
|
htmlColor?: string | undefined;
|
|
8
8
|
shapeRendering?: string | undefined;
|
|
9
|
-
sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
|
|
9
|
+
sx?: import("@mui/system/styleFunctionSx").SxProps<import("@mui/material").Theme> | undefined;
|
|
10
10
|
titleAccess?: string | undefined;
|
|
11
11
|
viewBox?: string | undefined;
|
|
12
12
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "seed" | "children" | "style" | "clipPath" | "filter" | "mask" | "path" | "d" | "y" | "name" | "type" | "onLoad" | "fill" | "values" | "className" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "cursor" | "direction" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "key" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "local" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
|
|
13
13
|
ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
|
|
14
14
|
}, "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "sx" | "viewBox" | "htmlColor" | "titleAccess"> & {
|
|
15
15
|
children?: import("react").ReactNode;
|
|
16
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
16
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
17
17
|
export declare const ListRow: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
18
18
|
children?: import("react").ReactNode;
|
|
19
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
19
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
20
20
|
export declare const ListCol: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
21
21
|
children?: import("react").ReactNode;
|
|
22
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
22
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
23
23
|
export declare const ListItem: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
24
24
|
children?: import("react").ReactNode;
|
|
25
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
25
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
26
26
|
export declare const ListItemTitle: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Typography").TypographyProps & {
|
|
27
27
|
children?: import("react").ReactNode;
|
|
28
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
28
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
29
29
|
export declare const ListItemSubTitle: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Typography").TypographyProps & {
|
|
30
30
|
children?: import("react").ReactNode;
|
|
31
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
31
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
32
32
|
export declare const ListItemBody: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
33
33
|
children?: import("react").ReactNode;
|
|
34
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
34
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
35
35
|
export declare const ListItemOperation: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
36
36
|
children?: import("react").ReactNode;
|
|
37
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
37
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const TemplateMenuList: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/mui").MenuListProps & import("@mui/system").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
2
|
+
export declare const TemplateMenuList: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/mui").MenuListProps & import("@mui/system/createStyled").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
3
3
|
export declare const TemplateMenuItem: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
autoFocus?: boolean | undefined;
|
|
5
5
|
classes?: Partial<import("fbm-ui/lib/mui").MenuItemClasses> | undefined;
|
|
@@ -8,7 +8,7 @@ export declare const TemplateMenuItem: import("@emotion/styled").StyledComponent
|
|
|
8
8
|
disableGutters?: boolean | undefined;
|
|
9
9
|
divider?: boolean | undefined;
|
|
10
10
|
selected?: boolean | undefined;
|
|
11
|
-
sx?: import("@mui/system").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
|
|
11
|
+
sx?: import("@mui/system/styleFunctionSx").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
|
|
12
12
|
} & Omit<{
|
|
13
13
|
action?: import("react").Ref<import("fbm-ui/lib/mui").ButtonBaseActions> | undefined;
|
|
14
14
|
centerRipple?: boolean | undefined;
|
|
@@ -21,9 +21,9 @@ export declare const TemplateMenuItem: import("@emotion/styled").StyledComponent
|
|
|
21
21
|
focusVisibleClassName?: string | undefined;
|
|
22
22
|
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
23
23
|
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
24
|
-
sx?: import("@mui/system").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
|
|
24
|
+
sx?: import("@mui/system/styleFunctionSx").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
|
|
25
25
|
tabIndex?: number | undefined;
|
|
26
26
|
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
27
27
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof import("react").LiHTMLAttributes<HTMLLIElement>> & {
|
|
28
28
|
ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
29
|
-
}, "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "tabIndex" | "disabled" | "autoFocus" | "action" | "
|
|
29
|
+
}, "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "tabIndex" | "disabled" | "autoFocus" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "selected" | "divider" | "dense" | "disableGutters"> & import("@mui/system/createStyled").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
export declare const PostQuestionCollectionList: <R>() => import("axios").AxiosPromise<R>;
|
|
2
|
-
|
|
2
|
+
export declare const PostQuestionCollectionDelete: <R>(token: string) => import("axios").AxiosPromise<R>;
|
|
3
|
+
interface workPlaceItem {
|
|
4
|
+
name: string;
|
|
5
|
+
type: number;
|
|
6
|
+
items: string[];
|
|
7
|
+
}
|
|
8
|
+
interface DiyUpsertData {
|
|
3
9
|
token?: string;
|
|
4
10
|
name: string;
|
|
5
11
|
tag: string;
|
|
12
|
+
type?: number;
|
|
6
13
|
isWorkplace?: boolean;
|
|
14
|
+
workPlaceItems?: workPlaceItem[];
|
|
7
15
|
mateData: {
|
|
8
16
|
account?: string;
|
|
9
17
|
enterpriseId?: string;
|
|
10
18
|
};
|
|
11
19
|
}
|
|
12
|
-
export declare const PostQuestionCollectionUpsert: <R>(data:
|
|
13
|
-
export declare const
|
|
20
|
+
export declare const PostQuestionCollectionUpsert: <R>(data: DiyUpsertData) => import("axios").AxiosPromise<R>;
|
|
21
|
+
export declare const GetAiDefine: <R>(data: any) => import("axios").AxiosPromise<R>;
|
|
22
|
+
export declare const GetAbilityDetail: <R>(data: any) => import("axios").AxiosPromise<R>;
|
|
14
23
|
export {};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { POST } from "../utils/request";
|
|
2
2
|
// 考察能力列表
|
|
3
3
|
export var PostQuestionCollectionList = function () { return POST({ url: '/standard/b/questionCollection/list' }); };
|
|
4
|
-
// 更新考察能力
|
|
5
|
-
export var PostQuestionCollectionUpsert = function (data) { return POST({ url: 'standard/b/questionCollection/upsert', data: data }); };
|
|
6
4
|
// 删除考察能力
|
|
7
5
|
export var PostQuestionCollectionDelete = function (token) { return POST({ url: 'standard/b/questionCollection/delete', data: { token: token } }); };
|
|
6
|
+
export var PostQuestionCollectionUpsert = function (data) { return POST({ url: '/standard/b/questionCollection/upsert', data: data }); };
|
|
7
|
+
// GPT 生成内容
|
|
8
|
+
export var GetAiDefine = function (data) { return POST({ url: '/standard/b/questionCollection/intelligenceQuery', data: data }); };
|
|
9
|
+
// 获取考察能力详情
|
|
10
|
+
export var GetAbilityDetail = function (data) { return POST({ url: '/standard/b/questionCollection', data: data }); };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const SvgRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").SVGProps<SVGSVGElement>, {}>;
|
|
3
|
-
export declare const SvgGRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").SVGProps<SVGGElement>, {}>;
|
|
2
|
+
export declare const SvgRoot: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").SVGProps<SVGSVGElement>, {}>;
|
|
3
|
+
export declare const SvgGRoot: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").SVGProps<SVGGElement>, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const ScoreBigBallRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
4
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const ScrollDialogContent: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
4
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
5
|
export default ScrollDialogContent;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const VideoPreviewRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
4
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
5
|
export declare const PageTurningRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
6
6
|
children?: import("react").ReactNode;
|
|
7
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
7
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
8
|
export declare const FaceAnalysisRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
9
9
|
children?: import("react").ReactNode;
|
|
10
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
10
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as AiQuestion } from './modules/ai-question';
|
|
2
2
|
export { default as AiReport } from './modules/ai-report';
|
|
3
|
-
export { default as MenuAnchor } from './modules/ai-report/components/MenuAnchor/MenuAnchor';
|
|
4
3
|
export { default as AiTemplate } from './modules/ai-template';
|
|
5
4
|
export { default as AiAbility } from './modules/ai-ability';
|
|
6
5
|
export { default as VideoPreview } from './components/VideoPreview';
|
package/lib/index.js
CHANGED
|
@@ -3,13 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.avocadoVideoInterview = exports.useAiReport = exports.useAiQuestion = exports.VideoPreview = exports.AiAbility = exports.AiTemplate = exports.
|
|
6
|
+
exports.avocadoVideoInterview = exports.useAiReport = exports.useAiQuestion = exports.VideoPreview = exports.AiAbility = exports.AiTemplate = exports.AiReport = exports.AiQuestion = void 0;
|
|
7
7
|
var ai_question_1 = require("./modules/ai-question");
|
|
8
8
|
Object.defineProperty(exports, "AiQuestion", { enumerable: true, get: function () { return __importDefault(ai_question_1).default; } });
|
|
9
9
|
var ai_report_1 = require("./modules/ai-report");
|
|
10
10
|
Object.defineProperty(exports, "AiReport", { enumerable: true, get: function () { return __importDefault(ai_report_1).default; } });
|
|
11
|
-
var MenuAnchor_1 = require("./modules/ai-report/components/MenuAnchor/MenuAnchor");
|
|
12
|
-
Object.defineProperty(exports, "MenuAnchor", { enumerable: true, get: function () { return __importDefault(MenuAnchor_1).default; } });
|
|
13
11
|
var ai_template_1 = require("./modules/ai-template");
|
|
14
12
|
Object.defineProperty(exports, "AiTemplate", { enumerable: true, get: function () { return __importDefault(ai_template_1).default; } });
|
|
15
13
|
var ai_ability_1 = require("./modules/ai-ability");
|
|
@@ -51,16 +51,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
51
51
|
};
|
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
53
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
54
|
-
var
|
|
55
|
-
var fbm_ui_1 = require("fbm-ui");
|
|
56
|
-
var ahooks_1 = require("ahooks");
|
|
57
|
-
var dayjs_1 = __importDefault(require("dayjs"));
|
|
58
|
-
var ai_ability_1 = require("../../services/ai-ability");
|
|
54
|
+
var AddAbility_1 = __importDefault(require("./components/AddAbility"));
|
|
59
55
|
var UpdateAbility_1 = __importDefault(require("./components/UpdateAbility"));
|
|
60
56
|
var styled_1 = require("./styled");
|
|
57
|
+
var ai_ability_1 = require("../../services/ai-ability");
|
|
58
|
+
var ahooks_1 = require("ahooks");
|
|
59
|
+
var dayjs_1 = __importDefault(require("dayjs"));
|
|
60
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
61
|
+
var react_1 = require("react");
|
|
61
62
|
var AiAbilityRoot = function () {
|
|
62
|
-
var _a = (0, ahooks_1.useSetState)({
|
|
63
|
-
|
|
63
|
+
var _a = (0, ahooks_1.useSetState)({
|
|
64
|
+
name: '',
|
|
65
|
+
token: '',
|
|
66
|
+
type: 3,
|
|
67
|
+
isWorkplace: false,
|
|
68
|
+
}), state = _a[0], setState = _a[1];
|
|
69
|
+
var _b = (0, react_1.useState)(false), AddAbilityOpen = _b[0], setAddAbilityOpen = _b[1];
|
|
70
|
+
var _c = (0, react_1.useState)(false), UpdateAbilityOpen = _c[0], setUpdateAbilityOpen = _c[1];
|
|
71
|
+
var _d = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionList), data = _d.data, getList = _d.run, listLoading = _d.loading;
|
|
64
72
|
var deleteList = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionDelete, {
|
|
65
73
|
manual: true,
|
|
66
74
|
onSuccess: function () {
|
|
@@ -69,12 +77,14 @@ var AiAbilityRoot = function () {
|
|
|
69
77
|
},
|
|
70
78
|
}).run;
|
|
71
79
|
var handleAdd = (0, react_1.useCallback)(function () {
|
|
72
|
-
setState({
|
|
73
|
-
|
|
80
|
+
setState({ name: '', token: '' });
|
|
81
|
+
setAddAbilityOpen(true);
|
|
82
|
+
}, [setState, setAddAbilityOpen]);
|
|
74
83
|
var handleEdit = (0, react_1.useCallback)(function (_a) {
|
|
75
|
-
var name = _a.name, token = _a.token;
|
|
76
|
-
setState({
|
|
77
|
-
|
|
84
|
+
var name = _a.name, token = _a.token, type = _a.type, isWorkplace = _a.isWorkplace;
|
|
85
|
+
setState({ name: name, token: token, type: type, isWorkplace: isWorkplace });
|
|
86
|
+
setUpdateAbilityOpen(true);
|
|
87
|
+
}, [setState, setUpdateAbilityOpen]);
|
|
78
88
|
var handleDelete = (0, react_1.useCallback)(function (_a) {
|
|
79
89
|
var token = _a.token, used = _a.used, tag = _a.tag;
|
|
80
90
|
if (used) {
|
|
@@ -83,7 +93,7 @@ var AiAbilityRoot = function () {
|
|
|
83
93
|
else {
|
|
84
94
|
(0, fbm_ui_1.confirm)({
|
|
85
95
|
title: '确认删除?',
|
|
86
|
-
content: "\u786E\u8BA4\u5C06".concat(tag, "\u4ECE\u7CFB\u7EDF\u4E2D\u5220\u9664\u5417\uFF1F\u8BE5\u5220\u9664\u52A8\u4F5C\u65E0\u6CD5\u88AB\u64A4\u9500\u3002"),
|
|
96
|
+
content: "\u786E\u8BA4\u5C06\u201C".concat(tag, "\u201D\u4ECE\u7CFB\u7EDF\u4E2D\u5220\u9664\u5417\uFF1F\u8BE5\u5220\u9664\u52A8\u4F5C\u65E0\u6CD5\u88AB\u64A4\u9500\u3002"),
|
|
87
97
|
okText: '删除',
|
|
88
98
|
okProps: {
|
|
89
99
|
color: 'error',
|
|
@@ -103,8 +113,10 @@ var AiAbilityRoot = function () {
|
|
|
103
113
|
}
|
|
104
114
|
}, [deleteList]);
|
|
105
115
|
var handleClose = (0, react_1.useCallback)(function () {
|
|
106
|
-
setState({
|
|
107
|
-
|
|
116
|
+
setState({ name: '' });
|
|
117
|
+
setAddAbilityOpen(false);
|
|
118
|
+
setUpdateAbilityOpen(false);
|
|
119
|
+
}, [setState, setAddAbilityOpen, setUpdateAbilityOpen]);
|
|
108
120
|
var columns = [
|
|
109
121
|
{
|
|
110
122
|
id: 'name',
|
|
@@ -131,10 +143,10 @@ var AiAbilityRoot = function () {
|
|
|
131
143
|
label: '操作',
|
|
132
144
|
render: function (_a) {
|
|
133
145
|
var row = _a.row;
|
|
134
|
-
return row.type === 1 ?
|
|
146
|
+
return row.type === 1 ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u80FD\u529B\u8BE6\u60C5" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: (0, jsx_runtime_1.jsx)(fbm_ui_1.DocumentIcon, {}), onClick: function () { return handleEdit(row); } }) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u80FD\u529B\u8BE6\u60C5" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: (0, jsx_runtime_1.jsx)(fbm_ui_1.DocumentIcon, {}), onClick: function () { return handleEdit(row); } }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', cursor: 'pointer' }, text: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}), onClick: function () { return handleDelete(row); } })] }));
|
|
135
147
|
},
|
|
136
148
|
},
|
|
137
149
|
];
|
|
138
|
-
return ((0, jsx_runtime_1.jsxs)(styled_1.AbilityRoot, { children: [(0, jsx_runtime_1.jsx)(UpdateAbility_1.default, __assign({}, state, { 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", loading: listLoading, data: data === null || data === void 0 ? void 0 : data.data.list, columns: columns }) }))] }));
|
|
150
|
+
return ((0, jsx_runtime_1.jsxs)(styled_1.AbilityRoot, { children: [(0, jsx_runtime_1.jsx)(AddAbility_1.default, __assign({}, state, { open: AddAbilityOpen, onClose: handleClose, onSuccess: getList })), (0, jsx_runtime_1.jsx)(UpdateAbility_1.default, __assign({}, state, { open: UpdateAbilityOpen, 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", loading: listLoading, data: data === null || data === void 0 ? void 0 : data.data.list, columns: columns }) }))] }));
|
|
139
151
|
};
|
|
140
152
|
exports.default = AiAbilityRoot;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface AbilityFormItemProps {
|
|
3
|
+
token?: string;
|
|
4
|
+
title: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: number;
|
|
7
|
+
answer?: string;
|
|
8
|
+
mode: string;
|
|
9
|
+
canReplace?: boolean;
|
|
10
|
+
onChange?: (v: any) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const AbilityFormItem: React.FC<AbilityFormItemProps>;
|
|
13
|
+
export default AbilityFormItem;
|
|
@@ -0,0 +1,128 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (_) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
51
|
+
var ai_ability_1 = require("../../../../services/ai-ability");
|
|
52
|
+
var ahooks_1 = require("ahooks");
|
|
53
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
54
|
+
var mui_1 = require("fbm-ui/lib/mui");
|
|
55
|
+
var react_1 = require("react");
|
|
56
|
+
var AbilityFormItem = function (_a) {
|
|
57
|
+
var token = _a.token, title = _a.title, name = _a.name, type = _a.type, _b = _a.answer, answer = _b === void 0 ? '' : _b, _c = _a.mode, mode = _c === void 0 ? 'show' : _c, _d = _a.canReplace, canReplace = _d === void 0 ? false : _d, onChange = _a.onChange;
|
|
58
|
+
var _e = (0, react_1.useState)(answer), content = _e[0], setContent = _e[1];
|
|
59
|
+
var _f = (0, react_1.useState)(mode), internalMode = _f[0], setMode = _f[1];
|
|
60
|
+
var _g = (0, ahooks_1.useRequest)(ai_ability_1.GetAiDefine, {
|
|
61
|
+
manual: true,
|
|
62
|
+
onSuccess: function (_a) {
|
|
63
|
+
var data = _a.data;
|
|
64
|
+
var _b = data.list, list = _b === void 0 ? [] : _b;
|
|
65
|
+
var defineRes = list[0].items[0];
|
|
66
|
+
setContent(defineRes);
|
|
67
|
+
},
|
|
68
|
+
onError: function (err) {
|
|
69
|
+
console.log(err);
|
|
70
|
+
},
|
|
71
|
+
}), PostAiDefine = _g.run, loading = _g.loading;
|
|
72
|
+
var handleChange = (0, react_1.useCallback)(function (e) {
|
|
73
|
+
var value = e.target.value;
|
|
74
|
+
setContent(value);
|
|
75
|
+
}, []);
|
|
76
|
+
var handleReplace = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
PostAiDefine({
|
|
79
|
+
queryType: type,
|
|
80
|
+
collectionName: name,
|
|
81
|
+
});
|
|
82
|
+
return [2 /*return*/];
|
|
83
|
+
});
|
|
84
|
+
}); }, [type, name, PostAiDefine]);
|
|
85
|
+
var nameTextField = (0, fbm_ui_1.useTextField)({
|
|
86
|
+
value: content,
|
|
87
|
+
name: type,
|
|
88
|
+
required: true,
|
|
89
|
+
disabled: loading,
|
|
90
|
+
rules: [
|
|
91
|
+
{
|
|
92
|
+
required: true,
|
|
93
|
+
message: "\u8BF7\u8F93\u5165".concat(title),
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
onChange: handleChange,
|
|
97
|
+
max: 100,
|
|
98
|
+
rows: 3,
|
|
99
|
+
multiline: true,
|
|
100
|
+
sx: {
|
|
101
|
+
marginBottom: '32px',
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
(0, react_1.useEffect)(function () {
|
|
105
|
+
setMode(mode);
|
|
106
|
+
}, [mode]);
|
|
107
|
+
(0, react_1.useEffect)(function () {
|
|
108
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
109
|
+
name: title,
|
|
110
|
+
type: type,
|
|
111
|
+
items: content ? [content] : [],
|
|
112
|
+
});
|
|
113
|
+
// nameTextField.handleValidate();
|
|
114
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
115
|
+
}, [content, title, type]);
|
|
116
|
+
(0, react_1.useEffect)(function () {
|
|
117
|
+
// don't excute when edit detail
|
|
118
|
+
if (token)
|
|
119
|
+
return;
|
|
120
|
+
PostAiDefine({
|
|
121
|
+
queryType: type,
|
|
122
|
+
collectionName: name,
|
|
123
|
+
});
|
|
124
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125
|
+
}, [type, name, token]);
|
|
126
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ style: { marginBottom: '18px' }, direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canReplace && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ loading: loading, onClick: handleReplace, variant: "outlined", color: "inherit", size: "small", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.RefreshIcon, {}) }, { children: loading ? '生成中' : '换一换' })))] })), internalMode === 'edit' && ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ width: 1, pr: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.TextField, __assign({}, nameTextField)) }))), internalMode === 'show' && ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ style: { marginTop: '-8px', marginBottom: '24px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { whiteSpace: 'pre-wrap', color: 'RGBA(0, 0, 0, 0.56)' } }, { children: content })) })))] }));
|
|
127
|
+
};
|
|
128
|
+
exports.default = AbilityFormItem;
|