@elliemae/ds-chat 2.0.0-next.8 → 2.0.0-rc.11

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.
Files changed (110) hide show
  1. package/cjs/ChatDataTestids.js +27 -0
  2. package/cjs/parts/bubble/ChatBubble.js +9 -6
  3. package/cjs/parts/bubble/ChatBubbleArrow.js +64 -61
  4. package/cjs/parts/bubble/props.js +1 -1
  5. package/cjs/parts/bubble/styled.js +1 -1
  6. package/cjs/parts/chat-composer/ChatContainerComposer.js +14 -7
  7. package/cjs/parts/chat-composer/props.js +4 -0
  8. package/cjs/parts/chat-composer/styled.js +2 -2
  9. package/cjs/parts/chat-container/ChatContainer.js +56 -14
  10. package/cjs/parts/chat-container/config/useValidateProps.js +2 -2
  11. package/cjs/parts/chat-container/props.js +7 -3
  12. package/cjs/parts/chat-container/styled.js +1 -1
  13. package/cjs/parts/chat-container-header/ChatContainerHeader.js +3 -3
  14. package/cjs/parts/chat-container-header/helpers.js +31 -0
  15. package/cjs/parts/chat-container-header/styled.js +6 -6
  16. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +137 -32
  17. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +2 -2
  18. package/cjs/parts/chat-container-messages-list/props.js +4 -2
  19. package/cjs/parts/chat-container-messages-list/styled.js +2 -2
  20. package/cjs/parts/chat-empty-state/ChatEmptyState.js +2 -3
  21. package/cjs/parts/chat-sidebar/SideBarChat.js +57 -29
  22. package/cjs/parts/chat-sidebar/props.js +11 -1
  23. package/cjs/parts/chat-sidebar/styled.js +2 -2
  24. package/cjs/parts/floating-button/FloatingButton.js +18 -10
  25. package/cjs/parts/floating-button/props.js +6 -2
  26. package/cjs/parts/sidebar-button/SidebarButton.js +5 -0
  27. package/cjs/parts/sidebar-button/props.js +2 -3
  28. package/cjs/parts/system-message/style.js +1 -1
  29. package/cjs/parts/tile-button/TileButton.js +30 -27
  30. package/cjs/parts/tile-button/props.js +12 -8
  31. package/cjs/parts/tile-button/styled.js +11 -4
  32. package/esm/ChatDataTestids.js +23 -0
  33. package/esm/parts/bubble/ChatBubble.js +8 -5
  34. package/esm/parts/bubble/ChatBubbleArrow.js +64 -61
  35. package/esm/parts/bubble/props.js +1 -1
  36. package/esm/parts/bubble/styled.js +1 -1
  37. package/esm/parts/chat-composer/ChatContainerComposer.js +13 -5
  38. package/esm/parts/chat-composer/props.js +4 -0
  39. package/esm/parts/chat-container/ChatContainer.js +54 -12
  40. package/esm/parts/chat-container/config/useValidateProps.js +2 -2
  41. package/esm/parts/chat-container/props.js +7 -3
  42. package/esm/parts/chat-container/styled.js +1 -1
  43. package/esm/parts/chat-container-header/ChatContainerHeader.js +3 -2
  44. package/esm/parts/chat-container-header/helpers.js +23 -0
  45. package/esm/parts/chat-container-header/styled.js +6 -6
  46. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +135 -30
  47. package/esm/parts/chat-container-messages-list/config/useValidateProps.js +2 -2
  48. package/esm/parts/chat-container-messages-list/props.js +4 -2
  49. package/esm/parts/chat-container-messages-list/styled.js +2 -2
  50. package/esm/parts/chat-empty-state/ChatEmptyState.js +1 -1
  51. package/esm/parts/chat-sidebar/SideBarChat.js +57 -28
  52. package/esm/parts/chat-sidebar/props.js +11 -1
  53. package/esm/parts/chat-sidebar/styled.js +2 -2
  54. package/esm/parts/floating-button/FloatingButton.js +18 -9
  55. package/esm/parts/floating-button/props.js +6 -2
  56. package/esm/parts/sidebar-button/SidebarButton.js +5 -0
  57. package/esm/parts/sidebar-button/props.js +1 -1
  58. package/esm/parts/system-message/style.js +1 -1
  59. package/esm/parts/tile-button/TileButton.js +31 -26
  60. package/esm/parts/tile-button/props.js +11 -3
  61. package/esm/parts/tile-button/styled.js +11 -6
  62. package/package.json +28 -6
  63. package/types/ChatDataTestids.d.ts +21 -0
  64. package/types/parts/bubble/ChatBubble.d.ts +18 -5
  65. package/types/parts/bubble/props.d.ts +13 -4
  66. package/types/parts/bubble/styled.d.ts +9 -9
  67. package/types/parts/bubble/tests/ChatBubble.test.d.ts +1 -0
  68. package/types/parts/chat-card/ChatCard.d.ts +24 -4
  69. package/types/parts/chat-card/props.d.ts +19 -3
  70. package/types/parts/chat-card/styled.d.ts +6 -6
  71. package/types/parts/chat-composer/ChatContainerComposer.d.ts +48 -13
  72. package/types/parts/chat-composer/styled.d.ts +117 -24
  73. package/types/parts/chat-composer/tests/ChatContainerComposer.test.d.ts +1 -0
  74. package/types/parts/chat-container/ChatContainer.d.ts +54 -13
  75. package/types/parts/chat-container/config/useValidateProps.d.ts +1 -1
  76. package/types/parts/chat-container/styled.d.ts +4 -4
  77. package/types/parts/chat-container/tests/ChatContainer.test.d.ts +1 -0
  78. package/types/parts/chat-container-header/helpers.d.ts +6 -0
  79. package/types/parts/chat-container-header/styled.d.ts +3 -3
  80. package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +39 -9
  81. package/types/parts/chat-container-messages-list/config/useValidateProps.d.ts +1 -1
  82. package/types/parts/chat-container-messages-list/styled.d.ts +7 -7
  83. package/types/parts/chat-empty-state/ChatEmptyState.d.ts +12 -3
  84. package/types/parts/chat-empty-state/props.d.ts +7 -2
  85. package/types/parts/chat-empty-state/styled.d.ts +2 -2
  86. package/types/parts/chat-sidebar/SideBarChat.d.ts +39 -9
  87. package/types/parts/chat-sidebar/props.d.ts +39 -9
  88. package/types/parts/chat-sidebar/styled.d.ts +2 -2
  89. package/types/parts/floating-button/FloatingButton.d.ts +11 -2
  90. package/types/parts/floating-button/props.d.ts +13 -1
  91. package/types/parts/floating-button/styled.d.ts +1 -1
  92. package/types/parts/floating-container/styled.d.ts +1 -2
  93. package/types/parts/grid-influencer/styled.d.ts +2 -2
  94. package/types/parts/message-delimiter/MessageDelimiter.d.ts +21 -4
  95. package/types/parts/message-delimiter/props.d.ts +16 -3
  96. package/types/parts/message-delimiter/styled.d.ts +3 -3
  97. package/types/parts/sidebar-button/SidebarButton.d.ts +16 -5
  98. package/types/parts/sidebar-button/props.d.ts +16 -5
  99. package/types/parts/sidebar-button/styled.d.ts +3 -3
  100. package/types/parts/system-message/SystemMessage.d.ts +12 -2
  101. package/types/parts/system-message/props.d.ts +7 -1
  102. package/types/parts/system-message/style.d.ts +5 -5
  103. package/types/parts/tile-button/TileButton.d.ts +66 -17
  104. package/types/parts/tile-button/props.d.ts +64 -16
  105. package/types/parts/tile-button/styled.d.ts +9 -8
  106. package/types/prop-types.d.ts +28 -9
  107. package/types/tests/utils.d.ts +27 -0
  108. package/types/parts/chat-composer/props.d.ts +0 -35
  109. package/types/parts/chat-container/props.d.ts +0 -39
  110. 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
- };