@alifd/chat 0.1.16 → 0.2.0-beta.0
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/card/view/collapsable.d.ts +1 -1
- package/es/card-loading/index.d.ts +11 -0
- package/es/card-loading/index.js +18 -0
- package/es/card-loading/main.scss +5 -0
- package/es/card-loading/style.d.ts +2 -0
- package/es/card-loading/style.js +2 -0
- package/es/card-loading/types.d.ts +10 -0
- package/es/card-loading/types.js +1 -0
- package/es/feedback/types.d.ts +8 -0
- package/es/float-button/hooks/useAutoHide.d.ts +0 -1
- package/es/float-button/hooks/useDragable.d.ts +0 -1
- package/es/float-button/index.d.ts +0 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/list/index.d.ts +8 -0
- package/es/list/index.js +8 -0
- package/es/list/style.d.ts +1 -0
- package/es/list/style.js +1 -0
- package/es/list/types.d.ts +93 -0
- package/es/list/types.js +1 -0
- package/es/message/index.d.ts +8 -8
- package/es/person-picker/index.d.ts +90 -90
- package/es/person-picker/index.js +2 -2
- package/es/tag/index.d.ts +18 -18
- package/lib/card/view/card.js +2 -3
- package/lib/card/view/collapsable.d.ts +1 -1
- package/lib/card-loading/index.d.ts +11 -0
- package/lib/card-loading/index.js +21 -0
- package/lib/card-loading/main.scss +5 -0
- package/lib/card-loading/style.d.ts +2 -0
- package/lib/card-loading/style.js +4 -0
- package/lib/card-loading/types.d.ts +10 -0
- package/lib/card-loading/types.js +2 -0
- package/lib/feedback/types.d.ts +8 -0
- package/lib/float-button/hooks/useAutoAlign.js +1 -2
- package/lib/float-button/hooks/useAutoHide.d.ts +0 -1
- package/lib/float-button/hooks/useAutoHide.js +1 -2
- package/lib/float-button/hooks/useDragable.d.ts +0 -1
- package/lib/float-button/hooks/useDragable.js +1 -2
- package/lib/float-button/hooks/useNestleEdge.js +1 -2
- package/lib/float-button/hooks/useTriggerType.js +1 -2
- package/lib/float-button/index.d.ts +0 -1
- package/lib/float-button/util.js +4 -5
- package/lib/float-button/view/balloon.js +1 -2
- package/lib/float-button/view/drawer.js +1 -2
- package/lib/float-button/view/inner-drawer.js +1 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.js +21 -19
- package/lib/list/index.d.ts +8 -0
- package/lib/list/index.js +12 -0
- package/lib/list/style.d.ts +1 -0
- package/lib/list/style.js +3 -0
- package/lib/list/types.d.ts +93 -0
- package/lib/list/types.js +2 -0
- package/lib/message/index.d.ts +8 -8
- package/lib/person-picker/index.d.ts +90 -90
- package/lib/person-picker/index.js +2 -2
- package/lib/tag/index.d.ts +18 -18
- package/lib/utils/common.js +1 -2
- package/lib/utils/dingtalk.js +3 -4
- package/lib/utils/func.js +2 -3
- package/lib/utils/hooks/useControlable.js +1 -2
- package/lib/utils/hooks/useDebounce.js +1 -2
- package/lib/utils/hooks/useThrottle.js +1 -2
- package/package.json +25 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CollapsableCardProps } from '../types';
|
|
3
|
-
declare function CollapsableCard({ components, visible, defaultVisible, onVisibleChange, triggerType, mode, renderContent, ...props }: CollapsableCardProps): React.JSX.Element;
|
|
3
|
+
declare function CollapsableCard({ components, visible: _v, defaultVisible: _dv, onVisibleChange: _onVC, triggerType, mode, renderContent, ...props }: CollapsableCardProps): React.JSX.Element;
|
|
4
4
|
declare namespace CollapsableCard {
|
|
5
5
|
var displayName: string;
|
|
6
6
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component CardLoading
|
|
3
|
+
* @en CardLoading
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @when CardLoading
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { CardLoadingRef, CardLoadingProps } from './types';
|
|
9
|
+
export * from './types';
|
|
10
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<CardLoadingProps & React.RefAttributes<CardLoadingRef>, "key" | keyof CardLoadingProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, CardLoadingRef, {}>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component CardLoading
|
|
3
|
+
* @en CardLoading
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @when CardLoading
|
|
6
|
+
*/
|
|
7
|
+
import React, { forwardRef } from 'react';
|
|
8
|
+
import { ConfigProvider } from '@alifd/next';
|
|
9
|
+
import cs from 'classnames';
|
|
10
|
+
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
11
|
+
const CardLoading = forwardRef(({ className }, ref) => {
|
|
12
|
+
return (React.createElement("div", { className: cs(`${PREFIX_DEFAULT}card-loading`, className) }, "\u5361\u7247\u52A0\u8F7D\u4E2D"));
|
|
13
|
+
});
|
|
14
|
+
const CardLoadingWithSub = assignSubComponent(CardLoading, {
|
|
15
|
+
displayName: 'CardLoading',
|
|
16
|
+
});
|
|
17
|
+
export * from './types';
|
|
18
|
+
export default ConfigProvider.config(CardLoadingWithSub);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import { type CommonProps } from '@alifd/next';
|
|
3
|
+
export interface CardLoadingRef {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* @api CardLoading
|
|
7
|
+
*/
|
|
8
|
+
export interface CardLoadingProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/feedback/types.d.ts
CHANGED
|
@@ -47,6 +47,14 @@ export interface FeedbackProps extends HTMLAttributesWeek {
|
|
|
47
47
|
* @defaultValue 'hoz'
|
|
48
48
|
*/
|
|
49
49
|
direction?: 'ver' | 'hoz';
|
|
50
|
+
/**
|
|
51
|
+
* 是否需要分享按钮
|
|
52
|
+
*/
|
|
53
|
+
needShare?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 是否需要分享按钮
|
|
56
|
+
*/
|
|
57
|
+
onShareClick?: () => void;
|
|
50
58
|
}
|
|
51
59
|
/**
|
|
52
60
|
* @api Feedback.Good
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const FloatButtonWithSub: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<import("./types").FloatButtonProps & import("react").RefAttributes<import("./types").FloatButtonRef>, "key" | keyof import("./types").FloatButtonProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("./types").FloatButtonRef, {}> & {
|
|
3
2
|
Backtop: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<import("./types").BacktopProps & import("react").RefAttributes<import("./types").BacktopRef>, "key" | keyof import("./types").BacktopProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("./types").BacktopRef, {}>;
|
|
4
3
|
Drawer: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<import("./types").FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
package/es/index.d.ts
CHANGED
|
@@ -12,4 +12,6 @@ export { default as PersonPicker } from './person-picker';
|
|
|
12
12
|
export { default as Message } from './message';
|
|
13
13
|
export { default as Icon } from './icon';
|
|
14
14
|
export { default as Balloon } from './balloon';
|
|
15
|
+
export { default as List } from './list';
|
|
16
|
+
export { default as CardLoading } from './card-loading';
|
|
15
17
|
export declare const version: string;
|
package/es/index.js
CHANGED
|
@@ -12,4 +12,6 @@ export { default as PersonPicker } from './person-picker';
|
|
|
12
12
|
export { default as Message } from './message';
|
|
13
13
|
export { default as Icon } from './icon';
|
|
14
14
|
export { default as Balloon } from './balloon';
|
|
15
|
-
export
|
|
15
|
+
export { default as List } from './list';
|
|
16
|
+
export { default as CardLoading } from './card-loading';
|
|
17
|
+
export const version = '0.2.0-beta.0';
|
package/es/list/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@alifd/next/lib/list/style2';
|
package/es/list/style.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@alifd/next/lib/list/style2';
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
3
|
+
import type { LoadingProps } from '@alifd/next/types/loading';
|
|
4
|
+
import { type CommonProps } from '@alifd/next';
|
|
5
|
+
type HTMLAttributesWeak = Omit<React.HTMLAttributes<HTMLElement>, 'title'>;
|
|
6
|
+
/**
|
|
7
|
+
* @api List
|
|
8
|
+
*/
|
|
9
|
+
export interface ListProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
|
|
10
|
+
/**
|
|
11
|
+
* 列表头部
|
|
12
|
+
* @en List header
|
|
13
|
+
*/
|
|
14
|
+
header?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* 列表尾部
|
|
17
|
+
* @en List footer
|
|
18
|
+
*/
|
|
19
|
+
footer?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* 列表尺寸
|
|
22
|
+
* @en List size
|
|
23
|
+
* @defaultValue 'medium'
|
|
24
|
+
*/
|
|
25
|
+
size?: 'medium' | 'small';
|
|
26
|
+
/**
|
|
27
|
+
* 是否显示分割线
|
|
28
|
+
* @en Whether to show the divider
|
|
29
|
+
* @defaultValue true
|
|
30
|
+
*/
|
|
31
|
+
divider?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* children
|
|
34
|
+
*/
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* 列表项数据源
|
|
38
|
+
* @en List item data source
|
|
39
|
+
*/
|
|
40
|
+
dataSource?: unknown[];
|
|
41
|
+
/**
|
|
42
|
+
* 当使用 dataSource 时,可以用 renderItem 自定义渲染列表项
|
|
43
|
+
* @param current - 当前遍历的项 - The current item
|
|
44
|
+
* @param index - 当前遍历的项的索引 - The index of the current item
|
|
45
|
+
* @returns - 自定义渲染的 ReactElement - The ReactElement be customized
|
|
46
|
+
*/
|
|
47
|
+
renderItem?: (current: unknown, index: number) => ReactElement;
|
|
48
|
+
/**
|
|
49
|
+
* loading 状态控制
|
|
50
|
+
* @en Loading state control
|
|
51
|
+
* @defaultValue false
|
|
52
|
+
*/
|
|
53
|
+
loading?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 自定义 Loading 组件
|
|
56
|
+
* @en Custom Loading component
|
|
57
|
+
* @param props - 透传 props - Pass through props
|
|
58
|
+
* @returns - 自定义的 Loading 组件 - Custom Loading component
|
|
59
|
+
* @remarks 请务必透传 props, 使用方式:loadingComponent=\{props =\> \<Loading \{...props\}/\>\}
|
|
60
|
+
*/
|
|
61
|
+
loadingComponent?: (props: LoadingProps) => ReactElement;
|
|
62
|
+
/**
|
|
63
|
+
* 当列表为空时显示的内容
|
|
64
|
+
* @en The content displayed when the list is empty
|
|
65
|
+
*/
|
|
66
|
+
emptyContent?: ReactNode;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @api List.Item
|
|
70
|
+
*/
|
|
71
|
+
export interface ListItemProps extends HTMLAttributesWeak, CommonProps {
|
|
72
|
+
/**
|
|
73
|
+
* 列表元素的标题
|
|
74
|
+
* @en The title of the list item
|
|
75
|
+
*/
|
|
76
|
+
title?: ReactNode;
|
|
77
|
+
/**
|
|
78
|
+
* 列表元素的描述内容
|
|
79
|
+
* @en The description of the list item
|
|
80
|
+
*/
|
|
81
|
+
description?: ReactNode;
|
|
82
|
+
/**
|
|
83
|
+
* 列表元素的头像 / 图标 / 图片内容
|
|
84
|
+
* @en The avatar / icon / image content of the list item
|
|
85
|
+
*/
|
|
86
|
+
media?: ReactNode;
|
|
87
|
+
/**
|
|
88
|
+
* 额外内容
|
|
89
|
+
* @en Extra content
|
|
90
|
+
*/
|
|
91
|
+
extra?: ReactNode;
|
|
92
|
+
}
|
|
93
|
+
export {};
|
package/es/list/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/message/index.d.ts
CHANGED
|
@@ -13,20 +13,20 @@ declare const _default: import("@alifd/next/types/config-provider/types").Config
|
|
|
13
13
|
visible: boolean | undefined;
|
|
14
14
|
};
|
|
15
15
|
onClose: () => void;
|
|
16
|
-
render():
|
|
16
|
+
render(): import("react").JSX.Element | null;
|
|
17
17
|
context: any;
|
|
18
18
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@alifd/next/types/message").MessageProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
19
19
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
20
20
|
readonly props: Readonly<import("@alifd/next/types/message").MessageProps> & Readonly<{
|
|
21
|
-
children?:
|
|
21
|
+
children?: import("react").ReactNode;
|
|
22
22
|
}>;
|
|
23
23
|
refs: {
|
|
24
|
-
[key: string]:
|
|
24
|
+
[key: string]: import("react").ReactInstance;
|
|
25
25
|
};
|
|
26
26
|
componentDidMount?(): void;
|
|
27
27
|
shouldComponentUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
28
28
|
componentWillUnmount?(): void;
|
|
29
|
-
componentDidCatch?(error: Error, errorInfo:
|
|
29
|
+
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
30
30
|
getSnapshotBeforeUpdate?(prevProps: Readonly<import("@alifd/next/types/message").MessageProps>, prevState: Readonly<{}>): any;
|
|
31
31
|
componentDidUpdate?(prevProps: Readonly<import("@alifd/next/types/message").MessageProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
32
32
|
componentWillMount?(): void;
|
|
@@ -40,20 +40,20 @@ declare const _default: import("@alifd/next/types/config-provider/types").Config
|
|
|
40
40
|
visible: boolean | undefined;
|
|
41
41
|
};
|
|
42
42
|
onClose: () => void;
|
|
43
|
-
render():
|
|
43
|
+
render(): import("react").JSX.Element | null;
|
|
44
44
|
context: any;
|
|
45
45
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@alifd/next/types/message").MessageProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
46
46
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
47
47
|
readonly props: Readonly<import("@alifd/next/types/message").MessageProps> & Readonly<{
|
|
48
|
-
children?:
|
|
48
|
+
children?: import("react").ReactNode;
|
|
49
49
|
}>;
|
|
50
50
|
refs: {
|
|
51
|
-
[key: string]:
|
|
51
|
+
[key: string]: import("react").ReactInstance;
|
|
52
52
|
};
|
|
53
53
|
componentDidMount?(): void;
|
|
54
54
|
shouldComponentUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
55
55
|
componentWillUnmount?(): void;
|
|
56
|
-
componentDidCatch?(error: Error, errorInfo:
|
|
56
|
+
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
57
57
|
getSnapshotBeforeUpdate?(prevProps: Readonly<import("@alifd/next/types/message").MessageProps>, prevState: Readonly<{}>): any;
|
|
58
58
|
componentDidUpdate?(prevProps: Readonly<import("@alifd/next/types/message").MessageProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
59
59
|
componentWillMount?(): void;
|