@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
@@ -47,9 +47,9 @@ export default function ActionIcon(props) {
47
47
  id
48
48
  });
49
49
  return icon ? /*#__PURE__*/React.createElement("div", {
50
- onClick: onClick,
51
50
  className: actionIconClass,
52
- "data-title": title
51
+ "data-title": title,
52
+ onClick: onClick
53
53
  }, icon) : null;
54
54
  }
55
55
  ActionIcon.propTypes = actionIconPropTypes;
@@ -2,30 +2,32 @@
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 articleBubbleDefaultProps from "./props/defaultProps";
12
- import articleBubblePropTypes from "./props/propTypes";
11
+ import articleBubbleDefaultProps from './props/defaultProps';
12
+ import articleBubblePropTypes 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";
17
- import { Container, Box } from "@zohodesk/components/es/Layout";
15
+ import cssJSLogic from './css/cssJSLogic';
16
+
17
+ /** ** Components *** */
18
+ import { Container } from '@zohodesk/components/es/Layout';
18
19
 
19
20
  /** ** Styles *** */
20
- import style from "./css/ArticleBubble.module.css";
21
- import ArticleIcon from "../icons/iconSrc/common/Article";
21
+ import style from './css/ArticleBubble.module.css';
22
+
23
+ /** ** Icons *** */
24
+ import ArticleIcon from '../icons/iconSrc/common/Article';
22
25
  export default function ArticleBubble(props) {
23
26
  const {
24
27
  customStyle,
25
28
  bubbleInfo,
26
29
  title,
27
- summary,
28
- articleURL
30
+ summary
29
31
  } = props;
30
32
 
31
33
  /* External customization */
@@ -43,10 +45,10 @@ export default function ArticleBubble(props) {
43
45
  return /*#__PURE__*/React.createElement("div", {
44
46
  className: articleBubbleClass
45
47
  }, /*#__PURE__*/React.createElement(Container, {
46
- isCover: false,
47
- alignBox: "row",
48
48
  align: "vertical",
49
- className: headerClass
49
+ alignBox: "row",
50
+ className: headerClass,
51
+ isCover: false
50
52
  }, /*#__PURE__*/React.createElement("div", {
51
53
  className: iconClass
52
54
  }, /*#__PURE__*/React.createElement(ArticleIcon, {
@@ -65,4 +67,4 @@ export default function ArticleBubble(props) {
65
67
  }
66
68
  ArticleBubble.propTypes = articleBubblePropTypes;
67
69
  ArticleBubble.defaultProps = articleBubbleDefaultProps;
68
- ArticleBubble.displayName = "ArticleBubble";
70
+ ArticleBubble.displayName = 'ArticleBubble';
@@ -1,40 +1,48 @@
1
1
  .icon {
2
- display: flex;
2
+ display: flex;
3
3
  }
4
4
 
5
- .articleWrapper {
6
- height: 80px;
7
- padding: 8px 10px;
8
- background-color: var(--imlib_chat_components_articleBubble_bg_color);
9
- border-radius: 3px;
10
- cursor: pointer;
11
- border: 1px solid #ebf0f5;
12
- margin: 4px 0 2px;
5
+ .articleWrapper {
6
+ padding: var(--imlib_size_8) var(--imlib_size_10);
7
+ background-color: var(--imlib_chat_components_articleBubble_bg_color);
8
+ border-radius: var(--imlib_size_3);
9
+ cursor: pointer;
10
+ border: var(--imlib_size_1) solid
11
+ var(--imlib_chat_components_articleBubble_border_color);
12
+ margin: var(--imlib_size_4) 0 var(--imlib_size_2);
13
13
  }
14
14
 
15
15
  .title {
16
- color: #000;
17
- font-size: 15px;
18
- line-height: 1.5;
19
- overflow: hidden;
20
- white-space: nowrap;
21
- word-wrap: normal;
22
- text-overflow: ellipsis;
16
+ color: var(--imlib_chat_components_articleBubble_color);
17
+ font-size: var(--imlib_size_15);
18
+ line-height: 1.5;
19
+ overflow: hidden;
20
+ white-space: nowrap;
21
+ word-wrap: normal;
22
+ text-overflow: ellipsis;
23
23
  }
24
24
 
25
25
  .summary {
26
- color: #000;
27
- font-size: 13px;
28
- line-height: 1.5;
29
- max-height: 40px;
30
- -webkit-line-clamp: 2;
31
- display: -webkit-box;
32
- -webkit-box-orient: vertical;
33
- word-break: break-word;
34
- overflow: hidden;
26
+ color: var(--imlib_chat_components_articleBubble_color);
27
+ font-size: var(--imlib_size_13);
28
+ line-height: 1.5;
29
+ max-height: var(--imlib_size_40);
30
+ -webkit-line-clamp: 2;
31
+ display: -webkit-box;
32
+ -webkit-box-orient: vertical;
33
+ word-break: break-word;
34
+ overflow: hidden;
35
35
  }
36
36
 
37
- .articleIcon{
38
- width:16px;
39
- height: 16px;
40
- }
37
+ .articleIcon {
38
+ width: var(--imlib_size_16);
39
+ height: var(--imlib_size_16);
40
+ }
41
+
42
+ .articleIcon :global(.path-0) {
43
+ fill: var(--imlib_chat_components_imIntegrationIcon_path0_color);
44
+ }
45
+
46
+ .articleIcon :global(.path-1) {
47
+ fill: var(--imlib_chat_components_imIntegrationIcon_path1_color);
48
+ }
@@ -2,23 +2,25 @@
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 attachmentBubbleDefaultProps from "./props/defaultProps";
12
- import attachmentBubblePropTypes from "./props/propTypes";
11
+ import attachmentBubbleDefaultProps from './props/defaultProps';
12
+ import attachmentBubblePropTypes 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 renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
16
+ import cssJSLogic from './css/cssJSLogic';
17
17
 
18
18
  /** ** Styles *** */
19
- import style from "./css/AttachmentBubble.module.css";
20
- import AttachmentBubbleInfo from "../AttachmentBubbleInfo/AttachmentBubbleInfo";
21
- import { Container, Box } from "@zohodesk/components/es/Layout";
19
+ import style from './css/AttachmentBubble.module.css';
20
+
21
+ /** ** Components *** */
22
+ import AttachmentBubbleInfo from '../AttachmentBubbleInfo/AttachmentBubbleInfo';
23
+ import { Container, Box } from '@zohodesk/components/es/Layout';
22
24
  export default function AttachmentBubble(props) {
23
25
  const {
24
26
  customStyle,
@@ -43,8 +45,8 @@ export default function AttachmentBubble(props) {
43
45
  }, /*#__PURE__*/React.createElement("div", {
44
46
  className: attachmentBubbleIconClass
45
47
  }, fileIcon), /*#__PURE__*/React.createElement(Box, {
46
- flexible: true,
47
- className: attachmentBubbleContentClass
48
+ className: attachmentBubbleContentClass,
49
+ flexible: true
48
50
  }, /*#__PURE__*/React.createElement(AttachmentBubbleInfo, {
49
51
  customStyle: bubbleInfoCustomStyle,
50
52
  fileName: fileName,
@@ -53,4 +55,4 @@ export default function AttachmentBubble(props) {
53
55
  }
54
56
  AttachmentBubble.propTypes = attachmentBubblePropTypes;
55
57
  AttachmentBubble.defaultProps = attachmentBubbleDefaultProps;
56
- AttachmentBubble.displayName = "AttachmentBubble";
58
+ AttachmentBubble.displayName = 'AttachmentBubble';
@@ -1,7 +1,7 @@
1
1
  .attachmentBubble {
2
2
  background-color: var(--imlib_chat_components_attachmentBubble_bg_color);
3
- border-radius: 3px;
4
- border: 1px solid var(--imlib_chat_components_attachmentBubble_border_color);
3
+ border-radius: var(--imlib_size_3);
4
+ border: var(--imlib_size_1) solid var(--imlib_chat_components_attachmentBubble_border_color);
5
5
  }
6
6
 
7
7
  .attachmentBubbleIcon{
@@ -12,11 +12,11 @@
12
12
  }
13
13
 
14
14
  [dir=ltr] .attachmentBubbleIcon{
15
- border-right: 1px solid var(--imlib_chat_components_attachmentBubble_border_color);
15
+ border-right: var(--imlib_size_1) solid var(--imlib_chat_components_attachmentBubble_border_color);
16
16
  }
17
17
 
18
18
  [dir=rtl] .attachmentBubbleIcon{
19
- border-left: 1px solid var(--imlib_chat_components_attachmentBubble_border_color);
19
+ border-left: var(--imlib_size_1) solid var(--imlib_chat_components_attachmentBubble_border_color);
20
20
  }
21
21
 
22
22
  .attachmentBubbleIcon, .attachmentBubbleContent{
@@ -1,5 +1,5 @@
1
1
  /** ** Methods *** */
2
- import { compileClassNames } from "@zohodesk/utils";
2
+ import { compileClassNames } from '@zohodesk/utils';
3
3
  export default function cssJSLogic(props, style) {
4
4
  const attachmentBubbleClass = compileClassNames({
5
5
  [style.attachmentBubble]: true
@@ -12,7 +12,6 @@ import attachmentBubbleInfoDefaultProps from './props/defaultProps';
12
12
  import attachmentBubbleInfoPropTypes 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 *** */
@@ -13,6 +13,7 @@
13
13
  }
14
14
 
15
15
  .fileSize {
16
+ composes: varClass;
16
17
  font-size: var(--attachmentBubbleInfo-fileSize_font_size);
17
18
  color: var(--imlib_chat_components_attachmentBubbleInfo_fileSize_color);
18
19
  }
@@ -1,5 +1,5 @@
1
1
  /** ** Methods *** */
2
- import { compileClassNames } from "@zohodesk/utils";
2
+ import { compileClassNames } from '@zohodesk/utils';
3
3
  export default function cssJSLogic(props, style) {
4
4
  const attachmentBubbleInfoClass = compileClassNames({
5
5
  [style.attachmentBubbleInfo]: true
package/es/Audio/Audio.js CHANGED
@@ -2,38 +2,38 @@
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';
9
- import useMedia from '@zohoim/chat-components-hooks/es/Media/useMedia';
8
+ import useMergeStyle from "@zohodesk/hooks/es/utils/useMergeStyle";
9
+ import useMedia from "@zohoim/chat-components-hooks/es/Media/useMedia";
10
10
 
11
11
  /** ** Constants *** */
12
- import audioDefaultProps from './props/defaultProps';
13
- import audioPropTypes from './props/propTypes';
12
+ import audioDefaultProps from "./props/defaultProps";
13
+ import audioPropTypes from "./props/propTypes";
14
14
 
15
15
  /** ** Methods *** */
16
- import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
17
- import cssJSLogic from './css/cssJSLogic';
16
+ import cssJSLogic from "./css/cssJSLogic";
18
17
 
19
18
  /** ** Styles *** */
20
- import style from './css/Audio.module.css';
21
- // import MediaControls from '../MediaControls/MediaControls';
19
+ import style from "./css/Audio.module.css";
20
+
21
+ /** ** Components *** */
22
+ // //import MediaControls from '../MediaControls/MediaControls';
22
23
 
23
24
  export default function Audio(props) {
24
25
  const {
25
26
  customStyle,
26
- controlsCustomStyle,
27
- fileType,
27
+ /* controlsCustomStyle, */fileType,
28
28
  fileURL
29
29
  } = props;
30
30
  const {
31
- mediaElementRef,
32
- durationTime,
33
- onTogglePlay,
34
- currentTime,
35
- progressPercentage,
36
- isMediaPlayed
31
+ mediaElementRef
32
+ // durationTime,
33
+ // onTogglePlay
34
+ // currentTime,
35
+ // progressPercentage,
36
+ // isMediaPlayed
37
37
  } = useMedia(props);
38
38
 
39
39
  /* External customization */
@@ -46,15 +46,15 @@ export default function Audio(props) {
46
46
  return /*#__PURE__*/React.createElement("div", {
47
47
  className: audioWrapperClass
48
48
  }, /*#__PURE__*/React.createElement("audio", {
49
- preload: "metadata",
49
+ className: audioClass,
50
50
  controls: true,
51
- ref: mediaElementRef,
52
- className: audioClass
51
+ preload: "metadata",
52
+ ref: mediaElementRef
53
53
  }, /*#__PURE__*/React.createElement("source", {
54
- type: fileType,
55
- "data-src": fileURL
54
+ "data-src": fileURL,
55
+ type: fileType
56
56
  })));
57
57
  }
58
58
  Audio.propTypes = audioPropTypes;
59
59
  Audio.defaultProps = audioDefaultProps;
60
- Audio.displayName = 'Audio';
60
+ Audio.displayName = "Audio";
@@ -12,7 +12,6 @@ import audioBubbleDefaultProps from './props/defaultProps';
12
12
  import audioBubblePropTypes 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 *** */
@@ -47,10 +46,10 @@ export default function AudioBubble(props) {
47
46
  fileName: fileName,
48
47
  fileSize: fileSize
49
48
  }), /*#__PURE__*/React.createElement(Audio, {
49
+ controlsCustomStyle: controlsCustomStyle,
50
50
  customStyle: audioCustomStyle,
51
- fileURL: fileURL,
52
51
  fileType: fileType,
53
- controlsCustomStyle: controlsCustomStyle
52
+ fileURL: fileURL
54
53
  }));
55
54
  }
56
55
  AudioBubble.propTypes = audioBubblePropTypes;
@@ -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 audioBubbleClass = compileClassNames({
@@ -6,18 +6,19 @@ import React from 'react';
6
6
 
7
7
  /** ** Hooks *** */
8
8
  import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
9
- import { Container, Box } from '@zohodesk/components/es/Layout';
10
9
 
11
10
  /** ** Constants *** */
12
11
  import imageBubbleDefaultProps from './props/defaultProps';
13
12
  import imageBubblePropTypes from './props/propTypes';
14
13
 
15
14
  /** ** Methods *** */
16
- import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
17
15
  import cssJSLogic from './css/cssJSLogic';
18
16
 
19
17
  /** ** Styles *** */
20
18
  import style from './css/ImageBubble.module.css';
19
+
20
+ /** ** Components *** */
21
+ import { Container } from '@zohodesk/components/es/Layout';
21
22
  import LazyLoadImage from '../LazyLoadImage/LazyLoadImage';
22
23
  export default function ImageBubble(props) {
23
24
  const {
@@ -38,13 +39,13 @@ export default function ImageBubble(props) {
38
39
  align: "both",
39
40
  className: imageBubbleWrapperClass
40
41
  }, /*#__PURE__*/React.createElement(LazyLoadImage, {
41
- src: src,
42
+ alternate: alternate,
42
43
  customStyle: blurImageStyle,
43
- alternate: alternate
44
+ src: src
44
45
  }), /*#__PURE__*/React.createElement(LazyLoadImage, {
45
- src: src,
46
+ alternate: alternate,
46
47
  customStyle: imageStyle,
47
- alternate: alternate
48
+ src: src
48
49
  }));
49
50
  }
50
51
  ImageBubble.propTypes = imageBubblePropTypes;
@@ -12,7 +12,6 @@ import infoBubbleDefaultProps from './props/defaultProps';
12
12
  import infoBubblePropTypes 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 *** */
@@ -6,18 +6,17 @@ import React from 'react';
6
6
 
7
7
  /** ** Hooks *** */
8
8
  import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
9
+ import useLazyLoadImage from '@zohoim/chat-components-hooks/es/ImageBubble/useLazyLoadImage';
9
10
 
10
11
  /** ** Constants *** */
11
12
  import lazyLoadImageDefaultProps from './props/defaultProps';
12
13
  import lazyLoadImagePropTypes from './props/propTypes';
13
14
 
14
15
  /** ** Methods *** */
15
- import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
16
16
  import cssJSLogic from './css/cssJSLogic';
17
17
 
18
18
  /** ** Styles *** */
19
19
  import style from './css/LazyLoadImage.module.css';
20
- import useLazyLoadImage from '@zohoim/chat-components-hooks/es/ImageBubble/useLazyLoadImage';
21
20
  export default function LazyLoadImage(props) {
22
21
  const {
23
22
  customStyle,
@@ -35,12 +34,12 @@ export default function LazyLoadImage(props) {
35
34
  lazyLoadImageClass
36
35
  } = cssJSLogic(props, newStyle);
37
36
  return /*#__PURE__*/React.createElement("img", {
38
- ref: imageElementRef,
39
- src: "",
37
+ alt: alternate,
38
+ className: `lazy ${lazyLoadImageClass || ''}`,
40
39
  "data-src": src,
41
40
  "data-srcset": src,
42
- className: `lazy ${lazyLoadImageClass || ''}`,
43
- alt: alternate
41
+ ref: imageElementRef,
42
+ src: ""
44
43
  });
45
44
  }
46
45
  LazyLoadImage.propTypes = lazyLoadImagePropTypes;
@@ -3,23 +3,22 @@
3
3
  /* eslint-disable max-len */
4
4
 
5
5
  /** ** Libraries *** */
6
- import React from "react";
6
+ import React from 'react';
7
7
 
8
8
  /** ** Hooks *** */
9
- import useMergeStyle from "@zohodesk/hooks/es/utils/useMergeStyle";
9
+ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
10
+ import useLocationBubble from '@zohoim/chat-components-hooks/es/LocationBubble/useLocationBubble';
10
11
 
11
12
  /** ** Constants *** */
12
- import locationBubbleDefaultProps from "./props/defaultProps";
13
- import locationBubblePropTypes from "./props/propTypes";
13
+ import locationBubbleDefaultProps from './props/defaultProps';
14
+ import locationBubblePropTypes from './props/propTypes';
14
15
 
15
16
  /** ** Methods *** */
16
- import renderHandler from "@zohoim/chat-components-utils/es/common/renderHandler";
17
- import cssJSLogic from "./css/cssJSLogic";
18
- import { Container, Box } from "@zohodesk/components/es/Layout";
17
+ import cssJSLogic from './css/cssJSLogic';
18
+ import { Container, Box } from '@zohodesk/components/es/Layout';
19
19
 
20
20
  /** ** Styles *** */
21
- import style from "./css/LocationBubble.module.css";
22
- import useLocationBubble from "@zohoim/chat-components-hooks/es/LocationBubble/useLocationBubble";
21
+ import style from './css/LocationBubble.module.css';
23
22
  export default function LocationBubble(props) {
24
23
  const {
25
24
  customStyle
@@ -40,29 +39,29 @@ export default function LocationBubble(props) {
40
39
  textLinkClass
41
40
  } = cssJSLogic(props, newStyle);
42
41
  return /*#__PURE__*/React.createElement(Container, {
43
- alignBox: "row",
44
42
  align: "vertical",
43
+ alignBox: "row",
45
44
  className: locationBubbleClass
46
45
  }, /*#__PURE__*/React.createElement(Box, {
47
- shrink: true,
48
- className: imageWrapperClass
46
+ className: imageWrapperClass,
47
+ shrink: true
49
48
  }, /*#__PURE__*/React.createElement("a", {
50
- target: "_blank",
51
- rel: "noreferrer noopener",
49
+ className: imageLinkClass,
52
50
  href: locationURL,
53
- className: imageLinkClass
51
+ rel: "noreferrer noopener",
52
+ target: "_blank"
54
53
  }, /*#__PURE__*/React.createElement("div", {
55
54
  className: imageClass
56
55
  }))), /*#__PURE__*/React.createElement(Box, {
57
- flexible: true,
58
- className: textWrapperClass
56
+ className: textWrapperClass,
57
+ flexible: true
59
58
  }, /*#__PURE__*/React.createElement("a", {
60
- target: "_blank",
61
- rel: "noreferrer noopener",
59
+ className: textLinkClass,
62
60
  href: locationURL,
63
- className: textLinkClass
61
+ rel: "noreferrer noopener",
62
+ target: "_blank"
64
63
  }, locationURL)));
65
64
  }
66
65
  LocationBubble.propTypes = locationBubblePropTypes;
67
66
  LocationBubble.defaultProps = locationBubbleDefaultProps;
68
- LocationBubble.displayName = "LocationBubble";
67
+ LocationBubble.displayName = 'LocationBubble';
@@ -1,13 +1,15 @@
1
1
  .imageWrapper {
2
- width: 60px;
3
- height: 60px;
2
+ width: var(--imlib_size_60);
3
+ height: var(--imlib_size_60);
4
4
  }
5
5
 
6
6
  .locationBubble {
7
7
  white-space: nowrap;
8
8
  width: 100%;
9
9
  background-color: var(--imlib_chat_components_locationBubble_bg_color);
10
- padding: 10px;
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
13
  }
12
14
 
13
15
  .image {
@@ -16,15 +18,15 @@
16
18
  background-image: url('../images/location.png');
17
19
  background-repeat: no-repeat;
18
20
  background-size: cover;
19
- border-radius: 3px;
21
+ border-radius: var(--imlib_size_3);
20
22
  }
21
23
 
22
24
  [dir=ltr] .textWrapper {
23
- margin: 0 0 0 8px;
25
+ margin: 0 0 0 var(--imlib_size_8);
24
26
  }
25
27
 
26
28
  [dir=rtl] .textWrapper {
27
- margin: 0 8px 0 0;
29
+ margin: 0 var(--imlib_size_8) 0 0;
28
30
  }
29
31
 
30
32
  .textLink {
@@ -32,5 +34,5 @@
32
34
  white-space: nowrap;
33
35
  overflow: hidden;
34
36
  text-overflow: ellipsis;
35
- color: #0a73eb;
37
+ color: var(--imlib_chat_components_locationBubble_color);
36
38
  }
@@ -12,7 +12,6 @@ import mediaControlsDefaultProps from './props/defaultProps';
12
12
  import mediaControlsPropTypes 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 *** */