@zohoim/chat-components 1.0.4 → 1.0.6
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/README.md +14 -4
- package/es/ActionIcon/ActionIcon.js +9 -10
- package/es/ActionIcon/index.js +1 -1
- package/es/ActionIconWrapper/ActionIconWrapper.js +4 -4
- package/es/ActionIconWrapper/index.js +1 -1
- package/es/AttachmentBubble/AttachmentBubble.js +14 -15
- package/es/AttachmentBubble/index.js +1 -1
- package/es/AttachmentBubbleInfo/AttachmentBubbleInfo.js +4 -4
- package/es/AttachmentBubbleInfo/index.js +1 -1
- package/es/AttachmentIcon/AttachmentIcon.js +5 -5
- package/es/AttachmentIcon/index.js +1 -1
- package/es/AttachmentIcon/utils/getAttachmentIconComponent.js +11 -11
- package/es/Audio/Audio.js +6 -4
- package/es/Audio/index.js +1 -1
- package/es/AudioBubble/AudioBubble.js +13 -14
- package/es/AudioBubble/index.js +1 -1
- package/es/ImageBubble/ImageBubble.js +5 -5
- package/es/ImageBubble/index.js +1 -1
- package/es/LazyLoadImage/LazyLoadImage.js +6 -4
- package/es/LazyLoadImage/index.js +1 -1
- package/es/LocationBubble/LocationBubble.js +4 -4
- package/es/LocationBubble/index.js +1 -1
- package/es/MediaBubbleWrapper/MediaBubbleWrapper.js +8 -10
- package/es/MediaBubbleWrapper/index.js +1 -1
- package/es/Message/Message.js +23 -16
- package/es/Message/index.js +1 -1
- package/es/MessageAction/MessageAction.js +15 -14
- package/es/MessageAction/index.js +1 -1
- package/es/MessageActions/MessageActions.js +18 -17
- package/es/MessageActions/index.js +1 -1
- package/es/MessageActionsMore/MessageActionsMore.js +4 -4
- package/es/MessageActionsMore/index.js +1 -1
- package/es/MessageActionsWrapper/MessageActionsWrapper.js +8 -9
- package/es/MessageActionsWrapper/index.js +1 -1
- package/es/MessageAvatar/MessageAvatar.js +3 -3
- package/es/MessageAvatar/index.js +1 -1
- package/es/MessageBox/MessageBox.js +4 -4
- package/es/MessageBox/index.js +1 -1
- package/es/MessageBubble/MessageBubble.js +6 -5
- package/es/MessageBubble/css/MessageBubble.module.css +7 -0
- package/es/MessageBubble/css/cssJSLogic.js +4 -2
- package/es/MessageBubble/index.js +1 -1
- package/es/MessageStatus/MessageStatus.js +8 -8
- package/es/MessageStatus/index.js +1 -1
- package/es/MoreActionItem/MoreActionItem.js +3 -3
- package/es/MoreActionItem/index.js +1 -1
- package/es/ReplyBubble/ReplyBubble.js +19 -18
- package/es/ReplyBubble/index.js +1 -1
- package/es/ReplyBubbleContent/ReplyBubbleContent.js +4 -4
- package/es/ReplyBubbleContent/index.js +1 -1
- package/es/ReplyBubbleHeader/ReplyBubbleHeader.js +4 -4
- package/es/ReplyBubbleHeader/index.js +1 -1
- package/es/TextBubble/TextBubble.js +4 -4
- package/es/TextBubble/index.js +1 -1
- package/es/Theme/ThemeWrapper.js +14 -16
- package/es/Theme/TooltipWrapper.js +5 -6
- package/es/Theme/index.js +1 -1
- package/es/Theme/themeVariables/commonThemeColorVariable.js +1 -1
- package/es/Theme/themeVariables/dark/blueTheme.js +2 -2
- package/es/Theme/themeVariables/dark/greenTheme.js +2 -2
- package/es/Theme/themeVariables/dark/orangeTheme.js +2 -2
- package/es/Theme/themeVariables/dark/redTheme.js +2 -2
- package/es/Theme/themeVariables/dark/yellowTheme.js +2 -2
- package/es/Theme/themeVariables/light/blueTheme.js +1 -1
- package/es/Theme/themeVariables/light/commonColorVariable.js +1 -1
- package/es/Theme/themeVariables/light/greenTheme.js +1 -1
- package/es/Theme/themeVariables/light/orangeTheme.js +1 -1
- package/es/Theme/themeVariables/light/redTheme.js +1 -1
- package/es/Theme/themeVariables/light/yellowTheme.js +1 -1
- package/es/Theme/themeVariables/pureDark/blueTheme.js +2 -2
- package/es/Theme/themeVariables/pureDark/greenTheme.js +2 -2
- package/es/Theme/themeVariables/pureDark/orangeTheme.js +2 -2
- package/es/Theme/themeVariables/pureDark/redTheme.js +2 -2
- package/es/Theme/themeVariables/pureDark/yellowTheme.js +2 -2
- package/es/Theme/utils/combineConfigurations.js +1 -1
- package/es/Theme/utils/getCustomizedCssVariables.js +1 -1
- package/es/Theme/utils/getThemeConfigurations.js +16 -16
- package/es/Video/Video.js +6 -4
- package/es/Video/index.js +1 -1
- package/es/VideoBubble/VideoBubble.js +14 -15
- package/es/VideoBubble/index.js +1 -1
- package/es/icons/create-icon-components.js +1 -1
- package/es/icons/iconSrc/attachments/Audio.js +2 -1
- package/es/icons/iconSrc/attachments/Code.js +2 -1
- package/es/icons/iconSrc/attachments/Image.js +2 -1
- package/es/icons/iconSrc/attachments/Pdf.js +2 -1
- package/es/icons/iconSrc/attachments/Ppt.js +2 -1
- package/es/icons/iconSrc/attachments/Text.js +2 -1
- package/es/icons/iconSrc/attachments/Txt.js +2 -1
- package/es/icons/iconSrc/attachments/Unknown.js +2 -1
- package/es/icons/iconSrc/attachments/Video.js +2 -1
- package/es/icons/iconSrc/attachments/Xls.js +2 -1
- package/es/icons/iconSrc/attachments/Zip.js +2 -1
- package/es/icons/iconSrc/attachments/index.js +10 -10
- package/es/icons/iconSrc/common/AlertTriangle.js +2 -1
- package/es/icons/iconSrc/common/Article.js +2 -1
- package/es/icons/iconSrc/common/Reply.js +2 -1
- package/es/icons/iconSrc/common/index.js +3 -3
- package/es/icons/iconSrc/messageStatus/Clock.js +2 -1
- package/es/icons/iconSrc/messageStatus/DoubleTick.js +2 -1
- package/es/icons/iconSrc/messageStatus/Failed.js +2 -1
- package/es/icons/iconSrc/messageStatus/Tick.js +2 -1
- package/es/icons/iconSrc/messageStatus/index.js +4 -4
- package/es/im/ArticleBubble/ArticleBubble.js +5 -5
- package/es/im/ArticleBubble/index.js +1 -1
- package/es/im/IMIntegrationIcon/IMIntegrationIcon.js +4 -4
- package/es/im/IMIntegrationIcon/css/IMIntegrationIcon.module.css +1 -1
- package/es/im/IMIntegrationIcon/index.js +1 -1
- package/es/im/IMMessage/IMMessage.js +29 -26
- package/es/im/IMMessage/index.js +1 -1
- package/es/im/IMMessageContent/IMMessageContent.js +40 -28
- package/es/im/IMMessageContent/index.js +1 -1
- package/es/im/IMMessageMeta/IMMessageMeta.js +9 -10
- package/es/im/IMMessageMeta/index.js +1 -1
- package/es/im/IMMessageMetaInfo/IMMessageMetaInfo.js +3 -3
- package/es/im/IMMessageMetaInfo/index.js +1 -1
- package/es/im/IMPermaLink/IMPermaLink.js +4 -4
- package/es/im/IMPermaLink/index.js +1 -1
- package/es/im/IMReplyBubble/IMReplyBubble.js +7 -9
- package/es/im/IMReplyBubble/index.js +1 -1
- package/es/im/IMTextBubble/IMTextBubble.js +7 -9
- package/es/im/IMTextBubble/index.js +1 -1
- package/es/im/index.js +9 -9
- package/es/index.js +29 -29
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
#IM - CHAT COMPONENTS LIBRARY
|
|
1
|
+
# IM - CHAT COMPONENTS LIBRARY
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
In this Library, We Provide Some Basic Message Components to Build Your Chat Application.
|
|
4
|
+
|
|
5
|
+
# How to install our package
|
|
4
6
|
|
|
5
7
|
> npm install @zohoim/chat-components
|
|
6
8
|
|
|
7
|
-
#How to import our components
|
|
9
|
+
# How to import our components
|
|
10
|
+
|
|
11
|
+
> import MessageBubble from '@zohoim/chat-components/es/MessageBubble/MessageBubble’;
|
|
12
|
+
|
|
13
|
+
# 1.0.6
|
|
14
|
+
|
|
15
|
+
- **IMMessageMeta** - Info for away message is supported
|
|
16
|
+
|
|
17
|
+
# 1.0.5
|
|
8
18
|
|
|
9
|
-
|
|
19
|
+
- Fixed some issues
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** ** Libraries *** */
|
|
4
2
|
import React, { useCallback, useMemo } from 'react';
|
|
5
3
|
/** ** Components *** */
|
|
6
4
|
|
|
7
|
-
import ActionIconWrapper from
|
|
5
|
+
import ActionIconWrapper from "../ActionIconWrapper/ActionIconWrapper";
|
|
8
6
|
/** ** Icons *** */
|
|
9
7
|
// import ReplyIcon from '@zohodesk/icon/es/general/Reply';
|
|
10
8
|
|
|
@@ -13,19 +11,19 @@ import CopyIcon from '@zohodesk/icon/es/general/Copy';
|
|
|
13
11
|
import DownloadIcon from '@zohodesk/icon/es/general/Cloud';
|
|
14
12
|
import DeleteIcon from '@zohodesk/icon/es/general/Delete';
|
|
15
13
|
import ForwardIcon from '@zohodesk/icon/es/channels/EmailForward';
|
|
16
|
-
import ReplyIcon from
|
|
14
|
+
import ReplyIcon from "../icons/iconSrc/common/Reply";
|
|
17
15
|
/** ** Hooks *** */
|
|
18
16
|
|
|
19
17
|
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
20
18
|
/** ** Constants *** */
|
|
21
19
|
|
|
22
|
-
import actionIconDefaultProps from
|
|
23
|
-
import actionIconPropTypes from
|
|
20
|
+
import actionIconDefaultProps from "./props/defaultProps";
|
|
21
|
+
import actionIconPropTypes from "./props/propTypes";
|
|
24
22
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
25
23
|
import { defaultMessageActions } from '@zohoim/chat-components-utils/es/constants/messageActionConstants';
|
|
26
24
|
/** ** Styles *** */
|
|
27
25
|
|
|
28
|
-
import style from
|
|
26
|
+
import style from "./css/ActionIcon.module.css";
|
|
29
27
|
const {
|
|
30
28
|
REPLY,
|
|
31
29
|
COPY,
|
|
@@ -68,14 +66,15 @@ export default function ActionIcon(props) {
|
|
|
68
66
|
customStyle: iconStyle
|
|
69
67
|
}) : null;
|
|
70
68
|
}, [iconStyle, id]);
|
|
71
|
-
return needIconOnly ? renderIcon() : /*#__PURE__*/React.createElement(ActionIconWrapper,
|
|
69
|
+
return needIconOnly ? renderIcon() : /*#__PURE__*/React.createElement(ActionIconWrapper, {
|
|
72
70
|
id: id,
|
|
73
71
|
isDisabled: isDisabled,
|
|
74
72
|
onClick: onClick,
|
|
75
73
|
onMouseEnter: onMouseEnter,
|
|
76
74
|
renderIcon: renderIcon,
|
|
77
|
-
title: title
|
|
78
|
-
|
|
75
|
+
title: title,
|
|
76
|
+
...actionIconWrapperProps
|
|
77
|
+
});
|
|
79
78
|
}
|
|
80
79
|
ActionIcon.propTypes = actionIconPropTypes;
|
|
81
80
|
ActionIcon.defaultProps = actionIconDefaultProps;
|
package/es/ActionIcon/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as ActionIcon } from
|
|
1
|
+
export { default as ActionIcon } from "./ActionIcon";
|
|
@@ -6,15 +6,15 @@ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
|
6
6
|
import useActionIconWrapper from '@zohoim/chat-components-hooks/es/ActionIconWrapper/useActionIconWrapper';
|
|
7
7
|
/** ** Constants *** */
|
|
8
8
|
|
|
9
|
-
import actionIconWrapperDefaultProps from
|
|
10
|
-
import actionIconWrapperPropTypes from
|
|
9
|
+
import actionIconWrapperDefaultProps from "./props/defaultProps";
|
|
10
|
+
import actionIconWrapperPropTypes from "./props/propTypes";
|
|
11
11
|
/** ** Methods *** */
|
|
12
12
|
|
|
13
13
|
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
14
|
-
import cssJSLogic from
|
|
14
|
+
import cssJSLogic from "./css/cssJSLogic";
|
|
15
15
|
/** ** Styles *** */
|
|
16
16
|
|
|
17
|
-
import style from
|
|
17
|
+
import style from "./css/ActionIconWrapper.module.css";
|
|
18
18
|
export default function ActionIconWrapper(props) {
|
|
19
19
|
const {
|
|
20
20
|
renderIcon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as ActionIconWrapper } from
|
|
1
|
+
export { default as ActionIconWrapper } from "./ActionIconWrapper";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** ** Libraries *** */
|
|
4
2
|
import React from 'react';
|
|
5
3
|
/** ** Hooks *** */
|
|
@@ -8,19 +6,19 @@ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
|
8
6
|
import useAttachmentBubble from '@zohoim/chat-components-hooks/es/AttachmentBubble/useAttachmentBubble';
|
|
9
7
|
/** ** Constants *** */
|
|
10
8
|
|
|
11
|
-
import attachmentBubbleDefaultProps from
|
|
12
|
-
import attachmentBubblePropTypes from
|
|
9
|
+
import attachmentBubbleDefaultProps from "./props/defaultProps";
|
|
10
|
+
import attachmentBubblePropTypes from "./props/propTypes";
|
|
13
11
|
/** ** Styles *** */
|
|
14
12
|
|
|
15
|
-
import style from
|
|
13
|
+
import style from "./css/AttachmentBubble.module.css";
|
|
16
14
|
/** ** Components *** */
|
|
17
15
|
|
|
18
|
-
import AttachmentBubbleInfo from
|
|
19
|
-
import AttachmentIcon from
|
|
16
|
+
import AttachmentBubbleInfo from "../AttachmentBubbleInfo/AttachmentBubbleInfo";
|
|
17
|
+
import AttachmentIcon from "../AttachmentIcon/AttachmentIcon";
|
|
20
18
|
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
21
19
|
/** ** Methods *** */
|
|
22
20
|
|
|
23
|
-
import cssJSLogic from
|
|
21
|
+
import cssJSLogic from "./css/cssJSLogic";
|
|
24
22
|
export default function AttachmentBubble(props) {
|
|
25
23
|
const {
|
|
26
24
|
customStyle,
|
|
@@ -67,20 +65,21 @@ export default function AttachmentBubble(props) {
|
|
|
67
65
|
onClick: onClick
|
|
68
66
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
69
67
|
className: newStyle.attachmentBubbleIcon
|
|
70
|
-
}, /*#__PURE__*/React.createElement(AttachmentIcon,
|
|
68
|
+
}, /*#__PURE__*/React.createElement(AttachmentIcon, {
|
|
71
69
|
fileFormat: fileFormat,
|
|
72
70
|
isDisabled: isDisabled,
|
|
73
71
|
isValidAttachment: isValidAttachment,
|
|
74
|
-
mediaType: mediaType
|
|
75
|
-
|
|
72
|
+
mediaType: mediaType,
|
|
73
|
+
...attachmentIconProps
|
|
74
|
+
})), /*#__PURE__*/React.createElement(Box, {
|
|
76
75
|
className: newStyle.attachmentBubbleContent,
|
|
77
76
|
flexible: true
|
|
78
|
-
}, /*#__PURE__*/React.createElement(AttachmentBubbleInfo,
|
|
77
|
+
}, /*#__PURE__*/React.createElement(AttachmentBubbleInfo, {
|
|
79
78
|
fileName: fileName,
|
|
80
|
-
fileSize: fileSize
|
|
81
|
-
|
|
79
|
+
fileSize: fileSize,
|
|
80
|
+
...attachmentBubbleInfoProps,
|
|
82
81
|
isFailed: isFailed
|
|
83
|
-
})))
|
|
82
|
+
})));
|
|
84
83
|
}
|
|
85
84
|
AttachmentBubble.propTypes = attachmentBubblePropTypes;
|
|
86
85
|
AttachmentBubble.defaultProps = attachmentBubbleDefaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as AttachmentBubble } from
|
|
1
|
+
export { default as AttachmentBubble } from "./AttachmentBubble";
|
|
@@ -5,17 +5,17 @@ import React from 'react';
|
|
|
5
5
|
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
6
6
|
/** ** Constants *** */
|
|
7
7
|
|
|
8
|
-
import attachmentBubbleInfoDefaultProps from
|
|
9
|
-
import attachmentBubbleInfoPropTypes from
|
|
8
|
+
import attachmentBubbleInfoDefaultProps from "./props/defaultProps";
|
|
9
|
+
import attachmentBubbleInfoPropTypes from "./props/propTypes";
|
|
10
10
|
/** ** Components *** */
|
|
11
11
|
|
|
12
12
|
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
13
13
|
/** ** Styles *** */
|
|
14
14
|
|
|
15
|
-
import style from
|
|
15
|
+
import style from "./css/AttachmentBubbleInfo.module.css";
|
|
16
16
|
/** ** Methods *** */
|
|
17
17
|
|
|
18
|
-
import cssJSLogic from
|
|
18
|
+
import cssJSLogic from "./css/cssJSLogic";
|
|
19
19
|
export default function AttachmentBubbleInfo(props) {
|
|
20
20
|
const {
|
|
21
21
|
customStyle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as AttachmentBubbleInfo } from
|
|
1
|
+
export { default as AttachmentBubbleInfo } from "./AttachmentBubbleInfo";
|
|
@@ -5,16 +5,16 @@ import React, { useMemo } from 'react';
|
|
|
5
5
|
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
6
6
|
/** ** Constants *** */
|
|
7
7
|
|
|
8
|
-
import attachmentIconDefaultProps from
|
|
9
|
-
import attachmentIconPropTypes from
|
|
8
|
+
import attachmentIconDefaultProps from "./props/defaultProps";
|
|
9
|
+
import attachmentIconPropTypes from "./props/propTypes";
|
|
10
10
|
/** ** Methods *** */
|
|
11
11
|
|
|
12
|
-
import cssJSLogic from
|
|
13
|
-
import getAttachmentIconComponent from
|
|
12
|
+
import cssJSLogic from "./css/cssJSLogic";
|
|
13
|
+
import getAttachmentIconComponent from "./utils/getAttachmentIconComponent";
|
|
14
14
|
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
15
15
|
/** ** Styles *** */
|
|
16
16
|
|
|
17
|
-
import style from
|
|
17
|
+
import style from "./css/AttachmentIcon.module.css";
|
|
18
18
|
export default function AttachmentIcon(props) {
|
|
19
19
|
const {
|
|
20
20
|
customStyle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as AttachmentIcon } from
|
|
1
|
+
export { default as AttachmentIcon } from "./AttachmentIcon";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/** ** Icons *** */
|
|
2
|
-
import AudioIcon from
|
|
3
|
-
import CodeIcon from
|
|
4
|
-
import ImageIcon from
|
|
5
|
-
import PdfIcon from
|
|
6
|
-
import TextIcon from
|
|
7
|
-
import UnknownIcon from
|
|
8
|
-
import VideoIcon from
|
|
9
|
-
import ZipIcon from
|
|
10
|
-
import AlertIcon from
|
|
11
|
-
import XlsIcon from
|
|
12
|
-
import PptIcon from
|
|
2
|
+
import AudioIcon from "../../icons/iconSrc/attachments/Audio";
|
|
3
|
+
import CodeIcon from "../../icons/iconSrc/attachments/Code";
|
|
4
|
+
import ImageIcon from "../../icons/iconSrc/attachments/Image";
|
|
5
|
+
import PdfIcon from "../../icons/iconSrc/attachments/Pdf";
|
|
6
|
+
import TextIcon from "../../icons/iconSrc/attachments/Text";
|
|
7
|
+
import UnknownIcon from "../../icons/iconSrc/attachments/Unknown";
|
|
8
|
+
import VideoIcon from "../../icons/iconSrc/attachments/Video";
|
|
9
|
+
import ZipIcon from "../../icons/iconSrc/attachments/Zip";
|
|
10
|
+
import AlertIcon from "../../icons/iconSrc/common/AlertTriangle";
|
|
11
|
+
import XlsIcon from "../../icons/iconSrc/attachments/Xls";
|
|
12
|
+
import PptIcon from "../../icons/iconSrc/attachments/Ppt";
|
|
13
13
|
/** ** Constants *** */
|
|
14
14
|
|
|
15
15
|
import attachmentFileTypes from '@zohoim/chat-components-utils/es/constants/attachmentFileTypes';
|
package/es/Audio/Audio.js
CHANGED
|
@@ -6,11 +6,11 @@ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
|
6
6
|
import useMedia from '@zohoim/chat-components-hooks/es/Media/useMedia';
|
|
7
7
|
/** ** Constants *** */
|
|
8
8
|
|
|
9
|
-
import audioDefaultProps from
|
|
10
|
-
import audioPropTypes from
|
|
9
|
+
import audioDefaultProps from "./props/defaultProps";
|
|
10
|
+
import audioPropTypes from "./props/propTypes";
|
|
11
11
|
/** ** Styles *** */
|
|
12
12
|
|
|
13
|
-
import style from
|
|
13
|
+
import style from "./css/Audio.module.css";
|
|
14
14
|
export default function Audio(props) {
|
|
15
15
|
const {
|
|
16
16
|
customStyle,
|
|
@@ -19,7 +19,9 @@ export default function Audio(props) {
|
|
|
19
19
|
} = props;
|
|
20
20
|
const {
|
|
21
21
|
mediaElementRef
|
|
22
|
-
} = useMedia(
|
|
22
|
+
} = useMedia({
|
|
23
|
+
src: fileURL
|
|
24
|
+
});
|
|
23
25
|
/* External CSS Customization */
|
|
24
26
|
|
|
25
27
|
const newStyle = useMergeStyle(style, customStyle);
|
package/es/Audio/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Audio } from
|
|
1
|
+
export { default as Audio } from "./Audio";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** ** Libraries *** */
|
|
4
2
|
import React, { useCallback } from 'react';
|
|
5
3
|
/** ** Hooks *** */
|
|
@@ -7,17 +5,17 @@ import React, { useCallback } from 'react';
|
|
|
7
5
|
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
8
6
|
/** ** Constants *** */
|
|
9
7
|
|
|
10
|
-
import audioBubbleDefaultProps from
|
|
11
|
-
import audioBubblePropTypes from
|
|
8
|
+
import audioBubbleDefaultProps from "./props/defaultProps";
|
|
9
|
+
import audioBubblePropTypes from "./props/propTypes";
|
|
12
10
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
13
11
|
/** ** Styles *** */
|
|
14
12
|
|
|
15
|
-
import style from
|
|
13
|
+
import style from "./css/AudioBubble.module.css";
|
|
16
14
|
/** ** Components *** */
|
|
17
15
|
|
|
18
16
|
import { Box } from '@zohodesk/components/es/Layout';
|
|
19
|
-
import MediaBubbleWrapper from
|
|
20
|
-
import Audio from
|
|
17
|
+
import MediaBubbleWrapper from "../MediaBubbleWrapper/MediaBubbleWrapper";
|
|
18
|
+
import Audio from "../Audio/Audio";
|
|
21
19
|
export default function AudioBubble(props) {
|
|
22
20
|
const {
|
|
23
21
|
customStyle,
|
|
@@ -39,17 +37,18 @@ export default function AudioBubble(props) {
|
|
|
39
37
|
} = _ref;
|
|
40
38
|
return /*#__PURE__*/React.createElement(Box, {
|
|
41
39
|
className: newStyle.audioBubble
|
|
42
|
-
}, /*#__PURE__*/React.createElement(Audio,
|
|
40
|
+
}, /*#__PURE__*/React.createElement(Audio, {
|
|
43
41
|
fileType: fileType,
|
|
44
|
-
fileURL: fileURL
|
|
45
|
-
|
|
42
|
+
fileURL: fileURL,
|
|
43
|
+
...audioProps
|
|
44
|
+
}));
|
|
46
45
|
}, [audioProps, newStyle.audioBubble]);
|
|
47
|
-
return /*#__PURE__*/React.createElement(MediaBubbleWrapper,
|
|
46
|
+
return /*#__PURE__*/React.createElement(MediaBubbleWrapper, {
|
|
48
47
|
mediaDetails: audioDetails,
|
|
49
|
-
renderMedia: renderMedia
|
|
50
|
-
|
|
48
|
+
renderMedia: renderMedia,
|
|
49
|
+
...mediaBubbleWrapperProps,
|
|
51
50
|
isFailed: isFailed
|
|
52
|
-
})
|
|
51
|
+
});
|
|
53
52
|
}
|
|
54
53
|
AudioBubble.propTypes = audioBubblePropTypes;
|
|
55
54
|
AudioBubble.defaultProps = audioBubbleDefaultProps;
|
package/es/AudioBubble/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as AudioBubble } from
|
|
1
|
+
export { default as AudioBubble } from "./AudioBubble";
|
|
@@ -6,18 +6,18 @@ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
|
6
6
|
import useAttachmentBubble from '@zohoim/chat-components-hooks/es/AttachmentBubble/useAttachmentBubble';
|
|
7
7
|
/** ** Constants *** */
|
|
8
8
|
|
|
9
|
-
import imageBubbleDefaultProps from
|
|
10
|
-
import imageBubblePropTypes from
|
|
9
|
+
import imageBubbleDefaultProps from "./props/defaultProps";
|
|
10
|
+
import imageBubblePropTypes from "./props/propTypes";
|
|
11
11
|
/** ** Styles *** */
|
|
12
12
|
|
|
13
|
-
import style from
|
|
13
|
+
import style from "./css/ImageBubble.module.css";
|
|
14
14
|
/** ** Components *** */
|
|
15
15
|
|
|
16
16
|
import { Container } from '@zohodesk/components/es/Layout';
|
|
17
|
-
import LazyLoadImage from
|
|
17
|
+
import LazyLoadImage from "../LazyLoadImage/LazyLoadImage";
|
|
18
18
|
/** ** Methods *** */
|
|
19
19
|
|
|
20
|
-
import cssJSLogic from
|
|
20
|
+
import cssJSLogic from "./css/cssJSLogic";
|
|
21
21
|
export default function ImageBubble(props) {
|
|
22
22
|
const {
|
|
23
23
|
customStyle,
|
package/es/ImageBubble/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as ImageBubble } from
|
|
1
|
+
export { default as ImageBubble } from "./ImageBubble";
|
|
@@ -6,11 +6,11 @@ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
|
6
6
|
import useLazyLoadImage from '@zohoim/chat-components-hooks/es/ImageBubble/useLazyLoadImage';
|
|
7
7
|
/** ** Constants *** */
|
|
8
8
|
|
|
9
|
-
import lazyLoadImageDefaultProps from
|
|
10
|
-
import lazyLoadImagePropTypes from
|
|
9
|
+
import lazyLoadImageDefaultProps from "./props/defaultProps";
|
|
10
|
+
import lazyLoadImagePropTypes from "./props/propTypes";
|
|
11
11
|
/** ** Styles *** */
|
|
12
12
|
|
|
13
|
-
import style from
|
|
13
|
+
import style from "./css/LazyLoadImage.module.css";
|
|
14
14
|
export default function LazyLoadImage(props) {
|
|
15
15
|
const {
|
|
16
16
|
customStyle,
|
|
@@ -19,7 +19,9 @@ export default function LazyLoadImage(props) {
|
|
|
19
19
|
} = props;
|
|
20
20
|
const {
|
|
21
21
|
imageElementRef
|
|
22
|
-
} = useLazyLoadImage(
|
|
22
|
+
} = useLazyLoadImage({
|
|
23
|
+
src
|
|
24
|
+
});
|
|
23
25
|
/* External CSS Customization */
|
|
24
26
|
|
|
25
27
|
const newStyle = useMergeStyle(style, customStyle);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as LazyLoadImage } from
|
|
1
|
+
export { default as LazyLoadImage } from "./LazyLoadImage";
|
|
@@ -9,17 +9,17 @@ import React from 'react';
|
|
|
9
9
|
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
10
10
|
/** ** Constants *** */
|
|
11
11
|
|
|
12
|
-
import locationBubbleDefaultProps from
|
|
13
|
-
import locationBubblePropTypes from
|
|
12
|
+
import locationBubbleDefaultProps from "./props/defaultProps";
|
|
13
|
+
import locationBubblePropTypes from "./props/propTypes";
|
|
14
14
|
/** ** Components *** */
|
|
15
15
|
|
|
16
16
|
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
17
17
|
/** ** Styles *** */
|
|
18
18
|
|
|
19
|
-
import style from
|
|
19
|
+
import style from "./css/LocationBubble.module.css";
|
|
20
20
|
/** ** Methods *** */
|
|
21
21
|
|
|
22
|
-
import cssJSLogic from
|
|
22
|
+
import cssJSLogic from "./css/cssJSLogic";
|
|
23
23
|
export default function LocationBubble(props) {
|
|
24
24
|
const {
|
|
25
25
|
customStyle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as LocationBubble } from
|
|
1
|
+
export { default as LocationBubble } from "./LocationBubble";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** ** Libraries *** */
|
|
4
2
|
import React, { useMemo, Fragment } from 'react';
|
|
5
3
|
/** ** Hooks *** */
|
|
@@ -8,18 +6,18 @@ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
|
8
6
|
import useAttachmentBubble from '@zohoim/chat-components-hooks/es/AttachmentBubble/useAttachmentBubble';
|
|
9
7
|
/** ** Constants *** */
|
|
10
8
|
|
|
11
|
-
import mediaBubbleWrapperDefaultProps from
|
|
12
|
-
import mediaBubbleWrapperPropTypes from
|
|
9
|
+
import mediaBubbleWrapperDefaultProps from "./props/defaultProps";
|
|
10
|
+
import mediaBubbleWrapperPropTypes from "./props/propTypes";
|
|
13
11
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
14
12
|
/** ** Styles *** */
|
|
15
13
|
|
|
16
|
-
import style from
|
|
14
|
+
import style from "./css/MediaBubbleWrapper.module.css";
|
|
17
15
|
/** ** Methods *** */
|
|
18
16
|
|
|
19
17
|
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
20
18
|
/** ** Components *** */
|
|
21
19
|
|
|
22
|
-
import AttachmentBubbleInfo from
|
|
20
|
+
import AttachmentBubbleInfo from "../AttachmentBubbleInfo/AttachmentBubbleInfo";
|
|
23
21
|
export default function MediaBubbleWrapper(props) {
|
|
24
22
|
const {
|
|
25
23
|
customStyle,
|
|
@@ -49,13 +47,13 @@ export default function MediaBubbleWrapper(props) {
|
|
|
49
47
|
fileURL,
|
|
50
48
|
fileType
|
|
51
49
|
});
|
|
52
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(AttachmentBubbleInfo,
|
|
50
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(AttachmentBubbleInfo, {
|
|
53
51
|
customStyle: bubbleInfoCustomStyle,
|
|
54
52
|
fileName: fileName,
|
|
55
|
-
fileSize: fileSize
|
|
56
|
-
|
|
53
|
+
fileSize: fileSize,
|
|
54
|
+
...attachmentBubbleInfoProps,
|
|
57
55
|
isFailed: isFailed
|
|
58
|
-
})
|
|
56
|
+
}), mediaComponent);
|
|
59
57
|
}
|
|
60
58
|
MediaBubbleWrapper.propTypes = mediaBubbleWrapperPropTypes;
|
|
61
59
|
MediaBubbleWrapper.defaultProps = mediaBubbleWrapperDefaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as MediaBubbleWrapper } from
|
|
1
|
+
export { default as MediaBubbleWrapper } from "./MediaBubbleWrapper";
|
package/es/Message/Message.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** ** Libraries *** */
|
|
4
2
|
import React, { useCallback } from 'react';
|
|
5
3
|
/** ** Constants *** */
|
|
6
4
|
|
|
7
|
-
import messageDefaultProps from
|
|
8
|
-
import messagePropTypes from
|
|
5
|
+
import messageDefaultProps from "./props/defaultProps";
|
|
6
|
+
import messagePropTypes from "./props/propTypes";
|
|
9
7
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
10
8
|
/** ** Components *** */
|
|
11
9
|
|
|
12
|
-
import MessageBubble from
|
|
13
|
-
import MessageBox from
|
|
14
|
-
import MessageAvatar from
|
|
15
|
-
import MessageActions from
|
|
16
|
-
import MessageStatus from
|
|
10
|
+
import MessageBubble from "../MessageBubble/MessageBubble";
|
|
11
|
+
import MessageBox from "../MessageBox/MessageBox";
|
|
12
|
+
import MessageAvatar from "../MessageAvatar/MessageAvatar";
|
|
13
|
+
import MessageActions from "../MessageActions/MessageActions";
|
|
14
|
+
import MessageStatus from "../MessageStatus/MessageStatus";
|
|
17
15
|
/** ** Methods *** */
|
|
18
16
|
|
|
19
17
|
import getMessageStatus from '@zohoim/chat-components-utils/es/getMessageStatus';
|
|
@@ -74,7 +72,9 @@ export default function Message(props) {
|
|
|
74
72
|
title: name,
|
|
75
73
|
renderIcon: renderOwnerStatusIcon
|
|
76
74
|
};
|
|
77
|
-
return /*#__PURE__*/React.createElement(MessageAvatar,
|
|
75
|
+
return /*#__PURE__*/React.createElement(MessageAvatar, { ...props,
|
|
76
|
+
...messageOwnerProps
|
|
77
|
+
});
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
return null;
|
|
@@ -86,7 +86,9 @@ export default function Message(props) {
|
|
|
86
86
|
messageStatus: status,
|
|
87
87
|
title: statusTooltip
|
|
88
88
|
};
|
|
89
|
-
return isShowMessageStatus && status ? /*#__PURE__*/React.createElement(MessageStatus,
|
|
89
|
+
return isShowMessageStatus && status ? /*#__PURE__*/React.createElement(MessageStatus, { ...props,
|
|
90
|
+
...messageStatusProps
|
|
91
|
+
}) : null;
|
|
90
92
|
}, [status, statusTooltip, isShowMessageStatus, messageStatusProps]);
|
|
91
93
|
/** ** Render MessageBox *** */
|
|
92
94
|
|
|
@@ -98,7 +100,9 @@ export default function Message(props) {
|
|
|
98
100
|
isIncoming,
|
|
99
101
|
isOutgoing
|
|
100
102
|
};
|
|
101
|
-
return /*#__PURE__*/React.createElement(MessageBox,
|
|
103
|
+
return /*#__PURE__*/React.createElement(MessageBox, { ...props,
|
|
104
|
+
...messageBoxProps
|
|
105
|
+
});
|
|
102
106
|
}, [handleRenderMessageStatus, renderContent, messageBoxProps, isFailed, isIncoming, isOutgoing]);
|
|
103
107
|
/** ** Render Message Actions *** */
|
|
104
108
|
|
|
@@ -109,17 +113,20 @@ export default function Message(props) {
|
|
|
109
113
|
renderSecondaryActions,
|
|
110
114
|
onMouseEnter: onMouseEnterAction
|
|
111
115
|
};
|
|
112
|
-
return /*#__PURE__*/React.createElement(MessageActions,
|
|
116
|
+
return /*#__PURE__*/React.createElement(MessageActions, { ...props,
|
|
117
|
+
...messageActionsProps
|
|
118
|
+
});
|
|
113
119
|
}, [actions, onSelectAction, onMouseEnterAction, renderSecondaryActions, messageActionsProps]);
|
|
114
|
-
return /*#__PURE__*/React.createElement(MessageBubble,
|
|
120
|
+
return /*#__PURE__*/React.createElement(MessageBubble, {
|
|
115
121
|
direction: direction,
|
|
116
122
|
isActive: isActive,
|
|
117
123
|
needMessageActions: needMessageActions,
|
|
118
124
|
needSender: needSender,
|
|
119
125
|
renderMessageActions: handleRenderMessageActions,
|
|
120
126
|
renderMessageBox: handleRenderMessageBox,
|
|
121
|
-
renderMessageOwner: handleRenderMessageOwner
|
|
122
|
-
|
|
127
|
+
renderMessageOwner: handleRenderMessageOwner,
|
|
128
|
+
...messageBubbleProps
|
|
129
|
+
});
|
|
123
130
|
}
|
|
124
131
|
Message.propTypes = messagePropTypes;
|
|
125
132
|
Message.defaultProps = messageDefaultProps;
|
package/es/Message/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Message } from
|
|
1
|
+
export { default as Message } from "./Message";
|