@zohoim/chat-components 0.0.25 → 0.0.28-cx
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/AttachmentIcon/props/propTypes.js +4 -2
- package/es/MessageAction/props/propTypes.js +4 -1
- package/es/im/IMMessage/IMMessage.js +8 -7
- package/es/im/IMMessage/props/propTypes.js +1 -0
- package/es/im/IMMessageContent/IMMessageContent.js +3 -1
- package/es/im/IMMessageContent/props/propTypes.js +2 -1
- package/es/im/IMTextBubble/props/propTypes.js +2 -1
- package/package.json +13 -13
|
@@ -7,9 +7,11 @@ const {
|
|
|
7
7
|
AUDIO,
|
|
8
8
|
VIDEO,
|
|
9
9
|
IMAGE
|
|
10
|
-
} = attachmentFileTypes;
|
|
10
|
+
} = attachmentFileTypes; // Docs - Playground Component Render Issue Fix
|
|
11
|
+
|
|
12
|
+
const fileFormats = JSON.parse(JSON.stringify(Object.values(attachmentFileTypes)));
|
|
11
13
|
const attachmentIconPropTypes = {
|
|
12
|
-
fileFormat: PropTypes.oneOf(
|
|
14
|
+
fileFormat: PropTypes.oneOf(fileFormats).isRequired,
|
|
13
15
|
mediaType: PropTypes.oneOf([AUDIO, VIDEO, IMAGE]).isRequired,
|
|
14
16
|
customStyle: PropTypes.object,
|
|
15
17
|
renderCustomIcon: PropTypes.func
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
/** ** Constants *** */
|
|
4
|
+
|
|
5
|
+
import { defaultMessageActions } from '@zohoim/chat-components-utils/es/constants/messageActionConstants';
|
|
3
6
|
const messageActionPropTypes = {
|
|
4
7
|
displayText: PropTypes.string.isRequired,
|
|
5
|
-
id: PropTypes.
|
|
8
|
+
id: PropTypes.oneOf(Object.values(defaultMessageActions)).isRequired,
|
|
6
9
|
onClick: PropTypes.func.isRequired,
|
|
7
10
|
onMouseEnter: PropTypes.func,
|
|
8
11
|
closePopup: PropTypes.func,
|
|
@@ -59,7 +59,8 @@ export default function IMMessage(props) {
|
|
|
59
59
|
isShowSender,
|
|
60
60
|
isShowMessageTime,
|
|
61
61
|
isShowMessageStatus,
|
|
62
|
-
needMessageActions
|
|
62
|
+
needMessageActions,
|
|
63
|
+
isShowFullContent
|
|
63
64
|
} = messageDisplayProps;
|
|
64
65
|
const newStyle = useMergeStyle(style, customStyle);
|
|
65
66
|
const {
|
|
@@ -77,7 +78,6 @@ export default function IMMessage(props) {
|
|
|
77
78
|
messageStatus,
|
|
78
79
|
isFailedMessage,
|
|
79
80
|
isSendingMessage,
|
|
80
|
-
isAgentMessage,
|
|
81
81
|
messageStatusTitle,
|
|
82
82
|
dateTimeDetails,
|
|
83
83
|
autoMessageType,
|
|
@@ -113,6 +113,7 @@ export default function IMMessage(props) {
|
|
|
113
113
|
deleteMessageText: deleteMessageText,
|
|
114
114
|
isFailed: isFailedMessage,
|
|
115
115
|
isSending: isSendingMessage,
|
|
116
|
+
isShowFullContent: isShowFullContent,
|
|
116
117
|
messageContentClickMapping: messageContentClickMapping,
|
|
117
118
|
messageDetails: messageDetails,
|
|
118
119
|
onClickReply: onClickReply,
|
|
@@ -120,7 +121,7 @@ export default function IMMessage(props) {
|
|
|
120
121
|
replyText: replyText,
|
|
121
122
|
seeMoreText: seeMoreText,
|
|
122
123
|
sessionDetails: sessionDetails
|
|
123
|
-
}, imMessageContentProps)), [seeMoreText, replyText, deleteMessageText, messageDetails, sessionDetails, messageContentClickMapping, onLoadFullMessage, onClickReply, isFailedMessage, isSendingMessage, imMessageContentProps]);
|
|
124
|
+
}, imMessageContentProps)), [seeMoreText, replyText, deleteMessageText, messageDetails, sessionDetails, messageContentClickMapping, onLoadFullMessage, onClickReply, isFailedMessage, isSendingMessage, imMessageContentProps, isShowFullContent]);
|
|
124
125
|
/** ** Render Secondary Actions - TicketId *** */
|
|
125
126
|
|
|
126
127
|
const handleRenderSecondaryActions = useCallback(() => {
|
|
@@ -158,10 +159,10 @@ export default function IMMessage(props) {
|
|
|
158
159
|
const messageCustomProps = useMemo(() => {
|
|
159
160
|
const {
|
|
160
161
|
customProps
|
|
161
|
-
} = messageProps;
|
|
162
|
+
} = messageProps || dummyObject;
|
|
162
163
|
const {
|
|
163
|
-
messageBubbleProps
|
|
164
|
-
} = customProps;
|
|
164
|
+
messageBubbleProps = dummyObject
|
|
165
|
+
} = customProps || dummyObject;
|
|
165
166
|
return { ...messageProps,
|
|
166
167
|
customProps: { ...customProps,
|
|
167
168
|
messageBubbleProps: {
|
|
@@ -185,7 +186,7 @@ export default function IMMessage(props) {
|
|
|
185
186
|
renderContent: handleRenderMessage,
|
|
186
187
|
renderOwnerStatusIcon: handleRenderIntegIcon,
|
|
187
188
|
renderSecondaryActions: handleRenderSecondaryActions,
|
|
188
|
-
status:
|
|
189
|
+
status: messageStatus,
|
|
189
190
|
statusTooltip: messageStatusTitle
|
|
190
191
|
}, messageCustomProps));
|
|
191
192
|
}
|
|
@@ -61,6 +61,7 @@ const imMessagePropTypes = {
|
|
|
61
61
|
}),
|
|
62
62
|
messageDisplayProps: PropTypes.shape({
|
|
63
63
|
isHighlightMessage: PropTypes.bool,
|
|
64
|
+
isShowFullContent: PropTypes.bool,
|
|
64
65
|
isShowMessageStatus: PropTypes.bool,
|
|
65
66
|
isShowMessageTime: PropTypes.bool,
|
|
66
67
|
isShowSender: PropTypes.bool,
|
|
@@ -40,7 +40,8 @@ export default function IMMessageContent(props) {
|
|
|
40
40
|
onClick: propOnClick,
|
|
41
41
|
isFailed,
|
|
42
42
|
isSending,
|
|
43
|
-
messageContentClickMapping
|
|
43
|
+
messageContentClickMapping,
|
|
44
|
+
isShowFullContent
|
|
44
45
|
} = props;
|
|
45
46
|
const {
|
|
46
47
|
imReplyBubbleProps = dummyObject,
|
|
@@ -110,6 +111,7 @@ export default function IMMessageContent(props) {
|
|
|
110
111
|
locationUrl: locationUrl
|
|
111
112
|
}, locationBubbleProps))) : null, isShowTextBubble ? /*#__PURE__*/React.createElement("div", wrapperDivProps, /*#__PURE__*/React.createElement(IMTextBubble, _extends({
|
|
112
113
|
isFailed: isFailed,
|
|
114
|
+
isShowFullContent: isShowFullContent,
|
|
113
115
|
messageDetails: messageDetails,
|
|
114
116
|
moreText: seeMoreText,
|
|
115
117
|
onLoadFullMessage: onLoadFullMessage,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohoim/chat-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28-cx",
|
|
4
4
|
"description": "Chat Components",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
"!**/__tests__"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zohodesk/components": "1.2.
|
|
33
|
-
"@zohodesk/hooks": "
|
|
34
|
-
"@zohodesk/icon": "1.3.
|
|
35
|
-
"@zohodesk/icons": "1.0.
|
|
36
|
-
"@zohodesk/utils": "1.3.
|
|
37
|
-
"@zohodesk/variables": "1.0.0
|
|
32
|
+
"@zohodesk/components": "1.2.23",
|
|
33
|
+
"@zohodesk/hooks": "2.0.2",
|
|
34
|
+
"@zohodesk/icon": "1.3.15",
|
|
35
|
+
"@zohodesk/icons": "1.0.20",
|
|
36
|
+
"@zohodesk/utils": "1.3.13",
|
|
37
|
+
"@zohodesk/variables": "1.0.0",
|
|
38
38
|
"@zohodesk/virtualizer": "1.0.13",
|
|
39
|
-
"@zohoim/chat-components-hooks": "^0.0.
|
|
40
|
-
"@zohoim/chat-components-utils": "^0.0.
|
|
39
|
+
"@zohoim/chat-components-hooks": "^0.0.28-cx",
|
|
40
|
+
"@zohoim/chat-components-utils": "^0.0.28-cx"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@zohodesk-private/css-variable-migrator": "1.0.
|
|
44
|
-
"html-to-react": "1.
|
|
45
|
-
"jsdom": "
|
|
43
|
+
"@zohodesk-private/css-variable-migrator": "1.0.7",
|
|
44
|
+
"html-to-react": "1.7.0 ",
|
|
45
|
+
"jsdom": "23.0.0",
|
|
46
46
|
"react-to-jsx": "1.3.2"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "7377b1f3b0125ad37732b46f30acc63e5a601b01"
|
|
49
49
|
}
|