@zohoim/chat-components 1.0.4 → 1.0.5
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 +10 -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
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as IMIntegrationIcon } from
|
|
1
|
+
export { default as IMIntegrationIcon } from "./IMIntegrationIcon";
|
|
@@ -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, useMemo } from 'react';
|
|
5
3
|
/** ** Hooks *** */
|
|
@@ -8,22 +6,22 @@ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
|
8
6
|
import useIMMessage from '@zohoim/chat-components-hooks/es/im/IMMessage/useIMMessage';
|
|
9
7
|
/** ** Methods *** */
|
|
10
8
|
|
|
11
|
-
import cssJSLogic from
|
|
9
|
+
import cssJSLogic from "./css/cssJSLogic";
|
|
12
10
|
/** ** Constants *** */
|
|
13
11
|
|
|
14
|
-
import imMessageDefaultProps from
|
|
15
|
-
import imMessagePropTypes from
|
|
12
|
+
import imMessageDefaultProps from "./props/defaultProps";
|
|
13
|
+
import imMessagePropTypes from "./props/propTypes";
|
|
16
14
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
17
15
|
/** ** Components *** */
|
|
18
16
|
|
|
19
|
-
import Message from
|
|
20
|
-
import IMMessageContent from
|
|
21
|
-
import IMPermaLink from
|
|
22
|
-
import IMIntegrationIcon from
|
|
23
|
-
import IMMessageMeta from
|
|
17
|
+
import Message from "../../Message/Message";
|
|
18
|
+
import IMMessageContent from "../IMMessageContent/IMMessageContent";
|
|
19
|
+
import IMPermaLink from "../IMPermaLink/IMPermaLink";
|
|
20
|
+
import IMIntegrationIcon from "../IMIntegrationIcon/IMIntegrationIcon";
|
|
21
|
+
import IMMessageMeta from "../IMMessageMeta/IMMessageMeta";
|
|
24
22
|
/** ** Styles *** */
|
|
25
23
|
|
|
26
|
-
import style from
|
|
24
|
+
import style from "./css/IMMessage.module.css";
|
|
27
25
|
export default function IMMessage(props) {
|
|
28
26
|
const {
|
|
29
27
|
defaultAvatarUrls,
|
|
@@ -99,18 +97,19 @@ export default function IMMessage(props) {
|
|
|
99
97
|
displayDateTime,
|
|
100
98
|
tooltip
|
|
101
99
|
} = dateTimeDetails || {};
|
|
102
|
-
return /*#__PURE__*/React.createElement(IMMessageMeta,
|
|
100
|
+
return /*#__PURE__*/React.createElement(IMMessageMeta, {
|
|
103
101
|
autoMessageType: autoMessageType,
|
|
104
102
|
direction: direction,
|
|
105
103
|
isValidAttachment: isValidAttachment,
|
|
106
104
|
messageMetaInfoI18N: messageMetaInfoI18N,
|
|
107
105
|
time: isShowMessageTime ? displayDateTime : '',
|
|
108
|
-
timeTooltip: tooltip
|
|
109
|
-
|
|
106
|
+
timeTooltip: tooltip,
|
|
107
|
+
...imMessageMetaProps
|
|
108
|
+
});
|
|
110
109
|
}, [isShowMessageTime, dateTimeDetails, direction, autoMessageType, imMessageMetaProps, isValidAttachment, messageMetaInfoI18N]);
|
|
111
110
|
/** ** Render Message Content *** */
|
|
112
111
|
|
|
113
|
-
const handleRenderMessage = useCallback(() => /*#__PURE__*/React.createElement(IMMessageContent,
|
|
112
|
+
const handleRenderMessage = useCallback(() => /*#__PURE__*/React.createElement(IMMessageContent, {
|
|
114
113
|
deleteMessageText: deleteMessageText,
|
|
115
114
|
isFailed: isFailedMessage,
|
|
116
115
|
isSending: isSendingMessage,
|
|
@@ -122,8 +121,9 @@ export default function IMMessage(props) {
|
|
|
122
121
|
onLoadFullMessage: onLoadFullMessage,
|
|
123
122
|
replyText: replyText,
|
|
124
123
|
seeMoreText: seeMoreText,
|
|
125
|
-
sessionDetails: sessionDetails
|
|
126
|
-
|
|
124
|
+
sessionDetails: sessionDetails,
|
|
125
|
+
...imMessageContentProps
|
|
126
|
+
}), [seeMoreText, replyText, deleteMessageText, messageDetails, sessionDetails, messageContentClickMapping, messageBubbleTitleI18N, onLoadFullMessage, onClickReply, isFailedMessage, isSendingMessage, imMessageContentProps, isShowFullContent]);
|
|
127
127
|
/** ** Render Secondary Actions - TicketId *** */
|
|
128
128
|
|
|
129
129
|
const handleRenderSecondaryActions = useCallback(() => {
|
|
@@ -136,19 +136,21 @@ export default function IMMessage(props) {
|
|
|
136
136
|
const customStyle = {
|
|
137
137
|
text: imTicketLinkClass
|
|
138
138
|
};
|
|
139
|
-
return /*#__PURE__*/React.createElement(IMPermaLink,
|
|
139
|
+
return /*#__PURE__*/React.createElement(IMPermaLink, {
|
|
140
140
|
customStyle: customStyle,
|
|
141
141
|
href: ticketUrl,
|
|
142
142
|
id: ticketId,
|
|
143
143
|
onClick: onTicketClick,
|
|
144
|
-
text: ticketNumber ? `#${ticketNumber}` : ''
|
|
145
|
-
|
|
144
|
+
text: ticketNumber ? `#${ticketNumber}` : '',
|
|
145
|
+
...imTicketLinkProps
|
|
146
|
+
});
|
|
146
147
|
}, [ticketNumber, ticketUrl, ticketId, onTicketClick, imTicketLinkProps, newStyle, isIncoming, isOutgoing]);
|
|
147
148
|
/** ** Render Owner Status Icon *** */
|
|
148
149
|
|
|
149
|
-
const handleRenderIntegIcon = useCallback(() => /*#__PURE__*/React.createElement(IMIntegrationIcon,
|
|
150
|
-
integrationName: isShowIntegrationIcon ? integrationName : ''
|
|
151
|
-
|
|
150
|
+
const handleRenderIntegIcon = useCallback(() => /*#__PURE__*/React.createElement(IMIntegrationIcon, {
|
|
151
|
+
integrationName: isShowIntegrationIcon ? integrationName : '',
|
|
152
|
+
...imIntegrationIconProps
|
|
153
|
+
}), [isShowIntegrationIcon, integrationName, imIntegrationIconProps]);
|
|
152
154
|
/** ** Construct Owner Details *** */
|
|
153
155
|
|
|
154
156
|
const ownerDetails = useMemo(() => ({
|
|
@@ -174,7 +176,7 @@ export default function IMMessage(props) {
|
|
|
174
176
|
}
|
|
175
177
|
};
|
|
176
178
|
}, [messageProps, handleRenderMessageBoxFooter]);
|
|
177
|
-
return /*#__PURE__*/React.createElement(Message,
|
|
179
|
+
return /*#__PURE__*/React.createElement(Message, {
|
|
178
180
|
actions: actions,
|
|
179
181
|
direction: direction,
|
|
180
182
|
isActive: isHighlightMessage,
|
|
@@ -189,8 +191,9 @@ export default function IMMessage(props) {
|
|
|
189
191
|
renderOwnerStatusIcon: handleRenderIntegIcon,
|
|
190
192
|
renderSecondaryActions: handleRenderSecondaryActions,
|
|
191
193
|
status: messageStatus,
|
|
192
|
-
statusTooltip: messageStatusTitle
|
|
193
|
-
|
|
194
|
+
statusTooltip: messageStatusTitle,
|
|
195
|
+
...messageCustomProps
|
|
196
|
+
});
|
|
194
197
|
}
|
|
195
198
|
IMMessage.propTypes = imMessagePropTypes;
|
|
196
199
|
IMMessage.defaultProps = imMessageDefaultProps;
|
package/es/im/IMMessage/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as IMMessage } from
|
|
1
|
+
export { default as IMMessage } from "./IMMessage";
|
|
@@ -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
|
/* eslint-disable react/jsx-indent */
|
|
4
2
|
|
|
5
3
|
/** ** Libraries *** */
|
|
@@ -10,21 +8,21 @@ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
|
10
8
|
import useIMMessageContent from '@zohoim/chat-components-hooks/es/im/IMMessageContent/useIMMessageContent';
|
|
11
9
|
/** ** Constants *** */
|
|
12
10
|
|
|
13
|
-
import imMessageContentDefaultProps from
|
|
14
|
-
import imMessageContentPropTypes from
|
|
11
|
+
import imMessageContentDefaultProps from "./props/defaultProps";
|
|
12
|
+
import imMessageContentPropTypes from "./props/propTypes";
|
|
15
13
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
16
14
|
/** ** Styles *** */
|
|
17
15
|
|
|
18
|
-
import style from
|
|
16
|
+
import style from "./css/IMMessageContent.module.css";
|
|
19
17
|
/** ** Components *** */
|
|
20
18
|
|
|
21
|
-
import IMReplyBubble from
|
|
22
|
-
import IMTextBubble from
|
|
23
|
-
import LocationBubble from
|
|
24
|
-
import ImageBubble from
|
|
25
|
-
import VideoBubble from
|
|
26
|
-
import AudioBubble from
|
|
27
|
-
import AttachmentBubble from
|
|
19
|
+
import IMReplyBubble from "../IMReplyBubble/IMReplyBubble";
|
|
20
|
+
import IMTextBubble from "../IMTextBubble/IMTextBubble";
|
|
21
|
+
import LocationBubble from "../../LocationBubble/LocationBubble";
|
|
22
|
+
import ImageBubble from "../../ImageBubble/ImageBubble";
|
|
23
|
+
import VideoBubble from "../../VideoBubble/VideoBubble";
|
|
24
|
+
import AudioBubble from "../../AudioBubble/AudioBubble";
|
|
25
|
+
import AttachmentBubble from "../../AttachmentBubble/AttachmentBubble";
|
|
28
26
|
export default function IMMessageContent(props) {
|
|
29
27
|
const {
|
|
30
28
|
messageDetails,
|
|
@@ -86,42 +84,56 @@ export default function IMMessageContent(props) {
|
|
|
86
84
|
};
|
|
87
85
|
return /*#__PURE__*/React.createElement(Fragment, null, isShowLayoutBubble ? null : null, isShowDeleteBubble ? /*#__PURE__*/React.createElement("div", {
|
|
88
86
|
className: newStyle.deleteBubble
|
|
89
|
-
}, deleteMessageText) : null, isShowReplyBubble ? /*#__PURE__*/React.createElement("div", wrapperDivProps
|
|
87
|
+
}, deleteMessageText) : null, isShowReplyBubble ? /*#__PURE__*/React.createElement("div", { ...wrapperDivProps
|
|
88
|
+
}, /*#__PURE__*/React.createElement(IMReplyBubble, {
|
|
90
89
|
isFailed: isFailed,
|
|
91
90
|
messageDetails: replyToMessage,
|
|
92
91
|
onClick: onClickReply,
|
|
93
|
-
replyText: replyText
|
|
94
|
-
|
|
92
|
+
replyText: replyText,
|
|
93
|
+
...imReplyBubbleProps
|
|
94
|
+
})) : null, isShowCustomBubble ? renderCustomMessage({
|
|
95
95
|
messageDetails,
|
|
96
96
|
isFailed
|
|
97
|
-
}) : null, isShowImageBubble ? /*#__PURE__*/React.createElement("div", wrapperDivProps
|
|
97
|
+
}) : null, isShowImageBubble ? /*#__PURE__*/React.createElement("div", { ...wrapperDivProps
|
|
98
|
+
}, /*#__PURE__*/React.createElement(ImageBubble, {
|
|
98
99
|
imageDetails: attachmentDetails,
|
|
99
100
|
isFailed: isFailed,
|
|
100
101
|
isSending: isSending,
|
|
101
|
-
onClick: onImageBubbleClick
|
|
102
|
-
|
|
102
|
+
onClick: onImageBubbleClick,
|
|
103
|
+
...imageBubbleProps
|
|
104
|
+
})) : null, isShowVideoBubble ? /*#__PURE__*/React.createElement("div", { ...wrapperDivProps
|
|
105
|
+
}, /*#__PURE__*/React.createElement(VideoBubble, {
|
|
103
106
|
isFailed: isFailed,
|
|
104
|
-
videoDetails: attachmentDetails
|
|
105
|
-
|
|
107
|
+
videoDetails: attachmentDetails,
|
|
108
|
+
...videoBubbleProps
|
|
109
|
+
})) : null, isShowAudioBubble ? /*#__PURE__*/React.createElement("div", { ...wrapperDivProps
|
|
110
|
+
}, /*#__PURE__*/React.createElement(AudioBubble, {
|
|
106
111
|
audioDetails: attachmentDetails,
|
|
107
|
-
isFailed: isFailed
|
|
108
|
-
|
|
112
|
+
isFailed: isFailed,
|
|
113
|
+
...audioBubbleProps
|
|
114
|
+
})) : null, isShowAttachmentBubble ? /*#__PURE__*/React.createElement("div", { ...wrapperDivProps
|
|
115
|
+
}, /*#__PURE__*/React.createElement(AttachmentBubble, {
|
|
109
116
|
attachmentBubbleTitle: attachmentBubbleTitle,
|
|
110
117
|
attachmentDetails: attachmentDetails,
|
|
111
118
|
isFailed: isFailed,
|
|
112
119
|
isSending: isSending,
|
|
113
|
-
onClick: onAttachmentBubbleClick
|
|
114
|
-
|
|
120
|
+
onClick: onAttachmentBubbleClick,
|
|
121
|
+
...attachmentBubbleProps
|
|
122
|
+
})) : null, isShowLocationBubble ? /*#__PURE__*/React.createElement("div", { ...wrapperDivProps
|
|
123
|
+
}, /*#__PURE__*/React.createElement(LocationBubble, {
|
|
115
124
|
isFailed: isFailed,
|
|
116
|
-
locationUrl: locationUrl
|
|
117
|
-
|
|
125
|
+
locationUrl: locationUrl,
|
|
126
|
+
...locationBubbleProps
|
|
127
|
+
})) : null, isShowTextBubble ? /*#__PURE__*/React.createElement("div", { ...wrapperDivProps
|
|
128
|
+
}, /*#__PURE__*/React.createElement(IMTextBubble, {
|
|
118
129
|
isFailed: isFailed,
|
|
119
130
|
isShowFullContent: isShowFullContent,
|
|
120
131
|
messageDetails: messageDetails,
|
|
121
132
|
moreText: seeMoreText,
|
|
122
133
|
onLoadFullMessage: onLoadFullMessage,
|
|
123
|
-
sessionDetails: sessionDetails
|
|
124
|
-
|
|
134
|
+
sessionDetails: sessionDetails,
|
|
135
|
+
...imTextBubbleProps
|
|
136
|
+
})) : null);
|
|
125
137
|
}
|
|
126
138
|
IMMessageContent.propTypes = imMessageContentPropTypes;
|
|
127
139
|
IMMessageContent.defaultProps = imMessageContentDefaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as IMMessageContent } from
|
|
1
|
+
export { default as IMMessageContent } from "./IMMessageContent";
|
|
@@ -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 useIMMessageMeta from '@zohoim/chat-components-hooks/es/im/IMMessageMeta/useIMMessageMeta';
|
|
9
7
|
/** ** Constants *** */
|
|
10
8
|
|
|
11
|
-
import imMessageMetaDefaultProps from
|
|
12
|
-
import imMessageMetaPropTypes from
|
|
9
|
+
import imMessageMetaDefaultProps from "./props/defaultProps";
|
|
10
|
+
import imMessageMetaPropTypes from "./props/propTypes";
|
|
13
11
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
14
12
|
/** ** Methods *** */
|
|
15
13
|
|
|
16
|
-
import cssJSLogic from
|
|
14
|
+
import cssJSLogic from "./css/cssJSLogic";
|
|
17
15
|
/** ** Styles *** */
|
|
18
16
|
|
|
19
|
-
import style from
|
|
17
|
+
import style from "./css/IMMessageMeta.module.css";
|
|
20
18
|
/** ** Components *** */
|
|
21
19
|
|
|
22
20
|
import { Container } from '@zohodesk/components/es/Layout';
|
|
23
|
-
import IMMessageMetaInfo from
|
|
21
|
+
import IMMessageMetaInfo from "../IMMessageMetaInfo/IMMessageMetaInfo";
|
|
24
22
|
export default function IMMessageMeta(props) {
|
|
25
23
|
const {
|
|
26
24
|
direction,
|
|
@@ -57,10 +55,11 @@ export default function IMMessageMeta(props) {
|
|
|
57
55
|
return /*#__PURE__*/React.createElement(React.Fragment, null, imMessageMetaInfoContent || time ? /*#__PURE__*/React.createElement(Container, {
|
|
58
56
|
alignBox: "row",
|
|
59
57
|
className: imMessageMetaClass
|
|
60
|
-
}, imMessageMetaInfoContent ? /*#__PURE__*/React.createElement(IMMessageMetaInfo,
|
|
58
|
+
}, imMessageMetaInfoContent ? /*#__PURE__*/React.createElement(IMMessageMetaInfo, {
|
|
61
59
|
imMessageMetaInfoContent: imMessageMetaInfoContent,
|
|
62
|
-
imMessageMetaInfoTitle: imMessageMetaInfoTitle
|
|
63
|
-
|
|
60
|
+
imMessageMetaInfoTitle: imMessageMetaInfoTitle,
|
|
61
|
+
...imMessageMetaInfoProps
|
|
62
|
+
}) : null, imMessageMetaInfoContent && time ? /*#__PURE__*/React.createElement("div", {
|
|
64
63
|
className: dotClass
|
|
65
64
|
}, "\u22C5") : null, time ? /*#__PURE__*/React.createElement("div", {
|
|
66
65
|
className: newStyle.dateTime,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as IMMessageMeta } from
|
|
1
|
+
export { default as IMMessageMeta } from "./IMMessageMeta";
|
|
@@ -5,11 +5,11 @@ import React from 'react';
|
|
|
5
5
|
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
6
6
|
/** ** Constants *** */
|
|
7
7
|
|
|
8
|
-
import imMessageMetaInfoDefaultProps from
|
|
9
|
-
import imMessageMetaInfoPropTypes from
|
|
8
|
+
import imMessageMetaInfoDefaultProps from "./props/defaultProps";
|
|
9
|
+
import imMessageMetaInfoPropTypes from "./props/propTypes";
|
|
10
10
|
/** ** Styles *** */
|
|
11
11
|
|
|
12
|
-
import style from
|
|
12
|
+
import style from "./css/IMMessageMetaInfo.module.css";
|
|
13
13
|
export default function IMMessageMetaInfo(props) {
|
|
14
14
|
const {
|
|
15
15
|
imMessageMetaInfoTitle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as IMMessageMetaInfo } from
|
|
1
|
+
export { default as IMMessageMetaInfo } from "./IMMessageMetaInfo";
|
|
@@ -8,14 +8,14 @@ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
|
8
8
|
import useIMPermaLink from '@zohoim/chat-components-hooks/es/im/IMPermaLink/useIMPermaLink';
|
|
9
9
|
/** ** Constants *** */
|
|
10
10
|
|
|
11
|
-
import imPermaLinkDefaultProps from
|
|
12
|
-
import imPermaLinkPropTypes from
|
|
11
|
+
import imPermaLinkDefaultProps from "./props/defaultProps";
|
|
12
|
+
import imPermaLinkPropTypes from "./props/propTypes";
|
|
13
13
|
/** ** Methods *** */
|
|
14
14
|
|
|
15
|
-
import cssJSLogic from
|
|
15
|
+
import cssJSLogic from "./css/cssJSLogic";
|
|
16
16
|
/** ** Styles *** */
|
|
17
17
|
|
|
18
|
-
import style from
|
|
18
|
+
import style from "./css/IMPermaLink.module.css";
|
|
19
19
|
export default function IMPermaLink(props) {
|
|
20
20
|
const {
|
|
21
21
|
customStyle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as IMPermaLink } from
|
|
1
|
+
export { default as IMPermaLink } from "./IMPermaLink";
|
|
@@ -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 *** */
|
|
@@ -7,12 +5,12 @@ import React from 'react';
|
|
|
7
5
|
import useIMReplyBubble from '@zohoim/chat-components-hooks/es/im/IMReplyBubble/useIMReplyBubble';
|
|
8
6
|
/** ** Constants *** */
|
|
9
7
|
|
|
10
|
-
import imReplyBubbleDefaultProps from
|
|
11
|
-
import imReplyBubblePropTypes from
|
|
8
|
+
import imReplyBubbleDefaultProps from "./props/defaultProps";
|
|
9
|
+
import imReplyBubblePropTypes from "./props/propTypes";
|
|
12
10
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
13
11
|
/** ** Components *** */
|
|
14
12
|
|
|
15
|
-
import ReplyBubble from
|
|
13
|
+
import ReplyBubble from "../../ReplyBubble/ReplyBubble";
|
|
16
14
|
export default function IMReplyBubble(props) {
|
|
17
15
|
const {
|
|
18
16
|
replyText,
|
|
@@ -35,17 +33,17 @@ export default function IMReplyBubble(props) {
|
|
|
35
33
|
messageDetails,
|
|
36
34
|
onClick: propOnClick
|
|
37
35
|
});
|
|
38
|
-
return /*#__PURE__*/React.createElement(ReplyBubble,
|
|
36
|
+
return /*#__PURE__*/React.createElement(ReplyBubble, {
|
|
39
37
|
attachmentDetails: attachmentDetails,
|
|
40
38
|
dateTimeDetails: dateTimeDetails,
|
|
41
39
|
locationUrl: locationUrl,
|
|
42
40
|
message: message,
|
|
43
41
|
onClick: onClick,
|
|
44
42
|
replyText: replyText,
|
|
45
|
-
senderName: senderName
|
|
46
|
-
|
|
43
|
+
senderName: senderName,
|
|
44
|
+
...replyBubbleProps,
|
|
47
45
|
isFailed: isFailed
|
|
48
|
-
})
|
|
46
|
+
});
|
|
49
47
|
}
|
|
50
48
|
IMReplyBubble.propTypes = imReplyBubblePropTypes;
|
|
51
49
|
IMReplyBubble.defaultProps = imReplyBubbleDefaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as IMReplyBubble } from
|
|
1
|
+
export { default as IMReplyBubble } from "./IMReplyBubble";
|
|
@@ -1,15 +1,13 @@
|
|
|
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
|
/** ** Constants *** */
|
|
6
4
|
|
|
7
|
-
import imTextBubbleDefaultProps from
|
|
8
|
-
import imTextBubblePropTypes from
|
|
5
|
+
import imTextBubbleDefaultProps from "./props/defaultProps";
|
|
6
|
+
import imTextBubblePropTypes from "./props/propTypes";
|
|
9
7
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
10
8
|
/** ** Components *** */
|
|
11
9
|
|
|
12
|
-
import TextBubble from
|
|
10
|
+
import TextBubble from "../../TextBubble/TextBubble";
|
|
13
11
|
/** ** Hooks *** */
|
|
14
12
|
|
|
15
13
|
import useIMTextBubble from '@zohoim/chat-components-hooks/es/im/IMTextBubble/useIMTextBubble';
|
|
@@ -27,13 +25,13 @@ export default function IMTextBubble(props) {
|
|
|
27
25
|
sanitizedDisplayMessage,
|
|
28
26
|
isShowSeeMore
|
|
29
27
|
} = useIMTextBubble(props);
|
|
30
|
-
return /*#__PURE__*/React.createElement(TextBubble,
|
|
28
|
+
return /*#__PURE__*/React.createElement(TextBubble, {
|
|
31
29
|
message: sanitizedDisplayMessage,
|
|
32
30
|
moreText: isShowSeeMore ? moreText : '',
|
|
33
|
-
onClickMore: onLoadFullMessage
|
|
34
|
-
|
|
31
|
+
onClickMore: onLoadFullMessage,
|
|
32
|
+
...textBubbleProps,
|
|
35
33
|
isFailed: isFailed
|
|
36
|
-
})
|
|
34
|
+
});
|
|
37
35
|
}
|
|
38
36
|
IMTextBubble.propTypes = imTextBubblePropTypes;
|
|
39
37
|
IMTextBubble.defaultProps = imTextBubbleDefaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as IMTextBubble } from
|
|
1
|
+
export { default as IMTextBubble } from "./IMTextBubble";
|
package/es/im/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
1
|
+
export * from "./IMIntegrationIcon";
|
|
2
|
+
export * from "./IMMessage";
|
|
3
|
+
export * from "./IMPermaLink";
|
|
4
|
+
export * from "./IMMessageMeta";
|
|
5
|
+
export * from "./IMMessageMetaInfo";
|
|
6
|
+
export * from "./IMMessageContent";
|
|
7
|
+
export * from "./IMTextBubble";
|
|
8
|
+
export * from "./IMReplyBubble";
|
|
9
|
+
export * from "./ArticleBubble";
|
package/es/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
1
|
+
export * from "./MessageBubble";
|
|
2
|
+
export * from "./MessageActionsWrapper";
|
|
3
|
+
export * from "./MessageActions";
|
|
4
|
+
export * from "./MessageBox";
|
|
5
|
+
export * from "./ActionIcon";
|
|
6
|
+
export * from "./ActionIconWrapper";
|
|
7
|
+
export * from "./MessageActionsMore";
|
|
8
|
+
export * from "./MessageAvatar";
|
|
9
|
+
export * from "./MoreActionItem";
|
|
10
|
+
export * from "./MessageAction";
|
|
11
|
+
export * from "./Theme";
|
|
12
|
+
export * from "./Message";
|
|
13
|
+
export * from "./AudioBubble";
|
|
14
|
+
export * from "./AttachmentBubble";
|
|
15
|
+
export * from "./AttachmentIcon";
|
|
16
|
+
export * from "./VideoBubble";
|
|
17
|
+
export * from "./ImageBubble";
|
|
18
|
+
export * from "./TextBubble";
|
|
19
|
+
export * from "./LocationBubble";
|
|
20
|
+
export * from "./AttachmentBubbleInfo";
|
|
21
|
+
export * from "./Audio";
|
|
22
|
+
export * from "./Video";
|
|
23
|
+
export * from "./ReplyBubble";
|
|
24
|
+
export * from "./ReplyBubbleHeader";
|
|
25
|
+
export * from "./LazyLoadImage";
|
|
26
|
+
export * from "./ReplyBubbleContent";
|
|
27
|
+
export * from "./MessageStatus";
|
|
28
|
+
export * from "./im"; // ... export other components
|
|
29
29
|
|
|
30
30
|
/** * CONSTANTS ** */
|
|
31
31
|
|
|
32
|
-
export * from
|
|
32
|
+
export * from "./constants";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohoim/chat-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Chat Components",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"@zohodesk/utils": "1.3.13",
|
|
37
37
|
"@zohodesk/variables": "1.0.0",
|
|
38
38
|
"@zohodesk/virtualizer": "1.0.13",
|
|
39
|
-
"@zohoim/chat-components-hooks": "^1.0.
|
|
40
|
-
"@zohoim/chat-components-utils": "^1.0.
|
|
39
|
+
"@zohoim/chat-components-hooks": "^1.0.3",
|
|
40
|
+
"@zohoim/chat-components-utils": "^1.0.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@zohodesk-private/css-variable-migrator": "1.0.7",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"jsdom": "23.0.0",
|
|
46
46
|
"react-to-jsx": "1.3.2"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "42d08b37918d26ef1f2b761081769c46a3af3710"
|
|
49
49
|
}
|