@elliemae/ds-chat 2.2.0-alpha.5 → 2.2.0-beta.0

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 (291) 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 +99 -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 +38 -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 +84 -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 +26 -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/types/parts/bubble/ChatBubble.d.ts +1 -1
  141. package/types/parts/chat-card/ChatCard.d.ts +1 -1
  142. package/types/parts/chat-composer/ChatContainerComposer.d.ts +4 -1
  143. package/types/parts/chat-container/ChatContainer.d.ts +1 -1
  144. package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +1 -1
  145. package/types/parts/chat-empty-state/ChatEmptyState.d.ts +1 -1
  146. package/types/parts/chat-sidebar/SideBarChat.d.ts +1 -1
  147. package/types/parts/message-delimiter/MessageDelimiter.d.ts +1 -1
  148. package/types/parts/system-message/SystemMessage.d.ts +1 -1
  149. package/types/parts/tile-button/TileButton.d.ts +1 -1
  150. package/cjs/ChatDataTestids.js.map +0 -7
  151. package/cjs/index.d.js.map +0 -7
  152. package/cjs/index.js.map +0 -7
  153. package/cjs/parts/bubble/ChatBubble.js.map +0 -7
  154. package/cjs/parts/bubble/ChatBubbleArrow.js.map +0 -7
  155. package/cjs/parts/bubble/config/useValidateProps.js.map +0 -7
  156. package/cjs/parts/bubble/index.js.map +0 -7
  157. package/cjs/parts/bubble/props.js.map +0 -7
  158. package/cjs/parts/bubble/styled.js.map +0 -7
  159. package/cjs/parts/chat-card/ChatCard.js.map +0 -7
  160. package/cjs/parts/chat-card/config/useValidateProps.js.map +0 -7
  161. package/cjs/parts/chat-card/index.js.map +0 -7
  162. package/cjs/parts/chat-card/props.js.map +0 -7
  163. package/cjs/parts/chat-card/styled.js.map +0 -7
  164. package/cjs/parts/chat-composer/ChatContainerComposer.js.map +0 -7
  165. package/cjs/parts/chat-composer/config/useValidateProps.js.map +0 -7
  166. package/cjs/parts/chat-composer/index.js.map +0 -7
  167. package/cjs/parts/chat-composer/props.js.map +0 -7
  168. package/cjs/parts/chat-composer/styled.js.map +0 -7
  169. package/cjs/parts/chat-container/ChatContainer.js.map +0 -7
  170. package/cjs/parts/chat-container/config/useValidateProps.js.map +0 -7
  171. package/cjs/parts/chat-container/index.js.map +0 -7
  172. package/cjs/parts/chat-container/props.js.map +0 -7
  173. package/cjs/parts/chat-container/styled.js.map +0 -7
  174. package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +0 -7
  175. package/cjs/parts/chat-container-header/helpers.js.map +0 -7
  176. package/cjs/parts/chat-container-header/styled.js.map +0 -7
  177. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -7
  178. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -7
  179. package/cjs/parts/chat-container-messages-list/index.js.map +0 -7
  180. package/cjs/parts/chat-container-messages-list/props.js.map +0 -7
  181. package/cjs/parts/chat-container-messages-list/styled.js.map +0 -7
  182. package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +0 -7
  183. package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +0 -7
  184. package/cjs/parts/chat-empty-state/props.js.map +0 -7
  185. package/cjs/parts/chat-empty-state/styled.js.map +0 -7
  186. package/cjs/parts/chat-sidebar/SideBarChat.js.map +0 -7
  187. package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +0 -7
  188. package/cjs/parts/chat-sidebar/index.js.map +0 -7
  189. package/cjs/parts/chat-sidebar/props.js.map +0 -7
  190. package/cjs/parts/chat-sidebar/styled.js.map +0 -7
  191. package/cjs/parts/floating-button/FloatingButton.js.map +0 -7
  192. package/cjs/parts/floating-button/index.js.map +0 -7
  193. package/cjs/parts/floating-button/props.js.map +0 -7
  194. package/cjs/parts/floating-button/styled.js.map +0 -7
  195. package/cjs/parts/floating-container/styled.js.map +0 -7
  196. package/cjs/parts/grid-influencer/InfluencerContainer.js.map +0 -7
  197. package/cjs/parts/grid-influencer/styled.js.map +0 -7
  198. package/cjs/parts/message-delimiter/MessageDelimiter.js.map +0 -7
  199. package/cjs/parts/message-delimiter/config/useValidateProps.js.map +0 -7
  200. package/cjs/parts/message-delimiter/index.js.map +0 -7
  201. package/cjs/parts/message-delimiter/props.js.map +0 -7
  202. package/cjs/parts/message-delimiter/styled.js.map +0 -7
  203. package/cjs/parts/sidebar-button/SidebarButton.js.map +0 -7
  204. package/cjs/parts/sidebar-button/index.js.map +0 -7
  205. package/cjs/parts/sidebar-button/props.js.map +0 -7
  206. package/cjs/parts/sidebar-button/styled.js.map +0 -7
  207. package/cjs/parts/system-message/SystemMessage.js.map +0 -7
  208. package/cjs/parts/system-message/config/useValidateProps.js.map +0 -7
  209. package/cjs/parts/system-message/index.js.map +0 -7
  210. package/cjs/parts/system-message/props.js.map +0 -7
  211. package/cjs/parts/system-message/style.js.map +0 -7
  212. package/cjs/parts/tile-button/TileButton.js.map +0 -7
  213. package/cjs/parts/tile-button/config/useValidateProps.js.map +0 -7
  214. package/cjs/parts/tile-button/index.js.map +0 -7
  215. package/cjs/parts/tile-button/props.js.map +0 -7
  216. package/cjs/parts/tile-button/styled.js.map +0 -7
  217. package/cjs/prop-types.js.map +0 -7
  218. package/cjs/styled.js.map +0 -7
  219. package/cjs/tests/utils.js +0 -66
  220. package/cjs/tests/utils.js.map +0 -7
  221. package/esm/ChatDataTestids.js.map +0 -7
  222. package/esm/index.d.js.map +0 -7
  223. package/esm/index.js.map +0 -7
  224. package/esm/parts/bubble/ChatBubble.js.map +0 -7
  225. package/esm/parts/bubble/ChatBubbleArrow.js.map +0 -7
  226. package/esm/parts/bubble/config/useValidateProps.js.map +0 -7
  227. package/esm/parts/bubble/index.js.map +0 -7
  228. package/esm/parts/bubble/props.js.map +0 -7
  229. package/esm/parts/bubble/styled.js.map +0 -7
  230. package/esm/parts/chat-card/ChatCard.js.map +0 -7
  231. package/esm/parts/chat-card/config/useValidateProps.js.map +0 -7
  232. package/esm/parts/chat-card/index.js.map +0 -7
  233. package/esm/parts/chat-card/props.js.map +0 -7
  234. package/esm/parts/chat-card/styled.js.map +0 -7
  235. package/esm/parts/chat-composer/ChatContainerComposer.js.map +0 -7
  236. package/esm/parts/chat-composer/config/useValidateProps.js.map +0 -7
  237. package/esm/parts/chat-composer/index.js.map +0 -7
  238. package/esm/parts/chat-composer/props.js.map +0 -7
  239. package/esm/parts/chat-composer/styled.js.map +0 -7
  240. package/esm/parts/chat-container/ChatContainer.js.map +0 -7
  241. package/esm/parts/chat-container/config/useValidateProps.js.map +0 -7
  242. package/esm/parts/chat-container/index.js.map +0 -7
  243. package/esm/parts/chat-container/props.js.map +0 -7
  244. package/esm/parts/chat-container/styled.js.map +0 -7
  245. package/esm/parts/chat-container-header/ChatContainerHeader.js.map +0 -7
  246. package/esm/parts/chat-container-header/helpers.js.map +0 -7
  247. package/esm/parts/chat-container-header/styled.js.map +0 -7
  248. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -7
  249. package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -7
  250. package/esm/parts/chat-container-messages-list/index.js.map +0 -7
  251. package/esm/parts/chat-container-messages-list/props.js.map +0 -7
  252. package/esm/parts/chat-container-messages-list/styled.js.map +0 -7
  253. package/esm/parts/chat-empty-state/ChatEmptyState.js.map +0 -7
  254. package/esm/parts/chat-empty-state/config/useValidateProps.js.map +0 -7
  255. package/esm/parts/chat-empty-state/props.js.map +0 -7
  256. package/esm/parts/chat-empty-state/styled.js.map +0 -7
  257. package/esm/parts/chat-sidebar/SideBarChat.js.map +0 -7
  258. package/esm/parts/chat-sidebar/config/useValidateProps.js.map +0 -7
  259. package/esm/parts/chat-sidebar/index.js.map +0 -7
  260. package/esm/parts/chat-sidebar/props.js.map +0 -7
  261. package/esm/parts/chat-sidebar/styled.js.map +0 -7
  262. package/esm/parts/floating-button/FloatingButton.js.map +0 -7
  263. package/esm/parts/floating-button/index.js.map +0 -7
  264. package/esm/parts/floating-button/props.js.map +0 -7
  265. package/esm/parts/floating-button/styled.js.map +0 -7
  266. package/esm/parts/floating-container/styled.js.map +0 -7
  267. package/esm/parts/grid-influencer/InfluencerContainer.js.map +0 -7
  268. package/esm/parts/grid-influencer/styled.js.map +0 -7
  269. package/esm/parts/message-delimiter/MessageDelimiter.js.map +0 -7
  270. package/esm/parts/message-delimiter/config/useValidateProps.js.map +0 -7
  271. package/esm/parts/message-delimiter/index.js.map +0 -7
  272. package/esm/parts/message-delimiter/props.js.map +0 -7
  273. package/esm/parts/message-delimiter/styled.js.map +0 -7
  274. package/esm/parts/sidebar-button/SidebarButton.js.map +0 -7
  275. package/esm/parts/sidebar-button/index.js.map +0 -7
  276. package/esm/parts/sidebar-button/props.js.map +0 -7
  277. package/esm/parts/sidebar-button/styled.js.map +0 -7
  278. package/esm/parts/system-message/SystemMessage.js.map +0 -7
  279. package/esm/parts/system-message/config/useValidateProps.js.map +0 -7
  280. package/esm/parts/system-message/index.js.map +0 -7
  281. package/esm/parts/system-message/props.js.map +0 -7
  282. package/esm/parts/system-message/style.js.map +0 -7
  283. package/esm/parts/tile-button/TileButton.js.map +0 -7
  284. package/esm/parts/tile-button/config/useValidateProps.js.map +0 -7
  285. package/esm/parts/tile-button/index.js.map +0 -7
  286. package/esm/parts/tile-button/props.js.map +0 -7
  287. package/esm/parts/tile-button/styled.js.map +0 -7
  288. package/esm/prop-types.js.map +0 -7
  289. package/esm/styled.js.map +0 -7
  290. package/esm/tests/utils.js +0 -37
  291. package/esm/tests/utils.js.map +0 -7
package/esm/prop-types.js CHANGED
@@ -1,31 +1,28 @@
1
- import * as React from "react";
2
- import { PropTypes } from "react-desc";
3
- import { noop } from "lodash";
1
+ import { PropTypes } from 'react-desc';
2
+ import { noop } from 'lodash';
3
+
4
4
  const defaultProps = {
5
5
  expanded: false,
6
6
  expandedWidth: 348,
7
- openedItem: void 0,
7
+ openedItem: undefined,
8
8
  onFooterExpand: noop,
9
9
  onFooterClose: noop,
10
10
  floating: false,
11
11
  onHeaderExpand: noop,
12
12
  onHeaderClose: noop,
13
- title: "Header Title"
13
+ title: 'Header Title'
14
14
  };
15
15
  const chatProps = {
16
16
  containerProps: PropTypes.shape({}).defaultValue({}),
17
- expanded: PropTypes.bool.description("Whether to show the chat expanded or collapsed").defaultValue(defaultProps.expanded),
18
- expandedWidth: PropTypes.number.description("Total width attached to the expanded Chat").defaultValue(defaultProps.expandedWidth),
19
- openedItem: PropTypes.string.description("The id of the chat item you want to be opened").defaultValue(defaultProps.openedItem),
20
- messages: PropTypes.arrayOf(PropTypes.object).description("The array of out-of-the-box items you want to render inside the container list of the chat").defaultValue(defaultProps.openedItem),
21
- onFooterExpand: PropTypes.func.description("The function to call when the chat is opened via the footer").defaultValue(defaultProps.onFooterExpand),
22
- onFooterClose: PropTypes.func.description("The function to call when the chat is closed via the footer").defaultValue(defaultProps.onFooterClose),
23
- onHeaderExpand: PropTypes.func.description("The function to call when the chat is opened via the header").defaultValue(defaultProps.onHeaderExpand),
24
- onHeaderClose: PropTypes.func.description("The function to call when the chat is closed via the header").defaultValue(defaultProps.onHeaderClose),
25
- floating: PropTypes.bool.description("Whether to show the chat as floating chat or not").defaultValue(defaultProps.floating)
17
+ expanded: PropTypes.bool.description('Whether to show the chat expanded or collapsed').defaultValue(defaultProps.expanded),
18
+ expandedWidth: PropTypes.number.description('Total width attached to the expanded Chat').defaultValue(defaultProps.expandedWidth),
19
+ openedItem: PropTypes.string.description('The id of the chat item you want to be opened').defaultValue(defaultProps.openedItem),
20
+ messages: PropTypes.arrayOf(PropTypes.object).description('The array of out-of-the-box items you want to render inside the container list of the chat').defaultValue(defaultProps.openedItem),
21
+ onFooterExpand: PropTypes.func.description('The function to call when the chat is opened via the footer').defaultValue(defaultProps.onFooterExpand),
22
+ onFooterClose: PropTypes.func.description('The function to call when the chat is closed via the footer').defaultValue(defaultProps.onFooterClose),
23
+ onHeaderExpand: PropTypes.func.description('The function to call when the chat is opened via the header').defaultValue(defaultProps.onHeaderExpand),
24
+ onHeaderClose: PropTypes.func.description('The function to call when the chat is closed via the header').defaultValue(defaultProps.onHeaderClose),
25
+ floating: PropTypes.bool.description('Whether to show the chat as floating chat or not').defaultValue(defaultProps.floating)
26
26
  };
27
- export {
28
- chatProps,
29
- defaultProps
30
- };
31
- //# sourceMappingURL=prop-types.js.map
27
+
28
+ export { chatProps, defaultProps };
package/esm/styled.js CHANGED
@@ -1,16 +1,8 @@
1
- import * as React from "react";
2
1
  const MIN_WIDTH_SIDEBAR = 48;
3
2
  const BUTTON_SIDEBAR_HEIGHT = 48;
4
3
  const BUTTON_FLOATING = 56;
5
- const BOX_SHADOW = "0 5px 8px 0 rgba(53,60,70,0.55)";
6
- const BOX_SHADOW_FLOATING = "0 5px 8px 0 rgba(53,60,70,0.35)";
7
- const BOX_SHADOW_INSET = `inset 100px 3px 4px 0 rgba(53,60,70,0.50)`;
8
- export {
9
- BOX_SHADOW,
10
- BOX_SHADOW_FLOATING,
11
- BOX_SHADOW_INSET,
12
- BUTTON_FLOATING,
13
- BUTTON_SIDEBAR_HEIGHT,
14
- MIN_WIDTH_SIDEBAR
15
- };
16
- //# sourceMappingURL=styled.js.map
4
+ const BOX_SHADOW = '0 5px 8px 0 rgba(53,60,70,0.55)';
5
+ const BOX_SHADOW_FLOATING = '0 5px 8px 0 rgba(53,60,70,0.35)';
6
+ const BOX_SHADOW_INSET = "inset 100px 3px 4px 0 rgba(53,60,70,0.50)";
7
+
8
+ export { BOX_SHADOW, BOX_SHADOW_FLOATING, BOX_SHADOW_INSET, BUTTON_FLOATING, BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-chat",
3
- "version": "2.2.0-alpha.5",
3
+ "version": "2.2.0-beta.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Chat",
6
6
  "module": "./esm/index.js",
@@ -305,15 +305,15 @@
305
305
  "generateSubmodules": true
306
306
  },
307
307
  "dependencies": {
308
- "@elliemae/ds-banner": "2.2.0-alpha.5",
309
- "@elliemae/ds-button": "2.2.0-alpha.5",
310
- "@elliemae/ds-grid": "2.2.0-alpha.5",
311
- "@elliemae/ds-icons": "2.2.0-alpha.5",
312
- "@elliemae/ds-indeterminate-progress-indicator": "2.2.0-alpha.5",
313
- "@elliemae/ds-props-helpers": "2.2.0-alpha.5",
314
- "@elliemae/ds-system": "2.2.0-alpha.5",
315
- "@elliemae/ds-tooltip": "2.2.0-alpha.5",
316
- "@elliemae/ds-truncated-tooltip-text": "2.2.0-alpha.5",
308
+ "@elliemae/ds-banner": "2.2.0-beta.0",
309
+ "@elliemae/ds-button": "2.2.0-beta.0",
310
+ "@elliemae/ds-grid": "2.2.0-beta.0",
311
+ "@elliemae/ds-icons": "2.2.0-beta.0",
312
+ "@elliemae/ds-indeterminate-progress-indicator": "2.2.0-beta.0",
313
+ "@elliemae/ds-props-helpers": "2.2.0-beta.0",
314
+ "@elliemae/ds-system": "2.2.0-beta.0",
315
+ "@elliemae/ds-tooltip": "2.2.0-beta.0",
316
+ "@elliemae/ds-truncated-tooltip-text": "2.2.0-beta.0",
317
317
  "prop-types": "~15.7.2",
318
318
  "react-desc": "~4.1.2",
319
319
  "react-virtual": "~2.3.2"
@@ -23,7 +23,7 @@ declare const ChatBubble: {
23
23
  };
24
24
  };
25
25
  declare const ChatBubbleWithSchema: {
26
- (props?: BubbleProps | undefined): JSX.Element;
26
+ (props?: unknown): JSX.Element;
27
27
  propTypes: unknown;
28
28
  toTypescript: () => import("react-desc").TypescriptSchema;
29
29
  };
@@ -26,7 +26,7 @@ declare const ChatCard: {
26
26
  };
27
27
  };
28
28
  declare const ChatCardWithSchema: {
29
- (props?: CardPropTypes | undefined): JSX.Element;
29
+ (props?: unknown): JSX.Element;
30
30
  propTypes: unknown;
31
31
  toTypescript: () => import("react-desc").TypescriptSchema;
32
32
  };
@@ -10,6 +10,9 @@ declare const ChatComposer: {
10
10
  inputValue: {
11
11
  deprecated: import("react-desc").PropTypesDescValidator;
12
12
  };
13
+ ariaMaxLengthMessage: {
14
+ deprecated: import("react-desc").PropTypesDescValidator;
15
+ };
13
16
  maxLengthMessage: {
14
17
  deprecated: import("react-desc").PropTypesDescValidator;
15
18
  };
@@ -50,7 +53,7 @@ declare const ChatComposer: {
50
53
  defaultProps: ChatComposerProps;
51
54
  };
52
55
  declare const ChatComposerWithSchema: {
53
- (props?: ChatComposerProps | undefined): JSX.Element;
56
+ (props?: unknown): JSX.Element;
54
57
  propTypes: unknown;
55
58
  toTypescript: () => import("react-desc").TypescriptSchema;
56
59
  };
@@ -56,7 +56,7 @@ declare const ChatContainer: {
56
56
  defaultProps: ChatContainerProps;
57
57
  };
58
58
  declare const ChatContainerWithSchema: {
59
- (props?: ChatContainerProps | undefined): JSX.Element;
59
+ (props?: unknown): JSX.Element;
60
60
  propTypes: unknown;
61
61
  toTypescript: () => import("react-desc").TypescriptSchema;
62
62
  };
@@ -41,7 +41,7 @@ declare const ChatContainerMessagesList: {
41
41
  defaultProps: ChatContainerMessagesListProps;
42
42
  };
43
43
  declare const ChatContainerMessagesListWithSchema: {
44
- (props?: ChatContainerMessagesListProps | undefined): JSX.Element;
44
+ (props?: unknown): JSX.Element;
45
45
  propTypes: unknown;
46
46
  toTypescript: () => import("react-desc").TypescriptSchema;
47
47
  };
@@ -14,7 +14,7 @@ declare const ChatEmptyState: {
14
14
  defaultProps: ChatEmptyStateProps;
15
15
  };
16
16
  declare const ChatEmptyStateListWithSchema: {
17
- (props?: ChatEmptyStateProps | undefined): JSX.Element;
17
+ (props?: unknown): JSX.Element;
18
18
  propTypes: unknown;
19
19
  toTypescript: () => import("react-desc").TypescriptSchema;
20
20
  };
@@ -41,7 +41,7 @@ declare const SideBarChat: {
41
41
  defaultProps: CharSidebarProps;
42
42
  };
43
43
  declare const SideBarChatWithSchema: {
44
- (props?: CharSidebarProps | undefined): JSX.Element;
44
+ (props?: unknown): JSX.Element;
45
45
  propTypes: unknown;
46
46
  toTypescript: () => import("react-desc").TypescriptSchema;
47
47
  };
@@ -24,7 +24,7 @@ declare const MessageDelimiter: {
24
24
  };
25
25
  };
26
26
  declare const MessageDelimiterWithSchema: {
27
- (props?: MessageDelimiterProps | undefined): JSX.Element;
27
+ (props?: unknown): JSX.Element;
28
28
  propTypes: unknown;
29
29
  toTypescript: () => import("react-desc").TypescriptSchema;
30
30
  };
@@ -16,7 +16,7 @@ declare const SystemMessage: {
16
16
  };
17
17
  };
18
18
  declare const SystemMessageWithSchema: {
19
- (props?: SystemMessageProps | undefined): JSX.Element;
19
+ (props?: unknown): JSX.Element;
20
20
  propTypes: unknown;
21
21
  toTypescript: () => import("react-desc").TypescriptSchema;
22
22
  };
@@ -68,7 +68,7 @@ declare const TileButton: {
68
68
  defaultProps: TileButtonProps;
69
69
  };
70
70
  declare const TileButtonWithSchema: {
71
- (props?: TileButtonProps | undefined): JSX.Element;
71
+ (props?: unknown): JSX.Element;
72
72
  propTypes: unknown;
73
73
  toTypescript: () => import("react-desc").TypescriptSchema;
74
74
  };
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/ChatDataTestids.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const ChatDataTestIds = {\n COMPOSER_TEXTAREA: 'chat-composer-textarea',\n COMPOSER_SEND_BUTTON: 'chat-composer-send-button',\n CARD_TITLE: 'chat-card-title',\n CARD_WRAPPER: 'chat-card-wrapper',\n CARD_TIME: 'chat-card-time',\n CARD_RIGHT_ADDON: 'chat-right-addon',\n CARD_CONTENT: 'chat-card-content',\n LOADING_INDICATOR: 'ds-chat-loading-indicator',\n HEADER_TITLE: 'chat-header-title',\n HEADER_CHILDREN: 'chat-header-children',\n THREAD_CONTAINER: 'chat-thread-container',\n LOAD_MORE_BUTTON: 'ds-chat-load-more-btn',\n FLOATING_BUTTON: 'chat-floating-button',\n SYSTEM_MSG_TITLE: 'chat-system-message-title',\n SYSTEM_MSG_BODY: 'chat-system-message-body',\n SYSTEM_MSG_TIME: 'chat-system-message-time',\n BUBBLE: 'ds-chat-bubble',\n BUBBLE_TITLE: 'chat-bubble-title',\n BUBBLE_BODY: 'chat-bubble-body',\n BANNER: 'ds-banner-container',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,kBAAkB;AAAA,EAC7B,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,aAAa;AAAA,EACb,QAAQ;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.d.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { VirtualItem } from 'react-virtual';\n\nexport type TypescriptVirtualListHelpers = {\n virtualItems: VirtualItem[];\n totalSize: number;\n scrollToOffset: (\n index: number,\n options?: {\n align: 'start' | 'center' | 'end' | 'auto';\n },\n ) => void;\n scrollToIndex: (\n index: number,\n options?: {\n align: 'start' | 'center' | 'end' | 'auto';\n },\n ) => void;\n measure: () => void;\n} | null;\nexport interface ChatProps {\n expanded: boolean;\n expandedWidth: number;\n openedItem?: string | number;\n onFooterExpand: () => void;\n onFooterClose: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n floating?: boolean;\n title: string;\n}\n\nexport interface UseChatConfig {\n props: ChatProps;\n}\n\nexport interface UseChatAPI {\n props: ChatProps;\n virtualListHelpers: TypescriptVirtualListHelpers;\n virtualListRef: React.RefObject<HTMLElement>;\n}\n\nexport interface HeaderContainerListProps\n extends Pick<\n ChatProps,\n 'expanded' | 'onHeaderClose' | 'onHeaderExpand' | 'floating'\n > {\n title: string;\n}\n\nexport interface ComposerContainerProps extends Pick<ChatProps, 'floating'> {}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
6
- "names": []
7
- }
package/cjs/index.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["// Bubble\nexport { ChatBubble, ChatBubbleWithSchema, BUBBLE_TYPES } from './parts/bubble';\n// Floating Button\nexport { FloatingButton } from './parts/floating-button';\nexport { StyledFloatingContainer } from './parts/floating-container/styled';\n// Chat Header\nexport { ChatContainerHeader } from './parts/chat-container-header/ChatContainerHeader';\n// Chat Empty State\nexport { ChatEmptyState } from './parts/chat-empty-state/ChatEmptyState';\n\n// Chat List\nexport { ChatContainerMessagesList, ChatContainerMessagesListWithSchema } from './parts/chat-container-messages-list';\n// Chat Composer\nexport { ChatComposer, ChatComposerWithSchema } from './parts/chat-composer/ChatContainerComposer';\n// Chat Sidebar\nexport { SideBarChat, SideBarChatWithSchema } from './parts/chat-sidebar';\n// Chat Container\nexport { ChatContainer, ChatContainerWithSchema } from './parts/chat-container';\n// Tile\nexport { TileButton, TileButtonWithSchema } from './parts/tile-button';\n// MessageDelimiter\nexport { MessageDelimiter, MessageDelimiterWithSchema } from './parts/message-delimiter';\n// SystemMessage\nexport { SystemMessage, SystemMessageWithSchema } from './parts/system-message';\n// ChatCard\nexport { ChatCard, ChatCardWithSchema } from './parts/chat-card';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,oBAA+D;AAE/D,6BAA+B;AAC/B,oBAAwC;AAExC,iCAAoC;AAEpC,4BAA+B;AAG/B,0CAA+E;AAE/E,mCAAqD;AAErD,0BAAmD;AAEnD,4BAAuD;AAEvD,yBAAiD;AAEjD,+BAA6D;AAE7D,4BAAuD;AAEvD,uBAA6C;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/bubble/ChatBubble.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { describe } from 'react-desc';\nimport { WarningCircleFill } from '@elliemae/ds-icons';\nimport {\n StyledWrapper,\n StyledColoredBubble,\n StyledTitleBubble,\n StyledTitleLeftBubble,\n StyledTitleRightBubble,\n StyleBodyWrapper,\n StyleErrorMessage,\n StyleHelpMessage,\n} from './styled';\nimport { propsBubbles, BubbleProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\nimport { ChatBubbleArrow } from './ChatBubbleArrow';\n\nconst ChatBubble = (props: BubbleProps): JSX.Element => {\n useValidateProps(props, ChatBubbleWithSchema.toJSON());\n\n const { dsId, type, title, time, body, errorMessage, helpMessage } = props;\n const bodyParts = React.useMemo(() => (typeof body === 'string' ? body.split('\\n') : [body]), [body]);\n\n return (\n <StyledWrapper data-testid={`ds-chat-bubble-${dsId}`} type={type}>\n <StyledColoredBubble type={type}>\n <StyledTitleBubble cols={[1, 'auto']} gutter=\"xs\" alignItems=\"flex-end\" className=\"sr-only\">\n <StyledTitleLeftBubble alignItems=\"center\" data-testid={`chat-bubble-title-${dsId}`}>\n {title}\n </StyledTitleLeftBubble>\n <StyledTitleRightBubble alignItems=\"center\" type={type} data-testid={`chat-bubble-time-${dsId}`}>\n {time}\n </StyledTitleRightBubble>\n </StyledTitleBubble>\n <StyleBodyWrapper data-testid={`chat-bubble-body-${dsId}`}>\n {bodyParts.map((item, index) => (\n <React.Fragment key={`${item}-${index}`}>\n {item}\n {index < bodyParts.length - 1 ? <br /> : null}\n </React.Fragment>\n ))}\n </StyleBodyWrapper>\n <ChatBubbleArrow type={type} />\n </StyledColoredBubble>\n {errorMessage ? (\n <StyleErrorMessage data-testid={`chat-bubble-error-message-${dsId}`} p=\"xxs\" gutter=\"xxs\" cols={[1, 'auto']}>\n <span>{errorMessage}</span>\n <WarningCircleFill />\n </StyleErrorMessage>\n ) : null}\n {helpMessage ? (\n <StyleHelpMessage data-testid={`chat-bubble-help-message-${dsId}`} p=\"xxs\" gutter=\"xxs\" cols={[1, 'auto']}>\n <span>{helpMessage}</span>\n </StyleHelpMessage>\n ) : null}\n </StyledWrapper>\n );\n};\nChatBubble.propTypes = propsBubbles;\n\nconst ChatBubbleWithSchema = describe(ChatBubble);\nChatBubbleWithSchema.propTypes = propsBubbles;\n\nexport { ChatBubble, ChatBubbleWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAyB;AACzB,sBAAkC;AAClC,oBASO;AACP,mBAA0C;AAC1C,8BAAiC;AACjC,6BAAgC;AAEhC,MAAM,aAAa,CAAC,UAAoC;AACtD,gDAAiB,OAAO,qBAAqB;AAE7C,QAAM,EAAE,MAAM,MAAM,OAAO,MAAM,MAAM,cAAc,gBAAgB;AACrE,QAAM,YAAY,qBAAM,QAAQ,MAAO,OAAO,SAAS,WAAW,KAAK,MAAM,QAAQ,CAAC,OAAQ,CAAC;AAE/F,SACE,mDAAC,6BAAD;AAAA,IAAe,eAAa,kBAAkB;AAAA,IAAQ;AAAA,KACpD,mDAAC,mCAAD;AAAA,IAAqB;AAAA,KACnB,mDAAC,iCAAD;AAAA,IAAmB,MAAM,CAAC,GAAG;AAAA,IAAS,QAAO;AAAA,IAAK,YAAW;AAAA,IAAW,WAAU;AAAA,KAChF,mDAAC,qCAAD;AAAA,IAAuB,YAAW;AAAA,IAAS,eAAa,qBAAqB;AAAA,KAC1E,QAEH,mDAAC,sCAAD;AAAA,IAAwB,YAAW;AAAA,IAAS;AAAA,IAAY,eAAa,oBAAoB;AAAA,KACtF,QAGL,mDAAC,gCAAD;AAAA,IAAkB,eAAa,oBAAoB;AAAA,KAChD,UAAU,IAAI,CAAC,MAAM,UACpB,mDAAC,qBAAM,UAAP;AAAA,IAAgB,KAAK,GAAG,QAAQ;AAAA,KAC7B,MACA,QAAQ,UAAU,SAAS,IAAI,mDAAC,MAAD,QAAS,SAI/C,mDAAC,wCAAD;AAAA,IAAiB;AAAA,OAElB,eACC,mDAAC,iCAAD;AAAA,IAAmB,eAAa,6BAA6B;AAAA,IAAQ,GAAE;AAAA,IAAM,QAAO;AAAA,IAAM,MAAM,CAAC,GAAG;AAAA,KAClG,mDAAC,QAAD,MAAO,eACP,mDAAC,mCAAD,SAEA,MACH,cACC,mDAAC,gCAAD;AAAA,IAAkB,eAAa,4BAA4B;AAAA,IAAQ,GAAE;AAAA,IAAM,QAAO;AAAA,IAAM,MAAM,CAAC,GAAG;AAAA,KAChG,mDAAC,QAAD,MAAO,gBAEP;AAAA;AAIV,WAAW,YAAY;AAEvB,MAAM,uBAAuB,gCAAS;AACtC,qBAAqB,YAAY;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/bubble/ChatBubbleArrow.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { StyledBubbleArrow } from './styled';\nimport { BUBBLE_TYPES, BubbleProps, propsArrowBubble } from './props';\n\nexport const ChatBubbleArrow = ({ type }: Pick<BubbleProps, 'type'>): JSX.Element => (\n <StyledBubbleArrow>\n {type === BUBBLE_TYPES.RECIPIENT ? (\n <svg width=\"15px\" height=\"14px\" viewBox=\"0 0 15 14\">\n <defs>\n <path\n d=\"M12,8.5 C12,7.9373169 11.6782751,7.4856453 11.2282104,7.196228 C11.2286673,7.1967363 3,2 3,2 L3,10 L10.5627441,10 L10.5658569,9.9933472 C11.3630371,9.9580688 12,9.3058472 12,8.5 Z\"\n id=\"path-chat-bubble\"\n ></path>\n <filter x=\"-55.6%\" y=\"-50.0%\" width=\"211.1%\" height=\"225.0%\" filterUnits=\"objectBoundingBox\" id=\"filter-2\">\n <feOffset dx=\"2.3\" dy=\"1.2\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\"></feOffset>\n <feGaussianBlur stdDeviation=\"1.5\" in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\"></feGaussianBlur>\n <feColorMatrix\n values=\"0 0 0 0 0.207843137 \n 0 0 0 0 0.235294118 \n 0 0 0 0 0.274509804 \n 0 0 0 0.8 0\"\n type=\"matrix\"\n in=\"shadowBlurOuter1\"\n ></feColorMatrix>\n </filter>\n </defs>\n <g id=\"[DSK]-Visual-Design\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <g id=\"Path-Copy\" transform=\"translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) \">\n <use fill=\"black\" fillOpacity=\"1\" filter=\"url(#filter-2)\" xlinkHref=\"#path-chat-bubble\"></use>\n <use fill=\"#FFFFFF\" fillRule=\"evenodd\" xlinkHref=\"#path-chat-bubble\"></use>\n </g>\n </g>\n </svg>\n ) : (\n <svg width=\"9px\" height=\"8px\" viewBox=\"0 0 9 8\">\n <g stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <path\n d=\"M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z\"\n id=\"Path\"\n fill=\"#1E79C2\"\n ></path>\n </g>\n </svg>\n )}\n </StyledBubbleArrow>\n);\n\nChatBubbleArrow.propTypes = propsArrowBubble;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,Y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;AAAA,EACE,GAAE;AAAA,EACF,IAAG;AAAA,EACH,MAAK;AAAA;AAQjB,gBAAgB,YAAY;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/parts/bubble/config/useValidateProps.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { BubbleProps } from '../props';\n\nconst throwError = (message: string): void => {\n throw new Error(\n `Bubble:: ${message}\n `,\n );\n};\n\nexport const useValidateProps = (props: BubbleProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n if (typeof props.title === 'undefined') {\n throwError(`Please provide a title property to use this component.`);\n }\n if (typeof props.time === 'undefined') {\n throwError(`Please provide a time property to use this component.`);\n }\n if (typeof props.body === 'undefined') {\n throwError(`Please provide a body property to use this component.`);\n }\n if (typeof props.type === 'undefined') {\n throwError(`Please provide a type property to use this component.`);\n }\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAqC;AAGrC,MAAM,aAAa,CAAC,YAA0B;AAC5C,QAAM,IAAI,MACR,YAAY;AAAA;AAAA;AAKT,MAAM,mBAAmB,CAAC,OAAoB,WAA0B;AAC7E,oDAAqB,OAAO;AAC5B,MAAI,OAAO,MAAM,UAAU,aAAa;AACtC,eAAW;AAAA;AAEb,MAAI,OAAO,MAAM,SAAS,aAAa;AACrC,eAAW;AAAA;AAEb,MAAI,OAAO,MAAM,SAAS,aAAa;AACrC,eAAW;AAAA;AAEb,MAAI,OAAO,MAAM,SAAS,aAAa;AACrC,eAAW;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/bubble/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { ChatBubble, ChatBubbleWithSchema } from './ChatBubble';\nexport { BUBBLE_TYPES } from './props';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAiD;AACjD,mBAA6B;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/bubble/props.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import propTypes from 'prop-types';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport React from 'react';\n\n/**\n *\n * BUBBLE\n *\n */\nexport const BUBBLE_TYPES = {\n SENDER: 'SENDER',\n RECIPIENT: 'RECIPIENT',\n DELIMITER: 'DELIMITER',\n SYSTEM: 'SYSTEM',\n};\n\nexport type BubbleTypesKeys = keyof typeof BUBBLE_TYPES;\nexport type BubbleTypesValues = typeof BUBBLE_TYPES[BubbleTypesKeys];\n\nexport interface BubbleProps {\n dsId: string | number;\n type: BubbleTypesValues;\n title: string;\n body: string;\n time: string;\n errorMessage: string | React.ReactChild;\n helpMessage: string | React.ReactChild;\n onClick: (id: string | number) => void;\n}\n\nexport const defaultBubbleProps: BubbleProps = {\n dsId: undefined,\n type: BUBBLE_TYPES.SENDER,\n title: undefined,\n time: undefined,\n body: undefined,\n onClick: noop,\n errorMessage: undefined,\n helpMessage: undefined,\n};\n\nexport const propsBubbles = {\n dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n .description('Unique id for bubble')\n .defaultValue(defaultBubbleProps.dsId),\n type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER])\n .isRequired.description('Define bubble type ')\n .defaultValue(defaultBubbleProps.type),\n title: PropTypes.string.isRequired.description('Title of the bubble').defaultValue(defaultBubbleProps.title),\n time: PropTypes.string.isRequired.description('Time of the bubble').defaultValue(defaultBubbleProps.title),\n body: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .isRequired.description('Bubble content')\n .defaultValue(defaultBubbleProps.body),\n onClick: PropTypes.string.description('Callback when the bubble is tapped').defaultValue(defaultBubbleProps.onClick),\n errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .description('Error message to display at bottom of the bubble')\n .defaultValue(defaultBubbleProps.onClick),\n helpMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .description('Help message to display at bottom of the bubble')\n .defaultValue(defaultBubbleProps.onClick),\n};\n\n/**\n *\n * BUBBLE ARROW\n *\n */\nexport const propsArrowBubble = {\n type: propTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAsB;AACtB,wBAA0B;AAC1B,oBAAqB;AAQd,MAAM,eAAe;AAAA,EAC1B,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,WAAW;AAAA,EACX,QAAQ;AAAA;AAiBH,MAAM,qBAAkC;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,aAAa;AAAA,EACnB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AAAA,EACT,cAAc;AAAA,EACd,aAAa;AAAA;AAGR,MAAM,eAAe;AAAA,EAC1B,MAAM,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SACpD,YAAY,wBACZ,aAAa,mBAAmB;AAAA,EACnC,MAAM,4BAAU,MAAM,CAAC,aAAa,WAAW,aAAa,SACzD,WAAW,YAAY,uBACvB,aAAa,mBAAmB;AAAA,EACnC,OAAO,4BAAU,OAAO,WAAW,YAAY,uBAAuB,aAAa,mBAAmB;AAAA,EACtG,MAAM,4BAAU,OAAO,WAAW,YAAY,sBAAsB,aAAa,mBAAmB;AAAA,EACpG,MAAM,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,UACpD,WAAW,YAAY,kBACvB,aAAa,mBAAmB;AAAA,EACnC,SAAS,4BAAU,OAAO,YAAY,sCAAsC,aAAa,mBAAmB;AAAA,EAC5G,cAAc,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,UAC5D,YAAY,oDACZ,aAAa,mBAAmB;AAAA,EACnC,aAAa,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,UAC3D,YAAY,mDACZ,aAAa,mBAAmB;AAAA;AAQ9B,MAAM,mBAAmB;AAAA,EAC9B,MAAM,0BAAU,MAAM,CAAC,aAAa,WAAW,aAAa;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/bubble/styled.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BUBBLE_TYPES } from './props';\n\n// Bubble WRAPPER\nexport const StyledWrapper = styled.div<any>`\n min-width: 224px;\n border-radius: 10px;\n`;\n\n// Bubble HEADER\nexport const StyledTitleBubble = styled(Grid)`\n padding-top: 6px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 4px;\n`;\n\nexport const StyledTitleLeftBubble = styled(Grid)`\n font-size: 13px;\n font-weight: 600;\n`;\nexport const StyledTitleRightBubble = styled(Grid)`\n font-size: 13px;\n font-weight: 400;\n color: ${(props) => (props.type === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489')};\n`;\n\nexport const StyleBodyWrapper = styled.div<any>`\n font-size: 13px;\n font-weight: 400;\n line-height: 15px;\n min-height: 18px;\n padding: 0px 10px 8px 10px;\n`;\n\nexport const StyleErrorMessage = styled.div<any>`\n font-size: 12px;\n font-weight: 400;\n padding-top: ${(props) => props.theme.space.xxxs};\n color: ${(props) => props.theme.colors.danger[900]};\n align-items: flex-end;\n justify-content: center;\n text-align: right;\n line-height: 15px;\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n .em-ds-icon {\n margin-left: 8px;\n }\n`;\n\nexport const StyleHelpMessage = styled(StyleErrorMessage)`\n font-size: 12px;\n line-height: 15px;\n color: ${(props) => props.theme.colors.neutral[500]};\n svg {\n fill: ${(props) => props.theme.colors.danger[500]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[500]};\n }\n`;\n\n// bubble sender/ recipient\nexport const StyledBubbleArrow = styled.div<any>`\n display: block;\n content: '';\n position: absolute;\n bottom: 10px;\n height: 15px;\n`;\n\nexport const StyledColoredBubble = styled.div<any>`\n min-width: 224px;\n border-radius: 10px;\n position: relative;\n\n ${(props) =>\n props.type === BUBBLE_TYPES.SENDER\n ? `\n border: 1px solid ${props.theme.colors.brand['700']};\n background: ${props.theme.colors.brand[600]};\n color: ${props.theme.colors.neutral['000']};\n ${StyledBubbleArrow}{ \n right: -9px;\n bottom: 6px;\n svg{\n fill: ${props.theme.colors.brand[600]};\n }\n }\n\n a {\n color: #FFF;\n }\n\n `\n : `\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ${props.theme.colors.neutral['000']};\n color: ${props.theme.colors.neutral[700]};\n\n ${StyledBubbleArrow}{ \n left: -11px;\n bottom: 6px;\n svg{\n fill: ${props.theme.colors.neutral['000']};\n }\n }\n\n `}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,+BAAmB;AACnB,qBAAqB;AACrB,mBAA6B;AAGtB,MAAM,gBAAgB,iCAAO;AAAA;AAAA;AAAA;AAM7B,MAAM,oBAAoB,sCA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;AAAA,iBAChC,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,UAElC;AAAA;AAAA;AAAA;AAAA,wBAIc,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-card/ChatCard.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { describe } from 'react-desc';\n\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { propTypes, CardPropTypes } from './props';\nimport { useValidateProps } from './config/useValidateProps';\nimport { Wrapper, MainContent, Title, Content, Time, RightAddon } from './styled';\n\nconst ChatCard = (props: CardPropTypes): JSX.Element => {\n useValidateProps(props, ChatCardWithSchema.toJSON());\n const { title, content, time, rightAddon } = props;\n return (\n <Wrapper cols={['1fr', 'auto']} data-testid=\"chat-card-wrapper\">\n <MainContent>\n <Title data-testid=\"chat-card-title\">{title}</Title>\n <Content data-testid=\"chat-card-content\">\n <SimpleTruncatedTooltipText value={content} />\n </Content>\n {time && <Time data-testid=\"chat-card-time\">{time}</Time>}\n </MainContent>\n {rightAddon && <RightAddon data-testid=\"chat-card-right-addon\">{rightAddon}</RightAddon>}\n </Wrapper>\n );\n};\n\nChatCard.propTypes = propTypes;\nconst ChatCardWithSchema = describe(ChatCard);\nChatCardWithSchema.propTypes = propTypes;\n\nexport { ChatCard, ChatCardWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAyB;AAEzB,uCAA2C;AAC3C,mBAAyC;AACzC,8BAAiC;AACjC,oBAAuE;AAEvE,MAAM,WAAW,CAAC,UAAsC;AACtD,gDAAiB,OAAO,mBAAmB;AAC3C,QAAM,EAAE,OAAO,SAAS,MAAM,eAAe;AAC7C,SACE,mDAAC,uBAAD;AAAA,IAAS,MAAM,CAAC,OAAO;AAAA,IAAS,eAAY;AAAA,KAC1C,mDAAC,2BAAD,MACE,mDAAC,qBAAD;AAAA,IAAO,eAAY;AAAA,KAAmB,QACtC,mDAAC,uBAAD;AAAA,IAAS,eAAY;AAAA,KACnB,mDAAC,6DAAD;AAAA,IAA4B,OAAO;AAAA,OAEpC,QAAQ,mDAAC,oBAAD;AAAA,IAAM,eAAY;AAAA,KAAkB,QAE9C,cAAc,mDAAC,0BAAD;AAAA,IAAY,eAAY;AAAA,KAAyB;AAAA;AAKtE,SAAS,YAAY;AACrB,MAAM,qBAAqB,gCAAS;AACpC,mBAAmB,YAAY;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/parts/chat-card/config/useValidateProps.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { CardPropTypes } from '../props';\n\nexport const useValidateProps = (props: CardPropTypes, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAqC;AAG9B,MAAM,mBAAmB,CAAC,OAAsB,WAA0B;AAC/E,oDAAqB,OAAO;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-card/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { ChatCard, ChatCardWithSchema } from './ChatCard';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sBAA6C;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-card/props.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n title: PropTypes.string.isRequired.description(`Card's title`),\n content: PropTypes.string.description(`Card's content`),\n time: PropTypes.string.description('Time'),\n rightAddon: PropTypes.element.description('Right addon, badge or icon'),\n};\n\nexport interface CardPropTypes {\n title: string;\n content: string;\n time: string;\n rightAddon: JSX.Element;\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAEnB,MAAM,YAAY;AAAA,EACvB,OAAO,4BAAU,OAAO,WAAW,YAAY;AAAA,EAC/C,SAAS,4BAAU,OAAO,YAAY;AAAA,EACtC,MAAM,4BAAU,OAAO,YAAY;AAAA,EACnC,YAAY,4BAAU,QAAQ,YAAY;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-card/styled.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const Wrapper = styled(Grid)`\n min-width: 248px;\n border: 1px;\n border-bottom: 1px solid #ccc;\n padding: 12px 12px;\n`;\n\nexport const MainContent = styled.div``;\n\nexport const Title = styled.p`\n font-size: 16px;\n font-weight: 600;\n margin: 0;\n`;\n\nexport const Content = styled.p`\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n margin: 0;\n`;\n\nexport const Time = styled.p`\n font-size: 12px;\n font-weight: 100;\n margin: 0;\n margin-top: 8px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['500']};\n`;\n\nexport const RightAddon = styled.div`\n height: fit-content;\n margin-left: 12px;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AACnB,qBAAqB;AAEd,MAAM,UAAU,sCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOvB,MAAM,cAAc,iCAAO;AAE3B,MAAM,QAAQ,iCAAO;AAAA;AAAA;AAAA;AAAA;AAMrB,MAAM,UAAU,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOvB,MAAM,OAAO,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA,iBAKV,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAG1C,MAAM,aAAa,iCAAO;AAAA;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-composer/ChatContainerComposer.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,qBAAqB;AACrB,wBAAyB;AACzB,sBAA8B;AAC9B,oBAMO;AACP,8BAAiC;AAEjC,mBAAsE;AAGtE,MAAM,eAAe,CAAC,UAA0C;AAC9D,gDAAiB,OAAO,uBAAuB;AAE/C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA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,eAAe;AAC5B,MAAM,yBAAyB,gCAAS;AACxC,uBAAuB,YAAY;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/parts/chat-composer/config/useValidateProps.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAqC;AAG9B,MAAM,mBAAmB,CAAC,OAA0B,WAA0B;AACnF,oDAAqB,OAAO;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-composer/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { ChatComposer, ChatComposerWithSchema } from './ChatContainerComposer';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mCAAqD;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-composer/props.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,wBAA0B;AAC1B,oBAAqB;AAOd,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,4BAAU,OAAO,YAAY,qBAAqB,aAAa,oBAAoB;AAAA,EAChG,YAAY,4BAAU,OAAO,YAAY,eAAe,aAAa,oBAAoB;AAAA,EACzF,kBAAkB,4BAAU,OACzB,YAAY,sBACZ,aAAa,oBAAoB;AAAA,EACpC,UAAU,4BAAU,KAAK,YAAY,8BAA8B,aAAa,oBAAoB;AAAA,EACpG,UAAU,4BAAU,KACjB,YAAY,uCACZ,aAAa,oBAAoB;AAAA,EACpC,QAAQ,4BAAU,KAAK,YAAY,8BAA8B,aAAa,oBAAoB;AAAA,EAClG,SAAS,4BAAU,KAAK,YAAY,eAAe,aAAa,oBAAoB;AAAA,EACpF,QAAQ,4BAAU,KAAK,YAAY,cAAc,aAAa,oBAAoB;AAAA,EAClF,WAAW,4BAAU,KAAK,YAAY,qBAAqB,aAAa,oBAAoB;AAAA,EAC5F,WAAW,4BAAU,OAClB,YAAY,kDACZ,aAAa,oBAAoB;AAAA,EACpC,gBAAgB,4BAAU,OACvB,YAAY,wDACZ,aAAa,oBAAoB;AAAA,EACpC,gBAAgB,4BAAU,KACvB,YAAY,4CACZ,aAAa,oBAAoB;AAAA,EACpC,YAAY,4BAAU,OAAO,YAAY,eAAe,aAAa,oBAAoB;AAAA,EACzF,WAAW,4BAAU,OAClB,YACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAYD,aAAa,oBAAoB;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-composer/styled.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AACnB,qBAAqB;AACrB,uBAAyB;AAIlB,MAAM,qCAAqC,sCAAO;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,iCAAO;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,sCAAO;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,sCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMpC,CAAC,UAAW,MAAM,WAAW,SAAS,MAAM,MAAM,OAAO,OAAO,UAAU;AAAA;AAAA;AAIvE,MAAM,yBAAyB,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-container/ChatContainer.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAkB;AAClB,oBAAqB;AACrB,wBAAyB;AACzB,iDAA6C;AAC7C,uBAAuC;AACvC,2BAA6B;AAC7B,0CAA0C;AAC1C,mBAAiE;AACjE,oBAAuG;AACvG,8BAAiC;AAEjC,MAAM,gBAAgB,CAAC,UAA2C;AAChE,gDAAiB,OAAO;AAExB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe,EAAE,UAAU,kBAAkB,WAAW;AAAA,IACxD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE;AACJ,QAAM,YAAY,qBAAM,OAAO,EAAE,gBAAgB,oBAAM,aAAa;AACpE,QAAM,eAAe,qBAAM;AAC3B,QAAM,UAAU,qBAAM,OAAO,EAAE,eAAe;AAE9C,QAAM,WAAW,qBAAM,YACrB,CAAC,WAAmB;AAClB,QAAI;AAAkB,uBAAiB;AAKvC,eAAW,MAAM;AACf,gBAAU,QAAQ,cAAc,kBAAkB,SAAS,SAAS,GAAG;AAAA,QACrE,OAAO;AAAA;AAAA,OAER;AAAA,KAEL,CAAC,kBAAkB,kBAAkB,UAAU;AAEjD,QAAM,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Y,SAAS;AAAA,IAC5B,gBAAgB,EAAE,IAAI;AAAA,IACtB,YAAY;AAAA,MACV,OAAO,YAAY,aAAa;AAAA,MAChC,SAAS,YAAY;AAAA;AAAA,IAEvB,SAAS,YAAY;AAAA,IACrB,QAAM;AAAA,IACN,MAAM,YAAY,QAAQ,8BAAa;AAAA,IACvC,WAAW;AAAA,OAGd,mBAAmB,gBAAgB,SAAS,IAC3C,mDAAC,wCAAD;AAAA,IAA0B,WAAU;AAAA,IAAS,QAAM;AAAA,IAAC,eAAY;AAAA,KAC9D,mDAAC,oDAAD;AAAA,IAAkC,YAAU;AAAA,IAAC,OAAO;AAAA,IAAa,UAAQ;AAAA,QAEzE,OAEN,mDAAC,mCAAD;AAAA,OACM;AAAA,IACJ,WAAW;AAAA,IACX;AAAA,IACA,WAAY,cAAa,SAAS,gBAAgB,KAAK;AAAA,IACvD,WAAW,aAAa;AAAA;AAAA;AAMhC,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,MAAM,0BAA0B,gCAAS;AACzC,wBAAwB,YAAY;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/parts/chat-container/config/useValidateProps.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAGxC,MAAM,mBAAmB,CAAC,OAA2B,cAA6B;AACvF,8DAA+B,OAAO;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-container/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { ChatContainer, ChatContainerWithSchema } from './ChatContainer';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAAuD;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-container/props.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { BANNER_TYPES } from '@elliemae/ds-banner';\nimport {\n ChatContainerMessagesListProps,\n defaultProps as defaultListProps,\n} from '../chat-container-messages-list/props';\nimport { defaultComposerPros, ChatComposerProps } from '../chat-composer/props';\n\ninterface ChatBannerProps {\n label: string;\n viewLabel: string;\n type?: BANNER_TYPES;\n onView: () => void;\n onClose: () => void;\n}\nexport interface ChatContainerProps {\n messagesListProps: Pick<ChatContainerMessagesListProps, 'messages' | 'onScrollEnds'>;\n composerProps: ChatComposerProps;\n actionRef: PropTypes.func;\n autoScroll: boolean;\n device: 'desktop' | 'mobile';\n isLoading?: 'top' | 'bottom';\n hasMoreItems?: 'top' | 'bottom';\n getMoreMessages: PropTypes.func;\n bannerPosition?: 'top' | 'bottom';\n bannerProps?: ChatBannerProps;\n sendingMessages?: string[] | number[];\n sendingText: string;\n ariaLabel: string;\n}\n\nexport const defaultProps: ChatContainerProps = {\n messagesListProps: defaultListProps,\n composerProps: defaultComposerPros,\n actionRef: undefined,\n autoScroll: false,\n device: 'desktop',\n isLoading: undefined,\n hasMoreItems: undefined,\n getMoreMessages: noop,\n bannerPosition: undefined,\n bannerProps: {\n type: BANNER_TYPES.INFO,\n label: 'Unread Messages',\n viewLabel: 'View',\n onView: noop,\n onClose: noop,\n },\n sendingMessages: undefined,\n sendingText: 'Sending',\n ariaLabel: 'Chat window',\n};\n\nexport const containerProps = {\n messagesListProps: PropTypes.object\n .description('ChatMessageList props \"messages\" / \"onScrollEnds\"')\n .defaultValue(defaultProps.messagesListProps),\n composerProps: PropTypes.object.description('Composer configuration').defaultValue(defaultProps.composerProps),\n autoScroll: PropTypes.bool.description('Auto scroll to bottom on resize').defaultValue(defaultProps.autoScroll),\n device: PropTypes.string\n .description('Option to render mobile or desktop style composer')\n .defaultValue(defaultProps.device),\n isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Loading messages indicator at the `top` or `bottom` of the container',\n ),\n hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Load More button at the `top` or `bottom` of the container',\n ),\n getMoreMessages: PropTypes.func\n .description('Called when the user clicks on load more')\n .defaultValue(defaultProps.getMoreMessages),\n bannerPosition: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Loading messages indicator at the `top` or `bottom` of the container',\n ),\n bannerProps: PropTypes.object\n .description(\n `Banner configuration:\n label: string;\n viewLabel: string;\n type: BANNER_TYPES;\n onView: () => void;\n onClose: () => void;\n `,\n )\n .defaultValue(defaultProps.bannerProps),\n sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)])\n .description('Array of ids of sending messages')\n .defaultValue(defaultProps.sendingMessages),\n sendingText: PropTypes.string\n .description('Label description for messages in sending status')\n .defaultValue(defaultProps.sendingText),\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(defaultProps.actionRef),\n ariaLabel: PropTypes.string\n .description('Aria Label description for chat container')\n .defaultValue(defaultProps.ariaLabel),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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,EAC7B,WAAW,4BAAU,OAClB,YACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAYD,aAAa,aAAa;AAAA,EAC7B,WAAW,4BAAU,OAClB,YAAY,6CACZ,aAAa,aAAa;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-container/styled.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { StyledTitleRightBubble, StyledTitleLeftBubble, StyleBodyWrapper } from '../bubble/styled';\nimport { StyledComposerInput } from '../chat-composer/styled';\nimport { Wrapper, Title, Time, Message } from '../system-message/style';\nexport const CONTAINER_WIDTH = 300;\n\nexport const StyledChatContainerContent = styled(Grid)`\n height: 100%;\n min-width: ${CONTAINER_WIDTH}px;\n overflow: hidden;\n background: ${(props) => props.theme.colors.neutral['050']};\n position: relative;\n`;\nexport const StyledIndicatorContainer = styled.div<{\n isLoading?: 'top' | 'bottom';\n linear?: boolean;\n}>`\n transition: 0.4s ease-in-out;\n position: absolute;\n visibility: hidden;\n pointer-events: none;\n width: 100%;\n padding: 0 ${(props) => (!props.linear ? props.theme.space.xxs : 0)};\n left: 0;\n right: 0;\n background: ${(props) => props.theme.colors.neutral['000']};\n ${(props) =>\n props.isLoading === 'top'\n ? `\n top: -41px;\n transform: translate(0, 41px);\n visibility: visible;\n pointer-events: auto;\n `\n : ''}\n ${(props) =>\n props.isLoading === 'bottom'\n ? `\n bottom: -41px;\n transform: translate(0, -41px);\n visibility: visible;\n pointer-events: auto;\n `\n : ''}\n\n & div,a {\n font-size: 13px;\n }\n`;\n\nexport const MobileStyledChatContainerContent = styled(StyledChatContainerContent)`\n ${StyledTitleLeftBubble},\n ${StyleBodyWrapper} {\n font-size: 16px;\n }\n\n ${StyledTitleRightBubble} {\n font-size: 13px;\n }\n\n ${Wrapper} {\n background-color: #fff;\n box-shadow: -0 1px 3px rgba(53, 60, 70, 0.8);\n }\n\n ${Title},\n ${Message} {\n font-size: 16px;\n text-align: left;\n }\n\n ${Time} {\n font-size: 13px;\n }\n\n ${StyledComposerInput} {\n font-size: 16px;\n }\n\n ${StyledIndicatorContainer} {\n font-size: 16px;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AACnB,qBAAqB;AACrB,oBAAgF;AAChF,qBAAoC;AACpC,mBAA8C;AACvC,MAAM,kBAAkB;AAExB,MAAM,6BAA6B,sCAAO;AAAA;AAAA,eAElC;AAAA;AAAA,gBAEC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAG/C,MAAM,2BAA2B,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAShC,CAAC,UAAW,CAAC,MAAM,SAAS,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA,gBAGnD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,IAClD,CAAC,UACD,MAAM,cAAc,QAChB;AAAA;AAAA;AAAA;AAAA;AAAA,MAMA;AAAA,IACJ,CAAC,UACD,MAAM,cAAc,WAChB;AAAA;AAAA;AAAA;AAAA;AAAA,MAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOD,MAAM,mCAAmC,sCAAO;AAAA,IACnD;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-container-header/ChatContainerHeader.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledChatContainerContentHeader,\n StyledChatContainerContentHeaderLabel,\n StyledChatContainerContentHeaderActions,\n} from './styled';\nimport { validHeaderChilds } from './helpers';\n\nexport const ChatContainerHeader: React.ComponentType = (props: any) => {\n const { title, floating, children } = props;\n\n return (\n <StyledChatContainerContentHeader\n alignItems=\"center\"\n cols={['minmax(calc(100% - 64px), 1fr)', children ? 'auto' : '0px']}\n floating={floating}\n role=\"heading\"\n >\n <StyledChatContainerContentHeaderLabel data-testid=\"chat-container-header-title\" pl=\"xxs\" pr=\"xxs\">\n <SimpleTruncatedTooltipText value={title} />\n </StyledChatContainerContentHeaderLabel>\n <StyledChatContainerContentHeaderActions\n cols={validHeaderChilds(children)}\n justifyContent=\"flex-end\"\n data-testid=\"chat-container-header-children\"\n >\n {children}\n </StyledChatContainerContentHeaderActions>\n </StyledChatContainerContentHeader>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,uCAA2C;AAC3C,oBAIO;AACP,qBAAkC;AAE3B,MAAM,sBAA2C,CAAC,UAAe;AACtE,QAAM,EAAE,OAAO,UAAU,aAAa;AAEtC,SACE,mDAAC,gDAAD;AAAA,IACE,YAAW;AAAA,IACX,MAAM,CAAC,kCAAkC,WAAW,SAAS;AAAA,IAC7D;AAAA,IACA,MAAK;AAAA,KAEL,mDAAC,qDAAD;AAAA,IAAuC,eAAY;AAAA,IAA8B,IAAG;AAAA,IAAM,IAAG;AAAA,KAC3F,mDAAC,6DAAD;AAAA,IAA4B,OAAO;AAAA,OAErC,mDAAC,uDAAD;AAAA,IACE,MAAM,sCAAkB;AAAA,IACxB,gBAAe;AAAA,IACf,eAAY;AAAA,KAEX;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-container-header/helpers.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\n\ninterface validParamT {\n childs: React.ReactChild | React.ReactFragment | React.ReactPortal;\n}\n\nexport const validHeaderChilds = (children: validParamT): any =>\n React.Children.toArray(children)\n .filter((e) => {\n if (Array.isArray(e.props.children)) {\n return false;\n }\n if (e.props.children === undefined && e.$$typeof.toString() === 'Symbol(react.element)') {\n return true;\n }\n return !!e.props.children;\n })\n .map(() => '32px');\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAMX,MAAM,oBAAoB,CAAC,aAChC,qBAAM,SAAS,QAAQ,UACpB,OAAO,CAAC,MAAM;AACb,MAAI,MAAM,QAAQ,EAAE,MAAM,WAAW;AACnC,WAAO;AAAA;AAET,MAAI,EAAE,MAAM,aAAa,UAAa,EAAE,SAAS,eAAe,yBAAyB;AACvF,WAAO;AAAA;AAET,SAAO,CAAC,CAAC,EAAE,MAAM;AAAA,GAElB,IAAI,MAAM;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/parts/chat-container-header/styled.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const StyledChatContainerContentHeaderActions = styled(Grid)`\n max-width: 80px;\n`;\n\nexport const StyledChatContainerContentHeader = styled(Grid)`\n width: 100%;\n min-height: 48px;\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['200']};\n background: ${(props) => props.theme.colors.neutral['050']};\n ${StyledChatContainerContentHeaderActions} {\n & button {\n background: transparent;\n }\n }\n`;\n\nexport const StyledChatContainerContentHeaderLabel = styled(Grid)`\n justify-content: center;\n align-items: center;\n font-weight: bold;\n font-size: 18px;\n color: ${(props) => props.theme.colors.neutral['700']};\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AACnB,qBAAqB;AAEd,MAAM,0CAA0C,sCAAO;AAAA;AAAA;AAIvD,MAAM,mCAAmC,sCAAO;AAAA;AAAA;AAAA,6BAG1B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBACnD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,IAClD;AAAA;AAAA;AAAA;AAAA;AAAA;AAOG,MAAM,wCAAwC,sCAAO;AAAA;AAAA;AAAA;AAAA;AAAA,WAKjD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;",
6
- "names": []
7
- }