@zohoim/chat-components 1.0.9-beta.1 → 1.0.9-beta.10
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/es/AttachmentHandler/css/AttachmentHandler.module.css +10 -0
- package/es/AttachmentPreview/AttachmentPreview.js +16 -8
- package/es/AttachmentPreview/css/AttachmentPreview.module.css +13 -5
- package/es/AttachmentPreview/props/defaultProps.js +3 -1
- package/es/AttachmentPreview/props/propTypes.js +3 -1
- package/es/AttachmentPreviewBody/AttachmentPreviewBody.js +30 -9
- package/es/AttachmentPreviewBody/css/AttachmentPreviewBody.module.css +17 -5
- package/es/AttachmentPreviewHeader/css/AttachmentPreviewHeader.module.css +5 -3
- package/es/Emoji/css/Emoji.module.css +3 -2
- package/es/EmojiPopup/EmojiPopup.js +0 -1
- package/es/EmojiPopup/css/EmojiPopup.module.css +7 -2
- package/es/Emojis/Emojis.js +9 -9
- package/es/Emojis/props/propTypes.js +2 -1
- package/es/EmojisFooter/css/EmojisFooter.module.css +3 -3
- package/es/EmojisHeader/css/EmojisHeader.module.css +3 -5
- package/es/EmojisList/EmojisList.js +4 -7
- package/es/Theme/ThemeWrapper.js +3 -1
- package/es/Theme/props/defaultProps.js +1 -1
- package/es/Theme/themeVariables/dark/blueTheme.js +15 -3
- package/es/Theme/themeVariables/dark/commonColorVariable.js +9 -1
- package/es/Theme/themeVariables/dark/greenTheme.js +17 -4
- package/es/Theme/themeVariables/dark/orangeTheme.js +17 -4
- package/es/Theme/themeVariables/dark/redTheme.js +17 -4
- package/es/Theme/themeVariables/dark/yellowTheme.js +17 -4
- package/es/Theme/themeVariables/light/blueTheme.js +15 -3
- package/es/Theme/themeVariables/light/commonColorVariable.js +10 -2
- package/es/Theme/themeVariables/light/greenTheme.js +16 -2
- package/es/Theme/themeVariables/light/orangeTheme.js +16 -2
- package/es/Theme/themeVariables/light/redTheme.js +16 -2
- package/es/Theme/themeVariables/light/yellowTheme.js +16 -2
- package/es/Theme/themeVariables/pureDark/blueTheme.js +15 -3
- package/es/Theme/themeVariables/pureDark/commonColorVariable.js +9 -1
- package/es/Theme/themeVariables/pureDark/greenTheme.js +17 -4
- package/es/Theme/themeVariables/pureDark/orangeTheme.js +17 -4
- package/es/Theme/themeVariables/pureDark/redTheme.js +17 -4
- package/es/Theme/themeVariables/pureDark/yellowTheme.js +17 -4
- package/es/constants/index.js +2 -1
- package/es/im/ReplyComposer/ReplyComposer.js +21 -5
- package/es/im/ReplyComposer/css/ReplyComposer.module.css +5 -0
- package/es/im/ReplyComposer/css/cssJSLogic.js +13 -0
- package/es/im/ReplyComposerFooter/css/ReplyComposerFooter.module.css +6 -1
- package/es/im/ReplyEditor/css/ReplyEditor.module.css +22 -2
- package/es/im/ReplyEditorSuggestions/ReplyEditorSuggestions.js +12 -4
- package/es/im/ReplyEditorSuggestions/props/propTypes.js +1 -0
- package/es/im/ReplyEditorSuggestionsPopup/ReplyEditorSuggestionsPopup.js +6 -3
- package/es/rte/Editor/css/Editor.module.css +0 -2
- package/package.json +5 -5
|
@@ -15,3 +15,13 @@
|
|
|
15
15
|
.icon {
|
|
16
16
|
color: initial;
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
.icon :global .path1:before {
|
|
21
|
+
color: var(--imlib_chat_components_emojiPopup_ttIcon_path1_color) !important;
|
|
22
|
+
opacity: 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.icon :global .path2:before {
|
|
26
|
+
color: var(--imlib_chat_components_emojiPopup_ttIcon_path2_color) !important;
|
|
27
|
+
}
|
|
@@ -9,6 +9,7 @@ import AttachmentPreviewHeader from "../AttachmentPreviewHeader/AttachmentPrevie
|
|
|
9
9
|
import AttachmentPreviewBody from "../AttachmentPreviewBody/AttachmentPreviewBody";
|
|
10
10
|
/** ** Hooks *** */
|
|
11
11
|
|
|
12
|
+
import { useZIndex } from '@zohodesk/components/es/Provider/ZindexProvider';
|
|
12
13
|
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
13
14
|
import useAttachmentPreview from '@zohoim/chat-components-hooks/es/AttachmentPreview/useAttachmentPreview';
|
|
14
15
|
import useAttachmentPreviewEditor from '@zohoim/chat-components-hooks/es/AttachmentPreview/useAttachmentPreviewEditor';
|
|
@@ -35,7 +36,9 @@ export default function AttachmentPreview(props) {
|
|
|
35
36
|
texts,
|
|
36
37
|
descriptionDetails,
|
|
37
38
|
onDescriptionChange: propOnDescriptionChange,
|
|
38
|
-
needCloseOnEscape
|
|
39
|
+
needCloseOnEscape,
|
|
40
|
+
needUploadOnEnter,
|
|
41
|
+
needAutoZindex
|
|
39
42
|
} = props;
|
|
40
43
|
const {
|
|
41
44
|
editorProps = dummyObject,
|
|
@@ -50,6 +53,7 @@ export default function AttachmentPreview(props) {
|
|
|
50
53
|
/* External customization */
|
|
51
54
|
|
|
52
55
|
const newStyle = useMergeStyle(style, customStyle);
|
|
56
|
+
const getNextIndex = useZIndex();
|
|
53
57
|
const {
|
|
54
58
|
selectedFile,
|
|
55
59
|
isShow,
|
|
@@ -67,7 +71,9 @@ export default function AttachmentPreview(props) {
|
|
|
67
71
|
onEditorKeyDown
|
|
68
72
|
} = useAttachmentPreviewEditor({
|
|
69
73
|
editorProps,
|
|
70
|
-
onPreviewPopupKeyDown: onEscape
|
|
74
|
+
onPreviewPopupKeyDown: onEscape,
|
|
75
|
+
needUploadOnEnter,
|
|
76
|
+
onSubmit
|
|
71
77
|
});
|
|
72
78
|
const {
|
|
73
79
|
fileName,
|
|
@@ -78,13 +84,15 @@ export default function AttachmentPreview(props) {
|
|
|
78
84
|
attachmentId
|
|
79
85
|
} = selectedFile;
|
|
80
86
|
const isImageFile = useMemo(() => mediaType === IMAGE, [mediaType]);
|
|
81
|
-
return isShow ? /*#__PURE__*/React.createElement(
|
|
82
|
-
className: newStyle.attachmentPreview
|
|
83
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
87
|
+
return isShow ? /*#__PURE__*/React.createElement(Container, {
|
|
84
88
|
align: "both",
|
|
85
|
-
alignBox: "column"
|
|
89
|
+
alignBox: "column",
|
|
90
|
+
className: newStyle.attachmentPreview,
|
|
91
|
+
style: needAutoZindex ? {
|
|
92
|
+
zIndex: `${getNextIndex()}`
|
|
93
|
+
} : {}
|
|
86
94
|
}, /*#__PURE__*/React.createElement("div", {
|
|
87
|
-
className:
|
|
95
|
+
className: newStyle.uploadPrev
|
|
88
96
|
}, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(AttachmentPreviewHeader, {
|
|
89
97
|
cancelText: cancelText,
|
|
90
98
|
fileName: fileName,
|
|
@@ -106,7 +114,7 @@ export default function AttachmentPreview(props) {
|
|
|
106
114
|
onEditorKeyDown: onEditorKeyDown,
|
|
107
115
|
placeHolder: placeHolder,
|
|
108
116
|
...attachmentPreviewBodyProps
|
|
109
|
-
}))))
|
|
117
|
+
})))) : null;
|
|
110
118
|
}
|
|
111
119
|
AttachmentPreview.propTypes = attachmentPreviewPropTypes;
|
|
112
120
|
AttachmentPreview.defaultProps = attachmentPreviewDefaultProps;
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
position: fixed;
|
|
4
4
|
top: 0 ;
|
|
5
5
|
bottom: 0 ;
|
|
6
|
-
|
|
7
|
-
z-index: 2147483643;
|
|
6
|
+
z-index: 2;
|
|
8
7
|
overflow: hidden;
|
|
9
8
|
background-color: rgba(42, 45, 54, 0.94);
|
|
10
9
|
}
|
|
@@ -19,13 +18,22 @@
|
|
|
19
18
|
right: 0 ;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
@keyframes scaleIn {
|
|
22
|
+
0% {
|
|
23
|
+
-webkit-transform: scale(0.9);
|
|
24
|
+
transform: scale(0.9);
|
|
25
|
+
opacity: .7
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
100% {
|
|
29
|
+
-webkit-transform: scale(1);
|
|
30
|
+
transform: scale(1);
|
|
31
|
+
opacity: 1
|
|
32
|
+
}
|
|
24
33
|
}
|
|
25
34
|
|
|
26
35
|
.uploadPrev {
|
|
27
36
|
width: 100% ;
|
|
28
37
|
max-width: 43.75rem;
|
|
29
|
-
background-color: #fff;
|
|
30
38
|
border-radius: 5px;
|
|
31
39
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
3
3
|
const attachmentPreviewDefaultProps = {
|
|
4
4
|
customStyle: dummyObject,
|
|
5
|
-
needCloseOnEscape: true
|
|
5
|
+
needCloseOnEscape: true,
|
|
6
|
+
needUploadOnEnter: true,
|
|
7
|
+
needAutoZindex: true
|
|
6
8
|
};
|
|
7
9
|
export default attachmentPreviewDefaultProps;
|
|
@@ -26,6 +26,8 @@ const attachmentPreviewPropTypes = {
|
|
|
26
26
|
}).isRequired,
|
|
27
27
|
descriptionDetails: PropTypes.object,
|
|
28
28
|
onDescriptionChange: PropTypes.func,
|
|
29
|
-
needCloseOnEscape: PropTypes.bool
|
|
29
|
+
needCloseOnEscape: PropTypes.bool,
|
|
30
|
+
needUploadOnEnter: PropTypes.bool,
|
|
31
|
+
needAutoZindex: PropTypes.bool
|
|
30
32
|
};
|
|
31
33
|
export default attachmentPreviewPropTypes;
|
|
@@ -3,7 +3,7 @@ import React, { useMemo } from 'react';
|
|
|
3
3
|
/** ** Components *** */
|
|
4
4
|
|
|
5
5
|
import { Container } from '@zohodesk/components/es/Layout';
|
|
6
|
-
import
|
|
6
|
+
import ReplyComposer from "../im/ReplyComposer/ReplyComposer";
|
|
7
7
|
import AttachmentIcon from "../AttachmentIcon/AttachmentIcon";
|
|
8
8
|
/** ** Hooks *** */
|
|
9
9
|
|
|
@@ -41,10 +41,33 @@ export default function AttachmentPreviewBody(props) {
|
|
|
41
41
|
const iconCustomStyle = useMemo(() => ({
|
|
42
42
|
icon: newStyle.attachmentIcon
|
|
43
43
|
}), [newStyle.attachmentIcon]);
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
const modifiedEditorProps = useMemo(() => {
|
|
45
|
+
const {
|
|
46
|
+
customProps,
|
|
47
|
+
customStyle: replyComposerCustomStyle
|
|
48
|
+
} = editorProps || dummyObject;
|
|
49
|
+
const {
|
|
50
|
+
replyEditorProps
|
|
51
|
+
} = customProps || dummyObject;
|
|
52
|
+
const {
|
|
53
|
+
customStyle = dummyObject
|
|
54
|
+
} = replyEditorProps || dummyObject;
|
|
55
|
+
return { ...editorProps,
|
|
56
|
+
customStyle: {
|
|
57
|
+
replyComposer: newStyle.replyComposer,
|
|
58
|
+
...replyComposerCustomStyle
|
|
59
|
+
},
|
|
60
|
+
customProps: { ...customProps,
|
|
61
|
+
replyEditorProps: { ...replyEditorProps,
|
|
62
|
+
customStyle: {
|
|
63
|
+
editorWrapper: newStyle.editorWrapper,
|
|
64
|
+
editableDiv: newStyle.editableDiv,
|
|
65
|
+
...customStyle
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}, [editorProps, newStyle.replyComposer, newStyle.editorWrapper, newStyle.editableDiv]);
|
|
48
71
|
return /*#__PURE__*/React.createElement(Container, {
|
|
49
72
|
align: "both",
|
|
50
73
|
alignBox: "column",
|
|
@@ -60,15 +83,13 @@ export default function AttachmentPreviewBody(props) {
|
|
|
60
83
|
fileFormat: fileFormat,
|
|
61
84
|
mediaType: mediaType,
|
|
62
85
|
...attachmentIconProps
|
|
63
|
-
}))), isDescriptionNeeded ? /*#__PURE__*/React.createElement(
|
|
86
|
+
}))), isDescriptionNeeded ? /*#__PURE__*/React.createElement(ReplyComposer, {
|
|
64
87
|
content: description,
|
|
65
|
-
customStyle: editorCustomStyle,
|
|
66
88
|
id: `${attachmentId}_Attach_Editor`,
|
|
67
|
-
needAutoFocus: true,
|
|
68
89
|
onChange: onDescriptionChange,
|
|
69
90
|
onKeyDown: onEditorKeyDown,
|
|
70
91
|
placeHolder: placeHolder,
|
|
71
|
-
...
|
|
92
|
+
...modifiedEditorProps
|
|
72
93
|
}) : null);
|
|
73
94
|
}
|
|
74
95
|
AttachmentPreviewBody.propTypes = attachmentPreviewBodyPropTypes;
|
|
@@ -4,26 +4,39 @@
|
|
|
4
4
|
height: var(--zd_size60) !important;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
.replyComposer {
|
|
8
|
+
width: 100% ;
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
.editorWrapper {
|
|
8
12
|
display: flex;
|
|
9
13
|
flex-direction: column;
|
|
10
14
|
height: 100% ;
|
|
11
15
|
width: 100% ;
|
|
16
|
+
padding: 0 ;
|
|
17
|
+
margin-top: var(--zd_size40) ;
|
|
12
18
|
}
|
|
13
19
|
|
|
14
20
|
.editableDiv {
|
|
15
21
|
min-height: var(--zd_size48) !important;
|
|
22
|
+
max-height: var(--zd_size48) !important;
|
|
16
23
|
background-color: transparent !important;
|
|
17
24
|
border: 0 !important;
|
|
18
|
-
border-bottom: 1px solid
|
|
25
|
+
border-bottom: 1px solid
|
|
26
|
+
var(--imlib_chat_components_attachmentPreviewBody_editor_border_color) !important;
|
|
27
|
+
padding: 0 !important;
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
.editableDiv:hover {
|
|
22
|
-
border-color:
|
|
31
|
+
border-color: var(
|
|
32
|
+
--imlib_chat_components_attachmentPreviewBody_editor_border_hover_color
|
|
33
|
+
) !important;
|
|
23
34
|
}
|
|
24
35
|
|
|
25
36
|
.editableDiv:focus {
|
|
26
|
-
border-color:
|
|
37
|
+
border-color: var(
|
|
38
|
+
--imlib_chat_components_attachmentPreviewBody_editor_border_active_color
|
|
39
|
+
) !important;
|
|
27
40
|
}
|
|
28
41
|
|
|
29
42
|
.imgContent,
|
|
@@ -34,8 +47,7 @@
|
|
|
34
47
|
}
|
|
35
48
|
|
|
36
49
|
.imgContent, .zoomContent {
|
|
37
|
-
background: var(--
|
|
38
|
-
background-color: #f5f6f7;
|
|
50
|
+
background-color: var(--imlib_chat_components_attachmentPreviewBody_bg_color);
|
|
39
51
|
padding: var(--zd_size40);
|
|
40
52
|
}
|
|
41
53
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** ** Styles *** */
|
|
2
2
|
.imgPreviewerheader {
|
|
3
3
|
position: relative;
|
|
4
|
-
background-color: var(
|
|
4
|
+
background-color: var(
|
|
5
|
+
--imlib_chat_components_attachmentPreviewHeader_bg_color
|
|
6
|
+
);
|
|
5
7
|
padding: var(--zd_size15) var(--zd_size40);
|
|
6
8
|
border-bottom: var(--zd_size1) solid var(--zd_im_common_border);
|
|
7
9
|
}
|
|
@@ -15,7 +17,7 @@
|
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
.imgName {
|
|
18
|
-
color:
|
|
20
|
+
color: var(--imlib_chat_components_attachmentPreviewHeader_name_color);
|
|
19
21
|
font-size: var(--zd_font_size17);
|
|
20
22
|
font-family: var(--zd_semibold);
|
|
21
23
|
composes: dotted from '../../css/common.module.css';
|
|
@@ -25,7 +27,7 @@
|
|
|
25
27
|
|
|
26
28
|
.imgSize {
|
|
27
29
|
font-size: var(--zd_font_size13);
|
|
28
|
-
color:
|
|
30
|
+
color: var(--imlib_chat_components_attachmentPreviewHeader_size_color);
|
|
29
31
|
composes: dotted from '../../css/common.module.css';
|
|
30
32
|
max-width: var(--zd_size150);
|
|
31
33
|
}
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
height: var(--emoji-width);
|
|
12
12
|
overflow: hidden;
|
|
13
13
|
font-size: 0 ;
|
|
14
|
-
display: inline-
|
|
15
|
-
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
16
17
|
cursor: pointer;
|
|
17
18
|
margin: 0 var(--emoji-margin);
|
|
18
19
|
text-align: center;
|
|
@@ -41,10 +41,15 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.icon :global .path1:before {
|
|
44
|
-
color:
|
|
44
|
+
color: var(--imlib_chat_components_emojiPopup_ttIcon_path1_color) !important;
|
|
45
45
|
opacity: 1;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.icon :global .path2:before {
|
|
49
|
-
color:
|
|
49
|
+
color: var(--imlib_chat_components_emojiPopup_ttIcon_path2_color) !important;
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
.icon :global .path2{
|
|
53
|
+
position: relative;
|
|
54
|
+
z-index: 1;
|
|
55
|
+
}
|
package/es/Emojis/Emojis.js
CHANGED
|
@@ -26,7 +26,8 @@ export default function Emojis(props) {
|
|
|
26
26
|
needAutoFocus,
|
|
27
27
|
customProps,
|
|
28
28
|
isShowOnlyContent,
|
|
29
|
-
searchPlaceHolder
|
|
29
|
+
searchPlaceHolder,
|
|
30
|
+
getMethods
|
|
30
31
|
} = props;
|
|
31
32
|
const {
|
|
32
33
|
emojisListProps = dummyObject,
|
|
@@ -41,24 +42,23 @@ export default function Emojis(props) {
|
|
|
41
42
|
selectedGroup,
|
|
42
43
|
getEmojisListMethods,
|
|
43
44
|
onSelect,
|
|
44
|
-
onSelectTab
|
|
45
|
-
isRenderEmojis,
|
|
46
|
-
isRenderEmojisList
|
|
45
|
+
onSelectTab
|
|
47
46
|
} = useEmojis({
|
|
48
47
|
searchString,
|
|
49
48
|
isShowSearchBox,
|
|
50
49
|
needAutoFocus,
|
|
51
50
|
onSelect: propOnSelect,
|
|
52
51
|
emojisList,
|
|
53
|
-
isShowGroupBasedList
|
|
52
|
+
isShowGroupBasedList,
|
|
53
|
+
getMethods
|
|
54
54
|
});
|
|
55
|
-
return
|
|
55
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isShowSearchBox ? /*#__PURE__*/React.createElement(EmojisHeader, {
|
|
56
56
|
getRef: getSearchRef,
|
|
57
57
|
onChange: onSearch,
|
|
58
58
|
searchPlaceHolder: searchPlaceHolder,
|
|
59
59
|
searchString: searchValue,
|
|
60
60
|
...emojisHeaderProps
|
|
61
|
-
}) : null,
|
|
61
|
+
}) : null, /*#__PURE__*/React.createElement(EmojisList, {
|
|
62
62
|
emojisList: emojisList,
|
|
63
63
|
getMethods: getEmojisListMethods,
|
|
64
64
|
isShowGroupBasedList: searchValue ? false : isShowGroupBasedList,
|
|
@@ -69,12 +69,12 @@ export default function Emojis(props) {
|
|
|
69
69
|
searchString: searchValue,
|
|
70
70
|
selectedGroup: selectedGroup,
|
|
71
71
|
...emojisListProps
|
|
72
|
-
})
|
|
72
|
+
}), isShowGroupBasedList ? /*#__PURE__*/React.createElement(EmojisFooter, {
|
|
73
73
|
emojisList: emojisList,
|
|
74
74
|
onSelect: onSelectTab,
|
|
75
75
|
selectedTab: selectedGroup,
|
|
76
76
|
...emojisFooterProps
|
|
77
|
-
}) : null)
|
|
77
|
+
}) : null);
|
|
78
78
|
}
|
|
79
79
|
Emojis.propTypes = emojisPropTypes;
|
|
80
80
|
Emojis.defaultProps = emojisDefaultProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.footerTab {
|
|
2
2
|
position: relative;
|
|
3
|
-
border-top: 1px solid
|
|
3
|
+
border-top: 1px solid var(--imlib_chat_components_emojiFooter_border_color);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.tabIcon {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
right: 0 ;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.emoji{
|
|
35
|
+
.emoji {
|
|
36
36
|
width: auto ;
|
|
37
37
|
height: auto ;
|
|
38
38
|
margin: 0 ;
|
|
39
39
|
padding: 8% ;
|
|
40
|
-
}
|
|
40
|
+
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
.container{
|
|
1
|
+
.container {
|
|
2
2
|
padding: var(--zd_size10) ;
|
|
3
|
-
border-bottom: 1px solid
|
|
3
|
+
border-bottom: 1px solid
|
|
4
|
+
var(--imlib_chat_components_emojisHeader_border_color);
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
.emojisSearch {
|
|
7
8
|
position: relative;
|
|
8
9
|
background-color: var(--imlib_chat_components_emojisHeader_bg_color);
|
|
9
|
-
background-color: #fafafa;
|
|
10
|
-
|
|
11
|
-
background-color: var(--imlib_chat_components_emojiPopup_bg);
|
|
12
10
|
}
|
|
13
11
|
|
|
14
12
|
.searchInput {
|
|
@@ -45,7 +45,8 @@ export default function EmojisList(props) {
|
|
|
45
45
|
emojisList,
|
|
46
46
|
setGroupRefs,
|
|
47
47
|
setContainerRef: listContainerRef,
|
|
48
|
-
|
|
48
|
+
isAllEmpty,
|
|
49
|
+
isGroupEmpty,
|
|
49
50
|
isRenderEmptyState,
|
|
50
51
|
isRenderElement
|
|
51
52
|
} = useEmojisList({
|
|
@@ -57,10 +58,6 @@ export default function EmojisList(props) {
|
|
|
57
58
|
selectedGroup,
|
|
58
59
|
isShowOnlyContent
|
|
59
60
|
});
|
|
60
|
-
const {
|
|
61
|
-
isEmpty,
|
|
62
|
-
isGroupEmpty
|
|
63
|
-
} = emptyState;
|
|
64
61
|
/* External customization */
|
|
65
62
|
|
|
66
63
|
const newStyle = useMergeStyle(style, customStyle);
|
|
@@ -73,7 +70,7 @@ export default function EmojisList(props) {
|
|
|
73
70
|
rowType,
|
|
74
71
|
isShowGroupBasedList,
|
|
75
72
|
isShowOnlyContent,
|
|
76
|
-
isEmpty
|
|
73
|
+
isEmpty: isAllEmpty
|
|
77
74
|
}, newStyle);
|
|
78
75
|
const renderGroup = useCallback(_ref => {
|
|
79
76
|
let {
|
|
@@ -120,7 +117,7 @@ export default function EmojisList(props) {
|
|
|
120
117
|
return /*#__PURE__*/React.createElement(React.Fragment, null, isRenderElement ? /*#__PURE__*/React.createElement("div", {
|
|
121
118
|
ref: listContainerRef,
|
|
122
119
|
className: emojisListClass
|
|
123
|
-
}, !
|
|
120
|
+
}, !isAllEmpty ? Object.keys(emojisList).map(groupName => {
|
|
124
121
|
const emojis = emojisList[groupName];
|
|
125
122
|
return renderGroup({
|
|
126
123
|
groupName,
|
package/es/Theme/ThemeWrapper.js
CHANGED
|
@@ -8,7 +8,7 @@ import ThemeContext from '@zohoim/chat-components-hooks/es/Theme/ThemeContext';
|
|
|
8
8
|
import themeWrapperPropTypes from "./props/propTypes";
|
|
9
9
|
import themeWrapperDefaultProps from "./props/defaultProps";
|
|
10
10
|
import { styleTagId } from '@zohoim/chat-components-utils/es/constants/themeConstants';
|
|
11
|
-
import { MSG_ACTION_POPUP_PORTAL, EDITOR_POPUP_PORTAL } from "../constants";
|
|
11
|
+
import { MSG_ACTION_POPUP_PORTAL, EDITOR_POPUP_PORTAL, EDITOR_POPUP_TARGET_PORTAL } from "../constants";
|
|
12
12
|
/** ** Components *** */
|
|
13
13
|
|
|
14
14
|
import ThemeAssets from "./ThemeAssets";
|
|
@@ -68,6 +68,8 @@ export default function ThemeWrapper(props) {
|
|
|
68
68
|
"data-portal": MSG_ACTION_POPUP_PORTAL
|
|
69
69
|
}), /*#__PURE__*/React.createElement("div", {
|
|
70
70
|
"data-portal": EDITOR_POPUP_PORTAL
|
|
71
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
"data-portal": EDITOR_POPUP_TARGET_PORTAL
|
|
71
73
|
})), []);
|
|
72
74
|
const renderStyle = useCallback(() => /*#__PURE__*/React.createElement("style", {
|
|
73
75
|
id: "zoho-im-variables"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryBlue, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, replyEditor, emojiPopup } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryBlue, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, replyEditor, emojiPopup, emojisHeader, attachmentPreviewHeader } from "./commonColorVariable";
|
|
3
3
|
import { imIntegrationIcon, imTtIcon, messagetextColor } from "../commonThemeColorVariable";
|
|
4
4
|
export default {
|
|
5
5
|
library: 'chat_components',
|
|
@@ -113,9 +113,21 @@ export default {
|
|
|
113
113
|
border_color_failed: failedBdr
|
|
114
114
|
},
|
|
115
115
|
emojiFooter: {
|
|
116
|
-
tabLine: primaryBlue
|
|
116
|
+
tabLine: primaryBlue,
|
|
117
|
+
border_color: '#2d3748'
|
|
117
118
|
},
|
|
118
119
|
replyEditor,
|
|
119
|
-
emojiPopup
|
|
120
|
+
emojiPopup: { ...emojiPopup,
|
|
121
|
+
ttIcon_path1_color: '#5f6478',
|
|
122
|
+
ttIcon_path2_color: 'var(--dot_platinum)'
|
|
123
|
+
},
|
|
124
|
+
emojisHeader,
|
|
125
|
+
attachmentPreviewHeader,
|
|
126
|
+
attachmentPreviewBody: {
|
|
127
|
+
bg_color: '#262f3d',
|
|
128
|
+
editor_border_color: '#3e4d63',
|
|
129
|
+
editor_border_hover_color: '#828994',
|
|
130
|
+
editor_border_active_color: '#479dff'
|
|
131
|
+
}
|
|
120
132
|
}
|
|
121
133
|
};
|
|
@@ -21,7 +21,15 @@ export const emojiPopup = {
|
|
|
21
21
|
};
|
|
22
22
|
export const replyEditor = {
|
|
23
23
|
bg: '#242b38',
|
|
24
|
-
border: '#f1f4f9',
|
|
25
24
|
color: '#e2e4e6',
|
|
26
25
|
placeholder: '#5a616f'
|
|
26
|
+
};
|
|
27
|
+
export const emojisHeader = {
|
|
28
|
+
bg_color: '#283442',
|
|
29
|
+
border_color: '#2d3748'
|
|
30
|
+
};
|
|
31
|
+
export const attachmentPreviewHeader = {
|
|
32
|
+
bg_color: '#232b38',
|
|
33
|
+
name_color: '#e2e4e6',
|
|
34
|
+
size_color: '#a8b0bd'
|
|
27
35
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryGreen, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryGreen, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup, replyEditor, emojisHeader, attachmentPreviewHeader } from "./commonColorVariable";
|
|
3
3
|
import { imIntegrationIcon, imTtIcon, messagetextColor } from "../commonThemeColorVariable";
|
|
4
4
|
export default {
|
|
5
5
|
library: 'chat_components',
|
|
@@ -112,8 +112,21 @@ export default {
|
|
|
112
112
|
border_color_failed: failedBdr
|
|
113
113
|
},
|
|
114
114
|
emojiFooter: {
|
|
115
|
-
tabLine: primaryGreen
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
tabLine: primaryGreen,
|
|
116
|
+
border_color: '#2d3748'
|
|
117
|
+
},
|
|
118
|
+
emojiPopup: { ...emojiPopup,
|
|
119
|
+
ttIcon_path1_color: '#5f6478',
|
|
120
|
+
ttIcon_path2_color: 'var(--dot_platinum)'
|
|
121
|
+
},
|
|
122
|
+
replyEditor,
|
|
123
|
+
emojisHeader,
|
|
124
|
+
attachmentPreviewHeader,
|
|
125
|
+
attachmentPreviewBody: {
|
|
126
|
+
bg_color: '#262f3d',
|
|
127
|
+
editor_border_color: '#3e4d63',
|
|
128
|
+
editor_border_hover_color: '#828994',
|
|
129
|
+
editor_border_active_color: '#45a159'
|
|
130
|
+
}
|
|
118
131
|
}
|
|
119
132
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryOrange, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryOrange, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup, replyEditor, emojisHeader, attachmentPreviewHeader } from "./commonColorVariable";
|
|
3
3
|
import { imIntegrationIcon, imTtIcon, messagetextColor } from "../commonThemeColorVariable";
|
|
4
4
|
export default {
|
|
5
5
|
library: 'chat_components',
|
|
@@ -112,8 +112,21 @@ export default {
|
|
|
112
112
|
border_color_failed: failedBdr
|
|
113
113
|
},
|
|
114
114
|
emojiFooter: {
|
|
115
|
-
tabLine: primaryOrange
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
tabLine: primaryOrange,
|
|
116
|
+
border_color: '#2d3748'
|
|
117
|
+
},
|
|
118
|
+
emojiPopup: { ...emojiPopup,
|
|
119
|
+
ttIcon_path1_color: '#5f6478',
|
|
120
|
+
ttIcon_path2_color: 'var(--dot_platinum)'
|
|
121
|
+
},
|
|
122
|
+
replyEditor,
|
|
123
|
+
emojisHeader,
|
|
124
|
+
attachmentPreviewHeader,
|
|
125
|
+
attachmentPreviewBody: {
|
|
126
|
+
bg_color: '#262f3d',
|
|
127
|
+
editor_border_color: '#3e4d63',
|
|
128
|
+
editor_border_hover_color: '#828994',
|
|
129
|
+
editor_border_active_color: '#ff801f'
|
|
130
|
+
}
|
|
118
131
|
}
|
|
119
132
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryRed, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryRed, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup, replyEditor, emojisHeader, attachmentPreviewHeader } from "./commonColorVariable";
|
|
3
3
|
import { imIntegrationIcon, imTtIcon, messagetextColor } from "../commonThemeColorVariable";
|
|
4
4
|
export default {
|
|
5
5
|
library: 'chat_components',
|
|
@@ -112,8 +112,21 @@ export default {
|
|
|
112
112
|
border_color_failed: failedBdr
|
|
113
113
|
},
|
|
114
114
|
emojiFooter: {
|
|
115
|
-
tabLine: primaryRed
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
tabLine: primaryRed,
|
|
116
|
+
border_color: 'hsl(258.46deg 12.62% 23.2%)'
|
|
117
|
+
},
|
|
118
|
+
emojiPopup: { ...emojiPopup,
|
|
119
|
+
ttIcon_path1_color: '#5f6478',
|
|
120
|
+
ttIcon_path2_color: 'var(--dot_platinum)'
|
|
121
|
+
},
|
|
122
|
+
replyEditor,
|
|
123
|
+
emojisHeader,
|
|
124
|
+
attachmentPreviewHeader,
|
|
125
|
+
attachmentPreviewBody: {
|
|
126
|
+
bg_color: '#262f3d',
|
|
127
|
+
editor_border_color: '#3e4d63',
|
|
128
|
+
editor_border_hover_color: '#828994',
|
|
129
|
+
editor_border_active_color: '#e94f4f'
|
|
130
|
+
}
|
|
118
131
|
}
|
|
119
132
|
};
|