@zohoim/chat-components 1.1.4 → 1.1.6-beta.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 (538) hide show
  1. package/README.md +12 -0
  2. package/es/ActionIcon/ActionIcon.js +10 -9
  3. package/es/ActionIcon/index.js +1 -1
  4. package/es/ActionIconWrapper/ActionIconWrapper.js +4 -4
  5. package/es/ActionIconWrapper/css/ActionIconWrapper.module.css +2 -2
  6. package/es/ActionIconWrapper/index.js +1 -1
  7. package/es/AttachmentBubble/AttachmentBubble.js +15 -14
  8. package/es/AttachmentBubble/css/AttachmentBubble.module.css +2 -1
  9. package/es/AttachmentBubble/index.js +1 -1
  10. package/es/AttachmentBubbleInfo/AttachmentBubbleInfo.js +4 -4
  11. package/es/AttachmentBubbleInfo/css/AttachmentBubbleInfo.module.css +2 -2
  12. package/es/AttachmentBubbleInfo/index.js +1 -1
  13. package/es/AttachmentHandler/AttachmentHandler.js +8 -7
  14. package/es/AttachmentHandler/index.js +1 -1
  15. package/es/AttachmentIcon/AttachmentIcon.js +5 -5
  16. package/es/AttachmentIcon/index.js +1 -1
  17. package/es/AttachmentIcon/utils/getAttachmentIconComponent.js +11 -11
  18. package/es/AttachmentPreview/AttachmentPreview.js +12 -12
  19. package/es/AttachmentPreview/index.js +1 -1
  20. package/es/AttachmentPreviewBody/AttachmentPreviewBody.js +12 -12
  21. package/es/AttachmentPreviewBody/index.js +1 -1
  22. package/es/AttachmentPreviewHeader/AttachmentPreviewHeader.js +10 -10
  23. package/es/AttachmentPreviewHeader/index.js +1 -1
  24. package/es/Audio/Audio.js +3 -3
  25. package/es/Audio/index.js +1 -1
  26. package/es/AudioBubble/AudioBubble.js +14 -13
  27. package/es/AudioBubble/index.js +1 -1
  28. package/es/Emoji/Emoji.js +4 -4
  29. package/es/Emoji/css/Emoji.module.css +4 -4
  30. package/es/Emoji/css/cssJSLogic.js +0 -0
  31. package/es/Emoji/index.js +1 -1
  32. package/es/Emoji/props/defaultProps.js +0 -0
  33. package/es/Emoji/props/propTypes.js +0 -0
  34. package/es/EmojiPopup/EmojiPopup.js +14 -15
  35. package/es/EmojiPopup/index.js +1 -1
  36. package/es/EmojiPopup/props/propTypes.js +1 -1
  37. package/es/Emojis/Emojis.js +14 -15
  38. package/es/Emojis/index.js +1 -1
  39. package/es/Emojis/props/defaultProps.js +0 -0
  40. package/es/Emojis/props/propTypes.js +0 -0
  41. package/es/EmojisEmptyState/EmojisEmptyState.js +4 -4
  42. package/es/EmojisEmptyState/css/EmojisEmptyState.module.css +0 -0
  43. package/es/EmojisEmptyState/index.js +1 -1
  44. package/es/EmojisEmptyState/props/defaultProps.js +0 -0
  45. package/es/EmojisEmptyState/props/propTypes.js +0 -0
  46. package/es/EmojisFooter/EmojisFooter.js +9 -8
  47. package/es/EmojisFooter/css/EmojisFooter.module.css +0 -0
  48. package/es/EmojisFooter/index.js +1 -1
  49. package/es/EmojisFooter/props/defaultProps.js +0 -0
  50. package/es/EmojisFooter/props/propTypes.js +0 -0
  51. package/es/EmojisHeader/EmojisHeader.js +8 -7
  52. package/es/EmojisHeader/css/EmojisHeader.module.css +0 -0
  53. package/es/EmojisHeader/index.js +1 -1
  54. package/es/EmojisHeader/props/defaultProps.js +0 -0
  55. package/es/EmojisHeader/props/propTypes.js +0 -0
  56. package/es/EmojisList/EmojisList.js +12 -12
  57. package/es/EmojisList/css/EmojisList.module.css +3 -3
  58. package/es/EmojisList/css/cssJSLogic.js +0 -0
  59. package/es/EmojisList/index.js +1 -1
  60. package/es/EmojisList/props/defaultProps.js +0 -0
  61. package/es/EmojisList/props/propTypes.js +0 -0
  62. package/es/ImageBubble/ImageBubble.js +5 -5
  63. package/es/ImageBubble/css/ImageBubble.module.css +1 -1
  64. package/es/ImageBubble/index.js +1 -1
  65. package/es/LazyLoadImage/LazyLoadImage.js +3 -3
  66. package/es/LazyLoadImage/index.js +1 -1
  67. package/es/LocationBubble/LocationBubble.js +4 -4
  68. package/es/LocationBubble/index.js +1 -1
  69. package/es/MediaBubbleWrapper/MediaBubbleWrapper.js +10 -8
  70. package/es/MediaBubbleWrapper/index.js +1 -1
  71. package/es/Message/Message.js +16 -23
  72. package/es/Message/index.js +1 -1
  73. package/es/MessageAction/MessageAction.js +14 -15
  74. package/es/MessageAction/index.js +1 -1
  75. package/es/MessageActions/MessageActions.js +17 -19
  76. package/es/MessageActions/index.js +1 -1
  77. package/es/MessageActionsMore/MessageActionsMore.js +4 -4
  78. package/es/MessageActionsMore/index.js +1 -1
  79. package/es/MessageActionsMore/props/propTypes.js +1 -1
  80. package/es/MessageActionsWrapper/MessageActionsWrapper.js +9 -8
  81. package/es/MessageActionsWrapper/index.js +1 -1
  82. package/es/MessageAvatar/MessageAvatar.js +3 -3
  83. package/es/MessageAvatar/index.js +1 -1
  84. package/es/MessageBox/MessageBox.js +4 -4
  85. package/es/MessageBox/css/MessageBox.module.css +5 -5
  86. package/es/MessageBox/index.js +1 -1
  87. package/es/MessageBubble/MessageBubble.js +4 -4
  88. package/es/MessageBubble/css/MessageBubble.module.css +3 -3
  89. package/es/MessageBubble/index.js +1 -1
  90. package/es/MessageStatus/MessageStatus.js +8 -8
  91. package/es/MessageStatus/index.js +1 -1
  92. package/es/MoreActionItem/MoreActionItem.js +3 -3
  93. package/es/MoreActionItem/css/MoreActionItem.module.css +2 -2
  94. package/es/MoreActionItem/index.js +1 -1
  95. package/es/ReplyBubble/ReplyBubble.js +18 -19
  96. package/es/ReplyBubble/index.js +1 -1
  97. package/es/ReplyBubbleContent/ReplyBubbleContent.js +4 -4
  98. package/es/ReplyBubbleContent/index.js +1 -1
  99. package/es/ReplyBubbleHeader/ReplyBubbleHeader.js +4 -4
  100. package/es/ReplyBubbleHeader/index.js +1 -1
  101. package/es/TextBubble/TextBubble.js +4 -4
  102. package/es/TextBubble/index.js +1 -1
  103. package/es/Theme/ThemeAssets.js +18 -18
  104. package/es/Theme/ThemeWrapper.js +15 -13
  105. package/es/Theme/TooltipWrapper.js +6 -5
  106. package/es/Theme/index.js +1 -1
  107. package/es/Theme/utils/combineConfigurations.js +1 -1
  108. package/es/Theme/utils/getCustomizedCssVariables.js +1 -1
  109. package/es/Video/Video.js +3 -3
  110. package/es/Video/index.js +1 -1
  111. package/es/VideoBubble/VideoBubble.js +15 -14
  112. package/es/VideoBubble/index.js +1 -1
  113. package/es/icons/create-icon-components.js +1 -1
  114. package/es/icons/iconSrc/attachments/Audio.js +1 -2
  115. package/es/icons/iconSrc/attachments/Code.js +1 -2
  116. package/es/icons/iconSrc/attachments/Image.js +1 -2
  117. package/es/icons/iconSrc/attachments/Pdf.js +1 -2
  118. package/es/icons/iconSrc/attachments/Ppt.js +1 -2
  119. package/es/icons/iconSrc/attachments/Text.js +1 -2
  120. package/es/icons/iconSrc/attachments/Txt.js +1 -2
  121. package/es/icons/iconSrc/attachments/Unknown.js +1 -2
  122. package/es/icons/iconSrc/attachments/Video.js +1 -2
  123. package/es/icons/iconSrc/attachments/Xls.js +1 -2
  124. package/es/icons/iconSrc/attachments/Zip.js +1 -2
  125. package/es/icons/iconSrc/attachments/index.js +10 -10
  126. package/es/icons/iconSrc/common/AlertTriangle.js +1 -2
  127. package/es/icons/iconSrc/common/Article.js +1 -2
  128. package/es/icons/iconSrc/common/Reply.js +1 -2
  129. package/es/icons/iconSrc/common/index.js +3 -3
  130. package/es/icons/iconSrc/messageStatus/Clock.js +1 -2
  131. package/es/icons/iconSrc/messageStatus/DoubleTick.js +1 -2
  132. package/es/icons/iconSrc/messageStatus/Failed.js +1 -2
  133. package/es/icons/iconSrc/messageStatus/Tick.js +1 -2
  134. package/es/icons/iconSrc/messageStatus/index.js +4 -4
  135. package/es/im/ArticleBubble/ArticleBubble.js +5 -5
  136. package/es/im/ArticleBubble/index.js +1 -1
  137. package/es/im/IMAttachmentHandler/IMAttachmentHandler.js +10 -9
  138. package/es/im/IMAttachmentHandler/index.js +1 -1
  139. package/es/im/IMAttachmentHandler/props/propTypes.js +1 -1
  140. package/es/im/IMIntegrationIcon/IMIntegrationIcon.js +4 -4
  141. package/es/im/IMIntegrationIcon/css/IMIntegrationIcon.module.css +4 -4
  142. package/es/im/IMIntegrationIcon/index.js +1 -1
  143. package/es/im/IMMessage/IMMessage.js +26 -29
  144. package/es/im/IMMessage/css/IMMessage.module.css +3 -3
  145. package/es/im/IMMessage/index.js +1 -1
  146. package/es/im/IMMessage/props/propTypes.js +1 -1
  147. package/es/im/IMMessageContent/IMMessageContent.js +28 -40
  148. package/es/im/IMMessageContent/index.js +1 -1
  149. package/es/im/IMMessageMeta/IMMessageMeta.js +10 -9
  150. package/es/im/IMMessageMeta/css/IMMessageMeta.module.css +3 -3
  151. package/es/im/IMMessageMeta/index.js +1 -1
  152. package/es/im/IMMessageMetaInfo/IMMessageMetaInfo.js +3 -3
  153. package/es/im/IMMessageMetaInfo/css/IMMessageMetaInfo.module.css +2 -2
  154. package/es/im/IMMessageMetaInfo/index.js +1 -1
  155. package/es/im/IMPermaLink/IMPermaLink.js +4 -4
  156. package/es/im/IMPermaLink/index.js +1 -1
  157. package/es/im/IMReplyBubble/IMReplyBubble.js +9 -7
  158. package/es/im/IMReplyBubble/index.js +1 -1
  159. package/es/im/IMTextBubble/IMTextBubble.js +9 -7
  160. package/es/im/IMTextBubble/index.js +1 -1
  161. package/es/im/ReplyComposer/ReplyComposer.js +22 -22
  162. package/es/im/ReplyComposer/index.js +1 -1
  163. package/es/im/ReplyComposer/props/propTypes.js +1 -1
  164. package/es/im/ReplyComposerFooter/ReplyComposerFooter.js +4 -4
  165. package/es/im/ReplyComposerFooter/index.js +1 -1
  166. package/es/im/ReplyEditor/ReplyEditor.js +10 -9
  167. package/es/im/ReplyEditor/index.js +1 -1
  168. package/es/im/ReplyEditor/props/propTypes.js +1 -1
  169. package/es/im/ReplyEditorExtensions/ReplyEditorExtensions.js +16 -17
  170. package/es/im/ReplyEditorExtensions/index.js +1 -1
  171. package/es/im/ReplyEditorSuggestions/ReplyEditorSuggestions.js +13 -14
  172. package/es/im/ReplyEditorSuggestions/index.js +1 -1
  173. package/es/im/ReplyEditorSuggestionsPopup/ReplyEditorSuggestionsPopup.js +9 -8
  174. package/es/im/ReplyEditorSuggestionsPopup/index.js +1 -1
  175. package/es/im/ReplyEditorSuggestionsPopup/props/propTypes.js +1 -1
  176. package/es/im/index.js +16 -16
  177. package/es/index.js +41 -41
  178. package/es/rte/Editor/Editor.js +4 -4
  179. package/es/rte/Editor/css/Editor.module.css +0 -0
  180. package/es/rte/Editor/index.js +1 -1
  181. package/es/rte/Editor/props/defaultProps.js +0 -0
  182. package/es/rte/Editor/props/propTypes.js +1 -1
  183. package/es/rte/index.js +1 -1
  184. package/lib/ActionIcon/ActionIcon.js +97 -0
  185. package/lib/ActionIcon/css/ActionIcon.module.css +8 -0
  186. package/lib/ActionIcon/index.js +15 -0
  187. package/lib/ActionIcon/props/defaultProps.js +17 -0
  188. package/lib/ActionIcon/props/propTypes.js +30 -0
  189. package/lib/ActionIconWrapper/ActionIconWrapper.js +85 -0
  190. package/lib/ActionIconWrapper/css/ActionIconWrapper.module.css +32 -0
  191. package/lib/ActionIconWrapper/css/cssJSLogic.js +21 -0
  192. package/lib/ActionIconWrapper/index.js +15 -0
  193. package/lib/ActionIconWrapper/props/defaultProps.js +15 -0
  194. package/lib/ActionIconWrapper/props/propTypes.js +24 -0
  195. package/lib/AttachmentBubble/AttachmentBubble.js +93 -0
  196. package/lib/AttachmentBubble/css/AttachmentBubble.module.css +56 -0
  197. package/lib/AttachmentBubble/css/cssJSLogic.js +22 -0
  198. package/lib/AttachmentBubble/index.js +15 -0
  199. package/lib/AttachmentBubble/props/defaultProps.js +17 -0
  200. package/lib/AttachmentBubble/props/propTypes.js +30 -0
  201. package/lib/AttachmentBubbleInfo/AttachmentBubbleInfo.js +63 -0
  202. package/lib/AttachmentBubbleInfo/css/AttachmentBubbleInfo.module.css +39 -0
  203. package/lib/AttachmentBubbleInfo/css/cssJSLogic.js +20 -0
  204. package/lib/AttachmentBubbleInfo/index.js +15 -0
  205. package/lib/AttachmentBubbleInfo/props/defaultProps.js +15 -0
  206. package/lib/AttachmentBubbleInfo/props/propTypes.js +20 -0
  207. package/lib/AttachmentHandler/AttachmentHandler.js +104 -0
  208. package/lib/AttachmentHandler/css/AttachmentHandler.module.css +27 -0
  209. package/lib/AttachmentHandler/index.js +15 -0
  210. package/lib/AttachmentHandler/props/defaultProps.js +19 -0
  211. package/lib/AttachmentHandler/props/propTypes.js +28 -0
  212. package/lib/AttachmentIcon/AttachmentIcon.js +84 -0
  213. package/lib/AttachmentIcon/css/AttachmentIcon.module.css +8 -0
  214. package/lib/AttachmentIcon/css/cssJSLogic.js +20 -0
  215. package/lib/AttachmentIcon/index.js +15 -0
  216. package/lib/AttachmentIcon/props/defaultProps.js +17 -0
  217. package/lib/AttachmentIcon/props/propTypes.js +31 -0
  218. package/lib/AttachmentIcon/utils/getAttachmentIconComponent.js +78 -0
  219. package/lib/AttachmentPreview/AttachmentPreview.js +144 -0
  220. package/lib/AttachmentPreview/css/AttachmentPreview.module.css +39 -0
  221. package/lib/AttachmentPreview/index.js +15 -0
  222. package/lib/AttachmentPreview/props/defaultProps.js +18 -0
  223. package/lib/AttachmentPreview/props/propTypes.js +44 -0
  224. package/lib/AttachmentPreviewBody/AttachmentPreviewBody.js +120 -0
  225. package/lib/AttachmentPreviewBody/css/AttachmentPreviewBody.module.css +71 -0
  226. package/lib/AttachmentPreviewBody/index.js +15 -0
  227. package/lib/AttachmentPreviewBody/props/defaultProps.js +16 -0
  228. package/lib/AttachmentPreviewBody/props/propTypes.js +31 -0
  229. package/lib/AttachmentPreviewHeader/AttachmentPreviewHeader.js +94 -0
  230. package/lib/AttachmentPreviewHeader/css/AttachmentPreviewHeader.module.css +47 -0
  231. package/lib/AttachmentPreviewHeader/index.js +15 -0
  232. package/lib/AttachmentPreviewHeader/props/defaultProps.js +16 -0
  233. package/lib/AttachmentPreviewHeader/props/propTypes.js +27 -0
  234. package/lib/Audio/Audio.js +55 -0
  235. package/lib/Audio/css/Audio.module.css +7 -0
  236. package/lib/Audio/index.js +15 -0
  237. package/lib/Audio/props/defaultProps.js +15 -0
  238. package/lib/Audio/props/propTypes.js +19 -0
  239. package/lib/AudioBubble/AudioBubble.js +68 -0
  240. package/lib/AudioBubble/css/AudioBubble.module.css +4 -0
  241. package/lib/AudioBubble/index.js +15 -0
  242. package/lib/AudioBubble/props/defaultProps.js +16 -0
  243. package/lib/AudioBubble/props/propTypes.js +27 -0
  244. package/lib/Emoji/Emoji.js +91 -0
  245. package/lib/Emoji/css/Emoji.module.css +48 -0
  246. package/lib/Emoji/css/cssJSLogic.js +22 -0
  247. package/lib/Emoji/index.js +15 -0
  248. package/lib/Emoji/props/defaultProps.js +17 -0
  249. package/lib/Emoji/props/propTypes.js +27 -0
  250. package/lib/EmojiPopup/EmojiPopup.js +138 -0
  251. package/lib/EmojiPopup/css/EmojiPopup.module.css +50 -0
  252. package/lib/EmojiPopup/index.js +15 -0
  253. package/lib/EmojiPopup/props/defaultProps.js +20 -0
  254. package/lib/EmojiPopup/props/propTypes.js +33 -0
  255. package/lib/Emojis/Emojis.js +92 -0
  256. package/lib/Emojis/index.js +15 -0
  257. package/lib/Emojis/props/defaultProps.js +19 -0
  258. package/lib/Emojis/props/propTypes.js +31 -0
  259. package/lib/EmojisEmptyState/EmojisEmptyState.js +74 -0
  260. package/lib/EmojisEmptyState/css/EmojisEmptyState.module.css +18 -0
  261. package/lib/EmojisEmptyState/index.js +15 -0
  262. package/lib/EmojisEmptyState/props/defaultProps.js +18 -0
  263. package/lib/EmojisEmptyState/props/propTypes.js +19 -0
  264. package/lib/EmojisFooter/EmojisFooter.js +87 -0
  265. package/lib/EmojisFooter/css/EmojisFooter.module.css +39 -0
  266. package/lib/EmojisFooter/index.js +15 -0
  267. package/lib/EmojisFooter/props/defaultProps.js +16 -0
  268. package/lib/EmojisFooter/props/propTypes.js +23 -0
  269. package/lib/EmojisHeader/EmojisHeader.js +74 -0
  270. package/lib/EmojisHeader/css/EmojisHeader.module.css +36 -0
  271. package/lib/EmojisHeader/index.js +15 -0
  272. package/lib/EmojisHeader/props/defaultProps.js +17 -0
  273. package/lib/EmojisHeader/props/propTypes.js +24 -0
  274. package/lib/EmojisList/EmojisList.js +143 -0
  275. package/lib/EmojisList/css/EmojisList.module.css +50 -0
  276. package/lib/EmojisList/css/cssJSLogic.js +27 -0
  277. package/lib/EmojisList/index.js +15 -0
  278. package/lib/EmojisList/props/defaultProps.js +19 -0
  279. package/lib/EmojisList/props/propTypes.js +31 -0
  280. package/lib/Fonts/puviFont.module.css +62 -0
  281. package/lib/ImageBubble/ImageBubble.js +98 -0
  282. package/lib/ImageBubble/css/ImageBubble.module.css +63 -0
  283. package/lib/ImageBubble/css/cssJSLogic.js +21 -0
  284. package/lib/ImageBubble/index.js +15 -0
  285. package/lib/ImageBubble/props/defaultProps.js +15 -0
  286. package/lib/ImageBubble/props/propTypes.js +24 -0
  287. package/lib/LazyLoadImage/LazyLoadImage.js +54 -0
  288. package/lib/LazyLoadImage/css/LazyLoadImage.module.css +5 -0
  289. package/lib/LazyLoadImage/index.js +15 -0
  290. package/lib/LazyLoadImage/props/defaultProps.js +15 -0
  291. package/lib/LazyLoadImage/props/propTypes.js +19 -0
  292. package/lib/LocationBubble/LocationBubble.js +77 -0
  293. package/lib/LocationBubble/css/LocationBubble.module.css +57 -0
  294. package/lib/LocationBubble/css/cssJSLogic.js +20 -0
  295. package/lib/LocationBubble/images/location.png +0 -0
  296. package/lib/LocationBubble/index.js +15 -0
  297. package/lib/LocationBubble/props/defaultProps.js +15 -0
  298. package/lib/LocationBubble/props/propTypes.js +19 -0
  299. package/lib/MediaBubbleWrapper/MediaBubbleWrapper.js +76 -0
  300. package/lib/MediaBubbleWrapper/css/MediaBubbleWrapper.module.css +7 -0
  301. package/lib/MediaBubbleWrapper/index.js +15 -0
  302. package/lib/MediaBubbleWrapper/props/defaultProps.js +16 -0
  303. package/lib/MediaBubbleWrapper/props/propTypes.js +28 -0
  304. package/lib/Message/Message.js +157 -0
  305. package/lib/Message/index.js +15 -0
  306. package/lib/Message/props/defaultProps.js +22 -0
  307. package/lib/Message/props/propTypes.js +55 -0
  308. package/lib/MessageAction/MessageAction.js +77 -0
  309. package/lib/MessageAction/index.js +15 -0
  310. package/lib/MessageAction/props/defaultProps.js +17 -0
  311. package/lib/MessageAction/props/propTypes.js +34 -0
  312. package/lib/MessageActions/MessageActions.js +137 -0
  313. package/lib/MessageActions/css/MessageActions.module.css +24 -0
  314. package/lib/MessageActions/index.js +15 -0
  315. package/lib/MessageActions/props/defaultProps.js +20 -0
  316. package/lib/MessageActions/props/propTypes.js +39 -0
  317. package/lib/MessageActionsMore/MessageActionsMore.js +128 -0
  318. package/lib/MessageActionsMore/css/MessageActionsMore.module.css +24 -0
  319. package/lib/MessageActionsMore/index.js +15 -0
  320. package/lib/MessageActionsMore/props/defaultProps.js +18 -0
  321. package/lib/MessageActionsMore/props/propTypes.js +29 -0
  322. package/lib/MessageActionsWrapper/MessageActionsWrapper.js +91 -0
  323. package/lib/MessageActionsWrapper/css/MessageActionsWrapper.module.css +7 -0
  324. package/lib/MessageActionsWrapper/index.js +15 -0
  325. package/lib/MessageActionsWrapper/props/defaultProps.js +19 -0
  326. package/lib/MessageActionsWrapper/props/propTypes.js +27 -0
  327. package/lib/MessageAvatar/MessageAvatar.js +64 -0
  328. package/lib/MessageAvatar/css/MessageAvatar.module.css +23 -0
  329. package/lib/MessageAvatar/index.js +15 -0
  330. package/lib/MessageAvatar/props/defaultProps.js +16 -0
  331. package/lib/MessageAvatar/props/propTypes.js +24 -0
  332. package/lib/MessageBox/MessageBox.js +82 -0
  333. package/lib/MessageBox/css/MessageBox.module.css +56 -0
  334. package/lib/MessageBox/css/cssJSLogic.js +22 -0
  335. package/lib/MessageBox/index.js +15 -0
  336. package/lib/MessageBox/props/defaultProps.js +15 -0
  337. package/lib/MessageBox/props/propTypes.js +24 -0
  338. package/lib/MessageBubble/MessageBubble.js +170 -0
  339. package/lib/MessageBubble/css/MessageBubble.module.css +101 -0
  340. package/lib/MessageBubble/css/cssJSLogic.js +38 -0
  341. package/lib/MessageBubble/index.js +15 -0
  342. package/lib/MessageBubble/props/defaultProps.js +22 -0
  343. package/lib/MessageBubble/props/propTypes.js +30 -0
  344. package/lib/MessageStatus/MessageStatus.js +88 -0
  345. package/lib/MessageStatus/css/MessageStatus.module.css +17 -0
  346. package/lib/MessageStatus/css/cssJSLogic.js +33 -0
  347. package/lib/MessageStatus/index.js +15 -0
  348. package/lib/MessageStatus/props/defaultProps.js +15 -0
  349. package/lib/MessageStatus/props/propTypes.js +24 -0
  350. package/lib/MoreActionItem/MoreActionItem.js +98 -0
  351. package/lib/MoreActionItem/css/MoreActionItem.module.css +27 -0
  352. package/lib/MoreActionItem/index.js +15 -0
  353. package/lib/MoreActionItem/props/defaultProps.js +16 -0
  354. package/lib/MoreActionItem/props/propTypes.js +25 -0
  355. package/lib/ReplyBubble/ReplyBubble.js +136 -0
  356. package/lib/ReplyBubble/css/ReplyBubble.module.css +23 -0
  357. package/lib/ReplyBubble/css/cssJSLogic.js +20 -0
  358. package/lib/ReplyBubble/index.js +15 -0
  359. package/lib/ReplyBubble/props/defaultProps.js +17 -0
  360. package/lib/ReplyBubble/props/propTypes.js +39 -0
  361. package/lib/ReplyBubbleContent/ReplyBubbleContent.js +77 -0
  362. package/lib/ReplyBubbleContent/css/ReplyBubbleContent.module.css +75 -0
  363. package/lib/ReplyBubbleContent/css/cssJSLogic.js +20 -0
  364. package/lib/ReplyBubbleContent/index.js +15 -0
  365. package/lib/ReplyBubbleContent/props/defaultProps.js +15 -0
  366. package/lib/ReplyBubbleContent/props/propTypes.js +22 -0
  367. package/lib/ReplyBubbleHeader/ReplyBubbleHeader.js +97 -0
  368. package/lib/ReplyBubbleHeader/css/ReplyBubbleHeader.module.css +44 -0
  369. package/lib/ReplyBubbleHeader/css/cssJSLogic.js +18 -0
  370. package/lib/ReplyBubbleHeader/index.js +15 -0
  371. package/lib/ReplyBubbleHeader/props/defaultProps.js +16 -0
  372. package/lib/ReplyBubbleHeader/props/propTypes.js +24 -0
  373. package/lib/TextBubble/TextBubble.js +72 -0
  374. package/lib/TextBubble/css/TextBubble.module.css +36 -0
  375. package/lib/TextBubble/css/cssJSLogic.js +22 -0
  376. package/lib/TextBubble/index.js +15 -0
  377. package/lib/TextBubble/props/defaultProps.js +15 -0
  378. package/lib/TextBubble/props/propTypes.js +21 -0
  379. package/lib/Theme/ThemeAssets.js +182 -0
  380. package/lib/Theme/ThemeWrapper.js +130 -0
  381. package/lib/Theme/TooltipWrapper.js +97 -0
  382. package/lib/Theme/css/TooltipWrapper.module.css +10 -0
  383. package/lib/Theme/index.js +15 -0
  384. package/lib/Theme/props/defaultProps.js +20 -0
  385. package/lib/Theme/props/propTypes.js +26 -0
  386. package/lib/Theme/utils/combineConfigurations.js +31 -0
  387. package/lib/Theme/utils/flatVariables.js +21 -0
  388. package/lib/Theme/utils/getCustomizedCssVariables.js +29 -0
  389. package/lib/Theme/utils/getThemeConfigurations.js +28 -0
  390. package/lib/Theme/utils/getWrapperDivProps.js +23 -0
  391. package/lib/Video/Video.js +55 -0
  392. package/lib/Video/css/Video.module.css +5 -0
  393. package/lib/Video/index.js +15 -0
  394. package/lib/Video/props/defaultProps.js +15 -0
  395. package/lib/Video/props/propTypes.js +19 -0
  396. package/lib/VideoBubble/VideoBubble.js +77 -0
  397. package/lib/VideoBubble/css/VideoBubble.module.css +12 -0
  398. package/lib/VideoBubble/css/cssJSLogic.js +20 -0
  399. package/lib/VideoBubble/index.js +15 -0
  400. package/lib/VideoBubble/props/defaultProps.js +16 -0
  401. package/lib/VideoBubble/props/propTypes.js +28 -0
  402. package/lib/constants/index.js +18 -0
  403. package/lib/constants/propConstants/editorPropConstants.js +12 -0
  404. package/lib/constants/propConstants/popupPropConstants.js +10 -0
  405. package/lib/css/common.module.css +6 -0
  406. package/lib/icons/create-icon-components.js +199 -0
  407. package/lib/icons/factory/attachments/audio.svg +19 -0
  408. package/lib/icons/factory/attachments/code.svg +21 -0
  409. package/lib/icons/factory/attachments/image.svg +20 -0
  410. package/lib/icons/factory/attachments/pdf.svg +19 -0
  411. package/lib/icons/factory/attachments/ppt.svg +1 -0
  412. package/lib/icons/factory/attachments/text.svg +22 -0
  413. package/lib/icons/factory/attachments/unknown.svg +21 -0
  414. package/lib/icons/factory/attachments/video.svg +19 -0
  415. package/lib/icons/factory/attachments/xls.svg +1 -0
  416. package/lib/icons/factory/attachments/zip.svg +27 -0
  417. package/lib/icons/factory/common/alertTriangle.svg +5 -0
  418. package/lib/icons/factory/common/article.svg +4 -0
  419. package/lib/icons/factory/common/reply.svg +6 -0
  420. package/lib/icons/factory/messageStatus/clock.svg +7 -0
  421. package/lib/icons/factory/messageStatus/doubleTick.svg +1 -0
  422. package/lib/icons/factory/messageStatus/failed.svg +7 -0
  423. package/lib/icons/factory/messageStatus/tick.svg +1 -0
  424. package/lib/icons/icon.template.js +18 -0
  425. package/lib/icons/iconSrc/attachments/Audio.js +41 -0
  426. package/lib/icons/iconSrc/attachments/Code.js +47 -0
  427. package/lib/icons/iconSrc/attachments/Image.js +46 -0
  428. package/lib/icons/iconSrc/attachments/Pdf.js +41 -0
  429. package/lib/icons/iconSrc/attachments/Ppt.js +38 -0
  430. package/lib/icons/iconSrc/attachments/Text.js +50 -0
  431. package/lib/icons/iconSrc/attachments/Txt.js +50 -0
  432. package/lib/icons/iconSrc/attachments/Unknown.js +44 -0
  433. package/lib/icons/iconSrc/attachments/Video.js +41 -0
  434. package/lib/icons/iconSrc/attachments/Xls.js +38 -0
  435. package/lib/icons/iconSrc/attachments/Zip.js +89 -0
  436. package/lib/icons/iconSrc/attachments/index.js +87 -0
  437. package/lib/icons/iconSrc/common/AlertTriangle.js +35 -0
  438. package/lib/icons/iconSrc/common/Article.js +29 -0
  439. package/lib/icons/iconSrc/common/Reply.js +25 -0
  440. package/lib/icons/iconSrc/common/index.js +31 -0
  441. package/lib/icons/iconSrc/messageStatus/Clock.js +26 -0
  442. package/lib/icons/iconSrc/messageStatus/DoubleTick.js +28 -0
  443. package/lib/icons/iconSrc/messageStatus/Failed.js +26 -0
  444. package/lib/icons/iconSrc/messageStatus/Tick.js +25 -0
  445. package/lib/icons/iconSrc/messageStatus/index.js +39 -0
  446. package/lib/im/ArticleBubble/ArticleBubble.js +104 -0
  447. package/lib/im/ArticleBubble/css/ArticleBubble.module.css +75 -0
  448. package/lib/im/ArticleBubble/css/cssJSLogic.js +18 -0
  449. package/lib/im/ArticleBubble/index.js +15 -0
  450. package/lib/im/ArticleBubble/props/defaultProps.js +15 -0
  451. package/lib/im/ArticleBubble/props/propTypes.js +25 -0
  452. package/lib/im/IMAttachmentHandler/IMAttachmentHandler.js +59 -0
  453. package/lib/im/IMAttachmentHandler/index.js +15 -0
  454. package/lib/im/IMAttachmentHandler/props/defaultProps.js +19 -0
  455. package/lib/im/IMAttachmentHandler/props/propTypes.js +38 -0
  456. package/lib/im/IMIntegrationIcon/IMIntegrationIcon.js +82 -0
  457. package/lib/im/IMIntegrationIcon/css/IMIntegrationIcon.module.css +72 -0
  458. package/lib/im/IMIntegrationIcon/css/cssJSLogic.js +48 -0
  459. package/lib/im/IMIntegrationIcon/index.js +15 -0
  460. package/lib/im/IMIntegrationIcon/props/defaultProps.js +21 -0
  461. package/lib/im/IMIntegrationIcon/props/propTypes.js +27 -0
  462. package/lib/im/IMMessage/IMMessage.js +223 -0
  463. package/lib/im/IMMessage/css/IMMessage.module.css +36 -0
  464. package/lib/im/IMMessage/css/cssJSLogic.js +21 -0
  465. package/lib/im/IMMessage/index.js +15 -0
  466. package/lib/im/IMMessage/props/defaultProps.js +25 -0
  467. package/lib/im/IMMessage/props/propTypes.js +118 -0
  468. package/lib/im/IMMessageContent/IMMessageContent.js +149 -0
  469. package/lib/im/IMMessageContent/css/IMMessageContent.module.css +8 -0
  470. package/lib/im/IMMessageContent/index.js +15 -0
  471. package/lib/im/IMMessageContent/props/defaultProps.js +18 -0
  472. package/lib/im/IMMessageContent/props/propTypes.js +65 -0
  473. package/lib/im/IMMessageMeta/IMMessageMeta.js +79 -0
  474. package/lib/im/IMMessageMeta/css/IMMessageMeta.module.css +46 -0
  475. package/lib/im/IMMessageMeta/css/cssJSLogic.js +35 -0
  476. package/lib/im/IMMessageMeta/index.js +15 -0
  477. package/lib/im/IMMessageMeta/props/defaultProps.js +21 -0
  478. package/lib/im/IMMessageMeta/props/propTypes.js +44 -0
  479. package/lib/im/IMMessageMetaInfo/IMMessageMetaInfo.js +42 -0
  480. package/lib/im/IMMessageMetaInfo/css/IMMessageMetaInfo.module.css +14 -0
  481. package/lib/im/IMMessageMetaInfo/index.js +15 -0
  482. package/lib/im/IMMessageMetaInfo/props/defaultProps.js +17 -0
  483. package/lib/im/IMMessageMetaInfo/props/propTypes.js +19 -0
  484. package/lib/im/IMPermaLink/IMPermaLink.js +64 -0
  485. package/lib/im/IMPermaLink/css/IMPermaLink.module.css +14 -0
  486. package/lib/im/IMPermaLink/css/cssJSLogic.js +20 -0
  487. package/lib/im/IMPermaLink/index.js +15 -0
  488. package/lib/im/IMPermaLink/props/defaultProps.js +15 -0
  489. package/lib/im/IMPermaLink/props/propTypes.js +22 -0
  490. package/lib/im/IMReplyBubble/IMReplyBubble.js +59 -0
  491. package/lib/im/IMReplyBubble/index.js +15 -0
  492. package/lib/im/IMReplyBubble/props/defaultProps.js +16 -0
  493. package/lib/im/IMReplyBubble/props/propTypes.js +40 -0
  494. package/lib/im/IMTextBubble/IMTextBubble.js +47 -0
  495. package/lib/im/IMTextBubble/index.js +15 -0
  496. package/lib/im/IMTextBubble/props/defaultProps.js +18 -0
  497. package/lib/im/IMTextBubble/props/propTypes.js +42 -0
  498. package/lib/im/ReplyComposer/ReplyComposer.js +180 -0
  499. package/lib/im/ReplyComposer/css/ReplyComposer.module.css +10 -0
  500. package/lib/im/ReplyComposer/css/cssJSLogic.js +18 -0
  501. package/lib/im/ReplyComposer/index.js +15 -0
  502. package/lib/im/ReplyComposer/props/defaultProps.js +16 -0
  503. package/lib/im/ReplyComposer/props/propTypes.js +72 -0
  504. package/lib/im/ReplyComposerFooter/ReplyComposerFooter.js +64 -0
  505. package/lib/im/ReplyComposerFooter/css/ReplyComposerFooter.module.css +10 -0
  506. package/lib/im/ReplyComposerFooter/index.js +15 -0
  507. package/lib/im/ReplyComposerFooter/props/defaultProps.js +17 -0
  508. package/lib/im/ReplyComposerFooter/props/propTypes.js +28 -0
  509. package/lib/im/ReplyEditor/ReplyEditor.js +124 -0
  510. package/lib/im/ReplyEditor/css/ReplyEditor.module.css +54 -0
  511. package/lib/im/ReplyEditor/css/cssJSLogic.js +17 -0
  512. package/lib/im/ReplyEditor/index.js +15 -0
  513. package/lib/im/ReplyEditor/props/defaultProps.js +17 -0
  514. package/lib/im/ReplyEditor/props/propTypes.js +39 -0
  515. package/lib/im/ReplyEditorExtensions/ReplyEditorExtensions.js +160 -0
  516. package/lib/im/ReplyEditorExtensions/css/ReplyEditorExtensions.module.css +5 -0
  517. package/lib/im/ReplyEditorExtensions/index.js +15 -0
  518. package/lib/im/ReplyEditorExtensions/props/defaultProps.js +15 -0
  519. package/lib/im/ReplyEditorExtensions/props/propTypes.js +27 -0
  520. package/lib/im/ReplyEditorSuggestions/ReplyEditorSuggestions.js +119 -0
  521. package/lib/im/ReplyEditorSuggestions/css/ReplyEditorSuggestions.module.css +8 -0
  522. package/lib/im/ReplyEditorSuggestions/index.js +15 -0
  523. package/lib/im/ReplyEditorSuggestions/props/defaultProps.js +15 -0
  524. package/lib/im/ReplyEditorSuggestions/props/propTypes.js +32 -0
  525. package/lib/im/ReplyEditorSuggestionsPopup/ReplyEditorSuggestionsPopup.js +107 -0
  526. package/lib/im/ReplyEditorSuggestionsPopup/css/ReplyEditorSuggestionsPopup.module.css +7 -0
  527. package/lib/im/ReplyEditorSuggestionsPopup/index.js +15 -0
  528. package/lib/im/ReplyEditorSuggestionsPopup/props/defaultProps.js +19 -0
  529. package/lib/im/ReplyEditorSuggestionsPopup/props/propTypes.js +33 -0
  530. package/lib/im/css/common.module.css +6 -0
  531. package/lib/im/index.js +213 -0
  532. package/lib/rte/Editor/Editor.js +97 -0
  533. package/lib/rte/Editor/css/Editor.module.css +17 -0
  534. package/lib/rte/Editor/index.js +15 -0
  535. package/lib/rte/Editor/props/defaultProps.js +30 -0
  536. package/lib/rte/Editor/props/propTypes.js +74 -0
  537. package/lib/rte/index.js +18 -0
  538. package/package.json +45 -27
@@ -0,0 +1,39 @@
1
+ .varClass {
2
+ --attachmentBubbleInfo-fileName_font_size: 15px;
3
+ --attachmentBubbleInfo-fileName_font_family: var(--zd_semibold);
4
+ --attachmentBubbleInfo-fileSize_font_size: 13px;
5
+ }
6
+
7
+ .fileName {
8
+ composes: varClass;
9
+ font-size: var(--attachmentBubbleInfo-fileName_font_size);
10
+ font-family: var(--attachmentBubbleInfo-fileName_font_family);
11
+ color: var(--imlib_chat_components_attachmentBubbleInfo_fileName_color);
12
+ }
13
+
14
+ .failedAttachmentBubbleInfo .fileName{
15
+ color: var(--imlib_chat_components_attachmentBubbleInfo_fileName_color_failed);
16
+ }
17
+
18
+ .fileSize {
19
+ composes: varClass;
20
+ font-size: var(--attachmentBubbleInfo-fileSize_font_size);
21
+ color: var(--imlib_chat_components_attachmentBubbleInfo_fileSize_color);
22
+ margin-top: var(--zd_size5) ;
23
+ }
24
+
25
+ .failedAttachmentBubbleInfo .fileSize{
26
+ color: var(--imlib_chat_components_attachmentBubbleInfo_fileSize_color_failed);
27
+ }
28
+
29
+ .fileName,
30
+ .fileSize {
31
+ composes: dotted from "../../css/common.module.css";
32
+ }
33
+
34
+ .attachmentBubbleInfo {
35
+ width: 100% ;
36
+ line-height: normal;
37
+ /* Use this class name for css customization */
38
+ }
39
+
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = cssJSLogic;
7
+
8
+ var _utils = require("@zohodesk/utils");
9
+
10
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+
12
+ function cssJSLogic(props, style) {
13
+ var _compileClassNames;
14
+
15
+ var isFailed = props.isFailed;
16
+ var attachmentBubbleInfoClass = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, style.attachmentBubbleInfo, true), _defineProperty(_compileClassNames, style.failedAttachmentBubbleInfo, isFailed), _compileClassNames));
17
+ return {
18
+ attachmentBubbleInfoClass: attachmentBubbleInfoClass
19
+ };
20
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "AttachmentBubbleInfo", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _AttachmentBubbleInfo["default"];
10
+ }
11
+ });
12
+
13
+ var _AttachmentBubbleInfo = _interopRequireDefault(require("./AttachmentBubbleInfo"));
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _emptyConstants = require("@zohoim/chat-components-utils/es/constants/emptyConstants");
9
+
10
+ /** ** Constants *** */
11
+ var attachmentBubbleInfoDefaultProps = {
12
+ customStyle: _emptyConstants.dummyObject
13
+ };
14
+ var _default = attachmentBubbleInfoDefaultProps;
15
+ exports["default"] = _default;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /** ** Libraries *** */
13
+ var attachmentBubbleInfoPropTypes = {
14
+ fileName: _propTypes["default"].string.isRequired,
15
+ fileSize: _propTypes["default"].string.isRequired,
16
+ customStyle: _propTypes["default"].object,
17
+ isFailed: _propTypes["default"].bool
18
+ };
19
+ var _default = attachmentBubbleInfoPropTypes;
20
+ exports["default"] = _default;
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = AttachmentHandler;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _IconButton = _interopRequireDefault(require("@zohodesk/dot/es/IconButton/IconButton"));
13
+
14
+ var _Layout = require("@zohodesk/components/es/Layout");
15
+
16
+ var _useMergeStyle = _interopRequireDefault(require("@zohodesk/hooks/es/utils/useMergeStyle"));
17
+
18
+ var _useAttachmentHandler2 = _interopRequireDefault(require("@zohoim/chat-components-hooks/es/AttachmentHandler/useAttachmentHandler"));
19
+
20
+ var _emptyConstants = require("@zohoim/chat-components-utils/es/constants/emptyConstants");
21
+
22
+ var _defaultProps = _interopRequireDefault(require("./props/defaultProps"));
23
+
24
+ var _propTypes = _interopRequireDefault(require("./props/propTypes"));
25
+
26
+ var _renderHandler = _interopRequireDefault(require("@zohoim/chat-components-utils/es/common/renderHandler"));
27
+
28
+ var _AttachmentHandlerModule = _interopRequireDefault(require("./css/AttachmentHandler.module.css"));
29
+
30
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
+
32
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
+
34
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
+
36
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
37
+
38
+ function AttachmentHandler(props) {
39
+ var customStyle = props.customStyle,
40
+ iconName = props.iconName,
41
+ iconSize = props.iconSize,
42
+ iconTitle = props.iconTitle,
43
+ renderCustomIcon = props.renderCustomIcon,
44
+ propGetRef = props.getRef,
45
+ supportedFileTypes = props.supportedFileTypes,
46
+ isMultiAttachment = props.isMultiAttachment,
47
+ propOnAttach = props.onAttach,
48
+ _props$customProps = props.customProps,
49
+ customProps = _props$customProps === void 0 ? _emptyConstants.dummyObject : _props$customProps;
50
+ var _customProps$inputPro = customProps.inputProps,
51
+ inputProps = _customProps$inputPro === void 0 ? _emptyConstants.dummyObject : _customProps$inputPro;
52
+
53
+ var _useAttachmentHandler = (0, _useAttachmentHandler2["default"])({
54
+ onAttach: propOnAttach,
55
+ getRef: propGetRef
56
+ }),
57
+ onAttach = _useAttachmentHandler.onAttach,
58
+ onAttachmentClick = _useAttachmentHandler.onAttachmentClick,
59
+ getRef = _useAttachmentHandler.getRef;
60
+ /* External customization */
61
+
62
+
63
+ var newStyle = (0, _useMergeStyle["default"])(_AttachmentHandlerModule["default"], customStyle);
64
+ var inputEl = (0, _react.useMemo)(function () {
65
+ return /*#__PURE__*/_react["default"].createElement("input", _extends({
66
+ ref: getRef,
67
+ accept: supportedFileTypes,
68
+ hidden: true,
69
+ multiple: isMultiAttachment,
70
+ onChange: onAttach,
71
+ size: "1",
72
+ type: "file"
73
+ }, inputProps));
74
+ }, [supportedFileTypes, getRef, onAttach, isMultiAttachment, inputProps]);
75
+ var customIcon = (0, _react.useMemo)(function () {
76
+ /* Render Custom Icon */
77
+ var icon = (0, _renderHandler["default"])(renderCustomIcon)({
78
+ onClick: onAttachmentClick
79
+ });
80
+
81
+ if (icon) {
82
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, icon, inputEl);
83
+ }
84
+
85
+ return null;
86
+ }, [renderCustomIcon, onAttachmentClick, inputEl]);
87
+ return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
88
+ alignBox: "column"
89
+ }, customIcon || /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
90
+ a11y: {
91
+ ariaLabel: iconTitle
92
+ },
93
+ className: newStyle.iconButton,
94
+ iconClass: newStyle.icon,
95
+ iconName: iconName,
96
+ iconSize: iconSize,
97
+ onClick: onAttachmentClick,
98
+ title: iconTitle
99
+ }, inputEl));
100
+ }
101
+
102
+ AttachmentHandler.propTypes = _propTypes["default"];
103
+ AttachmentHandler.defaultProps = _defaultProps["default"];
104
+ AttachmentHandler.displayName = 'AttachmentHandler';
@@ -0,0 +1,27 @@
1
+ /** ** Styles *** */
2
+
3
+ .attachmentHandler {
4
+ /** ** Use this class for css customisation *** */
5
+ }
6
+
7
+ [dir=ltr] .iconButton {
8
+ margin-right: var(--zd_size5) ;
9
+ }
10
+
11
+ [dir=rtl] .iconButton {
12
+ margin-left: var(--zd_size5) ;
13
+ }
14
+
15
+ .icon {
16
+ color: initial;
17
+ }
18
+
19
+
20
+ .icon :global .path1:before {
21
+ color: var(--imlib_chat_components_twotone_icon_bg) !important;
22
+ opacity: 1;
23
+ }
24
+
25
+ .icon :global .path2:before {
26
+ color: var(--imlib_chat_components_twotone_icon_border) !important;
27
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "AttachmentHandler", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _AttachmentHandler["default"];
10
+ }
11
+ });
12
+
13
+ var _AttachmentHandler = _interopRequireDefault(require("./AttachmentHandler"));
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _emptyConstants = require("@zohoim/chat-components-utils/es/constants/emptyConstants");
9
+
10
+ /** ** Constants *** */
11
+ var attachmentHandlerDefaultProps = {
12
+ customStyle: _emptyConstants.dummyObject,
13
+ iconName: 'ZD-TT-image',
14
+ iconSize: '14',
15
+ iconTitle: 'Upload',
16
+ isMultiAttachment: false
17
+ };
18
+ var _default = attachmentHandlerDefaultProps;
19
+ exports["default"] = _default;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ /** ** Libraries *** */
13
+ var attachmentHandlerPropTypes = {
14
+ customStyle: _propTypes["default"].object,
15
+ iconName: _propTypes["default"].string.isRequired,
16
+ iconSize: _propTypes["default"].number,
17
+ iconTitle: _propTypes["default"].string,
18
+ renderCustomIcon: _propTypes["default"].func,
19
+ getRef: _propTypes["default"].func,
20
+ supportedFileTypes: _propTypes["default"].string,
21
+ isMultiAttachment: _propTypes["default"].bool,
22
+ onAttach: _propTypes["default"].func.isRequired,
23
+ customProps: _propTypes["default"].shape({
24
+ inputProps: _propTypes["default"].object
25
+ })
26
+ };
27
+ var _default = attachmentHandlerPropTypes;
28
+ exports["default"] = _default;
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = AttachmentIcon;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _useMergeStyle = _interopRequireDefault(require("@zohodesk/hooks/es/utils/useMergeStyle"));
13
+
14
+ var _defaultProps = _interopRequireDefault(require("./props/defaultProps"));
15
+
16
+ var _propTypes = _interopRequireDefault(require("./props/propTypes"));
17
+
18
+ var _cssJSLogic2 = _interopRequireDefault(require("./css/cssJSLogic"));
19
+
20
+ var _getAttachmentIconComponent = _interopRequireDefault(require("./utils/getAttachmentIconComponent"));
21
+
22
+ var _renderHandler = _interopRequireDefault(require("@zohoim/chat-components-utils/es/common/renderHandler"));
23
+
24
+ var _AttachmentIconModule = _interopRequireDefault(require("./css/AttachmentIcon.module.css"));
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+
28
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
+
30
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
+
32
+ /** ** Libraries *** */
33
+
34
+ /** ** Hooks *** */
35
+
36
+ /** ** Constants *** */
37
+
38
+ /** ** Methods *** */
39
+
40
+ /** ** Styles *** */
41
+ function AttachmentIcon(props) {
42
+ var customStyle = props.customStyle,
43
+ fileFormat = props.fileFormat,
44
+ mediaType = props.mediaType,
45
+ isDisabled = props.isDisabled,
46
+ renderCustomIcon = props.renderCustomIcon,
47
+ isValidAttachment = props.isValidAttachment;
48
+ /* External CSS Customization */
49
+
50
+ var newStyle = (0, _useMergeStyle["default"])(_AttachmentIconModule["default"], customStyle);
51
+ /* css classnames added based on logic */
52
+
53
+ var _cssJSLogic = (0, _cssJSLogic2["default"])({
54
+ isDisabled: isDisabled
55
+ }, newStyle),
56
+ iconStyleClass = _cssJSLogic.iconStyleClass;
57
+
58
+ var iconCustomStyle = (0, _react.useMemo)(function () {
59
+ return {
60
+ base: iconStyleClass
61
+ };
62
+ }, [iconStyleClass]);
63
+ /* Custom Icon Renderer */
64
+
65
+ if (renderCustomIcon) {
66
+ var fileIcon = (0, _renderHandler["default"])(renderCustomIcon)();
67
+ return fileIcon;
68
+ }
69
+
70
+ var _getAttachmentIconCom = (0, _getAttachmentIconComponent["default"])({
71
+ fileFormat: fileFormat,
72
+ mediaType: mediaType,
73
+ isValidAttachment: isValidAttachment
74
+ }),
75
+ IconComponent = _getAttachmentIconCom.IconComponent;
76
+
77
+ return IconComponent ? /*#__PURE__*/_react["default"].createElement(IconComponent, {
78
+ customStyle: iconCustomStyle
79
+ }) : null;
80
+ }
81
+
82
+ AttachmentIcon.propTypes = _propTypes["default"];
83
+ AttachmentIcon.defaultProps = _defaultProps["default"];
84
+ AttachmentIcon.displayName = 'AttachmentIcon';
@@ -0,0 +1,8 @@
1
+ .icon {
2
+ width: var(--zd_size20) !important;
3
+ height: var(--zd_size20) !important;
4
+ }
5
+
6
+ .disabledIcon {
7
+ cursor: not-allowed !important;
8
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = cssJSLogic;
7
+
8
+ var _utils = require("@zohodesk/utils");
9
+
10
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+
12
+ function cssJSLogic(props, style) {
13
+ var _compileClassNames;
14
+
15
+ var isDisabled = props.isDisabled;
16
+ var iconStyleClass = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, style.icon, true), _defineProperty(_compileClassNames, style.disabledIcon, isDisabled), _compileClassNames));
17
+ return {
18
+ iconStyleClass: iconStyleClass
19
+ };
20
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "AttachmentIcon", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _AttachmentIcon["default"];
10
+ }
11
+ });
12
+
13
+ var _AttachmentIcon = _interopRequireDefault(require("./AttachmentIcon"));
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _emptyConstants = require("@zohoim/chat-components-utils/es/constants/emptyConstants");
9
+
10
+ /** ** Constants *** */
11
+ var attachmentIconDefaultProps = {
12
+ isDisabled: false,
13
+ isValidAttachment: true,
14
+ customStyle: _emptyConstants.dummyObject
15
+ };
16
+ var _default = attachmentIconDefaultProps;
17
+ exports["default"] = _default;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+
10
+ var _attachmentFileTypes = _interopRequireDefault(require("@zohoim/chat-components-utils/es/constants/attachmentFileTypes"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+
14
+ /** ** Libraries *** */
15
+
16
+ /** ** Constants *** */
17
+ var AUDIO = _attachmentFileTypes["default"].AUDIO,
18
+ VIDEO = _attachmentFileTypes["default"].VIDEO,
19
+ IMAGE = _attachmentFileTypes["default"].IMAGE; // Docs - Playground Component Render Issue Fix
20
+
21
+ var fileFormats = JSON.parse(JSON.stringify(Object.values(_attachmentFileTypes["default"])));
22
+ var attachmentIconPropTypes = {
23
+ fileFormat: _propTypes["default"].oneOf(fileFormats).isRequired,
24
+ mediaType: _propTypes["default"].oneOf([AUDIO, VIDEO, IMAGE]).isRequired,
25
+ isDisabled: _propTypes["default"].bool,
26
+ customStyle: _propTypes["default"].object,
27
+ renderCustomIcon: _propTypes["default"].func,
28
+ isValidAttachment: _propTypes["default"].bool
29
+ };
30
+ var _default = attachmentIconPropTypes;
31
+ exports["default"] = _default;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = getAttachmentIconComponent;
7
+
8
+ var _Audio = _interopRequireDefault(require("../../icons/iconSrc/attachments/Audio"));
9
+
10
+ var _Code = _interopRequireDefault(require("../../icons/iconSrc/attachments/Code"));
11
+
12
+ var _Image = _interopRequireDefault(require("../../icons/iconSrc/attachments/Image"));
13
+
14
+ var _Pdf = _interopRequireDefault(require("../../icons/iconSrc/attachments/Pdf"));
15
+
16
+ var _Text = _interopRequireDefault(require("../../icons/iconSrc/attachments/Text"));
17
+
18
+ var _Unknown = _interopRequireDefault(require("../../icons/iconSrc/attachments/Unknown"));
19
+
20
+ var _Video = _interopRequireDefault(require("../../icons/iconSrc/attachments/Video"));
21
+
22
+ var _Zip = _interopRequireDefault(require("../../icons/iconSrc/attachments/Zip"));
23
+
24
+ var _AlertTriangle = _interopRequireDefault(require("../../icons/iconSrc/common/AlertTriangle"));
25
+
26
+ var _Xls = _interopRequireDefault(require("../../icons/iconSrc/attachments/Xls"));
27
+
28
+ var _Ppt = _interopRequireDefault(require("../../icons/iconSrc/attachments/Ppt"));
29
+
30
+ var _attachmentFileTypes = _interopRequireDefault(require("@zohoim/chat-components-utils/es/constants/attachmentFileTypes"));
31
+
32
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
33
+
34
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
35
+
36
+ var SVG = _attachmentFileTypes["default"].SVG,
37
+ IMAGE = _attachmentFileTypes["default"].IMAGE,
38
+ PDF = _attachmentFileTypes["default"].PDF,
39
+ AUDIO = _attachmentFileTypes["default"].AUDIO,
40
+ VIDEO = _attachmentFileTypes["default"].VIDEO,
41
+ MP3 = _attachmentFileTypes["default"].MP3,
42
+ MPEG = _attachmentFileTypes["default"].MPEG,
43
+ VORBIS = _attachmentFileTypes["default"].VORBIS,
44
+ OGG = _attachmentFileTypes["default"].OGG,
45
+ M4A = _attachmentFileTypes["default"].M4A,
46
+ MP4 = _attachmentFileTypes["default"].MP4,
47
+ HTML = _attachmentFileTypes["default"].HTML,
48
+ PSD = _attachmentFileTypes["default"].PSD,
49
+ CSS = _attachmentFileTypes["default"].CSS,
50
+ TEXT = _attachmentFileTypes["default"].TEXT,
51
+ PLAIN = _attachmentFileTypes["default"].PLAIN,
52
+ XLS = _attachmentFileTypes["default"].XLS,
53
+ PPT = _attachmentFileTypes["default"].PPT,
54
+ ZIP = _attachmentFileTypes["default"].ZIP,
55
+ UNDEFINED = _attachmentFileTypes["default"].UNDEFINED,
56
+ INVALID = _attachmentFileTypes["default"].INVALID;
57
+
58
+ function getAttachmentIconComponent(_ref) {
59
+ var _iconMapping;
60
+
61
+ var fileFormat = _ref.fileFormat,
62
+ mediaType = _ref.mediaType,
63
+ isValidAttachment = _ref.isValidAttachment;
64
+ var iconMapping = (_iconMapping = {}, _defineProperty(_iconMapping, SVG, _Code["default"]), _defineProperty(_iconMapping, IMAGE, _Image["default"]), _defineProperty(_iconMapping, PDF, _Pdf["default"]), _defineProperty(_iconMapping, AUDIO, _Audio["default"]), _defineProperty(_iconMapping, VIDEO, _Video["default"]), _defineProperty(_iconMapping, MP3, _Audio["default"]), _defineProperty(_iconMapping, MPEG, _Audio["default"]), _defineProperty(_iconMapping, VORBIS, _Audio["default"]), _defineProperty(_iconMapping, OGG, _Audio["default"]), _defineProperty(_iconMapping, M4A, _Audio["default"]), _defineProperty(_iconMapping, MP4, _Video["default"]), _defineProperty(_iconMapping, HTML, _Code["default"]), _defineProperty(_iconMapping, PSD, _Unknown["default"]), _defineProperty(_iconMapping, CSS, _Code["default"]), _defineProperty(_iconMapping, TEXT, _Text["default"]), _defineProperty(_iconMapping, PLAIN, _Text["default"]), _defineProperty(_iconMapping, XLS, _Xls["default"]), _defineProperty(_iconMapping, PPT, _Ppt["default"]), _defineProperty(_iconMapping, ZIP, _Zip["default"]), _defineProperty(_iconMapping, UNDEFINED, _Unknown["default"]), _defineProperty(_iconMapping, INVALID, _AlertTriangle["default"]), _iconMapping);
65
+ var IconComponent;
66
+
67
+ if (!isValidAttachment) {
68
+ IconComponent = iconMapping[INVALID];
69
+ } else if (_attachmentFileTypes["default"][mediaType]) {
70
+ IconComponent = iconMapping[_attachmentFileTypes["default"][mediaType]];
71
+ } else {
72
+ IconComponent = iconMapping[fileFormat] || iconMapping[UNDEFINED];
73
+ }
74
+
75
+ return {
76
+ IconComponent: IconComponent
77
+ };
78
+ }