@elliemae/ds-chat 2.3.0-next.6 → 2.3.0-rc.1

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 (237) hide show
  1. package/cjs/{parts → exported-related}/bubble/ChatBubble.js +8 -10
  2. package/cjs/{parts → exported-related}/bubble/ChatBubbleArrow.js +0 -0
  3. package/cjs/{parts → exported-related}/bubble/index.js +0 -0
  4. package/cjs/exported-related/bubble/props.js +43 -0
  5. package/cjs/{parts → exported-related}/bubble/styled.js +9 -9
  6. package/cjs/{parts → exported-related}/chat-card/ChatCard.js +6 -7
  7. package/cjs/{parts → exported-related}/chat-card/index.js +0 -0
  8. package/cjs/exported-related/chat-card/props.js +22 -0
  9. package/cjs/{parts → exported-related}/chat-card/styled.js +6 -6
  10. package/cjs/{parts → exported-related}/chat-container-header/ChatContainerHeader.js +10 -4
  11. package/cjs/{parts → exported-related}/chat-container-header/helpers.js +0 -0
  12. package/cjs/exported-related/chat-container-header/props.js +18 -0
  13. package/cjs/{parts → exported-related}/chat-container-header/styled.js +4 -4
  14. package/cjs/{parts → exported-related}/chat-empty-state/ChatEmptyState.js +8 -10
  15. package/cjs/exported-related/chat-empty-state/props.js +18 -0
  16. package/cjs/{parts → exported-related}/chat-empty-state/styled.js +2 -2
  17. package/cjs/{parts → exported-related}/chat-sidebar/SideBarChat.js +10 -11
  18. package/cjs/{parts → exported-related}/chat-sidebar/index.js +0 -0
  19. package/cjs/{parts → exported-related}/chat-sidebar/props.js +2 -5
  20. package/cjs/{parts → exported-related/chat-sidebar}/sidebar-button/SidebarButton.js +1 -1
  21. package/cjs/{parts → exported-related/chat-sidebar}/sidebar-button/index.js +0 -0
  22. package/cjs/exported-related/chat-sidebar/sidebar-button/props.js +25 -0
  23. package/cjs/{parts → exported-related/chat-sidebar}/sidebar-button/styled.js +4 -4
  24. package/cjs/{parts → exported-related}/chat-sidebar/styled.js +2 -2
  25. package/cjs/{parts → exported-related}/floating-button/FloatingButton.js +13 -6
  26. package/cjs/{parts → exported-related}/floating-button/index.js +1 -0
  27. package/cjs/{parts → exported-related}/floating-button/props.js +0 -0
  28. package/cjs/{parts → exported-related}/floating-button/styled.js +1 -1
  29. package/cjs/{parts → exported-related}/floating-container/styled.js +1 -1
  30. package/cjs/{parts → exported-related}/grid-influencer/InfluencerContainer.js +1 -1
  31. package/cjs/{parts → exported-related}/grid-influencer/styled.js +2 -2
  32. package/cjs/exported-related/index.js +37 -0
  33. package/cjs/exported-related/message-delimiter/MessageDelimiter.js +53 -0
  34. package/cjs/{parts → exported-related}/message-delimiter/index.js +0 -0
  35. package/cjs/exported-related/message-delimiter/props.js +33 -0
  36. package/cjs/{parts → exported-related}/message-delimiter/styled.js +3 -3
  37. package/cjs/{parts → exported-related}/system-message/SystemMessage.js +6 -8
  38. package/cjs/{parts → exported-related}/system-message/index.js +0 -0
  39. package/cjs/{parts → exported-related}/system-message/props.js +0 -0
  40. package/cjs/{parts → exported-related}/system-message/style.js +5 -5
  41. package/cjs/{parts → exported-related}/tile-button/TileButton.js +7 -9
  42. package/cjs/{parts → exported-related}/tile-button/index.js +0 -0
  43. package/cjs/exported-related/tile-button/props.js +55 -0
  44. package/cjs/{parts → exported-related}/tile-button/styled.js +9 -9
  45. package/cjs/index.js +29 -18
  46. package/cjs/parts/chat-composer/ChatContainerComposer.js +7 -9
  47. package/cjs/parts/chat-container/ChatContainer.js +18 -20
  48. package/cjs/parts/chat-container/styled.js +2 -2
  49. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +83 -70
  50. package/cjs/parts/chat-container-messages-list/styled.js +9 -5
  51. package/cjs/parts/chat-container-messages-list/useGetNewMessages.js +28 -0
  52. package/cjs/parts/index.js +16 -0
  53. package/cjs/react-desc-prop-types.js +116 -0
  54. package/esm/{parts → exported-related}/bubble/ChatBubble.js +7 -9
  55. package/esm/{parts → exported-related}/bubble/ChatBubbleArrow.js +0 -0
  56. package/esm/{parts → exported-related}/bubble/index.js +0 -0
  57. package/esm/{parts → exported-related}/bubble/props.js +14 -24
  58. package/esm/{parts → exported-related}/bubble/styled.js +9 -9
  59. package/esm/{parts → exported-related}/chat-card/ChatCard.js +4 -5
  60. package/esm/{parts → exported-related}/chat-card/index.js +0 -0
  61. package/esm/{parts → exported-related}/chat-card/props.js +9 -2
  62. package/esm/{parts → exported-related}/chat-card/styled.js +6 -6
  63. package/esm/{parts → exported-related}/chat-container-header/ChatContainerHeader.js +9 -4
  64. package/esm/{parts → exported-related}/chat-container-header/helpers.js +0 -0
  65. package/esm/exported-related/chat-container-header/props.js +13 -0
  66. package/esm/{parts → exported-related}/chat-container-header/styled.js +4 -4
  67. package/esm/{parts → exported-related}/chat-empty-state/ChatEmptyState.js +7 -9
  68. package/esm/exported-related/chat-empty-state/props.js +13 -0
  69. package/esm/{parts → exported-related}/chat-empty-state/styled.js +2 -2
  70. package/esm/{parts → exported-related}/chat-sidebar/SideBarChat.js +8 -9
  71. package/esm/{parts → exported-related}/chat-sidebar/index.js +0 -0
  72. package/esm/{parts → exported-related}/chat-sidebar/props.js +2 -5
  73. package/esm/{parts → exported-related/chat-sidebar}/sidebar-button/SidebarButton.js +1 -1
  74. package/esm/{parts → exported-related/chat-sidebar}/sidebar-button/index.js +0 -0
  75. package/esm/{parts → exported-related/chat-sidebar}/sidebar-button/props.js +3 -4
  76. package/esm/{parts → exported-related/chat-sidebar}/sidebar-button/styled.js +4 -4
  77. package/esm/{parts → exported-related}/chat-sidebar/styled.js +2 -2
  78. package/esm/exported-related/floating-button/FloatingButton.js +33 -0
  79. package/esm/exported-related/floating-button/index.js +1 -0
  80. package/esm/{parts → exported-related}/floating-button/props.js +0 -0
  81. package/esm/{parts → exported-related}/floating-button/styled.js +1 -1
  82. package/esm/{parts → exported-related}/floating-container/styled.js +1 -1
  83. package/esm/{parts → exported-related}/grid-influencer/InfluencerContainer.js +1 -1
  84. package/esm/{parts → exported-related}/grid-influencer/styled.js +2 -2
  85. package/esm/exported-related/index.js +11 -0
  86. package/esm/exported-related/message-delimiter/MessageDelimiter.js +43 -0
  87. package/esm/{parts → exported-related}/message-delimiter/index.js +0 -0
  88. package/esm/exported-related/message-delimiter/props.js +24 -0
  89. package/esm/{parts → exported-related}/message-delimiter/styled.js +3 -3
  90. package/esm/{parts → exported-related}/system-message/SystemMessage.js +4 -6
  91. package/esm/{parts → exported-related}/system-message/index.js +0 -0
  92. package/esm/{parts → exported-related}/system-message/props.js +0 -0
  93. package/esm/{parts → exported-related}/system-message/style.js +5 -5
  94. package/esm/{parts → exported-related}/tile-button/TileButton.js +5 -7
  95. package/esm/{parts → exported-related}/tile-button/index.js +0 -0
  96. package/esm/{parts → exported-related}/tile-button/props.js +3 -3
  97. package/esm/{parts → exported-related}/tile-button/styled.js +9 -9
  98. package/esm/index.js +14 -12
  99. package/esm/parts/chat-composer/ChatContainerComposer.js +9 -11
  100. package/esm/parts/chat-container/ChatContainer.js +16 -18
  101. package/esm/parts/chat-container/styled.js +2 -2
  102. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +81 -68
  103. package/esm/parts/chat-container-messages-list/styled.js +9 -6
  104. package/esm/parts/chat-container-messages-list/useGetNewMessages.js +24 -0
  105. package/esm/parts/index.js +3 -0
  106. package/esm/react-desc-prop-types.js +103 -0
  107. package/package.json +176 -216
  108. package/types/exported-related/bubble/ChatBubble.d.ts +5 -0
  109. package/types/{parts → exported-related}/bubble/ChatBubbleArrow.d.ts +1 -1
  110. package/types/{parts → exported-related}/bubble/index.d.ts +0 -0
  111. package/types/exported-related/bubble/props.d.ts +33 -0
  112. package/types/{parts → exported-related}/bubble/styled.d.ts +11 -7
  113. package/types/{parts → exported-related}/bubble/tests/ChatBubble.test.d.ts +0 -0
  114. package/types/exported-related/chat-card/ChatCard.d.ts +5 -0
  115. package/types/{parts → exported-related}/chat-card/index.d.ts +0 -0
  116. package/types/exported-related/chat-card/props.d.ts +14 -0
  117. package/types/{parts → exported-related}/chat-card/styled.d.ts +0 -0
  118. package/types/exported-related/chat-container-header/ChatContainerHeader.d.ts +5 -0
  119. package/types/{parts → exported-related}/chat-container-header/helpers.d.ts +2 -2
  120. package/types/exported-related/chat-container-header/props.d.ts +10 -0
  121. package/types/{parts → exported-related}/chat-container-header/styled.d.ts +0 -0
  122. package/types/exported-related/chat-container-header/tests/ChatContainerHeader.test.d.ts +1 -0
  123. package/types/exported-related/chat-empty-state/ChatEmptyState.d.ts +5 -0
  124. package/types/exported-related/chat-empty-state/props.d.ts +10 -0
  125. package/types/{parts → exported-related}/chat-empty-state/styled.d.ts +0 -0
  126. package/types/exported-related/chat-sidebar/SideBarChat.d.ts +5 -0
  127. package/types/{parts → exported-related}/chat-sidebar/index.d.ts +0 -0
  128. package/types/{parts → exported-related}/chat-sidebar/props.d.ts +4 -4
  129. package/types/exported-related/chat-sidebar/sidebar-button/SidebarButton.d.ts +13 -0
  130. package/types/{parts → exported-related/chat-sidebar}/sidebar-button/index.d.ts +0 -0
  131. package/types/exported-related/chat-sidebar/sidebar-button/props.d.ts +18 -0
  132. package/types/{parts → exported-related/chat-sidebar}/sidebar-button/styled.d.ts +0 -0
  133. package/types/{parts → exported-related}/chat-sidebar/styled.d.ts +0 -0
  134. package/types/exported-related/floating-button/FloatingButton.d.ts +5 -0
  135. package/types/{parts → exported-related}/floating-button/index.d.ts +0 -0
  136. package/types/{parts → exported-related}/floating-button/props.d.ts +0 -0
  137. package/types/{parts → exported-related}/floating-button/styled.d.ts +0 -0
  138. package/types/exported-related/floating-container/styled.d.ts +2 -0
  139. package/types/{parts → exported-related}/grid-influencer/InfluencerContainer.d.ts +0 -0
  140. package/types/{parts → exported-related}/grid-influencer/styled.d.ts +0 -0
  141. package/types/exported-related/index.d.ts +10 -0
  142. package/types/exported-related/message-delimiter/MessageDelimiter.d.ts +5 -0
  143. package/types/{parts → exported-related}/message-delimiter/index.d.ts +0 -0
  144. package/types/exported-related/message-delimiter/props.d.ts +371 -0
  145. package/types/{parts → exported-related}/message-delimiter/styled.d.ts +0 -0
  146. package/types/exported-related/system-message/SystemMessage.d.ts +5 -0
  147. package/types/{parts → exported-related}/system-message/index.d.ts +0 -0
  148. package/types/{parts → exported-related}/system-message/props.d.ts +0 -0
  149. package/types/{parts → exported-related}/system-message/style.d.ts +0 -0
  150. package/types/exported-related/tile-button/TileButton.d.ts +5 -0
  151. package/types/{parts → exported-related}/tile-button/index.d.ts +0 -0
  152. package/types/exported-related/tile-button/props.d.ts +46 -0
  153. package/types/{parts → exported-related}/tile-button/styled.d.ts +1 -1
  154. package/types/index.d.ts +4 -13
  155. package/types/parts/chat-composer/ChatContainerComposer.d.ts +4 -59
  156. package/types/parts/chat-composer/styled.d.ts +4 -3
  157. package/types/parts/chat-container/ChatContainer.d.ts +4 -62
  158. package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +4 -47
  159. package/types/parts/chat-container-messages-list/index.d.ts +1 -1
  160. package/types/parts/chat-container-messages-list/styled.d.ts +2 -2
  161. package/types/parts/chat-container-messages-list/useGetNewMessages.d.ts +2 -0
  162. package/types/parts/index.d.ts +3 -0
  163. package/types/react-desc-prop-types.d.ts +838 -0
  164. package/cjs/index.d.js +0 -2
  165. package/cjs/parts/bubble/config/useValidateProps.js +0 -31
  166. package/cjs/parts/bubble/props.js +0 -57
  167. package/cjs/parts/chat-card/config/useValidateProps.js +0 -11
  168. package/cjs/parts/chat-card/props.js +0 -14
  169. package/cjs/parts/chat-composer/config/useValidateProps.js +0 -11
  170. package/cjs/parts/chat-composer/props.js +0 -44
  171. package/cjs/parts/chat-container/config/useValidateProps.js +0 -11
  172. package/cjs/parts/chat-container/index.js +0 -10
  173. package/cjs/parts/chat-container/props.js +0 -49
  174. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +0 -11
  175. package/cjs/parts/chat-container-messages-list/props.js +0 -30
  176. package/cjs/parts/chat-empty-state/config/useValidateProps.js +0 -11
  177. package/cjs/parts/chat-empty-state/props.js +0 -17
  178. package/cjs/parts/chat-sidebar/config/useValidateProps.js +0 -11
  179. package/cjs/parts/message-delimiter/MessageDelimiter.js +0 -41
  180. package/cjs/parts/message-delimiter/config/useValidateProps.js +0 -11
  181. package/cjs/parts/message-delimiter/props.js +0 -23
  182. package/cjs/parts/sidebar-button/props.js +0 -30
  183. package/cjs/parts/system-message/config/useValidateProps.js +0 -11
  184. package/cjs/parts/tile-button/config/useValidateProps.js +0 -11
  185. package/cjs/parts/tile-button/props.js +0 -55
  186. package/cjs/prop-types.js +0 -33
  187. package/esm/index.d.js +0 -1
  188. package/esm/parts/bubble/config/useValidateProps.js +0 -27
  189. package/esm/parts/chat-card/config/useValidateProps.js +0 -7
  190. package/esm/parts/chat-composer/config/useValidateProps.js +0 -7
  191. package/esm/parts/chat-composer/props.js +0 -39
  192. package/esm/parts/chat-container/config/useValidateProps.js +0 -7
  193. package/esm/parts/chat-container/index.js +0 -1
  194. package/esm/parts/chat-container/props.js +0 -44
  195. package/esm/parts/chat-container-messages-list/config/useValidateProps.js +0 -7
  196. package/esm/parts/chat-container-messages-list/props.js +0 -25
  197. package/esm/parts/chat-empty-state/config/useValidateProps.js +0 -7
  198. package/esm/parts/chat-empty-state/props.js +0 -12
  199. package/esm/parts/chat-sidebar/config/useValidateProps.js +0 -7
  200. package/esm/parts/floating-button/FloatingButton.js +0 -27
  201. package/esm/parts/floating-button/index.js +0 -1
  202. package/esm/parts/message-delimiter/MessageDelimiter.js +0 -32
  203. package/esm/parts/message-delimiter/config/useValidateProps.js +0 -7
  204. package/esm/parts/message-delimiter/props.js +0 -18
  205. package/esm/parts/system-message/config/useValidateProps.js +0 -7
  206. package/esm/parts/tile-button/config/useValidateProps.js +0 -7
  207. package/esm/prop-types.js +0 -28
  208. package/types/index.d.d.ts +0 -37
  209. package/types/parts/bubble/ChatBubble.d.ts +0 -30
  210. package/types/parts/bubble/config/useValidateProps.d.ts +0 -2
  211. package/types/parts/bubble/props.d.ts +0 -52
  212. package/types/parts/chat-card/ChatCard.d.ts +0 -33
  213. package/types/parts/chat-card/config/useValidateProps.d.ts +0 -2
  214. package/types/parts/chat-card/props.d.ts +0 -29
  215. package/types/parts/chat-composer/config/useValidateProps.d.ts +0 -2
  216. package/types/parts/chat-container/config/useValidateProps.d.ts +0 -2
  217. package/types/parts/chat-container/index.d.ts +0 -1
  218. package/types/parts/chat-container-header/ChatContainerHeader.d.ts +0 -2
  219. package/types/parts/chat-container-messages-list/config/useValidateProps.d.ts +0 -2
  220. package/types/parts/chat-empty-state/ChatEmptyState.d.ts +0 -21
  221. package/types/parts/chat-empty-state/config/useValidateProps.d.ts +0 -2
  222. package/types/parts/chat-empty-state/props.d.ts +0 -15
  223. package/types/parts/chat-sidebar/SideBarChat.d.ts +0 -48
  224. package/types/parts/chat-sidebar/config/useValidateProps.d.ts +0 -2
  225. package/types/parts/floating-button/FloatingButton.d.ts +0 -18
  226. package/types/parts/floating-container/styled.d.ts +0 -1
  227. package/types/parts/message-delimiter/MessageDelimiter.d.ts +0 -31
  228. package/types/parts/message-delimiter/config/useValidateProps.d.ts +0 -2
  229. package/types/parts/message-delimiter/props.d.ts +0 -26
  230. package/types/parts/sidebar-button/SidebarButton.d.ts +0 -24
  231. package/types/parts/sidebar-button/props.d.ts +0 -29
  232. package/types/parts/system-message/SystemMessage.d.ts +0 -23
  233. package/types/parts/system-message/config/useValidateProps.d.ts +0 -2
  234. package/types/parts/tile-button/TileButton.d.ts +0 -75
  235. package/types/parts/tile-button/config/useValidateProps.d.ts +0 -2
  236. package/types/parts/tile-button/props.d.ts +0 -88
  237. package/types/prop-types.d.ts +0 -33
@@ -1,39 +0,0 @@
1
- import { PropTypes } from 'react-desc';
2
- import { noop } from 'lodash';
3
-
4
- const defaultComposerPros = {
5
- placeholder: 'Type your message',
6
- inputValue: '',
7
- ariaMaxLengthMessage: '',
8
- onChange: noop,
9
- onResize: noop,
10
- onSend: noop,
11
- onFocus: noop,
12
- onBlur: noop,
13
- onKeyDown: noop,
14
- maxHeight: 0,
15
- inputMaxLength: undefined,
16
- maxLengthMessage: undefined,
17
- buttonDisabled: false,
18
- dataTestid: 'ds-chat-composer',
19
- actionRef: noop
20
- };
21
- const composerProps = {
22
- placeholder: PropTypes.string.description('Input Placeholder').defaultValue(defaultComposerPros.placeholder),
23
- inputValue: PropTypes.string.description('Input value').defaultValue(defaultComposerPros.inputValue),
24
- ariaMaxLengthMessage: PropTypes.string.description('Aria message for Max length message when exceeded').defaultValue(defaultComposerPros.maxLengthMessage),
25
- maxLengthMessage: PropTypes.string.description('Max length message').defaultValue(defaultComposerPros.maxLengthMessage),
26
- onChange: PropTypes.func.description('Called when the user types').defaultValue(defaultComposerPros.onChange),
27
- onResize: PropTypes.func.description('Called the input changes his height').defaultValue(defaultComposerPros.onResize),
28
- onSend: PropTypes.func.description('Called when the click send').defaultValue(defaultComposerPros.onSend),
29
- onFocus: PropTypes.func.description('Input focus').defaultValue(defaultComposerPros.onFocus),
30
- onBlur: PropTypes.func.description('Input blur').defaultValue(defaultComposerPros.onBlur),
31
- onKeyDown: PropTypes.func.description('Input on key down').defaultValue(defaultComposerPros.onKeyDown),
32
- maxHeight: PropTypes.number.description('Max height of the composer. Use 0 for no limit').defaultValue(defaultComposerPros.onBlur),
33
- inputMaxLength: PropTypes.number.description('Max length of the composer. `undefined` for no limit').defaultValue(defaultComposerPros.inputMaxLength),
34
- buttonDisabled: PropTypes.bool.description('Control the disabled for the send button').defaultValue(defaultComposerPros.buttonDisabled),
35
- dataTestid: PropTypes.string.description('Data testid').defaultValue(defaultComposerPros.placeholder),
36
- actionRef: PropTypes.object.description("Reference: \n { \n scrollToIndex: (n: number) => void,\n getMessagesInView: () => number[],\n focusToIndex: (n: number) => void,\n focusToList: () => void,\n focusToComposer: () => void,\n focusToSend: () => void,\n }\n \n ").defaultValue(defaultComposerPros.actionRef)
37
- };
38
-
39
- export { composerProps, defaultComposerPros };
@@ -1,7 +0,0 @@
1
- import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
2
-
3
- const useValidateProps = (props, propTypes) => {
4
- useValidateTypescriptPropTypes(props, propTypes);
5
- };
6
-
7
- export { useValidateProps };
@@ -1 +0,0 @@
1
- export { ChatContainer, ChatContainerWithSchema } from './ChatContainer.js';
@@ -1,44 +0,0 @@
1
- import { PropTypes } from 'react-desc';
2
- import { noop } from 'lodash';
3
- import { BANNER_TYPES } from '@elliemae/ds-banner';
4
- import { defaultProps as defaultProps$1 } from '../chat-container-messages-list/props.js';
5
- import { defaultComposerPros } from '../chat-composer/props.js';
6
-
7
- const defaultProps = {
8
- messagesListProps: defaultProps$1,
9
- composerProps: defaultComposerPros,
10
- actionRef: undefined,
11
- autoScroll: false,
12
- device: 'desktop',
13
- isLoading: undefined,
14
- hasMoreItems: undefined,
15
- getMoreMessages: noop,
16
- bannerPosition: undefined,
17
- bannerProps: {
18
- type: BANNER_TYPES.INFO,
19
- label: 'Unread Messages',
20
- viewLabel: 'View',
21
- onView: noop,
22
- onClose: noop
23
- },
24
- sendingMessages: undefined,
25
- sendingText: 'Sending',
26
- ariaLabel: 'Chat window'
27
- };
28
- const containerProps = {
29
- messagesListProps: PropTypes.object.description('ChatMessageList props "messages" / "onScrollEnds"').defaultValue(defaultProps.messagesListProps),
30
- composerProps: PropTypes.object.description('Composer configuration').defaultValue(defaultProps.composerProps),
31
- autoScroll: PropTypes.bool.description('Auto scroll to bottom on resize').defaultValue(defaultProps.autoScroll),
32
- device: PropTypes.string.description('Option to render mobile or desktop style composer').defaultValue(defaultProps.device),
33
- isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Loading messages indicator at the `top` or `bottom` of the container'),
34
- hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Load More button at the `top` or `bottom` of the container'),
35
- getMoreMessages: PropTypes.func.description('Called when the user clicks on load more').defaultValue(defaultProps.getMoreMessages),
36
- bannerPosition: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Loading messages indicator at the `top` or `bottom` of the container'),
37
- bannerProps: PropTypes.object.description("Banner configuration:\n label: string;\n viewLabel: string;\n type: BANNER_TYPES;\n onView: () => void;\n onClose: () => void;\n ").defaultValue(defaultProps.bannerProps),
38
- sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]).description('Array of ids of sending messages').defaultValue(defaultProps.sendingMessages),
39
- sendingText: PropTypes.string.description('Label description for messages in sending status').defaultValue(defaultProps.sendingText),
40
- actionRef: PropTypes.object.description("Reference: \n { \n scrollToIndex: (n: number) => void,\n getMessagesInView: () => number[],\n focusToIndex: (n: number) => void,\n focusToList: () => void,\n focusToComposer: () => void,\n focusToSend: () => void,\n }\n \n ").defaultValue(defaultProps.actionRef),
41
- ariaLabel: PropTypes.string.description('Aria Label description for chat container').defaultValue(defaultProps.ariaLabel)
42
- };
43
-
44
- export { containerProps, defaultProps };
@@ -1,7 +0,0 @@
1
- import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
2
-
3
- const useValidateProps = (props, propTypes) => {
4
- useValidateTypescriptPropTypes(props, propTypes);
5
- };
6
-
7
- export { useValidateProps };
@@ -1,25 +0,0 @@
1
- import { PropTypes } from 'react-desc';
2
- import { noop } from 'lodash';
3
-
4
- const defaultProps = {
5
- messages: [],
6
- actionRef: noop,
7
- onScrollEnds: () => [],
8
- getMoreMessages: noop,
9
- sendingMessages: undefined,
10
- sendingText: 'Sending',
11
- bannerPosition: undefined,
12
- bannerRef: undefined
13
- };
14
- const listProps = {
15
- messages: PropTypes.arrayOf(PropTypes.object).description('The array of out-of-the-box items you want to render inside the ChatMessageList').defaultValue(defaultProps.messages),
16
- actionRef: PropTypes.object.description("Reference: \n { \n scrollToIndex: (n: number) => void,\n getMessagesInView: () => number[],\n focusToIndex: (n: number) => void,\n focusToIndexWithoutScroll: (n: number) => void,\n focusToList: () => void,\n focusToComposer: () => void,\n focusToSend: () => void,\n }\n \n ").defaultValue(defaultProps.actionRef),
17
- onScrollEnds: PropTypes.func.description("Called when the scroll stops."),
18
- isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description('Keeps the load more space while the loading is in progress'),
19
- hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Load More button at the `top` or `bottom` of the container'),
20
- getMoreMessages: PropTypes.func.description('Called when the user clicks on load more').defaultValue(defaultProps.getMoreMessages),
21
- sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]).description('Array of ids of sending messages').defaultValue(defaultProps.sendingMessages),
22
- sendingText: PropTypes.string.description('Label description for messages in sending status').defaultValue(defaultProps.sendingText)
23
- };
24
-
25
- export { defaultProps, listProps };
@@ -1,7 +0,0 @@
1
- import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
2
-
3
- const useValidateProps = (props, schema) => {
4
- useValidatePropTypes(props, schema);
5
- };
6
-
7
- export { useValidateProps };
@@ -1,12 +0,0 @@
1
- import { PropTypes } from 'react-desc';
2
-
3
- const defaultProps = {
4
- label: 'No Messages Yet',
5
- action: null
6
- };
7
- const emptyStateProps = {
8
- label: PropTypes.arrayOf(PropTypes.string).description('No Message to show text helper').defaultValue(defaultProps.label),
9
- action: PropTypes.node.description('action element').defaultValue(defaultProps.action)
10
- };
11
-
12
- export { defaultProps, emptyStateProps };
@@ -1,7 +0,0 @@
1
- import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
2
-
3
- const useValidateProps = (props, schema) => {
4
- useValidatePropTypes(props, schema);
5
- };
6
-
7
- export { useValidateProps };
@@ -1,27 +0,0 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'react';
3
- import { Comments } from '@elliemae/ds-icons';
4
- import { StyledFloatingButton } from './styled.js';
5
- import { defaultFloatingButton } from './props.js';
6
- import { jsx } from 'react/jsx-runtime';
7
-
8
- var _Comments;
9
- const FloatingButton = _ref => {
10
- let {
11
- onClick,
12
- onFocus,
13
- innerRef
14
- } = _ref;
15
- return /*#__PURE__*/jsx(StyledFloatingButton, {
16
- onFocus: onFocus,
17
- ref: innerRef,
18
- "data-testid": "chat-floating-button",
19
- onClick: onClick,
20
- children: _Comments || (_Comments = /*#__PURE__*/_jsx(Comments, {
21
- size: "l"
22
- }))
23
- });
24
- };
25
- FloatingButton.defaultProps = defaultFloatingButton;
26
-
27
- export { FloatingButton };
@@ -1 +0,0 @@
1
- export { FloatingButton } from './FloatingButton.js';
@@ -1,32 +0,0 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'core-js/modules/web.url.to-json.js';
3
- import 'react';
4
- import { describe } from 'react-desc';
5
- import { Wrapper, Line, Text } from './styled.js';
6
- import { messageDelimiterProps, defaultProps } from './props.js';
7
- import { useValidateProps } from './config/useValidateProps.js';
8
-
9
- var _Line, _Line2;
10
-
11
- const MessageDelimiter = props => {
12
- useValidateProps(props, MessageDelimiterWithSchema.toJSON());
13
- const {
14
- title,
15
- size,
16
- extraProps,
17
- verticalMargin
18
- } = props;
19
- return /*#__PURE__*/_jsx(Wrapper, {
20
- cols: ['1fr', 'auto', '1fr']
21
- }, void 0, _Line || (_Line = /*#__PURE__*/_jsx(Line, {})), /*#__PURE__*/_jsx(Text, {
22
- size: size,
23
- verticalMargin: verticalMargin,
24
- "data-testid": extraProps['data-testid']
25
- }, void 0, title), _Line2 || (_Line2 = /*#__PURE__*/_jsx(Line, {})));
26
- };
27
-
28
- MessageDelimiter.defaultProps = defaultProps;
29
- const MessageDelimiterWithSchema = describe(MessageDelimiter);
30
- MessageDelimiterWithSchema.propTypes = messageDelimiterProps;
31
-
32
- export { MessageDelimiter, MessageDelimiterWithSchema };
@@ -1,7 +0,0 @@
1
- import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
2
-
3
- const useValidateProps = (props, schema) => {
4
- useValidatePropTypes(props, schema);
5
- };
6
-
7
- export { useValidateProps };
@@ -1,18 +0,0 @@
1
- import { PropTypes } from 'react-desc';
2
-
3
- const defaultProps = {
4
- title: '',
5
- size: 's',
6
- verticalMargin: '0px',
7
- extraProps: {
8
- 'data-testid': 'chat-message-delimiter-title'
9
- }
10
- };
11
- const messageDelimiterProps = {
12
- title: PropTypes.string.isRequired.description('Text to display in the delimiter'),
13
- size: PropTypes.oneOf(['s', 'l']).description('size of the delimiter').defaultValue('s'),
14
- extraProps: PropTypes.object.description('extra props for delimiter'),
15
- verticalMargin: PropTypes.oneOf(['string', 'number']).description('Configurable css vertical margin property for flexibilty')
16
- };
17
-
18
- export { defaultProps, messageDelimiterProps };
@@ -1,7 +0,0 @@
1
- import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
2
-
3
- const useValidateProps = (props, schema) => {
4
- useValidatePropTypes(props, schema);
5
- };
6
-
7
- export { useValidateProps };
@@ -1,7 +0,0 @@
1
- import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
2
-
3
- const useValidateProps = (props, schema) => {
4
- useValidatePropTypes(props, schema);
5
- };
6
-
7
- export { useValidateProps };
package/esm/prop-types.js DELETED
@@ -1,28 +0,0 @@
1
- import { PropTypes } from 'react-desc';
2
- import { noop } from 'lodash';
3
-
4
- const defaultProps = {
5
- expanded: false,
6
- expandedWidth: 348,
7
- openedItem: undefined,
8
- onFooterExpand: noop,
9
- onFooterClose: noop,
10
- floating: false,
11
- onHeaderExpand: noop,
12
- onHeaderClose: noop,
13
- title: 'Header Title'
14
- };
15
- const chatProps = {
16
- containerProps: PropTypes.shape({}).defaultValue({}),
17
- expanded: PropTypes.bool.description('Whether to show the chat expanded or collapsed').defaultValue(defaultProps.expanded),
18
- expandedWidth: PropTypes.number.description('Total width attached to the expanded Chat').defaultValue(defaultProps.expandedWidth),
19
- openedItem: PropTypes.string.description('The id of the chat item you want to be opened').defaultValue(defaultProps.openedItem),
20
- messages: PropTypes.arrayOf(PropTypes.object).description('The array of out-of-the-box items you want to render inside the container list of the chat').defaultValue(defaultProps.openedItem),
21
- onFooterExpand: PropTypes.func.description('The function to call when the chat is opened via the footer').defaultValue(defaultProps.onFooterExpand),
22
- onFooterClose: PropTypes.func.description('The function to call when the chat is closed via the footer').defaultValue(defaultProps.onFooterClose),
23
- onHeaderExpand: PropTypes.func.description('The function to call when the chat is opened via the header').defaultValue(defaultProps.onHeaderExpand),
24
- onHeaderClose: PropTypes.func.description('The function to call when the chat is closed via the header').defaultValue(defaultProps.onHeaderClose),
25
- floating: PropTypes.bool.description('Whether to show the chat as floating chat or not').defaultValue(defaultProps.floating)
26
- };
27
-
28
- export { chatProps, defaultProps };
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
- import { VirtualItem } from 'react-virtual';
3
- export declare type TypescriptVirtualListHelpers = {
4
- virtualItems: VirtualItem[];
5
- totalSize: number;
6
- scrollToOffset: (index: number, options?: {
7
- align: 'start' | 'center' | 'end' | 'auto';
8
- }) => void;
9
- scrollToIndex: (index: number, options?: {
10
- align: 'start' | 'center' | 'end' | 'auto';
11
- }) => void;
12
- measure: () => void;
13
- } | null;
14
- export interface ChatProps {
15
- expanded: boolean;
16
- expandedWidth: number;
17
- openedItem?: string | number;
18
- onFooterExpand: () => void;
19
- onFooterClose: () => void;
20
- onHeaderExpand: () => void;
21
- onHeaderClose: () => void;
22
- floating?: boolean;
23
- title: string;
24
- }
25
- export interface UseChatConfig {
26
- props: ChatProps;
27
- }
28
- export interface UseChatAPI {
29
- props: ChatProps;
30
- virtualListHelpers: TypescriptVirtualListHelpers;
31
- virtualListRef: React.RefObject<HTMLElement>;
32
- }
33
- export interface HeaderContainerListProps extends Pick<ChatProps, 'expanded' | 'onHeaderClose' | 'onHeaderExpand' | 'floating'> {
34
- title: string;
35
- }
36
- export interface ComposerContainerProps extends Pick<ChatProps, 'floating'> {
37
- }
@@ -1,30 +0,0 @@
1
- /// <reference path="../../../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- import { BubbleProps } from './props';
4
- declare const ChatBubble: {
5
- (props: BubbleProps): JSX.Element;
6
- propTypes: {
7
- dsId: {
8
- deprecated: import("react-desc").PropTypesDescValidator;
9
- };
10
- type: any;
11
- title: any;
12
- time: any;
13
- body: any;
14
- onClick: {
15
- deprecated: import("react-desc").PropTypesDescValidator;
16
- };
17
- errorMessage: {
18
- deprecated: import("react-desc").PropTypesDescValidator;
19
- };
20
- helpMessage: {
21
- deprecated: import("react-desc").PropTypesDescValidator;
22
- };
23
- };
24
- };
25
- declare const ChatBubbleWithSchema: {
26
- (props?: unknown): JSX.Element;
27
- propTypes: unknown;
28
- toTypescript: () => import("react-desc").TypescriptSchema;
29
- };
30
- export { ChatBubble, ChatBubbleWithSchema };
@@ -1,2 +0,0 @@
1
- import { BubbleProps } from '../props';
2
- export declare const useValidateProps: (props: BubbleProps, schema: unknown) => void;
@@ -1,52 +0,0 @@
1
- /// <reference path="../../../../../../shared/typings/react-desc.d.ts" />
2
- import React from 'react';
3
- /**
4
- *
5
- * BUBBLE
6
- *
7
- */
8
- export declare const BUBBLE_TYPES: {
9
- SENDER: string;
10
- RECIPIENT: string;
11
- DELIMITER: string;
12
- SYSTEM: string;
13
- };
14
- export declare type BubbleTypesKeys = keyof typeof BUBBLE_TYPES;
15
- export declare type BubbleTypesValues = typeof BUBBLE_TYPES[BubbleTypesKeys];
16
- export interface BubbleProps {
17
- dsId: string | number;
18
- type: BubbleTypesValues;
19
- title: string;
20
- body: string;
21
- time: string;
22
- errorMessage: string | React.ReactChild;
23
- helpMessage: string | React.ReactChild;
24
- onClick: (id: string | number) => void;
25
- }
26
- export declare const defaultBubbleProps: BubbleProps;
27
- export declare const propsBubbles: {
28
- dsId: {
29
- deprecated: import("react-desc").PropTypesDescValidator;
30
- };
31
- type: any;
32
- title: any;
33
- time: any;
34
- body: any;
35
- onClick: {
36
- deprecated: import("react-desc").PropTypesDescValidator;
37
- };
38
- errorMessage: {
39
- deprecated: import("react-desc").PropTypesDescValidator;
40
- };
41
- helpMessage: {
42
- deprecated: import("react-desc").PropTypesDescValidator;
43
- };
44
- };
45
- /**
46
- *
47
- * BUBBLE ARROW
48
- *
49
- */
50
- export declare const propsArrowBubble: {
51
- type: any;
52
- };
@@ -1,33 +0,0 @@
1
- /// <reference path="../../../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- import { CardPropTypes } from './props';
4
- declare const ChatCard: {
5
- (props: CardPropTypes): JSX.Element;
6
- propTypes: {
7
- title: any;
8
- content: {
9
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
10
- deprecated: import("react-desc").PropTypesDescValidator;
11
- };
12
- isRequired: import("react-desc").PropTypesDescValue;
13
- };
14
- time: {
15
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
16
- deprecated: import("react-desc").PropTypesDescValidator;
17
- };
18
- isRequired: import("react-desc").PropTypesDescValue;
19
- };
20
- rightAddon: {
21
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
22
- deprecated: import("react-desc").PropTypesDescValidator;
23
- };
24
- isRequired: import("react-desc").PropTypesDescValue;
25
- };
26
- };
27
- };
28
- declare const ChatCardWithSchema: {
29
- (props?: unknown): JSX.Element;
30
- propTypes: unknown;
31
- toTypescript: () => import("react-desc").TypescriptSchema;
32
- };
33
- export { ChatCard, ChatCardWithSchema };
@@ -1,2 +0,0 @@
1
- import { CardPropTypes } from '../props';
2
- export declare const useValidateProps: (props: CardPropTypes, schema: unknown) => void;
@@ -1,29 +0,0 @@
1
- /// <reference path="../../../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- export declare const propTypes: {
4
- title: any;
5
- content: {
6
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
7
- deprecated: import("react-desc").PropTypesDescValidator;
8
- };
9
- isRequired: import("react-desc").PropTypesDescValue;
10
- };
11
- time: {
12
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
13
- deprecated: import("react-desc").PropTypesDescValidator;
14
- };
15
- isRequired: import("react-desc").PropTypesDescValue;
16
- };
17
- rightAddon: {
18
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
19
- deprecated: import("react-desc").PropTypesDescValidator;
20
- };
21
- isRequired: import("react-desc").PropTypesDescValue;
22
- };
23
- };
24
- export interface CardPropTypes {
25
- title: string;
26
- content: string;
27
- time: string;
28
- rightAddon: JSX.Element;
29
- }
@@ -1,2 +0,0 @@
1
- import { ChatComposerProps } from '../props';
2
- export declare const useValidateProps: (props: ChatComposerProps, schema: unknown) => void;
@@ -1,2 +0,0 @@
1
- import { ChatContainerProps } from '../props';
2
- export declare const useValidateProps: (props: ChatContainerProps, propTypes: unknown) => void;
@@ -1 +0,0 @@
1
- export { ChatContainer, ChatContainerWithSchema } from './ChatContainer';
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const ChatContainerHeader: React.ComponentType;
@@ -1,2 +0,0 @@
1
- import { ChatContainerMessagesListProps } from '../props';
2
- export declare const useValidateProps: (props: ChatContainerMessagesListProps, propTypes: unknown) => void;
@@ -1,21 +0,0 @@
1
- /// <reference path="../../../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- import { ChatEmptyStateProps } from './props';
4
- declare const ChatEmptyState: {
5
- (props: ChatEmptyStateProps): JSX.Element;
6
- propTypes: {
7
- label: {
8
- deprecated: import("react-desc").PropTypesDescValidator;
9
- };
10
- action: {
11
- deprecated: import("react-desc").PropTypesDescValidator;
12
- };
13
- };
14
- defaultProps: ChatEmptyStateProps;
15
- };
16
- declare const ChatEmptyStateListWithSchema: {
17
- (props?: unknown): JSX.Element;
18
- propTypes: unknown;
19
- toTypescript: () => import("react-desc").TypescriptSchema;
20
- };
21
- export { ChatEmptyState, ChatEmptyStateListWithSchema };
@@ -1,2 +0,0 @@
1
- import { ChatEmptyStateProps } from '../props';
2
- export declare const useValidateProps: (props: ChatEmptyStateProps, schema: unknown) => void;
@@ -1,15 +0,0 @@
1
- /// <reference path="../../../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- export interface ChatEmptyStateProps {
4
- label: string;
5
- action: React.FC;
6
- }
7
- export declare const defaultProps: ChatEmptyStateProps;
8
- export declare const emptyStateProps: {
9
- label: {
10
- deprecated: import("react-desc").PropTypesDescValidator;
11
- };
12
- action: {
13
- deprecated: import("react-desc").PropTypesDescValidator;
14
- };
15
- };
@@ -1,48 +0,0 @@
1
- /// <reference path="../../../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- import { CharSidebarProps } from './props';
4
- declare const SideBarChat: {
5
- (props: CharSidebarProps): JSX.Element;
6
- propTypes: {
7
- sidebarItems: {
8
- deprecated: import("react-desc").PropTypesDescValidator;
9
- };
10
- expanded: {
11
- deprecated: import("react-desc").PropTypesDescValidator;
12
- };
13
- selectedItem: {
14
- deprecated: import("react-desc").PropTypesDescValidator;
15
- };
16
- tooltipPlacement: {
17
- deprecated: import("react-desc").PropTypesDescValidator;
18
- };
19
- enableTooltipWhenIsClosed: {
20
- deprecated: import("react-desc").PropTypesDescValidator;
21
- };
22
- onFooterExpand: {
23
- deprecated: import("react-desc").PropTypesDescValidator;
24
- };
25
- onFooterClose: {
26
- deprecated: import("react-desc").PropTypesDescValidator;
27
- };
28
- onHeaderExpand: {
29
- deprecated: import("react-desc").PropTypesDescValidator;
30
- };
31
- onHeaderClose: {
32
- deprecated: import("react-desc").PropTypesDescValidator;
33
- };
34
- footerButtonExtraProps: {
35
- deprecated: import("react-desc").PropTypesDescValidator;
36
- };
37
- actionRef: {
38
- deprecated: import("react-desc").PropTypesDescValidator;
39
- };
40
- };
41
- defaultProps: CharSidebarProps;
42
- };
43
- declare const SideBarChatWithSchema: {
44
- (props?: unknown): JSX.Element;
45
- propTypes: unknown;
46
- toTypescript: () => import("react-desc").TypescriptSchema;
47
- };
48
- export { SideBarChat, SideBarChatWithSchema };
@@ -1,2 +0,0 @@
1
- import { CharSidebarProps } from '../props';
2
- export declare const useValidateProps: (props: CharSidebarProps, schema: unknown) => void;
@@ -1,18 +0,0 @@
1
- /// <reference path="../../../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- import { FloatingButtonProps } from './props';
4
- export declare const FloatingButton: {
5
- ({ onClick, onFocus, innerRef }: FloatingButtonProps): JSX.Element;
6
- propTypes: {
7
- onClick: {
8
- deprecated: import("react-desc").PropTypesDescValidator;
9
- };
10
- onFocus: {
11
- deprecated: import("react-desc").PropTypesDescValidator;
12
- };
13
- innerRef: {
14
- deprecated: import("react-desc").PropTypesDescValidator;
15
- };
16
- };
17
- defaultProps: FloatingButtonProps;
18
- };
@@ -1 +0,0 @@
1
- export declare const StyledFloatingContainer: import("styled-components").StyledComponent<any, import("styled-components").DefaultTheme, object, string | number | symbol>;