@messenger-box/tailwind-ui-inbox 10.0.3-alpha.100

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 (373) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/LICENSE +21 -0
  3. package/jest.config.js +9 -0
  4. package/lib/cdm-locales/en/translations.json +31 -0
  5. package/lib/cdm-locales/es/translations.json +31 -0
  6. package/lib/components/AIAgent/AIAgent.d.ts +21 -0
  7. package/lib/components/AIAgent/AIAgent.d.ts.map +1 -0
  8. package/lib/components/AIAgent/AIAgent.js +904 -0
  9. package/lib/components/AIAgent/AIAgent.js.map +1 -0
  10. package/lib/components/AIAgent/index.d.ts +2 -0
  11. package/lib/components/AIAgent/index.d.ts.map +1 -0
  12. package/lib/components/InboxMessage/CommonMessage.d.ts +8 -0
  13. package/lib/components/InboxMessage/CommonMessage.d.ts.map +1 -0
  14. package/lib/components/InboxMessage/CommonMessage.js +35 -0
  15. package/lib/components/InboxMessage/CommonMessage.js.map +1 -0
  16. package/lib/components/InboxMessage/ConversationItem.d.ts +14 -0
  17. package/lib/components/InboxMessage/ConversationItem.d.ts.map +1 -0
  18. package/lib/components/InboxMessage/ConversationItem.js +200 -0
  19. package/lib/components/InboxMessage/ConversationItem.js.map +1 -0
  20. package/lib/components/InboxMessage/InputComponent.d.ts +12 -0
  21. package/lib/components/InboxMessage/InputComponent.d.ts.map +1 -0
  22. package/lib/components/InboxMessage/InputComponent.js +359 -0
  23. package/lib/components/InboxMessage/InputComponent.js.map +1 -0
  24. package/lib/components/InboxMessage/LeftSidebar.d.ts +20 -0
  25. package/lib/components/InboxMessage/LeftSidebar.d.ts.map +1 -0
  26. package/lib/components/InboxMessage/LeftSidebar.js +102 -0
  27. package/lib/components/InboxMessage/LeftSidebar.js.map +1 -0
  28. package/lib/components/InboxMessage/MessageInput.d.ts +9 -0
  29. package/lib/components/InboxMessage/MessageInput.d.ts.map +1 -0
  30. package/lib/components/InboxMessage/MessageInput.js +154 -0
  31. package/lib/components/InboxMessage/MessageInput.js.map +1 -0
  32. package/lib/components/InboxMessage/MessageInputComponent.d.ts +9 -0
  33. package/lib/components/InboxMessage/MessageInputComponent.d.ts.map +1 -0
  34. package/lib/components/InboxMessage/Messages.d.ts +17 -0
  35. package/lib/components/InboxMessage/Messages.d.ts.map +1 -0
  36. package/lib/components/InboxMessage/Messages.js +99 -0
  37. package/lib/components/InboxMessage/Messages.js.map +1 -0
  38. package/lib/components/InboxMessage/MessagesBuilderUi.d.ts +17 -0
  39. package/lib/components/InboxMessage/MessagesBuilderUi.d.ts.map +1 -0
  40. package/lib/components/InboxMessage/Popover.d.ts +3 -0
  41. package/lib/components/InboxMessage/Popover.d.ts.map +1 -0
  42. package/lib/components/InboxMessage/Popover.js +31 -0
  43. package/lib/components/InboxMessage/Popover.js.map +1 -0
  44. package/lib/components/InboxMessage/RightSidebar.d.ts +9 -0
  45. package/lib/components/InboxMessage/RightSidebar.d.ts.map +1 -0
  46. package/lib/components/InboxMessage/RightSidebar.js +9 -0
  47. package/lib/components/InboxMessage/RightSidebar.js.map +1 -0
  48. package/lib/components/InboxMessage/RightSidebarAi.d.ts +23 -0
  49. package/lib/components/InboxMessage/RightSidebarAi.d.ts.map +1 -0
  50. package/lib/components/InboxMessage/RightSidebarAi.js +9 -0
  51. package/lib/components/InboxMessage/RightSidebarAi.js.map +1 -0
  52. package/lib/components/InboxMessage/ServiceConversationItem.d.ts +12 -0
  53. package/lib/components/InboxMessage/ServiceConversationItem.d.ts.map +1 -0
  54. package/lib/components/InboxMessage/ServiceConversationItem.js +185 -0
  55. package/lib/components/InboxMessage/ServiceConversationItem.js.map +1 -0
  56. package/lib/components/InboxMessage/ServiceInboxItem.d.ts +12 -0
  57. package/lib/components/InboxMessage/ServiceInboxItem.d.ts.map +1 -0
  58. package/lib/components/InboxMessage/ServiceInboxItem.js +182 -0
  59. package/lib/components/InboxMessage/ServiceInboxItem.js.map +1 -0
  60. package/lib/components/InboxMessage/SubscriptionHandler.d.ts +19 -0
  61. package/lib/components/InboxMessage/SubscriptionHandler.d.ts.map +1 -0
  62. package/lib/components/InboxMessage/SubscriptionHandler.js +41 -0
  63. package/lib/components/InboxMessage/SubscriptionHandler.js.map +1 -0
  64. package/lib/components/InboxMessage/UploadImageButton.d.ts +7 -0
  65. package/lib/components/InboxMessage/UploadImageButton.d.ts.map +1 -0
  66. package/lib/components/InboxMessage/UploadImageButton.js +34 -0
  67. package/lib/components/InboxMessage/UploadImageButton.js.map +1 -0
  68. package/lib/components/InboxMessage/UserModalContent.d.ts +3 -0
  69. package/lib/components/InboxMessage/UserModalContent.d.ts.map +1 -0
  70. package/lib/components/InboxMessage/UserModalContent.js +60 -0
  71. package/lib/components/InboxMessage/UserModalContent.js.map +1 -0
  72. package/lib/components/InboxMessage/index.d.ts +17 -0
  73. package/lib/components/InboxMessage/index.d.ts.map +1 -0
  74. package/lib/components/InboxMessage/message-widgets/CommonMessage.d.ts +11 -0
  75. package/lib/components/InboxMessage/message-widgets/CommonMessage.d.ts.map +1 -0
  76. package/lib/components/InboxMessage/message-widgets/CommonMessage.js +44 -0
  77. package/lib/components/InboxMessage/message-widgets/CommonMessage.js.map +1 -0
  78. package/lib/components/InboxMessage/message-widgets/ErrorFixCard.d.ts +11 -0
  79. package/lib/components/InboxMessage/message-widgets/ErrorFixCard.d.ts.map +1 -0
  80. package/lib/components/InboxMessage/message-widgets/ErrorFixCard.js +194 -0
  81. package/lib/components/InboxMessage/message-widgets/ErrorFixCard.js.map +1 -0
  82. package/lib/components/InboxMessage/message-widgets/MessageCard.d.ts +8 -0
  83. package/lib/components/InboxMessage/message-widgets/MessageCard.d.ts.map +1 -0
  84. package/lib/components/InboxMessage/message-widgets/MessageSliceRenderer.d.ts +12 -0
  85. package/lib/components/InboxMessage/message-widgets/MessageSliceRenderer.d.ts.map +1 -0
  86. package/lib/components/InboxMessage/message-widgets/MessageSliceRenderer.js +37 -0
  87. package/lib/components/InboxMessage/message-widgets/MessageSliceRenderer.js.map +1 -0
  88. package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.d.ts +18 -0
  89. package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.d.ts.map +1 -0
  90. package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.js +1082 -0
  91. package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.js.map +1 -0
  92. package/lib/components/InboxMessage/message-widgets/PlainMessage.d.ts +8 -0
  93. package/lib/components/InboxMessage/message-widgets/PlainMessage.d.ts.map +1 -0
  94. package/lib/components/InboxMessage/message-widgets/PlainMessage.js +14 -0
  95. package/lib/components/InboxMessage/message-widgets/PlainMessage.js.map +1 -0
  96. package/lib/components/InboxMessage/message-widgets/PropertyMessageWidget.d.ts +9 -0
  97. package/lib/components/InboxMessage/message-widgets/PropertyMessageWidget.d.ts.map +1 -0
  98. package/lib/components/InboxMessage/message-widgets/SlackLikeMessageGroup.d.ts +14 -0
  99. package/lib/components/InboxMessage/message-widgets/SlackLikeMessageGroup.d.ts.map +1 -0
  100. package/lib/components/InboxMessage/message-widgets/SlackLikeMessageGroup.js +333 -0
  101. package/lib/components/InboxMessage/message-widgets/SlackLikeMessageGroup.js.map +1 -0
  102. package/lib/components/InboxMessage/message-widgets/index.d.ts +4 -0
  103. package/lib/components/InboxMessage/message-widgets/index.d.ts.map +1 -0
  104. package/lib/components/ModelConfigPanel.d.ts +37 -0
  105. package/lib/components/ModelConfigPanel.d.ts.map +1 -0
  106. package/lib/components/ModelConfigPanel.js +317 -0
  107. package/lib/components/ModelConfigPanel.js.map +1 -0
  108. package/lib/components/filler-components/RightSiderBar.d.ts +24 -0
  109. package/lib/components/filler-components/RightSiderBar.d.ts.map +1 -0
  110. package/lib/components/filler-components/RightSiderBar.js +335 -0
  111. package/lib/components/filler-components/RightSiderBar.js.map +1 -0
  112. package/lib/components/inbox/FilesList.d.ts +20 -0
  113. package/lib/components/inbox/FilesList.d.ts.map +1 -0
  114. package/lib/components/inbox/FilesList.js +68 -0
  115. package/lib/components/inbox/FilesList.js.map +1 -0
  116. package/lib/components/inbox/MessageItem.d.ts +17 -0
  117. package/lib/components/inbox/MessageItem.d.ts.map +1 -0
  118. package/lib/components/inbox/MessageItem.js +50 -0
  119. package/lib/components/inbox/MessageItem.js.map +1 -0
  120. package/lib/components/inbox/ThreadItem.d.ts +11 -0
  121. package/lib/components/inbox/ThreadItem.d.ts.map +1 -0
  122. package/lib/components/inbox/ThreadItem.js +147 -0
  123. package/lib/components/inbox/ThreadItem.js.map +1 -0
  124. package/lib/components/inbox/index.d.ts +4 -0
  125. package/lib/components/inbox/index.d.ts.map +1 -0
  126. package/lib/components/index.d.ts +7 -0
  127. package/lib/components/index.d.ts.map +1 -0
  128. package/lib/components/live-code-editor/hybrid-live-editor.d.ts +20 -0
  129. package/lib/components/live-code-editor/hybrid-live-editor.d.ts.map +1 -0
  130. package/lib/components/live-code-editor/hybrid-live-editor.js +68 -0
  131. package/lib/components/live-code-editor/hybrid-live-editor.js.map +1 -0
  132. package/lib/components/live-code-editor/index.d.ts +4 -0
  133. package/lib/components/live-code-editor/index.d.ts.map +1 -0
  134. package/lib/components/live-code-editor/live-code-editor.d.ts +14 -0
  135. package/lib/components/live-code-editor/live-code-editor.d.ts.map +1 -0
  136. package/lib/components/live-code-editor/live-code-editor.js +207 -0
  137. package/lib/components/live-code-editor/live-code-editor.js.map +1 -0
  138. package/lib/components/slot-fill/chat-message-filler.d.ts +4 -0
  139. package/lib/components/slot-fill/chat-message-filler.d.ts.map +1 -0
  140. package/lib/components/slot-fill/chat-message-filler.js +5 -0
  141. package/lib/components/slot-fill/chat-message-filler.js.map +1 -0
  142. package/lib/components/slot-fill/chat-message-slot.d.ts +11 -0
  143. package/lib/components/slot-fill/chat-message-slot.d.ts.map +1 -0
  144. package/lib/components/slot-fill/chat-message-slot.js +6 -0
  145. package/lib/components/slot-fill/chat-message-slot.js.map +1 -0
  146. package/lib/components/slot-fill/index.d.ts +4 -0
  147. package/lib/components/slot-fill/index.d.ts.map +1 -0
  148. package/lib/components/slot-fill/right-sidebar-filler.d.ts +4 -0
  149. package/lib/components/slot-fill/right-sidebar-filler.d.ts.map +1 -0
  150. package/lib/components/slot-fill/right-sidebar-filler.js +13 -0
  151. package/lib/components/slot-fill/right-sidebar-filler.js.map +1 -0
  152. package/lib/components/ui/button.d.ts +9 -0
  153. package/lib/components/ui/button.d.ts.map +1 -0
  154. package/lib/compute.d.ts +8 -0
  155. package/lib/compute.d.ts.map +1 -0
  156. package/lib/compute.js +137 -0
  157. package/lib/compute.js.map +1 -0
  158. package/lib/config/env-config.d.ts +13 -0
  159. package/lib/config/env-config.d.ts.map +1 -0
  160. package/lib/config/env-config.js +34 -0
  161. package/lib/config/env-config.js.map +1 -0
  162. package/lib/config/index.d.ts +2 -0
  163. package/lib/config/index.d.ts.map +1 -0
  164. package/lib/constants/breakpoints.d.ts +8 -0
  165. package/lib/constants/breakpoints.d.ts.map +1 -0
  166. package/lib/constants/index.d.ts +3 -0
  167. package/lib/constants/index.d.ts.map +1 -0
  168. package/lib/container/AiInbox.d.ts +15 -0
  169. package/lib/container/AiInbox.d.ts.map +1 -0
  170. package/lib/container/AiInboxWithLoader.d.ts +36 -0
  171. package/lib/container/AiInboxWithLoader.d.ts.map +1 -0
  172. package/lib/container/AiLandingInput.d.ts +4 -0
  173. package/lib/container/AiLandingInput.d.ts.map +1 -0
  174. package/lib/container/AiLandingInput.js +101 -0
  175. package/lib/container/AiLandingInput.js.map +1 -0
  176. package/lib/container/Inbox.d.ts +15 -0
  177. package/lib/container/Inbox.d.ts.map +1 -0
  178. package/lib/container/Inbox.js +955 -0
  179. package/lib/container/Inbox.js.map +1 -0
  180. package/lib/container/InboxAiMessagesLoader.d.ts +15 -0
  181. package/lib/container/InboxAiMessagesLoader.d.ts.map +1 -0
  182. package/lib/container/InboxAiMessagesLoader.js +30 -0
  183. package/lib/container/InboxAiMessagesLoader.js.map +1 -0
  184. package/lib/container/InboxContainer.d.ts +12 -0
  185. package/lib/container/InboxContainer.d.ts.map +1 -0
  186. package/lib/container/InboxContainer.js +31 -0
  187. package/lib/container/InboxContainer.js.map +1 -0
  188. package/lib/container/InboxTemplate1.d.ts +15 -0
  189. package/lib/container/InboxTemplate1.d.ts.map +1 -0
  190. package/lib/container/InboxTemplate1WithLoader.d.ts +36 -0
  191. package/lib/container/InboxTemplate1WithLoader.d.ts.map +1 -0
  192. package/lib/container/InboxTemplate2.d.ts +15 -0
  193. package/lib/container/InboxTemplate2.d.ts.map +1 -0
  194. package/lib/container/InboxWithAiLoader.d.ts +15 -0
  195. package/lib/container/InboxWithAiLoader.d.ts.map +1 -0
  196. package/lib/container/InboxWithAiLoader.js +56 -0
  197. package/lib/container/InboxWithAiLoader.js.map +1 -0
  198. package/lib/container/InboxWithLoader.d.ts +36 -0
  199. package/lib/container/InboxWithLoader.d.ts.map +1 -0
  200. package/lib/container/InboxWithLoader.js +277 -0
  201. package/lib/container/InboxWithLoader.js.map +1 -0
  202. package/lib/container/ServiceInbox.d.ts +9 -0
  203. package/lib/container/ServiceInbox.d.ts.map +1 -0
  204. package/lib/container/ServiceInbox.js +144 -0
  205. package/lib/container/ServiceInbox.js.map +1 -0
  206. package/lib/container/ThreadMessages.d.ts +13 -0
  207. package/lib/container/ThreadMessages.d.ts.map +1 -0
  208. package/lib/container/ThreadMessages.js +314 -0
  209. package/lib/container/ThreadMessages.js.map +1 -0
  210. package/lib/container/ThreadMessagesInbox.d.ts +14 -0
  211. package/lib/container/ThreadMessagesInbox.d.ts.map +1 -0
  212. package/lib/container/ThreadMessagesInbox.js +341 -0
  213. package/lib/container/ThreadMessagesInbox.js.map +1 -0
  214. package/lib/container/Threads.d.ts +8 -0
  215. package/lib/container/Threads.d.ts.map +1 -0
  216. package/lib/container/Threads.js +231 -0
  217. package/lib/container/Threads.js.map +1 -0
  218. package/lib/container/ThreadsInbox.d.ts +21 -0
  219. package/lib/container/ThreadsInbox.d.ts.map +1 -0
  220. package/lib/container/ThreadsInbox.js +244 -0
  221. package/lib/container/ThreadsInbox.js.map +1 -0
  222. package/lib/container/apply-footer-styles.d.ts +2 -0
  223. package/lib/container/apply-footer-styles.d.ts.map +1 -0
  224. package/lib/container/apply-footer-styles.js +16 -0
  225. package/lib/container/apply-footer-styles.js.map +1 -0
  226. package/lib/container/index.d.ts +13 -0
  227. package/lib/container/index.d.ts.map +1 -0
  228. package/lib/enums/index.d.ts +2 -0
  229. package/lib/enums/index.d.ts.map +1 -0
  230. package/lib/enums/messenger-slot-fill-name-enum.d.ts +5 -0
  231. package/lib/enums/messenger-slot-fill-name-enum.d.ts.map +1 -0
  232. package/lib/enums/messenger-slot-fill-name-enum.js +5 -0
  233. package/lib/enums/messenger-slot-fill-name-enum.js.map +1 -0
  234. package/lib/hooks/index.d.ts +3 -0
  235. package/lib/hooks/index.d.ts.map +1 -0
  236. package/lib/hooks/use-file-sync.d.ts +16 -0
  237. package/lib/hooks/use-file-sync.d.ts.map +1 -0
  238. package/lib/hooks/use-file-sync.js +63 -0
  239. package/lib/hooks/use-file-sync.js.map +1 -0
  240. package/lib/hooks/usePersistentModelConfig.d.ts +15 -0
  241. package/lib/hooks/usePersistentModelConfig.d.ts.map +1 -0
  242. package/lib/hooks/usePersistentModelConfig.js +46 -0
  243. package/lib/hooks/usePersistentModelConfig.js.map +1 -0
  244. package/lib/index.d.ts +10 -0
  245. package/lib/index.d.ts.map +1 -0
  246. package/lib/index.js +1 -0
  247. package/lib/index.js.map +1 -0
  248. package/lib/interfaces/index.d.ts +2 -0
  249. package/lib/interfaces/index.d.ts.map +1 -0
  250. package/lib/interfaces/message-widgets.interface.d.ts +21 -0
  251. package/lib/interfaces/message-widgets.interface.d.ts.map +1 -0
  252. package/lib/machines/aiAgentMachine.d.ts +3 -0
  253. package/lib/machines/aiAgentMachine.d.ts.map +1 -0
  254. package/lib/machines/aiAgentMachine.js +1083 -0
  255. package/lib/machines/aiAgentMachine.js.map +1 -0
  256. package/lib/machines/aiAgentMachine.simple.d.ts +3 -0
  257. package/lib/machines/aiAgentMachine.simple.d.ts.map +1 -0
  258. package/lib/machines/aiAgentMachine.simple.js +108 -0
  259. package/lib/machines/aiAgentMachine.simple.js.map +1 -0
  260. package/lib/machines/index.d.ts +3 -0
  261. package/lib/machines/index.d.ts.map +1 -0
  262. package/lib/machines/types.d.ts +77 -0
  263. package/lib/machines/types.d.ts.map +1 -0
  264. package/lib/module.d.ts +7 -0
  265. package/lib/module.d.ts.map +1 -0
  266. package/lib/module.js +26 -0
  267. package/lib/module.js.map +1 -0
  268. package/lib/routes.json +98 -0
  269. package/lib/styles/responsive.css +76 -0
  270. package/lib/templates/InboxWithAi.d.ts +15 -0
  271. package/lib/templates/InboxWithAi.d.ts.map +1 -0
  272. package/lib/templates/InboxWithAi.js +440 -0
  273. package/lib/templates/InboxWithAi.js.map +1 -0
  274. package/lib/templates/InboxWithAi.tsx +533 -0
  275. package/lib/templates/index.d.ts +2 -0
  276. package/lib/templates/index.d.ts.map +1 -0
  277. package/lib/templates/index.ts +1 -0
  278. package/lib/utils/utils.d.ts +2 -0
  279. package/lib/utils/utils.d.ts.map +1 -0
  280. package/lib/utils/utils.js +3 -0
  281. package/lib/utils/utils.js.map +1 -0
  282. package/package.json +62 -0
  283. package/rollup.config.mjs +35 -0
  284. package/src/cdm-locales/en/translations.json +31 -0
  285. package/src/cdm-locales/es/translations.json +31 -0
  286. package/src/components/AIAgent/AIAgent.tsx +1103 -0
  287. package/src/components/AIAgent/AIAgent.tsx.bk +1365 -0
  288. package/src/components/AIAgent/README.md +82 -0
  289. package/src/components/AIAgent/index.ts +1 -0
  290. package/src/components/InboxMessage/CommonMessage.tsx +40 -0
  291. package/src/components/InboxMessage/ConversationItem.tsx +255 -0
  292. package/src/components/InboxMessage/InputComponent.tsx +462 -0
  293. package/src/components/InboxMessage/LeftSidebar.tsx +140 -0
  294. package/src/components/InboxMessage/MessageInput.tsx +209 -0
  295. package/src/components/InboxMessage/MessageInputComponent.tsx +245 -0
  296. package/src/components/InboxMessage/Messages.tsx +137 -0
  297. package/src/components/InboxMessage/MessagesBuilderUi.tsx +205 -0
  298. package/src/components/InboxMessage/Popover.tsx +42 -0
  299. package/src/components/InboxMessage/RightSidebar.tsx +22 -0
  300. package/src/components/InboxMessage/RightSidebarAi.tsx +37 -0
  301. package/src/components/InboxMessage/ServiceConversationItem.tsx +234 -0
  302. package/src/components/InboxMessage/ServiceInboxItem.tsx +223 -0
  303. package/src/components/InboxMessage/SubscriptionHandler.tsx +55 -0
  304. package/src/components/InboxMessage/UploadImageButton.tsx +46 -0
  305. package/src/components/InboxMessage/UserModalContent.tsx +60 -0
  306. package/src/components/InboxMessage/index.ts +16 -0
  307. package/src/components/InboxMessage/message-widgets/CommonMessage.tsx +69 -0
  308. package/src/components/InboxMessage/message-widgets/ErrorFixCard.tsx +240 -0
  309. package/src/components/InboxMessage/message-widgets/MessageCard.tsx +127 -0
  310. package/src/components/InboxMessage/message-widgets/MessageSliceRenderer.tsx +40 -0
  311. package/src/components/InboxMessage/message-widgets/ModernMessageGroup.tsx +1295 -0
  312. package/src/components/InboxMessage/message-widgets/PlainMessage.tsx +18 -0
  313. package/src/components/InboxMessage/message-widgets/PropertyMessageWidget.tsx +29 -0
  314. package/src/components/InboxMessage/message-widgets/SlackLikeMessageGroup.tsx +492 -0
  315. package/src/components/InboxMessage/message-widgets/index.ts +3 -0
  316. package/src/components/ModelConfigPanel.tsx +345 -0
  317. package/src/components/filler-components/RightSiderBar.tsx +408 -0
  318. package/src/components/inbox/FilesList.tsx +89 -0
  319. package/src/components/inbox/MessageItem.tsx +50 -0
  320. package/src/components/inbox/ThreadItem.tsx +295 -0
  321. package/src/components/inbox/index.ts +3 -0
  322. package/src/components/index.ts +22 -0
  323. package/src/components/live-code-editor/hybrid-live-editor.tsx +105 -0
  324. package/src/components/live-code-editor/index.ts +3 -0
  325. package/src/components/live-code-editor/live-code-editor.tsx +257 -0
  326. package/src/components/slot-fill/chat-message-filler.tsx +18 -0
  327. package/src/components/slot-fill/chat-message-slot.tsx +18 -0
  328. package/src/components/slot-fill/index.ts +3 -0
  329. package/src/components/slot-fill/right-sidebar-filler.tsx +39 -0
  330. package/src/components/ui/button.tsx +32 -0
  331. package/src/compute.ts +134 -0
  332. package/src/config/env-config.ts +17 -0
  333. package/src/config/index.ts +1 -0
  334. package/src/constants/breakpoints.ts +7 -0
  335. package/src/constants/index.ts +5 -0
  336. package/src/container/AiInbox.tsx +1819 -0
  337. package/src/container/AiInboxWithLoader.tsx +356 -0
  338. package/src/container/AiLandingInput.tsx +221 -0
  339. package/src/container/Inbox.tsx +1092 -0
  340. package/src/container/InboxAiMessagesLoader.tsx +44 -0
  341. package/src/container/InboxContainer.tsx +35 -0
  342. package/src/container/InboxTemplate1.tsx +1542 -0
  343. package/src/container/InboxTemplate1WithLoader.tsx +338 -0
  344. package/src/container/InboxTemplate2.tsx +1606 -0
  345. package/src/container/InboxWithAiLoader.tsx +76 -0
  346. package/src/container/InboxWithLoader.tsx +341 -0
  347. package/src/container/ServiceInbox.tsx +190 -0
  348. package/src/container/ThreadMessages.tsx +371 -0
  349. package/src/container/ThreadMessagesInbox.tsx +450 -0
  350. package/src/container/Threads.tsx +270 -0
  351. package/src/container/ThreadsInbox.tsx +354 -0
  352. package/src/container/apply-footer-styles.ts +17 -0
  353. package/src/container/index.ts +31 -0
  354. package/src/enums/index.ts +1 -0
  355. package/src/enums/messenger-slot-fill-name-enum.ts +4 -0
  356. package/src/hooks/index.ts +2 -0
  357. package/src/hooks/use-file-sync.ts +91 -0
  358. package/src/hooks/usePersistentModelConfig.ts +63 -0
  359. package/src/index.ts +37 -0
  360. package/src/interfaces/index.ts +1 -0
  361. package/src/interfaces/message-widgets.interface.ts +21 -0
  362. package/src/machines/aiAgentMachine.simple.ts +89 -0
  363. package/src/machines/aiAgentMachine.ts +1296 -0
  364. package/src/machines/aiAgentMachine.ts.bk +1296 -0
  365. package/src/machines/index.ts +2 -0
  366. package/src/machines/types.ts +59 -0
  367. package/src/module.tsx +32 -0
  368. package/src/styles/responsive.css +76 -0
  369. package/src/templates/InboxWithAi.tsx +533 -0
  370. package/src/templates/index.ts +1 -0
  371. package/src/utils/utils.ts +3 -0
  372. package/tsconfig.json +14 -0
  373. package/webpack.config.js +92 -0
@@ -0,0 +1,270 @@
1
+ import * as React from 'react';
2
+ import { ThreadItem } from '../components';
3
+ import {
4
+ useViewChannelDetailQuery,
5
+ useThreadMessagesQuery,
6
+ useOnThreadCreatedUpdatedSubscription,
7
+ OnThreadCreatedUpdatedDocument as THREAD_CHAT_ADDED,
8
+ } from 'common/graphql';
9
+ import { useSelector, useDispatch } from 'react-redux';
10
+ import { useTranslation } from 'react-i18next';
11
+ import { userSelector } from '@adminide-stack/user-auth0-client';
12
+ import { useNavigate, useLocation, useParams } from '@remix-run/react';
13
+ import { orderBy, uniqBy, startCase } from 'lodash-es';
14
+ import { push } from '@common-stack/remix-router-redux';
15
+ import { config } from '../config';
16
+ const { MESSAGES_PER_PAGE, WEB_INBOX_MESSEGE_PATH } = config;
17
+
18
+ // Skeleton component for loading state
19
+ const Skeleton = ({ className = '' }: { className?: string }) => (
20
+ <div className={`animate-pulse bg-gray-300 rounded ${className}`}></div>
21
+ );
22
+
23
+ const Threads = ({ channelId, role, pathPrefix = null }) => {
24
+ const path: any = useParams();
25
+ const location = useLocation();
26
+ const dispatch = useDispatch();
27
+ const threadsListRootRef = React.useRef(null);
28
+ const threadsListRef = React.useRef(null);
29
+ const auth = useSelector(userSelector);
30
+ const [threadData, setThreadsData] = React.useState<any>([]);
31
+ const { t } = useTranslation('translations');
32
+ const {
33
+ data: channelData,
34
+ loading: channelLoading,
35
+ refetch: channelDetailRefetch,
36
+ } = useViewChannelDetailQuery({
37
+ variables: {
38
+ id: channelId?.toString(),
39
+ },
40
+ });
41
+
42
+ const {
43
+ data,
44
+ loading: threadLoading,
45
+ error,
46
+ refetch,
47
+ subscribeToMore,
48
+ } = useThreadMessagesQuery({
49
+ variables: {
50
+ channelId: channelId?.toString(),
51
+ role: role?.toString(),
52
+ limit: MESSAGES_PER_PAGE,
53
+ repliesLimit2: 5,
54
+ },
55
+ fetchPolicy: 'cache-and-network',
56
+ });
57
+
58
+ React.useEffect(() => {
59
+ // Do something when the screen is focused
60
+ channelDetailRefetch({ id: channelId?.toString() });
61
+
62
+ refetch({
63
+ channelId: channelId?.toString(),
64
+ role: role?.toString(),
65
+ limit: MESSAGES_PER_PAGE,
66
+ });
67
+ // .then(({ data }) => {
68
+ // if (!data?.threadMessages?.data) {
69
+ // return;
70
+ // }
71
+
72
+ // if (data?.threadMessages?.data?.length) {
73
+ // const { data: newThreads } = data?.threadMessages;
74
+ // setThreadsData((oldThreads: any) => uniqBy([...oldThreads, ...newThreads], ({ id }) => id));
75
+ // }
76
+ // });
77
+ return () => {};
78
+ }, []);
79
+
80
+ // React.useEffect(() => {
81
+ // if (data?.threadMessages?.data?.length) {
82
+ // const { data: newThreads } = data?.threadMessages;
83
+ // setThreadsData((oldThreads: any) => uniqBy([...oldThreads, ...newThreads], ({ id }) => id));
84
+ // }
85
+ // }, [data]);
86
+
87
+ // React.useEffect(() => {
88
+ // if (threadCreatedUpdated?.threadCreatedUpdated?.data) {
89
+ // const { data: newThreads } = threadCreatedUpdated?.threadCreatedUpdated;
90
+
91
+ // setData(newThreads);
92
+ // // setThreadsData((oldThreads: any) => {
93
+ // // const i = oldThreads.findIndex((el: any) => el.id === newThreads?.id);
94
+ // // if (i > -1) oldThreads[i] = newThreads; // (2)
95
+ // // else oldThreads.push(newThreads);
96
+ // // return oldThreads;
97
+ // // });
98
+ // }
99
+ // }, [threadCreatedUpdated]);
100
+
101
+ const setData = React.useCallback((newThreads: any) => {
102
+ setThreadsData((oldThreads: any) => {
103
+ const i = oldThreads.findIndex((el: any) => el.id === newThreads?.id);
104
+ if (i > -1) oldThreads[i] = newThreads; // (2)
105
+ else oldThreads.push(newThreads);
106
+ return oldThreads;
107
+ });
108
+ }, []);
109
+
110
+ const channelsDetail = React.useMemo(() => {
111
+ if (!channelData?.viewChannelDetail) return null;
112
+ return channelData?.viewChannelDetail;
113
+ }, [channelData]);
114
+
115
+ const threads = React.useMemo(() => {
116
+ if (!data?.threadMessages?.data?.length) return null;
117
+ const { data: newThreads } = data?.threadMessages;
118
+ const threadsFiltered = uniqBy([...newThreads], ({ id }) => id);
119
+ return orderBy(threadsFiltered, ['updatedAt'], ['desc']) || [];
120
+ }, [data]);
121
+
122
+ // const threads = React.useMemo(() => {
123
+ // if (!threadData?.length) return null;
124
+ // return orderBy(threadData, ['updatedAt'], ['desc']) || [];
125
+ // }, [threadData]);
126
+
127
+ // const handleRefresh = React.useCallback(() => {
128
+ // refetch({
129
+ // channelId: channelId?.toString(),
130
+ // role: role?.toString(),
131
+ // limit: MESSAGES_PER_PAGE,
132
+ // }).then(({ data }) => {
133
+ // if (!data?.threadMessages?.data) {
134
+ // return;
135
+ // }
136
+
137
+ // if (data?.threadMessages?.data?.length) {
138
+ // const { data: newThreads } = data?.threadMessages;
139
+ // setThreadsData((oldThreads: any) => uniqBy([...oldThreads, ...newThreads], ({ id }) => id));
140
+ // }
141
+ // });
142
+ // }, []);
143
+
144
+ const fetchMoreThreads = React.useCallback(() => {
145
+ refetch({
146
+ channelId: channelId?.toString(),
147
+ role: role?.toString(),
148
+ skip: threads?.length,
149
+ });
150
+ }, []);
151
+
152
+ const onMessagesScroll = React.useCallback(
153
+ (e) => {
154
+ if (threadsListRootRef.current) {
155
+ const { scrollTop, scrollHeight, clientHeight } = threadsListRootRef.current;
156
+ if (clientHeight - scrollTop > scrollHeight - 50 && !threadLoading) {
157
+ fetchMoreThreads();
158
+ }
159
+ }
160
+ },
161
+ [fetchMoreThreads],
162
+ );
163
+
164
+ const handleSelectThread = React.useCallback(
165
+ (channelId: any, postId: any) => {
166
+ dispatch(
167
+ push(`${pathPrefix ? pathPrefix : ''}/${WEB_INBOX_MESSEGE_PATH}/${channelId}/${postId}?reply=true`),
168
+ );
169
+ },
170
+ [location, path],
171
+ );
172
+
173
+ if (threadLoading) {
174
+ return (
175
+ <div className="flex flex-col space-y-4">
176
+ {Array(10)
177
+ .fill(1)
178
+ .map((x, y) => (
179
+ <Skeleton key={y} className="h-10" />
180
+ ))}
181
+ </div>
182
+ );
183
+ }
184
+
185
+ if (!threads || threads?.length == 0) {
186
+ return (
187
+ <div className="w-full bg-gray-100 h-full flex items-center justify-center">
188
+ <p className="text-gray-600">{t('tailwind_ui_inbox.you_dont_have_any_message_yet')}</p>
189
+ </div>
190
+ );
191
+ }
192
+
193
+ return (
194
+ <>
195
+ <div
196
+ ref={threadsListRootRef}
197
+ className="flex flex-grow flex-shrink overflow-y-auto px-5 md:px-5 lg:px-5 bg-gray-100"
198
+ onScroll={onMessagesScroll}
199
+ >
200
+ <div className="w-full" ref={threadsListRef}>
201
+ <ThreadsList
202
+ handleSelectThread={handleSelectThread}
203
+ auth={auth}
204
+ threads={threads}
205
+ setData={setData}
206
+ role={role}
207
+ subscribeToNewMessages={() =>
208
+ subscribeToMore({
209
+ document: THREAD_CHAT_ADDED,
210
+ variables: {
211
+ channelId: channelId?.toString(),
212
+ postParentId: null,
213
+ },
214
+ updateQuery: (prev, { subscriptionData }: any) => {
215
+ if (!subscriptionData.data) return prev;
216
+
217
+ const newPostThreadData: any = subscriptionData?.data?.threadCreatedUpdated?.data;
218
+ const newMessage: any = subscriptionData?.data?.threadCreatedUpdated?.lastMessage;
219
+ const data = prev?.threadMessages?.data?.map((t: any) =>
220
+ t.id === newPostThreadData?.id
221
+ ? {
222
+ ...t,
223
+ replies: [newMessage, ...t?.replies],
224
+ replyCount: newPostThreadData?.replyCount,
225
+ lastReplyAt: newPostThreadData?.lastReplyAt,
226
+ updatedAt: newPostThreadData?.updatedAt,
227
+ }
228
+ : t,
229
+ );
230
+
231
+ return Object.assign({}, prev, {
232
+ threadMessages: {
233
+ ...prev?.threadMessages,
234
+ // totalCount: prev?.threadMessages?.totalCount + 1,
235
+ data: data,
236
+ },
237
+ });
238
+ },
239
+ })
240
+ }
241
+ />
242
+ </div>
243
+ </div>
244
+ </>
245
+ );
246
+ };
247
+
248
+ const ThreadsList = React.memo(({ threads, handleSelectThread, auth, setData, role, subscribeToNewMessages }: any) => {
249
+ React.useEffect(() => subscribeToNewMessages(), []);
250
+ return (
251
+ <>
252
+ {threads?.length > 0 &&
253
+ threads?.map((thread: any, index: any) => {
254
+ return (
255
+ <div key={'thread-key-' + index}>
256
+ <ThreadItem
257
+ onOpen={handleSelectThread}
258
+ currentUser={auth}
259
+ thread={thread}
260
+ setData={setData}
261
+ role={role}
262
+ />
263
+ </div>
264
+ );
265
+ })}
266
+ </>
267
+ );
268
+ });
269
+
270
+ export default React.memo(Threads);
@@ -0,0 +1,354 @@
1
+ import React, { useEffect } from 'react';
2
+ import { format, isToday, isYesterday } from 'date-fns';
3
+ import { orderBy, uniqBy, startCase } from 'lodash-es';
4
+ import { OnThreadCreatedUpdatedDocument as THREAD_CHAT_ADDED, useThreadMessagesQuery } from 'common/graphql';
5
+ import { useSelector } from 'react-redux';
6
+ import { useTranslation } from 'react-i18next';
7
+ import { userSelector } from '@adminide-stack/user-auth0-client';
8
+ import { config } from '../config';
9
+
10
+ const { MESSAGES_PER_PAGE, WEB_INBOX_MESSEGE_PATH } = config;
11
+
12
+ export interface ThreadsInboxProps {
13
+ channelId: any;
14
+ role?: string;
15
+ pathPrefix?: string;
16
+ setChannelId?: (channelId: any) => void;
17
+ setPostId?: (postId?: any) => void;
18
+ setGoBack?: (goBack: boolean) => void;
19
+ }
20
+
21
+ export interface IThreadItemProps {
22
+ thread: any;
23
+ onOpen: (channelId: any, postId: any) => void;
24
+ }
25
+
26
+ export interface IThreadListProps {
27
+ threads: any;
28
+ handleSelectThread: (channelId: any, postId: any) => void;
29
+ threadsListRef: any;
30
+ subscribeToNewThreads: () => void;
31
+ }
32
+
33
+ // Skeleton component replacement
34
+ const SkeletonLoader = () => (
35
+ <div className="animate-pulse">
36
+ <div className="h-10 bg-gray-200 rounded"></div>
37
+ </div>
38
+ );
39
+
40
+ export const ThreadsInbox = React.memo(
41
+ ({ channelId, role, setChannelId, setPostId, setGoBack, pathPrefix = null }: ThreadsInboxProps) => {
42
+ const threadsListRootRef = React.useRef(null);
43
+ const threadsListRef = React.useRef(null);
44
+ const auth = useSelector(userSelector);
45
+ const { t } = useTranslation('translations');
46
+ const {
47
+ data,
48
+ loading: threadLoading,
49
+ error,
50
+ refetch,
51
+ subscribeToMore,
52
+ } = useThreadMessagesQuery({
53
+ variables: {
54
+ channelId: channelId?.toString(),
55
+ role: role?.toString(),
56
+ limit: MESSAGES_PER_PAGE,
57
+ repliesLimit2: 5,
58
+ },
59
+ fetchPolicy: 'cache-and-network',
60
+ });
61
+
62
+ useEffect(() => {
63
+ if (channelId) {
64
+ setGoBack?.(false);
65
+ refetch({
66
+ channelId: channelId?.toString(),
67
+ role: role?.toString(),
68
+ limit: MESSAGES_PER_PAGE,
69
+ repliesLimit2: 5,
70
+ });
71
+ }
72
+ }, [channelId]);
73
+
74
+ const threads = React.useMemo(() => {
75
+ if (!data?.threadMessages?.data?.length) return null;
76
+ const { data: newThreads } = data?.threadMessages;
77
+ const threadsFiltered = uniqBy([...newThreads], ({ id }) => id);
78
+ return orderBy(threadsFiltered, ['updatedAt'], ['desc']) || [];
79
+ }, [data?.threadMessages]);
80
+
81
+ const fetchMoreThreads = React.useCallback(() => {
82
+ refetch({
83
+ channelId: channelId?.toString(),
84
+ role: role?.toString(),
85
+ skip: threads?.length,
86
+ repliesLimit2: 5,
87
+ });
88
+ }, []);
89
+
90
+ const onMessagesScroll = React.useCallback(
91
+ (e) => {
92
+ if (threadsListRootRef.current) {
93
+ const { scrollTop, scrollHeight, clientHeight } = threadsListRootRef.current;
94
+ if (clientHeight - scrollTop > scrollHeight - 50 && !threadLoading) {
95
+ fetchMoreThreads();
96
+ }
97
+ }
98
+ },
99
+ [fetchMoreThreads],
100
+ );
101
+
102
+ const handleSelectThread = React.useCallback((channelId: any, postId: any) => {
103
+ setChannelId?.(channelId);
104
+ setPostId?.(postId);
105
+ setGoBack?.(true);
106
+ }, []);
107
+
108
+ if (threadLoading) {
109
+ return (
110
+ <div className="space-y-4">
111
+ {Array(10)
112
+ .fill(1)
113
+ .map((_x, _y) => (
114
+ <SkeletonLoader key={_y} />
115
+ ))}
116
+ </div>
117
+ );
118
+ }
119
+
120
+ if (!threads || threads?.length == 0) {
121
+ return (
122
+ <div className="w-full bg-gray-100 h-full flex items-center justify-center">
123
+ <span className="text-gray-500">{t('tailwind_ui_inbox.you_dont_have_any_message_yet')}</span>
124
+ </div>
125
+ );
126
+ }
127
+
128
+ return (
129
+ <div
130
+ ref={threadsListRootRef}
131
+ className="flex flex-grow flex-shrink overflow-y-auto px-5 bg-gray-100"
132
+ onScroll={onMessagesScroll}
133
+ >
134
+ <ThreadsList
135
+ threads={threads}
136
+ handleSelectThread={handleSelectThread}
137
+ threadsListRef={threadsListRef}
138
+ subscribeToNewThreads={() =>
139
+ subscribeToMore({
140
+ document: THREAD_CHAT_ADDED,
141
+ variables: {
142
+ channelId: channelId?.toString(),
143
+ postParentId: null,
144
+ },
145
+ updateQuery: (prev, { subscriptionData }: any) => {
146
+ if (!subscriptionData.data) return prev;
147
+
148
+ const newPostThreadData: any = subscriptionData?.data?.threadCreatedUpdated?.data;
149
+ const newMessage: any = subscriptionData?.data?.threadCreatedUpdated?.lastMessage;
150
+
151
+ const updatedData =
152
+ prev?.threadMessages?.data?.map((t: any) =>
153
+ t.id === newPostThreadData?.id
154
+ ? {
155
+ ...t,
156
+ replies: [...t?.replies, newMessage],
157
+ replyCount: newPostThreadData?.replyCount,
158
+ lastReplyAt: newPostThreadData?.lastReplyAt,
159
+ updatedAt: newPostThreadData?.updatedAt,
160
+ }
161
+ : t,
162
+ ) ?? [];
163
+
164
+ const threadsData = updatedData?.length
165
+ ? orderBy(updatedData, ['updatedAt'], ['desc'])
166
+ : [];
167
+
168
+ return Object.assign({}, prev, {
169
+ threadMessages: {
170
+ ...prev?.threadMessages,
171
+ totalCount: newPostThreadData?.totalCount ?? 0,
172
+ data: threadsData?.length > 0 ? threadsData : [newPostThreadData],
173
+ },
174
+ });
175
+ },
176
+ })
177
+ }
178
+ />
179
+ </div>
180
+ );
181
+ },
182
+ );
183
+
184
+ const ThreadsList = React.memo(
185
+ ({ threads, handleSelectThread, threadsListRef, subscribeToNewThreads }: IThreadListProps) => {
186
+ React.useEffect(() => subscribeToNewThreads(), []);
187
+ return (
188
+ <div className="w-full" ref={threadsListRef}>
189
+ {threads?.length > 0 &&
190
+ threads?.map((thread: any, index: any) => {
191
+ return (
192
+ <div key={'thread-key-' + index}>
193
+ <ThreadItem onOpen={handleSelectThread} thread={thread} />
194
+ </div>
195
+ );
196
+ })}
197
+ </div>
198
+ );
199
+ },
200
+ );
201
+
202
+ const ThreadItem = React.memo(({ thread, onOpen }: IThreadItemProps) => {
203
+ const { t } = useTranslation('translations');
204
+ const threadPostReply = React.useMemo(() => {
205
+ if (!thread?.replies) return null;
206
+ return orderBy(thread?.replies, ['updatedAt'], ['desc']) || [];
207
+ }, [thread]);
208
+
209
+ const createdAtText = (value: string) => {
210
+ if (!value) return '';
211
+ let date = new Date(value);
212
+ if (isToday(date)) return t('tailwind_ui_inbox.today');
213
+ if (isYesterday(date)) return t('tailwind_ui_inbox.yesterday');
214
+ return format(new Date(value), 'MMM dd, yyyy');
215
+ };
216
+
217
+ return (
218
+ <div className="flex-1 py-2 my-2 space-y-4">
219
+ <div className="flex space-x-6">
220
+ <div className="w-full">
221
+ <div className="flex flex-col items-start pt-5 pb-5 pl-5 pr-2 space-y-5 bg-white rounded-md shadow-sm p-6">
222
+ {!threadPostReply ||
223
+ ((threadPostReply?.length == 0 || threadPostReply?.length == 1) && (
224
+ <div className="flex w-full items-start space-x-4">
225
+ <div>
226
+ <img
227
+ className="w-9 h-9 object-cover rounded"
228
+ src={thread?.post?.author?.picture}
229
+ alt={startCase(thread?.post?.author?.username?.charAt(0))}
230
+ />
231
+ </div>
232
+ <div className="leading-3">
233
+ <div className="flex flex-col flex-1 items-start space-y-3">
234
+ <div className="flex space-x-2">
235
+ <span className="text-lg text-gray-900 font-semibold flex-wrap">
236
+ {thread?.post?.author?.givenName ?? ''}{' '}
237
+ {thread?.post?.author?.familyName ?? ''}
238
+ </span>
239
+ <span className="text-sm text-gray-500 font-semibold flex-wrap">
240
+ {thread?.post ? createdAtText(thread?.post?.createdAt) : ''}
241
+ </span>
242
+ </div>
243
+ <div className="space-y-2">
244
+ <p className="text-sm text-gray-500 font-semibold flex-wrap">
245
+ {thread?.post?.message
246
+ ? thread?.post?.message.length < 70
247
+ ? `${thread?.post?.message}`
248
+ : `${thread?.post?.message.substring(0, 68)}....`
249
+ : ''}
250
+ </p>
251
+
252
+ {thread?.post?.files?.data?.length > 0 &&
253
+ thread?.post?.files?.data?.map((f: any, idx: number) => (
254
+ <div key={idx}>
255
+ <img
256
+ className="w-12 h-12 object-cover"
257
+ src={f?.url}
258
+ alt={'Image'}
259
+ />
260
+ </div>
261
+ ))}
262
+ </div>
263
+ {threadPostReply?.length == 0 && (
264
+ <button
265
+ onClick={() =>
266
+ onOpen(
267
+ thread?.channel?.id?.toString(),
268
+ thread?.post?.id?.toString(),
269
+ )
270
+ }
271
+ className="py-2 px-4 border border-gray-300 text-gray-700 bg-white hover:bg-gray-50 rounded-md text-sm font-medium w-37 focus:outline-none focus:ring-2 focus:ring-gray-500"
272
+ >
273
+ Reply
274
+ </button>
275
+ )}
276
+ </div>
277
+ </div>
278
+ </div>
279
+ ))}
280
+
281
+ {threadPostReply?.length > 0 && (
282
+ <>
283
+ {threadPostReply
284
+ ?.slice(0, 2)
285
+ ?.reverse()
286
+ ?.map((reply: any, index: any) => (
287
+ <div
288
+ key={'thread-post-reply-item-' + index}
289
+ className="flex w-full items-start space-x-4"
290
+ >
291
+ <div>
292
+ <img
293
+ className="w-9 h-9 object-cover rounded"
294
+ src={reply?.author?.picture}
295
+ alt={startCase(reply?.author?.username?.charAt(0))}
296
+ />
297
+ </div>
298
+
299
+ <div className="leading-3">
300
+ <div className="flex flex-col flex-1 items-start space-y-3">
301
+ <div className="flex space-x-2">
302
+ <span className="text-lg text-gray-900 font-semibold flex-wrap">
303
+ {reply?.author?.givenName ?? ''}{' '}
304
+ {reply?.author?.familyName ?? ''}
305
+ </span>
306
+ <span className="text-sm text-gray-500 font-semibold flex-wrap">
307
+ {reply?.createdAt ? createdAtText(reply?.createdAt) : ''}
308
+ </span>
309
+ </div>
310
+ <div className="space-y-2">
311
+ <p className="text-sm text-gray-500 font-semibold flex-wrap">
312
+ {reply?.message
313
+ ? reply?.message.length < 70
314
+ ? `${reply?.message}`
315
+ : `${reply?.message.substring(0, 68)}....`
316
+ : ''}
317
+ </p>
318
+
319
+ {reply?.files?.data?.length > 0 &&
320
+ reply?.files?.data?.map((f: any, idx: number) => (
321
+ <div key={idx}>
322
+ <img
323
+ className="w-12 h-12 object-cover"
324
+ src={f?.url}
325
+ alt={'Image'}
326
+ />
327
+ </div>
328
+ ))}
329
+ </div>
330
+ {(threadPostReply?.length == 1 || index !== 0) && (
331
+ <button
332
+ onClick={() =>
333
+ onOpen(
334
+ thread?.channel?.id?.toString(),
335
+ thread?.post?.id?.toString(),
336
+ )
337
+ }
338
+ className="py-2 px-4 border border-gray-300 text-gray-700 bg-white hover:bg-gray-50 rounded-md text-sm font-medium w-37 focus:outline-none focus:ring-2 focus:ring-gray-500"
339
+ >
340
+ Reply
341
+ </button>
342
+ )}
343
+ </div>
344
+ </div>
345
+ </div>
346
+ ))}
347
+ </>
348
+ )}
349
+ </div>
350
+ </div>
351
+ </div>
352
+ </div>
353
+ );
354
+ });
@@ -0,0 +1,17 @@
1
+ export const applyFooterStyles = () => {
2
+ const footerElement: any = document.querySelector('#nav-footer');
3
+ if (footerElement) {
4
+ footerElement.style.display = 'none';
5
+ }
6
+ const nkqmc7: any = document.querySelector('.css-nkqmc7'); // temp, check paddingBottom needed
7
+ if (nkqmc7) {
8
+ nkqmc7.style.paddingBottom = '0px';
9
+ nkqmc7.style.minHeight = '0px';
10
+ }
11
+
12
+ return () => {
13
+ if (footerElement?.style) {
14
+ footerElement.style.display = 'block';
15
+ }
16
+ };
17
+ };
@@ -0,0 +1,31 @@
1
+ import Inbox from './Inbox';
2
+ import InboxWithLoader from './InboxWithLoader';
3
+ import Threads from './Threads';
4
+ import ThreadMessages from './ThreadMessages';
5
+ import ServiceInbox from './ServiceInbox';
6
+ import { ThreadsInbox } from './ThreadsInbox';
7
+ import { ThreadMessagesInbox } from './ThreadMessagesInbox';
8
+ ////import AiInboxWithLoader from './AiInboxWithLoader';
9
+ //import AiInbox from './AiInbox';
10
+ //import InboxTemplate1 from './InboxTemplate1';
11
+ import InboxWithAiLoader from './InboxWithAiLoader';
12
+ import InboxAiMessagesLoader from './InboxAiMessagesLoader';
13
+ import InboxContainer from './InboxContainer';
14
+ import AiLandingInput from './AiLandingInput';
15
+
16
+ export {
17
+ Inbox,
18
+ ThreadsInbox,
19
+ ThreadMessagesInbox,
20
+ Threads,
21
+ ThreadMessages,
22
+ ServiceInbox,
23
+ InboxWithLoader,
24
+ // AiInboxWithLoader,
25
+ // AiInbox,
26
+ // InboxTemplate1,
27
+ InboxWithAiLoader,
28
+ InboxAiMessagesLoader,
29
+ InboxContainer,
30
+ AiLandingInput,
31
+ };
@@ -0,0 +1 @@
1
+ export { MessengerSlotFillNameEnum } from './messenger-slot-fill-name-enum';
@@ -0,0 +1,4 @@
1
+ export enum MessengerSlotFillNameEnum {
2
+ INBOX_RIGHT_SIDEBAR = 'inbox-right-sidebar',
3
+ INBOX_WITH_AI_RIGHT_SIDEBAR = 'inbox-with-ai-right-sidebar',
4
+ }