@elliemae/ds-chat 2.2.0 → 2.3.0-alpha.3

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 (282) hide show
  1. package/cjs/ChatDataTestids.js +54 -26
  2. package/cjs/ChatDataTestids.js.map +7 -0
  3. package/cjs/index.d.js +27 -2
  4. package/cjs/index.d.js.map +7 -0
  5. package/cjs/index.js +69 -44
  6. package/cjs/index.js.map +7 -0
  7. package/cjs/parts/bubble/ChatBubble.js +74 -64
  8. package/cjs/parts/bubble/ChatBubble.js.map +7 -0
  9. package/cjs/parts/bubble/ChatBubbleArrow.js +96 -79
  10. package/cjs/parts/bubble/ChatBubbleArrow.js.map +7 -0
  11. package/cjs/parts/bubble/config/useValidateProps.js +47 -24
  12. package/cjs/parts/bubble/config/useValidateProps.js.map +7 -0
  13. package/cjs/parts/bubble/index.js +38 -12
  14. package/cjs/parts/bubble/index.js.map +7 -0
  15. package/cjs/parts/bubble/props.js +60 -48
  16. package/cjs/parts/bubble/props.js.map +7 -0
  17. package/cjs/parts/bubble/styled.js +141 -48
  18. package/cjs/parts/bubble/styled.js.map +7 -0
  19. package/cjs/parts/chat-card/ChatCard.js +55 -39
  20. package/cjs/parts/chat-card/ChatCard.js.map +7 -0
  21. package/cjs/parts/chat-card/config/useValidateProps.js +36 -9
  22. package/cjs/parts/chat-card/config/useValidateProps.js.map +7 -0
  23. package/cjs/parts/chat-card/index.js +36 -10
  24. package/cjs/parts/chat-card/index.js.map +7 -0
  25. package/cjs/parts/chat-card/props.js +39 -12
  26. package/cjs/parts/chat-card/props.js.map +7 -0
  27. package/cjs/parts/chat-card/styled.js +71 -36
  28. package/cjs/parts/chat-card/styled.js.map +7 -0
  29. package/cjs/parts/chat-composer/ChatContainerComposer.js +92 -99
  30. package/cjs/parts/chat-composer/ChatContainerComposer.js.map +7 -0
  31. package/cjs/parts/chat-composer/config/useValidateProps.js +36 -9
  32. package/cjs/parts/chat-composer/config/useValidateProps.js.map +7 -0
  33. package/cjs/parts/chat-composer/index.js +36 -10
  34. package/cjs/parts/chat-composer/index.js.map +7 -0
  35. package/cjs/parts/chat-composer/props.js +73 -38
  36. package/cjs/parts/chat-composer/props.js.map +7 -0
  37. package/cjs/parts/chat-composer/styled.js +102 -34
  38. package/cjs/parts/chat-composer/styled.js.map +7 -0
  39. package/cjs/parts/chat-container/ChatContainer.js +122 -140
  40. package/cjs/parts/chat-container/ChatContainer.js.map +7 -0
  41. package/cjs/parts/chat-container/config/useValidateProps.js +36 -9
  42. package/cjs/parts/chat-container/config/useValidateProps.js.map +7 -0
  43. package/cjs/parts/chat-container/index.js +36 -10
  44. package/cjs/parts/chat-container/index.js.map +7 -0
  45. package/cjs/parts/chat-container/props.js +85 -42
  46. package/cjs/parts/chat-container/props.js.map +7 -0
  47. package/cjs/parts/chat-container/styled.js +104 -23
  48. package/cjs/parts/chat-container/styled.js.map +7 -0
  49. package/cjs/parts/chat-container-header/ChatContainerHeader.js +48 -30
  50. package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +7 -0
  51. package/cjs/parts/chat-container-header/helpers.js +38 -25
  52. package/cjs/parts/chat-container-header/helpers.js.map +7 -0
  53. package/cjs/parts/chat-container-header/styled.js +59 -24
  54. package/cjs/parts/chat-container-header/styled.js.map +7 -0
  55. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +163 -225
  56. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +7 -0
  57. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +36 -9
  58. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +7 -0
  59. package/cjs/parts/chat-container-messages-list/index.js +36 -10
  60. package/cjs/parts/chat-container-messages-list/index.js.map +7 -0
  61. package/cjs/parts/chat-container-messages-list/props.js +62 -24
  62. package/cjs/parts/chat-container-messages-list/props.js.map +7 -0
  63. package/cjs/parts/chat-container-messages-list/styled.js +100 -38
  64. package/cjs/parts/chat-container-messages-list/styled.js.map +7 -0
  65. package/cjs/parts/chat-empty-state/ChatEmptyState.js +58 -42
  66. package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +7 -0
  67. package/cjs/parts/chat-empty-state/config/useValidateProps.js +36 -9
  68. package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +7 -0
  69. package/cjs/parts/chat-empty-state/props.js +39 -12
  70. package/cjs/parts/chat-empty-state/props.js.map +7 -0
  71. package/cjs/parts/chat-empty-state/styled.js +47 -21
  72. package/cjs/parts/chat-empty-state/styled.js.map +7 -0
  73. package/cjs/parts/chat-sidebar/SideBarChat.js +82 -81
  74. package/cjs/parts/chat-sidebar/SideBarChat.js.map +7 -0
  75. package/cjs/parts/chat-sidebar/config/useValidateProps.js +36 -9
  76. package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +7 -0
  77. package/cjs/parts/chat-sidebar/index.js +36 -10
  78. package/cjs/parts/chat-sidebar/index.js.map +7 -0
  79. package/cjs/parts/chat-sidebar/props.js +72 -30
  80. package/cjs/parts/chat-sidebar/props.js.map +7 -0
  81. package/cjs/parts/chat-sidebar/styled.js +56 -20
  82. package/cjs/parts/chat-sidebar/styled.js.map +7 -0
  83. package/cjs/parts/floating-button/FloatingButton.js +47 -34
  84. package/cjs/parts/floating-button/FloatingButton.js.map +7 -0
  85. package/cjs/parts/floating-button/index.js +28 -9
  86. package/cjs/parts/floating-button/index.js.map +7 -0
  87. package/cjs/parts/floating-button/props.js +42 -15
  88. package/cjs/parts/floating-button/props.js.map +7 -0
  89. package/cjs/parts/floating-button/styled.js +63 -17
  90. package/cjs/parts/floating-button/styled.js.map +7 -0
  91. package/cjs/parts/floating-container/styled.js +47 -17
  92. package/cjs/parts/floating-container/styled.js.map +7 -0
  93. package/cjs/parts/grid-influencer/InfluencerContainer.js +41 -21
  94. package/cjs/parts/grid-influencer/InfluencerContainer.js.map +7 -0
  95. package/cjs/parts/grid-influencer/styled.js +56 -21
  96. package/cjs/parts/grid-influencer/styled.js.map +7 -0
  97. package/cjs/parts/message-delimiter/MessageDelimiter.js +53 -39
  98. package/cjs/parts/message-delimiter/MessageDelimiter.js.map +7 -0
  99. package/cjs/parts/message-delimiter/config/useValidateProps.js +36 -9
  100. package/cjs/parts/message-delimiter/config/useValidateProps.js.map +7 -0
  101. package/cjs/parts/message-delimiter/index.js +36 -10
  102. package/cjs/parts/message-delimiter/index.js.map +7 -0
  103. package/cjs/parts/message-delimiter/props.js +44 -19
  104. package/cjs/parts/message-delimiter/props.js.map +7 -0
  105. package/cjs/parts/message-delimiter/styled.js +53 -24
  106. package/cjs/parts/message-delimiter/styled.js.map +7 -0
  107. package/cjs/parts/sidebar-button/SidebarButton.js +52 -53
  108. package/cjs/parts/sidebar-button/SidebarButton.js.map +7 -0
  109. package/cjs/parts/sidebar-button/index.js +20 -2
  110. package/cjs/parts/sidebar-button/index.js.map +7 -0
  111. package/cjs/parts/sidebar-button/props.js +49 -26
  112. package/cjs/parts/sidebar-button/props.js.map +7 -0
  113. package/cjs/parts/sidebar-button/styled.js +68 -24
  114. package/cjs/parts/sidebar-button/styled.js.map +7 -0
  115. package/cjs/parts/system-message/SystemMessage.js +55 -40
  116. package/cjs/parts/system-message/SystemMessage.js.map +7 -0
  117. package/cjs/parts/system-message/config/useValidateProps.js +36 -9
  118. package/cjs/parts/system-message/config/useValidateProps.js.map +7 -0
  119. package/cjs/parts/system-message/index.js +36 -10
  120. package/cjs/parts/system-message/index.js.map +7 -0
  121. package/cjs/parts/system-message/props.js +42 -15
  122. package/cjs/parts/system-message/props.js.map +7 -0
  123. package/cjs/parts/system-message/style.js +75 -32
  124. package/cjs/parts/system-message/style.js.map +7 -0
  125. package/cjs/parts/tile-button/TileButton.js +98 -68
  126. package/cjs/parts/tile-button/TileButton.js.map +7 -0
  127. package/cjs/parts/tile-button/config/useValidateProps.js +36 -9
  128. package/cjs/parts/tile-button/config/useValidateProps.js.map +7 -0
  129. package/cjs/parts/tile-button/index.js +36 -10
  130. package/cjs/parts/tile-button/index.js.map +7 -0
  131. package/cjs/parts/tile-button/props.js +83 -45
  132. package/cjs/parts/tile-button/props.js.map +7 -0
  133. package/cjs/parts/tile-button/styled.js +229 -77
  134. package/cjs/parts/tile-button/styled.js.map +7 -0
  135. package/cjs/prop-types.js +53 -26
  136. package/cjs/prop-types.js.map +7 -0
  137. package/cjs/styled.js +42 -14
  138. package/cjs/styled.js.map +7 -0
  139. package/cjs/tests/utils.js +66 -0
  140. package/cjs/tests/utils.js.map +7 -0
  141. package/esm/ChatDataTestids.js +25 -22
  142. package/esm/ChatDataTestids.js.map +7 -0
  143. package/esm/index.d.js +2 -1
  144. package/esm/index.d.js.map +7 -0
  145. package/esm/index.js +40 -14
  146. package/esm/index.js.map +7 -0
  147. package/esm/parts/bubble/ChatBubble.js +51 -51
  148. package/esm/parts/bubble/ChatBubble.js.map +7 -0
  149. package/esm/parts/bubble/ChatBubbleArrow.js +67 -71
  150. package/esm/parts/bubble/ChatBubbleArrow.js.map +7 -0
  151. package/esm/parts/bubble/config/useValidateProps.js +17 -19
  152. package/esm/parts/bubble/config/useValidateProps.js.map +7 -0
  153. package/esm/parts/bubble/index.js +9 -2
  154. package/esm/parts/bubble/index.js.map +7 -0
  155. package/esm/parts/bubble/props.js +30 -36
  156. package/esm/parts/bubble/props.js.map +7 -0
  157. package/esm/parts/bubble/styled.js +112 -32
  158. package/esm/parts/bubble/styled.js.map +7 -0
  159. package/esm/parts/chat-card/ChatCard.js +23 -27
  160. package/esm/parts/chat-card/ChatCard.js.map +7 -0
  161. package/esm/parts/chat-card/config/useValidateProps.js +6 -4
  162. package/esm/parts/chat-card/config/useValidateProps.js.map +7 -0
  163. package/esm/parts/chat-card/index.js +7 -1
  164. package/esm/parts/chat-card/index.js.map +7 -0
  165. package/esm/parts/chat-card/props.js +10 -8
  166. package/esm/parts/chat-card/props.js.map +7 -0
  167. package/esm/parts/chat-card/styled.js +42 -23
  168. package/esm/parts/chat-card/styled.js.map +7 -0
  169. package/esm/parts/chat-composer/ChatContainerComposer.js +65 -84
  170. package/esm/parts/chat-composer/ChatContainerComposer.js.map +7 -0
  171. package/esm/parts/chat-composer/config/useValidateProps.js +6 -4
  172. package/esm/parts/chat-composer/config/useValidateProps.js.map +7 -0
  173. package/esm/parts/chat-composer/index.js +7 -1
  174. package/esm/parts/chat-composer/index.js.map +7 -0
  175. package/esm/parts/chat-composer/props.js +37 -26
  176. package/esm/parts/chat-composer/props.js.map +7 -0
  177. package/esm/parts/chat-composer/styled.js +73 -22
  178. package/esm/parts/chat-composer/styled.js.map +7 -0
  179. package/esm/parts/chat-container/ChatContainer.js +88 -122
  180. package/esm/parts/chat-container/ChatContainer.js.map +7 -0
  181. package/esm/parts/chat-container/config/useValidateProps.js +6 -4
  182. package/esm/parts/chat-container/config/useValidateProps.js.map +7 -0
  183. package/esm/parts/chat-container/index.js +7 -1
  184. package/esm/parts/chat-container/index.js.map +7 -0
  185. package/esm/parts/chat-container/props.js +52 -31
  186. package/esm/parts/chat-container/props.js.map +7 -0
  187. package/esm/parts/chat-container/styled.js +79 -16
  188. package/esm/parts/chat-container/styled.js.map +7 -0
  189. package/esm/parts/chat-container-header/ChatContainerHeader.js +22 -21
  190. package/esm/parts/chat-container-header/ChatContainerHeader.js.map +7 -0
  191. package/esm/parts/chat-container-header/helpers.js +9 -17
  192. package/esm/parts/chat-container-header/helpers.js.map +7 -0
  193. package/esm/parts/chat-container-header/styled.js +30 -14
  194. package/esm/parts/chat-container-header/styled.js.map +7 -0
  195. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +138 -210
  196. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +7 -0
  197. package/esm/parts/chat-container-messages-list/config/useValidateProps.js +6 -4
  198. package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +7 -0
  199. package/esm/parts/chat-container-messages-list/index.js +10 -1
  200. package/esm/parts/chat-container-messages-list/index.js.map +7 -0
  201. package/esm/parts/chat-container-messages-list/props.js +31 -17
  202. package/esm/parts/chat-container-messages-list/props.js.map +7 -0
  203. package/esm/parts/chat-container-messages-list/styled.js +71 -25
  204. package/esm/parts/chat-container-messages-list/styled.js.map +7 -0
  205. package/esm/parts/chat-empty-state/ChatEmptyState.js +25 -29
  206. package/esm/parts/chat-empty-state/ChatEmptyState.js.map +7 -0
  207. package/esm/parts/chat-empty-state/config/useValidateProps.js +6 -4
  208. package/esm/parts/chat-empty-state/config/useValidateProps.js.map +7 -0
  209. package/esm/parts/chat-empty-state/props.js +10 -7
  210. package/esm/parts/chat-empty-state/props.js.map +7 -0
  211. package/esm/parts/chat-empty-state/styled.js +18 -11
  212. package/esm/parts/chat-empty-state/styled.js.map +7 -0
  213. package/esm/parts/chat-sidebar/SideBarChat.js +50 -67
  214. package/esm/parts/chat-sidebar/SideBarChat.js.map +7 -0
  215. package/esm/parts/chat-sidebar/config/useValidateProps.js +6 -4
  216. package/esm/parts/chat-sidebar/config/useValidateProps.js.map +7 -0
  217. package/esm/parts/chat-sidebar/index.js +7 -1
  218. package/esm/parts/chat-sidebar/index.js.map +7 -0
  219. package/esm/parts/chat-sidebar/props.js +39 -21
  220. package/esm/parts/chat-sidebar/props.js.map +7 -0
  221. package/esm/parts/chat-sidebar/styled.js +27 -11
  222. package/esm/parts/chat-sidebar/styled.js.map +7 -0
  223. package/esm/parts/floating-button/FloatingButton.js +18 -26
  224. package/esm/parts/floating-button/FloatingButton.js.map +7 -0
  225. package/esm/parts/floating-button/index.js +3 -1
  226. package/esm/parts/floating-button/index.js.map +7 -0
  227. package/esm/parts/floating-button/props.js +11 -8
  228. package/esm/parts/floating-button/props.js.map +7 -0
  229. package/esm/parts/floating-button/styled.js +34 -9
  230. package/esm/parts/floating-button/styled.js.map +7 -0
  231. package/esm/parts/floating-container/styled.js +18 -9
  232. package/esm/parts/floating-container/styled.js.map +7 -0
  233. package/esm/parts/grid-influencer/InfluencerContainer.js +12 -12
  234. package/esm/parts/grid-influencer/InfluencerContainer.js.map +7 -0
  235. package/esm/parts/grid-influencer/styled.js +27 -12
  236. package/esm/parts/grid-influencer/styled.js.map +7 -0
  237. package/esm/parts/message-delimiter/MessageDelimiter.js +20 -26
  238. package/esm/parts/message-delimiter/MessageDelimiter.js.map +7 -0
  239. package/esm/parts/message-delimiter/config/useValidateProps.js +6 -4
  240. package/esm/parts/message-delimiter/config/useValidateProps.js.map +7 -0
  241. package/esm/parts/message-delimiter/index.js +10 -1
  242. package/esm/parts/message-delimiter/index.js.map +7 -0
  243. package/esm/parts/message-delimiter/props.js +15 -14
  244. package/esm/parts/message-delimiter/props.js.map +7 -0
  245. package/esm/parts/message-delimiter/styled.js +24 -14
  246. package/esm/parts/message-delimiter/styled.js.map +7 -0
  247. package/esm/parts/sidebar-button/SidebarButton.js +22 -41
  248. package/esm/parts/sidebar-button/SidebarButton.js.map +7 -0
  249. package/esm/parts/sidebar-button/index.js +2 -1
  250. package/esm/parts/sidebar-button/index.js.map +7 -0
  251. package/esm/parts/sidebar-button/props.js +18 -15
  252. package/esm/parts/sidebar-button/props.js.map +7 -0
  253. package/esm/parts/sidebar-button/styled.js +39 -14
  254. package/esm/parts/sidebar-button/styled.js.map +7 -0
  255. package/esm/parts/system-message/SystemMessage.js +22 -27
  256. package/esm/parts/system-message/SystemMessage.js.map +7 -0
  257. package/esm/parts/system-message/config/useValidateProps.js +6 -4
  258. package/esm/parts/system-message/config/useValidateProps.js.map +7 -0
  259. package/esm/parts/system-message/index.js +7 -1
  260. package/esm/parts/system-message/index.js.map +7 -0
  261. package/esm/parts/system-message/props.js +13 -10
  262. package/esm/parts/system-message/props.js.map +7 -0
  263. package/esm/parts/system-message/style.js +46 -20
  264. package/esm/parts/system-message/style.js.map +7 -0
  265. package/esm/parts/tile-button/TileButton.js +75 -54
  266. package/esm/parts/tile-button/TileButton.js.map +7 -0
  267. package/esm/parts/tile-button/config/useValidateProps.js +6 -4
  268. package/esm/parts/tile-button/config/useValidateProps.js.map +7 -0
  269. package/esm/parts/tile-button/index.js +7 -1
  270. package/esm/parts/tile-button/index.js.map +7 -0
  271. package/esm/parts/tile-button/props.js +47 -33
  272. package/esm/parts/tile-button/props.js.map +7 -0
  273. package/esm/parts/tile-button/styled.js +200 -60
  274. package/esm/parts/tile-button/styled.js.map +7 -0
  275. package/esm/prop-types.js +19 -16
  276. package/esm/prop-types.js.map +7 -0
  277. package/esm/styled.js +13 -5
  278. package/esm/styled.js.map +7 -0
  279. package/esm/tests/utils.js +37 -0
  280. package/esm/tests/utils.js.map +7 -0
  281. package/package.json +10 -10
  282. package/types/parts/chat-composer/ChatContainerComposer.d.ts +0 -3
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-composer/ChatContainerComposer.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { describe } from 'react-desc';\nimport { PaperAirplane } from '@elliemae/ds-icons';\nimport {\n StyledChatContainerContentComposer,\n StyledComposerInput,\n StyledComposerButton,\n StyledCounterArea,\n StyledCounterErrorA11y,\n} from './styled';\nimport { useValidateProps } from './config/useValidateProps';\n\nimport { defaultComposerPros, composerProps, ChatComposerProps } from './props';\n\n// eslint-disable-next-line complexity\nconst ChatComposer = (props: ChatComposerProps): JSX.Element => {\n useValidateProps(props, ChatComposerWithSchema.toJSON());\n\n const {\n inputValue,\n onChange,\n onResize,\n onSend,\n onFocus,\n onBlur,\n onKeyDown,\n maxHeight = 300,\n placeholder,\n inputMaxLength,\n maxLengthMessage,\n buttonDisabled,\n dataTestid,\n actionRef,\n } = props;\n\n const COMPOSER_MIN_HEIGHT = 32;\n const input = React.useRef<HTMLTextAreaElement>();\n const inputSize = React.useRef<HTMLTextAreaElement>();\n const inputSend = React.useRef<HTMLButtonElement>();\n const [height, setHeight] = React.useState(32);\n const internalMaxHeight = React.useMemo(() => maxHeight - 24, [maxHeight]);\n const [showScroll, setShowScroll] = React.useState(true);\n\n React.useEffect(() => {\n const newHeight =\n inputSize.current?.scrollHeight > internalMaxHeight ? internalMaxHeight : inputSize.current?.scrollHeight;\n if (newHeight !== height && newHeight > COMPOSER_MIN_HEIGHT) onResize(newHeight);\n setHeight(newHeight);\n setShowScroll(inputSize.current?.scrollHeight - inputSize.current?.clientHeight > 5);\n }, [inputValue, internalMaxHeight, height, onResize]);\n\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusToComposer = () => {\n input.current.focus();\n };\n actionRef.current.focusToSend = () => {\n inputSend.current.focus();\n };\n }\n }, [actionRef]);\n\n const handleChange = React.useCallback(\n (e) => {\n onChange(e.target.value);\n },\n [onChange],\n );\n const heightProps = { height, overflow: showScroll ? 'auto' : 'hidden' };\n\n const inputLength = String(inputValue || '').length;\n const hasError = React.useMemo(() => inputLength > inputMaxLength, [inputLength, inputMaxLength]);\n return (\n <StyledChatContainerContentComposer rows={['auto', '15px']} maxHeight={`${maxHeight}px`} data-testid={dataTestid}>\n <Grid\n cols={['1fr', '24px']}\n style={{ height: heightProps.height }}\n justifyContent=\"center\"\n alignItems=\"flex-end\"\n gutter=\"xxs\"\n >\n <StyledComposerInput\n ref={input}\n onChange={handleChange}\n style={{ ...heightProps }}\n value={inputValue}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n aria-label=\"Message to send\"\n data-testid=\"chat-composer-textarea\"\n name=\"chat-composer-textarea\"\n id=\"chat-composer-textarea\"\n />\n\n <Grid height=\"32px\" alignItems=\"center\">\n <StyledComposerButton\n buttonType=\"text\"\n icon={<PaperAirplane width={18} height={18} />}\n onClick={onSend}\n size=\"s\"\n disabled={!inputValue || buttonDisabled || hasError}\n data-testid=\"chat-composer-send-button\"\n aria-label=\"Send\"\n innerRef={inputSend}\n />\n </Grid>\n </Grid>\n <StyledComposerInput\n ref={inputSize}\n style={{\n height: 32,\n visibility: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n top: 0,\n width: input.current?.clientWidth,\n }}\n onChange={handleChange}\n value={inputValue}\n />\n <Grid cols={['1fr', '24px']} justifyContent=\"flex-end\" alignItems=\"center\" gutter=\"xxs\" pb=\"xxs\">\n <StyledCounterArea hasError={hasError} data-testid=\"composer-counter-area\">\n {inputMaxLength && hasError ? (\n <>\n <StyledCounterErrorA11y role=\"alert\">\n {maxLengthMessage ||\n `You have entered ${inputLength} characters and have exceeded the limit by ${\n inputLength - inputMaxLength\n }. Please limit to less than ${inputMaxLength} characters. `}\n </StyledCounterErrorA11y>\n {maxLengthMessage || `Please limit to less than ${inputMaxLength} characters. `}\n </>\n ) : (\n ''\n )}\n {inputMaxLength && !maxLengthMessage ? ` ${inputLength} / ${inputMaxLength}` : ''}\n </StyledCounterArea>\n <Grid />\n </Grid>\n </StyledChatContainerContentComposer>\n );\n};\n\nChatComposer.propTypes = composerProps;\nChatComposer.defaultProps = defaultComposerPros;\nconst ChatComposerWithSchema = describe(ChatComposer);\nChatComposerWithSchema.propTypes = composerProps;\n\nexport { ChatComposer, ChatComposerWithSchema };\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -1,7 +1,9 @@
1
- import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
2
-
1
+ import * as React from "react";
2
+ import { useValidatePropTypes } from "@elliemae/ds-props-helpers";
3
3
  const useValidateProps = (props, schema) => {
4
4
  useValidatePropTypes(props, schema);
5
5
  };
6
-
7
- export { useValidateProps };
6
+ export {
7
+ useValidateProps
8
+ };
9
+ //# sourceMappingURL=useValidateProps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/chat-composer/config/useValidateProps.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatComposerProps } from '../props';\n\nexport const useValidateProps = (props: ChatComposerProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],
5
+ "mappings": "AAAA;ACAA;AAGO,MAAM,mBAAmB,CAAC,OAA0B,WAA0B;AACnF,uBAAqB,OAAO;AAAA;",
6
+ "names": []
7
+ }
@@ -1 +1,7 @@
1
- export { ChatComposer, ChatComposerWithSchema } from './ChatContainerComposer.js';
1
+ import * as React from "react";
2
+ import { ChatComposer, ChatComposerWithSchema } from "./ChatContainerComposer";
3
+ export {
4
+ ChatComposer,
5
+ ChatComposerWithSchema
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-composer/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { ChatComposer, ChatComposerWithSchema } from './ChatContainerComposer';\n"],
5
+ "mappings": "AAAA;ACAA;",
6
+ "names": []
7
+ }
@@ -1,10 +1,9 @@
1
- import { PropTypes } from 'react-desc';
2
- import { noop } from 'lodash';
3
-
1
+ import * as React from "react";
2
+ import { PropTypes } from "react-desc";
3
+ import { noop } from "lodash";
4
4
  const defaultComposerPros = {
5
- placeholder: 'Type your message',
6
- inputValue: '',
7
- ariaMaxLengthMessage: '',
5
+ placeholder: "Type your message",
6
+ inputValue: "",
8
7
  onChange: noop,
9
8
  onResize: noop,
10
9
  onSend: noop,
@@ -12,28 +11,40 @@ const defaultComposerPros = {
12
11
  onBlur: noop,
13
12
  onKeyDown: noop,
14
13
  maxHeight: 0,
15
- inputMaxLength: undefined,
16
- maxLengthMessage: undefined,
14
+ inputMaxLength: void 0,
15
+ maxLengthMessage: void 0,
17
16
  buttonDisabled: false,
18
- dataTestid: 'ds-chat-composer',
17
+ dataTestid: "ds-chat-composer",
19
18
  actionRef: noop
20
19
  };
21
20
  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)
21
+ placeholder: PropTypes.string.description("Input Placeholder").defaultValue(defaultComposerPros.placeholder),
22
+ inputValue: PropTypes.string.description("Input value").defaultValue(defaultComposerPros.inputValue),
23
+ maxLengthMessage: PropTypes.string.description("Max length message").defaultValue(defaultComposerPros.maxLengthMessage),
24
+ onChange: PropTypes.func.description("Called when the user types").defaultValue(defaultComposerPros.onChange),
25
+ onResize: PropTypes.func.description("Called the input changes his height").defaultValue(defaultComposerPros.onResize),
26
+ onSend: PropTypes.func.description("Called when the click send").defaultValue(defaultComposerPros.onSend),
27
+ onFocus: PropTypes.func.description("Input focus").defaultValue(defaultComposerPros.onFocus),
28
+ onBlur: PropTypes.func.description("Input blur").defaultValue(defaultComposerPros.onBlur),
29
+ onKeyDown: PropTypes.func.description("Input on key down").defaultValue(defaultComposerPros.onKeyDown),
30
+ maxHeight: PropTypes.number.description("Max height of the composer. Use 0 for no limit").defaultValue(defaultComposerPros.onBlur),
31
+ inputMaxLength: PropTypes.number.description("Max length of the composer. `undefined` for no limit").defaultValue(defaultComposerPros.inputMaxLength),
32
+ buttonDisabled: PropTypes.bool.description("Control the disabled for the send button").defaultValue(defaultComposerPros.buttonDisabled),
33
+ dataTestid: PropTypes.string.description("Data testid").defaultValue(defaultComposerPros.placeholder),
34
+ actionRef: PropTypes.object.description(`Reference:
35
+ {
36
+ scrollToIndex: (n: number) => void,
37
+ getMessagesInView: () => number[],
38
+ focusToIndex: (n: number) => void,
39
+ focusToList: () => void,
40
+ focusToComposer: () => void,
41
+ focusToSend: () => void,
42
+ }
43
+
44
+ `).defaultValue(defaultComposerPros.actionRef)
37
45
  };
38
-
39
- export { composerProps, defaultComposerPros };
46
+ export {
47
+ composerProps,
48
+ defaultComposerPros
49
+ };
50
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-composer/props.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\n\nexport interface TextAreaProps {\n height: string | number;\n style: React.CSSProperties;\n}\n\nexport const defaultComposerPros: ChatComposerProps = {\n placeholder: 'Type your message',\n inputValue: '',\n onChange: noop,\n onResize: noop,\n onSend: noop,\n onFocus: noop,\n onBlur: noop,\n onKeyDown: noop,\n maxHeight: 0,\n inputMaxLength: undefined,\n maxLengthMessage: undefined,\n buttonDisabled: false,\n dataTestid: 'ds-chat-composer',\n actionRef: noop,\n};\n\nexport interface ChatComposerProps {\n placeholder?: string;\n inputValue?: string;\n maxLengthMessage?: string;\n onChange: (value: string) => void;\n onResize?: (value: number) => void;\n onSend: (value: string) => void;\n onFocus?: (e: React.ChangeEvent<HTMLTextAreaElement>, value: string) => void;\n onBlur?: (e: React.ChangeEvent<HTMLTextAreaElement>, value: string) => void;\n onKeyDown?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;\n maxHeight?: number;\n inputMaxLength: number | undefined;\n buttonDisabled: boolean;\n dataTestid?: string;\n actionRef: PropTypes.func;\n}\n\nexport const composerProps = {\n placeholder: PropTypes.string.description('Input Placeholder').defaultValue(defaultComposerPros.placeholder),\n inputValue: PropTypes.string.description('Input value').defaultValue(defaultComposerPros.inputValue),\n maxLengthMessage: PropTypes.string\n .description('Max length message')\n .defaultValue(defaultComposerPros.maxLengthMessage),\n onChange: PropTypes.func.description('Called when the user types').defaultValue(defaultComposerPros.onChange),\n onResize: PropTypes.func\n .description('Called the input changes his height')\n .defaultValue(defaultComposerPros.onResize),\n onSend: PropTypes.func.description('Called when the click send').defaultValue(defaultComposerPros.onSend),\n onFocus: PropTypes.func.description('Input focus').defaultValue(defaultComposerPros.onFocus),\n onBlur: PropTypes.func.description('Input blur').defaultValue(defaultComposerPros.onBlur),\n onKeyDown: PropTypes.func.description('Input on key down').defaultValue(defaultComposerPros.onKeyDown),\n maxHeight: PropTypes.number\n .description('Max height of the composer. Use 0 for no limit')\n .defaultValue(defaultComposerPros.onBlur),\n inputMaxLength: PropTypes.number\n .description('Max length of the composer. `undefined` for no limit')\n .defaultValue(defaultComposerPros.inputMaxLength),\n buttonDisabled: PropTypes.bool\n .description('Control the disabled for the send button')\n .defaultValue(defaultComposerPros.buttonDisabled),\n dataTestid: PropTypes.string.description('Data testid').defaultValue(defaultComposerPros.placeholder),\n actionRef: PropTypes.object\n .description(\n `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 `,\n )\n .defaultValue(defaultComposerPros.actionRef),\n};\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AAOO,MAAM,sBAAyC;AAAA,EACpD,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,WAAW;AAAA;AAoBN,MAAM,gBAAgB;AAAA,EAC3B,aAAa,UAAU,OAAO,YAAY,qBAAqB,aAAa,oBAAoB;AAAA,EAChG,YAAY,UAAU,OAAO,YAAY,eAAe,aAAa,oBAAoB;AAAA,EACzF,kBAAkB,UAAU,OACzB,YAAY,sBACZ,aAAa,oBAAoB;AAAA,EACpC,UAAU,UAAU,KAAK,YAAY,8BAA8B,aAAa,oBAAoB;AAAA,EACpG,UAAU,UAAU,KACjB,YAAY,uCACZ,aAAa,oBAAoB;AAAA,EACpC,QAAQ,UAAU,KAAK,YAAY,8BAA8B,aAAa,oBAAoB;AAAA,EAClG,SAAS,UAAU,KAAK,YAAY,eAAe,aAAa,oBAAoB;AAAA,EACpF,QAAQ,UAAU,KAAK,YAAY,cAAc,aAAa,oBAAoB;AAAA,EAClF,WAAW,UAAU,KAAK,YAAY,qBAAqB,aAAa,oBAAoB;AAAA,EAC5F,WAAW,UAAU,OAClB,YAAY,kDACZ,aAAa,oBAAoB;AAAA,EACpC,gBAAgB,UAAU,OACvB,YAAY,wDACZ,aAAa,oBAAoB;AAAA,EACpC,gBAAgB,UAAU,KACvB,YAAY,4CACZ,aAAa,oBAAoB;AAAA,EACpC,YAAY,UAAU,OAAO,YAAY,eAAe,aAAa,oBAAoB;AAAA,EACzF,WAAW,UAAU,OAClB,YACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAYD,aAAa,oBAAoB;AAAA;",
6
+ "names": []
7
+ }
@@ -1,22 +1,73 @@
1
- import styled from 'styled-components';
2
- import { Grid } from '@elliemae/ds-grid';
3
- import { DSButton } from '@elliemae/ds-button';
4
-
5
- // Composer
6
- const StyledChatContainerContentComposer = /*#__PURE__*/styled(Grid).withConfig({
7
- componentId: "sc-1ahwpce-0"
8
- })(["width:100%;min-height:56px;background:", ";padding:", ";padding-bottom:3px;padding-top:6px;padding-left:", ";max-height:", ";border-top:1px solid #cbcfd7;"], props => props.theme.colors.neutral['050'], props => props.theme.space.xxs, props => props.theme.space.xs, props => props.maxHeight);
9
- const StyledComposerInput = /*#__PURE__*/styled.textarea.withConfig({
10
- componentId: "sc-1ahwpce-1"
11
- })(["padding:", ";resize:none;min-height:32px;border-radius:2px;border:solid 1px #cbcfd7;color:#25292f;height:", ";min-width:244px;overflow-y:auto;font-size:13px;font-weight:400;line-height:1;transition:height 0.05s;&:focus{outline:none;border:1px solid ", ";box-shadow:inset 0 0 0 1px #8cc2ed;border-radius:2px;}"], props => props.theme.space.xxs, props => typeof props.height === 'number' ? "".concat(props.height, "px") : props.height, props => props.theme.colors.brand[600]);
12
- const StyledComposerButton = /*#__PURE__*/styled(DSButton).withConfig({
13
- componentId: "sc-1ahwpce-2"
14
- })(["&:disabled{background:none;svg{fill:#5d6775;}}svg{fill:", ";}&:focus{background:", ";}"], props => props.theme.colors.brand[600], props => props.theme.colors.brand[200]);
15
- const StyledCounterArea = /*#__PURE__*/styled(Grid).withConfig({
16
- componentId: "sc-1ahwpce-3"
17
- })(["text-align:right;font-size:11px;height:15px;align-items:center;font-style:italic;", " position:relative;"], props => props.hasError ? "color:".concat(props.theme.colors.danger[900], ";") : '');
18
- const StyledCounterErrorA11y = /*#__PURE__*/styled.span.withConfig({
19
- componentId: "sc-1ahwpce-4"
20
- })(["width:1px;height:1px;position:absolute;clip:rect(1px,1px,1px,1px);"]);
21
-
22
- export { StyledChatContainerContentComposer, StyledComposerButton, StyledComposerInput, StyledCounterArea, StyledCounterErrorA11y };
1
+ import * as React from "react";
2
+ import styled from "styled-components";
3
+ import { Grid } from "@elliemae/ds-grid";
4
+ import { DSButton } from "@elliemae/ds-button";
5
+ const StyledChatContainerContentComposer = styled(Grid)`
6
+ width: 100%;
7
+ min-height: 56px;
8
+ background: ${(props) => props.theme.colors.neutral["050"]};
9
+ padding: ${(props) => props.theme.space.xxs};
10
+ padding-bottom: 3px;
11
+ padding-top: 6px;
12
+ padding-left: ${(props) => props.theme.space.xs};
13
+ max-height: ${(props) => props.maxHeight};
14
+ border-top: 1px solid #cbcfd7;
15
+ `;
16
+ const StyledComposerInput = styled.textarea`
17
+ padding: ${(props) => props.theme.space.xxs};
18
+ resize: none;
19
+ min-height: 32px;
20
+ border-radius: 2px;
21
+ border: solid 1px #cbcfd7;
22
+ color: #25292f;
23
+ height: ${(props) => typeof props.height === "number" ? `${props.height}px` : props.height};
24
+ min-width: 244px;
25
+ overflow-y: auto;
26
+ font-size: 13px;
27
+ font-weight: 400;
28
+ line-height: 1;
29
+ transition: height 0.05s;
30
+ &:focus {
31
+ outline: none;
32
+ border: 1px solid ${(props) => props.theme.colors.brand[600]};
33
+ box-shadow: inset 0 0 0 1px #8cc2ed;
34
+ border-radius: 2px;
35
+ }
36
+ `;
37
+ const StyledComposerButton = styled(DSButton)`
38
+ &:disabled {
39
+ background: none;
40
+ svg {
41
+ fill: #5d6775;
42
+ }
43
+ }
44
+ svg {
45
+ fill: ${(props) => props.theme.colors.brand[600]};
46
+ }
47
+ &:focus {
48
+ background: ${(props) => props.theme.colors.brand[200]};
49
+ }
50
+ `;
51
+ const StyledCounterArea = styled(Grid)`
52
+ text-align: right;
53
+ font-size: 11px;
54
+ height: 15px;
55
+ align-items: center;
56
+ font-style: italic;
57
+ ${(props) => props.hasError ? `color:${props.theme.colors.danger[900]};` : ""}
58
+ position:relative;
59
+ `;
60
+ const StyledCounterErrorA11y = styled.span`
61
+ width: 1px;
62
+ height: 1px;
63
+ position: absolute;
64
+ clip: rect(1px, 1px, 1px, 1px);
65
+ `;
66
+ export {
67
+ StyledChatContainerContentComposer,
68
+ StyledComposerButton,
69
+ StyledComposerInput,
70
+ StyledCounterArea,
71
+ StyledCounterErrorA11y
72
+ };
73
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-composer/styled.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButton } from '@elliemae/ds-button';\nimport { TextAreaProps } from './props';\n\n// Composer\nexport const StyledChatContainerContentComposer = styled(Grid)`\n width: 100%;\n min-height: 56px;\n background: ${(props) => props.theme.colors.neutral['050']};\n padding: ${(props) => props.theme.space.xxs};\n padding-bottom: 3px;\n padding-top: 6px;\n padding-left: ${(props) => props.theme.space.xs};\n max-height: ${(props) => props.maxHeight};\n border-top: 1px solid #cbcfd7;\n`;\n\nexport const StyledComposerInput = styled.textarea<any>`\n padding: ${(props) => props.theme.space.xxs};\n resize: none;\n min-height: 32px;\n border-radius: 2px;\n border: solid 1px #cbcfd7;\n color: #25292f;\n height: ${(props: TextAreaProps) => (typeof props.height === 'number' ? `${props.height}px` : props.height)};\n min-width: 244px;\n overflow-y: auto;\n font-size: 13px;\n font-weight: 400;\n line-height: 1;\n transition: height 0.05s;\n &:focus {\n outline: none;\n border: 1px solid ${(props) => props.theme.colors.brand[600]};\n box-shadow: inset 0 0 0 1px #8cc2ed;\n border-radius: 2px;\n }\n`;\nexport const StyledComposerButton = styled(DSButton)`\n &:disabled {\n background: none;\n svg {\n fill: #5d6775;\n }\n }\n svg {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n &:focus {\n background: ${(props) => props.theme.colors.brand[200]};\n }\n`;\n\nexport const StyledCounterArea = styled(Grid)`\n text-align: right;\n font-size: 11px;\n height: 15px;\n align-items: center;\n font-style: italic;\n ${(props) => (props.hasError ? `color:${props.theme.colors.danger[900]};` : '')}\n position:relative;\n`;\n\nexport const StyledCounterErrorA11y = styled.span`\n width: 1px;\n height: 1px;\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n`;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AAIO,MAAM,qCAAqC,OAAO;AAAA;AAAA;AAAA,gBAGzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,aACzC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA,kBAGxB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,gBAC/B,CAAC,UAAU,MAAM;AAAA;AAAA;AAI1B,MAAM,sBAAsB,OAAO;AAAA,aAC7B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAM9B,CAAC,UAA0B,OAAO,MAAM,WAAW,WAAW,GAAG,MAAM,aAAa,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAS9E,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAKrD,MAAM,uBAAuB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAQ/B,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA,kBAG9B,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAI/C,MAAM,oBAAoB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMpC,CAAC,UAAW,MAAM,WAAW,SAAS,MAAM,MAAM,OAAO,OAAO,UAAU;AAAA;AAAA;AAIvE,MAAM,yBAAyB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,31 +1,15 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _jsx from '@babel/runtime/helpers/esm/jsx';
7
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
- import React from 'react';
9
- import { noop } from 'lodash';
10
- import { describe } from 'react-desc';
11
- import DSIndeterminateProgressIndicator from '@elliemae/ds-indeterminate-progress-indicator';
12
- import DSBanner, { BANNER_TYPES } from '@elliemae/ds-banner';
13
- import { ChatComposer } from '../chat-composer/ChatContainerComposer.js';
14
- import { ChatContainerMessagesList } from '../chat-container-messages-list/ChatContainerMessagesList.js';
15
- import { containerProps, defaultProps } from './props.js';
16
- import { StyledIndicatorContainer, StyledChatContainerContent, MobileStyledChatContainerContent } from './styled.js';
17
- import { useValidateProps } from './config/useValidateProps.js';
18
- import { jsxs, jsx } from 'react/jsx-runtime';
19
-
20
- var _DSIndeterminateProgr;
21
-
22
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
23
-
24
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
25
-
26
- const ChatContainer = props => {
27
- var _messagesListProps$me2, _containerRef$current;
28
-
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { noop } from "lodash";
4
+ import { describe } from "react-desc";
5
+ import DSIndeterminateProgressIndicator from "@elliemae/ds-indeterminate-progress-indicator";
6
+ import DSBanner, { BANNER_TYPES } from "@elliemae/ds-banner";
7
+ import { ChatComposer } from "../chat-composer";
8
+ import { ChatContainerMessagesList } from "../chat-container-messages-list";
9
+ import { defaultProps, containerProps } from "./props";
10
+ import { StyledChatContainerContent, StyledIndicatorContainer, MobileStyledChatContainerContent } from "./styled";
11
+ import { useValidateProps } from "./config/useValidateProps";
12
+ const ChatContainer = (props) => {
29
13
  useValidateProps(props, containerProps);
30
14
  const {
31
15
  sendingText,
@@ -34,10 +18,7 @@ const ChatContainer = props => {
34
18
  bannerProps,
35
19
  messagesListProps,
36
20
  composerProps,
37
- composerProps: {
38
- onResize: onComposerResize,
39
- onKeyDown: onComposerKeyDown
40
- },
21
+ composerProps: { onResize: onComposerResize, onKeyDown: onComposerKeyDown },
41
22
  actionRef,
42
23
  device,
43
24
  isLoading,
@@ -45,118 +26,103 @@ const ChatContainer = props => {
45
26
  getMoreMessages,
46
27
  ariaLabel
47
28
  } = props;
48
- const bannerRef = React.useRef({
49
- focusOnWrapper: noop,
50
- focusOnLink: noop
51
- });
52
- const containerRef = React.useRef();
53
- const listRef = React.useRef({
54
- scrollToIndex: noop
55
- });
56
- const onResize = React.useCallback(height => {
57
- if (onComposerResize) onComposerResize(height);
58
- /*
59
- setTimeout is used to equal the animation duration from the
60
- composer text area when increase its size
61
- */
62
-
29
+ const bannerRef = React2.useRef({ focusOnWrapper: noop, focusOnLink: noop });
30
+ const containerRef = React2.useRef();
31
+ const listRef = React2.useRef({ scrollToIndex: noop });
32
+ const onResize = React2.useCallback((height) => {
33
+ if (onComposerResize)
34
+ onComposerResize(height);
63
35
  setTimeout(() => {
64
36
  actionRef.current.scrollToIndex(messagesListProps.messages.length - 1, {
65
- align: 'start'
37
+ align: "start"
66
38
  });
67
39
  }, 50);
68
40
  }, [onComposerResize, messagesListProps.messages, actionRef]);
69
- const Container = device === 'desktop' ? StyledChatContainerContent : MobileStyledChatContainerContent;
70
- const handleTabs = React.useCallback(e => {
71
- if (onComposerKeyDown) onComposerKeyDown(e);else {
41
+ const Container = device === "desktop" ? StyledChatContainerContent : MobileStyledChatContainerContent;
42
+ const handleTabs = React2.useCallback((e) => {
43
+ if (onComposerKeyDown)
44
+ onComposerKeyDown(e);
45
+ else {
72
46
  const ref = actionRef || listRef;
73
-
74
- if (e.shiftKey && e.key === 'Tab') {
75
- var _messagesListProps$me;
76
-
77
- if (((_messagesListProps$me = messagesListProps.messages) === null || _messagesListProps$me === void 0 ? void 0 : _messagesListProps$me.length) > 0) {
47
+ if (e.shiftKey && e.key === "Tab") {
48
+ if (messagesListProps.messages?.length > 0) {
78
49
  e.preventDefault();
79
-
80
- if (['top', 'bottom'].includes(bannerPosition)) {
50
+ if (["top", "bottom"].includes(bannerPosition)) {
81
51
  bannerRef.current.focusOnWrapper();
82
52
  } else {
83
- var _ref$current;
84
-
85
53
  const last = ref.current.getMessagesInView().pop();
86
- (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.focusToIndexWithoutScroll(last);
54
+ ref.current?.focusToIndexWithoutScroll(last);
87
55
  }
88
56
  }
89
57
  }
90
58
  }
91
- }, [actionRef, onComposerKeyDown, bannerPosition, (_messagesListProps$me2 = messagesListProps.messages) === null || _messagesListProps$me2 === void 0 ? void 0 : _messagesListProps$me2.length]); // Map actions
92
-
93
- React.useEffect(() => {
59
+ }, [actionRef, onComposerKeyDown, bannerPosition, messagesListProps.messages?.length]);
60
+ React2.useEffect(() => {
94
61
  if (actionRef && actionRef.current) {
95
62
  actionRef.current.focusOnBanner = bannerRef.current.focusOnWrapper;
96
63
  actionRef.current.focusOnBannerLink = bannerRef.current.focusOnLink;
97
64
  }
98
65
  }, [actionRef]);
99
- return /*#__PURE__*/jsxs(Container, {
100
- rows: ['minmax(0, 1fr)', 'auto'],
66
+ return /* @__PURE__ */ React2.createElement(Container, {
67
+ rows: ["minmax(0, 1fr)", "auto"],
101
68
  ref: containerRef,
102
69
  role: "region",
103
- "aria-label": ariaLabel,
104
- children: [/*#__PURE__*/_jsx("div", {
105
- style: {
106
- position: 'relative',
107
- overflow: 'hidden'
108
- }
109
- }, void 0, /*#__PURE__*/jsx(ChatContainerMessagesList, _objectSpread(_objectSpread({}, messagesListProps), {}, {
110
- actionRef: actionRef || listRef,
111
- isLoading: isLoading,
112
- hasMoreItems: hasMoreItems,
113
- getMoreMessages: getMoreMessages,
114
- sendingMessages: sendingMessages,
115
- sendingText: sendingText,
116
- bannerPosition: bannerPosition,
117
- bannerRef: bannerRef
118
- })), ['top', 'bottom'].includes(isLoading) ? /*#__PURE__*/_jsx(StyledIndicatorContainer, {
119
- isLoading: isLoading,
120
- "data-testid": "ds-chat-loading-indicator"
121
- }, void 0, _DSIndeterminateProgr || (_DSIndeterminateProgr = /*#__PURE__*/_jsx(DSIndeterminateProgressIndicator, {
122
- processing: true,
123
- title: "Loading"
124
- }))) : null, /*#__PURE__*/_jsx(StyledIndicatorContainer, {
125
- linear: true,
126
- isLoading: bannerPosition
127
- }, void 0, /*#__PURE__*/_jsx(DSBanner, {
128
- showCloseButton: true,
129
- label: bannerProps.label || 'Unread messages',
130
- containerProps: {
131
- id: 'ds-chat-banner'
132
- },
133
- actionLink: {
134
- label: bannerProps.viewLabel || 'View',
135
- onClick: bannerProps.onView
136
- },
137
- onClose: bannerProps.onClose,
138
- isOpen: true,
139
- type: bannerProps.type || BANNER_TYPES.INFO,
140
- actionRef: bannerRef
141
- })), sendingMessages && sendingMessages.length > 0 ? /*#__PURE__*/_jsx(StyledIndicatorContainer, {
142
- isLoading: "bottom",
143
- linear: true,
144
- "data-testid": "ds-chat-loading-indicator"
145
- }, void 0, /*#__PURE__*/_jsx(DSIndeterminateProgressIndicator, {
146
- processing: true,
147
- title: sendingText,
148
- lineOnly: true
149
- })) : null), /*#__PURE__*/jsx(ChatComposer, _objectSpread(_objectSpread({}, composerProps), {}, {
150
- onKeyDown: handleTabs,
151
- onResize: onResize,
152
- maxHeight: (((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.clientHeight) || 0) / 2,
153
- actionRef: actionRef || listRef
154
- }))]
155
- });
70
+ "aria-label": ariaLabel
71
+ }, /* @__PURE__ */ React2.createElement("div", {
72
+ style: { position: "relative", overflow: "hidden" }
73
+ }, /* @__PURE__ */ React2.createElement(ChatContainerMessagesList, {
74
+ ...messagesListProps,
75
+ actionRef: actionRef || listRef,
76
+ isLoading,
77
+ hasMoreItems,
78
+ getMoreMessages,
79
+ sendingMessages,
80
+ sendingText,
81
+ bannerPosition,
82
+ bannerRef
83
+ }), ["top", "bottom"].includes(isLoading) ? /* @__PURE__ */ React2.createElement(StyledIndicatorContainer, {
84
+ isLoading,
85
+ "data-testid": "ds-chat-loading-indicator"
86
+ }, /* @__PURE__ */ React2.createElement(DSIndeterminateProgressIndicator, {
87
+ processing: true,
88
+ title: "Loading"
89
+ })) : null, /* @__PURE__ */ React2.createElement(StyledIndicatorContainer, {
90
+ linear: true,
91
+ isLoading: bannerPosition
92
+ }, /* @__PURE__ */ React2.createElement(DSBanner, {
93
+ showCloseButton: true,
94
+ label: bannerProps.label || "Unread messages",
95
+ containerProps: { id: "ds-chat-banner" },
96
+ actionLink: {
97
+ label: bannerProps.viewLabel || "View",
98
+ onClick: bannerProps.onView
99
+ },
100
+ onClose: bannerProps.onClose,
101
+ isOpen: true,
102
+ type: bannerProps.type || BANNER_TYPES.INFO,
103
+ actionRef: bannerRef
104
+ })), sendingMessages && sendingMessages.length > 0 ? /* @__PURE__ */ React2.createElement(StyledIndicatorContainer, {
105
+ isLoading: "bottom",
106
+ linear: true,
107
+ "data-testid": "ds-chat-loading-indicator"
108
+ }, /* @__PURE__ */ React2.createElement(DSIndeterminateProgressIndicator, {
109
+ processing: true,
110
+ title: sendingText,
111
+ lineOnly: true
112
+ })) : null), /* @__PURE__ */ React2.createElement(ChatComposer, {
113
+ ...composerProps,
114
+ onKeyDown: handleTabs,
115
+ onResize,
116
+ maxHeight: (containerRef.current?.clientHeight || 0) / 2,
117
+ actionRef: actionRef || listRef
118
+ }));
156
119
  };
157
-
120
+ ChatContainer.propTypes = containerProps;
158
121
  ChatContainer.defaultProps = defaultProps;
159
122
  const ChatContainerWithSchema = describe(ChatContainer);
160
123
  ChatContainerWithSchema.propTypes = containerProps;
161
-
162
- export { ChatContainer, ChatContainerWithSchema };
124
+ export {
125
+ ChatContainer,
126
+ ChatContainerWithSchema
127
+ };
128
+ //# sourceMappingURL=ChatContainer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-container/ChatContainer.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React from 'react';\nimport { noop } from 'lodash';\nimport { describe } from 'react-desc';\nimport DSIndeterminateProgressIndicator from '@elliemae/ds-indeterminate-progress-indicator';\nimport DSBanner, { BANNER_TYPES } from '@elliemae/ds-banner';\nimport { ChatComposer } from '../chat-composer';\nimport { ChatContainerMessagesList } from '../chat-container-messages-list';\nimport { ChatContainerProps, defaultProps, containerProps } from './props';\nimport { StyledChatContainerContent, StyledIndicatorContainer, MobileStyledChatContainerContent } from './styled';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst ChatContainer = (props: ChatContainerProps): JSX.Element => {\n useValidateProps(props, containerProps);\n\n const {\n sendingText,\n sendingMessages,\n bannerPosition,\n bannerProps,\n messagesListProps,\n composerProps,\n composerProps: { onResize: onComposerResize, onKeyDown: onComposerKeyDown },\n actionRef,\n device,\n isLoading,\n hasMoreItems,\n getMoreMessages,\n ariaLabel,\n } = props;\n const bannerRef = React.useRef({ focusOnWrapper: noop, focusOnLink: noop });\n const containerRef = React.useRef<HTMLElement>();\n const listRef = React.useRef({ scrollToIndex: noop });\n\n const onResize = React.useCallback(\n (height: number) => {\n if (onComposerResize) onComposerResize(height);\n /*\n setTimeout is used to equal the animation duration from the \n composer text area when increase its size\n */\n setTimeout(() => {\n actionRef.current.scrollToIndex(messagesListProps.messages.length - 1, {\n align: 'start',\n });\n }, 50);\n },\n [onComposerResize, messagesListProps.messages, actionRef],\n );\n const Container = device === 'desktop' ? StyledChatContainerContent : MobileStyledChatContainerContent;\n const handleTabs = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (onComposerKeyDown) onComposerKeyDown(e);\n else {\n const ref = actionRef || listRef;\n if (e.shiftKey && e.key === 'Tab') {\n if (messagesListProps.messages?.length > 0) {\n e.preventDefault();\n if (['top', 'bottom'].includes(bannerPosition)) {\n bannerRef.current.focusOnWrapper();\n } else {\n const last = ref.current.getMessagesInView().pop();\n ref.current?.focusToIndexWithoutScroll(last);\n }\n }\n }\n }\n },\n [actionRef, onComposerKeyDown, bannerPosition, messagesListProps.messages?.length],\n );\n\n // Map actions\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusOnBanner = bannerRef.current.focusOnWrapper;\n actionRef.current.focusOnBannerLink = bannerRef.current.focusOnLink;\n }\n }, [actionRef]);\n\n return (\n <Container rows={['minmax(0, 1fr)', 'auto']} ref={containerRef} role=\"region\" aria-label={ariaLabel}>\n <div style={{ position: 'relative', overflow: 'hidden' }}>\n <ChatContainerMessagesList\n {...messagesListProps}\n actionRef={actionRef || listRef}\n isLoading={isLoading}\n hasMoreItems={hasMoreItems}\n getMoreMessages={getMoreMessages}\n sendingMessages={sendingMessages}\n sendingText={sendingText}\n bannerPosition={bannerPosition}\n bannerRef={bannerRef}\n />\n {['top', 'bottom'].includes(isLoading) ? (\n <StyledIndicatorContainer isLoading={isLoading} data-testid=\"ds-chat-loading-indicator\">\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </StyledIndicatorContainer>\n ) : null}\n <StyledIndicatorContainer linear isLoading={bannerPosition}>\n <DSBanner\n showCloseButton\n label={bannerProps.label || 'Unread messages'}\n containerProps={{ id: 'ds-chat-banner' }}\n actionLink={{\n label: bannerProps.viewLabel || 'View',\n onClick: bannerProps.onView,\n }}\n onClose={bannerProps.onClose}\n isOpen\n type={bannerProps.type || BANNER_TYPES.INFO}\n actionRef={bannerRef}\n />\n </StyledIndicatorContainer>\n {sendingMessages && sendingMessages.length > 0 ? (\n <StyledIndicatorContainer isLoading=\"bottom\" linear data-testid=\"ds-chat-loading-indicator\">\n <DSIndeterminateProgressIndicator processing title={sendingText} lineOnly />\n </StyledIndicatorContainer>\n ) : null}\n </div>\n <ChatComposer\n {...composerProps}\n onKeyDown={handleTabs}\n onResize={onResize}\n maxHeight={(containerRef.current?.clientHeight || 0) / 2}\n actionRef={actionRef || listRef}\n />\n </Container>\n );\n};\n\nChatContainer.propTypes = containerProps;\nChatContainer.defaultProps = defaultProps;\nconst ChatContainerWithSchema = describe(ChatContainer);\nChatContainerWithSchema.propTypes = containerProps;\n\nexport { ChatContainer, ChatContainerWithSchema };\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -1,7 +1,9 @@
1
- import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
2
-
1
+ import * as React from "react";
2
+ import { useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
3
3
  const useValidateProps = (props, propTypes) => {
4
4
  useValidateTypescriptPropTypes(props, propTypes);
5
5
  };
6
-
7
- export { useValidateProps };
6
+ export {
7
+ useValidateProps
8
+ };
9
+ //# sourceMappingURL=useValidateProps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/chat-container/config/useValidateProps.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatContainerProps } from '../props';\n\nexport const useValidateProps = (props: ChatContainerProps, propTypes: unknown): void => {\n useValidateTypescriptPropTypes(props, propTypes);\n};\n"],
5
+ "mappings": "AAAA;ACAA;AAGO,MAAM,mBAAmB,CAAC,OAA2B,cAA6B;AACvF,iCAA+B,OAAO;AAAA;",
6
+ "names": []
7
+ }
@@ -1 +1,7 @@
1
- export { ChatContainer, ChatContainerWithSchema } from './ChatContainer.js';
1
+ import * as React from "react";
2
+ import { ChatContainer, ChatContainerWithSchema } from "./ChatContainer";
3
+ export {
4
+ ChatContainer,
5
+ ChatContainerWithSchema
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-container/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { ChatContainer, ChatContainerWithSchema } from './ChatContainer';\n"],
5
+ "mappings": "AAAA;ACAA;",
6
+ "names": []
7
+ }