@zohoim/chat-components 1.1.5 → 1.1.6-beta.1
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.
- package/README.md +5 -0
- package/es/im/IMAttachmentHandler/IMAttachmentHandler.js +2 -2
- package/es/im/IMAttachmentHandler/props/propTypes.js +1 -1
- package/es/im/IMMessage/props/propTypes.js +1 -1
- package/es/im/ReplyComposer/ReplyComposer.js +3 -1
- package/lib/im/IMAttachmentHandler/IMAttachmentHandler.js +2 -2
- package/lib/im/IMAttachmentHandler/props/propTypes.js +1 -1
- package/lib/im/IMMessage/props/propTypes.js +1 -1
- package/lib/im/ReplyComposer/ReplyComposer.js +5 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -10,6 +10,11 @@ In this Library, We Provide Some Basic Message Components to Build Your Chat App
|
|
|
10
10
|
|
|
11
11
|
> import MessageBubble from '@zohoim/chat-components/es/MessageBubble/MessageBubble’;
|
|
12
12
|
|
|
13
|
+
# 1.1.6
|
|
14
|
+
|
|
15
|
+
- In the message component, MP3 format support has been added for some integrations.
|
|
16
|
+
- **ReplyComposer** Added support for bodyElement rendering.
|
|
17
|
+
|
|
13
18
|
# 1.1.5
|
|
14
19
|
|
|
15
20
|
- lib folder added
|
|
@@ -23,7 +23,7 @@ export default function IMAttachmentHandler(props) {
|
|
|
23
23
|
isMultiAttachment,
|
|
24
24
|
onAttach: propOnAttach,
|
|
25
25
|
attachmentType,
|
|
26
|
-
|
|
26
|
+
integrationServiceId
|
|
27
27
|
} = props;
|
|
28
28
|
const {
|
|
29
29
|
attachmentHandlerProps = dummyObject
|
|
@@ -34,7 +34,7 @@ export default function IMAttachmentHandler(props) {
|
|
|
34
34
|
} = useIMAttachmentHandler({
|
|
35
35
|
onAttach: propOnAttach,
|
|
36
36
|
attachmentType,
|
|
37
|
-
|
|
37
|
+
integrationServiceId
|
|
38
38
|
});
|
|
39
39
|
return /*#__PURE__*/React.createElement(AttachmentHandler, _extends({
|
|
40
40
|
iconName: iconName,
|
|
@@ -23,6 +23,6 @@ const imAttachmentHandlerPropTypes = {
|
|
|
23
23
|
onAttach: PropTypes.func,
|
|
24
24
|
customProps: PropTypes.object,
|
|
25
25
|
attachmentType: PropTypes.oneOf(['image', 'document', 'documentAndImage']),
|
|
26
|
-
|
|
26
|
+
integrationServiceId: PropTypes.oneOf([WHATSAPP, TELEGRAM, INSTAGRAM, WECHAT, TWILLIO, LINE, IM_TALK, FACEBOOKMESSENGER])
|
|
27
27
|
};
|
|
28
28
|
export default imAttachmentHandlerPropTypes;
|
|
@@ -52,7 +52,7 @@ const imMessagePropTypes = {
|
|
|
52
52
|
type: PropTypes.string
|
|
53
53
|
}).isRequired,
|
|
54
54
|
sessionDetails: PropTypes.shape({
|
|
55
|
-
|
|
55
|
+
integrationServiceId: PropTypes.string
|
|
56
56
|
}),
|
|
57
57
|
defaultAvatarUrls: PropTypes.shape({
|
|
58
58
|
autoMessageAvatar: PropTypes.string,
|
|
@@ -49,6 +49,7 @@ export default function ReplyComposer(props) {
|
|
|
49
49
|
onFileSubmit: propOnFileSubmit,
|
|
50
50
|
attachmentPreviewTexts,
|
|
51
51
|
renderHeader,
|
|
52
|
+
renderBody,
|
|
52
53
|
renderFooter,
|
|
53
54
|
renderStencils,
|
|
54
55
|
getEditorState: propGetEditorState,
|
|
@@ -104,6 +105,7 @@ export default function ReplyComposer(props) {
|
|
|
104
105
|
isLoaded
|
|
105
106
|
}, newStyle);
|
|
106
107
|
const headerElement = useMemo(() => renderHandler(renderHeader)(), [renderHeader]);
|
|
108
|
+
const bodyElement = useMemo(() => renderBody ? renderHandler(renderBody)() : null, [renderBody]);
|
|
107
109
|
const stencilsElement = useMemo(() => isLoading ? renderHandler(renderStencils)({
|
|
108
110
|
needFooter
|
|
109
111
|
}) : null, [renderStencils, needFooter, isLoading]);
|
|
@@ -125,7 +127,7 @@ export default function ReplyComposer(props) {
|
|
|
125
127
|
onDescriptionChange: onChangeFileDescription,
|
|
126
128
|
onSubmit: onFileSubmit,
|
|
127
129
|
texts: attachmentPreviewTexts
|
|
128
|
-
}, attachmentPreviewCustomProps)) : null, isLoaded ? headerElement : null, stencilsElement || null, /*#__PURE__*/React.createElement("div", {
|
|
130
|
+
}, attachmentPreviewCustomProps)) : null, isLoaded ? headerElement : null, stencilsElement || null, bodyElement || /*#__PURE__*/React.createElement("div", {
|
|
129
131
|
className: replEditorWrapperClass
|
|
130
132
|
}, /*#__PURE__*/React.createElement(ReplyEditor, _extends({
|
|
131
133
|
content: content,
|
|
@@ -31,14 +31,14 @@ function IMAttachmentHandler(props) {
|
|
|
31
31
|
isMultiAttachment = props.isMultiAttachment,
|
|
32
32
|
propOnAttach = props.onAttach,
|
|
33
33
|
attachmentType = props.attachmentType,
|
|
34
|
-
|
|
34
|
+
integrationServiceId = props.integrationServiceId;
|
|
35
35
|
var _customProps$attachme = customProps.attachmentHandlerProps,
|
|
36
36
|
attachmentHandlerProps = _customProps$attachme === void 0 ? _emptyConstants.dummyObject : _customProps$attachme;
|
|
37
37
|
|
|
38
38
|
var _useIMAttachmentHandl = (0, _useIMAttachmentHandler["default"])({
|
|
39
39
|
onAttach: propOnAttach,
|
|
40
40
|
attachmentType: attachmentType,
|
|
41
|
-
|
|
41
|
+
integrationServiceId: integrationServiceId
|
|
42
42
|
}),
|
|
43
43
|
onAttach = _useIMAttachmentHandl.onAttach,
|
|
44
44
|
supportedTypes = _useIMAttachmentHandl.supportedTypes;
|
|
@@ -32,7 +32,7 @@ var imAttachmentHandlerPropTypes = {
|
|
|
32
32
|
onAttach: _propTypes["default"].func,
|
|
33
33
|
customProps: _propTypes["default"].object,
|
|
34
34
|
attachmentType: _propTypes["default"].oneOf(['image', 'document', 'documentAndImage']),
|
|
35
|
-
|
|
35
|
+
integrationServiceId: _propTypes["default"].oneOf([WHATSAPP, TELEGRAM, INSTAGRAM, WECHAT, TWILLIO, LINE, IM_TALK, FACEBOOKMESSENGER])
|
|
36
36
|
};
|
|
37
37
|
var _default = imAttachmentHandlerPropTypes;
|
|
38
38
|
exports["default"] = _default;
|
|
@@ -62,7 +62,7 @@ var imMessagePropTypes = {
|
|
|
62
62
|
type: _propTypes["default"].string
|
|
63
63
|
}).isRequired,
|
|
64
64
|
sessionDetails: _propTypes["default"].shape({
|
|
65
|
-
|
|
65
|
+
integrationServiceId: _propTypes["default"].string
|
|
66
66
|
}),
|
|
67
67
|
defaultAvatarUrls: _propTypes["default"].shape({
|
|
68
68
|
autoMessageAvatar: _propTypes["default"].string,
|
|
@@ -69,6 +69,7 @@ function ReplyComposer(props) {
|
|
|
69
69
|
propOnFileSubmit = props.onFileSubmit,
|
|
70
70
|
attachmentPreviewTexts = props.attachmentPreviewTexts,
|
|
71
71
|
renderHeader = props.renderHeader,
|
|
72
|
+
renderBody = props.renderBody,
|
|
72
73
|
renderFooter = props.renderFooter,
|
|
73
74
|
renderStencils = props.renderStencils,
|
|
74
75
|
propGetEditorState = props.getEditorState,
|
|
@@ -126,6 +127,9 @@ function ReplyComposer(props) {
|
|
|
126
127
|
var headerElement = (0, _react.useMemo)(function () {
|
|
127
128
|
return (0, _renderHandler["default"])(renderHeader)();
|
|
128
129
|
}, [renderHeader]);
|
|
130
|
+
var bodyElement = (0, _react.useMemo)(function () {
|
|
131
|
+
return renderBody ? (0, _renderHandler["default"])(renderBody)() : null;
|
|
132
|
+
}, [renderBody]);
|
|
129
133
|
var stencilsElement = (0, _react.useMemo)(function () {
|
|
130
134
|
return isLoading ? (0, _renderHandler["default"])(renderStencils)({
|
|
131
135
|
needFooter: needFooter
|
|
@@ -149,7 +153,7 @@ function ReplyComposer(props) {
|
|
|
149
153
|
onDescriptionChange: onChangeFileDescription,
|
|
150
154
|
onSubmit: onFileSubmit,
|
|
151
155
|
texts: attachmentPreviewTexts
|
|
152
|
-
}, attachmentPreviewCustomProps)) : null, isLoaded ? headerElement : null, stencilsElement || null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
156
|
+
}, attachmentPreviewCustomProps)) : null, isLoaded ? headerElement : null, stencilsElement || null, bodyElement || /*#__PURE__*/_react["default"].createElement("div", {
|
|
153
157
|
className: replEditorWrapperClass
|
|
154
158
|
}, /*#__PURE__*/_react["default"].createElement(_ReplyEditor["default"], _extends({
|
|
155
159
|
content: content,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohoim/chat-components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6-beta.1",
|
|
4
4
|
"description": "Chat Components",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@zoho/SecurityJS": "7.2.4",
|
|
36
36
|
"@zohodesk-private/color-variable-preprocessor": "1.2.1",
|
|
37
37
|
"@zohodesk-private/css-variable-migrator": "1.0.8",
|
|
38
|
-
"@zohodesk/a11y": "2.3.
|
|
38
|
+
"@zohodesk/a11y": "2.3.6",
|
|
39
39
|
"@zohodesk/components": "1.4.3",
|
|
40
40
|
"@zohodesk/hooks": "2.0.5",
|
|
41
41
|
"@zohodesk/icon": "1.3.15",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"@zohodesk/utils": "1.3.14",
|
|
46
46
|
"@zohodesk/variables": "1.0.0",
|
|
47
47
|
"@zohodesk/virtualizer": "1.0.13",
|
|
48
|
-
"@zohoim/chat-components-hooks": "1.1.
|
|
49
|
-
"@zohoim/chat-components-utils": "1.1.
|
|
48
|
+
"@zohoim/chat-components-hooks": "1.1.6-beta.1",
|
|
49
|
+
"@zohoim/chat-components-utils": "1.1.6-beta.1",
|
|
50
50
|
"html-to-react": "1.7.0 ",
|
|
51
51
|
"jsdom": "23.0.0",
|
|
52
52
|
"react-sortable-hoc": "1.11.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@zoho/SecurityJS": "7.2.4",
|
|
58
|
-
"@zohodesk/a11y": "2.3.
|
|
58
|
+
"@zohodesk/a11y": "2.3.6",
|
|
59
59
|
"@zohodesk/components": "1.4.3",
|
|
60
60
|
"@zohodesk/hooks": "2.0.5",
|
|
61
61
|
"@zohodesk/icon": "1.3.15",
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"@zohodesk/utils": "1.3.14",
|
|
66
66
|
"@zohodesk/variables": "1.0.0",
|
|
67
67
|
"@zohodesk/virtualizer": "1.0.13",
|
|
68
|
-
"@zohoim/chat-components-hooks": "1.1.
|
|
69
|
-
"@zohoim/chat-components-utils": "1.1.
|
|
68
|
+
"@zohoim/chat-components-hooks": "1.1.6",
|
|
69
|
+
"@zohoim/chat-components-utils": "1.1.6",
|
|
70
70
|
"react-sortable-hoc": "1.11.0",
|
|
71
71
|
"velocity-react": "1.4.3"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "48a7176ebd9f361bba1e488ed5ac21c27f84b874"
|
|
74
74
|
}
|