@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryYellow, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryYellow, 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: primaryYellow
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
tabLine: primaryYellow,
|
|
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: '#d79835'
|
|
130
|
+
}
|
|
118
131
|
}
|
|
119
132
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messagetextColor, primaryBlue, white, black, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, imIntegrationIcon, imTtIcon, replyEditor, emojiPopup } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messagetextColor, primaryBlue, white, black, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, imIntegrationIcon, imTtIcon, replyEditor, emojiPopup, emojisHeader, attachmentPreviewHeader } from "./commonColorVariable";
|
|
3
3
|
export default {
|
|
4
4
|
library: 'chat_components',
|
|
5
5
|
variables: {
|
|
@@ -115,9 +115,21 @@ export default {
|
|
|
115
115
|
hover_bg_color: 'green'
|
|
116
116
|
},
|
|
117
117
|
replyEditor,
|
|
118
|
-
emojiPopup,
|
|
118
|
+
emojiPopup: { ...emojiPopup,
|
|
119
|
+
ttIcon_path1_color: 'rgba(200, 203, 220, 0.7)',
|
|
120
|
+
ttIcon_path2_color: 'var(--dot_black)'
|
|
121
|
+
},
|
|
119
122
|
emojiFooter: {
|
|
120
|
-
tabLine: primaryBlue
|
|
123
|
+
tabLine: primaryBlue,
|
|
124
|
+
border_color: '#ebf0f5'
|
|
125
|
+
},
|
|
126
|
+
emojisHeader,
|
|
127
|
+
attachmentPreviewHeader,
|
|
128
|
+
attachmentPreviewBody: {
|
|
129
|
+
bg_color: '#f5f6f7',
|
|
130
|
+
editor_border_color: '#c8cbdc',
|
|
131
|
+
editor_border_hover_color: '#788190',
|
|
132
|
+
editor_border_active_color: '#0a73eb'
|
|
121
133
|
}
|
|
122
134
|
}
|
|
123
135
|
};
|
|
@@ -35,12 +35,20 @@ export const imTtIcon = {
|
|
|
35
35
|
};
|
|
36
36
|
export const replyEditor = {
|
|
37
37
|
bg: '#fff',
|
|
38
|
-
border: '#f1f4f9',
|
|
39
38
|
color: '#000',
|
|
40
|
-
placeholder: '#
|
|
39
|
+
placeholder: '#c8cbdc'
|
|
41
40
|
};
|
|
42
41
|
export const emojiPopup = {
|
|
43
42
|
bg: '#f1f4f9',
|
|
44
43
|
border: '#f1f4f9',
|
|
45
44
|
titleColor: '#aaa'
|
|
45
|
+
};
|
|
46
|
+
export const emojisHeader = {
|
|
47
|
+
bg_color: '#fafafa',
|
|
48
|
+
border_color: '#ede8e8'
|
|
49
|
+
};
|
|
50
|
+
export const attachmentPreviewHeader = {
|
|
51
|
+
bg_color: '#fff',
|
|
52
|
+
name_color: '#000',
|
|
53
|
+
size_color: '#5a616f'
|
|
46
54
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messagetextColor, primaryGreen, white, black, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, imIntegrationIcon, imTtIcon } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messagetextColor, primaryGreen, white, black, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, imIntegrationIcon, imTtIcon, replyEditor, emojisHeader, attachmentPreviewHeader, emojiPopup } from "./commonColorVariable";
|
|
3
3
|
export default {
|
|
4
4
|
library: 'chat_components',
|
|
5
5
|
variables: {
|
|
@@ -111,7 +111,21 @@ export default {
|
|
|
111
111
|
border_color_failed: failedBdr
|
|
112
112
|
},
|
|
113
113
|
emojiFooter: {
|
|
114
|
-
tabLine: primaryGreen
|
|
114
|
+
tabLine: primaryGreen,
|
|
115
|
+
border_color: '#ebf0f5'
|
|
116
|
+
},
|
|
117
|
+
replyEditor,
|
|
118
|
+
emojisHeader,
|
|
119
|
+
attachmentPreviewHeader,
|
|
120
|
+
attachmentPreviewBody: {
|
|
121
|
+
bg_color: '#f5f6f7',
|
|
122
|
+
editor_border_color: '#c5cdc7',
|
|
123
|
+
editor_border_hover_color: '#788190',
|
|
124
|
+
editor_border_active_color: '#26a942'
|
|
125
|
+
},
|
|
126
|
+
emojiPopup: { ...emojiPopup,
|
|
127
|
+
ttIcon_path1_color: 'rgba(197, 205, 199, 0.7)',
|
|
128
|
+
ttIcon_path2_color: 'var(--dot_black)'
|
|
115
129
|
}
|
|
116
130
|
}
|
|
117
131
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messagetextColor, primaryOrange, white, black, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, imIntegrationIcon, imTtIcon } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messagetextColor, primaryOrange, white, black, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, imIntegrationIcon, imTtIcon, replyEditor, emojisHeader, attachmentPreviewHeader, emojiPopup } from "./commonColorVariable";
|
|
3
3
|
export default {
|
|
4
4
|
library: 'chat_components',
|
|
5
5
|
variables: {
|
|
@@ -111,7 +111,21 @@ export default {
|
|
|
111
111
|
border_color_failed: failedBdr
|
|
112
112
|
},
|
|
113
113
|
emojiFooter: {
|
|
114
|
-
tabLine: primaryOrange
|
|
114
|
+
tabLine: primaryOrange,
|
|
115
|
+
border_color: '#ebf0f5'
|
|
116
|
+
},
|
|
117
|
+
replyEditor,
|
|
118
|
+
emojisHeader,
|
|
119
|
+
attachmentPreviewHeader,
|
|
120
|
+
attachmentPreviewBody: {
|
|
121
|
+
bg_color: '#f5f6f7',
|
|
122
|
+
editor_border_color: '#d1cbc6',
|
|
123
|
+
editor_border_hover_color: '#788190',
|
|
124
|
+
editor_border_active_color: '#e57717'
|
|
125
|
+
},
|
|
126
|
+
emojiPopup: { ...emojiPopup,
|
|
127
|
+
ttIcon_path1_color: 'rgba(204, 201, 199, 0.7)',
|
|
128
|
+
ttIcon_path2_color: 'var(--dot_black)'
|
|
115
129
|
}
|
|
116
130
|
}
|
|
117
131
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messagetextColor, primaryRed, white, black, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, imIntegrationIcon, imTtIcon } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messagetextColor, primaryRed, white, black, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, imIntegrationIcon, imTtIcon, replyEditor, emojisHeader, attachmentPreviewHeader, emojiPopup } from "./commonColorVariable";
|
|
3
3
|
export default {
|
|
4
4
|
library: 'chat_components',
|
|
5
5
|
variables: {
|
|
@@ -111,7 +111,21 @@ export default {
|
|
|
111
111
|
border_color_failed: failedBdr
|
|
112
112
|
},
|
|
113
113
|
emojiFooter: {
|
|
114
|
-
tabLine: primaryRed
|
|
114
|
+
tabLine: primaryRed,
|
|
115
|
+
border_color: '#ebf0f5'
|
|
116
|
+
},
|
|
117
|
+
replyEditor,
|
|
118
|
+
emojisHeader,
|
|
119
|
+
attachmentPreviewHeader,
|
|
120
|
+
attachmentPreviewBody: {
|
|
121
|
+
bg_color: '#f5f6f7',
|
|
122
|
+
editor_border_color: '#b9b2b4',
|
|
123
|
+
editor_border_hover_color: '#788190',
|
|
124
|
+
editor_border_active_color: '#de3535'
|
|
125
|
+
},
|
|
126
|
+
emojiPopup: { ...emojiPopup,
|
|
127
|
+
ttIcon_path1_color: 'rgba(204, 199, 201, 0.7)',
|
|
128
|
+
ttIcon_path2_color: 'var(--dot_black)'
|
|
115
129
|
}
|
|
116
130
|
}
|
|
117
131
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messagetextColor, primaryYellow, white, black, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, imIntegrationIcon, imTtIcon } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messagetextColor, primaryYellow, white, black, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, imIntegrationIcon, imTtIcon, replyEditor, emojisHeader, attachmentPreviewHeader, emojiPopup } from "./commonColorVariable";
|
|
3
3
|
export default {
|
|
4
4
|
library: 'chat_components',
|
|
5
5
|
variables: {
|
|
@@ -111,7 +111,21 @@ export default {
|
|
|
111
111
|
border_color_failed: failedBdr
|
|
112
112
|
},
|
|
113
113
|
emojiFooter: {
|
|
114
|
-
tabLine: primaryYellow
|
|
114
|
+
tabLine: primaryYellow,
|
|
115
|
+
border_color: '#ebf0f5'
|
|
116
|
+
},
|
|
117
|
+
replyEditor,
|
|
118
|
+
emojisHeader,
|
|
119
|
+
attachmentPreviewHeader,
|
|
120
|
+
attachmentPreviewBody: {
|
|
121
|
+
bg_color: '#f5f6f7',
|
|
122
|
+
editor_border_color: '#ccc2a4',
|
|
123
|
+
editor_border_hover_color: '#788190',
|
|
124
|
+
editor_border_active_color: '#e8b923'
|
|
125
|
+
},
|
|
126
|
+
emojiPopup: { ...emojiPopup,
|
|
127
|
+
ttIcon_path1_color: 'rgba(204, 203, 199, 0.7)',
|
|
128
|
+
ttIcon_path2_color: 'var(--dot_black)'
|
|
115
129
|
}
|
|
116
130
|
}
|
|
117
131
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, outgoingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryBlue, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, replyEditor, emojiPopup } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, 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',
|
|
@@ -112,9 +112,21 @@ export default {
|
|
|
112
112
|
border_color_failed: failedBdr
|
|
113
113
|
},
|
|
114
114
|
emojiFooter: {
|
|
115
|
-
tabLine: primaryBlue
|
|
115
|
+
tabLine: primaryBlue,
|
|
116
|
+
border_color: '#161515'
|
|
116
117
|
},
|
|
117
118
|
replyEditor,
|
|
118
|
-
emojiPopup
|
|
119
|
+
emojiPopup: { ...emojiPopup,
|
|
120
|
+
ttIcon_path1_color: 'rgba(255, 255, 255, 0.15)',
|
|
121
|
+
ttIcon_path2_color: 'var(--dot_platinum)'
|
|
122
|
+
},
|
|
123
|
+
emojisHeader,
|
|
124
|
+
attachmentPreviewHeader,
|
|
125
|
+
attachmentPreviewBody: {
|
|
126
|
+
bg_color: '#262626',
|
|
127
|
+
editor_border_color: '#585858',
|
|
128
|
+
editor_border_hover_color: '#828994',
|
|
129
|
+
editor_border_active_color: '#479dff'
|
|
130
|
+
}
|
|
119
131
|
}
|
|
120
132
|
};
|
|
@@ -23,7 +23,15 @@ export const emojiPopup = {
|
|
|
23
23
|
};
|
|
24
24
|
export const replyEditor = {
|
|
25
25
|
bg: '#212121',
|
|
26
|
-
border: '#f1f4f9',
|
|
27
26
|
color: '#e2e4e6',
|
|
28
27
|
placeholder: '#585858'
|
|
28
|
+
};
|
|
29
|
+
export const emojisHeader = {
|
|
30
|
+
bg_color: '#171717',
|
|
31
|
+
border_color: '#161515'
|
|
32
|
+
};
|
|
33
|
+
export const attachmentPreviewHeader = {
|
|
34
|
+
bg_color: '#212121',
|
|
35
|
+
name_color: '#e2e4e6',
|
|
36
|
+
size_color: '#a8b0bd'
|
|
29
37
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, outgoingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryGreen, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, 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: '#161515'
|
|
117
|
+
},
|
|
118
|
+
replyEditor,
|
|
119
|
+
emojiPopup: { ...emojiPopup,
|
|
120
|
+
ttIcon_path1_color: 'rgba(255, 255, 255, 0.15)',
|
|
121
|
+
ttIcon_path2_color: 'var(--dot_platinum)'
|
|
122
|
+
},
|
|
123
|
+
emojisHeader,
|
|
124
|
+
attachmentPreviewHeader,
|
|
125
|
+
attachmentPreviewBody: {
|
|
126
|
+
bg_color: '#262626',
|
|
127
|
+
editor_border_color: '#585858',
|
|
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, outgoingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryOrange, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, 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: '#161515'
|
|
117
|
+
},
|
|
118
|
+
emojiPopup: { ...emojiPopup,
|
|
119
|
+
ttIcon_path1_color: 'rgba(255, 255, 255, 0.15)',
|
|
120
|
+
ttIcon_path2_color: 'var(--dot_platinum)'
|
|
121
|
+
},
|
|
122
|
+
replyEditor,
|
|
123
|
+
emojisHeader,
|
|
124
|
+
attachmentPreviewHeader,
|
|
125
|
+
attachmentPreviewBody: {
|
|
126
|
+
bg_color: '#262626',
|
|
127
|
+
editor_border_color: '#585858',
|
|
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, outgoingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryRed, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, 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: '#161515'
|
|
117
|
+
},
|
|
118
|
+
emojiPopup: { ...emojiPopup,
|
|
119
|
+
ttIcon_path1_color: 'rgba(255, 255, 255, 0.15)',
|
|
120
|
+
ttIcon_path2_color: 'var(--dot_platinum)'
|
|
121
|
+
},
|
|
122
|
+
replyEditor,
|
|
123
|
+
emojisHeader,
|
|
124
|
+
attachmentPreviewHeader,
|
|
125
|
+
attachmentPreviewBody: {
|
|
126
|
+
bg_color: '#262626',
|
|
127
|
+
editor_border_color: '#585858',
|
|
128
|
+
editor_border_hover_color: '#828994',
|
|
129
|
+
editor_border_active_color: '#e94f4f'
|
|
130
|
+
}
|
|
118
131
|
}
|
|
119
132
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, outgoingBubbleBgColor, bubbleActiveBgColor, messageStatusSendColor, messageStatusFailedColor, actionIconWrapperColor, primaryYellow, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup } from "./commonColorVariable";
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, bubbleActiveBgColor, messageStatusSendColor, messageStatusFailedColor, actionIconWrapperColor, primaryYellow, 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: primaryYellow
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
tabLine: primaryYellow,
|
|
116
|
+
border_color: '#161515'
|
|
117
|
+
},
|
|
118
|
+
emojiPopup: { ...emojiPopup,
|
|
119
|
+
ttIcon_path1_color: 'rgba(255, 255, 255, 0.15)',
|
|
120
|
+
ttIcon_path2_color: 'var(--dot_platinum)'
|
|
121
|
+
},
|
|
122
|
+
replyEditor,
|
|
123
|
+
emojisHeader,
|
|
124
|
+
attachmentPreviewHeader,
|
|
125
|
+
attachmentPreviewBody: {
|
|
126
|
+
bg_color: '#262626',
|
|
127
|
+
editor_border_color: '#585858',
|
|
128
|
+
editor_border_hover_color: '#828994',
|
|
129
|
+
editor_border_active_color: '#d79835'
|
|
130
|
+
}
|
|
118
131
|
}
|
|
119
132
|
};
|
package/es/constants/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export const MSG_ACTION_POPUP_PORTAL = 'MSG_ACTION_POPUP_PORTAL';
|
|
2
2
|
export const EDITOR_POPUP_PORTAL = 'EDITOR_POPUP_PORTAL';
|
|
3
|
-
const
|
|
3
|
+
export const EDITOR_POPUP_TARGET_PORTAL = 'EDITOR_POPUP_TARGET_PORTAL';
|
|
4
|
+
const version = '1.4.9';
|
|
4
5
|
export const defaultEditorURL = // `https://static.localzohocdn.com/rtelibrary/${version}/js/rte.js`;
|
|
5
6
|
// `https://static.zohocdn.com/rtelibrary/${version}/js/rte.js`;
|
|
6
7
|
// `https://static.localzohocdn.com/rtelibrary/${version}/js/rte.min.js`;
|
|
@@ -20,6 +20,7 @@ import replyComposerPropTypes from "./props/propTypes";
|
|
|
20
20
|
/** ** Methods *** */
|
|
21
21
|
|
|
22
22
|
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
23
|
+
import cssJSLogic from "./css/cssJSLogic";
|
|
23
24
|
/** ** Styles *** */
|
|
24
25
|
|
|
25
26
|
import style from "./css/ReplyComposer.module.css";
|
|
@@ -47,11 +48,11 @@ export default function ReplyComposer(props) {
|
|
|
47
48
|
attachmentPreviewTexts,
|
|
48
49
|
renderHeader,
|
|
49
50
|
renderFooter,
|
|
51
|
+
renderStencils,
|
|
50
52
|
getEditorState: propGetEditorState,
|
|
51
53
|
needFooter
|
|
52
54
|
} = props;
|
|
53
55
|
const {
|
|
54
|
-
replyEditorProps = dummyObject,
|
|
55
56
|
replyEditorSuggestionsProps = dummyObject,
|
|
56
57
|
replyComposerFooterProps = dummyObject
|
|
57
58
|
} = customProps;
|
|
@@ -74,8 +75,11 @@ export default function ReplyComposer(props) {
|
|
|
74
75
|
editor,
|
|
75
76
|
onKeyDown,
|
|
76
77
|
attachmentPreviewCustomProps,
|
|
78
|
+
replyEditorCustomProps,
|
|
77
79
|
onFileCancel,
|
|
78
|
-
onFileSubmit
|
|
80
|
+
onFileSubmit,
|
|
81
|
+
isLoading,
|
|
82
|
+
isLoaded
|
|
79
83
|
} = useReplyComposer({
|
|
80
84
|
onKeyDown: propOnKeyDown,
|
|
81
85
|
isShowSuggestion,
|
|
@@ -90,7 +94,17 @@ export default function ReplyComposer(props) {
|
|
|
90
94
|
/* External customization */
|
|
91
95
|
|
|
92
96
|
const newStyle = useMergeStyle(style, customStyle);
|
|
97
|
+
/* CSS classnames added based on logic */
|
|
98
|
+
|
|
99
|
+
const {
|
|
100
|
+
replEditorWrapperClass
|
|
101
|
+
} = cssJSLogic({
|
|
102
|
+
isLoaded
|
|
103
|
+
}, newStyle);
|
|
93
104
|
const headerElement = useMemo(() => renderHandler(renderHeader)(), [renderHeader]);
|
|
105
|
+
const stencilsElement = useMemo(() => isLoading ? renderHandler(renderStencils)({
|
|
106
|
+
needFooter
|
|
107
|
+
}) : null, [renderStencils, needFooter, isLoading]);
|
|
94
108
|
return /*#__PURE__*/React.createElement(Container, {
|
|
95
109
|
className: newStyle.replyComposer,
|
|
96
110
|
isCover: false
|
|
@@ -111,7 +125,9 @@ export default function ReplyComposer(props) {
|
|
|
111
125
|
onSubmit: onFileSubmit,
|
|
112
126
|
texts: attachmentPreviewTexts,
|
|
113
127
|
...attachmentPreviewCustomProps
|
|
114
|
-
}) : null, headerElement || null, /*#__PURE__*/React.createElement(
|
|
128
|
+
}) : null, isLoaded ? headerElement : null, stencilsElement || null, /*#__PURE__*/React.createElement("div", {
|
|
129
|
+
className: replEditorWrapperClass
|
|
130
|
+
}, /*#__PURE__*/React.createElement(ReplyEditor, {
|
|
115
131
|
content: content,
|
|
116
132
|
EDITORURL: EDITORURL,
|
|
117
133
|
features: allFeatures,
|
|
@@ -123,8 +139,8 @@ export default function ReplyComposer(props) {
|
|
|
123
139
|
onKeyDown: onKeyDown,
|
|
124
140
|
onPaste: onPaste,
|
|
125
141
|
placeHolder: placeHolder,
|
|
126
|
-
...
|
|
127
|
-
}), needFooter ? /*#__PURE__*/React.createElement(ReplyComposerFooter, {
|
|
142
|
+
...replyEditorCustomProps
|
|
143
|
+
})), needFooter && isLoaded ? /*#__PURE__*/React.createElement(ReplyComposerFooter, {
|
|
128
144
|
editor: editor,
|
|
129
145
|
extensions: extensions,
|
|
130
146
|
isHTMLContent: isHTMLContent,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** ** Methods *** */
|
|
2
|
+
import { compileClassNames } from '@zohodesk/utils';
|
|
3
|
+
export default function cssJSLogic(props, style) {
|
|
4
|
+
const {
|
|
5
|
+
isLoaded
|
|
6
|
+
} = props;
|
|
7
|
+
const replEditorWrapperClass = compileClassNames({
|
|
8
|
+
[style.hidden]: !isLoaded
|
|
9
|
+
});
|
|
10
|
+
return {
|
|
11
|
+
replEditorWrapperClass
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/** ** Styles *** */
|
|
2
2
|
.replyComposerFooter {
|
|
3
3
|
display: flex;
|
|
4
|
-
|
|
4
|
+
}
|
|
5
|
+
[dir=ltr] .replyComposerFooter {
|
|
6
|
+
padding: 0 0 0 var(--zd_size16) ;
|
|
7
|
+
}
|
|
8
|
+
[dir=rtl] .replyComposerFooter {
|
|
9
|
+
padding: 0 var(--zd_size16) 0 0 ;
|
|
5
10
|
}
|
|
@@ -11,14 +11,30 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.editableDiv {
|
|
14
|
+
--zd_fallback_font: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI',
|
|
15
|
+
Roboto, 'Helvetica Neue', Arial, sans-serif !important;
|
|
16
|
+
--zd_regular: var(--zd_base_font_regular), var(--zd_fallback_font) !important;
|
|
17
|
+
--zd_light: var(--zd_base_font_light), var(--zd_fallback_font) !important;
|
|
18
|
+
--zd_semibold: var(--zd_base_font_semibold), var(--zd_fallback_font) !important;
|
|
19
|
+
--zd_bold: var(--zd_base_font_bold), var(--zd_fallback_font) !important;
|
|
14
20
|
max-height: var(--zd_size250) !important;
|
|
15
21
|
min-height: var(--zd_size80) !important;
|
|
16
22
|
overflow: auto !important;
|
|
17
23
|
font-size: var(--zd_font_size14) !important;
|
|
18
24
|
font-family: var(--zd_regular) !important;
|
|
19
25
|
line-height: 22px !important;
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
|
|
27
|
+
--rte-text-color: var(--imlib_chat_components_replyEditor_color) !important;
|
|
28
|
+
--rte-bg-color: var(--imlib_chat_components_replyEditor_bg) !important;
|
|
29
|
+
--rte-placeholder-color: var(
|
|
30
|
+
--imlib_chat_components_replyEditor_placeholder
|
|
31
|
+
) !important;
|
|
32
|
+
--rte-link-text-color: var(
|
|
33
|
+
--imlib_chat_components_replyEditor_color
|
|
34
|
+
) !important;
|
|
35
|
+
|
|
36
|
+
padding: var(--zd_size16) !important;
|
|
37
|
+
cursor: text !important;
|
|
22
38
|
}
|
|
23
39
|
|
|
24
40
|
.editorWrapper {
|
|
@@ -28,3 +44,7 @@
|
|
|
28
44
|
.editor {
|
|
29
45
|
/** ** Use this class for css customisations *** */
|
|
30
46
|
}
|
|
47
|
+
|
|
48
|
+
.replyEditor :global(.prosemirror-suggestion) {
|
|
49
|
+
text-decoration: none !important;
|
|
50
|
+
}
|
|
@@ -14,6 +14,7 @@ import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
|
14
14
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
15
15
|
import replyEditorSuggestionsDefaultProps from "./props/defaultProps";
|
|
16
16
|
import replyEditorSuggestionsPropTypes from "./props/propTypes";
|
|
17
|
+
import { emojiRegex } from '@zohoim/chat-components-utils/es/constants/regexConstants';
|
|
17
18
|
/** ** Styles *** */
|
|
18
19
|
|
|
19
20
|
import style from "./css/ReplyEditorSuggestions.module.css";
|
|
@@ -39,12 +40,18 @@ export default function ReplyEditorSuggestions(props) {
|
|
|
39
40
|
const handleRenderEmoji = useCallback(function () {
|
|
40
41
|
let {
|
|
41
42
|
onSelect,
|
|
42
|
-
searchText,
|
|
43
|
-
componentProps
|
|
43
|
+
searchText = '',
|
|
44
|
+
componentProps,
|
|
45
|
+
getMethods
|
|
44
46
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
45
|
-
const
|
|
47
|
+
const {
|
|
48
|
+
searchTextLenForShow = 2
|
|
49
|
+
} = componentProps || {}; // (-1) -> ':' string is not valid for count.
|
|
50
|
+
|
|
51
|
+
const isShowEmojiPopup = searchText.length - 1 >= searchTextLenForShow;
|
|
46
52
|
return isShowEmojiPopup ? /*#__PURE__*/React.createElement(Emojis, {
|
|
47
53
|
emojisRowType: "single",
|
|
54
|
+
getMethods: getMethods,
|
|
48
55
|
isShowGroupBasedList: false,
|
|
49
56
|
isShowOnlyContent: true,
|
|
50
57
|
isShowSearchBox: false,
|
|
@@ -59,7 +66,8 @@ export default function ReplyEditorSuggestions(props) {
|
|
|
59
66
|
}) : null;
|
|
60
67
|
}, []);
|
|
61
68
|
const defaultRenderMethod = useMemo(() => ({
|
|
62
|
-
':': handleRenderEmoji
|
|
69
|
+
':': handleRenderEmoji,
|
|
70
|
+
[emojiRegex]: handleRenderEmoji
|
|
63
71
|
}), [handleRenderEmoji]);
|
|
64
72
|
const {
|
|
65
73
|
suggestionElement,
|
|
@@ -11,6 +11,7 @@ const replyEditorSuggestionsPropTypes = {
|
|
|
11
11
|
}).isRequired,
|
|
12
12
|
suggestionsMapping: PropTypes.objectOf(PropTypes.shape({
|
|
13
13
|
componentProps: PropTypes.object,
|
|
14
|
+
popupProps: PropTypes.object,
|
|
14
15
|
renderItem: PropTypes.func
|
|
15
16
|
})).isRequired,
|
|
16
17
|
onSelect: PropTypes.func,
|
|
@@ -4,6 +4,7 @@ import React from 'react';
|
|
|
4
4
|
|
|
5
5
|
import Popup from '@zohodesk/components/es/Popup/Popup';
|
|
6
6
|
import DropBox from '@zohodesk/components/es/DropBox/DropBox';
|
|
7
|
+
import Modal from '@zohodesk/components/es/Modal/Modal';
|
|
7
8
|
/** ** Hooks *** */
|
|
8
9
|
|
|
9
10
|
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
@@ -13,7 +14,7 @@ import useReplyEditorSuggestionsPopup from '@zohoim/chat-components-hooks/es/im/
|
|
|
13
14
|
import replyEditorSuggestionsPopupDefaultProps from "./props/defaultProps";
|
|
14
15
|
import replyEditorSuggestionsPopupPropTypes from "./props/propTypes";
|
|
15
16
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
16
|
-
import { EDITOR_POPUP_PORTAL } from "../../constants";
|
|
17
|
+
import { EDITOR_POPUP_PORTAL, EDITOR_POPUP_TARGET_PORTAL } from "../../constants";
|
|
17
18
|
/** ** Styles *** */
|
|
18
19
|
|
|
19
20
|
import style from "./css/ReplyEditorSuggestionsPopup.module.css";
|
|
@@ -60,11 +61,13 @@ export function ReplyEditorSuggestionsPopupComp(props) {
|
|
|
60
61
|
/* External customization */
|
|
61
62
|
|
|
62
63
|
const newStyle = useMergeStyle(style, customStyle);
|
|
63
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
64
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal, {
|
|
65
|
+
portalId: EDITOR_POPUP_TARGET_PORTAL
|
|
66
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
64
67
|
ref: getTargetRef,
|
|
65
68
|
className: newStyle.hiddenTarget,
|
|
66
69
|
style: targetElementStyle
|
|
67
|
-
}), isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
|
|
70
|
+
}))), isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
|
|
68
71
|
boxPosition: position,
|
|
69
72
|
customStyle: dummyObject,
|
|
70
73
|
getRef: getContainerRef,
|