@zohoim/chat-components 0.0.6 → 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 +95 -48
- 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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconColor, messageStatusSendColor, messageStatusFailedColor } from './commonColorVariable.js';
|
|
3
|
+
import { imIntegrationIcon } from "../commonDeskColorVariable.js";
|
|
4
|
+
export default {
|
|
5
|
+
library: 'chat_components',
|
|
6
|
+
variables: {
|
|
7
|
+
messageBubble: {
|
|
8
|
+
active_bg_color: bubbleActiveBgColor,
|
|
9
|
+
messageBox_footer_text_color: '#5a616f'
|
|
10
|
+
},
|
|
11
|
+
messageBox: {
|
|
12
|
+
incoming_bg_color: incomingBubbleBgColor,
|
|
13
|
+
outgoing_bg_color: '#fdf3f3',
|
|
14
|
+
bg_color: '#f1f7fe',
|
|
15
|
+
failed_bg_color: '#fcebeb',
|
|
16
|
+
text_color: '#000'
|
|
17
|
+
},
|
|
18
|
+
actionIcon: {
|
|
19
|
+
color: actionIconColor,
|
|
20
|
+
bg_color: '#fdf3f3',
|
|
21
|
+
border_color: '#f8d7d7'
|
|
22
|
+
},
|
|
23
|
+
messageStatus: {
|
|
24
|
+
send_color: messageStatusSendColor,
|
|
25
|
+
read_color: '#de3535',
|
|
26
|
+
failed_color: messageStatusFailedColor
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconColor, messageStatusSendColor, messageStatusFailedColor } from './commonColorVariable.js';
|
|
3
|
+
import { imIntegrationIcon } from "../commonDeskColorVariable.js";
|
|
4
|
+
export default {
|
|
5
|
+
library: 'chat_components',
|
|
6
|
+
variables: {
|
|
7
|
+
messageBubble: {
|
|
8
|
+
active_bg_color: bubbleActiveBgColor,
|
|
9
|
+
messageBox_footer_text_color: '#5a616f'
|
|
10
|
+
},
|
|
11
|
+
messageBox: {
|
|
12
|
+
incoming_bg_color: incomingBubbleBgColor,
|
|
13
|
+
outgoing_bg_color: '#fdf8e9',
|
|
14
|
+
bg_color: '#f1f7fe',
|
|
15
|
+
failed_bg_color: '#fcebeb',
|
|
16
|
+
text_color: '#000'
|
|
17
|
+
},
|
|
18
|
+
actionIcon: {
|
|
19
|
+
color: actionIconColor,
|
|
20
|
+
bg_color: '#fdf8e9',
|
|
21
|
+
border_color: '#f6e3a7'
|
|
22
|
+
},
|
|
23
|
+
imIntegrationIcon,
|
|
24
|
+
messageStatus: {
|
|
25
|
+
send_color: messageStatusSendColor,
|
|
26
|
+
read_color: '#b68c07',
|
|
27
|
+
failed_color: messageStatusFailedColor
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, bubbleActiveBgColor, actionIconColor, messageStatusSendColor, messageStatusFailedColor } from './commonColorVariable.js';
|
|
3
|
+
import { imIntegrationIcon } from "../commonDeskColorVariable.js";
|
|
4
|
+
export default {
|
|
5
|
+
library: 'chat_components',
|
|
6
|
+
variables: {
|
|
7
|
+
messageBubble: {
|
|
8
|
+
active_bg_color: bubbleActiveBgColor,
|
|
9
|
+
messageBox_footer_text_color: '#5a616f'
|
|
10
|
+
},
|
|
11
|
+
messageBox: {
|
|
12
|
+
incoming_bg_color: incomingBubbleBgColor,
|
|
13
|
+
outgoing_bg_color: outgoingBubbleBgColor,
|
|
14
|
+
bg_color: '#f1f7fe',
|
|
15
|
+
failed_bg_color: '#fcebeb',
|
|
16
|
+
text_color: '#000'
|
|
17
|
+
},
|
|
18
|
+
actionIcon: {
|
|
19
|
+
color: actionIconColor,
|
|
20
|
+
bg_color: '#252d37',
|
|
21
|
+
border_color: '#2c4664'
|
|
22
|
+
},
|
|
23
|
+
imIntegrationIcon,
|
|
24
|
+
messageStatus: {
|
|
25
|
+
send_color: messageStatusSendColor,
|
|
26
|
+
read_color: '#479dff',
|
|
27
|
+
failed_color: messageStatusFailedColor
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const incomingBubbleBgColor = '#2e2e2e';
|
|
2
|
+
export const outgoingBubbleBgColor = '#2e2e2e';
|
|
3
|
+
export const bubbleActiveBgColor = '#202821';
|
|
4
|
+
export const actionIconColor = '#e2e4e6';
|
|
5
|
+
export const messageStatusSendColor = '#61667a';
|
|
6
|
+
export const messageStatusFailedColor = '#de3535';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, bubbleActiveBgColor, actionIconColor, messageStatusSendColor, messageStatusFailedColor } from './commonColorVariable.js';
|
|
3
|
+
import { imIntegrationIcon } from "../commonDeskColorVariable.js";
|
|
4
|
+
export default {
|
|
5
|
+
library: 'chat_components',
|
|
6
|
+
variables: {
|
|
7
|
+
messageBubble: {
|
|
8
|
+
active_bg_color: bubbleActiveBgColor,
|
|
9
|
+
messageBox_footer_text_color: '#5a616f'
|
|
10
|
+
},
|
|
11
|
+
messageBox: {
|
|
12
|
+
incoming_bg_color: incomingBubbleBgColor,
|
|
13
|
+
outgoing_bg_color: outgoingBubbleBgColor,
|
|
14
|
+
bg_color: '#f1f7fe',
|
|
15
|
+
failed_bg_color: '#fcebeb',
|
|
16
|
+
text_color: '#000'
|
|
17
|
+
},
|
|
18
|
+
actionIcon: {
|
|
19
|
+
color: actionIconColor,
|
|
20
|
+
bg_color: '#252e27',
|
|
21
|
+
border_color: '#2c4732'
|
|
22
|
+
},
|
|
23
|
+
imIntegrationIcon,
|
|
24
|
+
messageStatus: {
|
|
25
|
+
send_color: messageStatusSendColor,
|
|
26
|
+
read_color: '#45a159',
|
|
27
|
+
failed_color: messageStatusFailedColor
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, bubbleActiveBgColor, actionIconColor, messageStatusSendColor, messageStatusFailedColor } from './commonColorVariable.js';
|
|
3
|
+
import { imIntegrationIcon } from "../commonDeskColorVariable.js";
|
|
4
|
+
export default {
|
|
5
|
+
library: 'chat_components',
|
|
6
|
+
variables: {
|
|
7
|
+
messageBubble: {
|
|
8
|
+
active_bg_color: bubbleActiveBgColor,
|
|
9
|
+
messageBox_footer_text_color: '#5a616f'
|
|
10
|
+
},
|
|
11
|
+
messageBox: {
|
|
12
|
+
incoming_bg_color: incomingBubbleBgColor,
|
|
13
|
+
outgoing_bg_color: outgoingBubbleBgColor,
|
|
14
|
+
bg_color: '#f1f7fe',
|
|
15
|
+
failed_bg_color: '#fcebeb',
|
|
16
|
+
text_color: '#000'
|
|
17
|
+
},
|
|
18
|
+
actionIcon: {
|
|
19
|
+
color: actionIconColor,
|
|
20
|
+
bg_color: '#312821',
|
|
21
|
+
border_color: '#4d3421'
|
|
22
|
+
},
|
|
23
|
+
imIntegrationIcon,
|
|
24
|
+
messageStatus: {
|
|
25
|
+
send_color: messageStatusSendColor,
|
|
26
|
+
read_color: '#ff801f',
|
|
27
|
+
failed_color: messageStatusFailedColor
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, bubbleActiveBgColor, actionIconColor, messageStatusSendColor, messageStatusFailedColor } from './commonColorVariable.js';
|
|
3
|
+
import { imIntegrationIcon } from "../commonDeskColorVariable.js";
|
|
4
|
+
export default {
|
|
5
|
+
library: 'chat_components',
|
|
6
|
+
variables: {
|
|
7
|
+
messageBubble: {
|
|
8
|
+
active_bg_color: bubbleActiveBgColor,
|
|
9
|
+
messageBox_footer_text_color: '#5a616f'
|
|
10
|
+
},
|
|
11
|
+
messageBox: {
|
|
12
|
+
incoming_bg_color: incomingBubbleBgColor,
|
|
13
|
+
outgoing_bg_color: outgoingBubbleBgColor,
|
|
14
|
+
bg_color: '#f1f7fe',
|
|
15
|
+
failed_bg_color: '#fcebeb',
|
|
16
|
+
text_color: '#000'
|
|
17
|
+
},
|
|
18
|
+
actionIcon: {
|
|
19
|
+
color: actionIconColor,
|
|
20
|
+
bg_color: '#2f2424',
|
|
21
|
+
border_color: '#492A29'
|
|
22
|
+
},
|
|
23
|
+
imIntegrationIcon,
|
|
24
|
+
messageStatus: {
|
|
25
|
+
send_color: messageStatusSendColor,
|
|
26
|
+
read_color: '#e94f4f',
|
|
27
|
+
failed_color: messageStatusFailedColor
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, bubbleActiveBgColor, messageStatusSendColor, messageStatusFailedColor, actionIconColor } from './commonColorVariable.js';
|
|
3
|
+
import { imIntegrationIcon } from "../commonDeskColorVariable.js";
|
|
4
|
+
export default {
|
|
5
|
+
library: 'chat_components',
|
|
6
|
+
variables: {
|
|
7
|
+
messageBubble: {
|
|
8
|
+
active_bg_color: bubbleActiveBgColor,
|
|
9
|
+
messageBox_footer_text_color: '#5a616f'
|
|
10
|
+
},
|
|
11
|
+
messageBox: {
|
|
12
|
+
incoming_bg_color: incomingBubbleBgColor,
|
|
13
|
+
outgoing_bg_color: outgoingBubbleBgColor,
|
|
14
|
+
bg_color: '#f1f7fe',
|
|
15
|
+
failed_bg_color: '#fcebeb',
|
|
16
|
+
text_color: '#000'
|
|
17
|
+
},
|
|
18
|
+
actionIcon: {
|
|
19
|
+
color: actionIconColor,
|
|
20
|
+
bg_color: '#2e2922',
|
|
21
|
+
border_color: '#453925'
|
|
22
|
+
},
|
|
23
|
+
imIntegrationIcon,
|
|
24
|
+
messageStatus: {
|
|
25
|
+
send_color: messageStatusSendColor,
|
|
26
|
+
read_color: '#d79835',
|
|
27
|
+
failed_color: messageStatusFailedColor
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ThemeWrapper } from './ThemeWrapper';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** ** Constants *** */
|
|
2
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
3
|
+
const themeWrapperDefaultProps = {
|
|
4
|
+
needDeskAssets: true,
|
|
5
|
+
mode: 'LIGHT',
|
|
6
|
+
theme: 'BLUE',
|
|
7
|
+
needTooltip: true,
|
|
8
|
+
modeKey: 'data-mode',
|
|
9
|
+
themeKey: 'data-theme',
|
|
10
|
+
app: 'DESK',
|
|
11
|
+
tooltipCustomStyle: dummyObject
|
|
12
|
+
};
|
|
13
|
+
export default themeWrapperDefaultProps;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** ** Libraries *** */
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
const themeWrapperPropTypes = {
|
|
4
|
+
children: PropTypes.node,
|
|
5
|
+
needDeskAssets: PropTypes.bool,
|
|
6
|
+
needTooltip: PropTypes.bool,
|
|
7
|
+
themeConfigurations: PropTypes.object,
|
|
8
|
+
mode: PropTypes.string,
|
|
9
|
+
theme: PropTypes.string,
|
|
10
|
+
app: PropTypes.string,
|
|
11
|
+
modeKey: PropTypes.string,
|
|
12
|
+
themeKey: PropTypes.string,
|
|
13
|
+
tooltipCustomStyle: PropTypes.object
|
|
14
|
+
};
|
|
15
|
+
export default themeWrapperPropTypes;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { appConstants, modeConstants, themeConstants } from '../constants';
|
|
2
|
+
import deskLightBlue from '../desk/light/blueTheme';
|
|
3
|
+
import deskLightGreen from '../desk/light/greenTheme';
|
|
4
|
+
import deskLightOrange from '../desk/light/orangeTheme';
|
|
5
|
+
import deskLightRed from '../desk/light/redTheme';
|
|
6
|
+
import deskLightYellow from '../desk/light/yellowTheme';
|
|
7
|
+
import deskDarkBlue from '../desk/dark/blueTheme';
|
|
8
|
+
import deskDarkGreen from '../desk/dark/greenTheme';
|
|
9
|
+
import deskDarkOrange from '../desk/dark/orangeTheme';
|
|
10
|
+
import deskDarkRed from '../desk/dark/redTheme';
|
|
11
|
+
import deskDarkYellow from '../desk/dark/yellowTheme';
|
|
12
|
+
import deskPureDarkBlue from '../desk/pureDark/blueTheme';
|
|
13
|
+
import deskPureDarkGreen from '../desk/pureDark/greenTheme';
|
|
14
|
+
import deskPureDarkOrange from '../desk/pureDark/orangeTheme';
|
|
15
|
+
import deskPureDarkRed from '../desk/pureDark/redTheme';
|
|
16
|
+
import deskPureDarkYellow from '../desk/pureDark/yellowTheme';
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
import crmLightBlueFan from '../crm/light/blueFanTheme';
|
|
20
|
+
import crmLightBlue from '../crm/light/blueTheme';
|
|
21
|
+
import crmLightDarkBlue from '../crm/light/darkBlueTheme';
|
|
22
|
+
import crmLightDarkGrey from '../crm/light/darkGreyTheme';
|
|
23
|
+
import crmLightGreen from '../crm/light/greenTheme';
|
|
24
|
+
import crmLightOrange from '../crm/light/orangeTheme';
|
|
25
|
+
import crmLightPink from '../crm/light/pinkTheme';
|
|
26
|
+
import crmLightTeal from '../crm/light/tealTheme';
|
|
27
|
+
import crmLightWhite from '../crm/light/whiteTheme';
|
|
28
|
+
|
|
29
|
+
import crmDarkBlueFan from '../crm/dark/blueFanTheme';
|
|
30
|
+
import crmDarkBlue from '../crm/dark/blueTheme';
|
|
31
|
+
import crmDarkDarkBlue from '../crm/dark/darkBlueTheme';
|
|
32
|
+
import crmDarkDarkGrey from '../crm/dark/darkGreyTheme';
|
|
33
|
+
import crmDarkGreen from '../crm/dark/greenTheme';
|
|
34
|
+
import crmDarkOrange from '../crm/dark/orangeTheme';
|
|
35
|
+
import crmDarkPink from '../crm/dark/pinkTheme';
|
|
36
|
+
import crmDarkTeal from '../crm/dark/tealTheme';
|
|
37
|
+
import crmDarkWhite from '../crm/dark/whiteTheme';
|
|
38
|
+
|
|
39
|
+
import crmPureDarkBlueFan from '../crm/pureDark/blueFanTheme';
|
|
40
|
+
import crmPureDarkBlue from '../crm/pureDark/blueTheme';
|
|
41
|
+
import crmPureDarkDarkBlue from '../crm/pureDark/darkBlueTheme';
|
|
42
|
+
import crmPureDarkDarkGrey from '../crm/pureDark/darkGreyTheme';
|
|
43
|
+
import crmPureDarkGreen from '../crm/pureDark/greenTheme';
|
|
44
|
+
import crmPureDarkOrange from '../crm/pureDark/orangeTheme';
|
|
45
|
+
import crmPureDarkPink from '../crm/pureDark/pinkTheme';
|
|
46
|
+
import crmPureDarkTeal from '../crm/pureDark/tealTheme';
|
|
47
|
+
import crmPureDarkWhite from '../crm/pureDark/whiteTheme';*/
|
|
48
|
+
|
|
49
|
+
const deskModeMapping = {
|
|
50
|
+
[modeConstants.LIGHT]: 'default',
|
|
51
|
+
[modeConstants.DARK]: 'dark',
|
|
52
|
+
[modeConstants.PURE_DARK]: 'pureDark'
|
|
53
|
+
};
|
|
54
|
+
const deskThemeMapping = {
|
|
55
|
+
[themeConstants.BLUE]: 'blue',
|
|
56
|
+
[themeConstants.GREEN]: 'green',
|
|
57
|
+
[themeConstants.ORANGE]: 'orange',
|
|
58
|
+
[themeConstants.RED]: 'red',
|
|
59
|
+
[themeConstants.YELLOW]: 'yellow'
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/*const crmThemeMapping = {
|
|
63
|
+
[themeConstants.BLUE_FAN]: 'crmBlue',
|
|
64
|
+
[themeConstants.BLUE]: 'crmBlue',
|
|
65
|
+
[themeConstants.DARK_BLUE]: 'crmBlue',
|
|
66
|
+
[themeConstants.DARK_GREY]: 'crmBlue',
|
|
67
|
+
[themeConstants.WHITE]: 'crmBlue',
|
|
68
|
+
|
|
69
|
+
[themeConstants.GREEN]: 'crmGreen',
|
|
70
|
+
[themeConstants.ORANGE]: 'crmOrange',
|
|
71
|
+
[themeConstants.PINK]: 'crmPink',
|
|
72
|
+
[themeConstants.TEAL]: 'crmTeal'
|
|
73
|
+
};*/
|
|
74
|
+
|
|
75
|
+
const concatString = '_';
|
|
76
|
+
const defaultDeskTheme = deskThemeMapping[themeConstants.BLUE];
|
|
77
|
+
const defaultThemeConfiguration = deskLightBlue;
|
|
78
|
+
const defaultDeskMode = deskModeMapping[modeConstants.LIGHT];
|
|
79
|
+
const themeConfigMapping = {
|
|
80
|
+
[`${appConstants.DESK}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.BLUE}`]: deskLightBlue,
|
|
81
|
+
[`${appConstants.DESK}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.GREEN}`]: deskLightGreen,
|
|
82
|
+
[`${appConstants.DESK}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.ORANGE}`]: deskLightOrange,
|
|
83
|
+
[`${appConstants.DESK}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.RED}`]: deskLightRed,
|
|
84
|
+
[`${appConstants.DESK}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.YELLOW}`]: deskLightYellow,
|
|
85
|
+
[`${appConstants.DESK}${concatString}${modeConstants.DARK}${concatString}${themeConstants.BLUE}`]: deskDarkBlue,
|
|
86
|
+
[`${appConstants.DESK}${concatString}${modeConstants.DARK}${concatString}${themeConstants.GREEN}`]: deskDarkGreen,
|
|
87
|
+
[`${appConstants.DESK}${concatString}${modeConstants.DARK}${concatString}${themeConstants.ORANGE}`]: deskDarkOrange,
|
|
88
|
+
[`${appConstants.DESK}${concatString}${modeConstants.DARK}${concatString}${themeConstants.RED}`]: deskDarkRed,
|
|
89
|
+
[`${appConstants.DESK}${concatString}${modeConstants.DARK}${concatString}${themeConstants.YELLOW}`]: deskDarkYellow,
|
|
90
|
+
[`${appConstants.DESK}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.BLUE}`]: deskPureDarkBlue,
|
|
91
|
+
[`${appConstants.DESK}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.GREEN}`]: deskPureDarkGreen,
|
|
92
|
+
[`${appConstants.DESK}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.ORANGE}`]: deskPureDarkOrange,
|
|
93
|
+
[`${appConstants.DESK}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.RED}`]: deskPureDarkRed,
|
|
94
|
+
[`${appConstants.DESK}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.YELLOW}`]: deskPureDarkYellow
|
|
95
|
+
/*[`${appConstants.CRM}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.BLUE_FAN}`]:
|
|
96
|
+
crmLightBlueFan,
|
|
97
|
+
[`${appConstants.CRM}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.BLUE}`]:
|
|
98
|
+
crmLightBlue,
|
|
99
|
+
[`${appConstants.CRM}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.DARK_BLUE}`]:
|
|
100
|
+
crmLightDarkBlue,
|
|
101
|
+
[`${appConstants.CRM}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.DARK_GREY}`]:
|
|
102
|
+
crmLightDarkGrey,
|
|
103
|
+
[`${appConstants.CRM}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.GREEN}`]:
|
|
104
|
+
crmLightGreen,
|
|
105
|
+
[`${appConstants.CRM}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.ORANGE}`]:
|
|
106
|
+
crmLightOrange,
|
|
107
|
+
[`${appConstants.CRM}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.PINK}`]:
|
|
108
|
+
crmLightPink,
|
|
109
|
+
[`${appConstants.CRM}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.TEAL}`]:
|
|
110
|
+
crmLightTeal,
|
|
111
|
+
[`${appConstants.CRM}${concatString}${modeConstants.LIGHT}${concatString}${themeConstants.WHITE}`]:
|
|
112
|
+
crmLightWhite,
|
|
113
|
+
[`${appConstants.CRM}${concatString}${modeConstants.DARK}${concatString}${themeConstants.BLUE_FAN}`]:
|
|
114
|
+
crmDarkBlueFan,
|
|
115
|
+
[`${appConstants.CRM}${concatString}${modeConstants.DARK}${concatString}${themeConstants.BLUE}`]:
|
|
116
|
+
crmDarkBlue,
|
|
117
|
+
[`${appConstants.CRM}${concatString}${modeConstants.DARK}${concatString}${themeConstants.DARK_BLUE}`]:
|
|
118
|
+
crmDarkDarkBlue,
|
|
119
|
+
[`${appConstants.CRM}${concatString}${modeConstants.DARK}${concatString}${themeConstants.DARK_GREY}`]:
|
|
120
|
+
crmDarkDarkGrey,
|
|
121
|
+
[`${appConstants.CRM}${concatString}${modeConstants.DARK}${concatString}${themeConstants.GREEN}`]:
|
|
122
|
+
crmDarkGreen,
|
|
123
|
+
[`${appConstants.CRM}${concatString}${modeConstants.DARK}${concatString}${themeConstants.ORANGE}`]:
|
|
124
|
+
crmDarkOrange,
|
|
125
|
+
[`${appConstants.CRM}${concatString}${modeConstants.DARK}${concatString}${themeConstants.PINK}`]:
|
|
126
|
+
crmDarkPink,
|
|
127
|
+
[`${appConstants.CRM}${concatString}${modeConstants.DARK}${concatString}${themeConstants.TEAL}`]:
|
|
128
|
+
crmDarkTeal,
|
|
129
|
+
[`${appConstants.CRM}${concatString}${modeConstants.DARK}${concatString}${themeConstants.WHITE}`]:
|
|
130
|
+
crmDarkWhite,
|
|
131
|
+
[`${appConstants.CRM}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.BLUE_FAN}`]:
|
|
132
|
+
crmPureDarkBlueFan,
|
|
133
|
+
[`${appConstants.CRM}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.BLUE}`]:
|
|
134
|
+
crmPureDarkBlue,
|
|
135
|
+
[`${appConstants.CRM}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.DARK_BLUE}`]:
|
|
136
|
+
crmPureDarkDarkBlue,
|
|
137
|
+
[`${appConstants.CRM}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.DARK_GREY}`]:
|
|
138
|
+
crmPureDarkDarkGrey,
|
|
139
|
+
[`${appConstants.CRM}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.GREEN}`]:
|
|
140
|
+
crmPureDarkGreen,
|
|
141
|
+
[`${appConstants.CRM}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.ORANGE}`]:
|
|
142
|
+
crmPureDarkOrange,
|
|
143
|
+
[`${appConstants.CRM}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.PINK}`]:
|
|
144
|
+
crmPureDarkPink,
|
|
145
|
+
[`${appConstants.CRM}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.TEAL}`]:
|
|
146
|
+
crmPureDarkTeal,
|
|
147
|
+
[`${appConstants.CRM}${concatString}${modeConstants.PURE_DARK}${concatString}${themeConstants.WHITE}`]:
|
|
148
|
+
crmPureDarkWhite*/
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
function getThemeName() {
|
|
152
|
+
let {
|
|
153
|
+
app = appConstants.DESK,
|
|
154
|
+
mode = modeConstants.LIGHT,
|
|
155
|
+
theme = themeConstants.BLUE
|
|
156
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
157
|
+
const themeName = `${app}${concatString}${mode}${concatString}${theme}`;
|
|
158
|
+
return {
|
|
159
|
+
themeName
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function getDeskThemeName(_ref) {
|
|
163
|
+
let {
|
|
164
|
+
app,
|
|
165
|
+
theme
|
|
166
|
+
} = _ref;
|
|
167
|
+
const isDesk = app === appConstants.DESK;
|
|
168
|
+
// const isCRM = app === appConstants.CRM;
|
|
169
|
+
|
|
170
|
+
let deskTheme = '';
|
|
171
|
+
if (isDesk) {
|
|
172
|
+
deskTheme = deskThemeMapping[theme];
|
|
173
|
+
}
|
|
174
|
+
// else if (isCRM) {
|
|
175
|
+
// deskTheme = crmThemeMapping[theme];
|
|
176
|
+
// }
|
|
177
|
+
|
|
178
|
+
return {
|
|
179
|
+
deskTheme: deskTheme || defaultDeskTheme
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
export default function getThemeConfigurations(_ref2) {
|
|
183
|
+
let {
|
|
184
|
+
app,
|
|
185
|
+
mode,
|
|
186
|
+
theme
|
|
187
|
+
} = _ref2;
|
|
188
|
+
const {
|
|
189
|
+
themeName
|
|
190
|
+
} = getThemeName({
|
|
191
|
+
app,
|
|
192
|
+
mode,
|
|
193
|
+
theme
|
|
194
|
+
});
|
|
195
|
+
const deskMode = deskModeMapping[mode] || defaultDeskMode;
|
|
196
|
+
const {
|
|
197
|
+
deskTheme
|
|
198
|
+
} = getDeskThemeName({
|
|
199
|
+
app,
|
|
200
|
+
mode,
|
|
201
|
+
theme
|
|
202
|
+
});
|
|
203
|
+
const themeConfigurations = themeConfigMapping[themeName] || defaultThemeConfiguration;
|
|
204
|
+
return {
|
|
205
|
+
deskMode,
|
|
206
|
+
deskTheme,
|
|
207
|
+
themeConfigurations
|
|
208
|
+
};
|
|
209
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
import useMedia from '@zohoim/chat-components-hooks/es/Media/useMedia';
|
|
10
|
+
|
|
11
|
+
/** ** Constants *** */
|
|
12
|
+
import videoDefaultProps from './props/defaultProps';
|
|
13
|
+
import videoPropTypes from './props/propTypes';
|
|
14
|
+
|
|
15
|
+
/** ** Methods *** */
|
|
16
|
+
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
17
|
+
import cssJSLogic from './css/cssJSLogic';
|
|
18
|
+
|
|
19
|
+
/** ** Styles *** */
|
|
20
|
+
import style from './css/Video.module.css';
|
|
21
|
+
import MediaControls from '../MediaControls/MediaControls';
|
|
22
|
+
export default function Video(props) {
|
|
23
|
+
const {
|
|
24
|
+
customStyle,
|
|
25
|
+
fileType,
|
|
26
|
+
fileURL
|
|
27
|
+
} = props;
|
|
28
|
+
const {
|
|
29
|
+
mediaElementRef,
|
|
30
|
+
durationTime,
|
|
31
|
+
onTogglePlay,
|
|
32
|
+
currentTime,
|
|
33
|
+
progressPercentage,
|
|
34
|
+
isMediaPlayed
|
|
35
|
+
} = useMedia(props);
|
|
36
|
+
|
|
37
|
+
/* External customization */
|
|
38
|
+
const newStyle = useMergeStyle(style, customStyle);
|
|
39
|
+
/* CSS classnames added based on logic */
|
|
40
|
+
const {
|
|
41
|
+
videoClass
|
|
42
|
+
} = cssJSLogic(props, newStyle);
|
|
43
|
+
return (
|
|
44
|
+
/*#__PURE__*/
|
|
45
|
+
// <div className={videoWrapperClass}>
|
|
46
|
+
React.createElement("video", {
|
|
47
|
+
controls: true,
|
|
48
|
+
className: videoClass,
|
|
49
|
+
preload: "metadata",
|
|
50
|
+
ref: mediaElementRef
|
|
51
|
+
}, /*#__PURE__*/React.createElement("source", {
|
|
52
|
+
type: fileType,
|
|
53
|
+
"data-src": fileURL
|
|
54
|
+
}))
|
|
55
|
+
/* <MediaControls
|
|
56
|
+
customStyle={controlsCustomStyle}
|
|
57
|
+
onTogglePlay={onTogglePlay}
|
|
58
|
+
isMediaPlayed={isMediaPlayed}
|
|
59
|
+
progressPercentage={progressPercentage}
|
|
60
|
+
currentTime={currentTime}
|
|
61
|
+
durationTime={durationTime}
|
|
62
|
+
/> */
|
|
63
|
+
// </div>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
Video.propTypes = videoPropTypes;
|
|
68
|
+
Video.defaultProps = videoDefaultProps;
|
|
69
|
+
Video.displayName = 'Video';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** ** Methods *** */
|
|
2
|
+
import { compileClassNames } from '@zohodesk/utils';
|
|
3
|
+
export default function cssJSLogic(props, style) {
|
|
4
|
+
const videoWrapperClass = compileClassNames({
|
|
5
|
+
[style.videoWrapper]: true
|
|
6
|
+
});
|
|
7
|
+
const videoClass = compileClassNames({
|
|
8
|
+
[style.video]: true
|
|
9
|
+
});
|
|
10
|
+
return {
|
|
11
|
+
videoWrapperClass,
|
|
12
|
+
videoClass
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Video } from './Video';
|
|
@@ -0,0 +1,57 @@
|
|
|
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 videoBubbleDefaultProps from './props/defaultProps';
|
|
12
|
+
import videoBubblePropTypes 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/VideoBubble.module.css';
|
|
20
|
+
|
|
21
|
+
/** ** Components *** */
|
|
22
|
+
import AttachmentBubbleInfo from '../AttachmentBubbleInfo/AttachmentBubbleInfo';
|
|
23
|
+
import Video from '../Video/Video';
|
|
24
|
+
export default function VideoBubble(props) {
|
|
25
|
+
const {
|
|
26
|
+
customStyle,
|
|
27
|
+
headerCustomStyle,
|
|
28
|
+
videoCustomStyle,
|
|
29
|
+
controlsCustomStyle,
|
|
30
|
+
fileName,
|
|
31
|
+
fileSize,
|
|
32
|
+
fileURL,
|
|
33
|
+
fileType
|
|
34
|
+
} = props;
|
|
35
|
+
|
|
36
|
+
/* External customization */
|
|
37
|
+
const newStyle = useMergeStyle(style, customStyle);
|
|
38
|
+
/* CSS classnames added based on logic */
|
|
39
|
+
const {
|
|
40
|
+
videoBubbleClass
|
|
41
|
+
} = cssJSLogic(props, newStyle);
|
|
42
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AttachmentBubbleInfo, {
|
|
43
|
+
customStyle: headerCustomStyle,
|
|
44
|
+
fileName: fileName,
|
|
45
|
+
fileSize: fileSize
|
|
46
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: videoBubbleClass
|
|
48
|
+
}, /*#__PURE__*/React.createElement(Video, {
|
|
49
|
+
customStyle: videoCustomStyle,
|
|
50
|
+
fileURL: fileURL,
|
|
51
|
+
fileType: fileType,
|
|
52
|
+
controlsCustomStyle: controlsCustomStyle
|
|
53
|
+
})));
|
|
54
|
+
}
|
|
55
|
+
VideoBubble.propTypes = videoBubblePropTypes;
|
|
56
|
+
VideoBubble.defaultProps = videoBubbleDefaultProps;
|
|
57
|
+
VideoBubble.displayName = 'VideoBubble';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as VideoBubble } from './VideoBubble';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** ** Constants *** */
|
|
2
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
3
|
+
const videoBubbleDefaultProps = {
|
|
4
|
+
customStyle: dummyObject,
|
|
5
|
+
headerCustomStyle: dummyObject,
|
|
6
|
+
videoCustomStyle: dummyObject
|
|
7
|
+
};
|
|
8
|
+
export default videoBubbleDefaultProps;
|