@zohoim/chat-components 0.0.28 → 0.0.29
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(
|
|
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,15 @@
|
|
|
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,
|
|
9
|
+
// id: PropTypes.oneOfType([
|
|
10
|
+
// PropTypes.oneOf(Object.values(defaultMessageActions)),
|
|
11
|
+
// PropTypes.string
|
|
12
|
+
// ]).isRequired,
|
|
6
13
|
onClick: PropTypes.func.isRequired,
|
|
7
14
|
onMouseEnter: PropTypes.func,
|
|
8
15
|
closePopup: PropTypes.func,
|
|
@@ -160,10 +160,10 @@ export default function IMMessage(props) {
|
|
|
160
160
|
const messageCustomProps = useMemo(() => {
|
|
161
161
|
const {
|
|
162
162
|
customProps
|
|
163
|
-
} = messageProps;
|
|
163
|
+
} = messageProps || dummyObject;
|
|
164
164
|
const {
|
|
165
|
-
messageBubbleProps
|
|
166
|
-
} = customProps;
|
|
165
|
+
messageBubbleProps = dummyObject
|
|
166
|
+
} = customProps || dummyObject;
|
|
167
167
|
return { ...messageProps,
|
|
168
168
|
customProps: { ...customProps,
|
|
169
169
|
messageBubbleProps: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohoim/chat-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
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
39
|
"@zohoim/chat-components-hooks": "^0.0.22",
|
|
40
40
|
"@zohoim/chat-components-utils": "^0.0.21"
|
|
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": "d194abef05a82e50181495879ad2d7addf8f511a"
|
|
49
49
|
}
|