@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.
@@ -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(Object.values(attachmentFileTypes)).isRequired,
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.string.isRequired,
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: isAgentMessage ? messageStatus : '',
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,
@@ -45,6 +45,7 @@ const imMessageContentPropTypes = {
45
45
  videoBubbleProps: PropTypes.object
46
46
  }),
47
47
  isFailed: PropTypes.bool,
48
- isSending: PropTypes.bool
48
+ isSending: PropTypes.bool,
49
+ isShowFullContent: PropTypes.bool
49
50
  };
50
51
  export default imMessageContentPropTypes;
@@ -25,6 +25,7 @@ const imTextBubblePropTypes = {
25
25
  sessionDetails: PropTypes.shape({
26
26
  id: PropTypes.string
27
27
  }),
28
- isFailed: PropTypes.bool
28
+ isFailed: PropTypes.bool,
29
+ isShowFullContent: PropTypes.bool
29
30
  };
30
31
  export default imTextBubblePropTypes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohoim/chat-components",
3
- "version": "0.0.25",
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.10",
33
- "@zohodesk/hooks": "1.3.12",
34
- "@zohodesk/icon": "1.3.12",
35
- "@zohodesk/icons": "1.0.7",
36
- "@zohodesk/utils": "1.3.9",
37
- "@zohodesk/variables": "1.0.0-beta.30",
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.20",
40
- "@zohoim/chat-components-utils": "^0.0.19"
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.1",
44
- "html-to-react": "1.6.0 ",
45
- "jsdom": "22.1.0",
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": "68391846c5f62dd502adc161cdf5bca0091b7caf"
48
+ "gitHead": "7377b1f3b0125ad37732b46f30acc63e5a601b01"
49
49
  }