@zohoim/chat-components 0.0.11 → 0.0.13

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 (210) hide show
  1. package/es/ActionIcon/ActionIcon.js +2 -2
  2. package/es/ArticleBubble/ArticleBubble.js +17 -15
  3. package/es/ArticleBubble/css/ArticleBubble.module.css +37 -29
  4. package/es/AttachmentBubble/AttachmentBubble.js +14 -12
  5. package/es/AttachmentBubble/css/AttachmentBubble.module.css +4 -4
  6. package/es/AttachmentBubble/css/cssJSLogic.js +1 -1
  7. package/es/AttachmentBubbleInfo/AttachmentBubbleInfo.js +0 -1
  8. package/es/AttachmentBubbleInfo/css/AttachmentBubbleInfo.module.css +1 -0
  9. package/es/AttachmentBubbleInfo/css/cssJSLogic.js +1 -1
  10. package/es/Audio/Audio.js +23 -23
  11. package/es/AudioBubble/AudioBubble.js +2 -3
  12. package/es/AudioBubble/css/cssJSLogic.js +2 -2
  13. package/es/ImageBubble/ImageBubble.js +7 -6
  14. package/es/InfoBubble/InfoBubble.js +0 -1
  15. package/es/LazyLoadImage/LazyLoadImage.js +5 -6
  16. package/es/LocationBubble/LocationBubble.js +20 -21
  17. package/es/LocationBubble/css/LocationBubble.module.css +9 -7
  18. package/es/MediaControls/MediaControls.js +0 -1
  19. package/es/Message/Message.js +58 -93
  20. package/es/Message/props/defaultProps.js +2 -34
  21. package/es/Message/props/propTypes.js +19 -57
  22. package/es/MessageAction/MessageAction.js +5 -5
  23. package/es/MessageActions/MessageActions.js +120 -45
  24. package/es/MessageActions/css/MessageActions.module.css +30 -2
  25. package/es/MessageActions/css/cssJSLogic.js +13 -3
  26. package/es/MessageActions/props/defaultProps.js +5 -3
  27. package/es/MessageActions/props/propTypes.js +22 -4
  28. package/es/MessageActionsMore/MessageActionsMore.js +5 -5
  29. package/es/MessageActionsWrapper/MessageActionsWrapper.js +75 -0
  30. package/es/MessageActionsWrapper/css/MessageActionsWrapper.module.css +3 -0
  31. package/es/MessageActionsWrapper/css/cssJSLogic.js +10 -0
  32. package/es/MessageActionsWrapper/index.js +1 -0
  33. package/es/MessageActionsWrapper/props/defaultProps.js +10 -0
  34. package/es/MessageActionsWrapper/props/propTypes.js +12 -0
  35. package/es/MessageAvatar/MessageAvatar.js +7 -6
  36. package/es/MessageAvatar/props/defaultProps.js +3 -3
  37. package/es/MessageBubble/MessageBubble.js +1 -1
  38. package/es/MessageBubble/props/defaultProps.js +2 -2
  39. package/es/MessageBubble/props/propConstants.js +1 -1
  40. package/es/MessageBubble/props/propTypes.js +2 -2
  41. package/es/{im/IMMessageStatus/IMMessageStatus.js → MessageStatus/MessageStatus.js} +18 -15
  42. package/es/{im/IMMessageStatus → MessageStatus}/css/cssJSLogic.js +3 -3
  43. package/es/MessageStatus/index.js +1 -0
  44. package/es/{im/IMMessageStatus → MessageStatus}/props/defaultProps.js +2 -2
  45. package/es/{im/IMMessageStatus → MessageStatus}/props/propTypes.js +4 -3
  46. package/es/MoreActionItem/MoreActionItem.js +7 -7
  47. package/es/MoreActionItem/css/cssJSLogic.js +1 -1
  48. package/es/ReplyBubble/ReplyBubble.js +4 -3
  49. package/es/ReplyBubbleContent/ReplyBubbleContent.js +16 -12
  50. package/es/ReplyBubbleContent/css/ReplyBubbleContent.module.css +26 -16
  51. package/es/ReplyBubbleHeader/ReplyBubbleHeader.js +11 -9
  52. package/es/ReplyBubbleHeader/css/ReplyBubbleHeader.module.css +15 -4
  53. package/es/ReplyBubbleHeader/css/cssJSLogic.js +9 -1
  54. package/es/ReplyBubbleHeader/props/defaultProps.js +1 -2
  55. package/es/ReplyBubbleHeader/props/propTypes.js +1 -2
  56. package/es/TextBubble/TextBubble.js +8 -9
  57. package/es/TextBubble/css/TextBubble.module.css +11 -2
  58. package/es/Theme/ThemeWrapper.js +32 -29
  59. package/es/Theme/crm/dark/blueFanTheme.js +1 -1
  60. package/es/Theme/crm/dark/blueTheme.js +1 -1
  61. package/es/Theme/crm/dark/darkBlueTheme.js +1 -1
  62. package/es/Theme/crm/dark/darkGreyTheme.js +1 -1
  63. package/es/Theme/crm/dark/greenTheme.js +1 -1
  64. package/es/Theme/crm/dark/orangeTheme.js +1 -1
  65. package/es/Theme/crm/dark/pinkTheme.js +1 -1
  66. package/es/Theme/crm/dark/tealTheme.js +1 -1
  67. package/es/Theme/crm/dark/whiteTheme.js +1 -1
  68. package/es/Theme/crm/light/blueFanTheme.js +1 -1
  69. package/es/Theme/crm/light/blueTheme.js +1 -1
  70. package/es/Theme/crm/light/darkBlueTheme.js +1 -1
  71. package/es/Theme/crm/light/darkGreyTheme.js +1 -1
  72. package/es/Theme/crm/light/greenTheme.js +1 -1
  73. package/es/Theme/crm/light/orangeTheme.js +1 -1
  74. package/es/Theme/crm/light/pinkTheme.js +1 -1
  75. package/es/Theme/crm/light/tealTheme.js +1 -1
  76. package/es/Theme/crm/light/whiteTheme.js +1 -1
  77. package/es/Theme/crm/pureDark/blueFanTheme.js +1 -1
  78. package/es/Theme/crm/pureDark/blueTheme.js +1 -1
  79. package/es/Theme/crm/pureDark/darkBlueTheme.js +1 -1
  80. package/es/Theme/crm/pureDark/darkGreyTheme.js +1 -1
  81. package/es/Theme/crm/pureDark/greenTheme.js +1 -1
  82. package/es/Theme/crm/pureDark/orangeTheme.js +1 -1
  83. package/es/Theme/crm/pureDark/pinkTheme.js +1 -1
  84. package/es/Theme/crm/pureDark/tealTheme.js +1 -1
  85. package/es/Theme/crm/pureDark/whiteTheme.js +1 -1
  86. package/es/Theme/desk/commonDeskColorVariable.js +10 -10
  87. package/es/Theme/desk/dark/blueTheme.js +42 -16
  88. package/es/Theme/desk/dark/commonColorVariable.js +10 -5
  89. package/es/Theme/desk/dark/greenTheme.js +41 -15
  90. package/es/Theme/desk/dark/orangeTheme.js +34 -8
  91. package/es/Theme/desk/dark/redTheme.js +50 -15
  92. package/es/Theme/desk/dark/yellowTheme.js +41 -15
  93. package/es/Theme/desk/light/blueTheme.js +35 -18
  94. package/es/Theme/desk/light/commonColorVariable.js +7 -1
  95. package/es/Theme/desk/light/greenTheme.js +39 -13
  96. package/es/Theme/desk/light/orangeTheme.js +38 -13
  97. package/es/Theme/desk/light/redTheme.js +38 -13
  98. package/es/Theme/desk/light/yellowTheme.js +39 -13
  99. package/es/Theme/desk/pureDark/blueTheme.js +41 -14
  100. package/es/Theme/desk/pureDark/commonColorVariable.js +6 -1
  101. package/es/Theme/desk/pureDark/greenTheme.js +40 -14
  102. package/es/Theme/desk/pureDark/orangeTheme.js +40 -14
  103. package/es/Theme/desk/pureDark/redTheme.js +40 -14
  104. package/es/Theme/desk/pureDark/yellowTheme.js +40 -14
  105. package/es/Theme/utils/getThemeConfigurations.js +5 -5
  106. package/es/Video/Video.js +13 -12
  107. package/es/VideoBubble/VideoBubble.js +2 -3
  108. package/es/icons/create-icon-components.js +1 -0
  109. package/es/icons/icon.template.js +2 -2
  110. package/es/icons/iconSrc/actions/ConvertTicket.js +1 -0
  111. package/es/icons/iconSrc/actions/index.js +1 -1
  112. package/es/icons/iconSrc/attachments/Audio.js +1 -0
  113. package/es/icons/iconSrc/attachments/Code.js +1 -0
  114. package/es/icons/iconSrc/attachments/Image.js +1 -0
  115. package/es/icons/iconSrc/attachments/Pdf.js +1 -0
  116. package/es/icons/iconSrc/attachments/Txt.js +1 -0
  117. package/es/icons/iconSrc/attachments/Unknown.js +1 -0
  118. package/es/icons/iconSrc/attachments/Video.js +1 -0
  119. package/es/icons/iconSrc/attachments/Zip.js +1 -0
  120. package/es/icons/iconSrc/attachments/index.js +8 -8
  121. package/es/icons/iconSrc/common/Article.js +1 -0
  122. package/es/icons/iconSrc/common/Quote.js +1 -0
  123. package/es/icons/iconSrc/common/index.js +2 -2
  124. package/es/icons/iconSrc/integrations/ChInstagram.js +1 -0
  125. package/es/icons/iconSrc/integrations/ChWhatsApp.js +1 -0
  126. package/es/icons/iconSrc/integrations/TtASAP.js +1 -0
  127. package/es/icons/iconSrc/integrations/TtTelegram.js +1 -0
  128. package/es/icons/iconSrc/integrations/TtTwillio.js +1 -0
  129. package/es/icons/iconSrc/integrations/TtTwitter.js +1 -0
  130. package/es/icons/iconSrc/integrations/TtWechat.js +1 -0
  131. package/es/icons/iconSrc/integrations/index.js +7 -7
  132. package/es/icons/iconSrc/messageStatus/Clock.js +1 -0
  133. package/es/icons/iconSrc/messageStatus/DoubleTick.js +1 -0
  134. package/es/icons/iconSrc/messageStatus/Failed.js +1 -0
  135. package/es/icons/iconSrc/messageStatus/Tick.js +1 -0
  136. package/es/icons/iconSrc/messageStatus/index.js +4 -4
  137. package/es/im/IMArticleBubble/IMArticleBubble.js +3 -4
  138. package/es/im/IMAttachmentBubble/IMAttachmentBubble.js +4 -5
  139. package/es/im/IMAttachmentIcon/IMAttachmentIcon.js +8 -9
  140. package/es/im/IMAudioBubble/IMAudioBubble.js +3 -4
  141. package/es/im/IMAudioBubble/css/cssJSLogic.js +2 -2
  142. package/es/im/IMAutoMessageInfo/IMAutoMessageInfo.js +0 -1
  143. package/es/im/IMDateTime/IMDateTime.js +0 -1
  144. package/es/im/IMDateTime/css/IMDateTime.module.css +6 -1
  145. package/es/im/IMImageBubble/IMImageBubble.js +6 -5
  146. package/es/im/IMInfoBubble/IMInfoBubble.js +0 -1
  147. package/es/im/IMLocationBubble/IMLocationBubble.js +6 -5
  148. package/es/im/IMMessage/IMMessage.js +57 -103
  149. package/es/im/IMMessage/props/defaultProps.js +1 -19
  150. package/es/im/IMMessage/props/propTypes.js +17 -30
  151. package/es/im/IMMessageAvatar/IMMessageAvatar.js +7 -7
  152. package/es/im/IMMessageAvatar/props/defaultProps.js +4 -4
  153. package/es/im/IMMessageAvatar/props/propTypes.js +25 -0
  154. package/es/im/IMMessageContent/IMMessageContent.js +44 -28
  155. package/es/im/IMMessageContent/css/IMMessageContent.module.css +3 -0
  156. package/es/im/IMMessageMeta/IMMessageMeta.js +3 -4
  157. package/es/im/IMReplyBubble/IMReplyBubble.js +9 -10
  158. package/es/im/IMReplyBubble/css/IMReplyBubble.module.css +7 -13
  159. package/es/im/IMTextBubble/IMTextBubble.js +3 -4
  160. package/es/im/IMTicketLink/IMTicketLink.js +1 -3
  161. package/es/im/IMVideoBubble/IMVideoBubble.js +3 -4
  162. package/es/im/index.js +0 -2
  163. package/es/index.js +28 -30
  164. package/es/{MessageWrapper → unused/MessageWrapper}/MessageWrapper.js +0 -1
  165. package/es/{TextMessage → unused/TextMessage}/DefaultActions.js +4 -4
  166. package/es/{TextMessage → unused/TextMessage}/TextMessage.js +14 -14
  167. package/es/{TextMessage → unused/TextMessage}/TextMessage1.js +18 -21
  168. package/package.json +4 -4
  169. package/es/im/IMMessage/renderChild/renderMessage.js +0 -8
  170. package/es/im/IMMessage/renderChild/renderMessageActions.js +0 -8
  171. package/es/im/IMMessage/renderChild/renderMessageBox.js +0 -15
  172. package/es/im/IMMessage/renderChild/renderMessageBoxFooter.js +0 -8
  173. package/es/im/IMMessage/renderChild/renderMessageFooter.js +0 -8
  174. package/es/im/IMMessage/renderChild/renderMessageHeader.js +0 -8
  175. package/es/im/IMMessage/renderChild/renderMessageOwner.js +0 -8
  176. package/es/im/IMMessage/renderChild/renderMessageStatus.js +0 -8
  177. package/es/im/IMMessageActions/IMMessageActions.js +0 -150
  178. package/es/im/IMMessageActions/css/IMMessageActions.module.css +0 -31
  179. package/es/im/IMMessageActions/css/cssJSLogic.js +0 -20
  180. package/es/im/IMMessageActions/index.js +0 -1
  181. package/es/im/IMMessageActions/props/defaultProps.js +0 -12
  182. package/es/im/IMMessageActions/props/propTypes.js +0 -30
  183. package/es/im/IMMessageStatus/index.js +0 -1
  184. /package/es/{MessageActions → MessageActionsWrapper}/props/propConstants.js +0 -0
  185. /package/es/{im/IMMessageStatus/css/IMMessageStatus.module.css → MessageStatus/css/MessageStatus.module.css} +0 -0
  186. /package/es/{MessageBoxFooter → unused/MessageBoxFooter}/MessageBoxFooter.js +0 -0
  187. /package/es/{MessageBoxFooter → unused/MessageBoxFooter}/css/MessageBoxFooter.module.css +0 -0
  188. /package/es/{MessageBoxFooter → unused/MessageBoxFooter}/css/cssJSLogic.js +0 -0
  189. /package/es/{MessageBoxFooter → unused/MessageBoxFooter}/index.js +0 -0
  190. /package/es/{MessageBoxFooter → unused/MessageBoxFooter}/props/defaultProps.js +0 -0
  191. /package/es/{MessageBoxFooter → unused/MessageBoxFooter}/props/propTypes.js +0 -0
  192. /package/es/{MessageBoxHeader → unused/MessageBoxHeader}/MessageBoxHeader.js +0 -0
  193. /package/es/{MessageBoxHeader → unused/MessageBoxHeader}/css/MessageBoxHeader.module.css +0 -0
  194. /package/es/{MessageBoxHeader → unused/MessageBoxHeader}/css/cssJsLogic.js +0 -0
  195. /package/es/{MessageBoxHeader → unused/MessageBoxHeader}/index.js +0 -0
  196. /package/es/{MessageBoxHeader → unused/MessageBoxHeader}/props/defaultProps.js +0 -0
  197. /package/es/{MessageBoxHeader → unused/MessageBoxHeader}/props/propTypes.js +0 -0
  198. /package/es/{MessageWrapper → unused/MessageWrapper}/css/MessageWrapper.module.css +0 -0
  199. /package/es/{MessageWrapper → unused/MessageWrapper}/css/cssJSLogic.js +0 -0
  200. /package/es/{MessageWrapper → unused/MessageWrapper}/index.js +0 -0
  201. /package/es/{MessageWrapper → unused/MessageWrapper}/props/defaultProps.js +0 -0
  202. /package/es/{MessageWrapper → unused/MessageWrapper}/props/propTypes.js +0 -0
  203. /package/es/{TextMessage → unused/TextMessage}/css/TextMessage.module.css +0 -0
  204. /package/es/{TextMessage → unused/TextMessage}/css/cssJSLogic.js +0 -0
  205. /package/es/{TextMessage → unused/TextMessage}/index.js +0 -0
  206. /package/es/{TextMessage → unused/TextMessage}/props/defaultProps.js +0 -0
  207. /package/es/{TextMessage → unused/TextMessage}/props/propConstants.js +0 -0
  208. /package/es/{TextMessage → unused/TextMessage}/props/propTypes.js +0 -0
  209. /package/es/{Theme → unused}/darkTheme.js +0 -0
  210. /package/es/{Theme → unused}/defaultTheme.js +0 -0
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import React from 'react';
2
3
  import Icon from '@zohodesk/icon/es/Icon/Icon';
3
4
  export default function IconComponent(props) {
@@ -1,2 +1,2 @@
1
- export { default as Article } from "./Article";
2
- export { default as Quote } from "./Quote";
1
+ export { default as Article } from './Article';
2
+ export { default as Quote } from './Quote';
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import React from 'react';
2
3
  import Icon from '@zohodesk/icon/es/Icon/Icon';
3
4
  export default function IconComponent(props) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import React from 'react';
2
3
  import Icon from '@zohodesk/icon/es/Icon/Icon';
3
4
  export default function IconComponent(props) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import React from 'react';
2
3
  import Icon from '@zohodesk/icon/es/Icon/Icon';
3
4
  export default function IconComponent(props) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import React from 'react';
2
3
  import Icon from '@zohodesk/icon/es/Icon/Icon';
3
4
  export default function IconComponent(props) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import React from 'react';
2
3
  import Icon from '@zohodesk/icon/es/Icon/Icon';
3
4
  export default function IconComponent(props) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import React from 'react';
2
3
  import Icon from '@zohodesk/icon/es/Icon/Icon';
3
4
  export default function IconComponent(props) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import React from 'react';
2
3
  import Icon from '@zohodesk/icon/es/Icon/Icon';
3
4
  export default function IconComponent(props) {
@@ -1,7 +1,7 @@
1
- export { default as ChInstagram } from "./ChInstagram";
2
- export { default as ChWhatsApp } from "./ChWhatsApp";
3
- export { default as TtASAP } from "./TtASAP";
4
- export { default as TtTelegram } from "./TtTelegram";
5
- export { default as TtTwillio } from "./TtTwillio";
6
- export { default as TtTwitter } from "./TtTwitter";
7
- export { default as TtWechat } from "./TtWechat";
1
+ export { default as ChInstagram } from './ChInstagram';
2
+ export { default as ChWhatsApp } from './ChWhatsApp';
3
+ export { default as TtASAP } from './TtASAP';
4
+ export { default as TtTelegram } from './TtTelegram';
5
+ export { default as TtTwillio } from './TtTwillio';
6
+ export { default as TtTwitter } from './TtTwitter';
7
+ export { default as TtWechat } from './TtWechat';
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import React from 'react';
2
3
  import Icon from '@zohodesk/icon/es/Icon/Icon';
3
4
  export default function IconComponent(props) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import React from 'react';
2
3
  import Icon from '@zohodesk/icon/es/Icon/Icon';
3
4
  export default function IconComponent(props) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import React from 'react';
2
3
  import Icon from '@zohodesk/icon/es/Icon/Icon';
3
4
  export default function IconComponent(props) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import React from 'react';
2
3
  import Icon from '@zohodesk/icon/es/Icon/Icon';
3
4
  export default function IconComponent(props) {
@@ -1,4 +1,4 @@
1
- export { default as Clock } from "./Clock";
2
- export { default as DoubleTick } from "./DoubleTick";
3
- export { default as Failed } from "./Failed";
4
- export { default as Tick } from "./Tick";
1
+ export { default as Clock } from './Clock';
2
+ export { default as DoubleTick } from './DoubleTick';
3
+ export { default as Failed } from './Failed';
4
+ export { default as Tick } from './Tick';
@@ -12,12 +12,11 @@ import imArticleBubbleDefaultProps from './props/defaultProps';
12
12
  import imArticleBubblePropTypes from './props/propTypes';
13
13
 
14
14
  /** ** Methods *** */
15
- import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
15
+ import getDerivedArticleDetails from '@zohoim/chat-components-utils/es/imUtils/getDerivedArticleDetails';
16
16
  import cssJSLogic from './css/cssJSLogic';
17
17
 
18
18
  /** ** Styles *** */
19
19
  import style from './css/IMArticleBubble.module.css';
20
- import useIMArticleBubble from '@zohoim/chat-components-hooks/es/im/IMArticleBubble/useIMArticleBubble';
21
20
  import ArticleBubble from '../../ArticleBubble/ArticleBubble';
22
21
  export default function IMArticleBubble(props) {
23
22
  const {
@@ -37,15 +36,15 @@ export default function IMArticleBubble(props) {
37
36
  articleURL,
38
37
  summary,
39
38
  title
40
- } = useIMArticleBubble({
39
+ } = getDerivedArticleDetails({
41
40
  articleDetails
42
41
  });
43
42
  return /*#__PURE__*/React.createElement("div", {
44
43
  className: imArticleBubbleClass
45
44
  }, /*#__PURE__*/React.createElement(ArticleBubble, {
45
+ articleURL: articleURL,
46
46
  bubbleInfo: articleShareI18N,
47
47
  customStyle: articleCustomStyle,
48
- articleURL: articleURL,
49
48
  summary: summary,
50
49
  title: title
51
50
  }));
@@ -12,14 +12,13 @@ import imAttachmentBubbleDefaultProps from './props/defaultProps';
12
12
  import imAttachmentBubblePropTypes from './props/propTypes';
13
13
 
14
14
  /** ** Methods *** */
15
- import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
15
+ import getAttachmentDetails from '@zohoim/chat-components-utils/es/imUtils/getAttachmentDetails';
16
16
  import cssJSLogic from './css/cssJSLogic';
17
17
 
18
18
  /** ** Styles *** */
19
19
  import style from './css/IMAttachmentBubble.module.css';
20
20
  import AttachmentBubble from '../../AttachmentBubble/AttachmentBubble';
21
21
  import IMAttachmentIcon from '../IMAttachmentIcon/IMAttachmentIcon';
22
- import useIMAttachmentBubble from '@zohoim/chat-components-hooks/es/im/IMAttachmentBubble/useIMAttachmentBubble';
23
22
  export default function IMAttachmentBubble(props) {
24
23
  const {
25
24
  customStyle,
@@ -39,7 +38,7 @@ export default function IMAttachmentBubble(props) {
39
38
  formattedFileSize: fileSize,
40
39
  fileName,
41
40
  fileFormat
42
- } = useIMAttachmentBubble({
41
+ } = getAttachmentDetails({
43
42
  attachmentDetails
44
43
  });
45
44
  function renderFileTypeIcon() {
@@ -51,11 +50,11 @@ export default function IMAttachmentBubble(props) {
51
50
  return /*#__PURE__*/React.createElement("div", {
52
51
  className: imAttachmentBubbleClass
53
52
  }, /*#__PURE__*/React.createElement(AttachmentBubble, {
53
+ bubbleInfoCustomStyle: bubbleInfoCustomStyle,
54
54
  customStyle: bubbleCustomStyle,
55
- renderFileTypeIcon: renderFileTypeIcon,
56
55
  fileName: fileName,
57
56
  fileSize: fileSize,
58
- bubbleInfoCustomStyle: bubbleInfoCustomStyle
57
+ renderFileTypeIcon: renderFileTypeIcon
59
58
  }));
60
59
  }
61
60
  IMAttachmentBubble.propTypes = imAttachmentBubblePropTypes;
@@ -2,22 +2,21 @@
2
2
  /* eslint-disable max-len */
3
3
 
4
4
  /** ** Libraries *** */
5
- import React from "react";
5
+ import React from 'react';
6
6
 
7
7
  /** ** Hooks *** */
8
- import useMergeStyle from "@zohodesk/hooks/es/utils/useMergeStyle";
8
+ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
9
9
 
10
10
  /** ** Constants *** */
11
- import imAttachmentIconDefaultProps from "./props/defaultProps";
12
- import imAttachmentIconPropTypes from "./props/propTypes";
11
+ import imAttachmentIconDefaultProps from './props/defaultProps';
12
+ import imAttachmentIconPropTypes from './props/propTypes';
13
13
 
14
14
  /** ** Methods *** */
15
- import renderHandler from "@zohoim/chat-components-utils/es/common/renderHandler";
16
- import cssJSLogic from "./css/cssJSLogic";
15
+ import cssJSLogic from './css/cssJSLogic';
17
16
 
18
17
  /** ** Styles *** */
19
- import style from "./css/IMAttachmentIcon.module.css";
20
- import attachmentFileTypes from "@zohoim/chat-components-utils/es/constants/attachmentFileTypes";
18
+ import style from './css/IMAttachmentIcon.module.css';
19
+ import attachmentFileTypes from '@zohoim/chat-components-utils/es/constants/attachmentFileTypes';
21
20
 
22
21
  /** ** Icons *** */
23
22
  import AudioIcon from '../../icons/iconSrc/attachments/Audio';
@@ -83,4 +82,4 @@ export default function IMAttachmentIcon(props) {
83
82
  }
84
83
  IMAttachmentIcon.propTypes = imAttachmentIconPropTypes;
85
84
  IMAttachmentIcon.defaultProps = imAttachmentIconDefaultProps;
86
- IMAttachmentIcon.displayName = "IMAttachmentIcon";
85
+ IMAttachmentIcon.displayName = 'IMAttachmentIcon';
@@ -12,7 +12,6 @@ import imAudioBubbleDefaultProps from './props/defaultProps';
12
12
  import imAudioBubblePropTypes from './props/propTypes';
13
13
 
14
14
  /** ** Methods *** */
15
- import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
16
15
  import cssJSLogic from './css/cssJSLogic';
17
16
 
18
17
  /** ** Styles *** */
@@ -48,14 +47,14 @@ export default function IMAudioBubble(props) {
48
47
  return isShow ? /*#__PURE__*/React.createElement("div", {
49
48
  className: imAudioBubbleClass
50
49
  }, /*#__PURE__*/React.createElement(AudioBubble, {
51
- customStyle: audioBubbleCustomStyle,
52
- headerCustomStyle: headerCustomStyle,
53
50
  audioCustomStyle: audioCustomStyle,
54
51
  controlsCustomStyle: controlsCustomStyle,
52
+ customStyle: audioBubbleCustomStyle,
55
53
  fileName: fileName,
56
54
  fileSize: fileSize,
55
+ fileType: fileType,
57
56
  fileURL: fileURL,
58
- fileType: fileType
57
+ headerCustomStyle: headerCustomStyle
59
58
  })) : null;
60
59
  }
61
60
  IMAudioBubble.propTypes = imAudioBubblePropTypes;
@@ -1,7 +1,7 @@
1
1
  /** ** Methods *** */
2
- import { compileClassNames } from "@zohodesk/utils";
2
+ import { compileClassNames } from '@zohodesk/utils';
3
3
  export default function cssJSLogic(props, style) {
4
- let {
4
+ const {
5
5
  headerCustomStyle: propHeaderCustomStyle
6
6
  } = props;
7
7
  const imAudioBubbleClass = compileClassNames({
@@ -13,7 +13,6 @@ import imAutoMessageInfoDefaultProps from './props/defaultProps';
13
13
  import imAutoMessageInfoPropTypes from './props/propTypes';
14
14
 
15
15
  /** ** Methods *** */
16
- import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
17
16
  import cssJSLogic from './css/cssJSLogic';
18
17
 
19
18
  /** ** Styles *** */
@@ -13,7 +13,6 @@ import imDateTimeDefaultProps from './props/defaultProps';
13
13
  import imDateTimePropTypes from './props/propTypes';
14
14
 
15
15
  /** ** Methods *** */
16
- import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
17
16
  import cssJSLogic from './css/cssJSLogic';
18
17
 
19
18
  /** ** Styles *** */
@@ -1,5 +1,10 @@
1
1
  .imDateTime {
2
- font-size: 11px;
2
+ font-size: var(--imlib_size_11);
3
3
  /* max-width: var(--zd_size100); */
4
4
  /* display: flex; */
5
+ max-width: var(--zd_size100);
6
+ white-space: nowrap;
7
+ overflow: hidden;
8
+ text-overflow: ellipsis;
9
+ color: var(--imlib_chat_components_iMDateTime_color);
5
10
  }
@@ -12,13 +12,14 @@ import imImageBubbleDefaultProps from './props/defaultProps';
12
12
  import imImageBubblePropTypes from './props/propTypes';
13
13
 
14
14
  /** ** Methods *** */
15
- import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
15
+ import getAttachmentDetails from '@zohoim/chat-components-utils/es/imUtils/getAttachmentDetails';
16
16
  import cssJSLogic from './css/cssJSLogic';
17
17
 
18
18
  /** ** Styles *** */
19
19
  import style from './css/IMImageBubble.module.css';
20
+
21
+ /** ** Components *** */
20
22
  import ImageBubble from '../../ImageBubble/ImageBubble';
21
- import useIMImageBubble from '@zohoim/chat-components-hooks/es/im/IMImageBubble/useIMImageBubble';
22
23
  export default function IMImageBubble(props) {
23
24
  const {
24
25
  customStyle,
@@ -34,14 +35,14 @@ export default function IMImageBubble(props) {
34
35
  const {
35
36
  attachmentURL,
36
37
  fileName
37
- } = useIMImageBubble({
38
+ } = getAttachmentDetails({
38
39
  attachmentDetails
39
40
  });
40
41
  return /*#__PURE__*/React.createElement("div", {
41
42
  className: imImageBubbleClass
42
43
  }, /*#__PURE__*/React.createElement(ImageBubble, {
43
- src: attachmentURL,
44
- alternate: fileName
44
+ alternate: fileName,
45
+ src: attachmentURL
45
46
  }));
46
47
  }
47
48
  IMImageBubble.propTypes = imImageBubblePropTypes;
@@ -12,7 +12,6 @@ import imInfoBubbleDefaultProps from './props/defaultProps';
12
12
  import imInfoBubblePropTypes from './props/propTypes';
13
13
 
14
14
  /** ** Methods *** */
15
- import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
16
15
  import cssJSLogic from './css/cssJSLogic';
17
16
 
18
17
  /** ** Styles *** */
@@ -12,12 +12,13 @@ import imLocationBubbleDefaultProps from './props/defaultProps';
12
12
  import imLocationBubblePropTypes from './props/propTypes';
13
13
 
14
14
  /** ** Methods *** */
15
- import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
15
+ import getDerivedLocationDetails from '@zohoim/chat-components-utils/es/imUtils/getDerivedLocationDetails';
16
16
  import cssJSLogic from './css/cssJSLogic';
17
17
 
18
18
  /** ** Styles *** */
19
19
  import style from './css/IMLocationBubble.module.css';
20
- import useIMLocationBubble from '@zohoim/chat-components-hooks/es/im/IMLocationBubble/useIMLocationBubble';
20
+
21
+ /** ** Components *** */
21
22
  import LocationBubble from '../../LocationBubble/LocationBubble';
22
23
  export default function IMLocationBubble(props) {
23
24
  const {
@@ -34,14 +35,14 @@ export default function IMLocationBubble(props) {
34
35
  } = cssJSLogic(props, newStyle);
35
36
  const {
36
37
  locationURL
37
- } = useIMLocationBubble({
38
+ } = getDerivedLocationDetails({
38
39
  locationDetails
39
40
  });
40
41
  return /*#__PURE__*/React.createElement("div", {
41
42
  className: imLocationBubbleClass
42
43
  }, /*#__PURE__*/React.createElement(LocationBubble, {
43
- locationURL: locationURL,
44
- customStyle: locationCustomStyle
44
+ customStyle: locationCustomStyle,
45
+ locationURL: locationURL
45
46
  }));
46
47
  }
47
48
  IMLocationBubble.propTypes = imLocationBubblePropTypes;
@@ -1,19 +1,22 @@
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); }
1
2
  /* eslint-disable react/jsx-no-bind */
2
3
 
3
4
  /** ** Libraries *** */
4
- import React from "react";
5
+ import React from 'react';
5
6
 
6
7
  /** ** Hooks *** */
7
8
  import useIMMessage from '@zohoim/chat-components-hooks/es/im/IMMessage/useIMMessage';
8
9
 
9
10
  /** ** Constants *** */
10
- import imMessageDefaultProps from "./props/defaultProps";
11
- import imMessagePropTypes from "./props/propTypes";
11
+ import imMessageDefaultProps from './props/defaultProps';
12
+ import imMessagePropTypes from './props/propTypes';
13
+ import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
12
14
 
13
15
  /** ** Components *** */
14
16
  import Message from '../../Message/Message';
15
- import IMMessageContent from "../IMMessageContent/IMMessageContent";
16
- import IMTicketLink from "../IMTicketLink/IMTicketLink";
17
+ import IMMessageContent from '../IMMessageContent/IMMessageContent';
18
+ import IMTicketLink from '../IMTicketLink/IMTicketLink';
19
+ import IMIntegrationIcon from '../IMIntegrationIcon/IMIntegrationIcon';
17
20
  export default function IMMessage(props) {
18
21
  const {
19
22
  defaultAgentAvatar,
@@ -29,55 +32,39 @@ export default function IMMessage(props) {
29
32
  isSameTimeMessage,
30
33
  messageActionDetails,
31
34
  canReply,
32
- /*Customization Props*/
33
- messageBubbleCustomStyle,
34
- avatarCustomStyle,
35
- senderIntegrationIconCustomStyle,
36
- messageBoxCustomStyle,
37
- actionIconCustomStyle,
38
- moreActionItemCustomStyle,
39
- messageActionCustomStyle,
40
- moreActionPopupCustomStyle,
41
- messageStatusCustomStyle,
42
- needMessageActions,
43
- needSender,
44
- needMessageBox,
45
- isCustomIntegrationIcon,
46
- isCustomSenderAvatar,
47
- senderAvatarSize,
48
- senderIntegrationIconSize,
49
- actionsDefaultShowCount,
50
- renderCustomIntegrationIcon,
51
- renderCustomSenderAvatar,
52
- renderMessageFooter,
53
- renderMessageHeader,
54
35
  replyText,
55
36
  articleShareText,
56
- moreText
37
+ moreText,
38
+ customProps
57
39
  } = props;
40
+ const {
41
+ messageBubbleProps = dummyObject,
42
+ messageOwnerProps = dummyObject,
43
+ messageBoxProps = dummyObject,
44
+ messageStatusProps = dummyObject,
45
+ messageActionsProps = dummyObject,
46
+ imMessageContentProps = dummyObject,
47
+ imTicketLinkProps = dummyObject,
48
+ imIntegrationIconProps = dummyObject
49
+ } = customProps;
58
50
  const {
59
51
  direction,
60
- isDeletedMessage,
61
- isFailedMessage,
62
52
  isActive,
63
53
  isShowSender,
64
- isBot,
54
+ // isBot,
65
55
  senderSrc,
66
56
  senderAlternateSrc,
67
- senderTitle,
68
57
  senderName,
69
58
  isShowIntegrationIcon,
70
59
  integrationName,
71
- messageMetaType,
72
- messageType,
60
+ // messageMetaType,
61
+ // messageType,
73
62
  messageStatus,
74
63
  isAgentMessage,
75
64
  messageStatusTitle,
76
- displayMessage,
77
65
  createdTime,
78
66
  messageId,
79
67
  ticketNumber,
80
- ticketId,
81
68
  messageActions
82
69
  } = useIMMessage({
83
70
  defaultAgentAvatar,
@@ -94,28 +81,16 @@ export default function IMMessage(props) {
94
81
  canReply
95
82
  });
96
83
  function handleRenderMessageBoxFooter() {
97
- return !isSameTimeMessage ?
98
- /*#__PURE__*/
99
- // <CommonDateWithTime
100
- // to={createdTime}
101
- // isNeedTime
102
- // prefix=''
103
- // isTimeOnly
104
- // hideTitle
105
- // />
106
- // ) :
107
- React.createElement("div", null, createdTime) : null;
84
+ return !isSameTimeMessage ? /*#__PURE__*/React.createElement("div", null, createdTime) : null;
108
85
  }
109
86
  function handleRenderMessage() {
110
- return /*#__PURE__*/React.createElement(IMMessageContent, {
111
- messageDetails: messageDetails,
112
- replyText: replyText,
87
+ return /*#__PURE__*/React.createElement(IMMessageContent, _extends({
113
88
  articleShareText: articleShareText,
114
- moreText: moreText
115
- });
116
- // return <div>{displayMessage}</div>;
89
+ messageDetails: messageDetails,
90
+ moreText: moreText,
91
+ replyText: replyText
92
+ }, imMessageContentProps));
117
93
  }
118
-
119
94
  function handleSelectAction(_ref) {
120
95
  let {
121
96
  id,
@@ -133,64 +108,43 @@ export default function IMMessage(props) {
133
108
  });
134
109
  }
135
110
  function handleRenderSecondaryActions() {
136
- // return null;
137
- return /*#__PURE__*/React.createElement(IMTicketLink, {
111
+ return /*#__PURE__*/React.createElement(IMTicketLink, _extends({
138
112
  ticketNumber: ticketNumber
139
- });
140
-
141
- /*
142
- <a
143
- data-id={`ticketLink_${ticketNumber}`}
144
- // className={style.ticketId}
145
- // href='javascript:;'
146
- target='_blank'
147
- rel='noopener noreferrer'
148
- >
149
- {`#${ticketNumber}`}
150
- </a>
151
- */
113
+ }, imTicketLinkProps));
114
+ }
115
+ function handleRenderIntegIcon() {
116
+ /*#__PURE__*/React.createElement(IMIntegrationIcon, _extends({
117
+ integrationName: isShowIntegrationIcon ? integrationName : ''
118
+ }, imIntegrationIconProps));
152
119
  }
153
-
154
120
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Message, {
121
+ actions: messageActions,
122
+ customProps: {
123
+ messageOwnerProps,
124
+ messageBoxProps,
125
+ messageStatusProps,
126
+ messageActionsProps,
127
+ messageBubbleProps: {
128
+ renderMessageBoxFooter: handleRenderMessageBoxFooter,
129
+ ...messageBubbleProps
130
+ }
131
+ },
155
132
  direction: direction,
156
133
  isActive: isActive,
157
134
  isShowSender: isShowSender,
158
- senderName: senderName,
159
- senderSrc: senderSrc,
160
- senderAlternateSrc: senderAlternateSrc,
161
- senderTitle: senderTitle,
162
- senderIntegrationIcon: isShowIntegrationIcon ? integrationName : "",
163
- isFailedMessage: isFailedMessage,
164
- messageActions: messageActions,
165
- needMessageActions: needMessageActions ? messageActions.length >= 0 : false,
166
135
  onSelectAction: handleSelectAction,
167
- messageStatus: isAgentMessage ? messageStatus : "",
168
- statusTitle: messageStatusTitle,
169
- customStyle: messageBubbleCustomStyle,
170
- avatarCustomStyle: avatarCustomStyle,
171
- senderIntegrationIconCustomStyle: senderIntegrationIconCustomStyle,
172
- messageBoxCustomStyle: messageBoxCustomStyle,
173
- actionIconCustomStyle: actionIconCustomStyle,
174
- moreActionItemCustomStyle: moreActionItemCustomStyle,
175
- messageActionCustomStyle: messageActionCustomStyle,
176
- moreActionPopupCustomStyle: moreActionPopupCustomStyle,
177
- messageStatusCustomStyle: messageStatusCustomStyle,
178
- needSender: needSender,
179
- needMessageBox: needMessageBox,
180
- isCustomIntegrationIcon: isCustomIntegrationIcon,
181
- isCustomSenderAvatar: isCustomSenderAvatar,
182
- senderAvatarSize: senderAvatarSize,
183
- senderIntegrationIconSize: senderIntegrationIconSize,
184
- actionsDefaultShowCount: actionsDefaultShowCount,
185
- renderCustomIntegrationIcon: renderCustomIntegrationIcon,
186
- renderCustomSenderAvatar: renderCustomSenderAvatar,
136
+ ownerDetails: {
137
+ src: senderSrc,
138
+ alternateSrc: senderAlternateSrc,
139
+ name: senderName
140
+ },
141
+ renderContent: handleRenderMessage,
142
+ renderOwnerOverlay: handleRenderIntegIcon,
187
143
  renderSecondaryActions: handleRenderSecondaryActions,
188
- renderMessage: handleRenderMessage,
189
- renderMessageFooter: renderMessageFooter,
190
- renderMessageHeader: renderMessageHeader,
191
- renderMessageBoxFooter: handleRenderMessageBoxFooter
144
+ status: isAgentMessage ? messageStatus : '',
145
+ statusTooltip: messageStatusTitle
192
146
  }));
193
147
  }
194
148
  IMMessage.propTypes = imMessagePropTypes;
195
149
  IMMessage.defaultProps = imMessageDefaultProps;
196
- IMMessage.displayName = "IMMessage";
150
+ IMMessage.displayName = 'IMMessage';
@@ -2,8 +2,6 @@
2
2
 
3
3
  /** ** Constants *** */
4
4
  import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
5
- import sizes from '@zohoim/chat-components-utils/es/constants/sizes';
6
- import { actionsDefaultShowCount } from '@zohoim/chat-components-utils/es/constants/messageActionConstants';
7
5
  const imMessageDefaultProps = {
8
6
  messageDetails: dummyObject,
9
7
  sessionDetails: dummyObject,
@@ -17,22 +15,6 @@ const imMessageDefaultProps = {
17
15
  messageActionDetails: dummyObject,
18
16
  isCurrentAgent: false,
19
17
  canReply: false,
20
- messageBubbleCustomStyle: dummyObject,
21
- avatarCustomStyle: dummyObject,
22
- senderIntegrationIconCustomStyle: dummyObject,
23
- messageBoxCustomStyle: dummyObject,
24
- actionIconCustomStyle: dummyObject,
25
- moreActionItemCustomStyle: dummyObject,
26
- messageActionCustomStyle: dummyObject,
27
- moreActionPopupCustomStyle: dummyObject,
28
- messageStatusCustomStyle: dummyObject,
29
- needMessageActions: true,
30
- needSender: true,
31
- needMessageBox: true,
32
- isCustomIntegrationIcon: false,
33
- isCustomSenderAvatar: false,
34
- senderAvatarSize: 'medium',
35
- senderIntegrationIconSize: sizes.SMALL,
36
- actionsDefaultShowCount: actionsDefaultShowCount
18
+ customProps: dummyObject
37
19
  };
38
20
  export default imMessageDefaultProps;