@zohoim/chat-components 0.0.27 → 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,
@@ -78,7 +78,6 @@ export default function IMMessage(props) {
78
78
  messageStatus,
79
79
  isFailedMessage,
80
80
  isSendingMessage,
81
- isAgentMessage,
82
81
  messageStatusTitle,
83
82
  dateTimeDetails,
84
83
  autoMessageType,
@@ -160,10 +159,10 @@ export default function IMMessage(props) {
160
159
  const messageCustomProps = useMemo(() => {
161
160
  const {
162
161
  customProps
163
- } = messageProps;
162
+ } = messageProps || dummyObject;
164
163
  const {
165
- messageBubbleProps
166
- } = customProps;
164
+ messageBubbleProps = dummyObject
165
+ } = customProps || dummyObject;
167
166
  return { ...messageProps,
168
167
  customProps: { ...customProps,
169
168
  messageBubbleProps: {
@@ -187,7 +186,7 @@ export default function IMMessage(props) {
187
186
  renderContent: handleRenderMessage,
188
187
  renderOwnerStatusIcon: handleRenderIntegIcon,
189
188
  renderSecondaryActions: handleRenderSecondaryActions,
190
- status: isAgentMessage ? messageStatus : '',
189
+ status: messageStatus,
191
190
  statusTooltip: messageStatusTitle
192
191
  }, messageCustomProps));
193
192
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohoim/chat-components",
3
- "version": "0.0.27",
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.22",
40
- "@zohoim/chat-components-utils": "^0.0.21"
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": "2fd6976b3ddef8bc5be3896558ed31188eeaa8e5"
48
+ "gitHead": "7377b1f3b0125ad37732b46f30acc63e5a601b01"
49
49
  }