@alifd/chat 0.3.33-beta.7 → 0.3.33-beta.8

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.
@@ -10,4 +10,4 @@ import type { IconProps } from '@alifd/next/types/icon';
10
10
  export * from './types';
11
11
  declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<IconProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<IconProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/icon/icon").default>>, keyof IconProps | "key"> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<IconProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/icon/icon").default>, {}>;
12
12
  export default _default;
13
- export declare function renderCommonIcon(icon: any, size?: number | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl' | 'inherit'): React.JSX.Element;
13
+ export declare function renderCommonIcon(icon: any, size?: number | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl' | 'inherit'): React.JSX.Element | null;
package/es/icon/index.js CHANGED
@@ -41,6 +41,9 @@ export default ConfigProvider.config(IconWithSub);
41
41
  export function renderCommonIcon(icon, size) {
42
42
  let dom = null;
43
43
  let iconType = '';
44
+ if (!icon) {
45
+ return null;
46
+ }
44
47
  if (React.isValidElement(icon)) {
45
48
  dom = icon;
46
49
  iconType = 'node';
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.33-beta.7';
35
+ export const version = '0.3.33-beta.8';
@@ -10,4 +10,4 @@ import type { IconProps } from '@alifd/next/types/icon';
10
10
  export * from './types';
11
11
  declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<IconProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<IconProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/icon/icon").default>>, keyof IconProps | "key"> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<IconProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/icon/icon").default>, {}>;
12
12
  export default _default;
13
- export declare function renderCommonIcon(icon: any, size?: number | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl' | 'inherit'): React.JSX.Element;
13
+ export declare function renderCommonIcon(icon: any, size?: number | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl' | 'inherit'): React.JSX.Element | null;
package/lib/icon/index.js CHANGED
@@ -44,6 +44,9 @@ exports.default = next_1.ConfigProvider.config(IconWithSub);
44
44
  function renderCommonIcon(icon, size) {
45
45
  let dom = null;
46
46
  let iconType = '';
47
+ if (!icon) {
48
+ return null;
49
+ }
47
50
  if (react_1.default.isValidElement(icon)) {
48
51
  dom = icon;
49
52
  iconType = 'node';
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.33-beta.7';
73
+ exports.version = '0.3.33-beta.8';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alifd/chat",
3
- "version": "0.3.33-beta.7",
3
+ "version": "0.3.33-beta.8",
4
4
  "description": "A configurable component library for chat built on React.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",