@zohoim/chat-components 0.0.10 → 0.0.11
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.
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
/* eslint-disable max-len */
|
|
3
3
|
|
|
4
4
|
/** ** Libraries *** */
|
|
5
|
-
import React from
|
|
5
|
+
import React from 'react';
|
|
6
6
|
|
|
7
7
|
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from
|
|
8
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
9
|
|
|
10
10
|
/** ** Constants *** */
|
|
11
|
-
import replyBubbleHeaderDefaultProps from
|
|
12
|
-
import replyBubbleHeaderPropTypes from
|
|
11
|
+
import replyBubbleHeaderDefaultProps from './props/defaultProps';
|
|
12
|
+
import replyBubbleHeaderPropTypes from './props/propTypes';
|
|
13
13
|
|
|
14
14
|
/** ** Methods *** */
|
|
15
|
-
import renderHandler from
|
|
16
|
-
import cssJSLogic from
|
|
15
|
+
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
16
|
+
import cssJSLogic from './css/cssJSLogic';
|
|
17
17
|
|
|
18
18
|
/** ** Styles *** */
|
|
19
|
-
import style from
|
|
19
|
+
import style from './css/ReplyBubbleHeader.module.css';
|
|
20
20
|
|
|
21
21
|
/** ** Components *** */
|
|
22
|
-
import { Container, Box } from
|
|
23
|
-
import ReplyIcon from
|
|
22
|
+
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
23
|
+
import ReplyIcon from '@zohodesk/icon/es/general/Reply';
|
|
24
24
|
import IMDateTime from '../im/IMDateTime/IMDateTime';
|
|
25
25
|
export default function ReplyBubbleHeader(props) {
|
|
26
26
|
const {
|
|
@@ -54,4 +54,4 @@ export default function ReplyBubbleHeader(props) {
|
|
|
54
54
|
}
|
|
55
55
|
ReplyBubbleHeader.propTypes = replyBubbleHeaderPropTypes;
|
|
56
56
|
ReplyBubbleHeader.defaultProps = replyBubbleHeaderDefaultProps;
|
|
57
|
-
ReplyBubbleHeader.displayName =
|
|
57
|
+
ReplyBubbleHeader.displayName = 'ReplyBubbleHeader';
|
|
@@ -39,10 +39,12 @@ export default function IMReplyBubble(props) {
|
|
|
39
39
|
} = cssJSLogic(props, newStyle);
|
|
40
40
|
const {
|
|
41
41
|
fileFormat,
|
|
42
|
-
fileURL,
|
|
43
42
|
message,
|
|
44
43
|
senderName,
|
|
45
|
-
time
|
|
44
|
+
time,
|
|
45
|
+
isShowImage,
|
|
46
|
+
fileName,
|
|
47
|
+
attachmentURL
|
|
46
48
|
} = useIMReplyBubble({
|
|
47
49
|
messageDetails
|
|
48
50
|
});
|
|
@@ -54,11 +56,12 @@ export default function IMReplyBubble(props) {
|
|
|
54
56
|
});
|
|
55
57
|
}
|
|
56
58
|
function renderIcon() {
|
|
57
|
-
return
|
|
59
|
+
return isShowImage ? /*#__PURE__*/React.createElement("div", {
|
|
58
60
|
className: newStyle.imageWrapper
|
|
59
61
|
}, /*#__PURE__*/React.createElement("img", {
|
|
60
62
|
className: newStyle.image,
|
|
61
|
-
src:
|
|
63
|
+
src: attachmentURL,
|
|
64
|
+
alt: fileName
|
|
62
65
|
})) : fileFormat ? /*#__PURE__*/React.createElement(IMAttachmentIcon, {
|
|
63
66
|
customStyle: {
|
|
64
67
|
$icon: newStyle.attachmentIcon
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohoim/chat-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Chat Components",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"@zohodesk/utils": "1.3.9",
|
|
37
37
|
"@zohodesk/variables": "1.0.0-beta.30",
|
|
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.9",
|
|
40
|
+
"@zohoim/chat-components-utils": "^0.0.8"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"html-to-react": "^1.4.8",
|
|
44
44
|
"react-to-jsx": "^1.3.2"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "44251e037d721b4e14928c9c49028ea6d4080dc7"
|
|
47
47
|
}
|