@elliemae/ds-chat 2.2.0-alpha.4 → 3.0.0-next.2

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 (281) hide show
  1. package/cjs/ChatDataTestids.js +26 -54
  2. package/cjs/index.d.js +2 -27
  3. package/cjs/index.js +44 -69
  4. package/cjs/parts/bubble/ChatBubble.js +64 -74
  5. package/cjs/parts/bubble/ChatBubbleArrow.js +79 -96
  6. package/cjs/parts/bubble/config/useValidateProps.js +24 -47
  7. package/cjs/parts/bubble/index.js +12 -38
  8. package/cjs/parts/bubble/props.js +48 -60
  9. package/cjs/parts/bubble/styled.js +48 -141
  10. package/cjs/parts/chat-card/ChatCard.js +39 -55
  11. package/cjs/parts/chat-card/config/useValidateProps.js +9 -36
  12. package/cjs/parts/chat-card/index.js +10 -36
  13. package/cjs/parts/chat-card/props.js +12 -39
  14. package/cjs/parts/chat-card/styled.js +36 -71
  15. package/cjs/parts/chat-composer/ChatContainerComposer.js +98 -92
  16. package/cjs/parts/chat-composer/config/useValidateProps.js +9 -36
  17. package/cjs/parts/chat-composer/index.js +10 -36
  18. package/cjs/parts/chat-composer/props.js +36 -73
  19. package/cjs/parts/chat-composer/styled.js +34 -102
  20. package/cjs/parts/chat-container/ChatContainer.js +140 -122
  21. package/cjs/parts/chat-container/config/useValidateProps.js +9 -36
  22. package/cjs/parts/chat-container/index.js +10 -36
  23. package/cjs/parts/chat-container/props.js +42 -85
  24. package/cjs/parts/chat-container/styled.js +23 -104
  25. package/cjs/parts/chat-container-header/ChatContainerHeader.js +30 -48
  26. package/cjs/parts/chat-container-header/helpers.js +25 -38
  27. package/cjs/parts/chat-container-header/styled.js +24 -59
  28. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +225 -163
  29. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +9 -36
  30. package/cjs/parts/chat-container-messages-list/index.js +10 -36
  31. package/cjs/parts/chat-container-messages-list/props.js +24 -62
  32. package/cjs/parts/chat-container-messages-list/styled.js +38 -100
  33. package/cjs/parts/chat-empty-state/ChatEmptyState.js +42 -58
  34. package/cjs/parts/chat-empty-state/config/useValidateProps.js +9 -36
  35. package/cjs/parts/chat-empty-state/props.js +12 -39
  36. package/cjs/parts/chat-empty-state/styled.js +21 -47
  37. package/cjs/parts/chat-sidebar/SideBarChat.js +81 -82
  38. package/cjs/parts/chat-sidebar/config/useValidateProps.js +9 -36
  39. package/cjs/parts/chat-sidebar/index.js +10 -36
  40. package/cjs/parts/chat-sidebar/props.js +30 -72
  41. package/cjs/parts/chat-sidebar/styled.js +20 -56
  42. package/cjs/parts/floating-button/FloatingButton.js +34 -47
  43. package/cjs/parts/floating-button/index.js +9 -28
  44. package/cjs/parts/floating-button/props.js +15 -42
  45. package/cjs/parts/floating-button/styled.js +17 -63
  46. package/cjs/parts/floating-container/styled.js +17 -47
  47. package/cjs/parts/grid-influencer/InfluencerContainer.js +21 -41
  48. package/cjs/parts/grid-influencer/styled.js +21 -56
  49. package/cjs/parts/message-delimiter/MessageDelimiter.js +39 -53
  50. package/cjs/parts/message-delimiter/config/useValidateProps.js +9 -36
  51. package/cjs/parts/message-delimiter/index.js +10 -36
  52. package/cjs/parts/message-delimiter/props.js +19 -44
  53. package/cjs/parts/message-delimiter/styled.js +24 -53
  54. package/cjs/parts/sidebar-button/SidebarButton.js +53 -52
  55. package/cjs/parts/sidebar-button/index.js +2 -20
  56. package/cjs/parts/sidebar-button/props.js +26 -49
  57. package/cjs/parts/sidebar-button/styled.js +24 -68
  58. package/cjs/parts/system-message/SystemMessage.js +40 -55
  59. package/cjs/parts/system-message/config/useValidateProps.js +9 -36
  60. package/cjs/parts/system-message/index.js +10 -36
  61. package/cjs/parts/system-message/props.js +15 -42
  62. package/cjs/parts/system-message/style.js +32 -75
  63. package/cjs/parts/tile-button/TileButton.js +68 -98
  64. package/cjs/parts/tile-button/config/useValidateProps.js +9 -36
  65. package/cjs/parts/tile-button/index.js +10 -36
  66. package/cjs/parts/tile-button/props.js +45 -83
  67. package/cjs/parts/tile-button/styled.js +77 -229
  68. package/cjs/prop-types.js +26 -53
  69. package/cjs/styled.js +14 -42
  70. package/esm/ChatDataTestids.js +22 -25
  71. package/esm/index.d.js +1 -2
  72. package/esm/index.js +14 -40
  73. package/esm/parts/bubble/ChatBubble.js +51 -51
  74. package/esm/parts/bubble/ChatBubbleArrow.js +71 -67
  75. package/esm/parts/bubble/config/useValidateProps.js +19 -17
  76. package/esm/parts/bubble/index.js +2 -9
  77. package/esm/parts/bubble/props.js +36 -30
  78. package/esm/parts/bubble/styled.js +32 -112
  79. package/esm/parts/chat-card/ChatCard.js +27 -23
  80. package/esm/parts/chat-card/config/useValidateProps.js +4 -6
  81. package/esm/parts/chat-card/index.js +1 -7
  82. package/esm/parts/chat-card/props.js +8 -10
  83. package/esm/parts/chat-card/styled.js +23 -42
  84. package/esm/parts/chat-composer/ChatContainerComposer.js +83 -65
  85. package/esm/parts/chat-composer/config/useValidateProps.js +4 -6
  86. package/esm/parts/chat-composer/index.js +1 -7
  87. package/esm/parts/chat-composer/props.js +24 -37
  88. package/esm/parts/chat-composer/styled.js +22 -73
  89. package/esm/parts/chat-container/ChatContainer.js +122 -88
  90. package/esm/parts/chat-container/config/useValidateProps.js +4 -6
  91. package/esm/parts/chat-container/index.js +1 -7
  92. package/esm/parts/chat-container/props.js +31 -52
  93. package/esm/parts/chat-container/styled.js +16 -79
  94. package/esm/parts/chat-container-header/ChatContainerHeader.js +21 -22
  95. package/esm/parts/chat-container-header/helpers.js +17 -9
  96. package/esm/parts/chat-container-header/styled.js +14 -30
  97. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +210 -138
  98. package/esm/parts/chat-container-messages-list/config/useValidateProps.js +4 -6
  99. package/esm/parts/chat-container-messages-list/index.js +1 -10
  100. package/esm/parts/chat-container-messages-list/props.js +17 -31
  101. package/esm/parts/chat-container-messages-list/styled.js +25 -71
  102. package/esm/parts/chat-empty-state/ChatEmptyState.js +29 -25
  103. package/esm/parts/chat-empty-state/config/useValidateProps.js +4 -6
  104. package/esm/parts/chat-empty-state/props.js +7 -10
  105. package/esm/parts/chat-empty-state/styled.js +11 -18
  106. package/esm/parts/chat-sidebar/SideBarChat.js +67 -50
  107. package/esm/parts/chat-sidebar/config/useValidateProps.js +4 -6
  108. package/esm/parts/chat-sidebar/index.js +1 -7
  109. package/esm/parts/chat-sidebar/props.js +21 -39
  110. package/esm/parts/chat-sidebar/styled.js +11 -27
  111. package/esm/parts/floating-button/FloatingButton.js +26 -18
  112. package/esm/parts/floating-button/index.js +1 -3
  113. package/esm/parts/floating-button/props.js +8 -11
  114. package/esm/parts/floating-button/styled.js +9 -34
  115. package/esm/parts/floating-container/styled.js +9 -18
  116. package/esm/parts/grid-influencer/InfluencerContainer.js +12 -12
  117. package/esm/parts/grid-influencer/styled.js +12 -27
  118. package/esm/parts/message-delimiter/MessageDelimiter.js +26 -20
  119. package/esm/parts/message-delimiter/config/useValidateProps.js +4 -6
  120. package/esm/parts/message-delimiter/index.js +1 -10
  121. package/esm/parts/message-delimiter/props.js +14 -15
  122. package/esm/parts/message-delimiter/styled.js +14 -24
  123. package/esm/parts/sidebar-button/SidebarButton.js +41 -22
  124. package/esm/parts/sidebar-button/index.js +1 -2
  125. package/esm/parts/sidebar-button/props.js +15 -18
  126. package/esm/parts/sidebar-button/styled.js +14 -39
  127. package/esm/parts/system-message/SystemMessage.js +27 -22
  128. package/esm/parts/system-message/config/useValidateProps.js +4 -6
  129. package/esm/parts/system-message/index.js +1 -7
  130. package/esm/parts/system-message/props.js +10 -13
  131. package/esm/parts/system-message/style.js +20 -46
  132. package/esm/parts/tile-button/TileButton.js +54 -75
  133. package/esm/parts/tile-button/config/useValidateProps.js +4 -6
  134. package/esm/parts/tile-button/index.js +1 -7
  135. package/esm/parts/tile-button/props.js +33 -47
  136. package/esm/parts/tile-button/styled.js +60 -200
  137. package/esm/prop-types.js +16 -19
  138. package/esm/styled.js +5 -13
  139. package/package.json +10 -10
  140. package/cjs/ChatDataTestids.js.map +0 -7
  141. package/cjs/index.d.js.map +0 -7
  142. package/cjs/index.js.map +0 -7
  143. package/cjs/parts/bubble/ChatBubble.js.map +0 -7
  144. package/cjs/parts/bubble/ChatBubbleArrow.js.map +0 -7
  145. package/cjs/parts/bubble/config/useValidateProps.js.map +0 -7
  146. package/cjs/parts/bubble/index.js.map +0 -7
  147. package/cjs/parts/bubble/props.js.map +0 -7
  148. package/cjs/parts/bubble/styled.js.map +0 -7
  149. package/cjs/parts/chat-card/ChatCard.js.map +0 -7
  150. package/cjs/parts/chat-card/config/useValidateProps.js.map +0 -7
  151. package/cjs/parts/chat-card/index.js.map +0 -7
  152. package/cjs/parts/chat-card/props.js.map +0 -7
  153. package/cjs/parts/chat-card/styled.js.map +0 -7
  154. package/cjs/parts/chat-composer/ChatContainerComposer.js.map +0 -7
  155. package/cjs/parts/chat-composer/config/useValidateProps.js.map +0 -7
  156. package/cjs/parts/chat-composer/index.js.map +0 -7
  157. package/cjs/parts/chat-composer/props.js.map +0 -7
  158. package/cjs/parts/chat-composer/styled.js.map +0 -7
  159. package/cjs/parts/chat-container/ChatContainer.js.map +0 -7
  160. package/cjs/parts/chat-container/config/useValidateProps.js.map +0 -7
  161. package/cjs/parts/chat-container/index.js.map +0 -7
  162. package/cjs/parts/chat-container/props.js.map +0 -7
  163. package/cjs/parts/chat-container/styled.js.map +0 -7
  164. package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +0 -7
  165. package/cjs/parts/chat-container-header/helpers.js.map +0 -7
  166. package/cjs/parts/chat-container-header/styled.js.map +0 -7
  167. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -7
  168. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -7
  169. package/cjs/parts/chat-container-messages-list/index.js.map +0 -7
  170. package/cjs/parts/chat-container-messages-list/props.js.map +0 -7
  171. package/cjs/parts/chat-container-messages-list/styled.js.map +0 -7
  172. package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +0 -7
  173. package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +0 -7
  174. package/cjs/parts/chat-empty-state/props.js.map +0 -7
  175. package/cjs/parts/chat-empty-state/styled.js.map +0 -7
  176. package/cjs/parts/chat-sidebar/SideBarChat.js.map +0 -7
  177. package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +0 -7
  178. package/cjs/parts/chat-sidebar/index.js.map +0 -7
  179. package/cjs/parts/chat-sidebar/props.js.map +0 -7
  180. package/cjs/parts/chat-sidebar/styled.js.map +0 -7
  181. package/cjs/parts/floating-button/FloatingButton.js.map +0 -7
  182. package/cjs/parts/floating-button/index.js.map +0 -7
  183. package/cjs/parts/floating-button/props.js.map +0 -7
  184. package/cjs/parts/floating-button/styled.js.map +0 -7
  185. package/cjs/parts/floating-container/styled.js.map +0 -7
  186. package/cjs/parts/grid-influencer/InfluencerContainer.js.map +0 -7
  187. package/cjs/parts/grid-influencer/styled.js.map +0 -7
  188. package/cjs/parts/message-delimiter/MessageDelimiter.js.map +0 -7
  189. package/cjs/parts/message-delimiter/config/useValidateProps.js.map +0 -7
  190. package/cjs/parts/message-delimiter/index.js.map +0 -7
  191. package/cjs/parts/message-delimiter/props.js.map +0 -7
  192. package/cjs/parts/message-delimiter/styled.js.map +0 -7
  193. package/cjs/parts/sidebar-button/SidebarButton.js.map +0 -7
  194. package/cjs/parts/sidebar-button/index.js.map +0 -7
  195. package/cjs/parts/sidebar-button/props.js.map +0 -7
  196. package/cjs/parts/sidebar-button/styled.js.map +0 -7
  197. package/cjs/parts/system-message/SystemMessage.js.map +0 -7
  198. package/cjs/parts/system-message/config/useValidateProps.js.map +0 -7
  199. package/cjs/parts/system-message/index.js.map +0 -7
  200. package/cjs/parts/system-message/props.js.map +0 -7
  201. package/cjs/parts/system-message/style.js.map +0 -7
  202. package/cjs/parts/tile-button/TileButton.js.map +0 -7
  203. package/cjs/parts/tile-button/config/useValidateProps.js.map +0 -7
  204. package/cjs/parts/tile-button/index.js.map +0 -7
  205. package/cjs/parts/tile-button/props.js.map +0 -7
  206. package/cjs/parts/tile-button/styled.js.map +0 -7
  207. package/cjs/prop-types.js.map +0 -7
  208. package/cjs/styled.js.map +0 -7
  209. package/cjs/tests/utils.js +0 -66
  210. package/cjs/tests/utils.js.map +0 -7
  211. package/esm/ChatDataTestids.js.map +0 -7
  212. package/esm/index.d.js.map +0 -7
  213. package/esm/index.js.map +0 -7
  214. package/esm/parts/bubble/ChatBubble.js.map +0 -7
  215. package/esm/parts/bubble/ChatBubbleArrow.js.map +0 -7
  216. package/esm/parts/bubble/config/useValidateProps.js.map +0 -7
  217. package/esm/parts/bubble/index.js.map +0 -7
  218. package/esm/parts/bubble/props.js.map +0 -7
  219. package/esm/parts/bubble/styled.js.map +0 -7
  220. package/esm/parts/chat-card/ChatCard.js.map +0 -7
  221. package/esm/parts/chat-card/config/useValidateProps.js.map +0 -7
  222. package/esm/parts/chat-card/index.js.map +0 -7
  223. package/esm/parts/chat-card/props.js.map +0 -7
  224. package/esm/parts/chat-card/styled.js.map +0 -7
  225. package/esm/parts/chat-composer/ChatContainerComposer.js.map +0 -7
  226. package/esm/parts/chat-composer/config/useValidateProps.js.map +0 -7
  227. package/esm/parts/chat-composer/index.js.map +0 -7
  228. package/esm/parts/chat-composer/props.js.map +0 -7
  229. package/esm/parts/chat-composer/styled.js.map +0 -7
  230. package/esm/parts/chat-container/ChatContainer.js.map +0 -7
  231. package/esm/parts/chat-container/config/useValidateProps.js.map +0 -7
  232. package/esm/parts/chat-container/index.js.map +0 -7
  233. package/esm/parts/chat-container/props.js.map +0 -7
  234. package/esm/parts/chat-container/styled.js.map +0 -7
  235. package/esm/parts/chat-container-header/ChatContainerHeader.js.map +0 -7
  236. package/esm/parts/chat-container-header/helpers.js.map +0 -7
  237. package/esm/parts/chat-container-header/styled.js.map +0 -7
  238. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -7
  239. package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -7
  240. package/esm/parts/chat-container-messages-list/index.js.map +0 -7
  241. package/esm/parts/chat-container-messages-list/props.js.map +0 -7
  242. package/esm/parts/chat-container-messages-list/styled.js.map +0 -7
  243. package/esm/parts/chat-empty-state/ChatEmptyState.js.map +0 -7
  244. package/esm/parts/chat-empty-state/config/useValidateProps.js.map +0 -7
  245. package/esm/parts/chat-empty-state/props.js.map +0 -7
  246. package/esm/parts/chat-empty-state/styled.js.map +0 -7
  247. package/esm/parts/chat-sidebar/SideBarChat.js.map +0 -7
  248. package/esm/parts/chat-sidebar/config/useValidateProps.js.map +0 -7
  249. package/esm/parts/chat-sidebar/index.js.map +0 -7
  250. package/esm/parts/chat-sidebar/props.js.map +0 -7
  251. package/esm/parts/chat-sidebar/styled.js.map +0 -7
  252. package/esm/parts/floating-button/FloatingButton.js.map +0 -7
  253. package/esm/parts/floating-button/index.js.map +0 -7
  254. package/esm/parts/floating-button/props.js.map +0 -7
  255. package/esm/parts/floating-button/styled.js.map +0 -7
  256. package/esm/parts/floating-container/styled.js.map +0 -7
  257. package/esm/parts/grid-influencer/InfluencerContainer.js.map +0 -7
  258. package/esm/parts/grid-influencer/styled.js.map +0 -7
  259. package/esm/parts/message-delimiter/MessageDelimiter.js.map +0 -7
  260. package/esm/parts/message-delimiter/config/useValidateProps.js.map +0 -7
  261. package/esm/parts/message-delimiter/index.js.map +0 -7
  262. package/esm/parts/message-delimiter/props.js.map +0 -7
  263. package/esm/parts/message-delimiter/styled.js.map +0 -7
  264. package/esm/parts/sidebar-button/SidebarButton.js.map +0 -7
  265. package/esm/parts/sidebar-button/index.js.map +0 -7
  266. package/esm/parts/sidebar-button/props.js.map +0 -7
  267. package/esm/parts/sidebar-button/styled.js.map +0 -7
  268. package/esm/parts/system-message/SystemMessage.js.map +0 -7
  269. package/esm/parts/system-message/config/useValidateProps.js.map +0 -7
  270. package/esm/parts/system-message/index.js.map +0 -7
  271. package/esm/parts/system-message/props.js.map +0 -7
  272. package/esm/parts/system-message/style.js.map +0 -7
  273. package/esm/parts/tile-button/TileButton.js.map +0 -7
  274. package/esm/parts/tile-button/config/useValidateProps.js.map +0 -7
  275. package/esm/parts/tile-button/index.js.map +0 -7
  276. package/esm/parts/tile-button/props.js.map +0 -7
  277. package/esm/parts/tile-button/styled.js.map +0 -7
  278. package/esm/prop-types.js.map +0 -7
  279. package/esm/styled.js.map +0 -7
  280. package/esm/tests/utils.js +0 -37
  281. package/esm/tests/utils.js.map +0 -7
@@ -1,15 +1,31 @@
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) => {
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
+
13
29
  useValidateProps(props, containerProps);
14
30
  const {
15
31
  sendingText,
@@ -18,7 +34,10 @@ const ChatContainer = (props) => {
18
34
  bannerProps,
19
35
  messagesListProps,
20
36
  composerProps,
21
- composerProps: { onResize: onComposerResize, onKeyDown: onComposerKeyDown },
37
+ composerProps: {
38
+ onResize: onComposerResize,
39
+ onKeyDown: onComposerKeyDown
40
+ },
22
41
  actionRef,
23
42
  device,
24
43
  isLoading,
@@ -26,103 +45,118 @@ const ChatContainer = (props) => {
26
45
  getMoreMessages,
27
46
  ariaLabel
28
47
  } = props;
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);
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
+
35
63
  setTimeout(() => {
36
64
  actionRef.current.scrollToIndex(messagesListProps.messages.length - 1, {
37
- align: "start"
65
+ align: 'start'
38
66
  });
39
67
  }, 50);
40
68
  }, [onComposerResize, messagesListProps.messages, actionRef]);
41
- const Container = device === "desktop" ? StyledChatContainerContent : MobileStyledChatContainerContent;
42
- const handleTabs = React2.useCallback((e) => {
43
- if (onComposerKeyDown)
44
- onComposerKeyDown(e);
45
- else {
69
+ const Container = device === 'desktop' ? StyledChatContainerContent : MobileStyledChatContainerContent;
70
+ const handleTabs = React.useCallback(e => {
71
+ if (onComposerKeyDown) onComposerKeyDown(e);else {
46
72
  const ref = actionRef || listRef;
47
- if (e.shiftKey && e.key === "Tab") {
48
- if (messagesListProps.messages?.length > 0) {
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) {
49
78
  e.preventDefault();
50
- if (["top", "bottom"].includes(bannerPosition)) {
79
+
80
+ if (['top', 'bottom'].includes(bannerPosition)) {
51
81
  bannerRef.current.focusOnWrapper();
52
82
  } else {
83
+ var _ref$current;
84
+
53
85
  const last = ref.current.getMessagesInView().pop();
54
- ref.current?.focusToIndexWithoutScroll(last);
86
+ (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.focusToIndexWithoutScroll(last);
55
87
  }
56
88
  }
57
89
  }
58
90
  }
59
- }, [actionRef, onComposerKeyDown, bannerPosition, messagesListProps.messages?.length]);
60
- React2.useEffect(() => {
91
+ }, [actionRef, onComposerKeyDown, bannerPosition, (_messagesListProps$me2 = messagesListProps.messages) === null || _messagesListProps$me2 === void 0 ? void 0 : _messagesListProps$me2.length]); // Map actions
92
+
93
+ React.useEffect(() => {
61
94
  if (actionRef && actionRef.current) {
62
95
  actionRef.current.focusOnBanner = bannerRef.current.focusOnWrapper;
63
96
  actionRef.current.focusOnBannerLink = bannerRef.current.focusOnLink;
64
97
  }
65
98
  }, [actionRef]);
66
- return /* @__PURE__ */ React2.createElement(Container, {
67
- rows: ["minmax(0, 1fr)", "auto"],
99
+ return /*#__PURE__*/jsxs(Container, {
100
+ rows: ['minmax(0, 1fr)', 'auto'],
68
101
  ref: containerRef,
69
102
  role: "region",
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
- }));
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
+ });
119
156
  };
120
- ChatContainer.propTypes = containerProps;
157
+
121
158
  ChatContainer.defaultProps = defaultProps;
122
159
  const ChatContainerWithSchema = describe(ChatContainer);
123
160
  ChatContainerWithSchema.propTypes = containerProps;
124
- export {
125
- ChatContainer,
126
- ChatContainerWithSchema
127
- };
128
- //# sourceMappingURL=ChatContainer.js.map
161
+
162
+ export { ChatContainer, ChatContainerWithSchema };
@@ -1,9 +1,7 @@
1
- import * as React from "react";
2
- import { useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
1
+ import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
2
+
3
3
  const useValidateProps = (props, propTypes) => {
4
4
  useValidateTypescriptPropTypes(props, propTypes);
5
5
  };
6
- export {
7
- useValidateProps
8
- };
9
- //# sourceMappingURL=useValidateProps.js.map
6
+
7
+ export { useValidateProps };
@@ -1,7 +1 @@
1
- import * as React from "react";
2
- import { ChatContainer, ChatContainerWithSchema } from "./ChatContainer";
3
- export {
4
- ChatContainer,
5
- ChatContainerWithSchema
6
- };
7
- //# sourceMappingURL=index.js.map
1
+ export { ChatContainer, ChatContainerWithSchema } from './ChatContainer.js';
@@ -1,65 +1,44 @@
1
- import * as React from "react";
2
- import { PropTypes } from "react-desc";
3
- import { noop } from "lodash";
4
- import { BANNER_TYPES } from "@elliemae/ds-banner";
5
- import {
6
- defaultProps as defaultListProps
7
- } from "../chat-container-messages-list/props";
8
- import { defaultComposerPros } from "../chat-composer/props";
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
+
9
7
  const defaultProps = {
10
- messagesListProps: defaultListProps,
8
+ messagesListProps: defaultProps$1,
11
9
  composerProps: defaultComposerPros,
12
- actionRef: void 0,
10
+ actionRef: undefined,
13
11
  autoScroll: false,
14
- device: "desktop",
15
- isLoading: void 0,
16
- hasMoreItems: void 0,
12
+ device: 'desktop',
13
+ isLoading: undefined,
14
+ hasMoreItems: undefined,
17
15
  getMoreMessages: noop,
18
- bannerPosition: void 0,
16
+ bannerPosition: undefined,
19
17
  bannerProps: {
20
18
  type: BANNER_TYPES.INFO,
21
- label: "Unread Messages",
22
- viewLabel: "View",
19
+ label: 'Unread Messages',
20
+ viewLabel: 'View',
23
21
  onView: noop,
24
22
  onClose: noop
25
23
  },
26
- sendingMessages: void 0,
27
- sendingText: "Sending",
28
- ariaLabel: "Chat window"
24
+ sendingMessages: undefined,
25
+ sendingText: 'Sending',
26
+ ariaLabel: 'Chat window'
29
27
  };
30
28
  const containerProps = {
31
29
  messagesListProps: PropTypes.object.description('ChatMessageList props "messages" / "onScrollEnds"').defaultValue(defaultProps.messagesListProps),
32
- composerProps: PropTypes.object.description("Composer configuration").defaultValue(defaultProps.composerProps),
33
- autoScroll: PropTypes.bool.description("Auto scroll to bottom on resize").defaultValue(defaultProps.autoScroll),
34
- device: PropTypes.string.description("Option to render mobile or desktop style composer").defaultValue(defaultProps.device),
35
- isLoading: PropTypes.oneOf(["top", "bottom", void 0]).description("Show Loading messages indicator at the `top` or `bottom` of the container"),
36
- hasMoreItems: PropTypes.oneOf(["top", "bottom", void 0]).description("Show Load More button at the `top` or `bottom` of the container"),
37
- getMoreMessages: PropTypes.func.description("Called when the user clicks on load more").defaultValue(defaultProps.getMoreMessages),
38
- bannerPosition: PropTypes.oneOf(["top", "bottom", void 0]).description("Show Loading messages indicator at the `top` or `bottom` of the container"),
39
- bannerProps: PropTypes.object.description(`Banner configuration:
40
- label: string;
41
- viewLabel: string;
42
- type: BANNER_TYPES;
43
- onView: () => void;
44
- onClose: () => void;
45
- `).defaultValue(defaultProps.bannerProps),
46
- sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]).description("Array of ids of sending messages").defaultValue(defaultProps.sendingMessages),
47
- sendingText: PropTypes.string.description("Label description for messages in sending status").defaultValue(defaultProps.sendingText),
48
- actionRef: PropTypes.object.description(`Reference:
49
- {
50
- scrollToIndex: (n: number) => void,
51
- getMessagesInView: () => number[],
52
- focusToIndex: (n: number) => void,
53
- focusToList: () => void,
54
- focusToComposer: () => void,
55
- focusToSend: () => void,
56
- }
57
-
58
- `).defaultValue(defaultProps.actionRef),
59
- ariaLabel: PropTypes.string.description("Aria Label description for chat container").defaultValue(defaultProps.ariaLabel)
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)
60
42
  };
61
- export {
62
- containerProps,
63
- defaultProps
64
- };
65
- //# sourceMappingURL=props.js.map
43
+
44
+ export { containerProps, defaultProps };
@@ -1,81 +1,18 @@
1
- import * as React from "react";
2
- import styled from "styled-components";
3
- import { Grid } from "@elliemae/ds-grid";
4
- import { StyledTitleRightBubble, StyledTitleLeftBubble, StyleBodyWrapper } from "../bubble/styled";
5
- import { StyledComposerInput } from "../chat-composer/styled";
6
- import { Wrapper, Title, Time, Message } from "../system-message/style";
7
- const CONTAINER_WIDTH = 300;
8
- const StyledChatContainerContent = styled(Grid)`
9
- height: 100%;
10
- min-width: ${CONTAINER_WIDTH}px;
11
- overflow: hidden;
12
- background: ${(props) => props.theme.colors.neutral["050"]};
13
- position: relative;
14
- `;
15
- const StyledIndicatorContainer = styled.div`
16
- transition: 0.4s ease-in-out;
17
- position: absolute;
18
- visibility: hidden;
19
- pointer-events: none;
20
- width: 100%;
21
- padding: 0 ${(props) => !props.linear ? props.theme.space.xxs : 0};
22
- left: 0;
23
- right: 0;
24
- background: ${(props) => props.theme.colors.neutral["000"]};
25
- ${(props) => props.isLoading === "top" ? `
26
- top: -41px;
27
- transform: translate(0, 41px);
28
- visibility: visible;
29
- pointer-events: auto;
30
- ` : ""}
31
- ${(props) => props.isLoading === "bottom" ? `
32
- bottom: -41px;
33
- transform: translate(0, -41px);
34
- visibility: visible;
35
- pointer-events: auto;
36
- ` : ""}
37
-
38
- & div,a {
39
- font-size: 13px;
40
- }
41
- `;
42
- const MobileStyledChatContainerContent = styled(StyledChatContainerContent)`
43
- ${StyledTitleLeftBubble},
44
- ${StyleBodyWrapper} {
45
- font-size: 16px;
46
- }
47
-
48
- ${StyledTitleRightBubble} {
49
- font-size: 13px;
50
- }
51
-
52
- ${Wrapper} {
53
- background-color: #fff;
54
- box-shadow: -0 1px 3px rgba(53, 60, 70, 0.8);
55
- }
1
+ import styled from 'styled-components';
2
+ import { Grid } from '@elliemae/ds-grid';
3
+ import { StyledTitleLeftBubble, StyleBodyWrapper, StyledTitleRightBubble } from '../bubble/styled.js';
4
+ import { StyledComposerInput } from '../chat-composer/styled.js';
5
+ import { Wrapper, Title, Message, Time } from '../system-message/style.js';
56
6
 
57
- ${Title},
58
- ${Message} {
59
- font-size: 16px;
60
- text-align: left;
61
- }
62
-
63
- ${Time} {
64
- font-size: 13px;
65
- }
66
-
67
- ${StyledComposerInput} {
68
- font-size: 16px;
69
- }
7
+ const CONTAINER_WIDTH = 300;
8
+ const StyledChatContainerContent = /*#__PURE__*/styled(Grid).withConfig({
9
+ componentId: "sc-d732wo-0"
10
+ })(["height:100%;min-width:", "px;overflow:hidden;background:", ";position:relative;"], CONTAINER_WIDTH, props => props.theme.colors.neutral['050']);
11
+ const StyledIndicatorContainer = /*#__PURE__*/styled.div.withConfig({
12
+ componentId: "sc-d732wo-1"
13
+ })(["transition:0.4s ease-in-out;position:absolute;visibility:hidden;pointer-events:none;width:100%;padding:0 ", ";left:0;right:0;background:", ";", " ", " & div,a{font-size:13px;}"], props => !props.linear ? props.theme.space.xxs : 0, props => props.theme.colors.neutral['000'], props => props.isLoading === 'top' ? "\n top: -41px;\n transform: translate(0, 41px);\n visibility: visible;\n pointer-events: auto;\n " : '', props => props.isLoading === 'bottom' ? "\n bottom: -41px;\n transform: translate(0, -41px);\n visibility: visible;\n pointer-events: auto;\n " : '');
14
+ const MobileStyledChatContainerContent = /*#__PURE__*/styled(StyledChatContainerContent).withConfig({
15
+ componentId: "sc-d732wo-2"
16
+ })(["", ",", "{font-size:16px;}", "{font-size:13px;}", "{background-color:#fff;box-shadow:-0 1px 3px rgba(53,60,70,0.8);}", ",", "{font-size:16px;text-align:left;}", "{font-size:13px;}", "{font-size:16px;}", "{font-size:16px;}"], StyledTitleLeftBubble, StyleBodyWrapper, StyledTitleRightBubble, Wrapper, Title, Message, Time, StyledComposerInput, StyledIndicatorContainer);
70
17
 
71
- ${StyledIndicatorContainer} {
72
- font-size: 16px;
73
- }
74
- `;
75
- export {
76
- CONTAINER_WIDTH,
77
- MobileStyledChatContainerContent,
78
- StyledChatContainerContent,
79
- StyledIndicatorContainer
80
- };
81
- //# sourceMappingURL=styled.js.map
18
+ export { CONTAINER_WIDTH, MobileStyledChatContainerContent, StyledChatContainerContent, StyledIndicatorContainer };
@@ -1,32 +1,31 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
4
- import {
5
- StyledChatContainerContentHeader,
6
- StyledChatContainerContentHeaderLabel,
7
- StyledChatContainerContentHeaderActions
8
- } from "./styled";
9
- import { validHeaderChilds } from "./helpers";
10
- const ChatContainerHeader = (props) => {
11
- const { title, floating, children } = props;
12
- return /* @__PURE__ */ React2.createElement(StyledChatContainerContentHeader, {
13
- alignItems: "center",
14
- cols: ["minmax(calc(100% - 64px), 1fr)", children ? "auto" : "0px"],
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
4
+ import { StyledChatContainerContentHeader, StyledChatContainerContentHeaderLabel, StyledChatContainerContentHeaderActions } from './styled.js';
5
+ import { validHeaderChilds } from './helpers.js';
6
+
7
+ const ChatContainerHeader = props => {
8
+ const {
9
+ title,
15
10
  floating,
11
+ children
12
+ } = props;
13
+ return /*#__PURE__*/_jsx(StyledChatContainerContentHeader, {
14
+ alignItems: "center",
15
+ cols: ['minmax(calc(100% - 64px), 1fr)', children ? 'auto' : '0px'],
16
+ floating: floating,
16
17
  role: "heading"
17
- }, /* @__PURE__ */ React2.createElement(StyledChatContainerContentHeaderLabel, {
18
+ }, void 0, /*#__PURE__*/_jsx(StyledChatContainerContentHeaderLabel, {
18
19
  "data-testid": "chat-container-header-title",
19
20
  pl: "xxs",
20
21
  pr: "xxs"
21
- }, /* @__PURE__ */ React2.createElement(SimpleTruncatedTooltipText, {
22
+ }, void 0, /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
22
23
  value: title
23
- })), /* @__PURE__ */ React2.createElement(StyledChatContainerContentHeaderActions, {
24
+ })), /*#__PURE__*/_jsx(StyledChatContainerContentHeaderActions, {
24
25
  cols: validHeaderChilds(children),
25
26
  justifyContent: "flex-end",
26
27
  "data-testid": "chat-container-header-children"
27
- }, children));
28
- };
29
- export {
30
- ChatContainerHeader
28
+ }, void 0, children));
31
29
  };
32
- //# sourceMappingURL=ChatContainerHeader.js.map
30
+
31
+ export { ChatContainerHeader };
@@ -1,15 +1,23 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- const validHeaderChilds = (children) => React2.Children.toArray(children).filter((e) => {
1
+ import 'core-js/modules/esnext.async-iterator.map.js';
2
+ import 'core-js/modules/esnext.iterator.map.js';
3
+ import 'core-js/modules/esnext.async-iterator.filter.js';
4
+ import 'core-js/modules/esnext.iterator.constructor.js';
5
+ import 'core-js/modules/esnext.iterator.filter.js';
6
+ import 'core-js/modules/esnext.async-iterator.constructor.js';
7
+ import 'core-js/modules/esnext.async-iterator.to-array.js';
8
+ import 'core-js/modules/esnext.iterator.to-array.js';
9
+ import React from 'react';
10
+
11
+ const validHeaderChilds = children => React.Children.toArray(children).filter(e => {
4
12
  if (Array.isArray(e.props.children)) {
5
13
  return false;
6
14
  }
7
- if (e.props.children === void 0 && e.$$typeof.toString() === "Symbol(react.element)") {
15
+
16
+ if (e.props.children === undefined && e.$$typeof.toString() === 'Symbol(react.element)') {
8
17
  return true;
9
18
  }
19
+
10
20
  return !!e.props.children;
11
- }).map(() => "32px");
12
- export {
13
- validHeaderChilds
14
- };
15
- //# sourceMappingURL=helpers.js.map
21
+ }).map(() => '32px');
22
+
23
+ export { validHeaderChilds };
@@ -1,30 +1,14 @@
1
- import * as React from "react";
2
- import styled from "styled-components";
3
- import { Grid } from "@elliemae/ds-grid";
4
- const StyledChatContainerContentHeaderActions = styled(Grid)`
5
- max-width: 80px;
6
- `;
7
- const StyledChatContainerContentHeader = styled(Grid)`
8
- width: 100%;
9
- min-height: 48px;
10
- border-bottom: 1px solid ${(props) => props.theme.colors.neutral["200"]};
11
- background: ${(props) => props.theme.colors.neutral["050"]};
12
- ${StyledChatContainerContentHeaderActions} {
13
- & button {
14
- background: transparent;
15
- }
16
- }
17
- `;
18
- const StyledChatContainerContentHeaderLabel = styled(Grid)`
19
- justify-content: center;
20
- align-items: center;
21
- font-weight: bold;
22
- font-size: 18px;
23
- color: ${(props) => props.theme.colors.neutral["700"]};
24
- `;
25
- export {
26
- StyledChatContainerContentHeader,
27
- StyledChatContainerContentHeaderActions,
28
- StyledChatContainerContentHeaderLabel
29
- };
30
- //# sourceMappingURL=styled.js.map
1
+ import styled from 'styled-components';
2
+ import { Grid } from '@elliemae/ds-grid';
3
+
4
+ const StyledChatContainerContentHeaderActions = /*#__PURE__*/styled(Grid).withConfig({
5
+ componentId: "sc-jmynvr-0"
6
+ })(["max-width:80px;"]);
7
+ const StyledChatContainerContentHeader = /*#__PURE__*/styled(Grid).withConfig({
8
+ componentId: "sc-jmynvr-1"
9
+ })(["width:100%;min-height:48px;border-bottom:1px solid ", ";background:", ";", "{& button{background:transparent;}}"], props => props.theme.colors.neutral['200'], props => props.theme.colors.neutral['050'], StyledChatContainerContentHeaderActions);
10
+ const StyledChatContainerContentHeaderLabel = /*#__PURE__*/styled(Grid).withConfig({
11
+ componentId: "sc-jmynvr-2"
12
+ })(["justify-content:center;align-items:center;font-weight:bold;font-size:18px;color:", ";"], props => props.theme.colors.neutral['700']);
13
+
14
+ export { StyledChatContainerContentHeader, StyledChatContainerContentHeaderActions, StyledChatContainerContentHeaderLabel };