@ant-design/agentic-ui 2.0.6 → 2.0.10

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 (27) hide show
  1. package/dist/Bubble/style.js +4 -2
  2. package/dist/MarkdownEditor/editor/Editor.js +3 -2
  3. package/dist/MarkdownEditor/editor/components/LazyElement/index.d.ts +32 -0
  4. package/dist/MarkdownEditor/editor/components/LazyElement/index.js +15 -4
  5. package/dist/MarkdownEditor/types.d.ts +34 -0
  6. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileIcon.d.ts +0 -33
  7. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileIcon.js +15 -16
  8. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.d.ts +4 -45
  9. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +107 -146
  10. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/index.js +100 -67
  11. package/dist/MarkdownInputField/AttachmentButton/index.d.ts +25 -1
  12. package/dist/MarkdownInputField/AttachmentButton/index.js +28 -11
  13. package/dist/MarkdownInputField/AttachmentButton/types.d.ts +15 -0
  14. package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +265 -199
  15. package/dist/MarkdownInputField/FileMapView/style.js +1 -0
  16. package/dist/MarkdownInputField/FileUploadManager/index.js +19 -6
  17. package/dist/MarkdownInputField/MarkdownInputField.js +4 -0
  18. package/dist/plugins/chart/AreaChart/index.d.ts +95 -0
  19. package/dist/plugins/chart/AreaChart/index.js +10 -0
  20. package/dist/plugins/chart/BarChart/index.d.ts +47 -0
  21. package/dist/plugins/chart/DonutChart/index.d.ts +28 -0
  22. package/dist/plugins/chart/components/ChartToolBar/ChartToolBar.d.ts +58 -0
  23. package/dist/plugins/chart/const.d.ts +25 -0
  24. package/dist/plugins/chart/const.js +10 -0
  25. package/dist/plugins/chart/index.d.ts +14 -0
  26. package/dist/plugins/chart/utils.d.ts +197 -32
  27. package/package.json +1 -1
@@ -144,10 +144,12 @@ var genStyle = (token, classNames) => {
144
144
  display: "flex",
145
145
  maxWidth: "min(860px,100%)",
146
146
  "&-left": {
147
- justifyContent: "flex-start"
147
+ justifyContent: "flex-start",
148
+ maxWidth: "min(860px,100%)"
148
149
  },
149
150
  "&-right": {
150
- justifyContent: "flex-end"
151
+ justifyContent: "flex-end",
152
+ maxWidth: "min(860px,100%)"
151
153
  }
152
154
  },
153
155
  "&-bubble-before": {
@@ -598,7 +598,7 @@ var SlateMarkdownEditor = (props) => {
598
598
  };
599
599
  const elementRenderElement = useCallback(
600
600
  (eleProps) => {
601
- var _a2, _b2, _c2, _d2;
601
+ var _a2, _b2, _c2, _d2, _e;
602
602
  const defaultDom = /* @__PURE__ */ React.createElement(
603
603
  ErrorBoundary,
604
604
  {
@@ -638,7 +638,8 @@ var SlateMarkdownEditor = (props) => {
638
638
  LazyElement,
639
639
  {
640
640
  placeholderHeight: (_c2 = props.lazy) == null ? void 0 : _c2.placeholderHeight,
641
- rootMargin: (_d2 = props.lazy) == null ? void 0 : _d2.rootMargin
641
+ rootMargin: (_d2 = props.lazy) == null ? void 0 : _d2.rootMargin,
642
+ renderPlaceholder: (_e = props.lazy) == null ? void 0 : _e.renderPlaceholder
642
643
  },
643
644
  renderedDom
644
645
  );
@@ -11,6 +11,24 @@ export interface LazyElementProps {
11
11
  rootMargin?: string;
12
12
  /** 占位符样式 */
13
13
  placeholderStyle?: React.CSSProperties;
14
+ /** 自定义占位符渲染函数 */
15
+ renderPlaceholder?: (props: {
16
+ /** 占位符高度 */
17
+ height: number;
18
+ /** 占位符样式 */
19
+ style: React.CSSProperties;
20
+ /** 元素是否即将进入视口 */
21
+ isIntersecting: boolean;
22
+ /** 元素在文档中的位置信息 */
23
+ elementInfo?: {
24
+ /** 元素类型 */
25
+ type: string;
26
+ /** 元素在文档中的索引 */
27
+ index: number;
28
+ /** 元素总数量 */
29
+ total: number;
30
+ };
31
+ }) => React.ReactNode;
14
32
  }
15
33
  /**
16
34
  * LazyElement 组件 - 懒加载元素包裹器
@@ -26,12 +44,26 @@ export interface LazyElementProps {
26
44
  * @param {number} [props.placeholderHeight=100] - 占位符高度
27
45
  * @param {string} [props.rootMargin='200px'] - 提前加载的距离
28
46
  * @param {React.CSSProperties} [props.placeholderStyle] - 自定义占位符样式
47
+ * @param {Function} [props.renderPlaceholder] - 自定义占位符渲染函数
29
48
  *
30
49
  * @example
31
50
  * ```tsx
51
+ * // 基本使用
32
52
  * <LazyElement placeholderHeight={150} rootMargin="300px">
33
53
  * <div>这是需要懒加载的内容</div>
34
54
  * </LazyElement>
55
+ *
56
+ * // 自定义占位符渲染
57
+ * <LazyElement
58
+ * placeholderHeight={150}
59
+ * renderPlaceholder={({ height, style, isIntersecting }) => (
60
+ * <div style={style}>
61
+ * <div>加载中... {isIntersecting ? '(即将显示)' : ''}</div>
62
+ * </div>
63
+ * )}
64
+ * >
65
+ * <div>这是需要懒加载的内容</div>
66
+ * </LazyElement>
35
67
  * ```
36
68
  *
37
69
  * @returns {React.ReactElement} 渲染的懒加载元素
@@ -21,11 +21,13 @@ var LazyElement = ({
21
21
  children,
22
22
  placeholderHeight = 25,
23
23
  rootMargin = "200px",
24
- placeholderStyle
24
+ placeholderStyle,
25
+ renderPlaceholder
25
26
  }) => {
26
27
  const containerRef = useRef(null);
27
28
  const [isVisible, setIsVisible] = useState(false);
28
29
  const [hasRendered, setHasRendered] = useState(false);
30
+ const [isIntersecting, setIsIntersecting] = useState(false);
29
31
  useEffect(() => {
30
32
  const container = containerRef.current;
31
33
  if (!container)
@@ -33,6 +35,7 @@ var LazyElement = ({
33
35
  const observer = new IntersectionObserver(
34
36
  (entries) => {
35
37
  entries.forEach((entry) => {
38
+ setIsIntersecting(entry.isIntersecting);
36
39
  if (entry.isIntersecting) {
37
40
  setIsVisible(true);
38
41
  setHasRendered(true);
@@ -53,13 +56,21 @@ var LazyElement = ({
53
56
  if (hasRendered || isVisible) {
54
57
  return /* @__PURE__ */ React.createElement("div", { ref: containerRef }, children);
55
58
  }
59
+ const computedPlaceholderStyle = __spreadValues({
60
+ minHeight: placeholderHeight
61
+ }, placeholderStyle);
62
+ if (renderPlaceholder) {
63
+ return /* @__PURE__ */ React.createElement("div", { ref: containerRef, "aria-hidden": "true" }, renderPlaceholder({
64
+ height: placeholderHeight,
65
+ style: computedPlaceholderStyle,
66
+ isIntersecting
67
+ }));
68
+ }
56
69
  return /* @__PURE__ */ React.createElement(
57
70
  "div",
58
71
  {
59
72
  ref: containerRef,
60
- style: __spreadValues({
61
- minHeight: placeholderHeight
62
- }, placeholderStyle),
73
+ style: computedPlaceholderStyle,
63
74
  "aria-hidden": "true"
64
75
  }
65
76
  );
@@ -147,11 +147,24 @@ export type MarkdownEditorProps = {
147
147
  *
148
148
  * @example
149
149
  * ```tsx
150
+ * // 基本懒加载配置
150
151
  * lazy={{
151
152
  * enable: true,
152
153
  * placeholderHeight: 100,
153
154
  * rootMargin: '200px'
154
155
  * }}
156
+ *
157
+ * // 自定义占位符渲染
158
+ * lazy={{
159
+ * enable: true,
160
+ * placeholderHeight: 120,
161
+ * rootMargin: '300px',
162
+ * renderPlaceholder: ({ height, style, isIntersecting }) => (
163
+ * <div style={style}>
164
+ * <div>加载中... {isIntersecting ? '(即将显示)' : ''}</div>
165
+ * </div>
166
+ * )
167
+ * }}
155
168
  * ```
156
169
  */
157
170
  lazy?: {
@@ -168,6 +181,27 @@ export type MarkdownEditorProps = {
168
181
  * 支持所有 IntersectionObserver rootMargin 的值
169
182
  */
170
183
  rootMargin?: string;
184
+ /**
185
+ * 自定义占位符渲染函数
186
+ * 允许开发者自定义懒加载时的占位符显示内容
187
+ */
188
+ renderPlaceholder?: (props: {
189
+ /** 占位符高度 */
190
+ height: number;
191
+ /** 占位符样式 */
192
+ style: React.CSSProperties;
193
+ /** 元素是否即将进入视口 */
194
+ isIntersecting: boolean;
195
+ /** 元素在文档中的位置信息 */
196
+ elementInfo?: {
197
+ /** 元素类型 */
198
+ type: string;
199
+ /** 元素在文档中的索引 */
200
+ index: number;
201
+ /** 元素总数量 */
202
+ total: number;
203
+ };
204
+ }) => React.ReactNode;
171
205
  };
172
206
  /**
173
207
  * 样式
@@ -1,38 +1,5 @@
1
1
  import React from 'react';
2
2
  import { AttachmentFile } from '../types';
3
- /**
4
- * AttachmentFileIcon 组件 - 附件文件图标组件
5
- *
6
- * 该组件根据文件类型显示不同的图标或预览。如果是图片文件,则显示图片预览;
7
- * 如果是其他类型文件,则显示对应的文件图标。
8
- *
9
- * @component
10
- * @description 附件文件图标组件,根据文件类型显示图标或预览
11
- * @param {Object} props - 组件属性
12
- * @param {AttachmentFile} props.file - 附件文件对象
13
- * @param {string} [props.className] - 自定义CSS类名
14
- * @param {React.CSSProperties} [props.style] - 自定义样式
15
- *
16
- * @example
17
- * ```tsx
18
- * <AttachmentFileIcon
19
- * file={fileData}
20
- * className="custom-icon"
21
- * style={{ fontSize: '24px' }}
22
- * />
23
- * ```
24
- *
25
- * @returns {React.ReactElement} 渲染的文件图标或预览组件
26
- *
27
- * @remarks
28
- * - 支持图片文件预览显示
29
- * - 支持多种文件类型图标
30
- * - 自动识别文件类型
31
- * - 提供自定义样式支持
32
- * - 响应式布局
33
- * - 图片自适应显示
34
- * - 图标居中显示
35
- */
36
3
  export declare const AttachmentFileIcon: React.FC<{
37
4
  file: AttachmentFile;
38
5
  className: string;
@@ -4,9 +4,18 @@ import { Image } from "antd";
4
4
  import React from "react";
5
5
  import { getFileTypeIcon } from "../../../Workspace/File/utils";
6
6
  import { isImageFile } from "../utils";
7
+ var IMAGE_STYLE = {
8
+ width: "40px",
9
+ height: "40px",
10
+ overflow: "hidden"
11
+ };
12
+ var IMAGE_PREVIEW_CONFIG = {
13
+ mask: /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Eye, null)),
14
+ visible: false
15
+ };
7
16
  var AttachmentFileIcon = (props) => {
8
17
  var _a;
9
- const file = props.file;
18
+ const { file, className } = props;
10
19
  if (file.status === "uploading") {
11
20
  return /* @__PURE__ */ React.createElement(FileUploadingSpin, null);
12
21
  }
@@ -18,25 +27,15 @@ var AttachmentFileIcon = (props) => {
18
27
  Image,
19
28
  {
20
29
  src: file.url,
21
- style: {
22
- width: "40px",
23
- height: "40px",
24
- overflow: "hidden"
25
- },
26
- rootClassName: props.className,
27
- preview: {
28
- mask: /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Eye, null)),
29
- visible: false
30
- },
30
+ style: IMAGE_STYLE,
31
+ rootClassName: className,
32
+ preview: IMAGE_PREVIEW_CONFIG,
31
33
  alt: file.name
32
34
  }
33
35
  );
34
36
  }
35
- return getFileTypeIcon(
36
- (_a = file.type) == null ? void 0 : _a.split("/").at(-1),
37
- "",
38
- file.name
39
- );
37
+ const fileType = (_a = file.type) == null ? void 0 : _a.split("/").at(-1);
38
+ return getFileTypeIcon(fileType, "", file.name);
40
39
  };
41
40
  export {
42
41
  AttachmentFileIcon
@@ -1,49 +1,6 @@
1
1
  import React from 'react';
2
2
  import { AttachmentFile } from '../types';
3
- /**
4
- * AttachmentFileListItem 组件 - 附件文件列表项组件
5
- *
6
- * 该组件用于显示单个附件文件项,包括文件图标、文件名、文件大小等信息。
7
- * 支持文件预览、下载、删除操作,提供动画效果和状态显示。
8
- *
9
- * @component
10
- * @description 附件文件列表项组件,显示单个文件信息
11
- * @param {Object} props - 组件属性
12
- * @param {AttachmentFile} props.file - 文件对象
13
- * @param {() => void} props.onDelete - 删除文件回调
14
- * @param {() => void} props.onPreview - 预览文件回调
15
- * @param {() => void} props.onDownload - 下载文件回调
16
- * @param {() => void} [props.onRetry] - 重试上传文件回调(文件上传失败时调用)
17
- * @param {string} [props.className] - 自定义CSS类名
18
- * @param {string} [props.prefixCls] - 前缀类名
19
- * @param {string} [props.hashId] - 哈希ID
20
- *
21
- * @example
22
- * ```tsx
23
- * <AttachmentFileListItem
24
- * file={fileData}
25
- * onDelete={() => handleDelete(fileData)}
26
- * onPreview={() => handlePreview(fileData)}
27
- * onDownload={() => handleDownload(fileData)}
28
- * onRetry={() => handleRetry(fileData)}
29
- * className="custom-file-item"
30
- * />
31
- * ```
32
- *
33
- * @returns {React.ReactElement} 渲染的附件文件列表项组件
34
- *
35
- * @remarks
36
- * - 显示文件图标、名称和大小
37
- * - 支持文件预览、下载、删除、重试操作
38
- * - 提供动画效果
39
- * - 显示文件状态(上传中、完成、错误)
40
- * - 支持自定义样式
41
- * - 文件名自动分割显示
42
- * - 文件大小格式化显示
43
- * - 响应式布局
44
- * - 文件上传失败时,点击文件名可重试上传
45
- */
46
- export declare const AttachmentFileListItem: React.FC<{
3
+ interface FileListItemProps {
47
4
  file: AttachmentFile;
48
5
  onDelete: () => void;
49
6
  onPreview: () => void;
@@ -52,4 +9,6 @@ export declare const AttachmentFileListItem: React.FC<{
52
9
  className?: string;
53
10
  prefixCls?: string;
54
11
  hashId?: string;
55
- }>;
12
+ }
13
+ export declare const AttachmentFileListItem: React.FC<FileListItemProps>;
14
+ export {};
@@ -6,158 +6,119 @@ import { motion } from "framer-motion";
6
6
  import React from "react";
7
7
  import { kbToSize } from "../utils";
8
8
  import { AttachmentFileIcon } from "./AttachmentFileIcon";
9
- var AttachmentFileListItem = (props) => {
10
- const file = props.file;
9
+ var getFileNameWithoutExtension = (fileName) => {
10
+ return fileName.split(".").slice(0, -1).join(".");
11
+ };
12
+ var getFileExtension = (fileName) => {
13
+ return fileName.split(".").slice(-1)[0];
14
+ };
15
+ var FileIcon = ({ file, prefixCls, hashId }) => {
16
+ const iconClassName = classNames(`${prefixCls}-file-icon`, hashId);
17
+ const status = file.status || "done";
18
+ const iconMap = {
19
+ uploading: /* @__PURE__ */ React.createElement("div", { className: classNames(`${prefixCls}-uploading-icon`, hashId) }, /* @__PURE__ */ React.createElement(FileUploadingSpin, null)),
20
+ error: /* @__PURE__ */ React.createElement("div", { className: classNames(`${prefixCls}-error-icon`, hashId) }, /* @__PURE__ */ React.createElement(FileFailed, null)),
21
+ done: /* @__PURE__ */ React.createElement(
22
+ AttachmentFileIcon,
23
+ {
24
+ file,
25
+ className: classNames(`${prefixCls}-file-icon-img`, hashId)
26
+ }
27
+ )
28
+ };
29
+ return /* @__PURE__ */ React.createElement("div", { className: iconClassName }, iconMap[status]);
30
+ };
31
+ var FileStatus = ({ file, prefixCls, hashId }) => {
32
+ const statusClassName = classNames(`${prefixCls}-file-size`, hashId);
33
+ if (file.status === "uploading") {
34
+ return /* @__PURE__ */ React.createElement("div", { className: statusClassName }, "上传中...");
35
+ }
36
+ if (file.status === "error") {
37
+ return /* @__PURE__ */ React.createElement(
38
+ "div",
39
+ {
40
+ className: classNames(statusClassName, `${prefixCls}-file-size-error`)
41
+ },
42
+ "上传失败"
43
+ );
44
+ }
45
+ const fileExtension = getFileExtension(file.name);
46
+ const fileSize = file.size ? kbToSize(file.size / 1024) : "";
47
+ const sizeItems = [fileExtension, fileSize].filter(Boolean);
48
+ return /* @__PURE__ */ React.createElement("div", { className: statusClassName }, sizeItems.map((item) => /* @__PURE__ */ React.createElement(
49
+ "span",
50
+ {
51
+ key: item,
52
+ className: classNames(`${prefixCls}-file-size-item`, hashId)
53
+ },
54
+ item
55
+ )));
56
+ };
57
+ var DeleteButton = ({ file, onClick, prefixCls, hashId }) => {
58
+ if (file.status === "uploading")
59
+ return null;
11
60
  return /* @__PURE__ */ React.createElement(
12
- Tooltip,
61
+ "div",
13
62
  {
14
- title: "点击重试",
15
- open: file.status !== "error" ? false : void 0
63
+ onClick,
64
+ className: classNames(`${prefixCls}-close-icon`, hashId)
16
65
  },
17
- /* @__PURE__ */ React.createElement(
18
- motion.div,
66
+ /* @__PURE__ */ React.createElement(X, { role: "img", "aria-label": "X" })
67
+ );
68
+ };
69
+ var AttachmentFileListItem = ({
70
+ file,
71
+ prefixCls,
72
+ hashId,
73
+ onPreview,
74
+ onRetry,
75
+ onDelete,
76
+ className
77
+ }) => {
78
+ const handleFileClick = () => {
79
+ if (file.status !== "done")
80
+ return;
81
+ onPreview == null ? void 0 : onPreview();
82
+ };
83
+ const handleRetryClick = () => {
84
+ if (file.status !== "error")
85
+ return;
86
+ onRetry == null ? void 0 : onRetry();
87
+ };
88
+ const handleDeleteClick = (e) => {
89
+ e.stopPropagation();
90
+ onDelete == null ? void 0 : onDelete();
91
+ };
92
+ return /* @__PURE__ */ React.createElement(Tooltip, { title: "点击重试", open: file.status === "error" || void 0 }, /* @__PURE__ */ React.createElement(
93
+ motion.div,
94
+ {
95
+ variants: {
96
+ hidden: { y: 20, opacity: 0 },
97
+ visible: { y: 0, opacity: 1 }
98
+ },
99
+ onClick: handleFileClick,
100
+ className,
101
+ exit: { opacity: 0, y: -20 }
102
+ },
103
+ /* @__PURE__ */ React.createElement(FileIcon, { file, prefixCls, hashId }),
104
+ /* @__PURE__ */ React.createElement("div", { className: classNames(`${prefixCls}-file-info`, hashId) }, /* @__PURE__ */ React.createElement(
105
+ "div",
19
106
  {
20
- variants: {
21
- hidden: { y: 20, opacity: 0 },
22
- visible: {
23
- y: 0,
24
- opacity: 1
25
- }
26
- },
27
- onClick: () => {
28
- var _a;
29
- if (file.status === "done") {
30
- (_a = props.onPreview) == null ? void 0 : _a.call(props);
31
- }
32
- },
33
- className: props.className,
34
- exit: { opacity: 0, y: -20 }
107
+ onClick: handleRetryClick,
108
+ className: classNames(`${prefixCls}-file-name`, hashId)
35
109
  },
36
- /* @__PURE__ */ React.createElement(
37
- "div",
38
- {
39
- className: classNames(`${props.prefixCls}-file-icon`, props.hashId)
40
- },
41
- file.status === "uploading" ? /* @__PURE__ */ React.createElement(
42
- "div",
43
- {
44
- className: classNames(
45
- `${props.prefixCls}-uploading-icon`,
46
- props.hashId
47
- )
48
- },
49
- /* @__PURE__ */ React.createElement(FileUploadingSpin, null)
50
- ) : null,
51
- file.status === "error" ? /* @__PURE__ */ React.createElement(
52
- "div",
53
- {
54
- className: classNames(
55
- `${props.prefixCls}-error-icon`,
56
- props.hashId
57
- )
58
- },
59
- /* @__PURE__ */ React.createElement(FileFailed, null)
60
- ) : null,
61
- file.status === "done" ? /* @__PURE__ */ React.createElement(
62
- AttachmentFileIcon,
63
- {
64
- file,
65
- className: classNames(
66
- `${props.prefixCls}-file-icon-img`,
67
- props.hashId
68
- )
69
- }
70
- ) : null
71
- ),
72
- /* @__PURE__ */ React.createElement(
73
- "div",
74
- {
75
- className: classNames(`${props.prefixCls}-file-info`, props.hashId)
76
- },
77
- /* @__PURE__ */ React.createElement(
78
- "div",
79
- {
80
- onClick: () => {
81
- var _a;
82
- if (file.status === "error") {
83
- (_a = props.onRetry) == null ? void 0 : _a.call(props);
84
- }
85
- },
86
- className: classNames(`${props.prefixCls}-file-name`, props.hashId)
87
- },
88
- /* @__PURE__ */ React.createElement(
89
- "span",
90
- {
91
- className: classNames(
92
- `${props.prefixCls}-file-name-text`,
93
- props.hashId
94
- )
95
- },
96
- file.name.split(".").slice(0, -1).join(".")
97
- )
98
- ),
99
- file.status === "uploading" ? /* @__PURE__ */ React.createElement(
100
- "div",
101
- {
102
- className: classNames(
103
- `${props.prefixCls}-file-size`,
104
- props.hashId
105
- )
106
- },
107
- "上传中..."
108
- ) : null,
109
- file.status === "done" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
110
- "div",
111
- {
112
- className: classNames(
113
- `${props.prefixCls}-file-size`,
114
- props.hashId
115
- )
116
- },
117
- [file.name.split(".").slice(-1), kbToSize(file.size / 1024)].filter(Boolean).map((item) => {
118
- return /* @__PURE__ */ React.createElement(
119
- "span",
120
- {
121
- key: (item == null ? void 0 : item.toString()) + "",
122
- className: classNames(
123
- `${props.prefixCls}-file-size-item`,
124
- props.hashId
125
- )
126
- },
127
- item
128
- );
129
- })
130
- )) : null,
131
- file.status === "error" ? /* @__PURE__ */ React.createElement(
132
- "div",
133
- {
134
- className: classNames(
135
- `${props.prefixCls}-file-size`,
136
- `${props.prefixCls}-file-size-error`,
137
- props.hashId
138
- )
139
- },
140
- "上传失败"
141
- ) : null
142
- ),
143
- file.status !== "uploading" ? /* @__PURE__ */ React.createElement(
144
- "div",
145
- {
146
- onClick: (e) => {
147
- var _a;
148
- e.stopPropagation();
149
- e.stopPropagation();
150
- (_a = props.onDelete) == null ? void 0 : _a.call(props);
151
- },
152
- className: classNames(
153
- `${props.prefixCls}-close-icon`,
154
- props.hashId
155
- )
156
- },
157
- /* @__PURE__ */ React.createElement(X, { role: "img", "aria-label": "X" })
158
- ) : null
110
+ /* @__PURE__ */ React.createElement("span", { className: classNames(`${prefixCls}-file-name-text`, hashId) }, getFileNameWithoutExtension(file.name))
111
+ ), /* @__PURE__ */ React.createElement(FileStatus, { file, prefixCls, hashId })),
112
+ /* @__PURE__ */ React.createElement(
113
+ DeleteButton,
114
+ {
115
+ file,
116
+ onClick: handleDeleteClick,
117
+ prefixCls,
118
+ hashId
119
+ }
159
120
  )
160
- );
121
+ ));
161
122
  };
162
123
  export {
163
124
  AttachmentFileListItem