@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.
- package/es/ActionIcon/ActionIcon.js +2 -2
- package/es/ArticleBubble/ArticleBubble.js +17 -15
- package/es/ArticleBubble/css/ArticleBubble.module.css +37 -29
- package/es/AttachmentBubble/AttachmentBubble.js +14 -12
- package/es/AttachmentBubble/css/AttachmentBubble.module.css +4 -4
- package/es/AttachmentBubble/css/cssJSLogic.js +1 -1
- package/es/AttachmentBubbleInfo/AttachmentBubbleInfo.js +0 -1
- package/es/AttachmentBubbleInfo/css/AttachmentBubbleInfo.module.css +1 -0
- package/es/AttachmentBubbleInfo/css/cssJSLogic.js +1 -1
- package/es/Audio/Audio.js +23 -23
- package/es/AudioBubble/AudioBubble.js +2 -3
- package/es/AudioBubble/css/cssJSLogic.js +2 -2
- package/es/ImageBubble/ImageBubble.js +7 -6
- package/es/InfoBubble/InfoBubble.js +0 -1
- package/es/LazyLoadImage/LazyLoadImage.js +5 -6
- package/es/LocationBubble/LocationBubble.js +20 -21
- package/es/LocationBubble/css/LocationBubble.module.css +9 -7
- package/es/MediaControls/MediaControls.js +0 -1
- package/es/Message/Message.js +58 -93
- package/es/Message/props/defaultProps.js +2 -34
- package/es/Message/props/propTypes.js +19 -57
- package/es/MessageAction/MessageAction.js +5 -5
- package/es/MessageActions/MessageActions.js +120 -45
- package/es/MessageActions/css/MessageActions.module.css +30 -2
- package/es/MessageActions/css/cssJSLogic.js +13 -3
- package/es/MessageActions/props/defaultProps.js +5 -3
- package/es/MessageActions/props/propTypes.js +22 -4
- package/es/MessageActionsMore/MessageActionsMore.js +5 -5
- package/es/MessageActionsWrapper/MessageActionsWrapper.js +75 -0
- package/es/MessageActionsWrapper/css/MessageActionsWrapper.module.css +3 -0
- package/es/MessageActionsWrapper/css/cssJSLogic.js +10 -0
- package/es/MessageActionsWrapper/index.js +1 -0
- package/es/MessageActionsWrapper/props/defaultProps.js +10 -0
- package/es/MessageActionsWrapper/props/propTypes.js +12 -0
- package/es/MessageAvatar/MessageAvatar.js +7 -6
- package/es/MessageAvatar/props/defaultProps.js +3 -3
- package/es/MessageBubble/MessageBubble.js +1 -1
- package/es/MessageBubble/props/defaultProps.js +2 -2
- package/es/MessageBubble/props/propConstants.js +1 -1
- package/es/MessageBubble/props/propTypes.js +2 -2
- package/es/{im/IMMessageStatus/IMMessageStatus.js → MessageStatus/MessageStatus.js} +18 -15
- package/es/{im/IMMessageStatus → MessageStatus}/css/cssJSLogic.js +3 -3
- package/es/MessageStatus/index.js +1 -0
- package/es/{im/IMMessageStatus → MessageStatus}/props/defaultProps.js +2 -2
- package/es/{im/IMMessageStatus → MessageStatus}/props/propTypes.js +4 -3
- package/es/MoreActionItem/MoreActionItem.js +7 -7
- package/es/MoreActionItem/css/cssJSLogic.js +1 -1
- package/es/ReplyBubble/ReplyBubble.js +4 -3
- package/es/ReplyBubbleContent/ReplyBubbleContent.js +16 -12
- package/es/ReplyBubbleContent/css/ReplyBubbleContent.module.css +26 -16
- package/es/ReplyBubbleHeader/ReplyBubbleHeader.js +11 -9
- package/es/ReplyBubbleHeader/css/ReplyBubbleHeader.module.css +15 -4
- package/es/ReplyBubbleHeader/css/cssJSLogic.js +9 -1
- package/es/ReplyBubbleHeader/props/defaultProps.js +1 -2
- package/es/ReplyBubbleHeader/props/propTypes.js +1 -2
- package/es/TextBubble/TextBubble.js +8 -9
- package/es/TextBubble/css/TextBubble.module.css +11 -2
- package/es/Theme/ThemeWrapper.js +32 -29
- package/es/Theme/crm/dark/blueFanTheme.js +1 -1
- package/es/Theme/crm/dark/blueTheme.js +1 -1
- package/es/Theme/crm/dark/darkBlueTheme.js +1 -1
- package/es/Theme/crm/dark/darkGreyTheme.js +1 -1
- package/es/Theme/crm/dark/greenTheme.js +1 -1
- package/es/Theme/crm/dark/orangeTheme.js +1 -1
- package/es/Theme/crm/dark/pinkTheme.js +1 -1
- package/es/Theme/crm/dark/tealTheme.js +1 -1
- package/es/Theme/crm/dark/whiteTheme.js +1 -1
- package/es/Theme/crm/light/blueFanTheme.js +1 -1
- package/es/Theme/crm/light/blueTheme.js +1 -1
- package/es/Theme/crm/light/darkBlueTheme.js +1 -1
- package/es/Theme/crm/light/darkGreyTheme.js +1 -1
- package/es/Theme/crm/light/greenTheme.js +1 -1
- package/es/Theme/crm/light/orangeTheme.js +1 -1
- package/es/Theme/crm/light/pinkTheme.js +1 -1
- package/es/Theme/crm/light/tealTheme.js +1 -1
- package/es/Theme/crm/light/whiteTheme.js +1 -1
- package/es/Theme/crm/pureDark/blueFanTheme.js +1 -1
- package/es/Theme/crm/pureDark/blueTheme.js +1 -1
- package/es/Theme/crm/pureDark/darkBlueTheme.js +1 -1
- package/es/Theme/crm/pureDark/darkGreyTheme.js +1 -1
- package/es/Theme/crm/pureDark/greenTheme.js +1 -1
- package/es/Theme/crm/pureDark/orangeTheme.js +1 -1
- package/es/Theme/crm/pureDark/pinkTheme.js +1 -1
- package/es/Theme/crm/pureDark/tealTheme.js +1 -1
- package/es/Theme/crm/pureDark/whiteTheme.js +1 -1
- package/es/Theme/desk/commonDeskColorVariable.js +10 -10
- package/es/Theme/desk/dark/blueTheme.js +42 -16
- package/es/Theme/desk/dark/commonColorVariable.js +10 -5
- package/es/Theme/desk/dark/greenTheme.js +41 -15
- package/es/Theme/desk/dark/orangeTheme.js +34 -8
- package/es/Theme/desk/dark/redTheme.js +50 -15
- package/es/Theme/desk/dark/yellowTheme.js +41 -15
- package/es/Theme/desk/light/blueTheme.js +35 -18
- package/es/Theme/desk/light/commonColorVariable.js +7 -1
- package/es/Theme/desk/light/greenTheme.js +39 -13
- package/es/Theme/desk/light/orangeTheme.js +38 -13
- package/es/Theme/desk/light/redTheme.js +38 -13
- package/es/Theme/desk/light/yellowTheme.js +39 -13
- package/es/Theme/desk/pureDark/blueTheme.js +41 -14
- package/es/Theme/desk/pureDark/commonColorVariable.js +6 -1
- package/es/Theme/desk/pureDark/greenTheme.js +40 -14
- package/es/Theme/desk/pureDark/orangeTheme.js +40 -14
- package/es/Theme/desk/pureDark/redTheme.js +40 -14
- package/es/Theme/desk/pureDark/yellowTheme.js +40 -14
- package/es/Theme/utils/getThemeConfigurations.js +5 -5
- package/es/Video/Video.js +13 -12
- package/es/VideoBubble/VideoBubble.js +2 -3
- package/es/icons/create-icon-components.js +1 -0
- package/es/icons/icon.template.js +2 -2
- package/es/icons/iconSrc/actions/ConvertTicket.js +1 -0
- package/es/icons/iconSrc/actions/index.js +1 -1
- package/es/icons/iconSrc/attachments/Audio.js +1 -0
- package/es/icons/iconSrc/attachments/Code.js +1 -0
- package/es/icons/iconSrc/attachments/Image.js +1 -0
- package/es/icons/iconSrc/attachments/Pdf.js +1 -0
- package/es/icons/iconSrc/attachments/Txt.js +1 -0
- package/es/icons/iconSrc/attachments/Unknown.js +1 -0
- package/es/icons/iconSrc/attachments/Video.js +1 -0
- package/es/icons/iconSrc/attachments/Zip.js +1 -0
- package/es/icons/iconSrc/attachments/index.js +8 -8
- package/es/icons/iconSrc/common/Article.js +1 -0
- package/es/icons/iconSrc/common/Quote.js +1 -0
- package/es/icons/iconSrc/common/index.js +2 -2
- package/es/icons/iconSrc/integrations/ChInstagram.js +1 -0
- package/es/icons/iconSrc/integrations/ChWhatsApp.js +1 -0
- package/es/icons/iconSrc/integrations/TtASAP.js +1 -0
- package/es/icons/iconSrc/integrations/TtTelegram.js +1 -0
- package/es/icons/iconSrc/integrations/TtTwillio.js +1 -0
- package/es/icons/iconSrc/integrations/TtTwitter.js +1 -0
- package/es/icons/iconSrc/integrations/TtWechat.js +1 -0
- package/es/icons/iconSrc/integrations/index.js +7 -7
- package/es/icons/iconSrc/messageStatus/Clock.js +1 -0
- package/es/icons/iconSrc/messageStatus/DoubleTick.js +1 -0
- package/es/icons/iconSrc/messageStatus/Failed.js +1 -0
- package/es/icons/iconSrc/messageStatus/Tick.js +1 -0
- package/es/icons/iconSrc/messageStatus/index.js +4 -4
- package/es/im/IMArticleBubble/IMArticleBubble.js +3 -4
- package/es/im/IMAttachmentBubble/IMAttachmentBubble.js +4 -5
- package/es/im/IMAttachmentIcon/IMAttachmentIcon.js +8 -9
- package/es/im/IMAudioBubble/IMAudioBubble.js +3 -4
- package/es/im/IMAudioBubble/css/cssJSLogic.js +2 -2
- package/es/im/IMAutoMessageInfo/IMAutoMessageInfo.js +0 -1
- package/es/im/IMDateTime/IMDateTime.js +0 -1
- package/es/im/IMDateTime/css/IMDateTime.module.css +6 -1
- package/es/im/IMImageBubble/IMImageBubble.js +6 -5
- package/es/im/IMInfoBubble/IMInfoBubble.js +0 -1
- package/es/im/IMLocationBubble/IMLocationBubble.js +6 -5
- package/es/im/IMMessage/IMMessage.js +57 -103
- package/es/im/IMMessage/props/defaultProps.js +1 -19
- package/es/im/IMMessage/props/propTypes.js +17 -30
- package/es/im/IMMessageAvatar/IMMessageAvatar.js +7 -7
- package/es/im/IMMessageAvatar/props/defaultProps.js +4 -4
- package/es/im/IMMessageAvatar/props/propTypes.js +25 -0
- package/es/im/IMMessageContent/IMMessageContent.js +44 -28
- package/es/im/IMMessageContent/css/IMMessageContent.module.css +3 -0
- package/es/im/IMMessageMeta/IMMessageMeta.js +3 -4
- package/es/im/IMReplyBubble/IMReplyBubble.js +9 -10
- package/es/im/IMReplyBubble/css/IMReplyBubble.module.css +7 -13
- package/es/im/IMTextBubble/IMTextBubble.js +3 -4
- package/es/im/IMTicketLink/IMTicketLink.js +1 -3
- package/es/im/IMVideoBubble/IMVideoBubble.js +3 -4
- package/es/im/index.js +0 -2
- package/es/index.js +28 -30
- package/es/{MessageWrapper → unused/MessageWrapper}/MessageWrapper.js +0 -1
- package/es/{TextMessage → unused/TextMessage}/DefaultActions.js +4 -4
- package/es/{TextMessage → unused/TextMessage}/TextMessage.js +14 -14
- package/es/{TextMessage → unused/TextMessage}/TextMessage1.js +18 -21
- package/package.json +4 -4
- package/es/im/IMMessage/renderChild/renderMessage.js +0 -8
- package/es/im/IMMessage/renderChild/renderMessageActions.js +0 -8
- package/es/im/IMMessage/renderChild/renderMessageBox.js +0 -15
- package/es/im/IMMessage/renderChild/renderMessageBoxFooter.js +0 -8
- package/es/im/IMMessage/renderChild/renderMessageFooter.js +0 -8
- package/es/im/IMMessage/renderChild/renderMessageHeader.js +0 -8
- package/es/im/IMMessage/renderChild/renderMessageOwner.js +0 -8
- package/es/im/IMMessage/renderChild/renderMessageStatus.js +0 -8
- package/es/im/IMMessageActions/IMMessageActions.js +0 -150
- package/es/im/IMMessageActions/css/IMMessageActions.module.css +0 -31
- package/es/im/IMMessageActions/css/cssJSLogic.js +0 -20
- package/es/im/IMMessageActions/index.js +0 -1
- package/es/im/IMMessageActions/props/defaultProps.js +0 -12
- package/es/im/IMMessageActions/props/propTypes.js +0 -30
- package/es/im/IMMessageStatus/index.js +0 -1
- /package/es/{MessageActions → MessageActionsWrapper}/props/propConstants.js +0 -0
- /package/es/{im/IMMessageStatus/css/IMMessageStatus.module.css → MessageStatus/css/MessageStatus.module.css} +0 -0
- /package/es/{MessageBoxFooter → unused/MessageBoxFooter}/MessageBoxFooter.js +0 -0
- /package/es/{MessageBoxFooter → unused/MessageBoxFooter}/css/MessageBoxFooter.module.css +0 -0
- /package/es/{MessageBoxFooter → unused/MessageBoxFooter}/css/cssJSLogic.js +0 -0
- /package/es/{MessageBoxFooter → unused/MessageBoxFooter}/index.js +0 -0
- /package/es/{MessageBoxFooter → unused/MessageBoxFooter}/props/defaultProps.js +0 -0
- /package/es/{MessageBoxFooter → unused/MessageBoxFooter}/props/propTypes.js +0 -0
- /package/es/{MessageBoxHeader → unused/MessageBoxHeader}/MessageBoxHeader.js +0 -0
- /package/es/{MessageBoxHeader → unused/MessageBoxHeader}/css/MessageBoxHeader.module.css +0 -0
- /package/es/{MessageBoxHeader → unused/MessageBoxHeader}/css/cssJsLogic.js +0 -0
- /package/es/{MessageBoxHeader → unused/MessageBoxHeader}/index.js +0 -0
- /package/es/{MessageBoxHeader → unused/MessageBoxHeader}/props/defaultProps.js +0 -0
- /package/es/{MessageBoxHeader → unused/MessageBoxHeader}/props/propTypes.js +0 -0
- /package/es/{MessageWrapper → unused/MessageWrapper}/css/MessageWrapper.module.css +0 -0
- /package/es/{MessageWrapper → unused/MessageWrapper}/css/cssJSLogic.js +0 -0
- /package/es/{MessageWrapper → unused/MessageWrapper}/index.js +0 -0
- /package/es/{MessageWrapper → unused/MessageWrapper}/props/defaultProps.js +0 -0
- /package/es/{MessageWrapper → unused/MessageWrapper}/props/propTypes.js +0 -0
- /package/es/{TextMessage → unused/TextMessage}/css/TextMessage.module.css +0 -0
- /package/es/{TextMessage → unused/TextMessage}/css/cssJSLogic.js +0 -0
- /package/es/{TextMessage → unused/TextMessage}/index.js +0 -0
- /package/es/{TextMessage → unused/TextMessage}/props/defaultProps.js +0 -0
- /package/es/{TextMessage → unused/TextMessage}/props/propConstants.js +0 -0
- /package/es/{TextMessage → unused/TextMessage}/props/propTypes.js +0 -0
- /package/es/{Theme → unused}/darkTheme.js +0 -0
- /package/es/{Theme → unused}/defaultTheme.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Article } from
|
|
2
|
-
export { default as Quote } from
|
|
1
|
+
export { default as Article } from './Article';
|
|
2
|
+
export { default as Quote } from './Quote';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { default as ChInstagram } from
|
|
2
|
-
export { default as ChWhatsApp } from
|
|
3
|
-
export { default as TtASAP } from
|
|
4
|
-
export { default as TtTelegram } from
|
|
5
|
-
export { default as TtTwillio } from
|
|
6
|
-
export { default as TtTwitter } from
|
|
7
|
-
export { default as TtWechat } from
|
|
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,4 +1,4 @@
|
|
|
1
|
-
export { default as Clock } from
|
|
2
|
-
export { default as DoubleTick } from
|
|
3
|
-
export { default as Failed } from
|
|
4
|
-
export { default as Tick } from
|
|
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
|
|
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
|
-
} =
|
|
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
|
|
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
|
-
} =
|
|
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
|
-
|
|
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
|
|
5
|
+
import React from 'react';
|
|
6
6
|
|
|
7
7
|
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from
|
|
8
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
9
|
|
|
10
10
|
/** ** Constants *** */
|
|
11
|
-
import imAttachmentIconDefaultProps from
|
|
12
|
-
import imAttachmentIconPropTypes from
|
|
11
|
+
import imAttachmentIconDefaultProps from './props/defaultProps';
|
|
12
|
+
import imAttachmentIconPropTypes from './props/propTypes';
|
|
13
13
|
|
|
14
14
|
/** ** Methods *** */
|
|
15
|
-
import
|
|
16
|
-
import cssJSLogic from "./css/cssJSLogic";
|
|
15
|
+
import cssJSLogic from './css/cssJSLogic';
|
|
17
16
|
|
|
18
17
|
/** ** Styles *** */
|
|
19
|
-
import style from
|
|
20
|
-
import attachmentFileTypes from
|
|
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 =
|
|
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
|
-
|
|
57
|
+
headerCustomStyle: headerCustomStyle
|
|
59
58
|
})) : null;
|
|
60
59
|
}
|
|
61
60
|
IMAudioBubble.propTypes = imAudioBubblePropTypes;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** ** Methods *** */
|
|
2
|
-
import { compileClassNames } from
|
|
2
|
+
import { compileClassNames } from '@zohodesk/utils';
|
|
3
3
|
export default function cssJSLogic(props, style) {
|
|
4
|
-
|
|
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:
|
|
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
|
|
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
|
-
} =
|
|
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
|
-
|
|
44
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
} =
|
|
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
|
-
|
|
44
|
-
|
|
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
|
|
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
|
|
11
|
-
import imMessagePropTypes from
|
|
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
|
|
16
|
-
import IMTicketLink from
|
|
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
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
137
|
-
return /*#__PURE__*/React.createElement(IMTicketLink, {
|
|
111
|
+
return /*#__PURE__*/React.createElement(IMTicketLink, _extends({
|
|
138
112
|
ticketNumber: ticketNumber
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
-
|
|
189
|
-
|
|
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 =
|
|
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
|
-
|
|
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;
|