@alifd/chat 0.3.37-beta.7 → 0.3.37-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.js CHANGED
@@ -32,4 +32,4 @@ export { default as CheckboxGroup } from './checkbox-group';
32
32
  export { default as Select } from './select';
33
33
  export { default as Flip } from './flip';
34
34
  export { default as ToolStatus } from './tool-status';
35
- export const version = '0.3.37-beta.7';
35
+ export const version = '0.3.37-beta.9';
@@ -74,7 +74,10 @@ const Reference = forwardRef(({ className, defaultExpanded = false, header, list
74
74
  };
75
75
  const handleReferenceClick = (item, index, event) => {
76
76
  event.stopPropagation();
77
- onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item, index);
77
+ if (onItemClick) {
78
+ onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item, index);
79
+ return;
80
+ }
78
81
  (item === null || item === void 0 ? void 0 : item.url) && window.open(item === null || item === void 0 ? void 0 : item.url, '_blank');
79
82
  };
80
83
  const renderDetailList = () => {
@@ -13,7 +13,7 @@ const SUCCESS_ICON = 'icon-check'; //'success'
13
13
  const ERROR_ICON = 'icon-cross1'; //'error'
14
14
  const LOADING_ICON = 'loading';
15
15
  const ToolStatus = forwardRef((props, ref) => {
16
- const { useText = '使用', name, className, selected = false, status, onToolClick, authInfo, fullWidth } = props;
16
+ const { useText = '使用', name, className, selected = false, status, onToolClick, authInfo, fullWidth, param, groupName } = props;
17
17
  const handleClick = (event) => {
18
18
  event.stopPropagation();
19
19
  onToolClick === null || onToolClick === void 0 ? void 0 : onToolClick(props);
@@ -31,7 +31,9 @@ const ToolStatus = forwardRef((props, ref) => {
31
31
  (_a = authInfo === null || authInfo === void 0 ? void 0 : authInfo.onAuthClick) === null || _a === void 0 ? void 0 : _a.call(authInfo, props);
32
32
  } }, authInfo === null || authInfo === void 0 ? void 0 : authInfo.content),
33
33
  React.createElement("div", { className: 'content-use-tips' }, useText),
34
- React.createElement("div", { className: 'content-name' }, name)));
34
+ groupName && React.createElement("div", { className: 'content-group' }, groupName),
35
+ name && React.createElement("div", { className: 'content-name' }, name),
36
+ param && React.createElement("div", { className: 'content-detail' }, param)));
35
37
  });
36
38
  export * from './types';
37
39
  export default ConfigProvider.config(ToolStatus);
@@ -64,12 +64,13 @@
64
64
  }
65
65
 
66
66
  .content-name {
67
- color: $color-text1-4;
67
+ color: $color-text1-3;
68
68
  line-height: $s-4;
69
69
  overflow: hidden;
70
70
  white-space: nowrap;
71
71
  text-overflow: ellipsis;
72
72
  flex: 1;
73
+ margin: 0px 4px;
73
74
  }
74
75
 
75
76
  }
@@ -33,10 +33,18 @@ export interface ToolStatusProps extends React.HTMLAttributes<HTMLElement>, Comm
33
33
  * 工具名称
34
34
  */
35
35
  name?: string;
36
+ /**
37
+ * 工具集名称
38
+ */
39
+ groupName?: string;
36
40
  /**
37
41
  * 工具详情链接
38
42
  */
39
43
  useText?: string;
44
+ /**
45
+ * 当前的具体使用说明
46
+ */
47
+ param?: string;
40
48
  /**
41
49
  * 是否100%的宽度
42
50
  */
package/lib/index.js CHANGED
@@ -70,4 +70,4 @@ var flip_1 = require("./flip");
70
70
  Object.defineProperty(exports, "Flip", { enumerable: true, get: function () { return tslib_1.__importDefault(flip_1).default; } });
71
71
  var tool_status_1 = require("./tool-status");
72
72
  Object.defineProperty(exports, "ToolStatus", { enumerable: true, get: function () { return tslib_1.__importDefault(tool_status_1).default; } });
73
- exports.version = '0.3.37-beta.7';
73
+ exports.version = '0.3.37-beta.9';
@@ -77,7 +77,10 @@ const Reference = (0, react_1.forwardRef)(({ className, defaultExpanded = false,
77
77
  };
78
78
  const handleReferenceClick = (item, index, event) => {
79
79
  event.stopPropagation();
80
- onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item, index);
80
+ if (onItemClick) {
81
+ onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item, index);
82
+ return;
83
+ }
81
84
  (item === null || item === void 0 ? void 0 : item.url) && window.open(item === null || item === void 0 ? void 0 : item.url, '_blank');
82
85
  };
83
86
  const renderDetailList = () => {
@@ -16,7 +16,7 @@ const SUCCESS_ICON = 'icon-check'; //'success'
16
16
  const ERROR_ICON = 'icon-cross1'; //'error'
17
17
  const LOADING_ICON = 'loading';
18
18
  const ToolStatus = (0, react_1.forwardRef)((props, ref) => {
19
- const { useText = '使用', name, className, selected = false, status, onToolClick, authInfo, fullWidth } = props;
19
+ const { useText = '使用', name, className, selected = false, status, onToolClick, authInfo, fullWidth, param, groupName } = props;
20
20
  const handleClick = (event) => {
21
21
  event.stopPropagation();
22
22
  onToolClick === null || onToolClick === void 0 ? void 0 : onToolClick(props);
@@ -34,7 +34,9 @@ const ToolStatus = (0, react_1.forwardRef)((props, ref) => {
34
34
  (_a = authInfo === null || authInfo === void 0 ? void 0 : authInfo.onAuthClick) === null || _a === void 0 ? void 0 : _a.call(authInfo, props);
35
35
  } }, authInfo === null || authInfo === void 0 ? void 0 : authInfo.content),
36
36
  react_1.default.createElement("div", { className: 'content-use-tips' }, useText),
37
- react_1.default.createElement("div", { className: 'content-name' }, name)));
37
+ groupName && react_1.default.createElement("div", { className: 'content-group' }, groupName),
38
+ name && react_1.default.createElement("div", { className: 'content-name' }, name),
39
+ param && react_1.default.createElement("div", { className: 'content-detail' }, param)));
38
40
  });
39
41
  tslib_1.__exportStar(require("./types"), exports);
40
42
  exports.default = next_1.ConfigProvider.config(ToolStatus);
@@ -64,12 +64,13 @@
64
64
  }
65
65
 
66
66
  .content-name {
67
- color: $color-text1-4;
67
+ color: $color-text1-3;
68
68
  line-height: $s-4;
69
69
  overflow: hidden;
70
70
  white-space: nowrap;
71
71
  text-overflow: ellipsis;
72
72
  flex: 1;
73
+ margin: 0px 4px;
73
74
  }
74
75
 
75
76
  }
@@ -33,10 +33,18 @@ export interface ToolStatusProps extends React.HTMLAttributes<HTMLElement>, Comm
33
33
  * 工具名称
34
34
  */
35
35
  name?: string;
36
+ /**
37
+ * 工具集名称
38
+ */
39
+ groupName?: string;
36
40
  /**
37
41
  * 工具详情链接
38
42
  */
39
43
  useText?: string;
44
+ /**
45
+ * 当前的具体使用说明
46
+ */
47
+ param?: string;
40
48
  /**
41
49
  * 是否100%的宽度
42
50
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alifd/chat",
3
- "version": "0.3.37-beta.7",
3
+ "version": "0.3.37-beta.9",
4
4
  "description": "A configurable component library for chat built on React.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",