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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/cjs/ChatDataTestids.js +54 -26
  2. package/cjs/ChatDataTestids.js.map +7 -0
  3. package/cjs/index.d.js +27 -2
  4. package/cjs/index.d.js.map +7 -0
  5. package/cjs/index.js +69 -44
  6. package/cjs/index.js.map +7 -0
  7. package/cjs/parts/bubble/ChatBubble.js +74 -64
  8. package/cjs/parts/bubble/ChatBubble.js.map +7 -0
  9. package/cjs/parts/bubble/ChatBubbleArrow.js +96 -79
  10. package/cjs/parts/bubble/ChatBubbleArrow.js.map +7 -0
  11. package/cjs/parts/bubble/config/useValidateProps.js +47 -24
  12. package/cjs/parts/bubble/config/useValidateProps.js.map +7 -0
  13. package/cjs/parts/bubble/index.js +38 -12
  14. package/cjs/parts/bubble/index.js.map +7 -0
  15. package/cjs/parts/bubble/props.js +60 -48
  16. package/cjs/parts/bubble/props.js.map +7 -0
  17. package/cjs/parts/bubble/styled.js +141 -48
  18. package/cjs/parts/bubble/styled.js.map +7 -0
  19. package/cjs/parts/chat-card/ChatCard.js +55 -39
  20. package/cjs/parts/chat-card/ChatCard.js.map +7 -0
  21. package/cjs/parts/chat-card/config/useValidateProps.js +36 -9
  22. package/cjs/parts/chat-card/config/useValidateProps.js.map +7 -0
  23. package/cjs/parts/chat-card/index.js +36 -10
  24. package/cjs/parts/chat-card/index.js.map +7 -0
  25. package/cjs/parts/chat-card/props.js +39 -12
  26. package/cjs/parts/chat-card/props.js.map +7 -0
  27. package/cjs/parts/chat-card/styled.js +71 -36
  28. package/cjs/parts/chat-card/styled.js.map +7 -0
  29. package/cjs/parts/chat-composer/ChatContainerComposer.js +92 -98
  30. package/cjs/parts/chat-composer/ChatContainerComposer.js.map +7 -0
  31. package/cjs/parts/chat-composer/config/useValidateProps.js +36 -9
  32. package/cjs/parts/chat-composer/config/useValidateProps.js.map +7 -0
  33. package/cjs/parts/chat-composer/index.js +36 -10
  34. package/cjs/parts/chat-composer/index.js.map +7 -0
  35. package/cjs/parts/chat-composer/props.js +73 -36
  36. package/cjs/parts/chat-composer/props.js.map +7 -0
  37. package/cjs/parts/chat-composer/styled.js +102 -34
  38. package/cjs/parts/chat-composer/styled.js.map +7 -0
  39. package/cjs/parts/chat-container/ChatContainer.js +122 -140
  40. package/cjs/parts/chat-container/ChatContainer.js.map +7 -0
  41. package/cjs/parts/chat-container/config/useValidateProps.js +36 -9
  42. package/cjs/parts/chat-container/config/useValidateProps.js.map +7 -0
  43. package/cjs/parts/chat-container/index.js +36 -10
  44. package/cjs/parts/chat-container/index.js.map +7 -0
  45. package/cjs/parts/chat-container/props.js +85 -42
  46. package/cjs/parts/chat-container/props.js.map +7 -0
  47. package/cjs/parts/chat-container/styled.js +104 -23
  48. package/cjs/parts/chat-container/styled.js.map +7 -0
  49. package/cjs/parts/chat-container-header/ChatContainerHeader.js +48 -30
  50. package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +7 -0
  51. package/cjs/parts/chat-container-header/helpers.js +38 -25
  52. package/cjs/parts/chat-container-header/helpers.js.map +7 -0
  53. package/cjs/parts/chat-container-header/styled.js +59 -24
  54. package/cjs/parts/chat-container-header/styled.js.map +7 -0
  55. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +163 -225
  56. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +7 -0
  57. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +36 -9
  58. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +7 -0
  59. package/cjs/parts/chat-container-messages-list/index.js +36 -10
  60. package/cjs/parts/chat-container-messages-list/index.js.map +7 -0
  61. package/cjs/parts/chat-container-messages-list/props.js +62 -24
  62. package/cjs/parts/chat-container-messages-list/props.js.map +7 -0
  63. package/cjs/parts/chat-container-messages-list/styled.js +100 -38
  64. package/cjs/parts/chat-container-messages-list/styled.js.map +7 -0
  65. package/cjs/parts/chat-empty-state/ChatEmptyState.js +58 -42
  66. package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +7 -0
  67. package/cjs/parts/chat-empty-state/config/useValidateProps.js +36 -9
  68. package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +7 -0
  69. package/cjs/parts/chat-empty-state/props.js +39 -12
  70. package/cjs/parts/chat-empty-state/props.js.map +7 -0
  71. package/cjs/parts/chat-empty-state/styled.js +47 -21
  72. package/cjs/parts/chat-empty-state/styled.js.map +7 -0
  73. package/cjs/parts/chat-sidebar/SideBarChat.js +82 -81
  74. package/cjs/parts/chat-sidebar/SideBarChat.js.map +7 -0
  75. package/cjs/parts/chat-sidebar/config/useValidateProps.js +36 -9
  76. package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +7 -0
  77. package/cjs/parts/chat-sidebar/index.js +36 -10
  78. package/cjs/parts/chat-sidebar/index.js.map +7 -0
  79. package/cjs/parts/chat-sidebar/props.js +72 -30
  80. package/cjs/parts/chat-sidebar/props.js.map +7 -0
  81. package/cjs/parts/chat-sidebar/styled.js +56 -20
  82. package/cjs/parts/chat-sidebar/styled.js.map +7 -0
  83. package/cjs/parts/floating-button/FloatingButton.js +47 -34
  84. package/cjs/parts/floating-button/FloatingButton.js.map +7 -0
  85. package/cjs/parts/floating-button/index.js +28 -9
  86. package/cjs/parts/floating-button/index.js.map +7 -0
  87. package/cjs/parts/floating-button/props.js +42 -15
  88. package/cjs/parts/floating-button/props.js.map +7 -0
  89. package/cjs/parts/floating-button/styled.js +63 -17
  90. package/cjs/parts/floating-button/styled.js.map +7 -0
  91. package/cjs/parts/floating-container/styled.js +47 -17
  92. package/cjs/parts/floating-container/styled.js.map +7 -0
  93. package/cjs/parts/grid-influencer/InfluencerContainer.js +41 -21
  94. package/cjs/parts/grid-influencer/InfluencerContainer.js.map +7 -0
  95. package/cjs/parts/grid-influencer/styled.js +56 -21
  96. package/cjs/parts/grid-influencer/styled.js.map +7 -0
  97. package/cjs/parts/message-delimiter/MessageDelimiter.js +53 -39
  98. package/cjs/parts/message-delimiter/MessageDelimiter.js.map +7 -0
  99. package/cjs/parts/message-delimiter/config/useValidateProps.js +36 -9
  100. package/cjs/parts/message-delimiter/config/useValidateProps.js.map +7 -0
  101. package/cjs/parts/message-delimiter/index.js +36 -10
  102. package/cjs/parts/message-delimiter/index.js.map +7 -0
  103. package/cjs/parts/message-delimiter/props.js +44 -19
  104. package/cjs/parts/message-delimiter/props.js.map +7 -0
  105. package/cjs/parts/message-delimiter/styled.js +53 -24
  106. package/cjs/parts/message-delimiter/styled.js.map +7 -0
  107. package/cjs/parts/sidebar-button/SidebarButton.js +52 -53
  108. package/cjs/parts/sidebar-button/SidebarButton.js.map +7 -0
  109. package/cjs/parts/sidebar-button/index.js +20 -2
  110. package/cjs/parts/sidebar-button/index.js.map +7 -0
  111. package/cjs/parts/sidebar-button/props.js +49 -26
  112. package/cjs/parts/sidebar-button/props.js.map +7 -0
  113. package/cjs/parts/sidebar-button/styled.js +68 -24
  114. package/cjs/parts/sidebar-button/styled.js.map +7 -0
  115. package/cjs/parts/system-message/SystemMessage.js +55 -40
  116. package/cjs/parts/system-message/SystemMessage.js.map +7 -0
  117. package/cjs/parts/system-message/config/useValidateProps.js +36 -9
  118. package/cjs/parts/system-message/config/useValidateProps.js.map +7 -0
  119. package/cjs/parts/system-message/index.js +36 -10
  120. package/cjs/parts/system-message/index.js.map +7 -0
  121. package/cjs/parts/system-message/props.js +42 -15
  122. package/cjs/parts/system-message/props.js.map +7 -0
  123. package/cjs/parts/system-message/style.js +75 -32
  124. package/cjs/parts/system-message/style.js.map +7 -0
  125. package/cjs/parts/tile-button/TileButton.js +98 -68
  126. package/cjs/parts/tile-button/TileButton.js.map +7 -0
  127. package/cjs/parts/tile-button/config/useValidateProps.js +36 -9
  128. package/cjs/parts/tile-button/config/useValidateProps.js.map +7 -0
  129. package/cjs/parts/tile-button/index.js +36 -10
  130. package/cjs/parts/tile-button/index.js.map +7 -0
  131. package/cjs/parts/tile-button/props.js +83 -45
  132. package/cjs/parts/tile-button/props.js.map +7 -0
  133. package/cjs/parts/tile-button/styled.js +229 -77
  134. package/cjs/parts/tile-button/styled.js.map +7 -0
  135. package/cjs/prop-types.js +53 -26
  136. package/cjs/prop-types.js.map +7 -0
  137. package/cjs/styled.js +42 -14
  138. package/cjs/styled.js.map +7 -0
  139. package/cjs/tests/utils.js +66 -0
  140. package/cjs/tests/utils.js.map +7 -0
  141. package/esm/ChatDataTestids.js +25 -22
  142. package/esm/ChatDataTestids.js.map +7 -0
  143. package/esm/index.d.js +2 -1
  144. package/esm/index.d.js.map +7 -0
  145. package/esm/index.js +40 -14
  146. package/esm/index.js.map +7 -0
  147. package/esm/parts/bubble/ChatBubble.js +51 -51
  148. package/esm/parts/bubble/ChatBubble.js.map +7 -0
  149. package/esm/parts/bubble/ChatBubbleArrow.js +67 -71
  150. package/esm/parts/bubble/ChatBubbleArrow.js.map +7 -0
  151. package/esm/parts/bubble/config/useValidateProps.js +17 -19
  152. package/esm/parts/bubble/config/useValidateProps.js.map +7 -0
  153. package/esm/parts/bubble/index.js +9 -2
  154. package/esm/parts/bubble/index.js.map +7 -0
  155. package/esm/parts/bubble/props.js +30 -36
  156. package/esm/parts/bubble/props.js.map +7 -0
  157. package/esm/parts/bubble/styled.js +112 -32
  158. package/esm/parts/bubble/styled.js.map +7 -0
  159. package/esm/parts/chat-card/ChatCard.js +23 -27
  160. package/esm/parts/chat-card/ChatCard.js.map +7 -0
  161. package/esm/parts/chat-card/config/useValidateProps.js +6 -4
  162. package/esm/parts/chat-card/config/useValidateProps.js.map +7 -0
  163. package/esm/parts/chat-card/index.js +7 -1
  164. package/esm/parts/chat-card/index.js.map +7 -0
  165. package/esm/parts/chat-card/props.js +10 -8
  166. package/esm/parts/chat-card/props.js.map +7 -0
  167. package/esm/parts/chat-card/styled.js +42 -23
  168. package/esm/parts/chat-card/styled.js.map +7 -0
  169. package/esm/parts/chat-composer/ChatContainerComposer.js +65 -83
  170. package/esm/parts/chat-composer/ChatContainerComposer.js.map +7 -0
  171. package/esm/parts/chat-composer/config/useValidateProps.js +6 -4
  172. package/esm/parts/chat-composer/config/useValidateProps.js.map +7 -0
  173. package/esm/parts/chat-composer/index.js +7 -1
  174. package/esm/parts/chat-composer/index.js.map +7 -0
  175. package/esm/parts/chat-composer/props.js +37 -24
  176. package/esm/parts/chat-composer/props.js.map +7 -0
  177. package/esm/parts/chat-composer/styled.js +73 -22
  178. package/esm/parts/chat-composer/styled.js.map +7 -0
  179. package/esm/parts/chat-container/ChatContainer.js +88 -122
  180. package/esm/parts/chat-container/ChatContainer.js.map +7 -0
  181. package/esm/parts/chat-container/config/useValidateProps.js +6 -4
  182. package/esm/parts/chat-container/config/useValidateProps.js.map +7 -0
  183. package/esm/parts/chat-container/index.js +7 -1
  184. package/esm/parts/chat-container/index.js.map +7 -0
  185. package/esm/parts/chat-container/props.js +52 -31
  186. package/esm/parts/chat-container/props.js.map +7 -0
  187. package/esm/parts/chat-container/styled.js +79 -16
  188. package/esm/parts/chat-container/styled.js.map +7 -0
  189. package/esm/parts/chat-container-header/ChatContainerHeader.js +22 -21
  190. package/esm/parts/chat-container-header/ChatContainerHeader.js.map +7 -0
  191. package/esm/parts/chat-container-header/helpers.js +9 -17
  192. package/esm/parts/chat-container-header/helpers.js.map +7 -0
  193. package/esm/parts/chat-container-header/styled.js +30 -14
  194. package/esm/parts/chat-container-header/styled.js.map +7 -0
  195. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +138 -210
  196. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +7 -0
  197. package/esm/parts/chat-container-messages-list/config/useValidateProps.js +6 -4
  198. package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +7 -0
  199. package/esm/parts/chat-container-messages-list/index.js +10 -1
  200. package/esm/parts/chat-container-messages-list/index.js.map +7 -0
  201. package/esm/parts/chat-container-messages-list/props.js +31 -17
  202. package/esm/parts/chat-container-messages-list/props.js.map +7 -0
  203. package/esm/parts/chat-container-messages-list/styled.js +71 -25
  204. package/esm/parts/chat-container-messages-list/styled.js.map +7 -0
  205. package/esm/parts/chat-empty-state/ChatEmptyState.js +25 -29
  206. package/esm/parts/chat-empty-state/ChatEmptyState.js.map +7 -0
  207. package/esm/parts/chat-empty-state/config/useValidateProps.js +6 -4
  208. package/esm/parts/chat-empty-state/config/useValidateProps.js.map +7 -0
  209. package/esm/parts/chat-empty-state/props.js +10 -7
  210. package/esm/parts/chat-empty-state/props.js.map +7 -0
  211. package/esm/parts/chat-empty-state/styled.js +18 -11
  212. package/esm/parts/chat-empty-state/styled.js.map +7 -0
  213. package/esm/parts/chat-sidebar/SideBarChat.js +50 -67
  214. package/esm/parts/chat-sidebar/SideBarChat.js.map +7 -0
  215. package/esm/parts/chat-sidebar/config/useValidateProps.js +6 -4
  216. package/esm/parts/chat-sidebar/config/useValidateProps.js.map +7 -0
  217. package/esm/parts/chat-sidebar/index.js +7 -1
  218. package/esm/parts/chat-sidebar/index.js.map +7 -0
  219. package/esm/parts/chat-sidebar/props.js +39 -21
  220. package/esm/parts/chat-sidebar/props.js.map +7 -0
  221. package/esm/parts/chat-sidebar/styled.js +27 -11
  222. package/esm/parts/chat-sidebar/styled.js.map +7 -0
  223. package/esm/parts/floating-button/FloatingButton.js +18 -26
  224. package/esm/parts/floating-button/FloatingButton.js.map +7 -0
  225. package/esm/parts/floating-button/index.js +3 -1
  226. package/esm/parts/floating-button/index.js.map +7 -0
  227. package/esm/parts/floating-button/props.js +11 -8
  228. package/esm/parts/floating-button/props.js.map +7 -0
  229. package/esm/parts/floating-button/styled.js +34 -9
  230. package/esm/parts/floating-button/styled.js.map +7 -0
  231. package/esm/parts/floating-container/styled.js +18 -9
  232. package/esm/parts/floating-container/styled.js.map +7 -0
  233. package/esm/parts/grid-influencer/InfluencerContainer.js +12 -12
  234. package/esm/parts/grid-influencer/InfluencerContainer.js.map +7 -0
  235. package/esm/parts/grid-influencer/styled.js +27 -12
  236. package/esm/parts/grid-influencer/styled.js.map +7 -0
  237. package/esm/parts/message-delimiter/MessageDelimiter.js +20 -26
  238. package/esm/parts/message-delimiter/MessageDelimiter.js.map +7 -0
  239. package/esm/parts/message-delimiter/config/useValidateProps.js +6 -4
  240. package/esm/parts/message-delimiter/config/useValidateProps.js.map +7 -0
  241. package/esm/parts/message-delimiter/index.js +10 -1
  242. package/esm/parts/message-delimiter/index.js.map +7 -0
  243. package/esm/parts/message-delimiter/props.js +15 -14
  244. package/esm/parts/message-delimiter/props.js.map +7 -0
  245. package/esm/parts/message-delimiter/styled.js +24 -14
  246. package/esm/parts/message-delimiter/styled.js.map +7 -0
  247. package/esm/parts/sidebar-button/SidebarButton.js +22 -41
  248. package/esm/parts/sidebar-button/SidebarButton.js.map +7 -0
  249. package/esm/parts/sidebar-button/index.js +2 -1
  250. package/esm/parts/sidebar-button/index.js.map +7 -0
  251. package/esm/parts/sidebar-button/props.js +18 -15
  252. package/esm/parts/sidebar-button/props.js.map +7 -0
  253. package/esm/parts/sidebar-button/styled.js +39 -14
  254. package/esm/parts/sidebar-button/styled.js.map +7 -0
  255. package/esm/parts/system-message/SystemMessage.js +22 -27
  256. package/esm/parts/system-message/SystemMessage.js.map +7 -0
  257. package/esm/parts/system-message/config/useValidateProps.js +6 -4
  258. package/esm/parts/system-message/config/useValidateProps.js.map +7 -0
  259. package/esm/parts/system-message/index.js +7 -1
  260. package/esm/parts/system-message/index.js.map +7 -0
  261. package/esm/parts/system-message/props.js +13 -10
  262. package/esm/parts/system-message/props.js.map +7 -0
  263. package/esm/parts/system-message/style.js +46 -20
  264. package/esm/parts/system-message/style.js.map +7 -0
  265. package/esm/parts/tile-button/TileButton.js +75 -54
  266. package/esm/parts/tile-button/TileButton.js.map +7 -0
  267. package/esm/parts/tile-button/config/useValidateProps.js +6 -4
  268. package/esm/parts/tile-button/config/useValidateProps.js.map +7 -0
  269. package/esm/parts/tile-button/index.js +7 -1
  270. package/esm/parts/tile-button/index.js.map +7 -0
  271. package/esm/parts/tile-button/props.js +47 -33
  272. package/esm/parts/tile-button/props.js.map +7 -0
  273. package/esm/parts/tile-button/styled.js +200 -60
  274. package/esm/parts/tile-button/styled.js.map +7 -0
  275. package/esm/prop-types.js +19 -16
  276. package/esm/prop-types.js.map +7 -0
  277. package/esm/styled.js +13 -5
  278. package/esm/styled.js.map +7 -0
  279. package/esm/tests/utils.js +37 -0
  280. package/esm/tests/utils.js.map +7 -0
  281. package/package.json +10 -10
  282. package/types/parts/bubble/ChatBubble.d.ts +1 -1
  283. package/types/parts/chat-card/ChatCard.d.ts +1 -1
  284. package/types/parts/chat-composer/ChatContainerComposer.d.ts +1 -1
  285. package/types/parts/chat-container/ChatContainer.d.ts +1 -1
  286. package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +1 -1
  287. package/types/parts/chat-empty-state/ChatEmptyState.d.ts +1 -1
  288. package/types/parts/chat-sidebar/SideBarChat.d.ts +1 -1
  289. package/types/parts/message-delimiter/MessageDelimiter.d.ts +1 -1
  290. package/types/parts/system-message/SystemMessage.d.ts +1 -1
  291. package/types/parts/tile-button/TileButton.d.ts +1 -1
@@ -1,24 +1,27 @@
1
+ import * as React from "react";
1
2
  const ChatDataTestIds = {
2
- COMPOSER_TEXTAREA: 'chat-composer-textarea',
3
- COMPOSER_SEND_BUTTON: 'chat-composer-send-button',
4
- CARD_TITLE: 'chat-card-title',
5
- CARD_WRAPPER: 'chat-card-wrapper',
6
- CARD_TIME: 'chat-card-time',
7
- CARD_RIGHT_ADDON: 'chat-right-addon',
8
- CARD_CONTENT: 'chat-card-content',
9
- LOADING_INDICATOR: 'ds-chat-loading-indicator',
10
- HEADER_TITLE: 'chat-header-title',
11
- HEADER_CHILDREN: 'chat-header-children',
12
- THREAD_CONTAINER: 'chat-thread-container',
13
- LOAD_MORE_BUTTON: 'ds-chat-load-more-btn',
14
- FLOATING_BUTTON: 'chat-floating-button',
15
- SYSTEM_MSG_TITLE: 'chat-system-message-title',
16
- SYSTEM_MSG_BODY: 'chat-system-message-body',
17
- SYSTEM_MSG_TIME: 'chat-system-message-time',
18
- BUBBLE: 'ds-chat-bubble',
19
- BUBBLE_TITLE: 'chat-bubble-title',
20
- BUBBLE_BODY: 'chat-bubble-body',
21
- BANNER: 'ds-banner-container'
3
+ COMPOSER_TEXTAREA: "chat-composer-textarea",
4
+ COMPOSER_SEND_BUTTON: "chat-composer-send-button",
5
+ CARD_TITLE: "chat-card-title",
6
+ CARD_WRAPPER: "chat-card-wrapper",
7
+ CARD_TIME: "chat-card-time",
8
+ CARD_RIGHT_ADDON: "chat-right-addon",
9
+ CARD_CONTENT: "chat-card-content",
10
+ LOADING_INDICATOR: "ds-chat-loading-indicator",
11
+ HEADER_TITLE: "chat-header-title",
12
+ HEADER_CHILDREN: "chat-header-children",
13
+ THREAD_CONTAINER: "chat-thread-container",
14
+ LOAD_MORE_BUTTON: "ds-chat-load-more-btn",
15
+ FLOATING_BUTTON: "chat-floating-button",
16
+ SYSTEM_MSG_TITLE: "chat-system-message-title",
17
+ SYSTEM_MSG_BODY: "chat-system-message-body",
18
+ SYSTEM_MSG_TIME: "chat-system-message-time",
19
+ BUBBLE: "ds-chat-bubble",
20
+ BUBBLE_TITLE: "chat-bubble-title",
21
+ BUBBLE_BODY: "chat-bubble-body",
22
+ BANNER: "ds-banner-container"
22
23
  };
23
-
24
- export { ChatDataTestIds };
24
+ export {
25
+ ChatDataTestIds
26
+ };
27
+ //# sourceMappingURL=ChatDataTestids.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ChatDataTestids.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "AAAA;ACAO,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
+ }
package/esm/index.d.js CHANGED
@@ -1 +1,2 @@
1
-
1
+ import * as React from "react";
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": "AAAA;",
6
+ "names": []
7
+ }
package/esm/index.js CHANGED
@@ -1,14 +1,40 @@
1
- export { ChatBubble, ChatBubbleWithSchema } from './parts/bubble/ChatBubble.js';
2
- export { BUBBLE_TYPES } from './parts/bubble/props.js';
3
- export { FloatingButton } from './parts/floating-button/FloatingButton.js';
4
- export { StyledFloatingContainer } from './parts/floating-container/styled.js';
5
- export { ChatContainerHeader } from './parts/chat-container-header/ChatContainerHeader.js';
6
- export { ChatEmptyState } from './parts/chat-empty-state/ChatEmptyState.js';
7
- export { ChatContainerMessagesList, ChatContainerMessagesListWithSchema } from './parts/chat-container-messages-list/ChatContainerMessagesList.js';
8
- export { ChatComposer, ChatComposerWithSchema } from './parts/chat-composer/ChatContainerComposer.js';
9
- export { SideBarChat, SideBarChatWithSchema } from './parts/chat-sidebar/SideBarChat.js';
10
- export { ChatContainer, ChatContainerWithSchema } from './parts/chat-container/ChatContainer.js';
11
- export { TileButton, TileButtonWithSchema } from './parts/tile-button/TileButton.js';
12
- export { MessageDelimiter, MessageDelimiterWithSchema } from './parts/message-delimiter/MessageDelimiter.js';
13
- export { SystemMessage, SystemMessageWithSchema } from './parts/system-message/SystemMessage.js';
14
- export { ChatCard, ChatCardWithSchema } from './parts/chat-card/ChatCard.js';
1
+ import * as React from "react";
2
+ import { ChatBubble, ChatBubbleWithSchema, BUBBLE_TYPES } from "./parts/bubble";
3
+ import { FloatingButton } from "./parts/floating-button";
4
+ import { StyledFloatingContainer } from "./parts/floating-container/styled";
5
+ import { ChatContainerHeader } from "./parts/chat-container-header/ChatContainerHeader";
6
+ import { ChatEmptyState } from "./parts/chat-empty-state/ChatEmptyState";
7
+ import { ChatContainerMessagesList, ChatContainerMessagesListWithSchema } from "./parts/chat-container-messages-list";
8
+ import { ChatComposer, ChatComposerWithSchema } from "./parts/chat-composer/ChatContainerComposer";
9
+ import { SideBarChat, SideBarChatWithSchema } from "./parts/chat-sidebar";
10
+ import { ChatContainer, ChatContainerWithSchema } from "./parts/chat-container";
11
+ import { TileButton, TileButtonWithSchema } from "./parts/tile-button";
12
+ import { MessageDelimiter, MessageDelimiterWithSchema } from "./parts/message-delimiter";
13
+ import { SystemMessage, SystemMessageWithSchema } from "./parts/system-message";
14
+ import { ChatCard, ChatCardWithSchema } from "./parts/chat-card";
15
+ export {
16
+ BUBBLE_TYPES,
17
+ ChatBubble,
18
+ ChatBubbleWithSchema,
19
+ ChatCard,
20
+ ChatCardWithSchema,
21
+ ChatComposer,
22
+ ChatComposerWithSchema,
23
+ ChatContainer,
24
+ ChatContainerHeader,
25
+ ChatContainerMessagesList,
26
+ ChatContainerMessagesListWithSchema,
27
+ ChatContainerWithSchema,
28
+ ChatEmptyState,
29
+ FloatingButton,
30
+ MessageDelimiter,
31
+ MessageDelimiterWithSchema,
32
+ SideBarChat,
33
+ SideBarChatWithSchema,
34
+ StyledFloatingContainer,
35
+ SystemMessage,
36
+ SystemMessageWithSchema,
37
+ TileButton,
38
+ TileButtonWithSchema
39
+ };
40
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// 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"],
5
+ "mappings": "AAAA;ACCA;AAEA;AACA;AAEA;AAEA;AAGA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;",
6
+ "names": []
7
+ }
@@ -1,64 +1,64 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'core-js/modules/web.url.to-json.js';
3
- import 'core-js/modules/esnext.async-iterator.map.js';
4
- import 'core-js/modules/esnext.iterator.map.js';
5
- import React from 'react';
6
- import { describe } from 'react-desc';
7
- import { WarningCircleFill } from '@elliemae/ds-icons';
8
- import { StyledWrapper, StyledColoredBubble, StyledTitleBubble, StyledTitleLeftBubble, StyledTitleRightBubble, StyleBodyWrapper, StyleErrorMessage, StyleHelpMessage } from './styled.js';
9
- import { propsBubbles } from './props.js';
10
- import { useValidateProps } from './config/useValidateProps.js';
11
- import { ChatBubbleArrow } from './ChatBubbleArrow.js';
12
-
13
- var _br, _WarningCircleFill;
14
-
15
- const ChatBubble = props => {
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { describe } from "react-desc";
4
+ import { WarningCircleFill } from "@elliemae/ds-icons";
5
+ import {
6
+ StyledWrapper,
7
+ StyledColoredBubble,
8
+ StyledTitleBubble,
9
+ StyledTitleLeftBubble,
10
+ StyledTitleRightBubble,
11
+ StyleBodyWrapper,
12
+ StyleErrorMessage,
13
+ StyleHelpMessage
14
+ } from "./styled";
15
+ import { propsBubbles } from "./props";
16
+ import { useValidateProps } from "./config/useValidateProps";
17
+ import { ChatBubbleArrow } from "./ChatBubbleArrow";
18
+ const ChatBubble = (props) => {
16
19
  useValidateProps(props, ChatBubbleWithSchema.toJSON());
17
- const {
18
- dsId,
19
- type,
20
- title,
21
- time,
22
- body,
23
- errorMessage,
24
- helpMessage
25
- } = props;
26
- const bodyParts = React.useMemo(() => typeof body === 'string' ? body.split('\n') : [body], [body]);
27
- return /*#__PURE__*/_jsx(StyledWrapper, {
28
- "data-testid": "ds-chat-bubble-".concat(dsId),
29
- type: type
30
- }, void 0, /*#__PURE__*/_jsx(StyledColoredBubble, {
31
- type: type
32
- }, void 0, /*#__PURE__*/_jsx(StyledTitleBubble, {
33
- cols: [1, 'auto'],
20
+ const { dsId, type, title, time, body, errorMessage, helpMessage } = props;
21
+ const bodyParts = React2.useMemo(() => typeof body === "string" ? body.split("\n") : [body], [body]);
22
+ return /* @__PURE__ */ React2.createElement(StyledWrapper, {
23
+ "data-testid": `ds-chat-bubble-${dsId}`,
24
+ type
25
+ }, /* @__PURE__ */ React2.createElement(StyledColoredBubble, {
26
+ type
27
+ }, /* @__PURE__ */ React2.createElement(StyledTitleBubble, {
28
+ cols: [1, "auto"],
34
29
  gutter: "xs",
35
30
  alignItems: "flex-end",
36
31
  className: "sr-only"
37
- }, void 0, /*#__PURE__*/_jsx(StyledTitleLeftBubble, {
32
+ }, /* @__PURE__ */ React2.createElement(StyledTitleLeftBubble, {
38
33
  alignItems: "center",
39
- "data-testid": "chat-bubble-title-".concat(dsId)
40
- }, void 0, title), /*#__PURE__*/_jsx(StyledTitleRightBubble, {
34
+ "data-testid": `chat-bubble-title-${dsId}`
35
+ }, title), /* @__PURE__ */ React2.createElement(StyledTitleRightBubble, {
41
36
  alignItems: "center",
42
- type: type,
43
- "data-testid": "chat-bubble-time-".concat(dsId)
44
- }, void 0, time)), /*#__PURE__*/_jsx(StyleBodyWrapper, {
45
- "data-testid": "chat-bubble-body-".concat(dsId)
46
- }, void 0, bodyParts.map((item, index) => /*#__PURE__*/_jsx(React.Fragment, {}, "".concat(item, "-").concat(index), item, index < bodyParts.length - 1 ? _br || (_br = /*#__PURE__*/_jsx("br", {})) : null))), /*#__PURE__*/_jsx(ChatBubbleArrow, {
47
- type: type
48
- })), errorMessage ? /*#__PURE__*/_jsx(StyleErrorMessage, {
49
- "data-testid": "chat-bubble-error-message-".concat(dsId),
37
+ type,
38
+ "data-testid": `chat-bubble-time-${dsId}`
39
+ }, time)), /* @__PURE__ */ React2.createElement(StyleBodyWrapper, {
40
+ "data-testid": `chat-bubble-body-${dsId}`
41
+ }, bodyParts.map((item, index) => /* @__PURE__ */ React2.createElement(React2.Fragment, {
42
+ key: `${item}-${index}`
43
+ }, item, index < bodyParts.length - 1 ? /* @__PURE__ */ React2.createElement("br", null) : null))), /* @__PURE__ */ React2.createElement(ChatBubbleArrow, {
44
+ type
45
+ })), errorMessage ? /* @__PURE__ */ React2.createElement(StyleErrorMessage, {
46
+ "data-testid": `chat-bubble-error-message-${dsId}`,
50
47
  p: "xxs",
51
48
  gutter: "xxs",
52
- cols: [1, 'auto']
53
- }, void 0, /*#__PURE__*/_jsx("span", {}, void 0, errorMessage), _WarningCircleFill || (_WarningCircleFill = /*#__PURE__*/_jsx(WarningCircleFill, {}))) : null, helpMessage ? /*#__PURE__*/_jsx(StyleHelpMessage, {
54
- "data-testid": "chat-bubble-help-message-".concat(dsId),
49
+ cols: [1, "auto"]
50
+ }, /* @__PURE__ */ React2.createElement("span", null, errorMessage), /* @__PURE__ */ React2.createElement(WarningCircleFill, null)) : null, helpMessage ? /* @__PURE__ */ React2.createElement(StyleHelpMessage, {
51
+ "data-testid": `chat-bubble-help-message-${dsId}`,
55
52
  p: "xxs",
56
53
  gutter: "xxs",
57
- cols: [1, 'auto']
58
- }, void 0, /*#__PURE__*/_jsx("span", {}, void 0, helpMessage)) : null);
54
+ cols: [1, "auto"]
55
+ }, /* @__PURE__ */ React2.createElement("span", null, helpMessage)) : null);
59
56
  };
60
-
57
+ ChatBubble.propTypes = propsBubbles;
61
58
  const ChatBubbleWithSchema = describe(ChatBubble);
62
59
  ChatBubbleWithSchema.propTypes = propsBubbles;
63
-
64
- export { ChatBubble, ChatBubbleWithSchema };
60
+ export {
61
+ ChatBubble,
62
+ ChatBubbleWithSchema
63
+ };
64
+ //# sourceMappingURL=ChatBubble.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/bubble/ChatBubble.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AACA;AACA;AAEA,MAAM,aAAa,CAAC,UAAoC;AACtD,mBAAiB,OAAO,qBAAqB;AAE7C,QAAM,EAAE,MAAM,MAAM,OAAO,MAAM,MAAM,cAAc,gBAAgB;AACrE,QAAM,YAAY,OAAM,QAAQ,MAAO,OAAO,SAAS,WAAW,KAAK,MAAM,QAAQ,CAAC,OAAQ,CAAC;AAE/F,SACE,qCAAC,eAAD;AAAA,IAAe,eAAa,kBAAkB;AAAA,IAAQ;AAAA,KACpD,qCAAC,qBAAD;AAAA,IAAqB;AAAA,KACnB,qCAAC,mBAAD;AAAA,IAAmB,MAAM,CAAC,GAAG;AAAA,IAAS,QAAO;AAAA,IAAK,YAAW;AAAA,IAAW,WAAU;AAAA,KAChF,qCAAC,uBAAD;AAAA,IAAuB,YAAW;AAAA,IAAS,eAAa,qBAAqB;AAAA,KAC1E,QAEH,qCAAC,wBAAD;AAAA,IAAwB,YAAW;AAAA,IAAS;AAAA,IAAY,eAAa,oBAAoB;AAAA,KACtF,QAGL,qCAAC,kBAAD;AAAA,IAAkB,eAAa,oBAAoB;AAAA,KAChD,UAAU,IAAI,CAAC,MAAM,UACpB,qCAAC,OAAM,UAAP;AAAA,IAAgB,KAAK,GAAG,QAAQ;AAAA,KAC7B,MACA,QAAQ,UAAU,SAAS,IAAI,qCAAC,MAAD,QAAS,SAI/C,qCAAC,iBAAD;AAAA,IAAiB;AAAA,OAElB,eACC,qCAAC,mBAAD;AAAA,IAAmB,eAAa,6BAA6B;AAAA,IAAQ,GAAE;AAAA,IAAM,QAAO;AAAA,IAAM,MAAM,CAAC,GAAG;AAAA,KAClG,qCAAC,QAAD,MAAO,eACP,qCAAC,mBAAD,SAEA,MACH,cACC,qCAAC,kBAAD;AAAA,IAAkB,eAAa,4BAA4B;AAAA,IAAQ,GAAE;AAAA,IAAM,QAAO;AAAA,IAAM,MAAM,CAAC,GAAG;AAAA,KAChG,qCAAC,QAAD,MAAO,gBAEP;AAAA;AAIV,WAAW,YAAY;AAEvB,MAAM,uBAAuB,SAAS;AACtC,qBAAqB,YAAY;",
6
+ "names": []
7
+ }
@@ -1,72 +1,68 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'react';
3
- import { StyledBubbleArrow } from './styled.js';
4
- import { BUBBLE_TYPES } from './props.js';
5
-
6
- var _svg, _svg2;
7
- const ChatBubbleArrow = _ref => {
8
- let {
9
- type
10
- } = _ref;
11
- return /*#__PURE__*/_jsx(StyledBubbleArrow, {}, void 0, type === BUBBLE_TYPES.RECIPIENT ? _svg || (_svg = /*#__PURE__*/_jsx("svg", {
12
- width: "15px",
13
- height: "14px",
14
- viewBox: "0 0 15 14"
15
- }, void 0, /*#__PURE__*/_jsx("defs", {}, void 0, /*#__PURE__*/_jsx("path", {
16
- 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",
17
- id: "path-chat-bubble"
18
- }), /*#__PURE__*/_jsx("filter", {
19
- x: "-55.6%",
20
- y: "-50.0%",
21
- width: "211.1%",
22
- height: "225.0%",
23
- filterUnits: "objectBoundingBox",
24
- id: "filter-2"
25
- }, void 0, /*#__PURE__*/_jsx("feOffset", {
26
- dx: "2.3",
27
- dy: "1.2",
28
- in: "SourceAlpha",
29
- result: "shadowOffsetOuter1"
30
- }), /*#__PURE__*/_jsx("feGaussianBlur", {
31
- stdDeviation: "1.5",
32
- in: "shadowOffsetOuter1",
33
- result: "shadowBlurOuter1"
34
- }), /*#__PURE__*/_jsx("feColorMatrix", {
35
- values: "0 0 0 0 0.207843137 0 0 0 0 0.235294118 0 0 0 0 0.274509804 0 0 0 0.8 0",
36
- type: "matrix",
37
- in: "shadowBlurOuter1"
38
- }))), /*#__PURE__*/_jsx("g", {
39
- id: "[DSK]-Visual-Design",
40
- stroke: "none",
41
- strokeWidth: "1",
42
- fill: "none",
43
- fillRule: "evenodd"
44
- }, void 0, /*#__PURE__*/_jsx("g", {
45
- id: "Path-Copy",
46
- transform: "translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) "
47
- }, void 0, /*#__PURE__*/_jsx("use", {
48
- fill: "black",
49
- fillOpacity: "1",
50
- filter: "url(#filter-2)",
51
- xlinkHref: "#path-chat-bubble"
52
- }), /*#__PURE__*/_jsx("use", {
53
- fill: "#FFFFFF",
54
- fillRule: "evenodd",
55
- xlinkHref: "#path-chat-bubble"
56
- }))))) : _svg2 || (_svg2 = /*#__PURE__*/_jsx("svg", {
57
- width: "9px",
58
- height: "8px",
59
- viewBox: "0 0 9 8"
60
- }, void 0, /*#__PURE__*/_jsx("g", {
61
- stroke: "none",
62
- strokeWidth: "1",
63
- fill: "none",
64
- fillRule: "evenodd"
65
- }, void 0, /*#__PURE__*/_jsx("path", {
66
- 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",
67
- id: "Path",
68
- fill: "#1E79C2"
69
- })))));
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { StyledBubbleArrow } from "./styled";
4
+ import { BUBBLE_TYPES, propsArrowBubble } from "./props";
5
+ const ChatBubbleArrow = ({ type }) => /* @__PURE__ */ React2.createElement(StyledBubbleArrow, null, type === BUBBLE_TYPES.RECIPIENT ? /* @__PURE__ */ React2.createElement("svg", {
6
+ width: "15px",
7
+ height: "14px",
8
+ viewBox: "0 0 15 14"
9
+ }, /* @__PURE__ */ React2.createElement("defs", null, /* @__PURE__ */ React2.createElement("path", {
10
+ 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",
11
+ id: "path-chat-bubble"
12
+ }), /* @__PURE__ */ React2.createElement("filter", {
13
+ x: "-55.6%",
14
+ y: "-50.0%",
15
+ width: "211.1%",
16
+ height: "225.0%",
17
+ filterUnits: "objectBoundingBox",
18
+ id: "filter-2"
19
+ }, /* @__PURE__ */ React2.createElement("feOffset", {
20
+ dx: "2.3",
21
+ dy: "1.2",
22
+ in: "SourceAlpha",
23
+ result: "shadowOffsetOuter1"
24
+ }), /* @__PURE__ */ React2.createElement("feGaussianBlur", {
25
+ stdDeviation: "1.5",
26
+ in: "shadowOffsetOuter1",
27
+ result: "shadowBlurOuter1"
28
+ }), /* @__PURE__ */ React2.createElement("feColorMatrix", {
29
+ 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",
30
+ type: "matrix",
31
+ in: "shadowBlurOuter1"
32
+ }))), /* @__PURE__ */ React2.createElement("g", {
33
+ id: "[DSK]-Visual-Design",
34
+ stroke: "none",
35
+ strokeWidth: "1",
36
+ fill: "none",
37
+ fillRule: "evenodd"
38
+ }, /* @__PURE__ */ React2.createElement("g", {
39
+ id: "Path-Copy",
40
+ transform: "translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) "
41
+ }, /* @__PURE__ */ React2.createElement("use", {
42
+ fill: "black",
43
+ fillOpacity: "1",
44
+ filter: "url(#filter-2)",
45
+ xlinkHref: "#path-chat-bubble"
46
+ }), /* @__PURE__ */ React2.createElement("use", {
47
+ fill: "#FFFFFF",
48
+ fillRule: "evenodd",
49
+ xlinkHref: "#path-chat-bubble"
50
+ })))) : /* @__PURE__ */ React2.createElement("svg", {
51
+ width: "9px",
52
+ height: "8px",
53
+ viewBox: "0 0 9 8"
54
+ }, /* @__PURE__ */ React2.createElement("g", {
55
+ stroke: "none",
56
+ strokeWidth: "1",
57
+ fill: "none",
58
+ fillRule: "evenodd"
59
+ }, /* @__PURE__ */ React2.createElement("path", {
60
+ 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",
61
+ id: "Path",
62
+ fill: "#1E79C2"
63
+ }))));
64
+ ChatBubbleArrow.propTypes = propsArrowBubble;
65
+ export {
66
+ ChatBubbleArrow
70
67
  };
71
-
72
- export { ChatBubbleArrow };
68
+ //# sourceMappingURL=ChatBubbleArrow.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/bubble/ChatBubbleArrow.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AAEO,MAAM,kBAAkB,CAAC,EAAE,WAChC,qCAAC,mBAAD,MACG,SAAS,aAAa,YACrB,qCAAC,OAAD;AAAA,EAAK,OAAM;AAAA,EAAO,QAAO;AAAA,EAAO,SAAQ;AAAA,GACtC,qCAAC,QAAD,MACE,qCAAC,QAAD;AAAA,EACE,GAAE;AAAA,EACF,IAAG;AAAA,IAEL,qCAAC,UAAD;AAAA,EAAQ,GAAE;AAAA,EAAS,GAAE;AAAA,EAAS,OAAM;AAAA,EAAS,QAAO;AAAA,EAAS,aAAY;AAAA,EAAoB,IAAG;AAAA,GAC9F,qCAAC,YAAD;AAAA,EAAU,IAAG;AAAA,EAAM,IAAG;AAAA,EAAM,IAAG;AAAA,EAAc,QAAO;AAAA,IACpD,qCAAC,kBAAD;AAAA,EAAgB,cAAa;AAAA,EAAM,IAAG;AAAA,EAAqB,QAAO;AAAA,IAClE,qCAAC,iBAAD;AAAA,EACE,QAAO;AAAA,EAIP,MAAK;AAAA,EACL,IAAG;AAAA,MAIT,qCAAC,KAAD;AAAA,EAAG,IAAG;AAAA,EAAsB,QAAO;AAAA,EAAO,aAAY;AAAA,EAAI,MAAK;AAAA,EAAO,UAAS;AAAA,GAC7E,qCAAC,KAAD;AAAA,EAAG,IAAG;AAAA,EAAY,WAAU;AAAA,GAC1B,qCAAC,OAAD;AAAA,EAAK,MAAK;AAAA,EAAQ,aAAY;AAAA,EAAI,QAAO;AAAA,EAAiB,WAAU;AAAA,IACpE,qCAAC,OAAD;AAAA,EAAK,MAAK;AAAA,EAAU,UAAS;AAAA,EAAU,WAAU;AAAA,QAKvD,qCAAC,OAAD;AAAA,EAAK,OAAM;AAAA,EAAM,QAAO;AAAA,EAAM,SAAQ;AAAA,GACpC,qCAAC,KAAD;AAAA,EAAG,QAAO;AAAA,EAAO,aAAY;AAAA,EAAI,MAAK;AAAA,EAAO,UAAS;AAAA,GACpD,qCAAC,QAAD;AAAA,EACE,GAAE;AAAA,EACF,IAAG;AAAA,EACH,MAAK;AAAA;AAQjB,gBAAgB,YAAY;",
6
+ "names": []
7
+ }
@@ -1,27 +1,25 @@
1
- import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
2
-
3
- const throwError = message => {
4
- throw new Error("Bubble:: ".concat(message, "\n "));
1
+ import * as React from "react";
2
+ import { useValidatePropTypes } from "@elliemae/ds-props-helpers";
3
+ const throwError = (message) => {
4
+ throw new Error(`Bubble:: ${message}
5
+ `);
5
6
  };
6
-
7
7
  const useValidateProps = (props, schema) => {
8
8
  useValidatePropTypes(props, schema);
9
-
10
- if (typeof props.title === 'undefined') {
11
- throwError("Please provide a title property to use this component.");
9
+ if (typeof props.title === "undefined") {
10
+ throwError(`Please provide a title property to use this component.`);
12
11
  }
13
-
14
- if (typeof props.time === 'undefined') {
15
- throwError("Please provide a time property to use this component.");
12
+ if (typeof props.time === "undefined") {
13
+ throwError(`Please provide a time property to use this component.`);
16
14
  }
17
-
18
- if (typeof props.body === 'undefined') {
19
- throwError("Please provide a body property to use this component.");
15
+ if (typeof props.body === "undefined") {
16
+ throwError(`Please provide a body property to use this component.`);
20
17
  }
21
-
22
- if (typeof props.type === 'undefined') {
23
- throwError("Please provide a type property to use this component.");
18
+ if (typeof props.type === "undefined") {
19
+ throwError(`Please provide a type property to use this component.`);
24
20
  }
25
21
  };
26
-
27
- export { useValidateProps };
22
+ export {
23
+ useValidateProps
24
+ };
25
+ //# sourceMappingURL=useValidateProps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/bubble/config/useValidateProps.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "AAAA;ACAA;AAGA,MAAM,aAAa,CAAC,YAA0B;AAC5C,QAAM,IAAI,MACR,YAAY;AAAA;AAAA;AAKT,MAAM,mBAAmB,CAAC,OAAoB,WAA0B;AAC7E,uBAAqB,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,2 +1,9 @@
1
- export { ChatBubble, ChatBubbleWithSchema } from './ChatBubble.js';
2
- export { BUBBLE_TYPES } from './props.js';
1
+ import * as React from "react";
2
+ import { ChatBubble, ChatBubbleWithSchema } from "./ChatBubble";
3
+ import { BUBBLE_TYPES } from "./props";
4
+ export {
5
+ BUBBLE_TYPES,
6
+ ChatBubble,
7
+ ChatBubbleWithSchema
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/bubble/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { ChatBubble, ChatBubbleWithSchema } from './ChatBubble';\nexport { BUBBLE_TYPES } from './props';\n"],
5
+ "mappings": "AAAA;ACAA;AACA;",
6
+ "names": []
7
+ }
@@ -1,46 +1,40 @@
1
- import propsTypes from 'prop-types';
2
- import { PropTypes } from 'react-desc';
3
- import { noop } from 'lodash';
4
-
5
- /**
6
- *
7
- * BUBBLE
8
- *
9
- */
1
+ import * as React from "react";
2
+ import propTypes from "prop-types";
3
+ import { PropTypes } from "react-desc";
4
+ import { noop } from "lodash";
10
5
  const BUBBLE_TYPES = {
11
- SENDER: 'SENDER',
12
- RECIPIENT: 'RECIPIENT',
13
- DELIMITER: 'DELIMITER',
14
- SYSTEM: 'SYSTEM'
6
+ SENDER: "SENDER",
7
+ RECIPIENT: "RECIPIENT",
8
+ DELIMITER: "DELIMITER",
9
+ SYSTEM: "SYSTEM"
15
10
  };
16
11
  const defaultBubbleProps = {
17
- dsId: undefined,
12
+ dsId: void 0,
18
13
  type: BUBBLE_TYPES.SENDER,
19
- title: undefined,
20
- time: undefined,
21
- body: undefined,
14
+ title: void 0,
15
+ time: void 0,
16
+ body: void 0,
22
17
  onClick: noop,
23
- errorMessage: undefined,
24
- helpMessage: undefined
18
+ errorMessage: void 0,
19
+ helpMessage: void 0
25
20
  };
26
21
  const propsBubbles = {
27
- dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Unique id for bubble').defaultValue(defaultBubbleProps.dsId),
28
- type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]).isRequired.description('Define bubble type ').defaultValue(defaultBubbleProps.type),
29
- title: PropTypes.string.isRequired.description('Title of the bubble').defaultValue(defaultBubbleProps.title),
30
- time: PropTypes.string.isRequired.description('Time of the bubble').defaultValue(defaultBubbleProps.title),
31
- body: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired.description('Bubble content').defaultValue(defaultBubbleProps.body),
32
- onClick: PropTypes.string.description('Callback when the bubble is tapped').defaultValue(defaultBubbleProps.onClick),
33
- errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Error message to display at bottom of the bubble').defaultValue(defaultBubbleProps.onClick),
34
- helpMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Help message to display at bottom of the bubble').defaultValue(defaultBubbleProps.onClick)
22
+ dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description("Unique id for bubble").defaultValue(defaultBubbleProps.dsId),
23
+ type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]).isRequired.description("Define bubble type ").defaultValue(defaultBubbleProps.type),
24
+ title: PropTypes.string.isRequired.description("Title of the bubble").defaultValue(defaultBubbleProps.title),
25
+ time: PropTypes.string.isRequired.description("Time of the bubble").defaultValue(defaultBubbleProps.title),
26
+ body: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired.description("Bubble content").defaultValue(defaultBubbleProps.body),
27
+ onClick: PropTypes.string.description("Callback when the bubble is tapped").defaultValue(defaultBubbleProps.onClick),
28
+ errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description("Error message to display at bottom of the bubble").defaultValue(defaultBubbleProps.onClick),
29
+ helpMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description("Help message to display at bottom of the bubble").defaultValue(defaultBubbleProps.onClick)
35
30
  };
36
- /**
37
- *
38
- * BUBBLE ARROW
39
- *
40
- */
41
-
42
31
  const propsArrowBubble = {
43
- type: propsTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER])
32
+ type: propTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER])
44
33
  };
45
-
46
- export { BUBBLE_TYPES, defaultBubbleProps, propsArrowBubble, propsBubbles };
34
+ export {
35
+ BUBBLE_TYPES,
36
+ defaultBubbleProps,
37
+ propsArrowBubble,
38
+ propsBubbles
39
+ };
40
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/bubble/props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AAQO,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,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,SACpD,YAAY,wBACZ,aAAa,mBAAmB;AAAA,EACnC,MAAM,UAAU,MAAM,CAAC,aAAa,WAAW,aAAa,SACzD,WAAW,YAAY,uBACvB,aAAa,mBAAmB;AAAA,EACnC,OAAO,UAAU,OAAO,WAAW,YAAY,uBAAuB,aAAa,mBAAmB;AAAA,EACtG,MAAM,UAAU,OAAO,WAAW,YAAY,sBAAsB,aAAa,mBAAmB;AAAA,EACpG,MAAM,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,UACpD,WAAW,YAAY,kBACvB,aAAa,mBAAmB;AAAA,EACnC,SAAS,UAAU,OAAO,YAAY,sCAAsC,aAAa,mBAAmB;AAAA,EAC5G,cAAc,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,UAC5D,YAAY,oDACZ,aAAa,mBAAmB;AAAA,EACnC,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,UAC3D,YAAY,mDACZ,aAAa,mBAAmB;AAAA;AAQ9B,MAAM,mBAAmB;AAAA,EAC9B,MAAM,UAAU,MAAM,CAAC,aAAa,WAAW,aAAa;AAAA;",
6
+ "names": []
7
+ }