@botonic/react 0.30.7 → 0.30.8-alpha.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 (388) hide show
  1. package/lib/cjs/components/carousel.d.ts +1 -2
  2. package/lib/cjs/contexts.d.ts +0 -1
  3. package/lib/cjs/message-utils.d.ts +1 -2
  4. package/lib/cjs/node-app.d.ts +1 -1
  5. package/lib/cjs/react-bot.d.ts +1 -2
  6. package/lib/cjs/webchat/hooks/use-scroll-to-bottom.d.ts +1 -2
  7. package/lib/cjs/webchat/hooks/use-scroll-to-bottom.js +1 -2
  8. package/lib/cjs/webchat/hooks/use-scroll-to-bottom.js.map +1 -1
  9. package/lib/cjs/webchat/hooks/use-webchat.d.ts +0 -1
  10. package/lib/cjs/webchat/message-list/index.js +0 -2
  11. package/lib/cjs/webchat/message-list/index.js.map +1 -1
  12. package/lib/cjs/webchat/message-list/styles.js +1 -0
  13. package/lib/cjs/webchat/message-list/styles.js.map +1 -1
  14. package/lib/cjs/webchat/utils.d.ts +0 -1
  15. package/lib/cjs/webchat-app.d.ts +3 -4
  16. package/package.json +1 -1
  17. package/src/webchat/hooks/use-scroll-to-bottom.ts +1 -6
  18. package/src/webchat/message-list/index.tsx +0 -2
  19. package/src/webchat/message-list/styles.ts +1 -0
  20. package/lib/esm/app.d.ts +0 -2
  21. package/lib/esm/app.js +0 -6
  22. package/lib/esm/app.js.map +0 -1
  23. package/lib/esm/botonic-tester.d.ts +0 -30
  24. package/lib/esm/botonic-tester.js +0 -78
  25. package/lib/esm/botonic-tester.js.map +0 -1
  26. package/lib/esm/components/audio.d.ts +0 -8
  27. package/lib/esm/components/audio.js +0 -18
  28. package/lib/esm/components/audio.js.map +0 -1
  29. package/lib/esm/components/button.d.ts +0 -17
  30. package/lib/esm/components/button.js +0 -160
  31. package/lib/esm/components/button.js.map +0 -1
  32. package/lib/esm/components/buttons-disabler.d.ts +0 -24
  33. package/lib/esm/components/buttons-disabler.js +0 -84
  34. package/lib/esm/components/buttons-disabler.js.map +0 -1
  35. package/lib/esm/components/carousel.d.ts +0 -10
  36. package/lib/esm/components/carousel.js +0 -105
  37. package/lib/esm/components/carousel.js.map +0 -1
  38. package/lib/esm/components/components.d.ts +0 -12
  39. package/lib/esm/components/components.js +0 -17
  40. package/lib/esm/components/components.js.map +0 -1
  41. package/lib/esm/components/custom-message.d.ts +0 -12
  42. package/lib/esm/components/custom-message.js +0 -56
  43. package/lib/esm/components/custom-message.js.map +0 -1
  44. package/lib/esm/components/document.d.ts +0 -8
  45. package/lib/esm/components/document.js +0 -42
  46. package/lib/esm/components/document.js.map +0 -1
  47. package/lib/esm/components/element.d.ts +0 -4
  48. package/lib/esm/components/element.js +0 -51
  49. package/lib/esm/components/element.js.map +0 -1
  50. package/lib/esm/components/handoff.d.ts +0 -1
  51. package/lib/esm/components/handoff.js +0 -49
  52. package/lib/esm/components/handoff.js.map +0 -1
  53. package/lib/esm/components/image.d.ts +0 -8
  54. package/lib/esm/components/image.js +0 -35
  55. package/lib/esm/components/image.js.map +0 -1
  56. package/lib/esm/components/index-types.d.ts +0 -186
  57. package/lib/esm/components/index-types.js +0 -2
  58. package/lib/esm/components/index-types.js.map +0 -1
  59. package/lib/esm/components/index.d.ts +0 -24
  60. package/lib/esm/components/index.js +0 -25
  61. package/lib/esm/components/index.js.map +0 -1
  62. package/lib/esm/components/location.d.ts +0 -11
  63. package/lib/esm/components/location.js +0 -27
  64. package/lib/esm/components/location.js.map +0 -1
  65. package/lib/esm/components/markdown.d.ts +0 -7
  66. package/lib/esm/components/markdown.js +0 -152
  67. package/lib/esm/components/markdown.js.map +0 -1
  68. package/lib/esm/components/message/index.d.ts +0 -1
  69. package/lib/esm/components/message/index.js +0 -146
  70. package/lib/esm/components/message/index.js.map +0 -1
  71. package/lib/esm/components/message/message-feedback.d.ts +0 -7
  72. package/lib/esm/components/message/message-feedback.js +0 -59
  73. package/lib/esm/components/message/message-feedback.js.map +0 -1
  74. package/lib/esm/components/message/message-footer.d.ts +0 -11
  75. package/lib/esm/components/message/message-footer.js +0 -17
  76. package/lib/esm/components/message/message-footer.js.map +0 -1
  77. package/lib/esm/components/message/message-image.d.ts +0 -7
  78. package/lib/esm/components/message/message-image.js +0 -19
  79. package/lib/esm/components/message/message-image.js.map +0 -1
  80. package/lib/esm/components/message/styles.d.ts +0 -33
  81. package/lib/esm/components/message/styles.js +0 -118
  82. package/lib/esm/components/message/styles.js.map +0 -1
  83. package/lib/esm/components/message/timestamps.d.ts +0 -13
  84. package/lib/esm/components/message/timestamps.js +0 -40
  85. package/lib/esm/components/message/timestamps.js.map +0 -1
  86. package/lib/esm/components/message-template.d.ts +0 -1
  87. package/lib/esm/components/message-template.js +0 -9
  88. package/lib/esm/components/message-template.js.map +0 -1
  89. package/lib/esm/components/multichannel/facebook/facebook.d.ts +0 -17
  90. package/lib/esm/components/multichannel/facebook/facebook.js +0 -43
  91. package/lib/esm/components/multichannel/facebook/facebook.js.map +0 -1
  92. package/lib/esm/components/multichannel/index-types.d.ts +0 -46
  93. package/lib/esm/components/multichannel/index-types.js +0 -2
  94. package/lib/esm/components/multichannel/index-types.js.map +0 -1
  95. package/lib/esm/components/multichannel/index.d.ts +0 -11
  96. package/lib/esm/components/multichannel/index.js +0 -12
  97. package/lib/esm/components/multichannel/index.js.map +0 -1
  98. package/lib/esm/components/multichannel/multichannel-button.d.ts +0 -1
  99. package/lib/esm/components/multichannel/multichannel-button.js +0 -67
  100. package/lib/esm/components/multichannel/multichannel-button.js.map +0 -1
  101. package/lib/esm/components/multichannel/multichannel-carousel.d.ts +0 -1
  102. package/lib/esm/components/multichannel/multichannel-carousel.js +0 -74
  103. package/lib/esm/components/multichannel/multichannel-carousel.js.map +0 -1
  104. package/lib/esm/components/multichannel/multichannel-context.d.ts +0 -11
  105. package/lib/esm/components/multichannel/multichannel-context.js +0 -12
  106. package/lib/esm/components/multichannel/multichannel-context.js.map +0 -1
  107. package/lib/esm/components/multichannel/multichannel-reply.d.ts +0 -1
  108. package/lib/esm/components/multichannel/multichannel-reply.js +0 -20
  109. package/lib/esm/components/multichannel/multichannel-reply.js.map +0 -1
  110. package/lib/esm/components/multichannel/multichannel-text.d.ts +0 -1
  111. package/lib/esm/components/multichannel/multichannel-text.js +0 -160
  112. package/lib/esm/components/multichannel/multichannel-text.js.map +0 -1
  113. package/lib/esm/components/multichannel/multichannel-utils.d.ts +0 -21
  114. package/lib/esm/components/multichannel/multichannel-utils.js +0 -81
  115. package/lib/esm/components/multichannel/multichannel-utils.js.map +0 -1
  116. package/lib/esm/components/multichannel/multichannel.d.ts +0 -1
  117. package/lib/esm/components/multichannel/multichannel.js +0 -57
  118. package/lib/esm/components/multichannel/multichannel.js.map +0 -1
  119. package/lib/esm/components/multichannel/whatsapp/constants.d.ts +0 -11
  120. package/lib/esm/components/multichannel/whatsapp/constants.js +0 -10
  121. package/lib/esm/components/multichannel/whatsapp/constants.js.map +0 -1
  122. package/lib/esm/components/multichannel/whatsapp/markdown-meta.d.ts +0 -1
  123. package/lib/esm/components/multichannel/whatsapp/markdown-meta.js +0 -38
  124. package/lib/esm/components/multichannel/whatsapp/markdown-meta.js.map +0 -1
  125. package/lib/esm/components/pic.d.ts +0 -6
  126. package/lib/esm/components/pic.js +0 -25
  127. package/lib/esm/components/pic.js.map +0 -1
  128. package/lib/esm/components/raw.d.ts +0 -9
  129. package/lib/esm/components/raw.js +0 -39
  130. package/lib/esm/components/raw.js.map +0 -1
  131. package/lib/esm/components/reply.d.ts +0 -9
  132. package/lib/esm/components/reply.js +0 -49
  133. package/lib/esm/components/reply.js.map +0 -1
  134. package/lib/esm/components/share-button.d.ts +0 -1
  135. package/lib/esm/components/share-button.js +0 -9
  136. package/lib/esm/components/share-button.js.map +0 -1
  137. package/lib/esm/components/subtitle.d.ts +0 -6
  138. package/lib/esm/components/subtitle.js +0 -19
  139. package/lib/esm/components/subtitle.js.map +0 -1
  140. package/lib/esm/components/text.d.ts +0 -7
  141. package/lib/esm/components/text.js +0 -40
  142. package/lib/esm/components/text.js.map +0 -1
  143. package/lib/esm/components/title.d.ts +0 -6
  144. package/lib/esm/components/title.js +0 -17
  145. package/lib/esm/components/title.js.map +0 -1
  146. package/lib/esm/components/video.d.ts +0 -8
  147. package/lib/esm/components/video.js +0 -26
  148. package/lib/esm/components/video.js.map +0 -1
  149. package/lib/esm/components/webchat-settings.d.ts +0 -3
  150. package/lib/esm/components/webchat-settings.js +0 -69
  151. package/lib/esm/components/webchat-settings.js.map +0 -1
  152. package/lib/esm/components/whatsapp-button-list.d.ts +0 -20
  153. package/lib/esm/components/whatsapp-button-list.js +0 -47
  154. package/lib/esm/components/whatsapp-button-list.js.map +0 -1
  155. package/lib/esm/components/whatsapp-cta-url-button.d.ts +0 -15
  156. package/lib/esm/components/whatsapp-cta-url-button.js +0 -33
  157. package/lib/esm/components/whatsapp-cta-url-button.js.map +0 -1
  158. package/lib/esm/components/whatsapp-template.d.ts +0 -1
  159. package/lib/esm/components/whatsapp-template.js +0 -20
  160. package/lib/esm/components/whatsapp-template.js.map +0 -1
  161. package/lib/esm/constants.d.ts +0 -165
  162. package/lib/esm/constants.js +0 -187
  163. package/lib/esm/constants.js.map +0 -1
  164. package/lib/esm/contexts.d.ts +0 -19
  165. package/lib/esm/contexts.js +0 -95
  166. package/lib/esm/contexts.js.map +0 -1
  167. package/lib/esm/dev-app.d.ts +0 -31
  168. package/lib/esm/dev-app.js +0 -78
  169. package/lib/esm/dev-app.js.map +0 -1
  170. package/lib/esm/index-types.d.ts +0 -150
  171. package/lib/esm/index-types.js +0 -12
  172. package/lib/esm/index-types.js.map +0 -1
  173. package/lib/esm/index.d.ts +0 -11
  174. package/lib/esm/index.js +0 -12
  175. package/lib/esm/index.js.map +0 -1
  176. package/lib/esm/message-utils.d.ts +0 -19
  177. package/lib/esm/message-utils.js +0 -41
  178. package/lib/esm/message-utils.js.map +0 -1
  179. package/lib/esm/msg-to-botonic.d.ts +0 -18
  180. package/lib/esm/msg-to-botonic.js +0 -135
  181. package/lib/esm/msg-to-botonic.js.map +0 -1
  182. package/lib/esm/node-app.d.ts +0 -7
  183. package/lib/esm/node-app.js +0 -19
  184. package/lib/esm/node-app.js.map +0 -1
  185. package/lib/esm/react-bot.d.ts +0 -8
  186. package/lib/esm/react-bot.js +0 -32
  187. package/lib/esm/react-bot.js.map +0 -1
  188. package/lib/esm/shared/styles.d.ts +0 -2
  189. package/lib/esm/shared/styles.js +0 -28
  190. package/lib/esm/shared/styles.js.map +0 -1
  191. package/lib/esm/util/dom.d.ts +0 -4
  192. package/lib/esm/util/dom.js +0 -24
  193. package/lib/esm/util/dom.js.map +0 -1
  194. package/lib/esm/util/environment.d.ts +0 -6
  195. package/lib/esm/util/environment.js +0 -61
  196. package/lib/esm/util/environment.js.map +0 -1
  197. package/lib/esm/util/error-boundary.d.ts +0 -7
  198. package/lib/esm/util/error-boundary.js +0 -28
  199. package/lib/esm/util/error-boundary.js.map +0 -1
  200. package/lib/esm/util/index.d.ts +0 -9
  201. package/lib/esm/util/index.js +0 -10
  202. package/lib/esm/util/index.js.map +0 -1
  203. package/lib/esm/util/logs.d.ts +0 -2
  204. package/lib/esm/util/logs.js +0 -15
  205. package/lib/esm/util/logs.js.map +0 -1
  206. package/lib/esm/util/objects.d.ts +0 -3
  207. package/lib/esm/util/objects.js +0 -38
  208. package/lib/esm/util/objects.js.map +0 -1
  209. package/lib/esm/util/react.d.ts +0 -12
  210. package/lib/esm/util/react.js +0 -34
  211. package/lib/esm/util/react.js.map +0 -1
  212. package/lib/esm/util/regexs.d.ts +0 -2
  213. package/lib/esm/util/regexs.js +0 -18
  214. package/lib/esm/util/regexs.js.map +0 -1
  215. package/lib/esm/util/strings.d.ts +0 -1
  216. package/lib/esm/util/strings.js +0 -7
  217. package/lib/esm/util/strings.js.map +0 -1
  218. package/lib/esm/util/webchat.d.ts +0 -11
  219. package/lib/esm/util/webchat.js +0 -53
  220. package/lib/esm/util/webchat.js.map +0 -1
  221. package/lib/esm/util/webviews.d.ts +0 -1
  222. package/lib/esm/util/webviews.js +0 -6
  223. package/lib/esm/util/webviews.js.map +0 -1
  224. package/lib/esm/webchat/actions.d.ts +0 -27
  225. package/lib/esm/webchat/actions.js +0 -29
  226. package/lib/esm/webchat/actions.js.map +0 -1
  227. package/lib/esm/webchat/chat-area/index.d.ts +0 -1
  228. package/lib/esm/webchat/chat-area/index.js +0 -18
  229. package/lib/esm/webchat/chat-area/index.js.map +0 -1
  230. package/lib/esm/webchat/chat-area/styles.d.ts +0 -3
  231. package/lib/esm/webchat/chat-area/styles.js +0 -9
  232. package/lib/esm/webchat/chat-area/styles.js.map +0 -1
  233. package/lib/esm/webchat/components/common.d.ts +0 -1
  234. package/lib/esm/webchat/components/common.js +0 -9
  235. package/lib/esm/webchat/components/common.js.map +0 -1
  236. package/lib/esm/webchat/components/conditional-animation.d.ts +0 -1
  237. package/lib/esm/webchat/components/conditional-animation.js +0 -12
  238. package/lib/esm/webchat/components/conditional-animation.js.map +0 -1
  239. package/lib/esm/webchat/components/opened-persistent-menu.d.ts +0 -6
  240. package/lib/esm/webchat/components/opened-persistent-menu.js +0 -30
  241. package/lib/esm/webchat/components/opened-persistent-menu.js.map +0 -1
  242. package/lib/esm/webchat/constants.d.ts +0 -8
  243. package/lib/esm/webchat/constants.js +0 -10
  244. package/lib/esm/webchat/constants.js.map +0 -1
  245. package/lib/esm/webchat/cover-component/index.d.ts +0 -6
  246. package/lib/esm/webchat/cover-component/index.js +0 -17
  247. package/lib/esm/webchat/cover-component/index.js.map +0 -1
  248. package/lib/esm/webchat/devices/index.d.ts +0 -11
  249. package/lib/esm/webchat/devices/index.js +0 -18
  250. package/lib/esm/webchat/devices/index.js.map +0 -1
  251. package/lib/esm/webchat/header.d.ts +0 -3
  252. package/lib/esm/webchat/header.js +0 -81
  253. package/lib/esm/webchat/header.js.map +0 -1
  254. package/lib/esm/webchat/hooks/index.d.ts +0 -11
  255. package/lib/esm/webchat/hooks/index.js +0 -12
  256. package/lib/esm/webchat/hooks/index.js.map +0 -1
  257. package/lib/esm/webchat/hooks/use-component-visible.d.ts +0 -8
  258. package/lib/esm/webchat/hooks/use-component-visible.js +0 -20
  259. package/lib/esm/webchat/hooks/use-component-visible.js.map +0 -1
  260. package/lib/esm/webchat/hooks/use-component-will-mount.d.ts +0 -1
  261. package/lib/esm/webchat/hooks/use-component-will-mount.js +0 -5
  262. package/lib/esm/webchat/hooks/use-component-will-mount.js.map +0 -1
  263. package/lib/esm/webchat/hooks/use-device-adapter.d.ts +0 -3
  264. package/lib/esm/webchat/hooks/use-device-adapter.js +0 -42
  265. package/lib/esm/webchat/hooks/use-device-adapter.js.map +0 -1
  266. package/lib/esm/webchat/hooks/use-previous.d.ts +0 -1
  267. package/lib/esm/webchat/hooks/use-previous.js +0 -9
  268. package/lib/esm/webchat/hooks/use-previous.js.map +0 -1
  269. package/lib/esm/webchat/hooks/use-scroll-to-bottom.d.ts +0 -7
  270. package/lib/esm/webchat/hooks/use-scroll-to-bottom.js +0 -19
  271. package/lib/esm/webchat/hooks/use-scroll-to-bottom.js.map +0 -1
  272. package/lib/esm/webchat/hooks/use-scrollbar-controller.d.ts +0 -6
  273. package/lib/esm/webchat/hooks/use-scrollbar-controller.js +0 -136
  274. package/lib/esm/webchat/hooks/use-scrollbar-controller.js.map +0 -1
  275. package/lib/esm/webchat/hooks/use-typing.d.ts +0 -10
  276. package/lib/esm/webchat/hooks/use-typing.js +0 -28
  277. package/lib/esm/webchat/hooks/use-typing.js.map +0 -1
  278. package/lib/esm/webchat/hooks/use-virtual-keyboard-detection.d.ts +0 -3
  279. package/lib/esm/webchat/hooks/use-virtual-keyboard-detection.js +0 -24
  280. package/lib/esm/webchat/hooks/use-virtual-keyboard-detection.js.map +0 -1
  281. package/lib/esm/webchat/hooks/use-webchat-dimensions.d.ts +0 -4
  282. package/lib/esm/webchat/hooks/use-webchat-dimensions.js +0 -36
  283. package/lib/esm/webchat/hooks/use-webchat-dimensions.js.map +0 -1
  284. package/lib/esm/webchat/hooks/use-webchat-resizer.d.ts +0 -4
  285. package/lib/esm/webchat/hooks/use-webchat-resizer.js +0 -30
  286. package/lib/esm/webchat/hooks/use-webchat-resizer.js.map +0 -1
  287. package/lib/esm/webchat/hooks/use-webchat.d.ts +0 -47
  288. package/lib/esm/webchat/hooks/use-webchat.js +0 -189
  289. package/lib/esm/webchat/hooks/use-webchat.js.map +0 -1
  290. package/lib/esm/webchat/index-types.d.ts +0 -62
  291. package/lib/esm/webchat/index-types.js +0 -2
  292. package/lib/esm/webchat/index-types.js.map +0 -1
  293. package/lib/esm/webchat/index.d.ts +0 -4
  294. package/lib/esm/webchat/index.js +0 -10
  295. package/lib/esm/webchat/index.js.map +0 -1
  296. package/lib/esm/webchat/input-panel/attachment.d.ts +0 -7
  297. package/lib/esm/webchat/input-panel/attachment.js +0 -26
  298. package/lib/esm/webchat/input-panel/attachment.js.map +0 -1
  299. package/lib/esm/webchat/input-panel/emoji-picker.d.ts +0 -6
  300. package/lib/esm/webchat/input-panel/emoji-picker.js +0 -23
  301. package/lib/esm/webchat/input-panel/emoji-picker.js.map +0 -1
  302. package/lib/esm/webchat/input-panel/index.d.ts +0 -12
  303. package/lib/esm/webchat/input-panel/index.js +0 -50
  304. package/lib/esm/webchat/input-panel/index.js.map +0 -1
  305. package/lib/esm/webchat/input-panel/opened-emoji-picker.d.ts +0 -6
  306. package/lib/esm/webchat/input-panel/opened-emoji-picker.js +0 -10
  307. package/lib/esm/webchat/input-panel/opened-emoji-picker.js.map +0 -1
  308. package/lib/esm/webchat/input-panel/persistent-menu.d.ts +0 -6
  309. package/lib/esm/webchat/input-panel/persistent-menu.js +0 -14
  310. package/lib/esm/webchat/input-panel/persistent-menu.js.map +0 -1
  311. package/lib/esm/webchat/input-panel/send-button.d.ts +0 -5
  312. package/lib/esm/webchat/input-panel/send-button.js +0 -14
  313. package/lib/esm/webchat/input-panel/send-button.js.map +0 -1
  314. package/lib/esm/webchat/input-panel/styles.d.ts +0 -3
  315. package/lib/esm/webchat/input-panel/styles.js +0 -27
  316. package/lib/esm/webchat/input-panel/styles.js.map +0 -1
  317. package/lib/esm/webchat/input-panel/textarea.d.ts +0 -11
  318. package/lib/esm/webchat/input-panel/textarea.js +0 -56
  319. package/lib/esm/webchat/input-panel/textarea.js.map +0 -1
  320. package/lib/esm/webchat/message-list/index.d.ts +0 -1
  321. package/lib/esm/webchat/message-list/index.js +0 -109
  322. package/lib/esm/webchat/message-list/index.js.map +0 -1
  323. package/lib/esm/webchat/message-list/intro-message.d.ts +0 -1
  324. package/lib/esm/webchat/message-list/intro-message.js +0 -18
  325. package/lib/esm/webchat/message-list/intro-message.js.map +0 -1
  326. package/lib/esm/webchat/message-list/scroll-button.d.ts +0 -5
  327. package/lib/esm/webchat/message-list/scroll-button.js +0 -12
  328. package/lib/esm/webchat/message-list/scroll-button.js.map +0 -1
  329. package/lib/esm/webchat/message-list/styles.d.ts +0 -5
  330. package/lib/esm/webchat/message-list/styles.js +0 -55
  331. package/lib/esm/webchat/message-list/styles.js.map +0 -1
  332. package/lib/esm/webchat/message-list/unread-messages-banner.d.ts +0 -6
  333. package/lib/esm/webchat/message-list/unread-messages-banner.js +0 -13
  334. package/lib/esm/webchat/message-list/unread-messages-banner.js.map +0 -1
  335. package/lib/esm/webchat/message-list/use-debounce.d.ts +0 -1
  336. package/lib/esm/webchat/message-list/use-debounce.js +0 -14
  337. package/lib/esm/webchat/message-list/use-debounce.js.map +0 -1
  338. package/lib/esm/webchat/message-list/use-notifications.d.ts +0 -7
  339. package/lib/esm/webchat/message-list/use-notifications.js +0 -20
  340. package/lib/esm/webchat/message-list/use-notifications.js.map +0 -1
  341. package/lib/esm/webchat/messages-reducer.d.ts +0 -6
  342. package/lib/esm/webchat/messages-reducer.js +0 -83
  343. package/lib/esm/webchat/messages-reducer.js.map +0 -1
  344. package/lib/esm/webchat/replies.d.ts +0 -1
  345. package/lib/esm/webchat/replies.js +0 -42
  346. package/lib/esm/webchat/replies.js.map +0 -1
  347. package/lib/esm/webchat/session-view.d.ts +0 -1
  348. package/lib/esm/webchat/session-view.js +0 -96
  349. package/lib/esm/webchat/session-view.js.map +0 -1
  350. package/lib/esm/webchat/tracking.d.ts +0 -7
  351. package/lib/esm/webchat/tracking.js +0 -10
  352. package/lib/esm/webchat/tracking.js.map +0 -1
  353. package/lib/esm/webchat/trigger-button/index.d.ts +0 -1
  354. package/lib/esm/webchat/trigger-button/index.js +0 -28
  355. package/lib/esm/webchat/trigger-button/index.js.map +0 -1
  356. package/lib/esm/webchat/trigger-button/styles.d.ts +0 -3
  357. package/lib/esm/webchat/trigger-button/styles.js +0 -36
  358. package/lib/esm/webchat/trigger-button/styles.js.map +0 -1
  359. package/lib/esm/webchat/typing-indicator/index.d.ts +0 -3
  360. package/lib/esm/webchat/typing-indicator/index.js +0 -8
  361. package/lib/esm/webchat/typing-indicator/index.js.map +0 -1
  362. package/lib/esm/webchat/typing-indicator/styles.d.ts +0 -7
  363. package/lib/esm/webchat/typing-indicator/styles.js +0 -46
  364. package/lib/esm/webchat/typing-indicator/styles.js.map +0 -1
  365. package/lib/esm/webchat/use-storage-state-hook.d.ts +0 -1
  366. package/lib/esm/webchat/use-storage-state-hook.js +0 -38
  367. package/lib/esm/webchat/use-storage-state-hook.js.map +0 -1
  368. package/lib/esm/webchat/utils.d.ts +0 -2
  369. package/lib/esm/webchat/utils.js +0 -8
  370. package/lib/esm/webchat/utils.js.map +0 -1
  371. package/lib/esm/webchat/webchat-dev.d.ts +0 -7
  372. package/lib/esm/webchat/webchat-dev.js +0 -56
  373. package/lib/esm/webchat/webchat-dev.js.map +0 -1
  374. package/lib/esm/webchat/webchat-reducer.d.ts +0 -6
  375. package/lib/esm/webchat/webchat-reducer.js +0 -46
  376. package/lib/esm/webchat/webchat-reducer.js.map +0 -1
  377. package/lib/esm/webchat/webchat.d.ts +0 -2
  378. package/lib/esm/webchat/webchat.js +0 -543
  379. package/lib/esm/webchat/webchat.js.map +0 -1
  380. package/lib/esm/webchat/webview.d.ts +0 -2
  381. package/lib/esm/webchat/webview.js +0 -70
  382. package/lib/esm/webchat/webview.js.map +0 -1
  383. package/lib/esm/webchat-app.d.ts +0 -102
  384. package/lib/esm/webchat-app.js +0 -299
  385. package/lib/esm/webchat-app.js.map +0 -1
  386. package/lib/esm/webview-app.d.ts +0 -7
  387. package/lib/esm/webview-app.js +0 -102
  388. package/lib/esm/webview-app.js.map +0 -1
@@ -1,4 +0,0 @@
1
- export declare const useWebchatResizer: () => {
2
- handleKeyboardShown: () => void;
3
- handleKeyboardHidden: () => void;
4
- };
@@ -1,30 +0,0 @@
1
- import { useContext } from 'react';
2
- import { WebchatContext } from '../../contexts';
3
- import { useWebchatDimensions } from './use-webchat-dimensions';
4
- export const useWebchatResizer = () => {
5
- const { webchatRef, chatAreaRef, inputPanelRef, headerRef } = useContext(WebchatContext);
6
- const { calculateResizedPercentualWebchatHeight, calculateResizedPxChatAreaHeight, } = useWebchatDimensions();
7
- const handleKeyboardShown = () => {
8
- if (webchatRef.current &&
9
- chatAreaRef.current &&
10
- headerRef.current &&
11
- inputPanelRef.current) {
12
- webchatRef.current.style.height = `${calculateResizedPercentualWebchatHeight()}%`;
13
- chatAreaRef.current.style.height = `${calculateResizedPxChatAreaHeight()}px`;
14
- }
15
- };
16
- const handleKeyboardHidden = () => {
17
- if (webchatRef.current &&
18
- chatAreaRef.current &&
19
- inputPanelRef.current &&
20
- headerRef.current) {
21
- webchatRef.current.style.height = '100%';
22
- chatAreaRef.current.style.height = `${calculateResizedPxChatAreaHeight()}px`;
23
- }
24
- };
25
- return {
26
- handleKeyboardShown,
27
- handleKeyboardHidden,
28
- };
29
- };
30
- //# sourceMappingURL=use-webchat-resizer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-webchat-resizer.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-webchat-resizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAE/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,GACzD,UAAU,CAAC,cAAc,CAAC,CAAA;IAE5B,MAAM,EACJ,uCAAuC,EACvC,gCAAgC,GACjC,GAAG,oBAAoB,EAAE,CAAA;IAE1B,MAAM,mBAAmB,GAAG,GAAG,EAAE;QAC/B,IACE,UAAU,CAAC,OAAO;YAClB,WAAW,CAAC,OAAO;YACnB,SAAS,CAAC,OAAO;YACjB,aAAa,CAAC,OAAO,EACrB;YACA,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,uCAAuC,EAAE,GAAG,CAAA;YACjF,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,gCAAgC,EAAE,IAAI,CAAA;SAC7E;IACH,CAAC,CAAA;IAED,MAAM,oBAAoB,GAAG,GAAG,EAAE;QAChC,IACE,UAAU,CAAC,OAAO;YAClB,WAAW,CAAC,OAAO;YACnB,aAAa,CAAC,OAAO;YACrB,SAAS,CAAC,OAAO,EACjB;YACA,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAA;YACxC,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,gCAAgC,EAAE,IAAI,CAAA;SAC7E;IACH,CAAC,CAAA;IAED,OAAO;QACL,mBAAmB;QACnB,oBAAoB;KACrB,CAAA;AACH,CAAC,CAAA"}
@@ -1,47 +0,0 @@
1
- /// <reference types="react" />
2
- import { Session } from '@botonic/core';
3
- import { ThemeProps, Webview } from '../../components/index-types';
4
- import { ClientInput, WebchatMessage } from '../../index-types';
5
- import { WebchatAction } from '../actions';
6
- import { DevSettings, ErrorMessage, WebchatState } from '../index-types';
7
- export declare const webchatInitialState: WebchatState;
8
- export declare function useWebchat(): {
9
- addMessage: (message: WebchatMessage) => void;
10
- addMessageComponent: (message: {
11
- props: WebchatMessage;
12
- }) => void;
13
- clearMessages: () => void;
14
- doRenderCustomComponent: (toggle: boolean) => void;
15
- resetUnreadMessages: () => void;
16
- setCurrentAttachment: (attachment: File) => void;
17
- setError: (error: ErrorMessage) => void;
18
- setIsInputFocused: (isInputFocused: boolean) => void;
19
- setLastMessageVisible: (isLastMessageVisible: boolean) => void;
20
- setOnline: (online: boolean) => void;
21
- toggleCoverComponent: (toggle: boolean) => void;
22
- toggleEmojiPicker: (toggle: boolean) => void;
23
- togglePersistentMenu: (toggle: boolean) => void;
24
- toggleWebchat: (toggle: boolean) => void;
25
- updateDevSettings: (settings: DevSettings) => void;
26
- updateHandoff: (handoff: boolean) => void;
27
- updateLastMessageDate: (date: string) => void;
28
- updateLastRoutePath: (path: string) => void;
29
- updateLatestInput: (input: ClientInput) => void;
30
- updateMessage: (message: WebchatMessage) => void;
31
- updateReplies: (replies: any) => void;
32
- updateSession: (session: Session) => void;
33
- updateTheme: (theme: ThemeProps, themeUpdates?: ThemeProps) => void;
34
- updateTyping: (typing: boolean) => void;
35
- updateWebview: (webview: Webview, params: Record<string, string>) => void;
36
- webchatDispatch: import("react").Dispatch<{
37
- type: WebchatAction;
38
- payload?: any;
39
- }>;
40
- webchatState: WebchatState;
41
- webchatRef: import("react").MutableRefObject<HTMLDivElement | null>;
42
- headerRef: import("react").MutableRefObject<HTMLDivElement | null>;
43
- chatAreaRef: import("react").MutableRefObject<HTMLDivElement | null>;
44
- scrollableMessagesListRef: import("react").MutableRefObject<HTMLDivElement | null>;
45
- repliesRef: import("react").MutableRefObject<HTMLDivElement | null>;
46
- inputPanelRef: import("react").MutableRefObject<HTMLDivElement | null>;
47
- };
@@ -1,189 +0,0 @@
1
- import { useReducer, useRef } from 'react';
2
- import { COLORS, WEBCHAT } from '../../constants';
3
- import { WebchatAction } from '../actions';
4
- import { webchatReducer } from '../webchat-reducer';
5
- export const webchatInitialState = {
6
- width: WEBCHAT.DEFAULTS.WIDTH,
7
- height: WEBCHAT.DEFAULTS.HEIGHT,
8
- messagesJSON: [],
9
- messagesComponents: [],
10
- replies: [],
11
- latestInput: {},
12
- typing: false,
13
- webview: null,
14
- webviewParams: null,
15
- session: { user: undefined },
16
- lastRoutePath: null,
17
- handoff: false,
18
- theme: {
19
- headerTitle: WEBCHAT.DEFAULTS.TITLE,
20
- brandColor: COLORS.BOTONIC_BLUE,
21
- brandImage: WEBCHAT.DEFAULTS.LOGO,
22
- triggerButtonImage: undefined,
23
- textPlaceholder: WEBCHAT.DEFAULTS.PLACEHOLDER,
24
- style: {
25
- fontFamily: WEBCHAT.DEFAULTS.FONT_FAMILY,
26
- },
27
- },
28
- themeUpdates: {},
29
- error: {},
30
- online: true,
31
- devSettings: { keepSessionOnReload: false },
32
- isWebchatOpen: false,
33
- isEmojiPickerOpen: false,
34
- isPersistentMenuOpen: false,
35
- isCoverComponentOpen: false,
36
- isCustomComponentRendered: false,
37
- lastMessageUpdate: undefined,
38
- currentAttachment: undefined,
39
- numUnreadMessages: 0,
40
- isLastMessageVisible: true,
41
- isInputFocused: false,
42
- };
43
- export function useWebchat() {
44
- const [webchatState, webchatDispatch] = useReducer(webchatReducer, webchatInitialState);
45
- const webchatRef = useRef(null);
46
- const chatAreaRef = useRef(null);
47
- const inputPanelRef = useRef(null);
48
- const headerRef = useRef(null);
49
- const scrollableMessagesListRef = useRef(null);
50
- const repliesRef = useRef(null);
51
- const addMessage = (message) => webchatDispatch({ type: WebchatAction.ADD_MESSAGE, payload: message });
52
- const addMessageComponent = (message) => webchatDispatch({
53
- type: WebchatAction.ADD_MESSAGE_COMPONENT,
54
- payload: message,
55
- });
56
- const updateMessage = (message) => webchatDispatch({ type: WebchatAction.UPDATE_MESSAGE, payload: message });
57
- const updateReplies = replies => webchatDispatch({ type: WebchatAction.UPDATE_REPLIES, payload: replies });
58
- const updateLatestInput = (input) => webchatDispatch({ type: WebchatAction.UPDATE_LATEST_INPUT, payload: input });
59
- const updateTyping = (typing) => webchatDispatch({ type: WebchatAction.UPDATE_TYPING, payload: typing });
60
- const updateWebview = (webview, params) => webchatDispatch({
61
- type: WebchatAction.UPDATE_WEBVIEW,
62
- payload: { webview, webviewParams: params },
63
- });
64
- const updateSession = (session) => {
65
- webchatDispatch({
66
- type: WebchatAction.UPDATE_SESSION,
67
- payload: session,
68
- });
69
- };
70
- const updateLastRoutePath = (path) => webchatDispatch({
71
- type: WebchatAction.UPDATE_LAST_ROUTE_PATH,
72
- payload: path,
73
- });
74
- const updateHandoff = (handoff) => webchatDispatch({
75
- type: WebchatAction.UPDATE_HANDOFF,
76
- payload: handoff,
77
- });
78
- const updateTheme = (theme, themeUpdates) => {
79
- const payload = themeUpdates !== undefined ? { theme, themeUpdates } : { theme };
80
- webchatDispatch({
81
- type: WebchatAction.UPDATE_THEME,
82
- payload,
83
- });
84
- };
85
- const updateDevSettings = (settings) => webchatDispatch({
86
- type: WebchatAction.UPDATE_DEV_SETTINGS,
87
- payload: settings,
88
- });
89
- const toggleWebchat = (toggle) => {
90
- webchatDispatch({
91
- type: WebchatAction.TOGGLE_WEBCHAT,
92
- payload: toggle,
93
- });
94
- };
95
- const toggleEmojiPicker = (toggle) => webchatDispatch({
96
- type: WebchatAction.TOGGLE_EMOJI_PICKER,
97
- payload: toggle,
98
- });
99
- const togglePersistentMenu = (toggle) => webchatDispatch({
100
- type: WebchatAction.TOGGLE_PERSISTENT_MENU,
101
- payload: toggle,
102
- });
103
- const toggleCoverComponent = (toggle) => webchatDispatch({
104
- type: WebchatAction.TOGGLE_COVER_COMPONENT,
105
- payload: toggle,
106
- });
107
- const doRenderCustomComponent = (toggle) => webchatDispatch({
108
- type: WebchatAction.DO_RENDER_CUSTOM_COMPONENT,
109
- payload: toggle,
110
- });
111
- const setError = (error) => webchatDispatch({
112
- type: WebchatAction.SET_ERROR,
113
- payload: error,
114
- });
115
- const setOnline = (online) => webchatDispatch({
116
- type: WebchatAction.SET_ONLINE,
117
- payload: online,
118
- });
119
- const clearMessages = () => {
120
- webchatDispatch({
121
- type: WebchatAction.CLEAR_MESSAGES,
122
- });
123
- };
124
- const updateLastMessageDate = (date) => {
125
- webchatDispatch({
126
- type: WebchatAction.UPDATE_LAST_MESSAGE_DATE,
127
- payload: date,
128
- });
129
- };
130
- const setCurrentAttachment = (attachment) => {
131
- webchatDispatch({
132
- type: WebchatAction.SET_CURRENT_ATTACHMENT,
133
- payload: attachment,
134
- });
135
- };
136
- const resetUnreadMessages = () => {
137
- webchatDispatch({
138
- type: WebchatAction.RESET_UNREAD_MESSAGES,
139
- });
140
- };
141
- const setLastMessageVisible = (isLastMessageVisible) => {
142
- webchatDispatch({
143
- type: WebchatAction.SET_LAST_MESSAGE_VISIBLE,
144
- payload: isLastMessageVisible,
145
- });
146
- };
147
- const setIsInputFocused = (isInputFocused) => {
148
- webchatDispatch({
149
- type: WebchatAction.SET_IS_INPUT_FOCUSED,
150
- payload: isInputFocused,
151
- });
152
- };
153
- return {
154
- addMessage,
155
- addMessageComponent,
156
- clearMessages,
157
- doRenderCustomComponent,
158
- resetUnreadMessages,
159
- setCurrentAttachment,
160
- setError,
161
- setIsInputFocused,
162
- setLastMessageVisible,
163
- setOnline,
164
- toggleCoverComponent,
165
- toggleEmojiPicker,
166
- togglePersistentMenu,
167
- toggleWebchat,
168
- updateDevSettings,
169
- updateHandoff,
170
- updateLastMessageDate,
171
- updateLastRoutePath,
172
- updateLatestInput,
173
- updateMessage,
174
- updateReplies,
175
- updateSession,
176
- updateTheme,
177
- updateTyping,
178
- updateWebview,
179
- webchatDispatch,
180
- webchatState,
181
- webchatRef,
182
- headerRef,
183
- chatAreaRef,
184
- scrollableMessagesListRef,
185
- repliesRef,
186
- inputPanelRef,
187
- };
188
- }
189
- //# sourceMappingURL=use-webchat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-webchat.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-webchat.ts"],"names":[],"mapp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UAAU;QACV,aAAa;KACd,CAAA;AACH,CAAC"}
@@ -1,62 +0,0 @@
1
- import type { Input as CoreInput, Session as CoreSession } from '@botonic/core';
2
- import { RefObject } from 'react';
3
- import { Webview } from '../components/index-types';
4
- export interface WebchatStateTheme {
5
- headerTitle: string;
6
- brandColor: string;
7
- brandImage: string;
8
- triggerButtonImage: undefined;
9
- textPlaceholder: string;
10
- style: {
11
- fontFamily: string;
12
- };
13
- }
14
- export interface ErrorMessage {
15
- message?: string;
16
- }
17
- export interface DevSettings {
18
- keepSessionOnReload?: boolean;
19
- showSessionView?: boolean;
20
- }
21
- export interface WebchatState {
22
- width: number;
23
- height: number;
24
- messagesJSON: any[];
25
- messagesComponents: any[];
26
- replies: any[];
27
- latestInput: Partial<CoreInput>;
28
- typing: boolean;
29
- webview: Webview | null;
30
- webviewParams: null;
31
- session: Partial<CoreSession>;
32
- lastRoutePath: string | null;
33
- handoff: boolean;
34
- theme: WebchatStateTheme;
35
- themeUpdates: Partial<WebchatStateTheme>;
36
- error: ErrorMessage;
37
- online: boolean;
38
- devSettings: DevSettings;
39
- isWebchatOpen: boolean;
40
- isEmojiPickerOpen: boolean;
41
- isPersistentMenuOpen: boolean;
42
- isCoverComponentOpen: boolean;
43
- isCustomComponentRendered: boolean;
44
- lastMessageUpdate?: string;
45
- currentAttachment?: File;
46
- numUnreadMessages: number;
47
- isLastMessageVisible: boolean;
48
- isInputFocused: boolean;
49
- }
50
- export interface WebchatProps {
51
- ref: RefObject<any>;
52
- onConnectionRegained?: () => Promise<void>;
53
- }
54
- export interface WebchatDevProps extends WebchatProps {
55
- initialDevSettings?: {
56
- keepSessionOnReload?: boolean;
57
- showSessionView?: boolean;
58
- };
59
- }
60
- export interface CoverComponentProps {
61
- closeComponent: () => void;
62
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-types.js","sourceRoot":"","sources":["../../../src/webchat/index-types.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export { Webchat } from './webchat';
2
- export { WebchatDev } from './webchat-dev';
3
- export declare function getBotonicApp(): any;
4
- export * from './index-types';
@@ -1,10 +0,0 @@
1
- // @ts-nocheck
2
- export { Webchat } from './webchat';
3
- export { WebchatDev } from './webchat-dev';
4
- export function getBotonicApp() {
5
- // Botonic is exported from your bot
6
- // eslint-disable-next-line no-undef
7
- return Botonic;
8
- }
9
- export * from './index-types';
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/webchat/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,MAAM,UAAU,aAAa;IAC3B,oCAAoC;IACpC,oCAAoC;IACpC,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,cAAc,eAAe,CAAA"}
@@ -1,7 +0,0 @@
1
- interface AttachmentProps {
2
- accept: string;
3
- enableAttachments: boolean;
4
- onChange: (event: any) => void;
5
- }
6
- export declare const Attachment: ({ accept, enableAttachments, onChange, }: AttachmentProps) => JSX.Element;
7
- export {};
@@ -1,26 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useContext, useRef } from 'react';
3
- import AttachmentIcon from '../../assets/attachment-icon.svg';
4
- import { ROLES, WEBCHAT } from '../../constants';
5
- import { WebchatContext } from '../../contexts';
6
- import { Icon } from '../components/common';
7
- import { ConditionalAnimation } from '../components/conditional-animation';
8
- export const Attachment = ({ accept, enableAttachments, onChange, }) => {
9
- const { getThemeProperty } = useContext(WebchatContext);
10
- const fileInputRef = useRef(null);
11
- const CustomAttachments = getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.customAttachments, undefined);
12
- const isAttachmentsEnabled = () => {
13
- var _a;
14
- const hasCustomAttachments = !!CustomAttachments;
15
- return ((_a = getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.enableAttachments, enableAttachments)) !== null && _a !== void 0 ? _a : hasCustomAttachments);
16
- };
17
- const attachmentsEnabled = isAttachmentsEnabled();
18
- const handleOnChange = event => {
19
- onChange(event);
20
- if (fileInputRef.current) {
21
- fileInputRef.current.value = '';
22
- }
23
- };
24
- return (_jsx(_Fragment, { children: attachmentsEnabled ? (_jsx(ConditionalAnimation, { children: _jsxs("div", Object.assign({ role: ROLES.ATTACHMENT_ICON }, { children: [_jsx("label", Object.assign({ htmlFor: 'attachment', style: { marginTop: 4 } }, { children: CustomAttachments ? (_jsx(CustomAttachments, {})) : (_jsx(Icon, { src: AttachmentIcon })) })), _jsx("input", { ref: fileInputRef, type: 'file', name: 'file', id: 'attachment', style: { display: 'none' }, onChange: handleOnChange, accept: accept })] })) })) : null }));
25
- };
26
- //# sourceMappingURL=attachment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attachment.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/attachment.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEjD,OAAO,cAAc,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAQ1E,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,MAAM,EACN,iBAAiB,EACjB,QAAQ,GACQ,EAAE,EAAE;IACpB,MAAM,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAEvD,MAAM,YAAY,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAA;IAE1D,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olean;
3
- onClick: () => void;
4
- }
5
- export declare const EmojiPicker: ({ enableEmojiPicker, onClick, }: EmojiPickerProps) => JSX.Element;
6
- export {};
@@ -1,23 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useContext } from 'react';
3
- import LogoEmoji from '../../assets/emojiButton.svg';
4
- import { ROLES, WEBCHAT } from '../../constants';
5
- import { WebchatContext } from '../../contexts';
6
- import { Icon } from '../components/common';
7
- import { ConditionalAnimation } from '../components/conditional-animation';
8
- export const EmojiPicker = ({ enableEmojiPicker, onClick, }) => {
9
- const { getThemeProperty } = useContext(WebchatContext);
10
- const CustomEmojiPicker = getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.customEmojiPicker, undefined);
11
- const isEmojiPickerEnabled = () => {
12
- var _a;
13
- const hasCustomEmojiPicker = !!CustomEmojiPicker;
14
- return ((_a = getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.enableEmojiPicker, enableEmojiPicker)) !== null && _a !== void 0 ? _a : hasCustomEmojiPicker);
15
- };
16
- const emojiPickerEnabled = isEmojiPickerEnabled();
17
- const handleClick = (event) => {
18
- onClick();
19
- event.stopPropagation();
20
- };
21
- return (_jsx(_Fragment, { children: emojiPickerEnabled ? (_jsx(ConditionalAnimation, { children: _jsx("div", Object.assign({ role: ROLES.EMOJI_PICKER_ICON, onClick: handleClick }, { children: CustomEmojiPicker ? (_jsx(CustomEmojiPicker, {})) : (_jsx(Icon, { src: LogoEmoji })) })) })) : null }));
22
- };
23
- //# sourceMappingURL=emoji-picker.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emoji-picker.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/emoji-picker.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,SAAS,MAAM,8BAA8B,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;A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
- enableEmojiPicker: boolean;
5
- enableAttachments: boolean;
6
- handleAttachment: (event: any) => void;
7
- textareaRef: React.MutableRefObject<HTMLTextAreaElement>;
8
- host: HTMLElement;
9
- onUserInput?: (event: any) => Promise<void>;
10
- }
11
- export declare const InputPanel: ({ persistentMenu, enableEmojiPicker, enableAttachments, handleAttachment, textareaRef, host, onUserInput, }: InputPanelProps) => JSX.Element;
12
- export {};
@@ -1,50 +0,0 @@
1
- import { __awaiter } from "tslib";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { INPUT } from '@botonic/core';
4
- import { useContext } from 'react';
5
- import { v7 as uuidv7 } from 'uuid';
6
- import { WEBCHAT } from '../../constants';
7
- import { WebchatContext } from '../../contexts';
8
- import { getFullMimeWhitelist } from '../../message-utils';
9
- import { BotonicContainerId } from '../constants';
10
- import { Attachment } from './attachment';
11
- import { EmojiPicker } from './emoji-picker';
12
- import { OpenedEmojiPicker } from './opened-emoji-picker';
13
- import { PersistentMenu } from './persistent-menu';
14
- import { SendButton } from './send-button';
15
- import { UserInputContainer } from './styles';
16
- import { Textarea } from './textarea';
17
- export const InputPanel = ({ persistentMenu, enableEmojiPicker, enableAttachments, handleAttachment, textareaRef, host, onUserInput, }) => {
18
- const { getThemeProperty, sendText, togglePersistentMenu, toggleEmojiPicker, webchatState, inputPanelRef, } = useContext(WebchatContext);
19
- const handleSelectedEmoji = event => {
20
- textareaRef.current.value += event.emoji;
21
- textareaRef.current.focus();
22
- };
23
- const handleEmojiClick = () => {
24
- toggleEmojiPicker(!webchatState.isEmojiPickerOpen);
25
- };
26
- const handleMenu = () => {
27
- togglePersistentMenu(!webchatState.isPersistentMenuOpen);
28
- };
29
- const sendTextAreaText = () => __awaiter(void 0, void 0, void 0, function* () {
30
- yield sendText(textareaRef.current.value);
31
- textareaRef.current.value = '';
32
- });
33
- const sendChatEvent = (chatEvent) => __awaiter(void 0, void 0, void 0, function* () {
34
- const chatEventInput = {
35
- id: uuidv7(),
36
- type: INPUT.CHAT_EVENT,
37
- data: chatEvent,
38
- };
39
- if (onUserInput) {
40
- onUserInput({
41
- user: webchatState.session.user,
42
- input: chatEventInput,
43
- session: webchatState.session,
44
- lastRoutePath: webchatState.lastRoutePath,
45
- });
46
- }
47
- });
48
- return (_jsxs(UserInputContainer, Object.assign({ id: BotonicContainerId.InputPanel, ref: inputPanelRef, style: Object.assign({}, getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.userInputStyle)), className: 'user-input-container' }, { children: [webchatState.isEmojiPickerOpen && (_jsx(OpenedEmojiPicker, { onEmojiClick: handleSelectedEmoji, onClick: handleEmojiClick })), _jsx(PersistentMenu, { onClick: handleMenu, persistentMenu: persistentMenu }), _jsx(Textarea, { host: host, persistentMenu: persistentMenu, textareaRef: textareaRef, sendChatEvent: sendChatEvent, sendTextAreaText: sendTextAreaText }), _jsx(EmojiPicker, { enableEmojiPicker: enableEmojiPicker, onClick: handleEmojiClick }), _jsx(Attachment, { enableAttachments: enableAttachments, onChange: handleAttachment, accept: getFullMimeWhitelist().join(',') }), _jsx(SendButton, { onClick: sendTextAreaText })] })));
49
- };
50
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/index.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC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PickerProps {
2
- onClick: () => void;
3
- onEmojiClick: (event: any) => void;
4
- }
5
- export declare const OpenedEmojiPicker: ({ onClick, onEmojiClick, }: OpenedEmojiPickerProps) => JSX.Element;
6
- export {};
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Picker from 'emoji-picker-react';
3
- import { ROLES } from '../../constants';
4
- import { useComponentVisible } from '../hooks';
5
- import { OpenedEmojiPickerContainer } from './styles';
6
- export const OpenedEmojiPicker = ({ onClick, onEmojiClick, }) => {
7
- const { ref, isComponentVisible } = useComponentVisible(true, onClick);
8
- return (_jsx("div", Object.assign({ ref: ref }, { children: isComponentVisible && (_jsx(OpenedEmojiPickerContainer, Object.assign({ role: ROLES.EMOJI_PICKER }, { children: _jsx(Picker, { width: '100%', height: '19rem', previewConfig: { showPreview: false }, lazyLoadEmojis: true, onEmojiClick: onEmojiClick, autoFocusSearch: false }) }))) })));
9
- };
10
- //# sourceMappingURL=opened-emoji-picker.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"opened-emoji-picker.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/opened-emoji-picker.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAA;AAGvC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAOrD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,OAAO,EACP,YAAY,GACW,EAAE,EAAE;IAC3B,MAAM,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACtE,OAAO,CACL,4BAAK,GAAG,EAAE,GAAgC,gBACvC,kBAAkB,IAAI,CACrB,KAAC,0BAA0B,kBAAC,IAAI,EAAE,KAAK,CAAC,YAAY,gBAClD,KAAC,MAAM,IACL,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,OAAO,EACd,aAAa,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EACrC,cAAc,EAAE,IAAI,EACpB,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,KAAK,GACtB,IACyB,CAC9B,IACG,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- interface PersistentMenuProps {
2
- persistentMenu: any;
3
- onClick: () => void;
4
- }
5
- export declare const PersistentMenu: ({ onClick, persistentMenu, }: PersistentMenuProps) => JSX.Element;
6
- export {};
@@ -1,14 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useContext } from 'react';
3
- import LogoMenu from '../../assets/menuButton.svg';
4
- import { ROLES, WEBCHAT } from '../../constants';
5
- import { WebchatContext } from '../../contexts';
6
- import { Icon } from '../components/common';
7
- import { ConditionalAnimation } from '../components/conditional-animation';
8
- export const PersistentMenu = ({ onClick, persistentMenu, }) => {
9
- const { getThemeProperty } = useContext(WebchatContext);
10
- const persistentMenuOptions = getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.persistentMenu, persistentMenu);
11
- const CustomMenuButton = getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.customMenuButton, undefined);
12
- return (_jsx(_Fragment, { children: persistentMenuOptions ? (_jsx(ConditionalAnimation, { children: _jsx("div", Object.assign({ role: ROLES.PERSISTENT_MENU_ICON, onClick: onClick }, { children: CustomMenuButton ? _jsx(CustomMenuButton, {}) : _jsx(Icon, { src: LogoMenu }) })) })) : null }));
13
- };
14
- //# sourceMappingURL=persistent-menu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"persistent-menu.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/persistent-menu.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,QAAQ,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAO1E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,OAAO,EACP,cAAc,GACM,EAAE,EAAE;IACxB,MAAM,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAEvD,MAAM,qBAAqB,GAAG,gBAAgB,CAC5C,OAAO,CAAC,iBAAiB,CAAC,cAAc,EACxC,cAAc,CACf,CAAA;IAED,MAAM,gBAAgB,GAAG,gBAAgB,CACvC,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,EAC1C,SAAS,CACV,CAAA;IAED,OAAO,CACL,4BACG,qBAAqB,CAAC,CAAC,CAAC,CACvB,KAAC,oBAAoB,cACnB,4BAAK,IAAI,EAAE,KAAK,CAAC,oBAAoB,EAAE,OAAO,EAAE,OAAO,gBACpD,gBAAgB,CAAC,CAAC,CAAC,KAAC,gBAAgB,KAAG,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,GAAG,EAAE,QAAQ,GAAI,IAC9D,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- interface SendButtonProps {
2
- onClick: () => Promise<void>;
3
- }
4
- export declare const SendButton: ({ onClick }: SendButtonProps) => JSX.Element;
5
- export {};
@@ -1,14 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useContext } from 'react';
3
- import SendButtonIcon from '../../assets/send-button.svg';
4
- import { ROLES, WEBCHAT } from '../../constants';
5
- import { WebchatContext } from '../../contexts';
6
- import { Icon } from '../components/common';
7
- import { ConditionalAnimation } from '../components/conditional-animation';
8
- export const SendButton = ({ onClick }) => {
9
- const { getThemeProperty } = useContext(WebchatContext);
10
- const sendButtonEnabled = getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.enableSendButton, true);
11
- const CustomSendButton = getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.customSendButton, undefined);
12
- return (_jsx(_Fragment, { children: sendButtonEnabled || CustomSendButton ? (_jsx(ConditionalAnimation, { children: _jsx("div", Object.assign({ onClick: onClick, role: ROLES.SEND_BUTTON_ICON }, { children: CustomSendButton ? (_jsx(CustomSendButton, {})) : (_jsx(Icon, { src: SendButtonIcon })) })) })) : null }));
13
- };
14
- //# sourceMappingURL=send-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-button.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/send-button.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,cAAc,MAAM,8BAA8B,CAAA;AACzD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAM1E,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAmB,EAAE,EAAE;IACzD,MAAM,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAEvD,MAAM,iBAAiB,GAAG,gBAAgB,CACxC,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,EAC1C,IAAI,CACL,CAAA;IAED,MAAM,gBAAgB,GAAG,gBAAgB,CACvC,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,EAC1C,SAAS,CACV,CAAA;IAED,OAAO,CACL,4BACG,iBAAiB,IAAI,gBAAgB,CAAC,CAAC,CAAC,CACvC,KAAC,oBAAoB,cACnB,4BAAK,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,gBAAgB,gBAChD,gBAAgB,CAAC,CAAC,CAAC,CAClB,KAAC,gBAAgB,KAAG,CACrB,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,GAAG,EAAE,cAAc,GAAI,CAC9B,IACG,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- export declare const UserInputContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const TextAreaContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const OpenedEmojiPickerContainer: import("styled-components").StyledComponent<"div", any, {}, never>;