@zohoim/chat-components 0.0.5 → 0.0.7
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 +13 -11
- package/es/ArticleBubble/ArticleBubble.js +60 -0
- package/es/ArticleBubble/css/ArticleBubble.module.css +1 -0
- package/es/ArticleBubble/css/cssJSLogic.js +34 -0
- package/es/ArticleBubble/index.js +1 -0
- package/es/ArticleBubble/props/defaultProps.js +6 -0
- package/es/ArticleBubble/props/propTypes.js +10 -0
- package/es/AttachmentBubble/AttachmentBubble.js +55 -0
- package/es/AttachmentBubble/css/AttachmentBubble.module.css +17 -0
- package/es/AttachmentBubble/css/cssJSLogic.js +18 -0
- package/es/AttachmentBubble/index.js +1 -0
- package/es/AttachmentBubble/props/defaultProps.js +7 -0
- package/es/AttachmentBubble/props/propTypes.js +10 -0
- package/es/AttachmentBubbleInfo/AttachmentBubbleInfo.js +45 -0
- package/es/AttachmentBubbleInfo/css/AttachmentBubbleInfo.module.css +18 -0
- package/es/AttachmentBubbleInfo/css/cssJSLogic.js +18 -0
- package/es/AttachmentBubbleInfo/index.js +1 -0
- package/es/AttachmentBubbleInfo/props/defaultProps.js +6 -0
- package/es/AttachmentBubbleInfo/props/propTypes.js +8 -0
- package/es/Audio/Audio.js +60 -0
- package/es/Audio/css/Audio.module.css +3 -0
- package/es/Audio/css/cssJSLogic.js +14 -0
- package/es/Audio/index.js +1 -0
- package/es/Audio/props/defaultProps.js +7 -0
- package/es/Audio/props/propTypes.js +9 -0
- package/es/AudioBubble/AudioBubble.js +58 -0
- package/es/AudioBubble/css/AudioBubble.module.css +3 -0
- package/es/AudioBubble/css/cssJSLogic.js +20 -0
- package/es/AudioBubble/index.js +1 -0
- package/es/AudioBubble/props/defaultProps.js +8 -0
- package/es/AudioBubble/props/propTypes.js +12 -0
- package/es/IMArticleBubble/IMArticleBubble.js +55 -0
- package/es/IMArticleBubble/css/IMArticleBubble.module.css +0 -0
- package/es/IMArticleBubble/css/cssJSLogic.js +10 -0
- package/es/IMArticleBubble/index.js +1 -0
- package/es/IMArticleBubble/props/defaultProps.js +8 -0
- package/es/IMArticleBubble/props/propTypes.js +14 -0
- package/es/IMAttachmentBubble/IMAttachmentBubble.js +63 -0
- package/es/IMAttachmentBubble/css/IMAttachmentBubble.module.css +1 -0
- package/es/IMAttachmentBubble/css/cssJSLogic.js +10 -0
- package/es/IMAttachmentBubble/index.js +1 -0
- package/es/IMAttachmentBubble/props/defaultProps.js +10 -0
- package/es/IMAttachmentBubble/props/propTypes.js +16 -0
- package/es/IMAttachmentIcon/IMAttachmentIcon.js +86 -0
- package/es/IMAttachmentIcon/css/IMAttachmentIcon.module.css +4 -0
- package/es/IMAttachmentIcon/css/cssJSLogic.js +16 -0
- package/es/IMAttachmentIcon/index.js +1 -0
- package/es/IMAttachmentIcon/props/defaultProps.js +6 -0
- package/es/IMAttachmentIcon/props/propTypes.js +26 -0
- package/es/IMAudioBubble/IMAudioBubble.js +63 -0
- package/es/IMAudioBubble/css/IMAudioBubble.module.css +8 -0
- package/es/IMAudioBubble/css/cssJSLogic.js +20 -0
- package/es/IMAudioBubble/index.js +1 -0
- package/es/IMAudioBubble/props/defaultProps.js +11 -0
- package/es/IMAudioBubble/props/propTypes.js +17 -0
- package/es/IMAutoMessageInfo/IMAutoMessageInfo.js +43 -0
- package/es/IMAutoMessageInfo/css/IMAutoMessageInfo.module.css +13 -0
- package/es/IMAutoMessageInfo/css/cssJSLogic.js +10 -0
- package/es/IMAutoMessageInfo/index.js +1 -0
- package/es/IMAutoMessageInfo/props/defaultProps.js +6 -0
- package/es/IMAutoMessageInfo/props/propTypes.js +26 -0
- package/es/IMDateTime/IMDateTime.js +41 -0
- package/es/IMDateTime/css/IMDateTime.module.css +5 -0
- package/es/IMDateTime/css/cssJSLogic.js +10 -0
- package/es/IMDateTime/index.js +1 -0
- package/es/IMDateTime/props/defaultProps.js +6 -0
- package/es/IMDateTime/props/propTypes.js +6 -0
- package/es/IMImageBubble/IMImageBubble.js +49 -0
- package/es/IMImageBubble/css/IMImageBubble.module.css +0 -0
- package/es/IMImageBubble/css/cssJSLogic.js +10 -0
- package/es/IMImageBubble/index.js +1 -0
- package/es/IMImageBubble/props/defaultProps.js +7 -0
- package/es/IMImageBubble/props/propTypes.js +13 -0
- package/es/IMInfoBubble/IMInfoBubble.js +37 -0
- package/es/IMInfoBubble/css/IMInfoBubble.module.css +0 -0
- package/es/IMInfoBubble/css/cssJSLogic.js +10 -0
- package/es/IMInfoBubble/index.js +1 -0
- package/es/IMInfoBubble/props/defaultProps.js +6 -0
- package/es/IMInfoBubble/props/propTypes.js +6 -0
- package/es/IMLocationBubble/IMLocationBubble.js +49 -0
- package/es/IMLocationBubble/css/IMLocationBubble.module.css +0 -0
- package/es/IMLocationBubble/css/cssJSLogic.js +10 -0
- package/es/IMLocationBubble/index.js +1 -0
- package/es/IMLocationBubble/props/defaultProps.js +8 -0
- package/es/IMLocationBubble/props/propTypes.js +11 -0
- package/es/IMMessage/IMMessage.js +156 -109
- package/es/IMMessage/props/defaultProps.js +22 -35
- package/es/IMMessage/props/propTypes.js +96 -49
- package/es/IMMessageActions/IMMessageActions.js +9 -5
- package/es/IMMessageActions/css/IMMessageActions.module.css +2 -2
- package/es/IMMessageAvatar/props/defaultProps.js +4 -2
- package/es/IMMessageContent/IMMessageContent.js +84 -0
- package/es/IMMessageContent/css/IMMessageContent.module.css +0 -0
- package/es/IMMessageContent/css/cssJSLogic.js +10 -0
- package/es/IMMessageContent/index.js +1 -0
- package/es/IMMessageContent/props/defaultProps.js +8 -0
- package/es/IMMessageContent/props/propTypes.js +35 -0
- package/es/IMMessageMeta/IMMessageMeta.js +60 -0
- package/es/IMMessageMeta/css/IMMessageMeta.module.css +32 -0
- package/es/IMMessageMeta/css/cssJSLogic.js +20 -0
- package/es/IMMessageMeta/index.js +1 -0
- package/es/IMMessageMeta/props/defaultProps.js +10 -0
- package/es/IMMessageMeta/props/propTypes.js +30 -0
- package/es/IMMessageStatus/css/IMMessageStatus.module.css +6 -3
- package/es/IMReplyBubble/IMReplyBubble.js +37 -0
- package/es/IMReplyBubble/css/IMReplyBubble.module.css +0 -0
- package/es/IMReplyBubble/css/cssJSLogic.js +10 -0
- package/es/IMReplyBubble/index.js +1 -0
- package/es/IMReplyBubble/props/defaultProps.js +6 -0
- package/es/IMReplyBubble/props/propTypes.js +6 -0
- package/es/IMTextBubble/IMTextBubble.js +53 -0
- package/es/IMTextBubble/css/IMTextBubble.module.css +1 -0
- package/es/IMTextBubble/css/cssJSLogic.js +10 -0
- package/es/IMTextBubble/index.js +1 -0
- package/es/IMTextBubble/props/defaultProps.js +14 -0
- package/es/IMTextBubble/props/propTypes.js +15 -0
- package/es/IMTicketLink/IMTicketLink.js +48 -0
- package/es/IMTicketLink/css/IMTicketLink.module.css +24 -0
- package/es/IMTicketLink/css/cssJSLogic.js +14 -0
- package/es/IMTicketLink/index.js +1 -0
- package/es/IMTicketLink/props/defaultProps.js +6 -0
- package/es/IMTicketLink/props/propTypes.js +10 -0
- package/es/IMVideoBubble/IMVideoBubble.js +62 -0
- package/es/IMVideoBubble/css/IMVideoBubble.module.css +1 -0
- package/es/IMVideoBubble/css/cssJSLogic.js +10 -0
- package/es/IMVideoBubble/index.js +1 -0
- package/es/IMVideoBubble/props/defaultProps.js +11 -0
- package/es/IMVideoBubble/props/propTypes.js +17 -0
- package/es/ImageBubble/ImageBubble.js +52 -0
- package/es/ImageBubble/css/ImageBubble.module.css +53 -0
- package/es/ImageBubble/css/cssJSLogic.js +22 -0
- package/es/ImageBubble/index.js +1 -0
- package/es/ImageBubble/props/defaultProps.js +6 -0
- package/es/ImageBubble/props/propTypes.js +8 -0
- package/es/InfoBubble/InfoBubble.js +37 -0
- package/es/InfoBubble/css/InfoBubble.module.css +0 -0
- package/es/InfoBubble/css/cssJSLogic.js +10 -0
- package/es/InfoBubble/index.js +1 -0
- package/es/InfoBubble/props/defaultProps.js +6 -0
- package/es/InfoBubble/props/propTypes.js +6 -0
- package/es/LazyLoadImage/LazyLoadImage.js +48 -0
- package/es/LazyLoadImage/css/LazyLoadImage.module.css +4 -0
- package/es/LazyLoadImage/css/cssJSLogic.js +10 -0
- package/es/LazyLoadImage/index.js +1 -0
- package/es/LazyLoadImage/props/defaultProps.js +6 -0
- package/es/LazyLoadImage/props/propTypes.js +8 -0
- package/es/LocationBubble/LocationBubble.js +63 -0
- package/es/LocationBubble/css/LocationBubble.module.css +3 -0
- package/es/LocationBubble/css/cssJSLogic.js +30 -0
- package/es/LocationBubble/images/location.png +0 -0
- package/es/LocationBubble/index.js +1 -0
- package/es/LocationBubble/props/defaultProps.js +6 -0
- package/es/LocationBubble/props/propTypes.js +7 -0
- package/es/MediaControls/MediaControls.js +60 -0
- package/es/MediaControls/css/MediaControls.module.css +1 -0
- package/es/MediaControls/css/cssJSLogic.js +22 -0
- package/es/MediaControls/index.js +1 -0
- package/es/MediaControls/props/defaultProps.js +6 -0
- package/es/MediaControls/props/propTypes.js +11 -0
- package/es/Message/Message.js +136 -0
- package/es/Message/css/Message.module.css +0 -0
- package/es/Message/css/cssJSLogic.js +10 -0
- package/es/Message/index.js +1 -0
- package/es/Message/props/defaultProps.js +43 -0
- package/es/Message/props/propTypes.js +98 -0
- package/es/MessageAction/MessageAction.js +4 -2
- package/es/MessageActions/MessageActions.js +1 -1
- package/es/MessageActionsMore/MessageActionsMore.js +5 -3
- package/es/MessageAvatar/MessageAvatar.js +9 -9
- package/es/MessageAvatar/props/defaultProps.js +4 -2
- package/es/MessageBox/MessageBox.js +5 -2
- package/es/MessageBox/css/MessageBox.module.css +14 -0
- package/es/MessageBox/css/cssJSLogic.js +12 -1
- package/es/MessageBox/props/defaultProps.js +3 -1
- package/es/MessageBox/props/propTypes.js +3 -1
- package/es/MessageBoxFooter/MessageBoxFooter.js +1 -1
- package/es/MessageBubble/MessageBubble.js +10 -10
- package/es/MessageWrapper/MessageWrapper.js +37 -0
- package/es/MessageWrapper/css/MessageWrapper.module.css +0 -0
- package/es/MessageWrapper/css/cssJSLogic.js +10 -0
- package/es/MessageWrapper/index.js +1 -0
- package/es/MessageWrapper/props/defaultProps.js +6 -0
- package/es/MessageWrapper/props/propTypes.js +6 -0
- package/es/MoreActionItem/MoreActionItem.js +9 -9
- package/es/MoreActionItem/props/defaultProps.js +1 -1
- package/es/MoreActionItem/props/propTypes.js +1 -1
- package/es/ReplyBubble/ReplyBubble.js +41 -0
- package/es/ReplyBubble/css/ReplyBubble.module.css +0 -0
- package/es/ReplyBubble/css/cssJSLogic.js +10 -0
- package/es/ReplyBubble/index.js +1 -0
- package/es/ReplyBubble/props/defaultProps.js +6 -0
- package/es/ReplyBubble/props/propTypes.js +6 -0
- package/es/ReplyBubbleHeader/ReplyBubbleHeader.js +53 -0
- package/es/ReplyBubbleHeader/css/ReplyBubbleHeader.module.css +0 -0
- package/es/ReplyBubbleHeader/css/cssJSLogic.js +10 -0
- package/es/ReplyBubbleHeader/index.js +1 -0
- package/es/ReplyBubbleHeader/props/defaultProps.js +9 -0
- package/es/ReplyBubbleHeader/props/propTypes.js +9 -0
- package/es/TextBubble/TextBubble.js +56 -0
- package/es/TextBubble/css/TextBubble.module.css +1 -0
- package/es/TextBubble/css/cssJSLogic.js +18 -0
- package/es/TextBubble/index.js +1 -0
- package/es/TextBubble/props/defaultProps.js +9 -0
- package/es/TextBubble/props/propTypes.js +10 -0
- package/es/Theme/DeskAssets.js +53 -0
- package/es/Theme/ThemeWrapper.js +82 -0
- package/es/Theme/ToolttipWrapper.js +81 -0
- package/es/Theme/constants/index.js +44 -0
- package/es/Theme/crm/dark/blueFanTheme.js +28 -0
- package/es/Theme/crm/dark/blueTheme.js +28 -0
- package/es/Theme/crm/dark/commonColorVariable.js +11 -0
- package/es/Theme/crm/dark/darkBlueTheme.js +28 -0
- package/es/Theme/crm/dark/darkGreyTheme.js +28 -0
- package/es/Theme/crm/dark/greenTheme.js +28 -0
- package/es/Theme/crm/dark/orangeTheme.js +28 -0
- package/es/Theme/crm/dark/pinkTheme.js +28 -0
- package/es/Theme/crm/dark/tealTheme.js +28 -0
- package/es/Theme/crm/dark/whiteTheme.js +28 -0
- package/es/Theme/crm/light/blueFanTheme.js +28 -0
- package/es/Theme/crm/light/blueTheme.js +31 -0
- package/es/Theme/crm/light/commonColorVariable.js +9 -0
- package/es/Theme/crm/light/darkBlueTheme.js +28 -0
- package/es/Theme/crm/light/darkGreyTheme.js +28 -0
- package/es/Theme/crm/light/greenTheme.js +28 -0
- package/es/Theme/crm/light/orangeTheme.js +28 -0
- package/es/Theme/crm/light/pinkTheme.js +28 -0
- package/es/Theme/crm/light/tealTheme.js +28 -0
- package/es/Theme/crm/light/whiteTheme.js +28 -0
- package/es/Theme/crm/pureDark/blueFanTheme.js +28 -0
- package/es/Theme/crm/pureDark/blueTheme.js +28 -0
- package/es/Theme/crm/pureDark/commonColorVariable.js +9 -0
- package/es/Theme/crm/pureDark/darkBlueTheme.js +28 -0
- package/es/Theme/crm/pureDark/darkGreyTheme.js +28 -0
- package/es/Theme/crm/pureDark/greenTheme.js +28 -0
- package/es/Theme/crm/pureDark/orangeTheme.js +28 -0
- package/es/Theme/crm/pureDark/pinkTheme.js +28 -0
- package/es/Theme/crm/pureDark/tealTheme.js +28 -0
- package/es/Theme/crm/pureDark/whiteTheme.js +28 -0
- package/es/Theme/css/TooltipWrapper.module.css +10 -0
- package/es/Theme/css/cssJSLogic.js +14 -0
- package/es/Theme/desk/commonDeskColorVariable.js +12 -0
- package/es/Theme/desk/dark/blueTheme.js +30 -0
- package/es/Theme/desk/dark/commonColorVariable.js +5 -0
- package/es/Theme/desk/dark/greenTheme.js +30 -0
- package/es/Theme/desk/dark/orangeTheme.js +30 -0
- package/es/Theme/desk/dark/redTheme.js +30 -0
- package/es/Theme/desk/dark/yellowTheme.js +30 -0
- package/es/Theme/desk/light/blueTheme.js +33 -0
- package/es/Theme/desk/light/commonColorVariable.js +5 -0
- package/es/Theme/desk/light/greenTheme.js +30 -0
- package/es/Theme/desk/light/orangeTheme.js +29 -0
- package/es/Theme/desk/light/redTheme.js +29 -0
- package/es/Theme/desk/light/yellowTheme.js +30 -0
- package/es/Theme/desk/pureDark/blueTheme.js +30 -0
- package/es/Theme/desk/pureDark/commonColorVariable.js +6 -0
- package/es/Theme/desk/pureDark/greenTheme.js +30 -0
- package/es/Theme/desk/pureDark/orangeTheme.js +30 -0
- package/es/Theme/desk/pureDark/redTheme.js +30 -0
- package/es/Theme/desk/pureDark/yellowTheme.js +30 -0
- package/es/Theme/index.js +1 -0
- package/es/Theme/props/defaultProps.js +13 -0
- package/es/Theme/props/propTypes.js +15 -0
- package/es/Theme/utils/getThemeConfigurations.js +209 -0
- package/es/Video/Video.js +69 -0
- package/es/Video/css/Video.module.css +9 -0
- package/es/Video/css/cssJSLogic.js +14 -0
- package/es/Video/index.js +1 -0
- package/es/Video/props/defaultProps.js +7 -0
- package/es/Video/props/propTypes.js +9 -0
- package/es/VideoBubble/VideoBubble.js +57 -0
- package/es/VideoBubble/css/VideoBubble.module.css +4 -0
- package/es/VideoBubble/css/cssJSLogic.js +10 -0
- package/es/VideoBubble/index.js +1 -0
- package/es/VideoBubble/props/defaultProps.js +8 -0
- package/es/VideoBubble/props/propTypes.js +12 -0
- package/es/icons/create-icon-components.js +1 -1
- package/es/icons/factory/attachments/audio.svg +19 -0
- package/es/icons/factory/attachments/code.svg +21 -0
- package/es/icons/factory/attachments/image.svg +20 -0
- package/es/icons/factory/attachments/pdf.svg +19 -0
- package/es/icons/factory/attachments/txt.svg +22 -0
- package/es/icons/factory/attachments/unknown.svg +21 -0
- package/es/icons/factory/attachments/video.svg +19 -0
- package/es/icons/factory/attachments/zip.svg +27 -0
- package/es/icons/iconSrc/actions/ConvertTicket.js +1 -1
- package/es/icons/iconSrc/attachments/Audio.js +37 -0
- package/es/icons/iconSrc/attachments/Code.js +43 -0
- package/es/icons/iconSrc/attachments/Image.js +42 -0
- package/es/icons/iconSrc/attachments/Pdf.js +37 -0
- package/es/icons/iconSrc/attachments/Txt.js +46 -0
- package/es/icons/iconSrc/attachments/Unknown.js +41 -0
- package/es/icons/iconSrc/attachments/Video.js +37 -0
- package/es/icons/iconSrc/attachments/Zip.js +85 -0
- package/es/icons/iconSrc/attachments/index.js +8 -0
- package/es/icons/iconSrc/integrations/TtASAP.js +1 -1
- package/es/icons/iconSrc/integrations/TtTelegram.js +1 -1
- package/es/icons/iconSrc/integrations/TtTwillio.js +1 -1
- package/es/icons/iconSrc/integrations/TtTwitter.js +1 -1
- package/es/icons/iconSrc/integrations/TtWechat.js +1 -1
- package/es/index.js +33 -0
- package/package.json +8 -4
- /package/es/MessageActionsMore/css/{cssJsLogic.js → cssJSLogic.js} +0 -0
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
4
|
/** ** Constants *** */
|
|
5
|
-
import integrationConstants from '@zohoim/chat-components-utils/es/constants/integrationConstants';
|
|
6
5
|
import { defaultMessageActions } from '@zohoim/chat-components-utils/es/constants/messageActionConstants';
|
|
7
6
|
import messageStatusConstants from '@zohoim/chat-components-utils/es/constants/messageStatusConstants';
|
|
8
|
-
import { direction } from '@zohoim/chat-components-utils/es/constants/messageConstants';
|
|
9
7
|
import sizes from '@zohoim/chat-components-utils/es/constants/sizes';
|
|
10
8
|
const {
|
|
11
9
|
REPLY,
|
|
@@ -16,15 +14,6 @@ const {
|
|
|
16
14
|
DELETE,
|
|
17
15
|
FORWARD
|
|
18
16
|
} = defaultMessageActions;
|
|
19
|
-
const {
|
|
20
|
-
WHATSAPP,
|
|
21
|
-
TELEGRAM,
|
|
22
|
-
INSTAGRAM,
|
|
23
|
-
ASAP,
|
|
24
|
-
WECHAT,
|
|
25
|
-
TWILLIO,
|
|
26
|
-
LINE
|
|
27
|
-
} = integrationConstants;
|
|
28
17
|
const {
|
|
29
18
|
SENT,
|
|
30
19
|
SAVED,
|
|
@@ -35,64 +24,122 @@ const {
|
|
|
35
24
|
FAILED,
|
|
36
25
|
OUTGOING
|
|
37
26
|
} = messageStatusConstants;
|
|
38
|
-
const {
|
|
39
|
-
IN,
|
|
40
|
-
OUT
|
|
41
|
-
} = direction;
|
|
42
27
|
const imMessagePropTypes = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
28
|
+
messageDetails: PropTypes.shape({
|
|
29
|
+
direction: PropTypes.string,
|
|
30
|
+
actor: PropTypes.shape({
|
|
31
|
+
type: PropTypes.string,
|
|
32
|
+
photoURL: PropTypes.string,
|
|
33
|
+
name: PropTypes.string,
|
|
34
|
+
contactName: PropTypes.string,
|
|
35
|
+
externalId: PropTypes.string
|
|
36
|
+
}),
|
|
37
|
+
status: PropTypes.string,
|
|
38
|
+
meta: PropTypes.shape({
|
|
39
|
+
SYSTEM_MESSAGE_TYPE: PropTypes.string,
|
|
40
|
+
DESK_KB_ARTICLE_TRANSLATION_ID: PropTypes.string,
|
|
41
|
+
DESK_TICKET_NUMBER: PropTypes.string,
|
|
42
|
+
DESK_TICKET_ID: PropTypes.string
|
|
43
|
+
}),
|
|
44
|
+
attachment: PropTypes.string,
|
|
45
|
+
location: PropTypes.string,
|
|
46
|
+
layout: PropTypes.string,
|
|
47
|
+
contentType: PropTypes.string,
|
|
48
|
+
replyToMessage: PropTypes.object,
|
|
49
|
+
kbArticle: PropTypes.string,
|
|
50
|
+
type: PropTypes.string,
|
|
51
|
+
displayMessage: PropTypes.string,
|
|
52
|
+
createdTime: PropTypes.string,
|
|
53
|
+
id: PropTypes.string
|
|
54
|
+
}),
|
|
55
|
+
sessionDetails: PropTypes.shape({
|
|
56
|
+
integrationService: PropTypes.string
|
|
57
|
+
}),
|
|
58
|
+
defaultAgentAvatar: PropTypes.string,
|
|
59
|
+
autoMessageAvatar: PropTypes.string,
|
|
60
|
+
defaultContactAvatar: PropTypes.string,
|
|
61
|
+
highlightMessageId: PropTypes.string,
|
|
62
|
+
isSameSender: PropTypes.bool,
|
|
63
|
+
isSingleMessage: PropTypes.bool,
|
|
64
|
+
messageStatusI18N: PropTypes.shape({
|
|
65
|
+
[SENT]: PropTypes.string,
|
|
66
|
+
[SAVED]: PropTypes.string,
|
|
67
|
+
[QUEUED]: PropTypes.string,
|
|
68
|
+
[DELIVERED]: PropTypes.string,
|
|
69
|
+
[READ]: PropTypes.string,
|
|
70
|
+
[UNSENT]: PropTypes.string,
|
|
71
|
+
[FAILED]: PropTypes.string,
|
|
72
|
+
[OUTGOING]: PropTypes.string
|
|
73
|
+
}),
|
|
74
|
+
isCurrentAgent: PropTypes.bool.isRequired,
|
|
75
|
+
isSameTimeMessage: PropTypes.bool,
|
|
76
|
+
messageActionDetails: PropTypes.shape({
|
|
77
|
+
[REPLY]: PropTypes.shape({
|
|
78
|
+
id: PropTypes.string,
|
|
79
|
+
displayText: PropTypes.string,
|
|
80
|
+
iconTitle: PropTypes.string,
|
|
81
|
+
onClick: PropTypes.func
|
|
82
|
+
}),
|
|
83
|
+
[COPY]: PropTypes.shape({
|
|
84
|
+
id: PropTypes.string,
|
|
85
|
+
displayText: PropTypes.string,
|
|
86
|
+
iconTitle: PropTypes.string,
|
|
87
|
+
onClick: PropTypes.func
|
|
88
|
+
}),
|
|
89
|
+
[DOWNLOAD]: PropTypes.shape({
|
|
90
|
+
id: PropTypes.string,
|
|
91
|
+
displayText: PropTypes.string,
|
|
92
|
+
iconTitle: PropTypes.string,
|
|
93
|
+
onClick: PropTypes.func
|
|
94
|
+
}),
|
|
95
|
+
[CREATE_TICKET]: PropTypes.shape({
|
|
96
|
+
id: PropTypes.string,
|
|
97
|
+
displayText: PropTypes.string,
|
|
98
|
+
iconTitle: PropTypes.string,
|
|
99
|
+
onClick: PropTypes.func
|
|
100
|
+
}),
|
|
101
|
+
[RESEND]: PropTypes.shape({
|
|
102
|
+
id: PropTypes.string,
|
|
103
|
+
displayText: PropTypes.string,
|
|
104
|
+
iconTitle: PropTypes.string,
|
|
105
|
+
onClick: PropTypes.func
|
|
106
|
+
}),
|
|
107
|
+
[DELETE]: PropTypes.shape({
|
|
108
|
+
id: PropTypes.string,
|
|
109
|
+
displayText: PropTypes.string,
|
|
110
|
+
iconTitle: PropTypes.string,
|
|
111
|
+
onClick: PropTypes.func
|
|
112
|
+
}),
|
|
113
|
+
[FORWARD]: PropTypes.shape({
|
|
114
|
+
id: PropTypes.string,
|
|
115
|
+
displayText: PropTypes.string,
|
|
116
|
+
iconTitle: PropTypes.string,
|
|
117
|
+
onClick: PropTypes.func
|
|
118
|
+
})
|
|
119
|
+
}),
|
|
120
|
+
canReply: PropTypes.bool.isRequired,
|
|
121
|
+
messageBubbleCustomStyle: PropTypes.object,
|
|
46
122
|
needMessageActions: PropTypes.bool,
|
|
47
|
-
renderMessageBoxFooter: PropTypes.func,
|
|
48
|
-
/* Avatar Related Props Start */
|
|
49
123
|
needSender: PropTypes.bool,
|
|
50
|
-
isShowSender: PropTypes.bool,
|
|
51
|
-
senderSrc: PropTypes.string,
|
|
52
|
-
senderAlternateSrc: PropTypes.string,
|
|
53
|
-
senderTitle: PropTypes.string,
|
|
54
124
|
senderAvatarSize: PropTypes.oneOf(['xxsmall', 'small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
55
|
-
senderName: PropTypes.string,
|
|
56
125
|
avatarCustomStyle: PropTypes.object,
|
|
57
|
-
senderIntegrationIcon: PropTypes.oneOf([WHATSAPP, TELEGRAM, INSTAGRAM, ASAP, WECHAT, TWILLIO, LINE]),
|
|
58
126
|
senderIntegrationIconSize: PropTypes.oneOf([sizes.SMALL, sizes.MEDIUM]),
|
|
59
127
|
senderIntegrationIconCustomStyle: PropTypes.object,
|
|
60
128
|
isCustomIntegrationIcon: PropTypes.bool,
|
|
61
129
|
isCustomSenderAvatar: PropTypes.bool,
|
|
62
130
|
renderCustomIntegrationIcon: PropTypes.func,
|
|
63
131
|
renderCustomSenderAvatar: PropTypes.func,
|
|
64
|
-
/*Avatar Related Props End*/
|
|
65
|
-
|
|
66
|
-
/* MessageBox Props Start */
|
|
67
132
|
needMessageBox: PropTypes.bool,
|
|
68
|
-
renderMessage: PropTypes.func,
|
|
133
|
+
renderMessage: PropTypes.func.isRequired,
|
|
69
134
|
renderMessageFooter: PropTypes.func,
|
|
70
135
|
renderMessageHeader: PropTypes.func,
|
|
71
136
|
messageBoxCustomStyle: PropTypes.object,
|
|
72
|
-
isFailedMessage: PropTypes.bool,
|
|
73
|
-
/*MessageBox Props End */
|
|
74
|
-
|
|
75
|
-
/* MessageAction Props Start */
|
|
76
|
-
messageActions: PropTypes.arrayOf(PropTypes.shape({
|
|
77
|
-
id: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf([REPLY, COPY, DOWNLOAD, CREATE_TICKET, RESEND, DELETE, FORWARD])]).isRequired,
|
|
78
|
-
displayText: PropTypes.string,
|
|
79
|
-
renderFunction: PropTypes.func,
|
|
80
|
-
iconTitle: PropTypes.string
|
|
81
|
-
})),
|
|
82
137
|
renderSecondaryActions: PropTypes.func,
|
|
83
138
|
actionsDefaultShowCount: PropTypes.number,
|
|
84
139
|
actionIconCustomStyle: PropTypes.object,
|
|
85
140
|
moreActionItemCustomStyle: PropTypes.object,
|
|
86
|
-
onSelectAction: PropTypes.func,
|
|
87
141
|
messageActionCustomStyle: PropTypes.object,
|
|
88
142
|
moreActionPopupCustomStyle: PropTypes.object,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/* MessageStatus Props Start */
|
|
92
|
-
messageStatus: PropTypes.oneOf([SENT, SAVED, QUEUED, DELIVERED, READ, UNSENT, FAILED, OUTGOING]),
|
|
93
|
-
messageStatusCustomStyle: PropTypes.object,
|
|
94
|
-
statusTitle: PropTypes.string
|
|
95
|
-
/*MessageStatus Props End */
|
|
143
|
+
messageStatusCustomStyle: PropTypes.object
|
|
96
144
|
};
|
|
97
|
-
|
|
98
145
|
export default imMessagePropTypes;
|
|
@@ -25,7 +25,7 @@ import ConvertTicket from '../icons/iconSrc/actions/ConvertTicket';
|
|
|
25
25
|
import useIMMessageActions from '@zohoim/chat-components-hooks/es/IMMessageActions/useIMMessageActions';
|
|
26
26
|
|
|
27
27
|
/** ** Methods *** */
|
|
28
|
-
import renderHandler from '@zohoim/chat-components-utils/es/renderHandler';
|
|
28
|
+
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
29
29
|
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
30
30
|
import cssJSLogic from './css/cssJSLogic';
|
|
31
31
|
|
|
@@ -77,10 +77,12 @@ export default function IMMessageActions(props) {
|
|
|
77
77
|
} = actionDetails;
|
|
78
78
|
function handleClickAction(_ref) {
|
|
79
79
|
let {
|
|
80
|
-
id
|
|
80
|
+
id,
|
|
81
|
+
e
|
|
81
82
|
} = _ref;
|
|
82
83
|
onSelect && onSelect({
|
|
83
|
-
id
|
|
84
|
+
id,
|
|
85
|
+
e
|
|
84
86
|
});
|
|
85
87
|
}
|
|
86
88
|
function renderIcon(_ref2) {
|
|
@@ -105,7 +107,8 @@ export default function IMMessageActions(props) {
|
|
|
105
107
|
let {
|
|
106
108
|
id,
|
|
107
109
|
isShowInMore,
|
|
108
|
-
action
|
|
110
|
+
action,
|
|
111
|
+
closePopup
|
|
109
112
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
110
113
|
const {
|
|
111
114
|
displayText,
|
|
@@ -121,7 +124,8 @@ export default function IMMessageActions(props) {
|
|
|
121
124
|
isShowInMore: isShowInMore,
|
|
122
125
|
iconTitle: iconTitle,
|
|
123
126
|
actionIconCustomStyle: actionIconCustomStyle,
|
|
124
|
-
moreItemCustomStyle: moreItemCustomStyle
|
|
127
|
+
moreItemCustomStyle: moreItemCustomStyle,
|
|
128
|
+
closePopup: closePopup
|
|
125
129
|
});
|
|
126
130
|
}
|
|
127
131
|
function renderMoreIcon() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.varClass {
|
|
2
|
-
--imMessageActions-secondaryActions_margin: var(--imlib_size_5);
|
|
2
|
+
/* --imMessageActions-secondaryActions_margin: var(--imlib_size_5); */
|
|
3
3
|
--imMessageActions-action_icon_size: var(--imlib_size_15);
|
|
4
4
|
}
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
.secondaryActions {
|
|
15
15
|
composes: varClass;
|
|
16
|
-
margin-top: var(--imMessageActions-secondaryActions_margin);
|
|
16
|
+
/* margin-top: var(--imMessageActions-secondaryActions_margin); */
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.icon {
|
|
@@ -4,7 +4,9 @@ const imMessageActionsDefaultProps = {
|
|
|
4
4
|
customStyle: dummyObject,
|
|
5
5
|
iconCustomStyle: dummyObject,
|
|
6
6
|
isCustomIcon: false,
|
|
7
|
-
title: '
|
|
8
|
-
|
|
7
|
+
title: '',
|
|
8
|
+
//'RAVI KUMAR',
|
|
9
|
+
name: '' //'RAVI KUMAR',
|
|
9
10
|
};
|
|
11
|
+
|
|
10
12
|
export default imMessageActionsDefaultProps;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-no-bind */
|
|
2
|
+
/* eslint-disable max-len */
|
|
3
|
+
|
|
4
|
+
/** ** Libraries *** */
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
/** ** Hooks *** */
|
|
8
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
+
|
|
10
|
+
/** ** Constants *** */
|
|
11
|
+
import imMessageContentDefaultProps from './props/defaultProps';
|
|
12
|
+
import imMessageContentPropTypes from './props/propTypes';
|
|
13
|
+
|
|
14
|
+
/** ** Methods *** */
|
|
15
|
+
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
16
|
+
import cssJSLogic from './css/cssJSLogic';
|
|
17
|
+
|
|
18
|
+
/** ** Styles *** */
|
|
19
|
+
import style from './css/IMMessageContent.module.css';
|
|
20
|
+
import useIMMessageContent from '@zohoim/chat-components-hooks/es/IMMessageContent/useIMMessageContent';
|
|
21
|
+
import { messageTypes, mediaTypes as mediaTypeConstants } from '@zohoim/chat-components-utils/es/constants/messageConstants';
|
|
22
|
+
import IMReplyBubble from '../IMReplyBubble/IMReplyBubble';
|
|
23
|
+
import IMLocationBubble from '../IMLocationBubble/IMLocationBubble';
|
|
24
|
+
import IMTextBubble from '../IMTextBubble/IMTextBubble';
|
|
25
|
+
import IMImageBubble from '../IMImageBubble/IMImageBubble';
|
|
26
|
+
import IMVideoBubble from '../IMVideoBubble/IMVideoBubble';
|
|
27
|
+
import IMAudioBubble from '../IMAudioBubble/IMAudioBubble';
|
|
28
|
+
import IMAttachmentBubble from '../IMAttachmentBubble/IMAttachmentBubble';
|
|
29
|
+
import IMArticleBubble from '../IMArticleBubble/IMArticleBubble';
|
|
30
|
+
export default function IMMessageContent(props) {
|
|
31
|
+
const {
|
|
32
|
+
customStyle,
|
|
33
|
+
messageDetails,
|
|
34
|
+
seeMoreText
|
|
35
|
+
} = props;
|
|
36
|
+
const {
|
|
37
|
+
isShowLayoutBubble,
|
|
38
|
+
isShowReplyBubble,
|
|
39
|
+
isShowImageBubble,
|
|
40
|
+
isShowVideoBubble,
|
|
41
|
+
isShowAudioBubble,
|
|
42
|
+
isShowAttachmentBubble,
|
|
43
|
+
isShowLocationBubble,
|
|
44
|
+
isShowArticleBubble,
|
|
45
|
+
isShowTextBubble
|
|
46
|
+
} = useIMMessageContent({
|
|
47
|
+
messageDetails
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/* External customization */
|
|
51
|
+
const newStyle = useMergeStyle(style, customStyle);
|
|
52
|
+
/* CSS classnames added based on logic */
|
|
53
|
+
const {
|
|
54
|
+
imMessageContentClass
|
|
55
|
+
} = cssJSLogic(props, newStyle);
|
|
56
|
+
const {
|
|
57
|
+
attachment: attachmentDetails,
|
|
58
|
+
location: locationDetails,
|
|
59
|
+
kbArticle: articleDetails
|
|
60
|
+
} = messageDetails || {};
|
|
61
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: imMessageContentClass
|
|
63
|
+
}, isShowLayoutBubble ? null : null, isShowReplyBubble ? /*#__PURE__*/React.createElement(IMReplyBubble, {
|
|
64
|
+
messageDetails: messageDetails
|
|
65
|
+
}) : null, isShowImageBubble ? /*#__PURE__*/React.createElement(IMImageBubble, {
|
|
66
|
+
attachmentDetails: attachmentDetails
|
|
67
|
+
}) : null, isShowVideoBubble ? /*#__PURE__*/React.createElement(IMVideoBubble, {
|
|
68
|
+
attachmentDetails: attachmentDetails
|
|
69
|
+
}) : null, isShowAudioBubble ? /*#__PURE__*/React.createElement(IMAudioBubble, {
|
|
70
|
+
attachmentDetails: attachmentDetails
|
|
71
|
+
}) : null, isShowAttachmentBubble ? /*#__PURE__*/React.createElement(IMAttachmentBubble, {
|
|
72
|
+
attachmentDetails: attachmentDetails
|
|
73
|
+
}) : null, isShowLocationBubble ? /*#__PURE__*/React.createElement(IMLocationBubble, {
|
|
74
|
+
locationDetails: locationDetails
|
|
75
|
+
}) : null, isShowArticleBubble ? /*#__PURE__*/React.createElement(IMArticleBubble, {
|
|
76
|
+
articleDetails: articleDetails
|
|
77
|
+
}) : null, isShowTextBubble ? /*#__PURE__*/React.createElement(IMTextBubble, {
|
|
78
|
+
messageDetails: messageDetails,
|
|
79
|
+
moreText: seeMoreText
|
|
80
|
+
}) : null);
|
|
81
|
+
}
|
|
82
|
+
IMMessageContent.propTypes = imMessageContentPropTypes;
|
|
83
|
+
IMMessageContent.defaultProps = imMessageContentDefaultProps;
|
|
84
|
+
IMMessageContent.displayName = 'IMMessageContent';
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** ** Methods *** */
|
|
2
|
+
import { compileClassNames } from '@zohodesk/utils';
|
|
3
|
+
export default function cssJSLogic(props, style) {
|
|
4
|
+
const imMessageContentClass = compileClassNames({
|
|
5
|
+
[style.imMessageContent]: true
|
|
6
|
+
});
|
|
7
|
+
return {
|
|
8
|
+
imMessageContentClass
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IMMessageContent } from './IMMessageContent';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** ** Constants *** */
|
|
2
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
3
|
+
const imMessageContentDefaultProps = {
|
|
4
|
+
customStyle: dummyObject,
|
|
5
|
+
moreText: 'See More',
|
|
6
|
+
messageDetails: dummyObject
|
|
7
|
+
};
|
|
8
|
+
export default imMessageContentDefaultProps;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** ** Libraries *** */
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
const imMessageContentPropTypes = {
|
|
4
|
+
customStyle: PropTypes.object,
|
|
5
|
+
messageDetails: PropTypes.shape({
|
|
6
|
+
direction: PropTypes.string,
|
|
7
|
+
actor: PropTypes.shape({
|
|
8
|
+
type: PropTypes.string,
|
|
9
|
+
photoURL: PropTypes.string,
|
|
10
|
+
name: PropTypes.string,
|
|
11
|
+
contactName: PropTypes.string,
|
|
12
|
+
externalId: PropTypes.string
|
|
13
|
+
}),
|
|
14
|
+
status: PropTypes.string,
|
|
15
|
+
meta: PropTypes.shape({
|
|
16
|
+
SYSTEM_MESSAGE_TYPE: PropTypes.string,
|
|
17
|
+
DESK_KB_ARTICLE_TRANSLATION_ID: PropTypes.string,
|
|
18
|
+
DESK_TICKET_NUMBER: PropTypes.string,
|
|
19
|
+
DESK_TICKET_ID: PropTypes.string
|
|
20
|
+
}),
|
|
21
|
+
attachment: PropTypes.string,
|
|
22
|
+
location: PropTypes.string,
|
|
23
|
+
layout: PropTypes.string,
|
|
24
|
+
contentType: PropTypes.string,
|
|
25
|
+
replyToMessage: PropTypes.object,
|
|
26
|
+
kbArticle: PropTypes.string,
|
|
27
|
+
type: PropTypes.string,
|
|
28
|
+
displayMessage: PropTypes.string,
|
|
29
|
+
fullMessage: PropTypes.string,
|
|
30
|
+
createdTime: PropTypes.string,
|
|
31
|
+
id: PropTypes.string
|
|
32
|
+
}),
|
|
33
|
+
moreText: PropTypes.string
|
|
34
|
+
};
|
|
35
|
+
export default imMessageContentPropTypes;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-no-bind */
|
|
2
|
+
/* eslint-disable max-len */
|
|
3
|
+
|
|
4
|
+
/** ** Libraries *** */
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
/** ** Hooks *** */
|
|
8
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
+
|
|
10
|
+
/** ** Constants *** */
|
|
11
|
+
import imMessageMetaDefaultProps from './props/defaultProps';
|
|
12
|
+
import imMessageMetaPropTypes from './props/propTypes';
|
|
13
|
+
|
|
14
|
+
/** ** Methods *** */
|
|
15
|
+
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
16
|
+
import cssJSLogic from './css/cssJSLogic';
|
|
17
|
+
|
|
18
|
+
/** ** Styles *** */
|
|
19
|
+
import style from './css/IMMessageMeta.module.css';
|
|
20
|
+
|
|
21
|
+
/** ** Components *** */
|
|
22
|
+
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
23
|
+
import IMDateTime from '../IMDateTime/IMDateTime';
|
|
24
|
+
import IMAutoMessageInfo from '../IMAutoMessageInfo/IMAutoMessageInfo';
|
|
25
|
+
export default function IMMessageMeta(props) {
|
|
26
|
+
const {
|
|
27
|
+
customStyle,
|
|
28
|
+
autoMessageCustomStyle,
|
|
29
|
+
timeCustomStyle,
|
|
30
|
+
time,
|
|
31
|
+
autoMessageType,
|
|
32
|
+
autoMessagesI18N,
|
|
33
|
+
autoMessagesTitleI18N
|
|
34
|
+
} = props;
|
|
35
|
+
|
|
36
|
+
/* External customization */
|
|
37
|
+
const newStyle = useMergeStyle(style, customStyle);
|
|
38
|
+
/* CSS classnames added based on logic */
|
|
39
|
+
const {
|
|
40
|
+
imMessageMetaClass,
|
|
41
|
+
dotClass
|
|
42
|
+
} = cssJSLogic(props, newStyle);
|
|
43
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
44
|
+
alignBox: "row",
|
|
45
|
+
className: imMessageMetaClass
|
|
46
|
+
}, /*#__PURE__*/React.createElement(IMDateTime, {
|
|
47
|
+
customStyle: timeCustomStyle,
|
|
48
|
+
value: time
|
|
49
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: dotClass
|
|
51
|
+
}, "\u22C5"), /*#__PURE__*/React.createElement(IMAutoMessageInfo, {
|
|
52
|
+
customStyle: autoMessageCustomStyle,
|
|
53
|
+
autoMessageType: autoMessageType,
|
|
54
|
+
autoMessagesI18N: autoMessagesI18N,
|
|
55
|
+
autoMessagesTitleI18N: autoMessagesTitleI18N
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
IMMessageMeta.propTypes = imMessageMetaPropTypes;
|
|
59
|
+
IMMessageMeta.defaultProps = imMessageMetaDefaultProps;
|
|
60
|
+
IMMessageMeta.displayName = 'IMMessageMeta';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.varClass {
|
|
2
|
+
--imMessageMeta-gap: var(--imlib_size_5);
|
|
3
|
+
--imMessageMeta-separator_gap: var(--imlib_size_5);
|
|
4
|
+
--imMessageMeta-time_padding: var(--imlib_size_45);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.imMessageMeta {
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
align-items: center;
|
|
10
|
+
margin-top: var(--imMessageMeta-gap);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dot {
|
|
14
|
+
composes: varClass;
|
|
15
|
+
margin: 0 var(--imMessageMeta-separator_gap);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[dir=ltr] .leftTime {
|
|
19
|
+
padding-left: var(--imMessageMeta-time_padding);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[dir=rtl] .leftTime {
|
|
23
|
+
padding-right: var(--imMessageMeta-time_padding);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
[dir=ltr] .rightTime {
|
|
27
|
+
padding-right: var(--imMessageMeta-time_padding);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[dir=rtl] .rightTime {
|
|
31
|
+
padding-left: var(--imMessageMeta-time_padding);
|
|
32
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** ** Methods *** */
|
|
2
|
+
import { compileClassNames } from '@zohodesk/utils';
|
|
3
|
+
import { direction as directionConstants } from '@zohoim/chat-components-utils/es/constants/messageConstants';
|
|
4
|
+
export default function cssJSLogic(props, style) {
|
|
5
|
+
const {
|
|
6
|
+
direction
|
|
7
|
+
} = props;
|
|
8
|
+
const imMessageMetaClass = compileClassNames({
|
|
9
|
+
[style.imMessageMeta]: true,
|
|
10
|
+
[style.leftTime]: direction === directionConstants.IN,
|
|
11
|
+
[style.rightTime]: direction === directionConstants.OUT
|
|
12
|
+
});
|
|
13
|
+
const dotClass = compileClassNames({
|
|
14
|
+
[style.dot]: true
|
|
15
|
+
});
|
|
16
|
+
return {
|
|
17
|
+
imMessageMetaClass,
|
|
18
|
+
dotClass
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IMMessageMeta } from './IMMessageMeta';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** ** Constants *** */
|
|
2
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
3
|
+
import { direction as directionConstants } from '@zohoim/chat-components-utils/es/constants/messageConstants';
|
|
4
|
+
const imMessageMetaDefaultProps = {
|
|
5
|
+
customStyle: dummyObject,
|
|
6
|
+
autoMessageCustomStyle: dummyObject,
|
|
7
|
+
timeCustomStyle: dummyObject,
|
|
8
|
+
direction: directionConstants.IN
|
|
9
|
+
};
|
|
10
|
+
export default imMessageMetaDefaultProps;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** ** Libraries *** */
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { autoMessageTypes, direction } from '@zohoim/chat-components-utils/es/constants/messageConstants';
|
|
4
|
+
const {
|
|
5
|
+
WELCOMEMSG,
|
|
6
|
+
WORKFLOW_MESSAGE,
|
|
7
|
+
WORKFLOW_NOTIFICATION,
|
|
8
|
+
UN_SUPPORTED_FILE
|
|
9
|
+
} = autoMessageTypes;
|
|
10
|
+
const imMessageMetaPropTypes = {
|
|
11
|
+
customStyle: PropTypes.object,
|
|
12
|
+
autoMessageCustomStyle: PropTypes.object,
|
|
13
|
+
timeCustomStyle: PropTypes.object,
|
|
14
|
+
direction: PropTypes.oneOf([direction.IN, direction.OUT]),
|
|
15
|
+
time: PropTypes.string,
|
|
16
|
+
autoMessageType: PropTypes.oneOf([WELCOMEMSG, WORKFLOW_MESSAGE, WORKFLOW_NOTIFICATION, UN_SUPPORTED_FILE]),
|
|
17
|
+
autoMessagesI18N: PropTypes.shape({
|
|
18
|
+
[WELCOMEMSG]: PropTypes.string,
|
|
19
|
+
[WORKFLOW_MESSAGE]: PropTypes.string,
|
|
20
|
+
[WORKFLOW_NOTIFICATION]: PropTypes.string,
|
|
21
|
+
[UN_SUPPORTED_FILE]: PropTypes.string
|
|
22
|
+
}),
|
|
23
|
+
autoMessagesTitleI18N: PropTypes.shape({
|
|
24
|
+
[WELCOMEMSG]: PropTypes.string,
|
|
25
|
+
[WORKFLOW_MESSAGE]: PropTypes.string,
|
|
26
|
+
[WORKFLOW_NOTIFICATION]: PropTypes.string,
|
|
27
|
+
[UN_SUPPORTED_FILE]: PropTypes.string
|
|
28
|
+
})
|
|
29
|
+
};
|
|
30
|
+
export default imMessageMetaPropTypes;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
.messageStatus {
|
|
2
2
|
/*USe this class name status customization*/
|
|
3
|
-
color: #61667a;
|
|
3
|
+
/* color: #61667a; */
|
|
4
|
+
color: var(--imlib_chat_components_messageStatus_send_color);
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
.readStatus{
|
|
7
|
-
color: #0a73eb;
|
|
8
|
+
/* color: #0a73eb; */
|
|
9
|
+
color: var(--imlib_chat_components_messageStatus_read_color);
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
.failedStatus{
|
|
11
|
-
color: #de3535
|
|
13
|
+
/* color: #de3535 */
|
|
14
|
+
color: var(--imlib_chat_components_messageStatus_failed_color);
|
|
12
15
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-no-bind */
|
|
2
|
+
/* eslint-disable max-len */
|
|
3
|
+
|
|
4
|
+
/** ** Libraries *** */
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
/** ** Hooks *** */
|
|
8
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
+
|
|
10
|
+
/** ** Constants *** */
|
|
11
|
+
import imReplyBubbleDefaultProps from './props/defaultProps';
|
|
12
|
+
import imReplyBubblePropTypes from './props/propTypes';
|
|
13
|
+
|
|
14
|
+
/** ** Methods *** */
|
|
15
|
+
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
16
|
+
import cssJSLogic from './css/cssJSLogic';
|
|
17
|
+
|
|
18
|
+
/** ** Styles *** */
|
|
19
|
+
import style from './css/IMReplyBubble.module.css';
|
|
20
|
+
export default function IMReplyBubble(props) {
|
|
21
|
+
const {
|
|
22
|
+
customStyle
|
|
23
|
+
} = props;
|
|
24
|
+
|
|
25
|
+
/* External customization */
|
|
26
|
+
const newStyle = useMergeStyle(style, customStyle);
|
|
27
|
+
/* CSS classnames added based on logic */
|
|
28
|
+
const {
|
|
29
|
+
imReplyBubbleClass
|
|
30
|
+
} = cssJSLogic(props, newStyle);
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: imReplyBubbleClass
|
|
33
|
+
}, "Working On this...");
|
|
34
|
+
}
|
|
35
|
+
IMReplyBubble.propTypes = imReplyBubblePropTypes;
|
|
36
|
+
IMReplyBubble.defaultProps = imReplyBubbleDefaultProps;
|
|
37
|
+
IMReplyBubble.displayName = 'IMReplyBubble';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IMReplyBubble } from './IMReplyBubble';
|