eli-video-interview 1.2.29-beta.2 → 1.2.29-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/esm/components/BigBallSvg/styled.d.ts +2 -2
  2. package/esm/components/ScoreBigBall/styled.d.ts +1 -1
  3. package/esm/components/ScrollDialogContent/index.d.ts +1 -1
  4. package/esm/components/VideoPreview/styled.d.ts +3 -3
  5. package/esm/index.d.ts +0 -1
  6. package/esm/index.js +0 -1
  7. package/esm/modules/ai-ability/Root.js +29 -17
  8. package/esm/modules/ai-ability/components/AbilityFormItem/index.d.ts +14 -0
  9. package/esm/modules/ai-ability/components/AbilityFormItem/index.js +128 -0
  10. package/esm/modules/ai-ability/components/AddAbility/index.d.ts +4 -0
  11. package/esm/modules/ai-ability/components/AddAbility/index.js +150 -0
  12. package/esm/modules/ai-ability/components/UpdateAbility/index.d.ts +2 -2
  13. package/esm/modules/ai-ability/components/UpdateAbility/index.js +91 -22
  14. package/esm/modules/ai-ability/const.d.ts +8 -0
  15. package/esm/modules/ai-ability/const.js +34 -0
  16. package/esm/modules/ai-ability/index.js +1 -1
  17. package/esm/modules/ai-ability/interface.d.ts +27 -0
  18. package/esm/modules/ai-ability/styled.d.ts +4 -1
  19. package/esm/modules/ai-ability/styled.js +5 -1
  20. package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +4 -4
  21. package/esm/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +1 -1
  22. package/esm/modules/ai-question/components/BaseAccordion/styled.d.ts +3 -3
  23. package/esm/modules/ai-question/components/BootVideo/styled.d.ts +4 -4
  24. package/esm/modules/ai-question/components/QuestionModel/styled.d.ts +1 -1
  25. package/esm/modules/ai-question/components/QuestionPreview/styled.d.ts +2 -2
  26. package/esm/modules/ai-question/components/QuestionUpdate/Form.js +3 -1
  27. package/esm/modules/ai-question/components/QuestionUpdate/index.js +2 -2
  28. package/esm/modules/ai-report/components/MenuAnchor/index.d.ts +3 -3
  29. package/esm/modules/ai-report/components/MenuAnchor/index.js +103 -8
  30. package/esm/modules/ai-report/components/RankingRange/styled.d.ts +2 -2
  31. package/esm/modules/ai-report/components/ScoreReport/styled.d.ts +5 -5
  32. package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +7 -7
  33. package/esm/modules/ai-report/components/WorkPlaces/index.js +2 -3
  34. package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +4 -4
  35. package/esm/modules/ai-report/index.js +1 -0
  36. package/esm/modules/ai-report/interface.d.ts +10 -0
  37. package/esm/modules/ai-template/components/TemplateHeader/index.js +1 -1
  38. package/esm/modules/ai-template/components/TemplateList/styled.d.ts +10 -10
  39. package/esm/modules/ai-template/components/TemplateMenu/styled.d.ts +4 -4
  40. package/esm/services/ai-ability.d.ts +12 -3
  41. package/esm/services/ai-ability.js +5 -2
  42. package/lib/components/BigBallSvg/styled.d.ts +2 -2
  43. package/lib/components/ScoreBigBall/styled.d.ts +1 -1
  44. package/lib/components/ScrollDialogContent/index.d.ts +1 -1
  45. package/lib/components/VideoPreview/styled.d.ts +3 -3
  46. package/lib/index.d.ts +0 -1
  47. package/lib/index.js +1 -3
  48. package/lib/modules/ai-ability/Root.js +29 -17
  49. package/lib/modules/ai-ability/components/AbilityFormItem/index.d.ts +14 -0
  50. package/lib/modules/ai-ability/components/AbilityFormItem/index.js +130 -0
  51. package/lib/modules/ai-ability/components/AddAbility/index.d.ts +4 -0
  52. package/lib/modules/ai-ability/components/AddAbility/index.js +155 -0
  53. package/lib/modules/ai-ability/components/UpdateAbility/index.d.ts +2 -2
  54. package/lib/modules/ai-ability/components/UpdateAbility/index.js +93 -21
  55. package/lib/modules/ai-ability/const.d.ts +8 -0
  56. package/lib/modules/ai-ability/const.js +37 -0
  57. package/lib/modules/ai-ability/index.js +1 -1
  58. package/lib/modules/ai-ability/interface.d.ts +27 -0
  59. package/lib/modules/ai-ability/styled.d.ts +4 -1
  60. package/lib/modules/ai-ability/styled.js +5 -1
  61. package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +2 -2
  62. package/lib/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +1 -1
  63. package/lib/modules/ai-question/components/BaseAccordion/styled.d.ts +3 -3
  64. package/lib/modules/ai-question/components/BootVideo/styled.d.ts +4 -4
  65. package/lib/modules/ai-question/components/QuestionModel/styled.d.ts +1 -1
  66. package/lib/modules/ai-question/components/QuestionPreview/styled.d.ts +2 -2
  67. package/lib/modules/ai-question/components/QuestionUpdate/Form.js +3 -1
  68. package/lib/modules/ai-question/components/QuestionUpdate/index.js +2 -2
  69. package/lib/modules/ai-report/components/MenuAnchor/index.d.ts +3 -3
  70. package/lib/modules/ai-report/components/MenuAnchor/index.js +101 -9
  71. package/lib/modules/ai-report/components/RankingRange/styled.d.ts +2 -2
  72. package/lib/modules/ai-report/components/ScoreReport/styled.d.ts +5 -5
  73. package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +7 -7
  74. package/lib/modules/ai-report/components/WorkPlaces/index.js +1 -2
  75. package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +4 -4
  76. package/lib/modules/ai-report/index.js +1 -0
  77. package/lib/modules/ai-report/interface.d.ts +10 -0
  78. package/lib/modules/ai-template/components/TemplateHeader/index.js +1 -1
  79. package/lib/modules/ai-template/components/TemplateList/styled.d.ts +10 -10
  80. package/lib/modules/ai-template/components/TemplateMenu/styled.d.ts +4 -4
  81. package/lib/services/ai-ability.d.ts +12 -3
  82. package/lib/services/ai-ability.js +9 -4
  83. package/package.json +1 -1
  84. package/esm/modules/ai-ability/components/UpdateAbility/interface.d.ts +0 -7
  85. package/esm/modules/ai-ability/components/UpdateAbility/interface.js +0 -1
  86. package/esm/modules/ai-report/components/MenuAnchor/MenuAnchor.d.ts +0 -4
  87. package/esm/modules/ai-report/components/MenuAnchor/MenuAnchor.js +0 -106
  88. package/esm/modules/ai-report/components/MenuAnchor/interface.d.ts +0 -10
  89. package/esm/modules/ai-report/components/MenuAnchor/interface.js +0 -1
  90. package/lib/modules/ai-ability/components/UpdateAbility/interface.d.ts +0 -7
  91. package/lib/modules/ai-ability/components/UpdateAbility/interface.js +0 -2
  92. package/lib/modules/ai-report/components/MenuAnchor/MenuAnchor.d.ts +0 -4
  93. package/lib/modules/ai-report/components/MenuAnchor/MenuAnchor.js +0 -108
  94. package/lib/modules/ai-report/components/MenuAnchor/interface.d.ts +0 -10
  95. package/lib/modules/ai-report/components/MenuAnchor/interface.js +0 -2
@@ -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" | "error" | "warning" | "success" | "info" | "secondary" | "primary" | undefined;
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" | "selected" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "divider" | "dense" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
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
- interface UpsertData {
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: UpsertData) => import("axios").AxiosPromise<R>;
13
- export declare const PostQuestionCollectionDelete: <R>(token: string) => import("axios").AxiosPromise<R>;
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.MenuAnchor = exports.AiReport = exports.AiQuestion = void 0;
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 react_1 = require("react");
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)({ open: false, name: '', token: '' }), state = _a[0], setState = _a[1];
63
- var _b = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionList), data = _b.data, getList = _b.run, listLoading = _b.loading;
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({ open: true });
73
- }, [setState]);
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({ open: true, name: name, token: token });
77
- }, [setState]);
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({ open: false, name: '', token: '' });
107
- }, [setState]);
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 ? null : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { 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.EditIcon, {}), 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); } })] }));
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.Tooltip, __assign({ title: "\u5220\u9664" }, { children: (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,14 @@
1
+ /// <reference types="react" />
2
+ interface AbilityFormItemProps {
3
+ token?: string;
4
+ title: string;
5
+ name: string;
6
+ type: number;
7
+ items?: string[];
8
+ mode: string;
9
+ canReplace?: boolean;
10
+ maxTextLength?: number;
11
+ onChange?: (v: any) => void;
12
+ }
13
+ declare const AbilityFormItem: React.FC<AbilityFormItemProps>;
14
+ export default AbilityFormItem;
@@ -0,0 +1,130 @@
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.items, items = _b === void 0 ? [] : _b, _c = _a.mode, mode = _c === void 0 ? 'show' : _c, _d = _a.canReplace, canReplace = _d === void 0 ? false : _d, _e = _a.maxTextLength, maxTextLength = _e === void 0 ? 100 : _e, onChange = _a.onChange;
58
+ var _f = (0, react_1.useState)(items.length ? items.join('\n') : ''), content = _f[0], setContent = _f[1];
59
+ var _g = (0, react_1.useState)(mode), internalMode = _g[0], setMode = _g[1];
60
+ var _h = (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;
66
+ setContent(defineRes.length ? defineRes.join('\n') : '');
67
+ nameTextField.setError();
68
+ },
69
+ onError: function (err) {
70
+ console.log(err);
71
+ },
72
+ }), PostAiDefine = _h.run, loading = _h.loading;
73
+ var handleChange = (0, react_1.useCallback)(function (e) {
74
+ var value = e.target.value;
75
+ setContent(value);
76
+ }, []);
77
+ var handleReplace = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
78
+ return __generator(this, function (_a) {
79
+ PostAiDefine({
80
+ queryType: type,
81
+ collectionName: name,
82
+ });
83
+ return [2 /*return*/];
84
+ });
85
+ }); }, [type, name, PostAiDefine]);
86
+ var nameTextField = (0, fbm_ui_1.useTextField)({
87
+ value: content,
88
+ name: type,
89
+ required: true,
90
+ disabled: loading,
91
+ rules: [
92
+ {
93
+ required: true,
94
+ message: "".concat(title, "\u4E0D\u80FD\u4E3A\u7A7A"),
95
+ },
96
+ ],
97
+ onChange: handleChange,
98
+ max: maxTextLength,
99
+ rows: 3,
100
+ multiline: true,
101
+ sx: {
102
+ marginBottom: '32px',
103
+ },
104
+ });
105
+ (0, react_1.useEffect)(function () {
106
+ setMode(mode);
107
+ }, [mode]);
108
+ (0, react_1.useEffect)(function () {
109
+ var resItems = content.split('\n');
110
+ onChange === null || onChange === void 0 ? void 0 : onChange({
111
+ name: title,
112
+ type: type,
113
+ items: content ? resItems : [],
114
+ });
115
+ // nameTextField.handleValidate();
116
+ // eslint-disable-next-line react-hooks/exhaustive-deps
117
+ }, [content, title, type]);
118
+ (0, react_1.useEffect)(function () {
119
+ // don't excute when edit detail
120
+ if (token)
121
+ return;
122
+ PostAiDefine({
123
+ queryType: type,
124
+ collectionName: name,
125
+ });
126
+ // eslint-disable-next-line react-hooks/exhaustive-deps
127
+ }, [type, name, token]);
128
+ 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 })) })))] }));
129
+ };
130
+ exports.default = AbilityFormItem;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { AbilityProps } from '../../interface';
3
+ declare const AddAbility: React.FC<AbilityProps>;
4
+ export default AddAbility;
@@ -0,0 +1,155 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
50
+ return (mod && mod.__esModule) ? mod : { "default": mod };
51
+ };
52
+ Object.defineProperty(exports, "__esModule", { value: true });
53
+ var jsx_runtime_1 = require("react/jsx-runtime");
54
+ var const_1 = require("../../const");
55
+ var AbilityFormItem_1 = __importDefault(require("../AbilityFormItem"));
56
+ var ai_ability_1 = require("../../../../services/ai-ability");
57
+ var ahooks_1 = require("ahooks");
58
+ var fbm_ui_1 = require("fbm-ui");
59
+ var react_1 = require("react");
60
+ var AddAbility = function (props) {
61
+ var open = props.open, _a = props.name, name = _a === void 0 ? '' : _a, _b = props.type, type = _b === void 0 ? 3 : _b, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
62
+ var _c = (0, react_1.useState)(''), value = _c[0], setValue = _c[1];
63
+ var _d = (0, react_1.useState)(1), step = _d[0], setStep = _d[1];
64
+ var _e = (0, react_1.useState)(false), stepLoading = _e[0], setStepLoading = _e[1];
65
+ var _f = (0, react_1.useState)(const_1.InitialValues.workPlaceItems), workPlaceItems = _f[0], setWorkPlaceItems = _f[1];
66
+ var _g = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionUpsert, {
67
+ manual: true,
68
+ onSuccess: function () {
69
+ fbm_ui_1.Message.success('新增能力成功');
70
+ onClose();
71
+ onSuccess();
72
+ },
73
+ }), run = _g.run, loading = _g.loading;
74
+ var nameTextField = (0, fbm_ui_1.useTextField)({
75
+ value: value,
76
+ label: '能力名称',
77
+ required: true,
78
+ rules: [
79
+ {
80
+ required: true,
81
+ message: '能力名称不能为空',
82
+ },
83
+ ],
84
+ onChange: function (e) { return setValue(e.target.value); },
85
+ max: 7,
86
+ sx: {
87
+ height: '48px',
88
+ width: '320px',
89
+ marginTop: '16px',
90
+ },
91
+ });
92
+ var handleStep = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
93
+ var error;
94
+ return __generator(this, function (_a) {
95
+ switch (_a.label) {
96
+ case 0: return [4 /*yield*/, nameTextField.handleValidate()];
97
+ case 1:
98
+ error = _a.sent();
99
+ if (!error) {
100
+ setStepLoading(true);
101
+ setTimeout(function () {
102
+ setStep(2);
103
+ setStepLoading(false);
104
+ }, 300);
105
+ }
106
+ return [2 /*return*/];
107
+ }
108
+ });
109
+ }); }, [nameTextField]);
110
+ var handleValue = (0, react_1.useCallback)(function (v) {
111
+ var index = workPlaceItems.findIndex(function (ele) { return ele.type === v.type; });
112
+ workPlaceItems.splice(index, 1, v);
113
+ var list = workPlaceItems;
114
+ console.log(v, list);
115
+ setWorkPlaceItems(list);
116
+ }, [workPlaceItems]);
117
+ var handleOk = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
118
+ var error, avocadoConfig;
119
+ return __generator(this, function (_a) {
120
+ console.log(workPlaceItems);
121
+ error = workPlaceItems.some(function (v) { return v.items.length === 0; });
122
+ if (!error) {
123
+ avocadoConfig = window['AvocadoVideoInterviewConfig'];
124
+ run({
125
+ name: value,
126
+ tag: value,
127
+ token: token,
128
+ type: type,
129
+ workPlaceItems: workPlaceItems,
130
+ mateData: {
131
+ account: avocadoConfig === null || avocadoConfig === void 0 ? void 0 : avocadoConfig.account,
132
+ enterpriseId: avocadoConfig === null || avocadoConfig === void 0 ? void 0 : avocadoConfig.enterpriseId,
133
+ },
134
+ });
135
+ }
136
+ return [2 /*return*/];
137
+ });
138
+ }); }, [run, type, token, value, workPlaceItems]);
139
+ var footer = (0, react_1.useCallback)(function () {
140
+ return step === 1 ? ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "flex-end", padding: "12px 16px" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ sx: { mr: 1, fontWeight: 400 }, variant: "text", color: "inherit", onClick: onClose }, { children: "\u53D6\u6D88" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ loading: stepLoading, onClick: handleStep }, { children: "\u4E0B\u4E00\u6B65" }))] }))) : ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between", padding: "12px 16px" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", onClick: function () { return setStep(1); } }, { children: "\u4E0A\u4E00\u6B65" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ sx: { mr: 1, fontWeight: 400 }, variant: "text", color: "inherit", onClick: onClose }, { children: "\u53D6\u6D88" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ loading: loading, onClick: handleOk }, { children: "\u65B0\u589E" }))] }))] })));
141
+ }, [step, loading, stepLoading, handleStep, setStep, handleOk, onClose]);
142
+ (0, react_1.useEffect)(function () {
143
+ setValue(name);
144
+ }, [name]);
145
+ (0, react_1.useEffect)(function () {
146
+ if (!open) {
147
+ setValue('');
148
+ setStep(1);
149
+ nameTextField.setError();
150
+ }
151
+ // eslint-disable-next-line react-hooks/exhaustive-deps
152
+ }, [open]);
153
+ return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Drawer, __assign({ className: "abilityDrawer", title: '新增能力', open: open, footer: footer, onClose: onClose }, { children: step === 1 ? ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ style: { width: '556px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: "\u4F7F\u7528\u901A\u7528\u7684\u80FD\u529B\u540D\u79F0\uFF08\u4F8B\u5982\uFF1A\u9886\u5BFC\u529B\u3001\u5E94\u53D8\u80FD\u529B\u7B49\u5E38\u89C1\u8003\u6838\u9879\uFF09\u547D\u540D\u6709\u52A9\u4E8E\u63D0\u9AD8 AI \u8BC4\u4EF7\u53CA\u8BC4\u5206\u51C6\u786E\u6027\u3002" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.TextField, __assign({}, nameTextField))] }))) : ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ style: { width: '556px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: "medium", mb: 2 }, { children: "\u80FD\u529B\u6807\u51C6" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", mb: 2 }, { children: ["\u6839\u636E\u60A8\u8F93\u5165\u7684\u80FD\u529B\u540D\u79F0\u300C", (0, jsx_runtime_1.jsx)("span", __assign({ style: { color: '#4CAF50', fontWeight: '500' } }, { children: value })), "\u300D\uFF0C\u5E2E\u60A8\u81EA\u52A8\u751F\u6210\u5173\u4E8E\u8BE5\u80FD\u529B\u7684\u5B9A\u4E49\u5185\u5BB9\u3001\u4F18\u6B21\u8868\u73B0\u4EE5\u53CA\u8003\u5BDF\u5EFA\u8BAE\u5185\u5BB9\uFF0C\u786E\u5B9A\u540E\u5C06\u4F1A\u6309\u7167\u8BE5\u6807\u51C6\u751F\u6210AI\u62A5\u544A\u3002"] })), const_1.InitialValues.workPlaceItems.map(function (v) { return ((0, jsx_runtime_1.jsx)(AbilityFormItem_1.default, { name: value, title: v.name, type: v.type, items: v.items, mode: "edit", maxTextLength: v.type === 4 || v.type === 5 ? 300 : 100, canReplace: true, onChange: handleValue }, v.type)); })] }))) })));
154
+ };
155
+ exports.default = AddAbility;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { UpdateAbilityProps } from './interface';
3
- declare const UpdateAbility: React.FC<UpdateAbilityProps>;
2
+ import { AbilityProps } from '../../interface';
3
+ declare const UpdateAbility: React.FC<AbilityProps>;
4
4
  export default UpdateAbility;