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