@elliemae/ds-chat 2.0.0-next.9 → 2.0.0-rc.12
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/cjs/ChatDataTestids.js +27 -0
- package/cjs/parts/bubble/ChatBubble.js +9 -6
- package/cjs/parts/bubble/ChatBubbleArrow.js +64 -61
- package/cjs/parts/bubble/props.js +1 -1
- package/cjs/parts/bubble/styled.js +1 -1
- package/cjs/parts/chat-composer/ChatContainerComposer.js +14 -7
- package/cjs/parts/chat-composer/props.js +4 -0
- package/cjs/parts/chat-composer/styled.js +3 -3
- package/cjs/parts/chat-container/ChatContainer.js +67 -20
- package/cjs/parts/chat-container/config/useValidateProps.js +2 -2
- package/cjs/parts/chat-container/props.js +7 -3
- package/cjs/parts/chat-container/styled.js +1 -1
- package/cjs/parts/chat-container-header/ChatContainerHeader.js +3 -3
- package/cjs/parts/chat-container-header/helpers.js +31 -0
- package/cjs/parts/chat-container-header/styled.js +6 -6
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +151 -35
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +2 -2
- package/cjs/parts/chat-container-messages-list/props.js +4 -2
- package/cjs/parts/chat-container-messages-list/styled.js +2 -2
- package/cjs/parts/chat-empty-state/ChatEmptyState.js +2 -3
- package/cjs/parts/chat-sidebar/SideBarChat.js +57 -29
- package/cjs/parts/chat-sidebar/props.js +11 -1
- package/cjs/parts/chat-sidebar/styled.js +2 -2
- package/cjs/parts/floating-button/FloatingButton.js +18 -10
- package/cjs/parts/floating-button/props.js +6 -2
- package/cjs/parts/sidebar-button/SidebarButton.js +5 -0
- package/cjs/parts/sidebar-button/props.js +2 -3
- package/cjs/parts/system-message/style.js +1 -1
- package/cjs/parts/tile-button/TileButton.js +30 -27
- package/cjs/parts/tile-button/props.js +12 -8
- package/cjs/parts/tile-button/styled.js +11 -4
- package/esm/ChatDataTestids.js +23 -0
- package/esm/parts/bubble/ChatBubble.js +8 -5
- package/esm/parts/bubble/ChatBubbleArrow.js +64 -61
- package/esm/parts/bubble/props.js +1 -1
- package/esm/parts/bubble/styled.js +1 -1
- package/esm/parts/chat-composer/ChatContainerComposer.js +13 -5
- package/esm/parts/chat-composer/props.js +4 -0
- package/esm/parts/chat-composer/styled.js +1 -1
- package/esm/parts/chat-container/ChatContainer.js +65 -18
- package/esm/parts/chat-container/config/useValidateProps.js +2 -2
- package/esm/parts/chat-container/props.js +7 -3
- package/esm/parts/chat-container/styled.js +1 -1
- package/esm/parts/chat-container-header/ChatContainerHeader.js +3 -2
- package/esm/parts/chat-container-header/helpers.js +23 -0
- package/esm/parts/chat-container-header/styled.js +6 -6
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +149 -33
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js +2 -2
- package/esm/parts/chat-container-messages-list/props.js +4 -2
- package/esm/parts/chat-container-messages-list/styled.js +2 -2
- package/esm/parts/chat-empty-state/ChatEmptyState.js +1 -1
- package/esm/parts/chat-sidebar/SideBarChat.js +57 -28
- package/esm/parts/chat-sidebar/props.js +11 -1
- package/esm/parts/chat-sidebar/styled.js +2 -2
- package/esm/parts/floating-button/FloatingButton.js +18 -9
- package/esm/parts/floating-button/props.js +6 -2
- package/esm/parts/sidebar-button/SidebarButton.js +5 -0
- package/esm/parts/sidebar-button/props.js +1 -1
- package/esm/parts/system-message/style.js +1 -1
- package/esm/parts/tile-button/TileButton.js +31 -26
- package/esm/parts/tile-button/props.js +11 -3
- package/esm/parts/tile-button/styled.js +11 -6
- package/package.json +28 -6
- package/types/ChatDataTestids.d.ts +21 -0
- package/types/parts/bubble/ChatBubble.d.ts +18 -5
- package/types/parts/bubble/props.d.ts +13 -4
- package/types/parts/bubble/styled.d.ts +9 -9
- package/types/parts/bubble/tests/ChatBubble.test.d.ts +1 -0
- package/types/parts/chat-card/ChatCard.d.ts +24 -4
- package/types/parts/chat-card/props.d.ts +19 -3
- package/types/parts/chat-card/styled.d.ts +6 -6
- package/types/parts/chat-composer/ChatContainerComposer.d.ts +48 -13
- package/types/parts/chat-composer/styled.d.ts +117 -24
- package/types/parts/chat-composer/tests/ChatContainerComposer.test.d.ts +1 -0
- package/types/parts/chat-container/ChatContainer.d.ts +54 -13
- package/types/parts/chat-container/config/useValidateProps.d.ts +1 -1
- package/types/parts/chat-container/styled.d.ts +4 -4
- package/types/parts/chat-container/tests/ChatContainer.test.d.ts +1 -0
- package/types/parts/chat-container-header/helpers.d.ts +6 -0
- package/types/parts/chat-container-header/styled.d.ts +3 -3
- package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +39 -9
- package/types/parts/chat-container-messages-list/config/useValidateProps.d.ts +1 -1
- package/types/parts/chat-container-messages-list/styled.d.ts +7 -7
- package/types/parts/chat-empty-state/ChatEmptyState.d.ts +12 -3
- package/types/parts/chat-empty-state/props.d.ts +7 -2
- package/types/parts/chat-empty-state/styled.d.ts +2 -2
- package/types/parts/chat-sidebar/SideBarChat.d.ts +39 -9
- package/types/parts/chat-sidebar/props.d.ts +39 -9
- package/types/parts/chat-sidebar/styled.d.ts +2 -2
- package/types/parts/floating-button/FloatingButton.d.ts +11 -2
- package/types/parts/floating-button/props.d.ts +13 -1
- package/types/parts/floating-button/styled.d.ts +1 -1
- package/types/parts/floating-container/styled.d.ts +1 -2
- package/types/parts/grid-influencer/styled.d.ts +2 -2
- package/types/parts/message-delimiter/MessageDelimiter.d.ts +21 -4
- package/types/parts/message-delimiter/props.d.ts +16 -3
- package/types/parts/message-delimiter/styled.d.ts +3 -3
- package/types/parts/sidebar-button/SidebarButton.d.ts +16 -5
- package/types/parts/sidebar-button/props.d.ts +16 -5
- package/types/parts/sidebar-button/styled.d.ts +3 -3
- package/types/parts/system-message/SystemMessage.d.ts +12 -2
- package/types/parts/system-message/props.d.ts +7 -1
- package/types/parts/system-message/style.d.ts +5 -5
- package/types/parts/tile-button/TileButton.d.ts +66 -17
- package/types/parts/tile-button/props.d.ts +64 -16
- package/types/parts/tile-button/styled.d.ts +9 -8
- package/types/prop-types.d.ts +28 -9
- package/types/tests/utils.d.ts +27 -0
- package/types/parts/chat-composer/props.d.ts +0 -35
- package/types/parts/chat-container/props.d.ts +0 -39
- package/types/parts/chat-container-messages-list/props.d.ts +0 -23
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PropTypes } from 'react-desc';
|
|
3
|
-
export interface TextAreaProps {
|
|
4
|
-
height: string | number;
|
|
5
|
-
style: React.CSSProperties;
|
|
6
|
-
}
|
|
7
|
-
export declare const defaultComposerPros: ChatComposerProps;
|
|
8
|
-
export interface ChatComposerProps {
|
|
9
|
-
placeholder: 'Type your message';
|
|
10
|
-
inputValue: '';
|
|
11
|
-
onChange: (value: string) => void;
|
|
12
|
-
onResize: (value: number) => void;
|
|
13
|
-
onSend: (value: string) => void;
|
|
14
|
-
onFocus: (e: React.ChangeEvent<HTMLTextAreaElement>, value: string) => void;
|
|
15
|
-
onBlur: (e: React.ChangeEvent<HTMLTextAreaElement>, value: string) => void;
|
|
16
|
-
maxHeight: number;
|
|
17
|
-
inputMaxLength: number | undefined;
|
|
18
|
-
buttonDisabled: boolean;
|
|
19
|
-
dataTestid?: string;
|
|
20
|
-
actionRef: PropTypes.func;
|
|
21
|
-
}
|
|
22
|
-
export declare const composerProps: {
|
|
23
|
-
placeholder: any;
|
|
24
|
-
inputValue: any;
|
|
25
|
-
onChange: any;
|
|
26
|
-
onResize: any;
|
|
27
|
-
onSend: any;
|
|
28
|
-
onFocus: any;
|
|
29
|
-
onBlur: any;
|
|
30
|
-
maxHeight: any;
|
|
31
|
-
inputMaxLength: any;
|
|
32
|
-
buttonDisabled: any;
|
|
33
|
-
dataTestid: any;
|
|
34
|
-
actionRef: any;
|
|
35
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { PropTypes } from 'react-desc';
|
|
2
|
-
import { ChatContainerMessagesListProps } from '../chat-container-messages-list/props';
|
|
3
|
-
import { ChatComposerProps } from '../chat-composer/props';
|
|
4
|
-
interface ChatBannerProps {
|
|
5
|
-
label: string;
|
|
6
|
-
viewLabel: string;
|
|
7
|
-
onView: () => void;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
}
|
|
10
|
-
export interface ChatContainerProps {
|
|
11
|
-
messagesListProps: Pick<ChatContainerMessagesListProps, 'messages' | 'onScrollEnds'>;
|
|
12
|
-
composerProps: ChatComposerProps;
|
|
13
|
-
actionRef: PropTypes.func;
|
|
14
|
-
autoScroll: boolean;
|
|
15
|
-
device: 'desktop' | 'mobile';
|
|
16
|
-
isLoading?: 'top' | 'bottom';
|
|
17
|
-
hasMoreItems?: 'top' | 'bottom';
|
|
18
|
-
getMoreMessages: PropTypes.func;
|
|
19
|
-
bannerPosition?: 'top' | 'bottom';
|
|
20
|
-
bannerProps?: ChatBannerProps;
|
|
21
|
-
sendingMessages?: string[] | number[];
|
|
22
|
-
sendingText: string;
|
|
23
|
-
}
|
|
24
|
-
export declare const defaultProps: ChatContainerProps;
|
|
25
|
-
export declare const containerProps: {
|
|
26
|
-
messagesListProps: any;
|
|
27
|
-
composerProps: any;
|
|
28
|
-
autoScroll: any;
|
|
29
|
-
device: any;
|
|
30
|
-
isLoading: any;
|
|
31
|
-
hasMoreItems: any;
|
|
32
|
-
getMoreMessages: any;
|
|
33
|
-
bannerPosition: any;
|
|
34
|
-
bannerProps: any;
|
|
35
|
-
sendingMessages: any;
|
|
36
|
-
sendingText: any;
|
|
37
|
-
actionRef: any;
|
|
38
|
-
};
|
|
39
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { PropTypes } from 'react-desc';
|
|
2
|
-
import { BubbleProps } from '../bubble/props';
|
|
3
|
-
export interface ChatContainerMessagesListProps {
|
|
4
|
-
messages: BubbleProps[];
|
|
5
|
-
actionRef: any;
|
|
6
|
-
onScrollEnds: (indexList: number[]) => number[];
|
|
7
|
-
isLoading?: 'top' | 'bottom';
|
|
8
|
-
hasMoreItems?: 'top' | 'bottom';
|
|
9
|
-
getMoreMessages: PropTypes.func;
|
|
10
|
-
sendingMessages?: Array<string | number>;
|
|
11
|
-
sendingText: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const defaultProps: ChatContainerMessagesListProps;
|
|
14
|
-
export declare const listProps: {
|
|
15
|
-
messages: any;
|
|
16
|
-
actionRef: any;
|
|
17
|
-
onScrollEnds: any;
|
|
18
|
-
isLoading: any;
|
|
19
|
-
hasMoreItems: any;
|
|
20
|
-
getMoreMessages: any;
|
|
21
|
-
sendingMessages: any;
|
|
22
|
-
sendingText: any;
|
|
23
|
-
};
|