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
@@ -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/esm/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/esm/index.js 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';
@@ -46,16 +46,24 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
46
  }
47
47
  };
48
48
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
49
- import { useCallback } from 'react';
50
- import { AddIcon, Box, Button, confirm, DeleteIcon, EditIcon, Header, Link, Message, Table } from 'fbm-ui';
51
- import { useRequest, useSetState } from 'ahooks';
52
- import dayjs from 'dayjs';
53
- import { PostQuestionCollectionDelete, PostQuestionCollectionList } from "../../services/ai-ability";
49
+ import AddAbility from './components/AddAbility';
54
50
  import UpdateAbility from './components/UpdateAbility';
55
51
  import { AbilityRoot } from './styled';
52
+ import { PostQuestionCollectionDelete, PostQuestionCollectionList } from "../../services/ai-ability";
53
+ import { useRequest, useSetState } from 'ahooks';
54
+ import dayjs from 'dayjs';
55
+ import { AddIcon, Box, Button, confirm, DeleteIcon, DocumentIcon, Header, Link, Message, Table, Tooltip } from 'fbm-ui';
56
+ import { useCallback, useState } from 'react';
56
57
  var AiAbilityRoot = function () {
57
- var _a = useSetState({ open: false, name: '', token: '' }), state = _a[0], setState = _a[1];
58
- var _b = useRequest(PostQuestionCollectionList), data = _b.data, getList = _b.run, listLoading = _b.loading;
58
+ var _a = useSetState({
59
+ name: '',
60
+ token: '',
61
+ type: 3,
62
+ isWorkplace: false,
63
+ }), state = _a[0], setState = _a[1];
64
+ var _b = useState(false), AddAbilityOpen = _b[0], setAddAbilityOpen = _b[1];
65
+ var _c = useState(false), UpdateAbilityOpen = _c[0], setUpdateAbilityOpen = _c[1];
66
+ var _d = useRequest(PostQuestionCollectionList), data = _d.data, getList = _d.run, listLoading = _d.loading;
59
67
  var deleteList = useRequest(PostQuestionCollectionDelete, {
60
68
  manual: true,
61
69
  onSuccess: function () {
@@ -64,12 +72,14 @@ var AiAbilityRoot = function () {
64
72
  },
65
73
  }).run;
66
74
  var handleAdd = useCallback(function () {
67
- setState({ open: true });
68
- }, [setState]);
75
+ setState({ name: '', token: '' });
76
+ setAddAbilityOpen(true);
77
+ }, [setState, setAddAbilityOpen]);
69
78
  var handleEdit = useCallback(function (_a) {
70
- var name = _a.name, token = _a.token;
71
- setState({ open: true, name: name, token: token });
72
- }, [setState]);
79
+ var name = _a.name, token = _a.token, type = _a.type, isWorkplace = _a.isWorkplace;
80
+ setState({ name: name, token: token, type: type, isWorkplace: isWorkplace });
81
+ setUpdateAbilityOpen(true);
82
+ }, [setState, setUpdateAbilityOpen]);
73
83
  var handleDelete = useCallback(function (_a) {
74
84
  var token = _a.token, used = _a.used, tag = _a.tag;
75
85
  if (used) {
@@ -78,7 +88,7 @@ var AiAbilityRoot = function () {
78
88
  else {
79
89
  confirm({
80
90
  title: '确认删除?',
81
- 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"),
91
+ 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"),
82
92
  okText: '删除',
83
93
  okProps: {
84
94
  color: 'error',
@@ -98,8 +108,10 @@ var AiAbilityRoot = function () {
98
108
  }
99
109
  }, [deleteList]);
100
110
  var handleClose = useCallback(function () {
101
- setState({ open: false, name: '', token: '' });
102
- }, [setState]);
111
+ setState({ name: '' });
112
+ setAddAbilityOpen(false);
113
+ setUpdateAbilityOpen(false);
114
+ }, [setState, setAddAbilityOpen, setUpdateAbilityOpen]);
103
115
  var columns = [
104
116
  {
105
117
  id: 'name',
@@ -126,10 +138,10 @@ var AiAbilityRoot = function () {
126
138
  label: '操作',
127
139
  render: function (_a) {
128
140
  var row = _a.row;
129
- return row.type === 1 ? null : (_jsxs(_Fragment, { children: [_jsx(Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: _jsx(EditIcon, {}), onClick: function () { return handleEdit(row); } }), _jsx(Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', cursor: 'pointer' }, text: _jsx(DeleteIcon, {}), onClick: function () { return handleDelete(row); } })] }));
141
+ return row.type === 1 ? (_jsx(Tooltip, __assign({ title: "\u80FD\u529B\u8BE6\u60C5" }, { children: _jsx(Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: _jsx(DocumentIcon, {}), onClick: function () { return handleEdit(row); } }) }))) : (_jsxs(_Fragment, { children: [_jsx(Tooltip, __assign({ title: "\u80FD\u529B\u8BE6\u60C5" }, { children: _jsx(Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: _jsx(DocumentIcon, {}), onClick: function () { return handleEdit(row); } }) })), _jsx(Tooltip, __assign({ title: "\u5220\u9664" }, { children: _jsx(Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', cursor: 'pointer' }, text: _jsx(DeleteIcon, {}), onClick: function () { return handleDelete(row); } }) }))] }));
130
142
  },
131
143
  },
132
144
  ];
133
- return (_jsxs(AbilityRoot, { children: [_jsx(UpdateAbility, __assign({}, state, { onClose: handleClose, onSuccess: getList })), _jsx(Header, { title: "\u8003\u5BDF\u80FD\u529B\u7BA1\u7406", renderAction: function () { return (_jsx(Button, __assign({ icon: _jsx(AddIcon, {}), onClick: handleAdd }, { children: "\u65B0\u589E\u80FD\u529B" }))); } }), _jsx(Box, __assign({ mt: 2, border: "1px solid rgba(0, 0, 0, 0.08)", borderRadius: 0.5, overflow: "hidden" }, { children: _jsx(Table, { emptyText: "\u6682\u65E0\u6570\u636E", loading: listLoading, data: data === null || data === void 0 ? void 0 : data.data.list, columns: columns }) }))] }));
145
+ return (_jsxs(AbilityRoot, { children: [_jsx(AddAbility, __assign({}, state, { open: AddAbilityOpen, onClose: handleClose, onSuccess: getList })), _jsx(UpdateAbility, __assign({}, state, { open: UpdateAbilityOpen, onClose: handleClose, onSuccess: getList })), _jsx(Header, { title: "\u8003\u5BDF\u80FD\u529B\u7BA1\u7406", renderAction: function () { return (_jsx(Button, __assign({ icon: _jsx(AddIcon, {}), onClick: handleAdd }, { children: "\u65B0\u589E\u80FD\u529B" }))); } }), _jsx(Box, __assign({ mt: 2, border: "1px solid rgba(0, 0, 0, 0.08)", borderRadius: 0.5, overflow: "hidden" }, { children: _jsx(Table, { emptyText: "\u6682\u65E0\u6570\u636E", loading: listLoading, data: data === null || data === void 0 ? void 0 : data.data.list, columns: columns }) }))] }));
134
146
  };
135
147
  export 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,128 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ 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;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
49
+ import { GetAiDefine } from "../../../../services/ai-ability";
50
+ import { useRequest } from 'ahooks';
51
+ import { Button, RefreshIcon, TextField, Typography, useTextField } from 'fbm-ui';
52
+ import { Box, Stack } from 'fbm-ui/lib/mui';
53
+ import { useCallback, useEffect, useState } from 'react';
54
+ var AbilityFormItem = function (_a) {
55
+ 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;
56
+ var _f = useState(items.length ? items.join('\n') : ''), content = _f[0], setContent = _f[1];
57
+ var _g = useState(mode), internalMode = _g[0], setMode = _g[1];
58
+ var _h = useRequest(GetAiDefine, {
59
+ manual: true,
60
+ onSuccess: function (_a) {
61
+ var data = _a.data;
62
+ var _b = data.list, list = _b === void 0 ? [] : _b;
63
+ var defineRes = list[0].items;
64
+ setContent(defineRes.length ? defineRes.join('\n') : '');
65
+ nameTextField.setError();
66
+ },
67
+ onError: function (err) {
68
+ console.log(err);
69
+ },
70
+ }), PostAiDefine = _h.run, loading = _h.loading;
71
+ var handleChange = useCallback(function (e) {
72
+ var value = e.target.value;
73
+ setContent(value);
74
+ }, []);
75
+ var handleReplace = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
76
+ return __generator(this, function (_a) {
77
+ PostAiDefine({
78
+ queryType: type,
79
+ collectionName: name,
80
+ });
81
+ return [2 /*return*/];
82
+ });
83
+ }); }, [type, name, PostAiDefine]);
84
+ var nameTextField = useTextField({
85
+ value: content,
86
+ name: type,
87
+ required: true,
88
+ disabled: loading,
89
+ rules: [
90
+ {
91
+ required: true,
92
+ message: "".concat(title, "\u4E0D\u80FD\u4E3A\u7A7A"),
93
+ },
94
+ ],
95
+ onChange: handleChange,
96
+ max: maxTextLength,
97
+ rows: 3,
98
+ multiline: true,
99
+ sx: {
100
+ marginBottom: '32px',
101
+ },
102
+ });
103
+ useEffect(function () {
104
+ setMode(mode);
105
+ }, [mode]);
106
+ useEffect(function () {
107
+ var resItems = content.split('\n');
108
+ onChange === null || onChange === void 0 ? void 0 : onChange({
109
+ name: title,
110
+ type: type,
111
+ items: content ? resItems : [],
112
+ });
113
+ // nameTextField.handleValidate();
114
+ // eslint-disable-next-line react-hooks/exhaustive-deps
115
+ }, [content, title, type]);
116
+ 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 (_jsxs(Stack, { children: [_jsxs(Stack, __assign({ style: { marginBottom: '18px' }, direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canReplace && (_jsx(Button, __assign({ loading: loading, onClick: handleReplace, variant: "outlined", color: "inherit", size: "small", icon: _jsx(RefreshIcon, {}) }, { children: loading ? '生成中' : '换一换' })))] })), internalMode === 'edit' && (_jsx(Box, __assign({ width: 1, pr: 2 }, { children: _jsx(TextField, __assign({}, nameTextField)) }))), internalMode === 'show' && (_jsx(Box, __assign({ style: { marginTop: '-8px', marginBottom: '24px' } }, { children: _jsx(Typography, __assign({ variant: "body2", sx: { whiteSpace: 'pre-wrap', color: 'RGBA(0, 0, 0, 0.56)' } }, { children: content })) })))] }));
127
+ };
128
+ export 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,150 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ 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;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
49
+ import { InitialValues } from '../../const';
50
+ import AbilityFormItem from '../AbilityFormItem';
51
+ import { PostQuestionCollectionUpsert } from "../../../../services/ai-ability";
52
+ import { useRequest } from 'ahooks';
53
+ import { Box, Button, Drawer, Message, TextField, Typography, useTextField } from 'fbm-ui';
54
+ import { useCallback, useEffect, useState } from 'react';
55
+ var AddAbility = function (props) {
56
+ 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;
57
+ var _c = useState(''), value = _c[0], setValue = _c[1];
58
+ var _d = useState(1), step = _d[0], setStep = _d[1];
59
+ var _e = useState(false), stepLoading = _e[0], setStepLoading = _e[1];
60
+ var _f = useState(InitialValues.workPlaceItems), workPlaceItems = _f[0], setWorkPlaceItems = _f[1];
61
+ var _g = useRequest(PostQuestionCollectionUpsert, {
62
+ manual: true,
63
+ onSuccess: function () {
64
+ Message.success('新增能力成功');
65
+ onClose();
66
+ onSuccess();
67
+ },
68
+ }), run = _g.run, loading = _g.loading;
69
+ var nameTextField = useTextField({
70
+ value: value,
71
+ label: '能力名称',
72
+ required: true,
73
+ rules: [
74
+ {
75
+ required: true,
76
+ message: '能力名称不能为空',
77
+ },
78
+ ],
79
+ onChange: function (e) { return setValue(e.target.value); },
80
+ max: 7,
81
+ sx: {
82
+ height: '48px',
83
+ width: '320px',
84
+ marginTop: '16px',
85
+ },
86
+ });
87
+ var handleStep = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
88
+ var error;
89
+ return __generator(this, function (_a) {
90
+ switch (_a.label) {
91
+ case 0: return [4 /*yield*/, nameTextField.handleValidate()];
92
+ case 1:
93
+ error = _a.sent();
94
+ if (!error) {
95
+ setStepLoading(true);
96
+ setTimeout(function () {
97
+ setStep(2);
98
+ setStepLoading(false);
99
+ }, 300);
100
+ }
101
+ return [2 /*return*/];
102
+ }
103
+ });
104
+ }); }, [nameTextField]);
105
+ var handleValue = useCallback(function (v) {
106
+ var index = workPlaceItems.findIndex(function (ele) { return ele.type === v.type; });
107
+ workPlaceItems.splice(index, 1, v);
108
+ var list = workPlaceItems;
109
+ console.log(v, list);
110
+ setWorkPlaceItems(list);
111
+ }, [workPlaceItems]);
112
+ var handleOk = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
113
+ var error, avocadoConfig;
114
+ return __generator(this, function (_a) {
115
+ console.log(workPlaceItems);
116
+ error = workPlaceItems.some(function (v) { return v.items.length === 0; });
117
+ if (!error) {
118
+ avocadoConfig = window['AvocadoVideoInterviewConfig'];
119
+ run({
120
+ name: value,
121
+ tag: value,
122
+ token: token,
123
+ type: type,
124
+ workPlaceItems: workPlaceItems,
125
+ mateData: {
126
+ account: avocadoConfig === null || avocadoConfig === void 0 ? void 0 : avocadoConfig.account,
127
+ enterpriseId: avocadoConfig === null || avocadoConfig === void 0 ? void 0 : avocadoConfig.enterpriseId,
128
+ },
129
+ });
130
+ }
131
+ return [2 /*return*/];
132
+ });
133
+ }); }, [run, type, token, value, workPlaceItems]);
134
+ var footer = useCallback(function () {
135
+ return step === 1 ? (_jsxs(Box, __assign({ display: "flex", justifyContent: "flex-end", padding: "12px 16px" }, { children: [_jsx(Button, __assign({ sx: { mr: 1, fontWeight: 400 }, variant: "text", color: "inherit", onClick: onClose }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ loading: stepLoading, onClick: handleStep }, { children: "\u4E0B\u4E00\u6B65" }))] }))) : (_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between", padding: "12px 16px" }, { children: [_jsx(Button, __assign({ variant: "outlined", color: "inherit", onClick: function () { return setStep(1); } }, { children: "\u4E0A\u4E00\u6B65" })), _jsxs(Box, __assign({ display: "flex" }, { children: [_jsx(Button, __assign({ sx: { mr: 1, fontWeight: 400 }, variant: "text", color: "inherit", onClick: onClose }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ loading: loading, onClick: handleOk }, { children: "\u65B0\u589E" }))] }))] })));
136
+ }, [step, loading, stepLoading, handleStep, setStep, handleOk, onClose]);
137
+ useEffect(function () {
138
+ setValue(name);
139
+ }, [name]);
140
+ useEffect(function () {
141
+ if (!open) {
142
+ setValue('');
143
+ setStep(1);
144
+ nameTextField.setError();
145
+ }
146
+ // eslint-disable-next-line react-hooks/exhaustive-deps
147
+ }, [open]);
148
+ return (_jsx(Drawer, __assign({ className: "abilityDrawer", title: '新增能力', open: open, footer: footer, onClose: onClose }, { children: step === 1 ? (_jsxs(Box, __assign({ style: { width: '556px' } }, { children: [_jsx(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" })), _jsx(TextField, __assign({}, nameTextField))] }))) : (_jsxs(Box, __assign({ style: { width: '556px' } }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: "medium", mb: 2 }, { children: "\u80FD\u529B\u6807\u51C6" })), _jsxs(Typography, __assign({ variant: "body2", color: "secondary", mb: 2 }, { children: ["\u6839\u636E\u60A8\u8F93\u5165\u7684\u80FD\u529B\u540D\u79F0\u300C", _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"] })), InitialValues.workPlaceItems.map(function (v) { return (_jsx(AbilityFormItem, { 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)); })] }))) })));
149
+ };
150
+ export 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;
@@ -45,22 +45,45 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
- import { jsx as _jsx } from "react/jsx-runtime";
49
- import { useCallback, useEffect, useState } from 'react';
50
- import { Dialog, Message, TextField, useTextField } from 'fbm-ui';
48
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
49
+ import { InitialValues } from '../../const';
50
+ import AbilityFormItem from '../AbilityFormItem';
51
+ import { GetAbilityDetail, PostQuestionCollectionUpsert } from "../../../../services/ai-ability";
51
52
  import { useRequest } from 'ahooks';
52
- import { PostQuestionCollectionUpsert } from "../../../../services/ai-ability";
53
+ import { Box, Button, Divider, Drawer, Message, TextField, Typography, useTextField } from 'fbm-ui';
54
+ import { useCallback, useEffect, useRef, useState } from 'react';
53
55
  var UpdateAbility = function (props) {
54
- var open = props.open, _a = props.name, name = _a === void 0 ? '' : _a, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
55
- var _b = useState(''), value = _b[0], setValue = _b[1];
56
- var _c = useRequest(PostQuestionCollectionUpsert, {
56
+ var open = props.open, _a = props.type, type = _a === void 0 ? 1 : _a, isWorkplace = props.isWorkplace, _b = props.name, name = _b === void 0 ? '' : _b, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
57
+ var _c = useState(''), value = _c[0], setValue = _c[1];
58
+ var _d = useState(1), step = _d[0], setStep = _d[1];
59
+ var _e = useState('show'), mode = _e[0], setMode = _e[1];
60
+ var firstLoad = useRef(true);
61
+ var _f = useState(false), showAiDefineDetail = _f[0], setShowAiDefineDetail = _f[1];
62
+ // const [submitDisabled, setSubmitDisabled] = useState<boolean>(true);
63
+ var _g = useState(InitialValues.workPlaceItems), workPlaceItems = _g[0], setWorkPlaceItems = _g[1];
64
+ var _h = useRequest(PostQuestionCollectionUpsert, {
57
65
  manual: true,
58
66
  onSuccess: function () {
59
- Message.success("".concat(token ? '编辑' : '新增', "\u80FD\u529B\u6210\u529F"));
67
+ Message.success("\u7F16\u8F91\u80FD\u529B\u6210\u529F");
60
68
  onClose();
61
69
  onSuccess();
62
70
  },
63
- }), run = _c.run, loading = _c.loading;
71
+ }), run = _h.run, loading = _h.loading;
72
+ var getAbilityDetail = useRequest(GetAbilityDetail, {
73
+ manual: true,
74
+ onSuccess: function (_a) {
75
+ var _b;
76
+ var list = _a.data.list;
77
+ if (list.length) {
78
+ var res = (_b = list[0]) === null || _b === void 0 ? void 0 : _b.workPlaceItems;
79
+ firstLoad.current = false;
80
+ if (res === null || res === void 0 ? void 0 : res.length) {
81
+ setWorkPlaceItems(res);
82
+ }
83
+ setShowAiDefineDetail(true);
84
+ }
85
+ },
86
+ }).run;
64
87
  var nameTextField = useTextField({
65
88
  value: value,
66
89
  label: '能力名称',
@@ -68,48 +91,94 @@ var UpdateAbility = function (props) {
68
91
  rules: [
69
92
  {
70
93
  required: true,
71
- message: '请输入能力名称',
94
+ message: '能力名称不能为空',
72
95
  },
73
96
  ],
74
97
  onChange: function (e) { return setValue(e.target.value); },
75
98
  max: 7,
76
99
  sx: {
77
100
  height: '48px',
101
+ width: '320px',
102
+ marginTop: '16px',
78
103
  },
79
104
  });
105
+ var handleValue = useCallback(function (v) {
106
+ var index = workPlaceItems.findIndex(function (ele) { return ele.type === v.type; });
107
+ workPlaceItems.splice(index, 1, v);
108
+ var list = workPlaceItems;
109
+ setWorkPlaceItems(list);
110
+ }, [workPlaceItems]);
80
111
  var handleOk = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
81
- var error, avocadoConfig;
112
+ var error, workPlaceItemsError, avocadoConfig;
82
113
  return __generator(this, function (_a) {
83
114
  switch (_a.label) {
84
115
  case 0: return [4 /*yield*/, nameTextField.handleValidate()];
85
116
  case 1:
86
117
  error = _a.sent();
118
+ workPlaceItemsError = workPlaceItems.some(function (v) { return v.items.length === 0; });
87
119
  if (!error) {
88
120
  avocadoConfig = window['AvocadoVideoInterviewConfig'];
89
- run({
90
- name: value,
91
- tag: value,
92
- token: token,
93
- mateData: {
94
- account: avocadoConfig === null || avocadoConfig === void 0 ? void 0 : avocadoConfig.account,
95
- enterpriseId: avocadoConfig === null || avocadoConfig === void 0 ? void 0 : avocadoConfig.enterpriseId,
96
- },
97
- });
121
+ // 旧自定义能力
122
+ if (type === 3 && !isWorkplace) {
123
+ run({
124
+ name: value,
125
+ tag: value,
126
+ token: token,
127
+ mateData: {
128
+ account: avocadoConfig === null || avocadoConfig === void 0 ? void 0 : avocadoConfig.account,
129
+ enterpriseId: avocadoConfig === null || avocadoConfig === void 0 ? void 0 : avocadoConfig.enterpriseId,
130
+ },
131
+ });
132
+ }
133
+ else if (!workPlaceItemsError) {
134
+ // 职场能力
135
+ run({
136
+ name: value,
137
+ tag: value,
138
+ token: token,
139
+ workPlaceItems: workPlaceItems,
140
+ mateData: {
141
+ account: avocadoConfig === null || avocadoConfig === void 0 ? void 0 : avocadoConfig.account,
142
+ enterpriseId: avocadoConfig === null || avocadoConfig === void 0 ? void 0 : avocadoConfig.enterpriseId,
143
+ },
144
+ });
145
+ }
98
146
  }
99
147
  return [2 /*return*/];
100
148
  }
101
149
  });
102
- }); }, [nameTextField, run, token, value]);
150
+ }); }, [nameTextField, run, token, value, isWorkplace, type, workPlaceItems]);
151
+ var footer = useCallback(function () {
152
+ return step === 1 ? (_jsx(Box, __assign({ display: "flex", padding: "12px 16px" }, { children: type === 1 ? (_jsx(_Fragment, {})) : (_jsx(Button, __assign({ variant: "outlined", color: "inherit", onClick: function () { return setStep(2); } }, { children: "\u7F16\u8F91" }))) }))) : (_jsxs(Box, __assign({ display: "flex", justifyContent: "flex-end", padding: "12px 16px" }, { children: [_jsx(Button, __assign({ sx: { mr: 1, fontWeight: 400 }, variant: "text", color: "inherit", onClick: onClose }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ loading: loading, onClick: handleOk }, { children: "\u4FDD\u5B58" }))] })));
153
+ }, [type, step, loading, setStep, handleOk, onClose]);
103
154
  useEffect(function () {
104
155
  setValue(name);
105
156
  }, [name]);
106
157
  useEffect(function () {
107
158
  if (!open) {
108
159
  setValue('');
160
+ setWorkPlaceItems([]);
161
+ setStep(1);
109
162
  nameTextField.setError();
110
163
  }
111
164
  // eslint-disable-next-line react-hooks/exhaustive-deps
112
165
  }, [open]);
113
- return (_jsx(Dialog, __assign({ title: token ? '编辑能力' : '新增能力', open: open, okText: token ? '保存' : '新建', okProps: { loading: loading }, onClose: onClose, onOk: handleOk }, { children: _jsx(TextField, __assign({}, nameTextField)) })));
166
+ useEffect(function () {
167
+ setMode(step === 1 ? 'show' : 'edit');
168
+ }, [step]);
169
+ useEffect(function () {
170
+ if (type === 3 && !isWorkplace)
171
+ return;
172
+ if (token) {
173
+ setShowAiDefineDetail(false);
174
+ getAbilityDetail({ tokens: [token] });
175
+ }
176
+ // eslint-disable-next-line react-hooks/exhaustive-deps
177
+ }, [token, name]);
178
+ useEffect(function () {
179
+ setWorkPlaceItems(workPlaceItems);
180
+ }, [workPlaceItems, setWorkPlaceItems]);
181
+ return (_jsxs(Drawer, __assign({ className: "abilityDrawer", title: '能力详情', open: open, footer: footer, onClose: onClose }, { children: [_jsx(Box, __assign({ style: { width: '556px' } }, { children: step === 1 ? (_jsxs(Typography, __assign({ variant: "body1", fontWeight: "medium" }, { children: ["\u80FD\u529B\u540D\u79F0\uFF1A", value] }))) : (_jsxs(_Fragment, { children: [_jsx(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" })), _jsx(TextField, __assign({}, nameTextField))] })) })), !(type === 3 && !isWorkplace) && (_jsxs(Box, __assign({ style: { width: '556px' } }, { children: [_jsx(Divider, { style: { margin: '24px 0' } }), _jsx(Typography, __assign({ variant: "body1", fontWeight: "medium", mb: 2 }, { children: "\u80FD\u529B\u6807\u51C6" })), showAiDefineDetail &&
182
+ workPlaceItems.map(function (v) { return (_jsx(AbilityFormItem, { token: token, name: value, title: v.name, type: v.type, items: v.items, mode: mode, maxTextLength: v.type === 4 || v.type === 5 ? 300 : 100, canReplace: mode === 'edit' ? true : false, onChange: handleValue }, v.type)); })] })))] })));
114
183
  };
115
184
  export default UpdateAbility;
@@ -0,0 +1,8 @@
1
+ export declare const InitialValues: {
2
+ workPlaceItems: {
3
+ name: string;
4
+ type: number;
5
+ items: never[];
6
+ maxTextLength: number;
7
+ }[];
8
+ };