@botonic/react 0.34.1 → 0.35.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 (305) hide show
  1. package/lib/cjs/components/{button.d.ts → button/index.d.ts} +4 -5
  2. package/lib/cjs/components/{button.js → button/index.js} +26 -56
  3. package/lib/cjs/components/button/index.js.map +1 -0
  4. package/lib/cjs/components/button/styles.d.ts +2 -0
  5. package/lib/cjs/components/button/styles.js +40 -0
  6. package/lib/cjs/components/button/styles.js.map +1 -0
  7. package/lib/cjs/components/buttons-disabler.d.ts +20 -23
  8. package/lib/cjs/components/buttons-disabler.js +11 -26
  9. package/lib/cjs/components/buttons-disabler.js.map +1 -1
  10. package/lib/cjs/components/carousel.js +1 -1
  11. package/lib/cjs/components/carousel.js.map +1 -1
  12. package/lib/cjs/components/element.js +3 -3
  13. package/lib/cjs/components/element.js.map +1 -1
  14. package/lib/cjs/components/image.js +1 -1
  15. package/lib/cjs/components/image.js.map +1 -1
  16. package/lib/cjs/components/index-types.d.ts +1 -1
  17. package/lib/cjs/components/index.d.ts +1 -1
  18. package/lib/cjs/components/index.js +2 -2
  19. package/lib/cjs/components/index.js.map +1 -1
  20. package/lib/cjs/components/message/index.js +7 -7
  21. package/lib/cjs/components/message/index.js.map +1 -1
  22. package/lib/cjs/components/message/message-image.js +1 -1
  23. package/lib/cjs/components/message/message-image.js.map +1 -1
  24. package/lib/cjs/components/message/styles.d.ts +11 -11
  25. package/lib/cjs/components/message/timestamps.js +1 -1
  26. package/lib/cjs/components/message/timestamps.js.map +1 -1
  27. package/lib/cjs/components/multichannel/multichannel-button.js +4 -4
  28. package/lib/cjs/components/multichannel/multichannel-button.js.map +1 -1
  29. package/lib/cjs/components/multichannel/multichannel-carousel.js +2 -2
  30. package/lib/cjs/components/multichannel/multichannel-carousel.js.map +1 -1
  31. package/lib/cjs/components/multichannel/multichannel-utils.js +2 -2
  32. package/lib/cjs/components/multichannel/multichannel-utils.js.map +1 -1
  33. package/lib/cjs/components/reply.js +3 -1
  34. package/lib/cjs/components/reply.js.map +1 -1
  35. package/lib/cjs/components/webchat-settings.d.ts +6 -3
  36. package/lib/cjs/components/webchat-settings.js.map +1 -1
  37. package/lib/cjs/constants.d.ts +0 -12
  38. package/lib/cjs/constants.js +0 -12
  39. package/lib/cjs/constants.js.map +1 -1
  40. package/lib/cjs/contexts.d.ts +1 -5
  41. package/lib/cjs/contexts.js +10 -5
  42. package/lib/cjs/contexts.js.map +1 -1
  43. package/lib/cjs/dev-app.js +3 -11
  44. package/lib/cjs/dev-app.js.map +1 -1
  45. package/lib/cjs/index-types.d.ts +6 -28
  46. package/lib/cjs/index-types.js.map +1 -1
  47. package/lib/cjs/msg-to-botonic.js +2 -2
  48. package/lib/cjs/msg-to-botonic.js.map +1 -1
  49. package/lib/cjs/react-bot.d.ts +16 -6
  50. package/lib/cjs/react-bot.js +5 -6
  51. package/lib/cjs/react-bot.js.map +1 -1
  52. package/lib/cjs/shared/styles.d.ts +2 -2
  53. package/lib/cjs/time-zone-to-country-code.d.ts +1 -0
  54. package/lib/cjs/time-zone-to-country-code.js +108 -0
  55. package/lib/cjs/time-zone-to-country-code.js.map +1 -0
  56. package/lib/cjs/util/webchat.d.ts +4 -2
  57. package/lib/cjs/util/webchat.js +35 -1
  58. package/lib/cjs/util/webchat.js.map +1 -1
  59. package/lib/cjs/webchat/chat-area/styles.d.ts +1 -1
  60. package/lib/cjs/webchat/components/conditional-animation.js +1 -1
  61. package/lib/cjs/webchat/components/conditional-animation.js.map +1 -1
  62. package/lib/cjs/webchat/components/opened-persistent-menu.js +4 -4
  63. package/lib/cjs/webchat/components/opened-persistent-menu.js.map +1 -1
  64. package/lib/cjs/webchat/context/index.d.ts +1 -1
  65. package/lib/cjs/webchat/context/index.js +4 -7
  66. package/lib/cjs/webchat/context/index.js.map +1 -1
  67. package/lib/cjs/webchat/context/types.d.ts +16 -9
  68. package/lib/cjs/webchat/context/use-webchat.d.ts +3 -4
  69. package/lib/cjs/webchat/context/use-webchat.js +35 -43
  70. package/lib/cjs/webchat/context/use-webchat.js.map +1 -1
  71. package/lib/cjs/webchat/header/default-header.js +5 -5
  72. package/lib/cjs/webchat/header/default-header.js.map +1 -1
  73. package/lib/cjs/webchat/header/styles.d.ts +7 -7
  74. package/lib/cjs/webchat/header/styles.js +5 -1
  75. package/lib/cjs/webchat/header/styles.js.map +1 -1
  76. package/lib/cjs/webchat/index-types.d.ts +0 -11
  77. package/lib/cjs/webchat/input-panel/attachment.d.ts +1 -2
  78. package/lib/cjs/webchat/input-panel/attachment.js +6 -5
  79. package/lib/cjs/webchat/input-panel/attachment.js.map +1 -1
  80. package/lib/cjs/webchat/input-panel/emoji-picker.d.ts +1 -2
  81. package/lib/cjs/webchat/input-panel/emoji-picker.js +6 -5
  82. package/lib/cjs/webchat/input-panel/emoji-picker.js.map +1 -1
  83. package/lib/cjs/webchat/input-panel/index.d.ts +1 -4
  84. package/lib/cjs/webchat/input-panel/index.js +2 -2
  85. package/lib/cjs/webchat/input-panel/index.js.map +1 -1
  86. package/lib/cjs/webchat/input-panel/persistent-menu.d.ts +1 -2
  87. package/lib/cjs/webchat/input-panel/persistent-menu.js +5 -4
  88. package/lib/cjs/webchat/input-panel/persistent-menu.js.map +1 -1
  89. package/lib/cjs/webchat/input-panel/send-button.js +4 -3
  90. package/lib/cjs/webchat/input-panel/send-button.js.map +1 -1
  91. package/lib/cjs/webchat/input-panel/styles.d.ts +3 -3
  92. package/lib/cjs/webchat/input-panel/textarea.d.ts +1 -3
  93. package/lib/cjs/webchat/input-panel/textarea.js +7 -5
  94. package/lib/cjs/webchat/input-panel/textarea.js.map +1 -1
  95. package/lib/cjs/webchat/message-list/intro-message.js +1 -1
  96. package/lib/cjs/webchat/message-list/intro-message.js.map +1 -1
  97. package/lib/cjs/webchat/message-list/styles.d.ts +5 -5
  98. package/lib/cjs/webchat/message-list/use-notifications.js +4 -4
  99. package/lib/cjs/webchat/message-list/use-notifications.js.map +1 -1
  100. package/lib/cjs/webchat/replies/styles.d.ts +3 -3
  101. package/lib/cjs/webchat/styles.d.ts +4 -9
  102. package/lib/cjs/webchat/styles.js +18 -7
  103. package/lib/cjs/webchat/styles.js.map +1 -1
  104. package/lib/cjs/webchat/theme/default-theme.d.ts +2 -0
  105. package/lib/cjs/webchat/theme/default-theme.js +104 -0
  106. package/lib/cjs/webchat/theme/default-theme.js.map +1 -0
  107. package/lib/cjs/webchat/theme/types.d.ts +59 -12
  108. package/lib/cjs/webchat/trigger-button/index.js +3 -3
  109. package/lib/cjs/webchat/trigger-button/index.js.map +1 -1
  110. package/lib/cjs/webchat/trigger-button/styles.d.ts +3 -3
  111. package/lib/cjs/webchat/typing-indicator/styles.d.ts +3 -3
  112. package/lib/cjs/webchat/webchat-dev.d.ts +1 -1
  113. package/lib/cjs/webchat/webchat.js +26 -34
  114. package/lib/cjs/webchat/webchat.js.map +1 -1
  115. package/lib/cjs/webchat/webview/index.js +1 -14
  116. package/lib/cjs/webchat/webview/index.js.map +1 -1
  117. package/lib/cjs/webchat/webview/styles.d.ts +6 -6
  118. package/lib/cjs/webchat/webview/styles.js +16 -2
  119. package/lib/cjs/webchat/webview/styles.js.map +1 -1
  120. package/lib/cjs/webchat-app.d.ts +35 -2
  121. package/lib/cjs/webchat-app.js +45 -17
  122. package/lib/cjs/webchat-app.js.map +1 -1
  123. package/lib/cjs/webchat.template.html +43 -2
  124. package/lib/cjs/webview-app.js +0 -1
  125. package/lib/cjs/webview-app.js.map +1 -1
  126. package/lib/esm/components/{button.d.ts → button/index.d.ts} +4 -5
  127. package/lib/esm/components/{button.js → button/index.js} +26 -55
  128. package/lib/esm/components/button/index.js.map +1 -0
  129. package/lib/esm/components/button/styles.d.ts +2 -0
  130. package/lib/esm/components/button/styles.js +36 -0
  131. package/lib/esm/components/button/styles.js.map +1 -0
  132. package/lib/esm/components/buttons-disabler.d.ts +20 -23
  133. package/lib/esm/components/buttons-disabler.js +11 -26
  134. package/lib/esm/components/buttons-disabler.js.map +1 -1
  135. package/lib/esm/components/carousel.js +1 -1
  136. package/lib/esm/components/carousel.js.map +1 -1
  137. package/lib/esm/components/element.js +1 -1
  138. package/lib/esm/components/element.js.map +1 -1
  139. package/lib/esm/components/image.js +1 -1
  140. package/lib/esm/components/image.js.map +1 -1
  141. package/lib/esm/components/index-types.d.ts +1 -1
  142. package/lib/esm/components/index.d.ts +1 -1
  143. package/lib/esm/components/index.js +1 -1
  144. package/lib/esm/components/index.js.map +1 -1
  145. package/lib/esm/components/message/index.js +5 -5
  146. package/lib/esm/components/message/index.js.map +1 -1
  147. package/lib/esm/components/message/message-image.js +1 -1
  148. package/lib/esm/components/message/message-image.js.map +1 -1
  149. package/lib/esm/components/message/styles.d.ts +11 -11
  150. package/lib/esm/components/message/timestamps.js +1 -1
  151. package/lib/esm/components/message/timestamps.js.map +1 -1
  152. package/lib/esm/components/multichannel/multichannel-button.js +1 -1
  153. package/lib/esm/components/multichannel/multichannel-button.js.map +1 -1
  154. package/lib/esm/components/multichannel/multichannel-carousel.js +1 -1
  155. package/lib/esm/components/multichannel/multichannel-carousel.js.map +1 -1
  156. package/lib/esm/components/multichannel/multichannel-utils.js +1 -1
  157. package/lib/esm/components/multichannel/multichannel-utils.js.map +1 -1
  158. package/lib/esm/components/reply.js +4 -2
  159. package/lib/esm/components/reply.js.map +1 -1
  160. package/lib/esm/components/webchat-settings.d.ts +6 -3
  161. package/lib/esm/components/webchat-settings.js.map +1 -1
  162. package/lib/esm/constants.d.ts +0 -12
  163. package/lib/esm/constants.js +0 -12
  164. package/lib/esm/constants.js.map +1 -1
  165. package/lib/esm/contexts.d.ts +1 -5
  166. package/lib/esm/contexts.js +10 -5
  167. package/lib/esm/contexts.js.map +1 -1
  168. package/lib/esm/dev-app.js +3 -11
  169. package/lib/esm/dev-app.js.map +1 -1
  170. package/lib/esm/index-types.d.ts +6 -28
  171. package/lib/esm/index-types.js.map +1 -1
  172. package/lib/esm/msg-to-botonic.js +1 -1
  173. package/lib/esm/msg-to-botonic.js.map +1 -1
  174. package/lib/esm/react-bot.d.ts +16 -6
  175. package/lib/esm/react-bot.js +5 -6
  176. package/lib/esm/react-bot.js.map +1 -1
  177. package/lib/esm/shared/styles.d.ts +2 -2
  178. package/lib/esm/time-zone-to-country-code.d.ts +1 -0
  179. package/lib/esm/time-zone-to-country-code.js +105 -0
  180. package/lib/esm/time-zone-to-country-code.js.map +1 -0
  181. package/lib/esm/util/webchat.d.ts +4 -2
  182. package/lib/esm/util/webchat.js +33 -0
  183. package/lib/esm/util/webchat.js.map +1 -1
  184. package/lib/esm/webchat/chat-area/styles.d.ts +1 -1
  185. package/lib/esm/webchat/components/conditional-animation.js +1 -1
  186. package/lib/esm/webchat/components/conditional-animation.js.map +1 -1
  187. package/lib/esm/webchat/components/opened-persistent-menu.js +2 -2
  188. package/lib/esm/webchat/components/opened-persistent-menu.js.map +1 -1
  189. package/lib/esm/webchat/context/index.d.ts +1 -1
  190. package/lib/esm/webchat/context/index.js +2 -4
  191. package/lib/esm/webchat/context/index.js.map +1 -1
  192. package/lib/esm/webchat/context/types.d.ts +16 -9
  193. package/lib/esm/webchat/context/use-webchat.d.ts +3 -4
  194. package/lib/esm/webchat/context/use-webchat.js +33 -41
  195. package/lib/esm/webchat/context/use-webchat.js.map +1 -1
  196. package/lib/esm/webchat/header/default-header.js +6 -6
  197. package/lib/esm/webchat/header/default-header.js.map +1 -1
  198. package/lib/esm/webchat/header/styles.d.ts +7 -7
  199. package/lib/esm/webchat/header/styles.js +6 -2
  200. package/lib/esm/webchat/header/styles.js.map +1 -1
  201. package/lib/esm/webchat/index-types.d.ts +0 -11
  202. package/lib/esm/webchat/input-panel/attachment.d.ts +1 -2
  203. package/lib/esm/webchat/input-panel/attachment.js +7 -6
  204. package/lib/esm/webchat/input-panel/attachment.js.map +1 -1
  205. package/lib/esm/webchat/input-panel/emoji-picker.d.ts +1 -2
  206. package/lib/esm/webchat/input-panel/emoji-picker.js +7 -6
  207. package/lib/esm/webchat/input-panel/emoji-picker.js.map +1 -1
  208. package/lib/esm/webchat/input-panel/index.d.ts +1 -4
  209. package/lib/esm/webchat/input-panel/index.js +2 -2
  210. package/lib/esm/webchat/input-panel/index.js.map +1 -1
  211. package/lib/esm/webchat/input-panel/persistent-menu.d.ts +1 -2
  212. package/lib/esm/webchat/input-panel/persistent-menu.js +6 -5
  213. package/lib/esm/webchat/input-panel/persistent-menu.js.map +1 -1
  214. package/lib/esm/webchat/input-panel/send-button.js +5 -4
  215. package/lib/esm/webchat/input-panel/send-button.js.map +1 -1
  216. package/lib/esm/webchat/input-panel/styles.d.ts +3 -3
  217. package/lib/esm/webchat/input-panel/textarea.d.ts +1 -3
  218. package/lib/esm/webchat/input-panel/textarea.js +7 -5
  219. package/lib/esm/webchat/input-panel/textarea.js.map +1 -1
  220. package/lib/esm/webchat/message-list/intro-message.js +1 -1
  221. package/lib/esm/webchat/message-list/intro-message.js.map +1 -1
  222. package/lib/esm/webchat/message-list/styles.d.ts +5 -5
  223. package/lib/esm/webchat/message-list/use-notifications.js +4 -4
  224. package/lib/esm/webchat/message-list/use-notifications.js.map +1 -1
  225. package/lib/esm/webchat/replies/styles.d.ts +3 -3
  226. package/lib/esm/webchat/styles.d.ts +4 -9
  227. package/lib/esm/webchat/styles.js +19 -8
  228. package/lib/esm/webchat/styles.js.map +1 -1
  229. package/lib/esm/webchat/theme/default-theme.d.ts +2 -0
  230. package/lib/esm/webchat/theme/default-theme.js +101 -0
  231. package/lib/esm/webchat/theme/default-theme.js.map +1 -0
  232. package/lib/esm/webchat/theme/types.d.ts +59 -12
  233. package/lib/esm/webchat/trigger-button/index.js +3 -3
  234. package/lib/esm/webchat/trigger-button/index.js.map +1 -1
  235. package/lib/esm/webchat/trigger-button/styles.d.ts +3 -3
  236. package/lib/esm/webchat/typing-indicator/styles.d.ts +3 -3
  237. package/lib/esm/webchat/webchat-dev.d.ts +1 -1
  238. package/lib/esm/webchat/webchat.js +29 -37
  239. package/lib/esm/webchat/webchat.js.map +1 -1
  240. package/lib/esm/webchat/webview/index.js +1 -14
  241. package/lib/esm/webchat/webview/index.js.map +1 -1
  242. package/lib/esm/webchat/webview/styles.d.ts +6 -6
  243. package/lib/esm/webchat/webview/styles.js +17 -3
  244. package/lib/esm/webchat/webview/styles.js.map +1 -1
  245. package/lib/esm/webchat-app.d.ts +35 -2
  246. package/lib/esm/webchat-app.js +45 -17
  247. package/lib/esm/webchat-app.js.map +1 -1
  248. package/lib/esm/webchat.template.html +43 -2
  249. package/lib/esm/webview-app.js +1 -2
  250. package/lib/esm/webview-app.js.map +1 -1
  251. package/package.json +4 -2
  252. package/src/components/{button.tsx → button/index.tsx} +26 -102
  253. package/src/components/button/styles.ts +38 -0
  254. package/src/components/{buttons-disabler.js → buttons-disabler.ts} +35 -39
  255. package/src/components/carousel.tsx +1 -2
  256. package/src/components/element.tsx +1 -1
  257. package/src/components/image.tsx +3 -2
  258. package/src/components/index-types.ts +1 -1
  259. package/src/components/index.ts +1 -1
  260. package/src/components/message/index.jsx +5 -9
  261. package/src/components/message/message-image.tsx +1 -4
  262. package/src/components/message/timestamps.tsx +1 -2
  263. package/src/components/multichannel/multichannel-button.jsx +1 -1
  264. package/src/components/multichannel/multichannel-carousel.jsx +1 -1
  265. package/src/components/multichannel/multichannel-utils.js +1 -1
  266. package/src/components/reply.tsx +2 -8
  267. package/src/components/webchat-settings.tsx +11 -3
  268. package/src/constants.js +0 -12
  269. package/src/contexts.tsx +11 -12
  270. package/src/dev-app.jsx +1 -25
  271. package/src/index-types.ts +8 -26
  272. package/src/msg-to-botonic.jsx +1 -1
  273. package/src/react-bot.tsx +51 -0
  274. package/src/time-zone-to-country-code.ts +104 -0
  275. package/src/util/webchat.ts +41 -2
  276. package/src/webchat/components/conditional-animation.jsx +2 -2
  277. package/src/webchat/components/opened-persistent-menu.jsx +2 -3
  278. package/src/webchat/context/index.tsx +3 -5
  279. package/src/webchat/context/types.ts +18 -13
  280. package/src/webchat/context/use-webchat.ts +36 -43
  281. package/src/webchat/header/default-header.tsx +6 -17
  282. package/src/webchat/header/styles.ts +6 -2
  283. package/src/webchat/index-types.ts +0 -12
  284. package/src/webchat/input-panel/attachment.tsx +5 -16
  285. package/src/webchat/input-panel/emoji-picker.tsx +5 -15
  286. package/src/webchat/input-panel/index.tsx +2 -13
  287. package/src/webchat/input-panel/persistent-menu.tsx +5 -15
  288. package/src/webchat/input-panel/send-button.tsx +3 -9
  289. package/src/webchat/input-panel/textarea.tsx +8 -14
  290. package/src/webchat/message-list/intro-message.tsx +1 -2
  291. package/src/webchat/message-list/use-notifications.ts +4 -8
  292. package/src/webchat/styles.ts +20 -14
  293. package/src/webchat/theme/default-theme.ts +102 -0
  294. package/src/webchat/theme/theme.d.ts +8 -0
  295. package/src/webchat/theme/types.ts +111 -24
  296. package/src/webchat/trigger-button/index.tsx +3 -5
  297. package/src/webchat/webchat.tsx +79 -102
  298. package/src/webchat/webview/index.tsx +0 -14
  299. package/src/webchat/webview/styles.ts +16 -2
  300. package/src/webchat-app.tsx +88 -35
  301. package/src/webchat.template.html +43 -2
  302. package/src/webview-app.tsx +1 -3
  303. package/lib/cjs/components/button.js.map +0 -1
  304. package/lib/esm/components/button.js.map +0 -1
  305. package/src/react-bot.jsx +0 -38
@@ -1,9 +1,4 @@
1
- import {
2
- BotonicAction,
3
- INPUT,
4
- isMobile,
5
- params2queryString,
6
- } from '@botonic/core'
1
+ import { BotonicAction, INPUT, params2queryString } from '@botonic/core'
7
2
  import merge from 'lodash.merge'
8
3
  import React, {
9
4
  forwardRef,
@@ -12,7 +7,7 @@ import React, {
12
7
  useRef,
13
8
  useState,
14
9
  } from 'react'
15
- import { StyleSheetManager } from 'styled-components'
10
+ import { StyleSheetManager, ThemeProvider } from 'styled-components'
16
11
  import { v7 as uuidv7 } from 'uuid'
17
12
 
18
13
  import {
@@ -47,6 +42,7 @@ import {
47
42
  getServerErrorMessage,
48
43
  initSession,
49
44
  shouldKeepSessionOnReload,
45
+ updateUserLocaleAndCountry,
50
46
  } from '../util/webchat'
51
47
  import { ChatArea } from './chat-area'
52
48
  import { OpenedPersistentMenu } from './components/opened-persistent-menu'
@@ -67,6 +63,7 @@ import {
67
63
  ErrorMessageContainer,
68
64
  StyledWebchat,
69
65
  } from './styles'
66
+ import { WebchatTheme } from './theme/types'
70
67
  import { TriggerButton } from './trigger-button'
71
68
  import { useStorageState } from './use-storage-state-hook'
72
69
  import { getParsedAction } from './utils'
@@ -110,7 +107,7 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
110
107
  repliesRef,
111
108
  scrollableMessagesListRef,
112
109
  // eslint-disable-next-line react-hooks/rules-of-hooks
113
- } = props.webchatHooks || useWebchat()
110
+ } = props.webchatHooks || useWebchat(props.theme)
114
111
 
115
112
  const firstUpdate = useRef(true)
116
113
  const isOnline = () => webchatState.online
@@ -227,7 +224,7 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
227
224
  addMessage(message)
228
225
  const newMessageComponent = msgToBotonic(
229
226
  { ...message, delay: 0, typing: 0 },
230
- props.theme?.message?.customTypes || props.theme?.customMessageTypes
227
+ props.theme?.message?.customTypes
231
228
  )
232
229
  //@ts-ignore
233
230
  if (newMessageComponent) addMessageComponent(newMessageComponent)
@@ -248,7 +245,12 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
248
245
  }
249
246
 
250
247
  if (props.onInit) {
251
- setTimeout(() => props.onInit && props.onInit(), 100)
248
+ setTimeout(() => {
249
+ if (typeof props.onInit === 'function') {
250
+ props.onInit()
251
+ session.user = updateUserLocaleAndCountry(session.user)
252
+ }
253
+ }, 100)
252
254
  }
253
255
  }, [])
254
256
 
@@ -313,8 +315,7 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
313
315
  }
314
316
 
315
317
  const persistentMenuOptions = getThemeProperty(
316
- WEBCHAT.CUSTOM_PROPERTIES.persistentMenu,
317
- props.persistentMenu
318
+ WEBCHAT.CUSTOM_PROPERTIES.persistentMenu
318
319
  )
319
320
 
320
321
  const darkBackgroundMenu = getThemeProperty(
@@ -334,10 +335,7 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
334
335
 
335
336
  const checkBlockInput = input => {
336
337
  // if is a text we check if it is a serialized RE
337
- const blockInputs = getThemeProperty(
338
- WEBCHAT.CUSTOM_PROPERTIES.blockInputs,
339
- props.blockInputs
340
- )
338
+ const blockInputs = webchatState.theme.userInput?.blockInputs
341
339
  if (!Array.isArray(blockInputs)) return false
342
340
  for (const rule of blockInputs) {
343
341
  if (getBlockInputs(rule, input.data)) {
@@ -379,15 +377,8 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
379
377
  )
380
378
  }
381
379
 
382
- const getCoverComponent = () => {
383
- return getThemeProperty(
384
- WEBCHAT.CUSTOM_PROPERTIES.coverComponent,
385
- props.coverComponent &&
386
- (props.coverComponent.component || props.coverComponent)
387
- )
388
- }
389
- const coverComponent = getCoverComponent()
390
- const coverComponentProps = props.coverComponent?.props
380
+ const coverComponent = webchatState.theme.coverComponent
381
+ const coverComponentProps = webchatState.theme.coverComponent?.props
391
382
 
392
383
  useEffect(() => {
393
384
  if (!coverComponent) return
@@ -417,7 +408,7 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
417
408
  )
418
409
  } else if (isMedia(input)) {
419
410
  const temporaryDisplayUrl = URL.createObjectURL(input.data)
420
- // TODO: We sould use URL.revokeObjectURL(temporaryDisplayUrl) when the component is unmounted
411
+ // TODO: We should use URL.revokeObjectURL(temporaryDisplayUrl) when the component is unmounted
421
412
  // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL_static#memory_management
422
413
  const mediaProps: {
423
414
  id: string
@@ -460,8 +451,10 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
460
451
  https://stackoverflow.com/questions/37949981/call-child-method-from-parent
461
452
  */
462
453
 
463
- const updateSessionWithUser = (userToUpdate: any) =>
454
+ const updateSessionWithUser = (userToUpdate: any) => {
455
+ console.log('userToUpdate', userToUpdate)
464
456
  updateSession(merge(webchatState.session, { user: userToUpdate }))
457
+ }
465
458
 
466
459
  useImperativeHandle(ref, () => ({
467
460
  addBotResponse: ({ response, session, lastRoutePath }) => {
@@ -529,7 +522,10 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
529
522
  updateSessionWithUser(settings.user)
530
523
  }
531
524
  const themeUpdates = normalizeWebchatSettings(settings)
532
- updateTheme(merge(webchatState.theme, themeUpdates), themeUpdates)
525
+ updateTheme(
526
+ merge(webchatState.theme, themeUpdates),
527
+ themeUpdates as WebchatTheme
528
+ )
533
529
  updateTyping(false)
534
530
  },
535
531
  closeWebview: async (options?: CloseWebviewOptions) =>
@@ -592,26 +588,13 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
592
588
 
593
589
  const isUserInputEnabled = () => {
594
590
  const isUserInputEnabled = getThemeProperty(
595
- WEBCHAT.CUSTOM_PROPERTIES.enableUserInput,
596
- props.enableUserInput !== undefined ? props.enableUserInput : true
591
+ WEBCHAT.CUSTOM_PROPERTIES.enableUserInput
597
592
  )
598
593
  return isUserInputEnabled && !webchatState.isCoverComponentOpen
599
594
  }
600
595
 
601
596
  const userInputEnabled = isUserInputEnabled()
602
597
 
603
- // TODO: Create a default theme that include mobileStyle
604
- let mobileStyle = {}
605
- if (isMobile(getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.mobileBreakpoint))) {
606
- mobileStyle = getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.mobileStyle) || {
607
- width: '100%',
608
- height: '100%',
609
- right: 0,
610
- bottom: 0,
611
- borderRadius: 0,
612
- }
613
- }
614
-
615
598
  useEffect(() => {
616
599
  // Prod mode
617
600
  saveWebchatState(webchatState)
@@ -622,7 +605,10 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
622
605
  // eslint-disable-next-line react-hooks/rules-of-hooks
623
606
  useEffect(() => {
624
607
  const themeUpdates = normalizeWebchatSettings(settings)
625
- updateTheme(merge(webchatState.theme, themeUpdates), themeUpdates)
608
+ updateTheme(
609
+ merge(webchatState.theme, themeUpdates),
610
+ themeUpdates as WebchatTheme
611
+ )
626
612
  }, [webchatState.messagesJSON])
627
613
  }
628
614
 
@@ -672,8 +658,6 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
672
658
  updateWebchatDevSettings: updateWebchatDevSettings,
673
659
  trackEvent: props.onTrackEvent,
674
660
  webchatState,
675
- // TODO: Review if need theme inside Context, already exist inside webchatState
676
- theme,
677
661
  webchatContainerRef,
678
662
  chatAreaRef,
679
663
  inputPanelRef,
@@ -682,63 +666,56 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
682
666
  scrollableMessagesListRef,
683
667
  }}
684
668
  >
685
- {!webchatState.isWebchatOpen && <TriggerButton />}
686
-
687
- {webchatState.isWebchatOpen && (
688
- <StyledWebchat
689
- id={BotonicContainerId.Webchat}
690
- ref={webchatContainerRef}
691
- // TODO: Distinguish between multiple instances of webchat, e.g. `${uniqueId}-botonic-webchat`
692
- role={ROLES.WEBCHAT}
693
- width={webchatState.width}
694
- height={webchatState.height}
695
- style={{
696
- ...webchatState.theme.style,
697
- ...mobileStyle,
698
- }}
699
- >
700
- <WebchatHeader ref={headerRef} />
701
-
702
- {webchatState.isCoverComponentOpen ? (
703
- <CoverComponent
704
- component={coverComponent}
705
- componentProps={coverComponentProps}
706
- />
707
- ) : (
708
- <>
709
- {webchatState.error.message && (
710
- <ErrorMessageContainer>
711
- <ErrorMessage>{webchatState.error.message}</ErrorMessage>
712
- </ErrorMessageContainer>
713
- )}
714
-
715
- <ChatArea />
716
-
717
- {webchatState.isPersistentMenuOpen && (
718
- <DarkenBackground component={persistentMenu()} />
719
- )}
720
-
721
- {!webchatState.handoff && userInputEnabled && (
722
- <InputPanel
723
- persistentMenu={props.persistentMenu}
724
- enableEmojiPicker={props.enableEmojiPicker}
725
- enableAttachments={props.enableAttachments}
726
- handleAttachment={handleAttachment}
727
- textareaRef={textareaRef}
728
- host={host}
729
- onUserInput={props.onUserInput}
730
- />
731
- )}
732
-
733
- {webchatState.webview && <WebviewContainer />}
734
-
735
- {webchatState.isCustomComponentRendered &&
736
- customComponent &&
737
- _renderCustomComponent()}
738
- </>
739
- )}
740
- </StyledWebchat>
741
- )}
669
+ <ThemeProvider theme={webchatState.theme}>
670
+ {!webchatState.isWebchatOpen && <TriggerButton />}
671
+
672
+ {webchatState.isWebchatOpen && (
673
+ <StyledWebchat
674
+ id={BotonicContainerId.Webchat}
675
+ ref={webchatContainerRef}
676
+ // TODO: Distinguish between multiple instances of webchat, e.g. `${uniqueId}-botonic-webchat`
677
+ role={ROLES.WEBCHAT}
678
+ >
679
+ <WebchatHeader ref={headerRef} />
680
+
681
+ {webchatState.isCoverComponentOpen ? (
682
+ <CoverComponent
683
+ component={coverComponent}
684
+ componentProps={coverComponentProps}
685
+ />
686
+ ) : (
687
+ <>
688
+ {webchatState.error.message && (
689
+ <ErrorMessageContainer>
690
+ <ErrorMessage>{webchatState.error.message}</ErrorMessage>
691
+ </ErrorMessageContainer>
692
+ )}
693
+
694
+ <ChatArea />
695
+
696
+ {webchatState.isPersistentMenuOpen && (
697
+ <DarkenBackground component={persistentMenu()} />
698
+ )}
699
+
700
+ {!webchatState.handoff && userInputEnabled && (
701
+ <InputPanel
702
+ handleAttachment={handleAttachment}
703
+ textareaRef={textareaRef}
704
+ host={host}
705
+ onUserInput={props.onUserInput}
706
+ />
707
+ )}
708
+
709
+ {webchatState.webview && <WebviewContainer />}
710
+
711
+ {webchatState.isCustomComponentRendered &&
712
+ customComponent &&
713
+ _renderCustomComponent()}
714
+ </>
715
+ )}
716
+ </StyledWebchat>
717
+ )}
718
+ </ThemeProvider>
742
719
  </WebchatContext.Provider>
743
720
  )
744
721
 
@@ -23,19 +23,6 @@ export const WebviewContainer = () => {
23
23
  session: webchatState.session || ({} as Partial<CoreSession>),
24
24
  }
25
25
 
26
- // TODO: Remove this code and use theme or webchatState.theme from the context,
27
- // this code is duplicated from webchat.tsx
28
- let mobileStyle = {}
29
- if (isMobile(getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.mobileBreakpoint))) {
30
- mobileStyle = getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.mobileStyle) || {
31
- width: '100%',
32
- height: '100%',
33
- right: 0,
34
- bottom: 0,
35
- borderRadius: 0,
36
- }
37
- }
38
-
39
26
  const Webview = webchatState.webview as string | React.ComponentType
40
27
 
41
28
  const close = async (e: any) => {
@@ -61,7 +48,6 @@ export const WebviewContainer = () => {
61
48
  role={ROLES.WEBVIEW}
62
49
  style={{
63
50
  ...getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.webviewStyle),
64
- ...mobileStyle,
65
51
  }}
66
52
  >
67
53
  <WebviewHeader />
@@ -11,7 +11,17 @@ export const StyledWebview = styled.div`
11
11
  height: 100%;
12
12
  background-color: ${COLORS.SOLID_WHITE};
13
13
  z-index: 2;
14
- border-radius: ${WEBCHAT.DEFAULTS.BORDER_RADIUS_TOP_CORNERS};
14
+ border-radius: ${props => props.theme.style.borderRadius};
15
+
16
+ @media (max-width: ${props => props.theme.mobileBreakpoint}px) {
17
+ position: ${props => props.theme.mobileStyle.position};
18
+ right: ${props => props.theme.mobileStyle.right};
19
+ bottom: ${props => props.theme.mobileStyle.bottom};
20
+ width: ${props => props.theme.mobileStyle.width};
21
+ height: ${props => props.theme.mobileStyle.height};
22
+ border-radius: ${props => props.theme.mobileStyle.borderRadius};
23
+ font-size: ${props => props.theme.mobileStyle.fontSize};
24
+ }
15
25
  `
16
26
 
17
27
  export const StyledWebviewHeader = styled.div`
@@ -20,7 +30,11 @@ export const StyledWebviewHeader = styled.div`
20
30
  background-color: ${COLORS.WILD_SAND_WHITE};
21
31
  border-top: 1px solid ${COLORS.SOLID_BLACK_ALPHA_0_2};
22
32
  border-bottom: 1px solid ${COLORS.SOLID_BLACK_ALPHA_0_2};
23
- border-radius: ${WEBCHAT.DEFAULTS.BORDER_RADIUS_TOP_CORNERS};
33
+ border-radius: ${props => props.theme.header?.style?.borderRadius};
34
+
35
+ @media (max-width: ${props => props.theme.mobileBreakpoint}px) {
36
+ border-radius: 0px;
37
+ }
24
38
  `
25
39
  export const StyledCloseHeader = styled.div`
26
40
  display: inline-block;
@@ -20,15 +20,16 @@ import {
20
20
  } from './index-types'
21
21
  import { msgToBotonic } from './msg-to-botonic'
22
22
  import { isShadowDOMSupported, onDOMLoaded } from './util/dom'
23
+ import { defaultTheme } from './webchat/theme/default-theme'
23
24
  import {
24
25
  CoverComponentOptions,
25
26
  PersistentMenuOptionsTheme,
26
- ThemeProps,
27
+ WebchatTheme,
27
28
  } from './webchat/theme/types'
28
29
  import { Webchat } from './webchat/webchat'
29
30
 
30
31
  export class WebchatApp {
31
- public theme?: ThemeProps
32
+ public theme?: Partial<WebchatTheme>
32
33
  public persistentMenu?: PersistentMenuOptionsTheme
33
34
  public coverComponent?: CoverComponentOptions
34
35
  public blockInputs?: BlockInputOption[]
@@ -62,7 +63,7 @@ export class WebchatApp {
62
63
  private hubtypeService: HubtypeService
63
64
 
64
65
  constructor({
65
- theme = {},
66
+ theme,
66
67
  persistentMenu,
67
68
  coverComponent,
68
69
  blockInputs,
@@ -70,7 +71,7 @@ export class WebchatApp {
70
71
  enableAttachments,
71
72
  enableUserInput,
72
73
  enableAnimations,
73
- hostId = 'root',
74
+ hostId = WEBCHAT.DEFAULTS.HOST_ID,
74
75
  shadowDOM = false,
75
76
  defaultDelay,
76
77
  defaultTyping,
@@ -272,16 +273,24 @@ export class WebchatApp {
272
273
  this.webchatRef.current?.updateUser(user)
273
274
  }
274
275
 
276
+ setSystemLocale(locale: string) {
277
+ this.webchatRef.current?.updateUser({ system_locale: locale })
278
+ }
279
+
280
+ setUserLocale(locale: string) {
281
+ this.webchatRef.current?.updateUser({ locale })
282
+ }
283
+
284
+ setUserCountry(country: string) {
285
+ this.webchatRef.current?.updateUser({ country })
286
+ }
287
+
275
288
  addBotMessage(message: any) {
276
289
  message.ack = 0
277
290
  message.isUnread = true
278
291
  message.sentBy = message.sent_by?.split('message_sent_by_')[1]
279
292
  delete message.sent_by
280
- const response = msgToBotonic(
281
- message,
282
- // TODO: Review if is needed allow declar customTypes inside and outside theme
283
- this.theme?.message?.customTypes || this.theme?.customMessageTypes
284
- )
293
+ const response = msgToBotonic(message, this.theme?.message?.customTypes)
285
294
 
286
295
  this.webchatRef.current?.addBotResponse({
287
296
  response,
@@ -373,17 +382,75 @@ export class WebchatApp {
373
382
  return this.webchatRef.current?.updateWebchatSettings(settings)
374
383
  }
375
384
 
376
- // eslint-disable-next-line complexity
385
+ createInitialTheme(optionsAtRuntime: WebchatArgs = {}) {
386
+ const theme = merge(defaultTheme, this.theme, optionsAtRuntime.theme)
387
+
388
+ if (theme.animations === undefined) {
389
+ theme.animations = {}
390
+ }
391
+
392
+ theme.animations.enable =
393
+ theme.animations.enable ??
394
+ optionsAtRuntime.enableAnimations ??
395
+ this.enableAnimations
396
+
397
+ theme.coverComponent =
398
+ theme.coverComponent ??
399
+ optionsAtRuntime.coverComponent ??
400
+ this.coverComponent
401
+
402
+ theme.userInput = this.createInitialThemeUserInput(theme, optionsAtRuntime)
403
+
404
+ return theme
405
+ }
406
+
407
+ createInitialThemeUserInput(
408
+ theme: WebchatTheme,
409
+ optionsAtRuntime: WebchatArgs = {}
410
+ ) {
411
+ if (!theme.userInput) theme.userInput = {}
412
+
413
+ // Set main userInput properties
414
+ theme.userInput = {
415
+ ...theme.userInput,
416
+ enable:
417
+ theme.userInput.enable ??
418
+ optionsAtRuntime.enableUserInput ??
419
+ this.enableUserInput,
420
+ persistentMenu:
421
+ theme.userInput.persistentMenu ??
422
+ optionsAtRuntime.persistentMenu ??
423
+ this.persistentMenu,
424
+ blockInputs:
425
+ theme.userInput.blockInputs ??
426
+ optionsAtRuntime.blockInputs ??
427
+ this.blockInputs,
428
+ }
429
+
430
+ // Set emoji picker properties
431
+ theme.userInput.emojiPicker = {
432
+ ...(theme.userInput.emojiPicker || {}),
433
+ enable:
434
+ theme.userInput.emojiPicker?.enable ??
435
+ optionsAtRuntime.enableEmojiPicker ??
436
+ this.enableEmojiPicker,
437
+ }
438
+
439
+ // Set attachments properties
440
+ theme.userInput.attachments = {
441
+ ...(theme.userInput.attachments || {}),
442
+ enable:
443
+ theme.userInput.attachments?.enable ??
444
+ optionsAtRuntime.enableAttachments ??
445
+ this.enableAttachments,
446
+ }
447
+
448
+ return theme.userInput
449
+ }
450
+
377
451
  getComponent(host: HTMLDivElement, optionsAtRuntime: WebchatArgs = {}) {
378
452
  let {
379
453
  theme = {},
380
- persistentMenu,
381
- coverComponent,
382
- blockInputs,
383
- enableAttachments,
384
- enableUserInput,
385
- enableAnimations,
386
- enableEmojiPicker,
387
454
  defaultDelay,
388
455
  defaultTyping,
389
456
  storage,
@@ -400,14 +467,7 @@ export class WebchatApp {
400
467
  hostId,
401
468
  ...webchatOptions
402
469
  } = optionsAtRuntime
403
- theme = merge(this.theme, theme)
404
- persistentMenu = persistentMenu || this.persistentMenu
405
- coverComponent = coverComponent || this.coverComponent
406
- blockInputs = blockInputs || this.blockInputs
407
- enableEmojiPicker = enableEmojiPicker || this.enableEmojiPicker
408
- enableAttachments = enableAttachments || this.enableAttachments
409
- enableUserInput = enableUserInput || this.enableUserInput
410
- enableAnimations = enableAnimations || this.enableAnimations
470
+ theme = this.createInitialTheme(optionsAtRuntime)
411
471
  defaultDelay = defaultDelay || this.defaultDelay
412
472
  defaultTyping = defaultTyping || this.defaultTyping
413
473
  server = server || this.server
@@ -430,14 +490,7 @@ export class WebchatApp {
430
490
  ref={this.webchatRef}
431
491
  host={this.host}
432
492
  shadowDOM={this.shadowDOM}
433
- theme={theme}
434
- persistentMenu={persistentMenu}
435
- coverComponent={coverComponent}
436
- blockInputs={blockInputs}
437
- enableEmojiPicker={enableEmojiPicker}
438
- enableAttachments={enableAttachments}
439
- enableUserInput={enableUserInput}
440
- enableAnimations={enableAnimations}
493
+ theme={theme as WebchatTheme}
441
494
  storage={this.storage}
442
495
  storageKey={this.storageKey}
443
496
  defaultDelay={defaultDelay}
@@ -445,7 +498,7 @@ export class WebchatApp {
445
498
  onInit={(...args: [any]) => this.onInitWebchat(...args)}
446
499
  onOpen={(...args: [any]) => this.onOpenWebchat(...args)}
447
500
  onClose={(...args: [any]) => this.onCloseWebchat(...args)}
448
- onUserInput={(...args: [any]) => this.onUserInput(...args)} // TODO: Review this function, and his params
501
+ onUserInput={(...args: [any]) => this.onUserInput(...args)}
449
502
  onStateChange={(args: OnStateChangeArgs) => {
450
503
  this.onStateChange(args)
451
504
  }}
@@ -453,7 +506,7 @@ export class WebchatApp {
453
506
  request: ActionRequest,
454
507
  eventName: string,
455
508
  args?: EventArgs
456
- ) => this.onTrackEventWebchat(request, eventName, args)} //TODO: Review if this implementation is correct
509
+ ) => this.onTrackEventWebchat(request, eventName, args)}
457
510
  server={server}
458
511
  />
459
512
  )
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
  <html lang="en-US">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
@@ -28,9 +28,50 @@
28
28
  </style>
29
29
  </head>
30
30
  <body>
31
+ <div id="webchatRoot"></div>
31
32
  <script type="text/javascript">
32
33
  document.addEventListener('DOMContentLoaded', function (event) {
33
- Botonic.render()
34
+ Botonic.render(document.getElementById('webchatRoot'), {
35
+ onInit: async app => {
36
+ const urlParams = new URLSearchParams(location.search)
37
+ const userLocale = urlParams.get('userLocale')
38
+ const userCountry = urlParams.get('userCountry')
39
+ const systemLocale = urlParams.get('systemLocale')
40
+
41
+ // app.setSystemLocale(systemLocale)
42
+ // app.setUserLocale(userLocale)
43
+ // app.setUserCountry(userCountry)
44
+
45
+ const extraLanguage = urlParams.get('extraLanguage')
46
+ const extraCountry = urlParams.get('extraCountry')
47
+
48
+ console.log('systemLocale', systemLocale)
49
+ console.log('userLocale', userLocale)
50
+ console.log('userCountry', userCountry)
51
+ console.log('extraLanguage', extraLanguage)
52
+ console.log('extraCountry', extraCountry)
53
+
54
+ app.updateUser({
55
+ country: userCountry,
56
+ locale: userLocale,
57
+ system_locale: systemLocale,
58
+ extra_data: {
59
+ country: extraCountry,
60
+ language: extraLanguage,
61
+ },
62
+ })
63
+ await window.botonicOnInit(app)
64
+ },
65
+ onOpen: async app => {
66
+ await window.botonicOnOpen(app)
67
+ },
68
+ onClose: async app => {
69
+ await window.botonicOnClose(app)
70
+ },
71
+ onMessage: async (app, message) => {
72
+ await window.botonicOnMessage(app, message)
73
+ },
74
+ })
34
75
  })
35
76
  </script>
36
77
  </body>
@@ -1,5 +1,5 @@
1
1
  // @ts-nocheck
2
- import { getString, params2queryString, PROVIDER } from '@botonic/core'
2
+ import { params2queryString, PROVIDER } from '@botonic/core'
3
3
  import axios from 'axios'
4
4
  import React from 'react'
5
5
  import { createRoot } from 'react-dom/client'
@@ -86,8 +86,6 @@ class App extends React.Component {
86
86
 
87
87
  render() {
88
88
  const webviewRequestContext = {
89
- getString: (stringId: string) =>
90
- getString(this.props.locales, this.state.session.__locale, stringId),
91
89
  session: this.state.session || {},
92
90
  params: this.state.params || {},
93
91
  closeWebview: this.close.bind(this),
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/button.tsx"],"names":[],"mappings":";;;;;AAAA,wCAAqC;AACrC,iCAAmD;AACnD,kFAAsC;AAEtC,4CAA8C;AAC9C,qDAAkD;AAClD,yCAA+C;AAC/C,+CAA+D;AAC/D,gDAAmD;AACnD,yDAAoD;AAGpD,MAAM,YAAY,GAAG,2BAAM,CAAC,MAAM,CAAA;;;;;;;;;;;;sBAYZ,kBAAM,CAAC,cAAc;;;;;;;;CAQ1C,CAAA;AAEY,QAAA,cAAc,GAAG,2BAAM,CAAC,GAAG,CAAA;;CAEvC,CAAA;AAEM,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAE,EAAE;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