@ant-design/agentic-ui 2.11.0 → 2.11.2

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.
@@ -9,10 +9,8 @@ export type SupportedFormat = {
9
9
  export type AttachmentButtonPopoverProps = {
10
10
  children?: React.ReactNode;
11
11
  supportedFormat?: SupportedFormat;
12
- /** 文件选择后的回调函数,参数为选中的文件 */
13
- onFileSelect?: (files: FileList, accept: string) => void;
14
- /** 是否允许一次选择多个文件 */
15
- allowMultiple?: boolean;
12
+ /** 上传图片的处理函数 */
13
+ uploadImage?: (forGallery?: boolean) => Promise<void>;
16
14
  };
17
15
  export declare const SupportedFileFormats: {
18
16
  image: {
@@ -47,12 +47,8 @@ function _unsupported_iterable_to_array(o, minLen) {
47
47
  import { AudioOutlined, FileImageOutlined, FileTextFilled, FolderOpenOutlined, PictureOutlined, VideoCameraOutlined } from "@ant-design/icons";
48
48
  import { Button, Modal, Tooltip } from "antd";
49
49
  import React, { useCallback, useContext, useMemo, useState } from "react";
50
- import { useRefFunction } from "../../Hooks/useRefFunction";
51
50
  import { I18nContext } from "../../I18n";
52
- import { isMobileDevice, isVivoOrOppoDevice, isWeChat, kbToSize } from "./utils";
53
- /**
54
- * 移动设备默认的文件类型 accept 值
55
- */ var MOBILE_DEFAULT_ACCEPT = 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,.csv,text/plain,application/x-zip-compressed';
51
+ import { isMobileDevice, isVivoOrOppoDevice, kbToSize } from "./utils";
56
52
  var FILE_SIZE_UNITS = {
57
53
  KB: 1024,
58
54
  MB: 1024 * 1024
@@ -133,7 +129,7 @@ export var AttachmentSupportedFormatsContent = function(param) {
133
129
  });
134
130
  };
135
131
  export var AttachmentButtonPopover = function(param) {
136
- var children = param.children, supportedFormat = param.supportedFormat, onFileSelect = param.onFileSelect, _param_allowMultiple = param.allowMultiple, allowMultiple = _param_allowMultiple === void 0 ? true : _param_allowMultiple;
132
+ var children = param.children, supportedFormat = param.supportedFormat, uploadImage = param.uploadImage;
137
133
  var _useState = _sliced_to_array(useState(false), 2), modalOpen = _useState[0], setModalOpen = _useState[1];
138
134
  var locale = useContext(I18nContext).locale;
139
135
  var isVivoOrOppo = useMemo(function() {
@@ -142,9 +138,6 @@ export var AttachmentButtonPopover = function(param) {
142
138
  var isMobile = useMemo(function() {
143
139
  return isMobileDevice();
144
140
  }, []);
145
- var isWeChatEnv = useMemo(function() {
146
- return isWeChat();
147
- }, []);
148
141
  var trigger = useMemo(function() {
149
142
  return isVivoOrOppo ? [
150
143
  'click'
@@ -155,41 +148,6 @@ export var AttachmentButtonPopover = function(param) {
155
148
  }, [
156
149
  isVivoOrOppo
157
150
  ]);
158
- var format = supportedFormat || SupportedFileFormats.image;
159
- var extensions = format.extensions || [];
160
- /**
161
- * 根据支持的格式获取 accept 属性值
162
- */ var getAcceptValue = useRefFunction(function(forGallery) {
163
- // 如果是移动设备,返回默认的 accept 值
164
- if (isMobile || forGallery || isWeChatEnv) {
165
- return '';
166
- }
167
- // 打开文件,使用具体扩展名列表
168
- return extensions.length > 0 ? extensions.map(function(ext) {
169
- return ".".concat(ext);
170
- }).join(',') : MOBILE_DEFAULT_ACCEPT;
171
- });
172
- /**
173
- * 创建文件输入并触发选择
174
- */ var triggerFileInput = useRefFunction(function(forGallery) {
175
- var accept = getAcceptValue(forGallery);
176
- var input = document.createElement('input');
177
- input.type = 'file';
178
- input.accept = accept;
179
- input.multiple = allowMultiple;
180
- input.style.display = 'none';
181
- input.onchange = function(e) {
182
- var target = e.target;
183
- if (target.files && target.files.length > 0 && onFileSelect) {
184
- onFileSelect(target.files, accept);
185
- }
186
- // 清理
187
- input.remove();
188
- };
189
- document.body.appendChild(input);
190
- input.click();
191
- setModalOpen(false);
192
- });
193
151
  var handleClick = useCallback(function(e) {
194
152
  if (isVivoOrOppo) {
195
153
  e.stopPropagation();
@@ -200,14 +158,16 @@ export var AttachmentButtonPopover = function(param) {
200
158
  isVivoOrOppo
201
159
  ]);
202
160
  var handleOpenGallery = useCallback(function() {
203
- triggerFileInput(true);
161
+ uploadImage === null || uploadImage === void 0 ? void 0 : uploadImage(true);
162
+ setModalOpen(false);
204
163
  }, [
205
- triggerFileInput
164
+ uploadImage
206
165
  ]);
207
166
  var handleOpenFile = useCallback(function() {
208
- triggerFileInput(false);
167
+ uploadImage === null || uploadImage === void 0 ? void 0 : uploadImage(false);
168
+ setModalOpen(false);
209
169
  }, [
210
- triggerFileInput
170
+ uploadImage
211
171
  ]);
212
172
  if (isVivoOrOppo) {
213
173
  return /*#__PURE__*/ React.createElement("div", {
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import React from 'react';
2
2
  import { AttachmentButtonPopoverProps } from './AttachmentButtonPopover';
3
3
  import { AttachmentFile, UploadResponse } from './types';
4
4
  export * from './AttachmentButtonPopover';
@@ -93,7 +93,7 @@ export declare const upLoadFileToServer: (files: ArrayLike<File>, props: UploadP
93
93
  */
94
94
  export declare const AttachmentButton: React.FC<AttachmentButtonProps & {
95
95
  /** 上传图片的处理函数 */
96
- uploadImage(): Promise<void>;
96
+ uploadImage(forGallery?: boolean): Promise<void>;
97
97
  /** 按钮标题文本 */
98
98
  title?: React.ReactNode;
99
99
  }>;
@@ -138,7 +138,7 @@ function _ts_generator(thisArg, body) {
138
138
  import { Paperclip } from "@sofa-design/icons";
139
139
  import { ConfigProvider, message } from "antd";
140
140
  import classNames from "classnames";
141
- import { default as React, useContext } from "react";
141
+ import React, { useContext } from "react";
142
142
  import { compileTemplate } from "../../I18n";
143
143
  import AttachmentButtonPopover, { SupportedFileFormats } from "./AttachmentButtonPopover";
144
144
  import { useStyle } from "./style";
@@ -470,7 +470,7 @@ var ButtonContent = function(param) {
470
470
  * />
471
471
  * ```
472
472
  */ export var AttachmentButton = function(param) {
473
- var disabled = param.disabled, uploadImage = param.uploadImage, title = param.title, supportedFormat = param.supportedFormat, render = param.render, upload = param.upload, uploadWithResponse = param.uploadWithResponse, fileMap = param.fileMap, onFileMapChange = param.onFileMapChange, maxFileSize = param.maxFileSize, maxFileCount = param.maxFileCount, minFileCount = param.minFileCount, allowMultiple = param.allowMultiple;
473
+ var disabled = param.disabled, uploadImage = param.uploadImage, title = param.title, supportedFormat = param.supportedFormat, render = param.render;
474
474
  var context = useContext(ConfigProvider.ConfigContext);
475
475
  var prefix = context === null || context === void 0 ? void 0 : context.getPrefixCls('agentic-md-editor-attachment-button');
476
476
  var _useStyle = useStyle(prefix), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
@@ -484,26 +484,12 @@ var ButtonContent = function(param) {
484
484
  }, /*#__PURE__*/ React.createElement(ButtonContent, {
485
485
  title: title
486
486
  }));
487
- var handleFileSelect = function(files) {
488
- // 触发文件上传
489
- upLoadFileToServer(files, {
490
- upload: upload,
491
- uploadWithResponse: uploadWithResponse,
492
- fileMap: fileMap,
493
- onFileMapChange: onFileMapChange,
494
- maxFileSize: maxFileSize,
495
- maxFileCount: maxFileCount,
496
- minFileCount: minFileCount,
497
- locale: {}
498
- });
499
- };
500
487
  var wrapper = render ? render({
501
488
  children: buttonWithStyle,
502
489
  supportedFormat: format
503
490
  }) : /*#__PURE__*/ React.createElement(AttachmentButtonPopover, {
504
491
  supportedFormat: format,
505
- onFileSelect: handleFileSelect,
506
- allowMultiple: allowMultiple
492
+ uploadImage: uploadImage
507
493
  }, buttonWithStyle);
508
494
  return wrapSSR(/*#__PURE__*/ React.createElement("div", {
509
495
  className: classNames("".concat(prefix), hashId, _define_property({}, "".concat(prefix, "-disabled"), disabled)),
@@ -21,7 +21,7 @@ export interface FileUploadManagerReturn {
21
21
  /** 支持的文件格式 */
22
22
  supportedFormat: SupportedFileFormatsType;
23
23
  /** 上传图片 */
24
- uploadImage: () => Promise<void>;
24
+ uploadImage: (forGallery?: boolean) => Promise<void>;
25
25
  /** 更新附件文件列表 */
26
26
  updateAttachmentFiles: (newFileMap?: Map<string, AttachmentFile>) => void;
27
27
  /** 处理文件删除 */
@@ -180,10 +180,7 @@ import { useRefFunction } from "../../Hooks/useRefFunction";
180
180
  import { I18nContext } from "../../I18n";
181
181
  import { upLoadFileToServer } from "../AttachmentButton";
182
182
  import { SupportedFileFormats } from "../AttachmentButton/AttachmentButtonPopover";
183
- import { isMobileDevice, isVivoOrOppoDevice } from "../AttachmentButton/utils";
184
- /**
185
- * 移动设备默认的文件类型 accept 值
186
- */ var MOBILE_DEFAULT_ACCEPT = 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,.csv,image/*,text/plain,application/x-zip-compressed';
183
+ import { isMobileDevice, isVivoOrOppoDevice, isWeChat } from "../AttachmentButton/utils";
187
184
  /**
188
185
  * 文件上传管理器
189
186
  *
@@ -203,167 +200,166 @@ import { isMobileDevice, isVivoOrOppoDevice } from "../AttachmentButton/utils";
203
200
  onFileMapChange === null || onFileMapChange === void 0 ? void 0 : onFileMapChange(new Map(newFileMap));
204
201
  });
205
202
  /**
203
+ * 移动设备默认的文件类型 accept 值
204
+ */ var MOBILE_DEFAULT_ACCEPT = 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,.csv,text/plain,application/x-zip-compressed';
205
+ /**
206
206
  * 根据支持的格式获取 accept 属性值
207
- * 在移动设备上,使用默认的 accept
208
- * vivo oppo 手机上,如果只支持图片格式,使用 image/* 打开相册;否则使用具体扩展名打开文件选择器
209
- */ var getAcceptValue = function() {
207
+ * 优先级:微信 > 手机品牌(oppo/vivo)> 移动设备 > 相册模式 > 默认
208
+ */ var getAcceptValue = useRefFunction(function(forGallery) {
209
+ // 相册模式
210
+ if (forGallery) {
211
+ return 'image/*';
212
+ }
210
213
  var isMobile = isMobileDevice();
211
214
  var isVivoOrOppo = isVivoOrOppoDevice();
215
+ var isWeChatEnv = isWeChat();
212
216
  var extensions = (supportedFormat === null || supportedFormat === void 0 ? void 0 : supportedFormat.extensions) || [];
213
- // 如果是移动设备,返回默认的 accept 值
214
- if (isMobile) {
215
- return MOBILE_DEFAULT_ACCEPT;
217
+ // 1. 微信环境最优先:设置为空字符串以打开文件浏览器
218
+ if (isWeChatEnv) {
219
+ return '*';
216
220
  }
217
- if (!isVivoOrOppo) {
218
- // vivo/oppo 设备,直接使用扩展名列表
219
- return extensions.length > 0 ? extensions.map(function(ext) {
220
- return ".".concat(ext);
221
- }).join(',') : 'image/*';
221
+ // 2. 手机品牌其次(oppo/vivo):设置为空字符串以打开文件浏览器
222
+ if (isVivoOrOppo) {
223
+ return '*';
222
224
  }
223
- // vivo/oppo 设备:判断是否只包含图片格式
224
- var imageExtensions = [
225
- 'jpg',
226
- 'jpeg',
227
- 'png',
228
- 'gif',
229
- 'bmp',
230
- 'webp',
231
- 'svg'
232
- ];
233
- var isImageOnly = extensions.length > 0 && extensions.every(function(ext) {
234
- return imageExtensions.includes(ext.toLowerCase());
235
- });
236
- if (isImageOnly) {
237
- // 只支持图片格式,使用 image/* 打开相册
238
- return 'image/*';
225
+ // 3. 移动设备其次:设置为空字符串以打开文件浏览器
226
+ if (isMobile) {
227
+ return '*';
239
228
  }
240
- // 支持其他格式,使用具体扩展名列表打开文件选择器
229
+ // 4. 默认情况:使用具体扩展名列表
241
230
  return extensions.length > 0 ? extensions.map(function(ext) {
242
231
  return ".".concat(ext);
243
- }).join(',') : 'image/*';
244
- };
232
+ }).join(',') : MOBILE_DEFAULT_ACCEPT;
233
+ });
245
234
  /**
246
235
  * 上传图片
247
- */ var uploadImage = useRefFunction(/*#__PURE__*/ _async_to_generator(function() {
248
- var isUploading, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, file, currentFileCount, errorMsg, input, _attachment_allowMultiple;
249
- return _ts_generator(this, function(_state) {
250
- // 检查是否有文件正在上传中
251
- isUploading = false;
252
- _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
253
- try {
254
- for(_iterator = ((fileMap === null || fileMap === void 0 ? void 0 : fileMap.values()) || [])[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
255
- file = _step.value;
256
- if (file.status === 'uploading') {
257
- isUploading = true;
258
- break;
259
- }
260
- }
261
- } catch (err) {
262
- _didIteratorError = true;
263
- _iteratorError = err;
264
- } finally{
236
+ */ var uploadImage = useRefFunction(/*#__PURE__*/ function() {
237
+ var _ref = _async_to_generator(function(forGallery) {
238
+ var isUploading, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, file, currentFileCount, errorMsg, accept, input, _attachment_allowMultiple;
239
+ return _ts_generator(this, function(_state) {
240
+ // 检查是否有文件正在上传中
241
+ isUploading = false;
242
+ _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
265
243
  try {
266
- if (!_iteratorNormalCompletion && _iterator.return != null) {
267
- _iterator.return();
244
+ for(_iterator = ((fileMap === null || fileMap === void 0 ? void 0 : fileMap.values()) || [])[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
245
+ file = _step.value;
246
+ if (file.status === 'uploading') {
247
+ isUploading = true;
248
+ break;
249
+ }
268
250
  }
251
+ } catch (err) {
252
+ _didIteratorError = true;
253
+ _iteratorError = err;
269
254
  } finally{
270
- if (_didIteratorError) {
271
- throw _iteratorError;
255
+ try {
256
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
257
+ _iterator.return();
258
+ }
259
+ } finally{
260
+ if (_didIteratorError) {
261
+ throw _iteratorError;
262
+ }
272
263
  }
273
264
  }
274
- }
275
- if (isUploading) {
276
- return [
277
- 2
278
- ];
279
- }
280
- // 检查是否已达到最大文件数量限制
281
- currentFileCount = (fileMap === null || fileMap === void 0 ? void 0 : fileMap.size) || 0;
282
- if ((attachment === null || attachment === void 0 ? void 0 : attachment.maxFileCount) && currentFileCount >= attachment.maxFileCount) {
283
- errorMsg = (locale === null || locale === void 0 ? void 0 : locale['markdownInput.maxFileCountExceeded']) ? locale['markdownInput.maxFileCountExceeded'].replace('${maxFileCount}', String(attachment.maxFileCount)) : "最多只能上传 ".concat(attachment.maxFileCount, " 个文件");
284
- message.error(errorMsg);
285
- return [
286
- 2
287
- ];
288
- }
289
- input = document.createElement('input');
290
- input.id = 'uploadImage' + '_' + Math.random();
291
- input.type = 'file';
292
- input.accept = getAcceptValue();
293
- input.multiple = (_attachment_allowMultiple = attachment === null || attachment === void 0 ? void 0 : attachment.allowMultiple) !== null && _attachment_allowMultiple !== void 0 ? _attachment_allowMultiple : true;
294
- input.style.display = 'none';
295
- input.onchange = /*#__PURE__*/ function() {
296
- var _ref = _async_to_generator(function(e) {
297
- var error;
298
- return _ts_generator(this, function(_state) {
299
- switch(_state.label){
300
- case 0:
301
- if (input.dataset.readonly) {
265
+ if (isUploading) {
266
+ return [
267
+ 2
268
+ ];
269
+ }
270
+ // 检查是否已达到最大文件数量限制
271
+ currentFileCount = (fileMap === null || fileMap === void 0 ? void 0 : fileMap.size) || 0;
272
+ if ((attachment === null || attachment === void 0 ? void 0 : attachment.maxFileCount) && currentFileCount >= attachment.maxFileCount) {
273
+ errorMsg = (locale === null || locale === void 0 ? void 0 : locale['markdownInput.maxFileCountExceeded']) ? locale['markdownInput.maxFileCountExceeded'].replace('${maxFileCount}', String(attachment.maxFileCount)) : "最多只能上传 ".concat(attachment.maxFileCount, " 个文件");
274
+ message.error(errorMsg);
275
+ return [
276
+ 2
277
+ ];
278
+ }
279
+ accept = getAcceptValue(forGallery || false);
280
+ input = document.createElement('input');
281
+ input.id = 'uploadImage' + '_' + Math.random();
282
+ input.type = 'file';
283
+ input.accept = accept;
284
+ input.multiple = (_attachment_allowMultiple = attachment === null || attachment === void 0 ? void 0 : attachment.allowMultiple) !== null && _attachment_allowMultiple !== void 0 ? _attachment_allowMultiple : true;
285
+ input.style.display = 'none';
286
+ input.onchange = /*#__PURE__*/ function() {
287
+ var _ref = _async_to_generator(function(e) {
288
+ var error;
289
+ return _ts_generator(this, function(_state) {
290
+ switch(_state.label){
291
+ case 0:
292
+ if (input.dataset.readonly) {
293
+ return [
294
+ 2
295
+ ];
296
+ }
297
+ input.dataset.readonly = 'true';
298
+ _state.label = 1;
299
+ case 1:
300
+ _state.trys.push([
301
+ 1,
302
+ 3,
303
+ 4,
304
+ 5
305
+ ]);
306
+ return [
307
+ 4,
308
+ upLoadFileToServer(e.target.files, _object_spread_props(_object_spread({}, attachment), {
309
+ fileMap: fileMap,
310
+ onFileMapChange: function(newFileMap) {
311
+ updateAttachmentFiles(newFileMap);
312
+ },
313
+ locale: locale
314
+ }))
315
+ ];
316
+ case 2:
317
+ _state.sent();
318
+ return [
319
+ 3,
320
+ 5
321
+ ];
322
+ case 3:
323
+ error = _state.sent();
324
+ console.error('Error uploading files:', error);
325
+ return [
326
+ 3,
327
+ 5
328
+ ];
329
+ case 4:
330
+ input.value = '';
331
+ delete input.dataset.readonly;
332
+ return [
333
+ 7
334
+ ];
335
+ case 5:
302
336
  return [
303
337
  2
304
338
  ];
305
- }
306
- input.dataset.readonly = 'true';
307
- _state.label = 1;
308
- case 1:
309
- _state.trys.push([
310
- 1,
311
- 3,
312
- 4,
313
- 5
314
- ]);
315
- return [
316
- 4,
317
- upLoadFileToServer(e.target.files, _object_spread_props(_object_spread({}, attachment), {
318
- fileMap: fileMap,
319
- onFileMapChange: function(newFileMap) {
320
- updateAttachmentFiles(newFileMap);
321
- },
322
- locale: locale
323
- }))
324
- ];
325
- case 2:
326
- _state.sent();
327
- return [
328
- 3,
329
- 5
330
- ];
331
- case 3:
332
- error = _state.sent();
333
- console.error('Error uploading files:', error);
334
- return [
335
- 3,
336
- 5
337
- ];
338
- case 4:
339
- input.value = '';
340
- delete input.dataset.readonly;
341
- return [
342
- 7
343
- ];
344
- case 5:
345
- return [
346
- 2
347
- ];
348
- }
339
+ }
340
+ });
349
341
  });
350
- });
351
- return function(e) {
352
- return _ref.apply(this, arguments);
353
- };
354
- }();
355
- if (input.dataset.readonly) {
342
+ return function(e) {
343
+ return _ref.apply(this, arguments);
344
+ };
345
+ }();
346
+ if (input.dataset.readonly) {
347
+ return [
348
+ 2
349
+ ];
350
+ }
351
+ document.body.appendChild(input);
352
+ input.click();
353
+ input.remove();
356
354
  return [
357
355
  2
358
356
  ];
359
- }
360
- input.click();
361
- input.remove();
362
- return [
363
- 2
364
- ];
357
+ });
365
358
  });
366
- }));
359
+ return function(forGallery) {
360
+ return _ref.apply(this, arguments);
361
+ };
362
+ }());
367
363
  /**
368
364
  * 处理文件删除
369
365
  */ var handleFileRemoval = useRefFunction(/*#__PURE__*/ function() {
@@ -31,7 +31,7 @@ export interface SendActionsProps {
31
31
  /** 是否允许空内容提交 */
32
32
  allowEmptySubmit?: boolean;
33
33
  /** 上传图片回调 */
34
- uploadImage?: () => Promise<void>;
34
+ uploadImage?: (forGallery?: boolean) => Promise<void>;
35
35
  /** 开始录音回调 */
36
36
  onStartRecording?: () => Promise<void>;
37
37
  /** 停止录音回调 */
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import React from 'react';
2
2
  export interface ChartStatisticProps {
3
3
  title?: string;
4
4
  tooltip?: string;
@@ -1,7 +1,7 @@
1
1
  import { QuestionCircleOutlined } from "@ant-design/icons";
2
2
  import { ConfigProvider, Tooltip } from "antd";
3
3
  import classNames from "classnames";
4
- import { default as React, useContext } from "react";
4
+ import React, { useContext } from "react";
5
5
  import { useStyle } from "./style";
6
6
  import { formatNumber } from "./utils";
7
7
  var ChartStatistic = function(param) {
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import React from 'react';
2
2
  export interface FilterOption {
3
3
  label: string;
4
4
  value: string;
@@ -1,7 +1,7 @@
1
1
  import { ChevronDown } from "@sofa-design/icons";
2
2
  import { Button, ConfigProvider, Dropdown, Segmented } from "antd";
3
3
  import classNames from "classnames";
4
- import { default as React, useContext } from "react";
4
+ import React, { useContext } from "react";
5
5
  import { I18nContext } from "../../../../I18n";
6
6
  import { useStyle } from "./style";
7
7
  var ChartFilter = function(param) {
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import React from 'react';
2
2
  /**
3
3
  * @fileoverview 图表工具栏组件文件
4
4
  *
@@ -1,7 +1,7 @@
1
1
  import { DownloadOutlined } from "@ant-design/icons";
2
2
  import { ConfigProvider, Tooltip } from "antd";
3
3
  import classNames from "classnames";
4
- import { default as React, useContext } from "react";
4
+ import React, { useContext } from "react";
5
5
  import { I18nContext } from "../../../../I18n";
6
6
  import TimeIcon from "../icons/TimeIcon";
7
7
  import { useStyle } from "./style";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ant-design/agentic-ui",
3
- "version": "2.11.0",
3
+ "version": "2.11.2",
4
4
  "description": "面向智能体的 UI 组件库,提供多步推理可视化、工具调用展示、任务执行协同等 Agentic UI 能力",
5
5
  "repository": "git@github.com:ant-design/agentic-ui.git",
6
6
  "license": "MIT",