@zohoim/chat-components 0.0.13 → 0.0.15

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 (387) hide show
  1. package/es/ActionIcon/ActionIcon.js +57 -35
  2. package/es/ActionIcon/css/ActionIcon.module.css +4 -23
  3. package/es/ActionIcon/props/defaultProps.js +4 -2
  4. package/es/ActionIcon/props/propTypes.js +10 -3
  5. package/es/ActionIconWrapper/ActionIconWrapper.js +57 -0
  6. package/es/ActionIconWrapper/css/ActionIconWrapper.module.css +32 -0
  7. package/es/ActionIconWrapper/css/cssJSLogic.js +14 -0
  8. package/es/ActionIconWrapper/index.js +1 -0
  9. package/es/{im/IMDateTime → ActionIconWrapper}/props/defaultProps.js +3 -3
  10. package/es/ActionIconWrapper/props/propTypes.js +11 -0
  11. package/es/AttachmentBubble/AttachmentBubble.js +30 -29
  12. package/es/AttachmentBubble/css/AttachmentBubble.module.css +17 -15
  13. package/es/AttachmentBubble/props/defaultProps.js +2 -2
  14. package/es/AttachmentBubble/props/propTypes.js +10 -5
  15. package/es/AttachmentBubbleInfo/AttachmentBubbleInfo.js +13 -21
  16. package/es/AttachmentBubbleInfo/css/AttachmentBubbleInfo.module.css +19 -16
  17. package/es/AttachmentBubbleInfo/props/defaultProps.js +1 -1
  18. package/es/AttachmentBubbleInfo/props/propTypes.js +3 -3
  19. package/es/AttachmentIcon/AttachmentIcon.js +47 -0
  20. package/es/AttachmentIcon/css/AttachmentIcon.module.css +4 -0
  21. package/es/AttachmentIcon/index.js +1 -0
  22. package/es/{MediaControls → AttachmentIcon}/props/defaultProps.js +3 -3
  23. package/es/AttachmentIcon/props/propTypes.js +11 -0
  24. package/es/AttachmentIcon/utils/getAttachmentIconComponent.js +61 -0
  25. package/es/Audio/Audio.js +14 -36
  26. package/es/Audio/css/Audio.module.css +3 -3
  27. package/es/Audio/props/defaultProps.js +2 -3
  28. package/es/Audio/props/propTypes.js +3 -4
  29. package/es/AudioBubble/AudioBubble.js +32 -36
  30. package/es/AudioBubble/css/AudioBubble.module.css +3 -2
  31. package/es/AudioBubble/props/defaultProps.js +2 -3
  32. package/es/AudioBubble/props/propTypes.js +10 -7
  33. package/es/Fonts/puviFont.module.css +55 -54
  34. package/es/ImageBubble/ImageBubble.js +20 -20
  35. package/es/ImageBubble/css/ImageBubble.module.css +8 -11
  36. package/es/ImageBubble/props/defaultProps.js +1 -1
  37. package/es/ImageBubble/props/propTypes.js +5 -3
  38. package/es/InfoBubble/InfoBubble.js +6 -8
  39. package/es/InfoBubble/props/defaultProps.js +1 -1
  40. package/es/LazyLoadImage/LazyLoadImage.js +6 -16
  41. package/es/LazyLoadImage/css/LazyLoadImage.module.css +1 -0
  42. package/es/LazyLoadImage/props/defaultProps.js +1 -1
  43. package/es/LazyLoadImage/props/propTypes.js +3 -3
  44. package/es/LocationBubble/LocationBubble.js +17 -34
  45. package/es/LocationBubble/css/LocationBubble.module.css +13 -14
  46. package/es/LocationBubble/props/defaultProps.js +1 -1
  47. package/es/LocationBubble/props/propTypes.js +2 -2
  48. package/es/MediaBubbleWrapper/MediaBubbleWrapper.js +59 -0
  49. package/es/MediaBubbleWrapper/css/MediaBubbleWrapper.module.css +7 -0
  50. package/es/MediaBubbleWrapper/index.js +1 -0
  51. package/es/MediaBubbleWrapper/props/defaultProps.js +7 -0
  52. package/es/MediaBubbleWrapper/props/propTypes.js +16 -0
  53. package/es/Message/Message.js +59 -37
  54. package/es/Message/props/defaultProps.js +3 -3
  55. package/es/Message/props/propTypes.js +17 -38
  56. package/es/MessageAction/MessageAction.js +31 -18
  57. package/es/MessageAction/props/defaultProps.js +4 -4
  58. package/es/MessageAction/props/propTypes.js +11 -8
  59. package/es/MessageActions/MessageActions.js +56 -96
  60. package/es/MessageActions/css/MessageActions.module.css +2 -9
  61. package/es/MessageActions/props/defaultProps.js +2 -4
  62. package/es/MessageActions/props/propTypes.js +13 -19
  63. package/es/MessageActionsMore/MessageActionsMore.js +43 -35
  64. package/es/MessageActionsMore/css/MessageActionsMore.module.css +8 -5
  65. package/es/MessageActionsMore/props/defaultProps.js +3 -2
  66. package/es/MessageActionsMore/props/propTypes.js +3 -2
  67. package/es/MessageActionsWrapper/MessageActionsWrapper.js +36 -44
  68. package/es/MessageActionsWrapper/css/MessageActionsWrapper.module.css +1 -1
  69. package/es/MessageActionsWrapper/props/defaultProps.js +4 -5
  70. package/es/MessageActionsWrapper/props/propTypes.js +7 -4
  71. package/es/MessageAvatar/MessageAvatar.js +11 -19
  72. package/es/MessageAvatar/css/MessageAvatar.module.css +3 -3
  73. package/es/MessageAvatar/props/defaultProps.js +2 -6
  74. package/es/MessageAvatar/props/propTypes.js +5 -5
  75. package/es/MessageBox/MessageBox.js +33 -30
  76. package/es/MessageBox/css/MessageBox.module.css +9 -16
  77. package/es/MessageBox/css/cssJSLogic.js +1 -21
  78. package/es/MessageBox/props/defaultProps.js +1 -3
  79. package/es/MessageBox/props/propTypes.js +8 -7
  80. package/es/MessageBubble/MessageBubble.js +64 -38
  81. package/es/MessageBubble/css/MessageBubble.module.css +11 -8
  82. package/es/MessageBubble/css/cssJSLogic.js +10 -26
  83. package/es/MessageBubble/props/defaultProps.js +1 -1
  84. package/es/MessageBubble/props/propTypes.js +7 -7
  85. package/es/MessageStatus/MessageStatus.js +11 -11
  86. package/es/MessageStatus/css/MessageStatus.module.css +1 -1
  87. package/es/MessageStatus/css/cssJSLogic.js +13 -9
  88. package/es/MessageStatus/props/defaultProps.js +1 -1
  89. package/es/MessageStatus/props/propTypes.js +4 -14
  90. package/es/MoreActionItem/MoreActionItem.js +21 -33
  91. package/es/MoreActionItem/css/MoreActionItem.module.css +6 -14
  92. package/es/MoreActionItem/props/defaultProps.js +1 -5
  93. package/es/MoreActionItem/props/propTypes.js +6 -5
  94. package/es/ReplyBubble/ReplyBubble.js +58 -28
  95. package/es/ReplyBubble/css/ReplyBubble.module.css +17 -0
  96. package/es/ReplyBubble/props/defaultProps.js +3 -4
  97. package/es/ReplyBubble/props/propTypes.js +15 -8
  98. package/es/ReplyBubbleContent/ReplyBubbleContent.js +15 -25
  99. package/es/ReplyBubbleContent/css/ReplyBubbleContent.module.css +35 -38
  100. package/es/ReplyBubbleContent/props/defaultProps.js +1 -1
  101. package/es/ReplyBubbleContent/props/propTypes.js +4 -4
  102. package/es/ReplyBubbleHeader/ReplyBubbleHeader.js +27 -33
  103. package/es/ReplyBubbleHeader/css/ReplyBubbleHeader.module.css +25 -9
  104. package/es/ReplyBubbleHeader/props/defaultProps.js +2 -4
  105. package/es/ReplyBubbleHeader/props/propTypes.js +3 -2
  106. package/es/TextBubble/TextBubble.js +12 -30
  107. package/es/TextBubble/css/TextBubble.module.css +15 -9
  108. package/es/TextBubble/props/defaultProps.js +2 -5
  109. package/es/TextBubble/props/propTypes.js +3 -4
  110. package/es/Theme/{DeskAssets.js → ThemeAssets.js} +10 -6
  111. package/es/Theme/ThemeWrapper.js +54 -57
  112. package/es/Theme/{ToolttipWrapper.js → TooltipWrapper.js} +29 -25
  113. package/es/Theme/constants/index.js +1 -4
  114. package/es/Theme/crm/dark/blueFanTheme.js +5 -5
  115. package/es/Theme/crm/dark/blueTheme.js +5 -5
  116. package/es/Theme/crm/dark/commonColorVariable.js +5 -5
  117. package/es/Theme/crm/dark/darkBlueTheme.js +5 -5
  118. package/es/Theme/crm/dark/darkGreyTheme.js +5 -5
  119. package/es/Theme/crm/dark/greenTheme.js +5 -5
  120. package/es/Theme/crm/dark/orangeTheme.js +5 -5
  121. package/es/Theme/crm/dark/pinkTheme.js +5 -5
  122. package/es/Theme/crm/dark/tealTheme.js +5 -5
  123. package/es/Theme/crm/dark/whiteTheme.js +5 -5
  124. package/es/Theme/crm/light/blueFanTheme.js +5 -5
  125. package/es/Theme/crm/light/blueTheme.js +3 -3
  126. package/es/Theme/crm/light/commonColorVariable.js +3 -3
  127. package/es/Theme/crm/light/darkBlueTheme.js +5 -5
  128. package/es/Theme/crm/light/darkGreyTheme.js +5 -5
  129. package/es/Theme/crm/light/greenTheme.js +3 -3
  130. package/es/Theme/crm/light/orangeTheme.js +3 -3
  131. package/es/Theme/crm/light/pinkTheme.js +3 -3
  132. package/es/Theme/crm/light/tealTheme.js +3 -3
  133. package/es/Theme/crm/light/whiteTheme.js +5 -5
  134. package/es/Theme/crm/pureDark/blueFanTheme.js +5 -5
  135. package/es/Theme/crm/pureDark/blueTheme.js +5 -5
  136. package/es/Theme/crm/pureDark/commonColorVariable.js +3 -3
  137. package/es/Theme/crm/pureDark/darkBlueTheme.js +5 -5
  138. package/es/Theme/crm/pureDark/darkGreyTheme.js +5 -5
  139. package/es/Theme/crm/pureDark/greenTheme.js +5 -5
  140. package/es/Theme/crm/pureDark/orangeTheme.js +5 -5
  141. package/es/Theme/crm/pureDark/pinkTheme.js +5 -5
  142. package/es/Theme/crm/pureDark/tealTheme.js +5 -5
  143. package/es/Theme/crm/pureDark/whiteTheme.js +5 -5
  144. package/es/Theme/css/TooltipWrapper.module.css +2 -2
  145. package/es/Theme/props/defaultProps.js +2 -3
  146. package/es/Theme/props/propTypes.js +5 -6
  147. package/es/Theme/{desk/commonDeskColorVariable.js → themeVariables/commonThemeColorVariable.js} +2 -3
  148. package/es/Theme/{desk → themeVariables}/dark/blueTheme.js +11 -11
  149. package/es/Theme/{desk → themeVariables}/dark/commonColorVariable.js +1 -1
  150. package/es/Theme/{desk → themeVariables}/dark/greenTheme.js +8 -8
  151. package/es/Theme/{desk → themeVariables}/dark/orangeTheme.js +8 -8
  152. package/es/Theme/{desk → themeVariables}/dark/redTheme.js +8 -8
  153. package/es/Theme/{desk → themeVariables}/dark/yellowTheme.js +8 -8
  154. package/es/Theme/{desk → themeVariables}/light/blueTheme.js +8 -8
  155. package/es/Theme/{desk → themeVariables}/light/commonColorVariable.js +1 -1
  156. package/es/Theme/{desk → themeVariables}/light/greenTheme.js +8 -8
  157. package/es/Theme/{desk → themeVariables}/light/orangeTheme.js +7 -7
  158. package/es/Theme/{desk → themeVariables}/light/redTheme.js +7 -7
  159. package/es/Theme/{desk → themeVariables}/light/yellowTheme.js +8 -8
  160. package/es/Theme/{desk → themeVariables}/pureDark/blueTheme.js +8 -8
  161. package/es/Theme/{desk → themeVariables}/pureDark/commonColorVariable.js +1 -1
  162. package/es/Theme/{desk → themeVariables}/pureDark/greenTheme.js +8 -8
  163. package/es/Theme/{desk → themeVariables}/pureDark/orangeTheme.js +8 -8
  164. package/es/Theme/{desk → themeVariables}/pureDark/redTheme.js +8 -8
  165. package/es/Theme/{desk → themeVariables}/pureDark/yellowTheme.js +8 -8
  166. package/es/Theme/utils/combineConfigurations.js +17 -0
  167. package/es/Theme/utils/flatVariables.js +12 -0
  168. package/es/Theme/utils/getCustomizedCssVariables.js +19 -0
  169. package/es/Theme/utils/getThemeConfigurations.js +47 -175
  170. package/es/Theme/utils/getWrapperDivProps.js +12 -0
  171. package/es/Video/Video.js +13 -45
  172. package/es/Video/css/Video.module.css +2 -7
  173. package/es/Video/props/defaultProps.js +2 -3
  174. package/es/Video/props/propTypes.js +3 -4
  175. package/es/VideoBubble/VideoBubble.js +32 -35
  176. package/es/VideoBubble/css/VideoBubble.module.css +4 -4
  177. package/es/VideoBubble/props/defaultProps.js +2 -3
  178. package/es/VideoBubble/props/propTypes.js +11 -7
  179. package/es/css/common.module.css +6 -0
  180. package/es/icons/create-icon-components.js +30 -0
  181. package/es/icons/factory/common/article.svg +4 -4
  182. package/es/icons/factory/integrations/chInstagram.svg +2 -2
  183. package/es/icons/factory/integrations/chWhatsApp.svg +2 -2
  184. package/es/icons/factory/integrations/ttASAP.svg +6 -1
  185. package/es/icons/factory/integrations/ttLine.svg +8 -0
  186. package/es/icons/factory/integrations/ttTelegram.svg +4 -1
  187. package/es/icons/factory/integrations/ttTwillio.svg +8 -1
  188. package/es/icons/factory/integrations/ttWechat.svg +9 -1
  189. package/es/icons/icon.template.js +9 -8
  190. package/es/icons/iconSrc/common/Article.js +2 -3
  191. package/es/icons/iconSrc/common/index.js +1 -2
  192. package/es/icons/iconSrc/integrations/ChInstagram.js +2 -3
  193. package/es/icons/iconSrc/integrations/ChWhatsApp.js +2 -3
  194. package/es/icons/iconSrc/integrations/TtASAP.js +11 -15
  195. package/es/icons/iconSrc/integrations/{TtTwitter.js → TtLine.js} +14 -18
  196. package/es/icons/iconSrc/integrations/TtTelegram.js +8 -12
  197. package/es/icons/iconSrc/integrations/TtTwillio.js +15 -19
  198. package/es/icons/iconSrc/integrations/TtWechat.js +19 -20
  199. package/es/icons/iconSrc/integrations/index.js +1 -1
  200. package/es/im/ArticleBubble/ArticleBubble.js +67 -0
  201. package/es/im/ArticleBubble/css/ArticleBubble.module.css +57 -0
  202. package/es/{ArticleBubble → im/ArticleBubble}/props/defaultProps.js +1 -1
  203. package/es/im/ArticleBubble/props/propTypes.js +13 -0
  204. package/es/im/IMAutoMessageInfo/IMAutoMessageInfo.js +10 -20
  205. package/es/im/IMAutoMessageInfo/css/IMAutoMessageInfo.module.css +2 -3
  206. package/es/im/IMAutoMessageInfo/props/defaultProps.js +1 -1
  207. package/es/im/IMAutoMessageInfo/props/propTypes.js +11 -9
  208. package/es/im/IMInfoBubble/IMInfoBubble.js +6 -8
  209. package/es/im/IMInfoBubble/props/defaultProps.js +1 -1
  210. package/es/im/IMIntegrationIcon/IMIntegrationIcon.js +31 -38
  211. package/es/im/IMIntegrationIcon/css/IMIntegrationIcon.module.css +5 -8
  212. package/es/im/IMIntegrationIcon/css/cssJSLogic.js +9 -13
  213. package/es/im/IMIntegrationIcon/index.js +1 -2
  214. package/es/im/IMIntegrationIcon/props/defaultProps.js +6 -4
  215. package/es/im/IMIntegrationIcon/props/propTypes.js +6 -17
  216. package/es/im/IMMessage/IMMessage.js +97 -90
  217. package/es/im/IMMessage/css/IMMessage.module.css +36 -0
  218. package/es/im/IMMessage/css/cssJSLogic.js +16 -3
  219. package/es/im/IMMessage/props/defaultProps.js +3 -11
  220. package/es/im/IMMessage/props/propTypes.js +52 -97
  221. package/es/im/IMMessageContent/IMMessageContent.js +76 -65
  222. package/es/im/IMMessageContent/css/IMMessageContent.module.css +1 -1
  223. package/es/im/IMMessageContent/props/defaultProps.js +2 -3
  224. package/es/im/IMMessageContent/props/propTypes.js +29 -23
  225. package/es/im/IMMessageMeta/IMMessageMeta.js +26 -21
  226. package/es/im/IMMessageMeta/css/IMMessageMeta.module.css +13 -4
  227. package/es/im/IMMessageMeta/css/cssJSLogic.js +11 -3
  228. package/es/im/IMMessageMeta/props/defaultProps.js +1 -1
  229. package/es/im/IMMessageMeta/props/propTypes.js +17 -12
  230. package/es/im/IMPermaLink/IMPermaLink.js +48 -0
  231. package/es/im/IMPermaLink/css/IMPermaLink.module.css +14 -0
  232. package/es/im/{IMTicketLink → IMPermaLink}/css/cssJSLogic.js +3 -3
  233. package/es/im/IMPermaLink/index.js +1 -0
  234. package/es/im/{IMAttachmentIcon → IMPermaLink}/props/defaultProps.js +3 -3
  235. package/es/im/IMPermaLink/props/propTypes.js +11 -0
  236. package/es/im/IMReplyBubble/IMReplyBubble.js +20 -59
  237. package/es/im/IMReplyBubble/props/defaultProps.js +2 -4
  238. package/es/im/IMReplyBubble/props/propTypes.js +16 -14
  239. package/es/im/IMTextBubble/IMTextBubble.js +15 -31
  240. package/es/im/IMTextBubble/props/defaultProps.js +3 -9
  241. package/es/im/IMTextBubble/props/propTypes.js +22 -8
  242. package/es/im/css/common.module.css +6 -0
  243. package/es/im/index.js +2 -10
  244. package/es/index.js +4 -6
  245. package/package.json +32 -14
  246. package/es/ActionIcon/css/cssJSLogic.js +0 -10
  247. package/es/ArticleBubble/ArticleBubble.js +0 -70
  248. package/es/ArticleBubble/css/ArticleBubble.module.css +0 -48
  249. package/es/ArticleBubble/css/cssJSLogic.js +0 -34
  250. package/es/ArticleBubble/props/propTypes.js +0 -10
  251. package/es/AttachmentBubble/css/cssJSLogic.js +0 -18
  252. package/es/AttachmentBubbleInfo/css/cssJSLogic.js +0 -18
  253. package/es/Audio/css/cssJSLogic.js +0 -14
  254. package/es/AudioBubble/css/cssJSLogic.js +0 -20
  255. package/es/ImageBubble/css/cssJSLogic.js +0 -22
  256. package/es/LazyLoadImage/css/cssJSLogic.js +0 -10
  257. package/es/LocationBubble/css/cssJSLogic.js +0 -30
  258. package/es/MediaControls/MediaControls.js +0 -59
  259. package/es/MediaControls/css/MediaControls.module.css +0 -1
  260. package/es/MediaControls/css/cssJSLogic.js +0 -22
  261. package/es/MediaControls/index.js +0 -1
  262. package/es/MediaControls/props/propTypes.js +0 -11
  263. package/es/Message/css/Message.module.css +0 -0
  264. package/es/Message/css/cssJSLogic.js +0 -10
  265. package/es/MessageAction/css/MessageAction.module.css +0 -0
  266. package/es/MessageAction/css/cssJSLogic.js +0 -0
  267. package/es/MessageActions/css/cssJSLogic.js +0 -20
  268. package/es/MessageActionsMore/css/cssJSLogic.js +0 -28
  269. package/es/MessageActionsWrapper/css/cssJSLogic.js +0 -10
  270. package/es/MessageActionsWrapper/props/propConstants.js +0 -7
  271. package/es/MessageAvatar/css/cssJSLogic.js +0 -18
  272. package/es/MessageBubble/props/propConstants.js +0 -6
  273. package/es/MoreActionItem/css/cssJSLogic.js +0 -27
  274. package/es/ReplyBubble/css/cssJSLogic.js +0 -10
  275. package/es/ReplyBubbleContent/css/cssJSLogic.js +0 -22
  276. package/es/ReplyBubbleHeader/css/cssJSLogic.js +0 -18
  277. package/es/TextBubble/css/cssJSLogic.js +0 -18
  278. package/es/Theme/css/cssJSLogic.js +0 -14
  279. package/es/Video/css/cssJSLogic.js +0 -14
  280. package/es/VideoBubble/css/cssJSLogic.js +0 -10
  281. package/es/icons/factory/actions/convertTicket.svg +0 -21
  282. package/es/icons/factory/common/quote.svg +0 -1
  283. package/es/icons/factory/integrations/ttTwitter.svg +0 -1
  284. package/es/icons/iconSrc/actions/ConvertTicket.js +0 -25
  285. package/es/icons/iconSrc/actions/index.js +0 -1
  286. package/es/icons/iconSrc/common/Quote.js +0 -17
  287. package/es/im/IMArticleBubble/IMArticleBubble.js +0 -54
  288. package/es/im/IMArticleBubble/css/IMArticleBubble.module.css +0 -0
  289. package/es/im/IMArticleBubble/css/cssJSLogic.js +0 -10
  290. package/es/im/IMArticleBubble/index.js +0 -1
  291. package/es/im/IMArticleBubble/props/defaultProps.js +0 -8
  292. package/es/im/IMArticleBubble/props/propTypes.js +0 -14
  293. package/es/im/IMAttachmentBubble/IMAttachmentBubble.js +0 -62
  294. package/es/im/IMAttachmentBubble/css/IMAttachmentBubble.module.css +0 -1
  295. package/es/im/IMAttachmentBubble/css/cssJSLogic.js +0 -10
  296. package/es/im/IMAttachmentBubble/index.js +0 -1
  297. package/es/im/IMAttachmentBubble/props/defaultProps.js +0 -10
  298. package/es/im/IMAttachmentBubble/props/propTypes.js +0 -16
  299. package/es/im/IMAttachmentIcon/IMAttachmentIcon.js +0 -85
  300. package/es/im/IMAttachmentIcon/css/IMAttachmentIcon.module.css +0 -4
  301. package/es/im/IMAttachmentIcon/css/cssJSLogic.js +0 -16
  302. package/es/im/IMAttachmentIcon/index.js +0 -1
  303. package/es/im/IMAttachmentIcon/props/propTypes.js +0 -26
  304. package/es/im/IMAudioBubble/IMAudioBubble.js +0 -62
  305. package/es/im/IMAudioBubble/css/IMAudioBubble.module.css +0 -8
  306. package/es/im/IMAudioBubble/css/cssJSLogic.js +0 -20
  307. package/es/im/IMAudioBubble/index.js +0 -1
  308. package/es/im/IMAudioBubble/props/defaultProps.js +0 -11
  309. package/es/im/IMAudioBubble/props/propTypes.js +0 -17
  310. package/es/im/IMAutoMessageInfo/css/cssJSLogic.js +0 -10
  311. package/es/im/IMDateTime/IMDateTime.js +0 -40
  312. package/es/im/IMDateTime/css/IMDateTime.module.css +0 -10
  313. package/es/im/IMDateTime/css/cssJSLogic.js +0 -10
  314. package/es/im/IMDateTime/index.js +0 -1
  315. package/es/im/IMDateTime/props/propTypes.js +0 -6
  316. package/es/im/IMImageBubble/IMImageBubble.js +0 -50
  317. package/es/im/IMImageBubble/css/IMImageBubble.module.css +0 -0
  318. package/es/im/IMImageBubble/css/cssJSLogic.js +0 -10
  319. package/es/im/IMImageBubble/index.js +0 -1
  320. package/es/im/IMImageBubble/props/defaultProps.js +0 -7
  321. package/es/im/IMImageBubble/props/propTypes.js +0 -13
  322. package/es/im/IMIntegrationIcon/props/propConstants.js +0 -8
  323. package/es/im/IMLocationBubble/IMLocationBubble.js +0 -50
  324. package/es/im/IMLocationBubble/css/IMLocationBubble.module.css +0 -0
  325. package/es/im/IMLocationBubble/css/cssJSLogic.js +0 -10
  326. package/es/im/IMLocationBubble/index.js +0 -1
  327. package/es/im/IMLocationBubble/props/defaultProps.js +0 -8
  328. package/es/im/IMLocationBubble/props/propTypes.js +0 -11
  329. package/es/im/IMMessageAvatar/IMMessageAvatar.js +0 -45
  330. package/es/im/IMMessageAvatar/css/IMMessageAvatar.module.css +0 -0
  331. package/es/im/IMMessageAvatar/css/cssJSLogic.js +0 -0
  332. package/es/im/IMMessageAvatar/index.js +0 -1
  333. package/es/im/IMMessageAvatar/props/defaultProps.js +0 -12
  334. package/es/im/IMMessageAvatar/props/propTypes.js +0 -53
  335. package/es/im/IMMessageContent/css/cssJSLogic.js +0 -10
  336. package/es/im/IMReplyBubble/css/IMReplyBubble.module.css +0 -18
  337. package/es/im/IMReplyBubble/css/cssJSLogic.js +0 -10
  338. package/es/im/IMTextBubble/css/IMTextBubble.module.css +0 -1
  339. package/es/im/IMTextBubble/css/cssJSLogic.js +0 -10
  340. package/es/im/IMTicketLink/IMTicketLink.js +0 -46
  341. package/es/im/IMTicketLink/css/IMTicketLink.module.css +0 -27
  342. package/es/im/IMTicketLink/index.js +0 -1
  343. package/es/im/IMTicketLink/props/defaultProps.js +0 -6
  344. package/es/im/IMTicketLink/props/propTypes.js +0 -10
  345. package/es/im/IMVideoBubble/IMVideoBubble.js +0 -61
  346. package/es/im/IMVideoBubble/css/IMVideoBubble.module.css +0 -1
  347. package/es/im/IMVideoBubble/css/cssJSLogic.js +0 -10
  348. package/es/im/IMVideoBubble/index.js +0 -1
  349. package/es/im/IMVideoBubble/props/defaultProps.js +0 -11
  350. package/es/im/IMVideoBubble/props/propTypes.js +0 -17
  351. package/es/unused/AvatarSpace/AvatarSpace.js +0 -40
  352. package/es/unused/AvatarSpace/css/AvatarSpace.module.css +0 -1
  353. package/es/unused/AvatarSpace/css/cssJSLogic.js +0 -15
  354. package/es/unused/AvatarSpace/index.js +0 -1
  355. package/es/unused/AvatarSpace/props/defaultProps.js +0 -10
  356. package/es/unused/AvatarSpace/props/propConstants.js +0 -7
  357. package/es/unused/AvatarSpace/props/propTypes.js +0 -8
  358. package/es/unused/MessageBoxFooter/MessageBoxFooter.js +0 -39
  359. package/es/unused/MessageBoxFooter/css/MessageBoxFooter.module.css +0 -3
  360. package/es/unused/MessageBoxFooter/css/cssJSLogic.js +0 -10
  361. package/es/unused/MessageBoxFooter/index.js +0 -1
  362. package/es/unused/MessageBoxFooter/props/defaultProps.js +0 -5
  363. package/es/unused/MessageBoxFooter/props/propTypes.js +0 -6
  364. package/es/unused/MessageBoxHeader/MessageBoxHeader.js +0 -7
  365. package/es/unused/MessageBoxHeader/css/MessageBoxHeader.module.css +0 -0
  366. package/es/unused/MessageBoxHeader/css/cssJsLogic.js +0 -0
  367. package/es/unused/MessageBoxHeader/index.js +0 -2
  368. package/es/unused/MessageBoxHeader/props/defaultProps.js +0 -0
  369. package/es/unused/MessageBoxHeader/props/propTypes.js +0 -0
  370. package/es/unused/MessageWrapper/MessageWrapper.js +0 -36
  371. package/es/unused/MessageWrapper/css/MessageWrapper.module.css +0 -0
  372. package/es/unused/MessageWrapper/css/cssJSLogic.js +0 -10
  373. package/es/unused/MessageWrapper/index.js +0 -1
  374. package/es/unused/MessageWrapper/props/defaultProps.js +0 -6
  375. package/es/unused/MessageWrapper/props/propTypes.js +0 -6
  376. package/es/unused/TextMessage/DefaultActions.js +0 -60
  377. package/es/unused/TextMessage/TextMessage.js +0 -67
  378. package/es/unused/TextMessage/TextMessage1.js +0 -66
  379. package/es/unused/TextMessage/css/TextMessage.module.css +0 -5
  380. package/es/unused/TextMessage/css/cssJSLogic.js +0 -0
  381. package/es/unused/TextMessage/index.js +0 -1
  382. package/es/unused/TextMessage/props/defaultProps.js +0 -4
  383. package/es/unused/TextMessage/props/propConstants.js +0 -3
  384. package/es/unused/TextMessage/props/propTypes.js +0 -17
  385. package/es/unused/darkTheme.js +0 -9
  386. package/es/unused/defaultTheme.js +0 -33
  387. /package/es/{ArticleBubble → im/ArticleBubble}/index.js +0 -0
@@ -1,21 +1,15 @@
1
- /* eslint-disable react/jsx-no-bind */
2
- /* eslint-disable max-len */
3
-
4
1
  /** ** Libraries *** */
5
2
  import React from 'react';
6
-
7
3
  /** ** Hooks *** */
4
+
8
5
  import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
9
6
  import useLazyLoadImage from '@zohoim/chat-components-hooks/es/ImageBubble/useLazyLoadImage';
10
-
11
7
  /** ** Constants *** */
8
+
12
9
  import lazyLoadImageDefaultProps from './props/defaultProps';
13
10
  import lazyLoadImagePropTypes from './props/propTypes';
14
-
15
- /** ** Methods *** */
16
- import cssJSLogic from './css/cssJSLogic';
17
-
18
11
  /** ** Styles *** */
12
+
19
13
  import style from './css/LazyLoadImage.module.css';
20
14
  export default function LazyLoadImage(props) {
21
15
  const {
@@ -26,19 +20,15 @@ export default function LazyLoadImage(props) {
26
20
  const {
27
21
  imageElementRef
28
22
  } = useLazyLoadImage();
23
+ /* External CSS Customization */
29
24
 
30
- /* External customization */
31
25
  const newStyle = useMergeStyle(style, customStyle);
32
- /* CSS classnames added based on logic */
33
- const {
34
- lazyLoadImageClass
35
- } = cssJSLogic(props, newStyle);
36
26
  return /*#__PURE__*/React.createElement("img", {
27
+ ref: imageElementRef,
37
28
  alt: alternate,
38
- className: `lazy ${lazyLoadImageClass || ''}`,
29
+ className: `lazy ${newStyle.lazyLoadImage || ''}`,
39
30
  "data-src": src,
40
31
  "data-srcset": src,
41
- ref: imageElementRef,
42
32
  src: ""
43
33
  });
44
34
  }
@@ -1,4 +1,5 @@
1
1
  .lazyLoadImage {
2
2
  /* height: 100%;
3
3
  width: 100%; */
4
+ /* Use this class name for css customisation */
4
5
  }
@@ -1,5 +1,5 @@
1
1
  /** ** Constants *** */
2
- import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
2
+ import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
3
3
  const lazyLoadImageDefaultProps = {
4
4
  customStyle: dummyObject
5
5
  };
@@ -1,8 +1,8 @@
1
1
  /** ** Libraries *** */
2
2
  import PropTypes from 'prop-types';
3
3
  const lazyLoadImagePropTypes = {
4
- customStyle: PropTypes.object,
5
- src: PropTypes.string,
6
- alternate: PropTypes.string
4
+ src: PropTypes.string.isRequired,
5
+ alternate: PropTypes.string,
6
+ customStyle: PropTypes.object
7
7
  };
8
8
  export default lazyLoadImagePropTypes;
@@ -1,66 +1,49 @@
1
- /* eslint-disable @zohodesk/zsecurity/no-protocol-check */
2
- /* eslint-disable react/jsx-no-bind */
3
- /* eslint-disable max-len */
4
-
5
1
  /** ** Libraries *** */
6
2
  import React from 'react';
7
-
8
3
  /** ** Hooks *** */
9
- import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
10
- import useLocationBubble from '@zohoim/chat-components-hooks/es/LocationBubble/useLocationBubble';
11
4
 
5
+ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
12
6
  /** ** Constants *** */
7
+
13
8
  import locationBubbleDefaultProps from './props/defaultProps';
14
9
  import locationBubblePropTypes from './props/propTypes';
10
+ /** ** Components *** */
15
11
 
16
- /** ** Methods *** */
17
- import cssJSLogic from './css/cssJSLogic';
18
12
  import { Container, Box } from '@zohodesk/components/es/Layout';
19
-
20
13
  /** ** Styles *** */
14
+
21
15
  import style from './css/LocationBubble.module.css';
22
16
  export default function LocationBubble(props) {
23
17
  const {
24
- customStyle
18
+ customStyle,
19
+ locationUrl
25
20
  } = props;
26
- const {
27
- locationURL
28
- } = useLocationBubble(props);
21
+ /* External CSS Customization */
29
22
 
30
- /* External customization */
31
23
  const newStyle = useMergeStyle(style, customStyle);
32
- /* CSS classnames added based on logic */
33
- const {
34
- locationBubbleClass,
35
- imageWrapperClass,
36
- imageClass,
37
- imageLinkClass,
38
- textWrapperClass,
39
- textLinkClass
40
- } = cssJSLogic(props, newStyle);
41
24
  return /*#__PURE__*/React.createElement(Container, {
42
25
  align: "vertical",
43
26
  alignBox: "row",
44
- className: locationBubbleClass
27
+ className: newStyle.locationBubble,
28
+ isCover: false
45
29
  }, /*#__PURE__*/React.createElement(Box, {
46
- className: imageWrapperClass,
30
+ className: newStyle.imageWrapper,
47
31
  shrink: true
48
32
  }, /*#__PURE__*/React.createElement("a", {
49
- className: imageLinkClass,
50
- href: locationURL,
33
+ href: locationUrl,
51
34
  rel: "noreferrer noopener",
52
35
  target: "_blank"
53
- }, /*#__PURE__*/React.createElement("div", {
54
- className: imageClass
36
+ }, /*#__PURE__*/React.createElement(Box, {
37
+ className: newStyle.image
55
38
  }))), /*#__PURE__*/React.createElement(Box, {
56
- className: textWrapperClass,
39
+ className: newStyle.textWrapper,
57
40
  flexible: true
58
41
  }, /*#__PURE__*/React.createElement("a", {
59
- className: textLinkClass,
60
- href: locationURL,
42
+ className: newStyle.textLink,
43
+ href: locationUrl,
61
44
  rel: "noreferrer noopener",
62
45
  target: "_blank"
63
- }, locationURL)));
46
+ }, locationUrl)));
64
47
  }
65
48
  LocationBubble.propTypes = locationBubblePropTypes;
66
49
  LocationBubble.defaultProps = locationBubbleDefaultProps;
@@ -1,38 +1,37 @@
1
1
  .imageWrapper {
2
- width: var(--imlib_size_60);
3
- height: var(--imlib_size_60);
2
+ width: var(--zd_size60) ;
3
+ height: var(--zd_size60) ;
4
4
  }
5
5
 
6
6
  .locationBubble {
7
7
  white-space: nowrap;
8
- width: 100%;
8
+ width: 100% ;
9
+ box-sizing: border-box;
9
10
  background-color: var(--imlib_chat_components_locationBubble_bg_color);
10
- border: var(--imlib_size_1) solid var(--imlib_chat_components_locationBubble_border_color);
11
- padding: var(--imlib_size_10);
12
- border-radius: var(--imlib_size_3);
11
+ border: 1px solid var(--imlib_chat_components_locationBubble_border_color);
12
+ padding: var(--zd_size10) ;
13
+ border-radius: 3px;
13
14
  }
14
15
 
15
16
  .image {
16
- width: 100%;
17
- height: 100%;
17
+ width: 100% ;
18
+ height: 100% ;
18
19
  background-image: url('../images/location.png');
19
20
  background-repeat: no-repeat;
20
21
  background-size: cover;
21
- border-radius: var(--imlib_size_3);
22
+ border-radius: 3px;
22
23
  }
23
24
 
24
25
  [dir=ltr] .textWrapper {
25
- margin: 0 0 0 var(--imlib_size_8);
26
+ margin: 0 0 0 var(--zd_size8) ;
26
27
  }
27
28
 
28
29
  [dir=rtl] .textWrapper {
29
- margin: 0 var(--imlib_size_8) 0 0;
30
+ margin: 0 var(--zd_size8) 0 0 ;
30
31
  }
31
32
 
32
33
  .textLink {
33
34
  display: block;
34
- white-space: nowrap;
35
- overflow: hidden;
36
- text-overflow: ellipsis;
35
+ composes: dotted from "../../css/common.module.css";
37
36
  color: var(--imlib_chat_components_locationBubble_color);
38
37
  }
@@ -1,5 +1,5 @@
1
1
  /** ** Constants *** */
2
- import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
2
+ import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
3
3
  const locationBubbleDefaultProps = {
4
4
  customStyle: dummyObject
5
5
  };
@@ -1,7 +1,7 @@
1
1
  /** ** Libraries *** */
2
2
  import PropTypes from 'prop-types';
3
3
  const locationBubblePropTypes = {
4
- customStyle: PropTypes.object,
5
- locationURL: PropTypes.string
4
+ locationUrl: PropTypes.string.isRequired,
5
+ customStyle: PropTypes.object
6
6
  };
7
7
  export default locationBubblePropTypes;
@@ -0,0 +1,59 @@
1
+ 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); }
2
+
3
+ /** ** Libraries *** */
4
+ import React, { useMemo, Fragment } from 'react';
5
+ /** ** Hooks *** */
6
+
7
+ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
8
+ import useAttachmentBubble from '@zohoim/chat-components-hooks/es/AttachmentBubble/useAttachmentBubble';
9
+ /** ** Constants *** */
10
+
11
+ import mediaBubbleWrapperDefaultProps from './props/defaultProps';
12
+ import mediaBubbleWrapperPropTypes from './props/propTypes';
13
+ import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
14
+ /** ** Styles *** */
15
+
16
+ import style from './css/MediaBubbleWrapper.module.css';
17
+ /** ** Methods *** */
18
+
19
+ import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
20
+ /** ** Components *** */
21
+
22
+ import AttachmentBubbleInfo from '../AttachmentBubbleInfo/AttachmentBubbleInfo';
23
+ export default function MediaBubbleWrapper(props) {
24
+ const {
25
+ customStyle,
26
+ mediaDetails,
27
+ customProps,
28
+ renderMedia
29
+ } = props;
30
+ const {
31
+ attachmentBubbleInfoProps = dummyObject
32
+ } = customProps;
33
+ /* External css customization */
34
+
35
+ const newStyle = useMergeStyle(style, customStyle);
36
+ const bubbleInfoCustomStyle = useMemo(() => ({
37
+ attachmentBubbleInfo: newStyle.header
38
+ }), [newStyle.header]);
39
+ const {
40
+ attachmentURL: fileURL,
41
+ formattedFileSize: fileSize,
42
+ fileName,
43
+ attachmentType: fileType
44
+ } = useAttachmentBubble({
45
+ attachmentDetails: mediaDetails
46
+ });
47
+ const mediaComponent = renderHandler(renderMedia)({
48
+ fileURL,
49
+ fileType
50
+ });
51
+ return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(AttachmentBubbleInfo, _extends({
52
+ customStyle: bubbleInfoCustomStyle,
53
+ fileName: fileName,
54
+ fileSize: fileSize
55
+ }, attachmentBubbleInfoProps)), mediaComponent);
56
+ }
57
+ MediaBubbleWrapper.propTypes = mediaBubbleWrapperPropTypes;
58
+ MediaBubbleWrapper.defaultProps = mediaBubbleWrapperDefaultProps;
59
+ MediaBubbleWrapper.displayName = 'MediaBubbleWrapper';
@@ -0,0 +1,7 @@
1
+ .header {
2
+ margin-bottom: var(--zd_size5) ;
3
+ }
4
+
5
+ .audioCont{
6
+ min-width: var(--zd_size300) ;
7
+ }
@@ -0,0 +1 @@
1
+ export { default as MediaBubbleWrapper } from './MediaBubbleWrapper';
@@ -0,0 +1,7 @@
1
+ /** ** Constants *** */
2
+ import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
3
+ const mediaBubbleWrapperDefaultProps = {
4
+ customStyle: dummyObject,
5
+ customProps: dummyObject
6
+ };
7
+ export default mediaBubbleWrapperDefaultProps;
@@ -0,0 +1,16 @@
1
+ /** ** Libraries *** */
2
+ import PropTypes from 'prop-types';
3
+ const mediaBubbleWrapperPropTypes = {
4
+ mediaDetails: PropTypes.shape({
5
+ name: PropTypes.string.isRequired,
6
+ size: PropTypes.string.isRequired,
7
+ type: PropTypes.string.isRequired,
8
+ url: PropTypes.string.isRequired
9
+ }).isRequired,
10
+ renderMedia: PropTypes.func.isRequired,
11
+ customProps: PropTypes.shape({
12
+ attachmentBubbleInfoProps: PropTypes.object
13
+ }),
14
+ customStyle: PropTypes.object
15
+ };
16
+ export default mediaBubbleWrapperPropTypes;
@@ -1,33 +1,31 @@
1
1
  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); }
2
- /* eslint-disable react/jsx-no-bind */
3
- /* eslint-disable max-len */
4
2
 
5
3
  /** ** Libraries *** */
6
- import React from 'react';
7
-
4
+ import React, { useCallback } from 'react';
8
5
  /** ** Constants *** */
6
+
9
7
  import messageDefaultProps from './props/defaultProps';
10
8
  import messagePropTypes from './props/propTypes';
11
- import { direction as directionConstants } from '@zohoim/chat-components-utils/es/constants/messageConstants';
12
- import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
13
- import messageStatusConstants from '@zohoim/chat-components-utils/es/constants/messageStatusConstants';
14
-
9
+ import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
15
10
  /** ** Components *** */
11
+
16
12
  import MessageBubble from '../MessageBubble/MessageBubble';
17
13
  import MessageBox from '../MessageBox/MessageBox';
18
14
  import MessageAvatar from '../MessageAvatar/MessageAvatar';
19
15
  import MessageActions from '../MessageActions/MessageActions';
20
16
  import MessageStatus from '../MessageStatus/MessageStatus';
21
- const {
22
- FAILED
23
- } = messageStatusConstants;
17
+ /** ** Methods *** */
18
+
19
+ import getMessageStatus from '@zohoim/chat-components-utils/es/getMessageStatus';
20
+ import getMessageDirectionType from '@zohoim/chat-components-utils/es/getMessageDirectionType';
24
21
  export default function Message(props) {
25
22
  const {
26
23
  direction,
27
24
  isActive,
28
25
  isShowSender,
26
+ needSender,
29
27
  ownerDetails,
30
- renderOwnerOverlay,
28
+ renderOwnerStatusIcon,
31
29
  status,
32
30
  statusTooltip,
33
31
  actions,
@@ -43,31 +41,53 @@ export default function Message(props) {
43
41
  messageStatusProps = dummyObject,
44
42
  messageActionsProps = dummyObject
45
43
  } = customProps;
46
- const isIncoming = direction === directionConstants.IN;
47
- const isOutgoing = direction === directionConstants.OUT;
48
- const isFailed = status === FAILED;
49
- function handleRenderMessageOwner() {
50
- const {
51
- src,
52
- alternateSrc,
53
- name
54
- } = ownerDetails || dummyObject;
55
- const props = {
56
- src,
57
- alternateSrc,
58
- title: name,
59
- renderIcon: renderOwnerOverlay
60
- };
61
- return ownerDetails ? /*#__PURE__*/React.createElement(MessageAvatar, _extends({}, props, messageOwnerProps)) : null;
62
- }
63
- function handleRenderMessageStatus() {
44
+ const {
45
+ isIncoming,
46
+ isOutgoing
47
+ } = getMessageDirectionType({
48
+ messageDetails: {
49
+ direction
50
+ }
51
+ });
52
+ const {
53
+ isFailedMessage: isFailed
54
+ } = getMessageStatus({
55
+ messageDetails: {
56
+ status
57
+ }
58
+ });
59
+ /** ** Render Message Owner *** */
60
+
61
+ const handleRenderMessageOwner = useCallback(() => {
62
+ if (isShowSender) {
63
+ const {
64
+ src,
65
+ alternateSrc,
66
+ name
67
+ } = ownerDetails || dummyObject;
68
+ const props = {
69
+ src,
70
+ alternateSrc,
71
+ title: name,
72
+ renderIcon: renderOwnerStatusIcon
73
+ };
74
+ return /*#__PURE__*/React.createElement(MessageAvatar, _extends({}, props, messageOwnerProps));
75
+ }
76
+
77
+ return null;
78
+ }, [ownerDetails, messageOwnerProps, renderOwnerStatusIcon, isShowSender]);
79
+ /** ** Render Message Status *** */
80
+
81
+ const handleRenderMessageStatus = useCallback(() => {
64
82
  const props = {
65
83
  messageStatus: status,
66
84
  title: statusTooltip
67
85
  };
68
86
  return status ? /*#__PURE__*/React.createElement(MessageStatus, _extends({}, props, messageStatusProps)) : null;
69
- }
70
- function handleRenderMessageBox() {
87
+ }, [status, statusTooltip, messageStatusProps]);
88
+ /** ** Render MessageBox *** */
89
+
90
+ const handleRenderMessageBox = useCallback(() => {
71
91
  const props = {
72
92
  renderMessageStatus: handleRenderMessageStatus,
73
93
  renderMessage: renderContent,
@@ -76,21 +96,23 @@ export default function Message(props) {
76
96
  isOutgoing
77
97
  };
78
98
  return /*#__PURE__*/React.createElement(MessageBox, _extends({}, props, messageBoxProps));
79
- }
80
- function handleRenderMessageActions() {
99
+ }, [handleRenderMessageStatus, renderContent, messageBoxProps, isFailed, isIncoming, isOutgoing]);
100
+ /** ** Render Message Actions *** */
101
+
102
+ const handleRenderMessageActions = useCallback(() => {
81
103
  const props = {
82
104
  actions,
83
105
  onSelect: onSelectAction,
84
106
  renderSecondaryActions
85
107
  };
86
108
  return /*#__PURE__*/React.createElement(MessageActions, _extends({}, props, messageActionsProps));
87
- }
88
- const needMessageActions = !!actions;
109
+ }, [actions, onSelectAction, renderSecondaryActions, messageActionsProps]);
110
+ const needMessageActions = !!actions.length;
89
111
  return /*#__PURE__*/React.createElement(MessageBubble, _extends({
90
112
  direction: direction,
91
113
  isActive: isActive,
92
114
  needMessageActions: needMessageActions,
93
- needSender: isShowSender,
115
+ needSender: needSender,
94
116
  renderMessageActions: handleRenderMessageActions,
95
117
  renderMessageBox: handleRenderMessageBox,
96
118
  renderMessageOwner: handleRenderMessageOwner
@@ -1,11 +1,11 @@
1
1
  /** ** Constants *** */
2
2
  import { direction } from '@zohoim/chat-components-utils/es/constants/messageConstants';
3
+ import { dummyArray, dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
3
4
  const messageDefaultProps = {
4
5
  direction: direction.IN,
5
6
  isActive: false,
6
7
  isShowSender: true,
7
- customProps: {}
8
- // renderContent: () => <div>Test</div>
8
+ customProps: dummyObject,
9
+ actions: dummyArray
9
10
  };
10
-
11
11
  export default messageDefaultProps;
@@ -1,60 +1,39 @@
1
1
  /** ** Libraries *** */
2
2
  import PropTypes from 'prop-types';
3
-
4
3
  /** ** Constants *** */
4
+
5
5
  import { defaultMessageActions } from '@zohoim/chat-components-utils/es/constants/messageActionConstants';
6
6
  import messageStatusConstants from '@zohoim/chat-components-utils/es/constants/messageStatusConstants';
7
7
  import { direction } from '@zohoim/chat-components-utils/es/constants/messageConstants';
8
- const {
9
- REPLY,
10
- COPY,
11
- DOWNLOAD,
12
- CREATE_TICKET,
13
- RESEND,
14
- DELETE,
15
- FORWARD
16
- } = defaultMessageActions;
17
- const {
18
- SENT,
19
- SAVED,
20
- QUEUED,
21
- DELIVERED,
22
- READ,
23
- UNSENT,
24
- FAILED,
25
- OUTGOING
26
- } = messageStatusConstants;
27
- const {
28
- IN,
29
- OUT
30
- } = direction;
31
8
  const messagePropTypes = {
32
- direction: PropTypes.oneOf([IN, OUT]).isRequired,
9
+ direction: PropTypes.oneOf(Object.values(direction)).isRequired,
10
+ renderContent: PropTypes.func.isRequired,
33
11
  isActive: PropTypes.bool,
34
12
  isShowSender: PropTypes.bool,
13
+ needSender: PropTypes.bool,
35
14
  ownerDetails: PropTypes.shape({
36
- src: PropTypes.string,
37
15
  alternateSrc: PropTypes.string,
38
- name: PropTypes.string
16
+ name: PropTypes.string,
17
+ src: PropTypes.string
39
18
  }),
40
- renderOwnerOverlay: PropTypes.func,
41
- status: PropTypes.oneOf([SENT, SAVED, QUEUED, DELIVERED, READ, UNSENT, FAILED, OUTGOING]),
19
+ renderOwnerStatusIcon: PropTypes.func,
20
+ status: PropTypes.oneOf(Object.values(messageStatusConstants)),
42
21
  statusTooltip: PropTypes.string,
43
22
  actions: PropTypes.arrayOf(PropTypes.shape({
44
- id: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf([REPLY, COPY, DOWNLOAD, CREATE_TICKET, RESEND, DELETE, FORWARD])]).isRequired,
45
- displayText: PropTypes.string,
46
- renderFunction: PropTypes.func,
47
- iconTitle: PropTypes.string
23
+ displayText: PropTypes.string.isRequired,
24
+ id: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf(Object.values(defaultMessageActions))]).isRequired,
25
+ iconTitle: PropTypes.string,
26
+ isDisabled: PropTypes.bool,
27
+ renderFunction: PropTypes.func
48
28
  })),
49
- onSelectAction: PropTypes.func,
29
+ onSelectAction: PropTypes.func.isRequired,
50
30
  renderSecondaryActions: PropTypes.func,
51
- renderContent: PropTypes.func.isRequired,
52
31
  customProps: PropTypes.shape({
32
+ messageActionsProps: PropTypes.object,
33
+ messageBoxProps: PropTypes.object,
53
34
  messageBubbleProps: PropTypes.object,
54
35
  messageOwnerProps: PropTypes.object,
55
- messageBoxProps: PropTypes.object,
56
- messageStatusProps: PropTypes.object,
57
- messageActionsProps: PropTypes.object
36
+ messageStatusProps: PropTypes.object
58
37
  })
59
38
  };
60
39
  export default messagePropTypes;
@@ -1,44 +1,57 @@
1
- /* eslint-disable max-len */
1
+ 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); }
2
2
 
3
3
  /** ** Libraries *** */
4
- import React from 'react';
5
-
4
+ import React, { useCallback } from 'react';
6
5
  /** ** Components *** */
6
+
7
7
  import MoreActionItem from '../MoreActionItem/MoreActionItem';
8
8
  import ActionIcon from '../ActionIcon/ActionIcon';
9
-
10
9
  /** ** Constants *** */
10
+
11
11
  import messageActionsDefaultProps from './props/defaultProps';
12
12
  import messageActionsPropTypes from './props/propTypes';
13
+ import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
13
14
  export default function MessageAction(props) {
14
15
  const {
15
16
  displayText,
16
17
  id,
17
- index,
18
- renderIcon,
19
18
  onClick,
20
19
  isShowInMore,
21
20
  iconTitle,
22
- actionIconCustomStyle,
23
- moreItemCustomStyle,
24
- closePopup
21
+ customProps,
22
+ closePopup,
23
+ isDisabled,
24
+ needMoreActionItemIcon
25
25
  } = props;
26
- return /*#__PURE__*/React.createElement(React.Fragment, null, isShowInMore ? /*#__PURE__*/React.createElement(MoreActionItem, {
26
+ const {
27
+ moreActionItemProps = dummyObject,
28
+ actionIconProps = dummyObject
29
+ } = customProps;
30
+ const renderIcon = useCallback( // eslint-disable-next-line no-confusing-arrow
31
+ function () {
32
+ let {
33
+ id
34
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
35
+ return needMoreActionItemIcon ? /*#__PURE__*/React.createElement(ActionIcon, _extends({
36
+ id: id,
37
+ needIconOnly: true
38
+ }, actionIconProps)) : null;
39
+ }, [actionIconProps, needMoreActionItemIcon]);
40
+ return isShowInMore ? /*#__PURE__*/React.createElement(MoreActionItem, _extends({
27
41
  closePopup: closePopup,
28
- customStyle: moreItemCustomStyle,
29
42
  displayText: displayText,
30
- iconTitle: iconTitle,
31
43
  id: id,
32
- index: index,
44
+ isDisabled: isDisabled,
45
+ needIcon: needMoreActionItemIcon,
33
46
  onClick: onClick,
34
- renderIcon: renderIcon
35
- }) : /*#__PURE__*/React.createElement(ActionIcon, {
36
- customStyle: actionIconCustomStyle,
47
+ renderIcon: renderIcon,
48
+ title: iconTitle
49
+ }, moreActionItemProps)) : /*#__PURE__*/React.createElement(ActionIcon, _extends({
37
50
  id: id,
51
+ isDisabled: isDisabled,
38
52
  onClick: onClick,
39
- renderIcon: renderIcon,
40
53
  title: iconTitle
41
- }));
54
+ }, actionIconProps));
42
55
  }
43
56
  MessageAction.propTypes = messageActionsPropTypes;
44
57
  MessageAction.defaultProps = messageActionsDefaultProps;
@@ -1,8 +1,8 @@
1
1
  /** ** Constants *** */
2
- import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
2
+ import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
3
3
  const messageActionDefaultProps = {
4
- actionIconCustomStyle: dummyObject,
5
- moreItemCustomStyle: dummyObject,
6
- isShowInMore: false
4
+ customProps: dummyObject,
5
+ isShowInMore: false,
6
+ needMoreActionItemIcon: true
7
7
  };
8
8
  export default messageActionDefaultProps;