@zohoim/chat-components 0.0.28 → 1.0.0
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,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,
|
|
@@ -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: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohoim/chat-components",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
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": "^1.0.0",
|
|
40
|
+
"@zohoim/chat-components-utils": "^1.0.0"
|
|
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": "64607512a17d6309b5f77effc85e1e4bd88c7c8c"
|
|
49
49
|
}
|