@zohoim/chat-components 1.0.9-beta.7 → 1.0.9-beta.8
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/Message/Message.js +8 -2
- package/es/MessageActions/MessageActions.js +2 -0
- package/es/MessageActions/props/propTypes.js +2 -1
- package/es/MessageActionsMore/MessageActionsMore.js +5 -3
- package/es/MessageActionsMore/props/propTypes.js +3 -5
- package/es/MessageActionsWrapper/MessageActionsWrapper.js +7 -4
- package/es/MessageActionsWrapper/props/propTypes.js +2 -1
- package/es/MessageBubble/css/MessageBubble.module.css +0 -7
- package/es/MessageBubble/props/defaultProps.js +2 -1
- package/es/MessageBubble/props/propTypes.js +2 -1
- package/es/Theme/ThemeAssets.js +2 -2
- package/es/Theme/ThemeWrapper.js +7 -18
- package/es/Theme/TooltipWrapper.js +1 -1
- package/es/Theme/constants/index.js +41 -0
- package/es/Theme/props/defaultProps.js +1 -2
- package/es/Theme/props/propTypes.js +1 -2
- package/es/Theme/themeVariables/dark/blueTheme.js +1 -18
- package/es/Theme/themeVariables/dark/commonColorVariable.js +1 -20
- package/es/Theme/themeVariables/dark/greenTheme.js +1 -18
- package/es/Theme/themeVariables/dark/orangeTheme.js +1 -18
- package/es/Theme/themeVariables/dark/redTheme.js +1 -18
- package/es/Theme/themeVariables/dark/yellowTheme.js +1 -18
- package/es/Theme/themeVariables/light/blueTheme.js +1 -22
- package/es/Theme/themeVariables/light/commonColorVariable.js +0 -19
- package/es/Theme/themeVariables/light/greenTheme.js +1 -18
- package/es/Theme/themeVariables/light/orangeTheme.js +1 -18
- package/es/Theme/themeVariables/light/redTheme.js +1 -18
- package/es/Theme/themeVariables/light/yellowTheme.js +1 -18
- package/es/Theme/themeVariables/pureDark/blueTheme.js +1 -18
- package/es/Theme/themeVariables/pureDark/commonColorVariable.js +1 -20
- package/es/Theme/themeVariables/pureDark/greenTheme.js +1 -18
- package/es/Theme/themeVariables/pureDark/orangeTheme.js +1 -18
- package/es/Theme/themeVariables/pureDark/redTheme.js +1 -18
- package/es/Theme/themeVariables/pureDark/yellowTheme.js +1 -18
- package/es/Theme/utils/getThemeConfigurations.js +1 -1
- package/es/constants/index.js +1 -7
- package/es/im/index.js +1 -8
- package/es/index.js +2 -13
- package/package.json +7 -7
- package/es/AttachmentHandler/AttachmentHandler.js +0 -84
- package/es/AttachmentHandler/css/AttachmentHandler.module.css +0 -27
- package/es/AttachmentHandler/index.js +0 -1
- package/es/AttachmentHandler/props/defaultProps.js +0 -10
- package/es/AttachmentHandler/props/propTypes.js +0 -17
- package/es/AttachmentPreview/AttachmentPreview.js +0 -121
- package/es/AttachmentPreview/css/AttachmentPreview.module.css +0 -39
- package/es/AttachmentPreview/index.js +0 -1
- package/es/AttachmentPreview/props/defaultProps.js +0 -9
- package/es/AttachmentPreview/props/propTypes.js +0 -33
- package/es/AttachmentPreviewBody/AttachmentPreviewBody.js +0 -97
- package/es/AttachmentPreviewBody/css/AttachmentPreviewBody.module.css +0 -74
- package/es/AttachmentPreviewBody/index.js +0 -1
- package/es/AttachmentPreviewBody/props/defaultProps.js +0 -7
- package/es/AttachmentPreviewBody/props/propTypes.js +0 -20
- package/es/AttachmentPreviewHeader/AttachmentPreviewHeader.js +0 -84
- package/es/AttachmentPreviewHeader/css/AttachmentPreviewHeader.module.css +0 -47
- package/es/AttachmentPreviewHeader/index.js +0 -1
- package/es/AttachmentPreviewHeader/props/defaultProps.js +0 -7
- package/es/AttachmentPreviewHeader/props/propTypes.js +0 -16
- package/es/Emoji/Emoji.js +0 -72
- package/es/Emoji/css/Emoji.module.css +0 -48
- package/es/Emoji/css/cssJSLogic.js +0 -18
- package/es/Emoji/index.js +0 -1
- package/es/Emoji/props/defaultProps.js +0 -8
- package/es/Emoji/props/propTypes.js +0 -16
- package/es/EmojiPopup/EmojiPopup.js +0 -116
- package/es/EmojiPopup/css/EmojiPopup.module.css +0 -55
- package/es/EmojiPopup/index.js +0 -1
- package/es/EmojiPopup/props/defaultProps.js +0 -11
- package/es/EmojiPopup/props/propTypes.js +0 -21
- package/es/Emojis/Emojis.js +0 -79
- package/es/Emojis/index.js +0 -1
- package/es/Emojis/props/defaultProps.js +0 -10
- package/es/Emojis/props/propTypes.js +0 -19
- package/es/EmojisEmptyState/EmojisEmptyState.js +0 -50
- package/es/EmojisEmptyState/css/EmojisEmptyState.module.css +0 -18
- package/es/EmojisEmptyState/index.js +0 -1
- package/es/EmojisEmptyState/props/defaultProps.js +0 -9
- package/es/EmojisEmptyState/props/propTypes.js +0 -8
- package/es/EmojisFooter/EmojisFooter.js +0 -71
- package/es/EmojisFooter/css/EmojisFooter.module.css +0 -40
- package/es/EmojisFooter/index.js +0 -1
- package/es/EmojisFooter/props/defaultProps.js +0 -7
- package/es/EmojisFooter/props/propTypes.js +0 -12
- package/es/EmojisHeader/EmojisHeader.js +0 -65
- package/es/EmojisHeader/css/EmojisHeader.module.css +0 -36
- package/es/EmojisHeader/index.js +0 -1
- package/es/EmojisHeader/props/defaultProps.js +0 -8
- package/es/EmojisHeader/props/propTypes.js +0 -13
- package/es/EmojisList/EmojisList.js +0 -130
- package/es/EmojisList/css/EmojisList.module.css +0 -50
- package/es/EmojisList/css/cssJSLogic.js +0 -25
- package/es/EmojisList/index.js +0 -1
- package/es/EmojisList/props/defaultProps.js +0 -10
- package/es/EmojisList/props/propTypes.js +0 -20
- package/es/constants/propConstants/editorPropConstants.js +0 -3
- package/es/constants/propConstants/popupPropConstants.js +0 -2
- package/es/im/IMAttachmentHandler/IMAttachmentHandler.js +0 -50
- package/es/im/IMAttachmentHandler/index.js +0 -1
- package/es/im/IMAttachmentHandler/props/defaultProps.js +0 -10
- package/es/im/IMAttachmentHandler/props/propTypes.js +0 -28
- package/es/im/ReplyComposer/ReplyComposer.js +0 -153
- package/es/im/ReplyComposer/css/ReplyComposer.module.css +0 -10
- package/es/im/ReplyComposer/css/cssJSLogic.js +0 -13
- package/es/im/ReplyComposer/index.js +0 -1
- package/es/im/ReplyComposer/props/defaultProps.js +0 -7
- package/es/im/ReplyComposer/props/propTypes.js +0 -60
- package/es/im/ReplyComposerFooter/ReplyComposerFooter.js +0 -41
- package/es/im/ReplyComposerFooter/css/ReplyComposerFooter.module.css +0 -10
- package/es/im/ReplyComposerFooter/index.js +0 -1
- package/es/im/ReplyComposerFooter/props/defaultProps.js +0 -8
- package/es/im/ReplyComposerFooter/props/propTypes.js +0 -17
- package/es/im/ReplyEditor/ReplyEditor.js +0 -103
- package/es/im/ReplyEditor/css/ReplyEditor.module.css +0 -48
- package/es/im/ReplyEditor/css/cssJSLogic.js +0 -10
- package/es/im/ReplyEditor/index.js +0 -1
- package/es/im/ReplyEditor/props/defaultProps.js +0 -8
- package/es/im/ReplyEditor/props/propTypes.js +0 -27
- package/es/im/ReplyEditorExtensions/ReplyEditorExtensions.js +0 -149
- package/es/im/ReplyEditorExtensions/css/ReplyEditorExtensions.module.css +0 -5
- package/es/im/ReplyEditorExtensions/index.js +0 -1
- package/es/im/ReplyEditorExtensions/props/defaultProps.js +0 -6
- package/es/im/ReplyEditorExtensions/props/propTypes.js +0 -16
- package/es/im/ReplyEditorSuggestions/ReplyEditorSuggestions.js +0 -93
- package/es/im/ReplyEditorSuggestions/css/ReplyEditorSuggestions.module.css +0 -8
- package/es/im/ReplyEditorSuggestions/index.js +0 -1
- package/es/im/ReplyEditorSuggestions/props/defaultProps.js +0 -6
- package/es/im/ReplyEditorSuggestions/props/propTypes.js +0 -21
- package/es/im/ReplyEditorSuggestionsPopup/ReplyEditorSuggestionsPopup.js +0 -91
- package/es/im/ReplyEditorSuggestionsPopup/css/ReplyEditorSuggestionsPopup.module.css +0 -7
- package/es/im/ReplyEditorSuggestionsPopup/index.js +0 -1
- package/es/im/ReplyEditorSuggestionsPopup/props/defaultProps.js +0 -10
- package/es/im/ReplyEditorSuggestionsPopup/props/propTypes.js +0 -21
- package/es/rte/Editor/Editor.js +0 -80
- package/es/rte/Editor/css/Editor.module.css +0 -17
- package/es/rte/Editor/index.js +0 -1
- package/es/rte/Editor/props/defaultProps.js +0 -21
- package/es/rte/Editor/props/propTypes.js +0 -52
- package/es/rte/index.js +0 -1
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.0.10
|
|
14
|
+
|
|
15
|
+
- hover actions retainment changes
|
|
16
|
+
- @zohodesk/components version update
|
|
17
|
+
|
|
13
18
|
# 1.0.9
|
|
14
19
|
|
|
15
20
|
- chat bubble ui issues fixes
|
package/es/Message/Message.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
|
-
import React, { useCallback } from 'react';
|
|
2
|
+
import React, { useState, useCallback } from 'react';
|
|
3
3
|
/** ** Constants *** */
|
|
4
4
|
|
|
5
5
|
import messageDefaultProps from "./props/defaultProps";
|
|
@@ -35,6 +35,10 @@ export default function Message(props) {
|
|
|
35
35
|
renderContent,
|
|
36
36
|
customProps
|
|
37
37
|
} = props;
|
|
38
|
+
const [retainMessageActions, _setRetainMessageActions] = useState(false);
|
|
39
|
+
const setRetainMessageActions = useCallback(retain => {
|
|
40
|
+
_setRetainMessageActions(retain);
|
|
41
|
+
}, []);
|
|
38
42
|
const {
|
|
39
43
|
messageBubbleProps = dummyObject,
|
|
40
44
|
messageOwnerProps = dummyObject,
|
|
@@ -111,7 +115,8 @@ export default function Message(props) {
|
|
|
111
115
|
actions,
|
|
112
116
|
onSelect: onSelectAction,
|
|
113
117
|
renderSecondaryActions,
|
|
114
|
-
onMouseEnter: onMouseEnterAction
|
|
118
|
+
onMouseEnter: onMouseEnterAction,
|
|
119
|
+
setRetainMessageActions
|
|
115
120
|
};
|
|
116
121
|
return /*#__PURE__*/React.createElement(MessageActions, { ...props,
|
|
117
122
|
...messageActionsProps
|
|
@@ -125,6 +130,7 @@ export default function Message(props) {
|
|
|
125
130
|
renderMessageActions: handleRenderMessageActions,
|
|
126
131
|
renderMessageBox: handleRenderMessageBox,
|
|
127
132
|
renderMessageOwner: handleRenderMessageOwner,
|
|
133
|
+
retainMessageActions: retainMessageActions,
|
|
128
134
|
...messageBubbleProps
|
|
129
135
|
});
|
|
130
136
|
}
|
|
@@ -26,6 +26,7 @@ export default function MessageActions(props) {
|
|
|
26
26
|
defaultShowCount,
|
|
27
27
|
onSelect,
|
|
28
28
|
onMouseEnter,
|
|
29
|
+
setRetainMessageActions,
|
|
29
30
|
renderSecondaryActions,
|
|
30
31
|
customStyle,
|
|
31
32
|
customProps
|
|
@@ -112,6 +113,7 @@ export default function MessageActions(props) {
|
|
|
112
113
|
actions: allActions,
|
|
113
114
|
defaultShowCount: defaultShowCount,
|
|
114
115
|
renderMoreIcon: renderMore,
|
|
116
|
+
setRetainMessageActions: setRetainMessageActions,
|
|
115
117
|
...messageActionsWrapperProps
|
|
116
118
|
}), secondaryActions ? /*#__PURE__*/React.createElement("div", {
|
|
117
119
|
className: newStyle.secondaryActions
|
|
@@ -20,6 +20,7 @@ const messageActionsPropTypes = {
|
|
|
20
20
|
}),
|
|
21
21
|
customStyle: PropTypes.object,
|
|
22
22
|
defaultShowCount: PropTypes.number,
|
|
23
|
-
renderSecondaryActions: PropTypes.func
|
|
23
|
+
renderSecondaryActions: PropTypes.func,
|
|
24
|
+
setRetainMessageActions: PropTypes.func
|
|
24
25
|
};
|
|
25
26
|
export default messageActionsPropTypes;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import React, { useCallback, useMemo } from 'react';
|
|
3
3
|
/** ** Components *** */
|
|
4
4
|
|
|
5
|
-
import Popup from '@zohodesk/components/
|
|
6
|
-
import DropBox from '@zohodesk/components/
|
|
5
|
+
import Popup from '@zohodesk/components/lib/Popup/Popup';
|
|
6
|
+
import DropBox from '@zohodesk/components/lib/DropBox/DropBox';
|
|
7
7
|
/** ** Constants *** */
|
|
8
8
|
|
|
9
9
|
import messageActionsMoreDefaultProps from "./props/defaultProps";
|
|
@@ -25,6 +25,7 @@ function MessageActionsMoreComp(props) {
|
|
|
25
25
|
actions,
|
|
26
26
|
renderMoreIcon,
|
|
27
27
|
customStyle,
|
|
28
|
+
setRetainMessageActions,
|
|
28
29
|
popupSize,
|
|
29
30
|
defaultPopupPosition,
|
|
30
31
|
|
|
@@ -66,9 +67,10 @@ function MessageActionsMoreComp(props) {
|
|
|
66
67
|
id,
|
|
67
68
|
isShowInMore: true,
|
|
68
69
|
action,
|
|
70
|
+
setRetainMessageActions,
|
|
69
71
|
closePopup: closePopupOnly
|
|
70
72
|
}); // id, isRenderInMorePopup
|
|
71
|
-
}), [actions, closePopupOnly]);
|
|
73
|
+
}), [actions, closePopupOnly, setRetainMessageActions]);
|
|
72
74
|
const isRenderPopup = !!(moreIcon && isPopupOpen);
|
|
73
75
|
return /*#__PURE__*/React.createElement("span", {
|
|
74
76
|
className: newStyle.morePopupContainer
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
/** ** Constants *** */
|
|
4
|
-
|
|
5
|
-
import { popupPosition, popupSize } from "../../constants/propConstants/popupPropConstants";
|
|
6
3
|
const messageActionsMorePropTypes = {
|
|
7
4
|
actions: PropTypes.arrayOf(PropTypes.shape({
|
|
8
5
|
id: PropTypes.string.isRequired,
|
|
9
6
|
renderFunction: PropTypes.func
|
|
10
7
|
})).isRequired,
|
|
11
8
|
renderMoreIcon: PropTypes.func.isRequired,
|
|
9
|
+
setRetainMessageActions: PropTypes.func,
|
|
12
10
|
customStyle: PropTypes.object,
|
|
13
|
-
popupSize: PropTypes.oneOf(
|
|
14
|
-
defaultPopupPosition: PropTypes.oneOf(
|
|
11
|
+
popupSize: PropTypes.oneOf(['mini', 'xmini', 'xsmall', 'small', 'medium', 'large', 'mlarge', 'xlarge', 'xxlarge', 'default']),
|
|
12
|
+
defaultPopupPosition: PropTypes.oneOf([['bottomCenter', 'bottomLeftToRight', 'bottomCenterToRight', 'bottomRightToLeft', 'bottomCenterToLeft', 'topCenter', 'topLeftToRight', 'topCenterToRight', 'topRightToLeft', 'topCenterToLeft', 'rightTopToBottom', 'rightCenterToBottom', 'rightCenter', 'rightBottomToTop', 'rightCenterToTop', 'leftTopToBottom', 'leftCenterToBottom', 'leftCenter', 'leftBottomToTop', 'leftCenterToTop', 'bottomRight', 'bottomLeft', 'topRight', 'topLeft', 'rightBottom', 'rightTop', 'leftBottom', 'leftTop']])
|
|
15
13
|
};
|
|
16
14
|
export default messageActionsMorePropTypes;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
/** ** Components *** */
|
|
4
4
|
|
|
5
|
-
import { Container } from '@zohodesk/components/
|
|
5
|
+
import { Container } from '@zohodesk/components/lib/Layout';
|
|
6
6
|
import MessageActionsMore from "../MessageActionsMore/MessageActionsMore";
|
|
7
7
|
/** ** Hooks *** */
|
|
8
8
|
|
|
@@ -25,7 +25,8 @@ export default function MessageActionsWrapper(props) {
|
|
|
25
25
|
renderMoreIcon,
|
|
26
26
|
defaultShowCount,
|
|
27
27
|
customStyle,
|
|
28
|
-
customProps
|
|
28
|
+
customProps,
|
|
29
|
+
setRetainMessageActions
|
|
29
30
|
} = props;
|
|
30
31
|
const {
|
|
31
32
|
messageActionsMoreProps = dummyObject
|
|
@@ -46,14 +47,16 @@ export default function MessageActionsWrapper(props) {
|
|
|
46
47
|
return renderHandler(renderFunction)({
|
|
47
48
|
id,
|
|
48
49
|
isShowInMore: false,
|
|
50
|
+
setRetainMessageActions,
|
|
49
51
|
action
|
|
50
52
|
}); // id, isRenderInMorePopup
|
|
51
|
-
}), [defaultActions]);
|
|
53
|
+
}), [defaultActions, setRetainMessageActions]);
|
|
52
54
|
const renderMoreActions = useCallback(() => /*#__PURE__*/React.createElement(MessageActionsMore, {
|
|
53
55
|
actions: moreActions,
|
|
54
56
|
renderMoreIcon: renderMoreIcon,
|
|
57
|
+
setRetainMessageActions: setRetainMessageActions,
|
|
55
58
|
...messageActionsMoreProps
|
|
56
|
-
}), [moreActions, renderMoreIcon, messageActionsMoreProps]);
|
|
59
|
+
}), [moreActions, renderMoreIcon, messageActionsMoreProps, setRetainMessageActions]);
|
|
57
60
|
const renderRow = useCallback(() => /*#__PURE__*/React.createElement(Container, {
|
|
58
61
|
alignBox: "row",
|
|
59
62
|
className: newStyle.row,
|
|
@@ -10,6 +10,7 @@ const messageActionsWrapperPropTypes = {
|
|
|
10
10
|
}),
|
|
11
11
|
customStyle: PropTypes.object,
|
|
12
12
|
defaultShowCount: PropTypes.number,
|
|
13
|
-
renderMoreIcon: PropTypes.func
|
|
13
|
+
renderMoreIcon: PropTypes.func,
|
|
14
|
+
setRetainMessageActions: PropTypes.func
|
|
14
15
|
};
|
|
15
16
|
export default messageActionsWrapperPropTypes;
|
|
@@ -12,6 +12,7 @@ const messageBubblePropTypes = {
|
|
|
12
12
|
needSender: PropTypes.bool,
|
|
13
13
|
renderMessageActions: PropTypes.func,
|
|
14
14
|
renderMessageBoxFooter: PropTypes.func,
|
|
15
|
-
renderMessageOwner: PropTypes.func
|
|
15
|
+
renderMessageOwner: PropTypes.func,
|
|
16
|
+
retainMessageActions: PropTypes.bool
|
|
16
17
|
};
|
|
17
18
|
export default messageBubblePropTypes;
|
package/es/Theme/ThemeAssets.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import '@zohodesk/components/
|
|
3
|
+
import '@zohodesk/components/lib/common/boxShadow.module.css';
|
|
4
4
|
/* component pkg - default mode, themes */
|
|
5
5
|
|
|
6
6
|
import '@zohodesk/components/assets/Appearance/light/themes/blue/blue_CTA_LightTheme.module.css';
|
|
@@ -64,7 +64,7 @@ import '@zohodesk/variables/assets/colorVariables.module.css';
|
|
|
64
64
|
import '@zohodesk/variables/assets/dotVariables.module.css';
|
|
65
65
|
import '@zohodesk/variables/assets/sizeVariables.module.css';
|
|
66
66
|
import '@zohodesk/variables/assets/fontsizeVariables.module.css';
|
|
67
|
-
import '@zohodesk/variables/
|
|
67
|
+
import '@zohodesk/variables/lib/fontFamilyVariables.module.css';
|
|
68
68
|
import '@zohodesk/variables/assets/transitionVariables.module.css';
|
|
69
69
|
import '@zohodesk/variables/assets/no_transitionVariables.module.css';
|
|
70
70
|
export default function DeskAssets(props) {
|
package/es/Theme/ThemeWrapper.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import React, { useMemo, useCallback } from 'react';
|
|
3
|
-
/** ** Providers *** */
|
|
4
|
-
|
|
5
|
-
import ThemeContext from '@zohoim/chat-components-hooks/es/Theme/ThemeContext';
|
|
6
3
|
/** ** Constants *** */
|
|
7
4
|
|
|
8
5
|
import themeWrapperPropTypes from "./props/propTypes";
|
|
9
6
|
import themeWrapperDefaultProps from "./props/defaultProps";
|
|
10
|
-
import { styleTagId } from
|
|
11
|
-
import { MSG_ACTION_POPUP_PORTAL
|
|
7
|
+
import { styleTagId } from "./constants";
|
|
8
|
+
import { MSG_ACTION_POPUP_PORTAL } from "../constants";
|
|
12
9
|
/** ** Components *** */
|
|
13
10
|
|
|
14
11
|
import ThemeAssets from "./ThemeAssets";
|
|
@@ -32,8 +29,7 @@ export default function ThemeWrapper(props) {
|
|
|
32
29
|
theme: propTheme,
|
|
33
30
|
modeKey,
|
|
34
31
|
themeKey,
|
|
35
|
-
tooltipCustomStyle
|
|
36
|
-
direction
|
|
32
|
+
tooltipCustomStyle
|
|
37
33
|
} = props;
|
|
38
34
|
/** ** containerRef for Tooltip *** */
|
|
39
35
|
|
|
@@ -64,11 +60,9 @@ export default function ThemeWrapper(props) {
|
|
|
64
60
|
});
|
|
65
61
|
/** ** Children Render Functions *** */
|
|
66
62
|
|
|
67
|
-
const renderPortal = useCallback(() => /*#__PURE__*/React.createElement(
|
|
63
|
+
const renderPortal = useCallback(() => /*#__PURE__*/React.createElement("div", {
|
|
68
64
|
"data-portal": MSG_ACTION_POPUP_PORTAL
|
|
69
|
-
}),
|
|
70
|
-
"data-portal": EDITOR_POPUP_PORTAL
|
|
71
|
-
})), []);
|
|
65
|
+
}), []);
|
|
72
66
|
const renderStyle = useCallback(() => /*#__PURE__*/React.createElement("style", {
|
|
73
67
|
id: "zoho-im-variables"
|
|
74
68
|
}, `${selector}{${customizedVariables}}`), [selector, customizedVariables]);
|
|
@@ -77,12 +71,7 @@ export default function ThemeWrapper(props) {
|
|
|
77
71
|
customStyle: tooltipCustomStyle,
|
|
78
72
|
getContainerRef: getContainerRef
|
|
79
73
|
}) : null), [getContainerRef, needTooltip, needThemeAssets, tooltipCustomStyle]);
|
|
80
|
-
return /*#__PURE__*/React.createElement(
|
|
81
|
-
value: {
|
|
82
|
-
mode: propMode,
|
|
83
|
-
direction
|
|
84
|
-
}
|
|
85
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
86
75
|
id: styleTagId,
|
|
87
76
|
...wrapperDivProps,
|
|
88
77
|
style: {
|
|
@@ -91,7 +80,7 @@ export default function ThemeWrapper(props) {
|
|
|
91
80
|
}
|
|
92
81
|
}, renderStyle(), /*#__PURE__*/React.createElement(Container, {
|
|
93
82
|
eleRef: containerRef
|
|
94
|
-
}, children), renderPortal(), renderAssets())
|
|
83
|
+
}, children), renderPortal(), renderAssets());
|
|
95
84
|
}
|
|
96
85
|
ThemeWrapper.propTypes = themeWrapperPropTypes;
|
|
97
86
|
ThemeWrapper.defaultProps = themeWrapperDefaultProps;
|
|
@@ -9,7 +9,7 @@ import Tooltip from '@zohodesk/components/es/Tooltip/Tooltip';
|
|
|
9
9
|
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
10
10
|
/** ** Methods *** */
|
|
11
11
|
|
|
12
|
-
import { setLibraryConfig, getLibraryConfig } from '@zohodesk/components/
|
|
12
|
+
import { setLibraryConfig, getLibraryConfig } from '@zohodesk/components/lib/Provider/Config';
|
|
13
13
|
/** ** Constants *** */
|
|
14
14
|
|
|
15
15
|
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export const styleTagId = 'im-chat-components';
|
|
2
|
+
export const baseUnitLimit = {
|
|
3
|
+
size: {
|
|
4
|
+
base: 16,
|
|
5
|
+
unit: '1rem',
|
|
6
|
+
limit: 500
|
|
7
|
+
},
|
|
8
|
+
fontSize: {
|
|
9
|
+
base: 1,
|
|
10
|
+
unit: '1px',
|
|
11
|
+
limit: 20
|
|
12
|
+
},
|
|
13
|
+
transition: {
|
|
14
|
+
base: 1,
|
|
15
|
+
unit: 's',
|
|
16
|
+
limit: 20
|
|
17
|
+
},
|
|
18
|
+
motionTransition: {
|
|
19
|
+
base: 1,
|
|
20
|
+
unit: 'ms',
|
|
21
|
+
limit: 20
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export const modeConstants = {
|
|
25
|
+
LIGHT: 'LIGHT',
|
|
26
|
+
DARK: 'DARK',
|
|
27
|
+
PURE_DARK: 'PURE_DARK'
|
|
28
|
+
};
|
|
29
|
+
export const themeConstants = {
|
|
30
|
+
BLUE: 'BLUE',
|
|
31
|
+
GREEN: 'GREEN',
|
|
32
|
+
ORANGE: 'ORANGE',
|
|
33
|
+
RED: 'RED',
|
|
34
|
+
YELLOW: 'YELLOW',
|
|
35
|
+
BLUE_FAN: 'BLUE_FAN',
|
|
36
|
+
DARK_BLUE: 'DARK_BLUE',
|
|
37
|
+
DARK_GREY: 'DARK_GREY',
|
|
38
|
+
PINK: 'PINK',
|
|
39
|
+
WHITE: 'WHITE',
|
|
40
|
+
TEAL: 'TEAL'
|
|
41
|
+
};
|
|
@@ -9,7 +9,6 @@ const themeWrapperPropTypes = {
|
|
|
9
9
|
needTooltip: PropTypes.bool,
|
|
10
10
|
themeConfigurations: PropTypes.object,
|
|
11
11
|
themeKey: PropTypes.string,
|
|
12
|
-
tooltipCustomStyle: PropTypes.object
|
|
13
|
-
direction: PropTypes.oneOf(['ltr', 'rtl'])
|
|
12
|
+
tooltipCustomStyle: PropTypes.object
|
|
14
13
|
};
|
|
15
14
|
export default themeWrapperPropTypes;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryBlue, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryBlue, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor } from "./commonColorVariable";
|
|
3
3
|
import { imIntegrationIcon, imTtIcon, messagetextColor } from "../commonThemeColorVariable";
|
|
4
4
|
export default {
|
|
5
5
|
library: 'chat_components',
|
|
@@ -111,23 +111,6 @@ export default {
|
|
|
111
111
|
videoBubble: {
|
|
112
112
|
border_color: '#2d3748',
|
|
113
113
|
border_color_failed: failedBdr
|
|
114
|
-
},
|
|
115
|
-
emojiFooter: {
|
|
116
|
-
tabLine: primaryBlue,
|
|
117
|
-
border_color: '#2d3748'
|
|
118
|
-
},
|
|
119
|
-
replyEditor,
|
|
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
114
|
}
|
|
132
115
|
}
|
|
133
116
|
};
|
|
@@ -13,23 +13,4 @@ export const failedBg = '#f6dcdf';
|
|
|
13
13
|
export const failedBdr = '#eb9ea7';
|
|
14
14
|
export const failedLine = '#eb9ea7';
|
|
15
15
|
export const failedColor = '#000';
|
|
16
|
-
export const failedUrlColor = '#0a73eb';
|
|
17
|
-
export const emojiPopup = {
|
|
18
|
-
bg: '#f1f4f9',
|
|
19
|
-
border: '#f1f4f9',
|
|
20
|
-
titleColor: '#aaa'
|
|
21
|
-
};
|
|
22
|
-
export const replyEditor = {
|
|
23
|
-
bg: '#242b38',
|
|
24
|
-
color: '#e2e4e6',
|
|
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'
|
|
35
|
-
};
|
|
16
|
+
export const failedUrlColor = '#0a73eb';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryGreen, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryGreen, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor } from "./commonColorVariable";
|
|
3
3
|
import { imIntegrationIcon, imTtIcon, messagetextColor } from "../commonThemeColorVariable";
|
|
4
4
|
export default {
|
|
5
5
|
library: 'chat_components',
|
|
@@ -110,23 +110,6 @@ export default {
|
|
|
110
110
|
videoBubble: {
|
|
111
111
|
border_color: '#2d3748',
|
|
112
112
|
border_color_failed: failedBdr
|
|
113
|
-
},
|
|
114
|
-
emojiFooter: {
|
|
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
113
|
}
|
|
131
114
|
}
|
|
132
115
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryOrange, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryOrange, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor } from "./commonColorVariable";
|
|
3
3
|
import { imIntegrationIcon, imTtIcon, messagetextColor } from "../commonThemeColorVariable";
|
|
4
4
|
export default {
|
|
5
5
|
library: 'chat_components',
|
|
@@ -110,23 +110,6 @@ export default {
|
|
|
110
110
|
videoBubble: {
|
|
111
111
|
border_color: '#2d3748',
|
|
112
112
|
border_color_failed: failedBdr
|
|
113
|
-
},
|
|
114
|
-
emojiFooter: {
|
|
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
113
|
}
|
|
131
114
|
}
|
|
132
115
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryRed, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryRed, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor } from "./commonColorVariable";
|
|
3
3
|
import { imIntegrationIcon, imTtIcon, messagetextColor } from "../commonThemeColorVariable";
|
|
4
4
|
export default {
|
|
5
5
|
library: 'chat_components',
|
|
@@ -110,23 +110,6 @@ export default {
|
|
|
110
110
|
videoBubble: {
|
|
111
111
|
border_color: 'hsl(258.46deg 12.62% 23.2%)',
|
|
112
112
|
border_color_failed: failedBdr
|
|
113
|
-
},
|
|
114
|
-
emojiFooter: {
|
|
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
113
|
}
|
|
131
114
|
}
|
|
132
115
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryYellow, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryYellow, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor } from "./commonColorVariable";
|
|
3
3
|
import { imIntegrationIcon, imTtIcon, messagetextColor } from "../commonThemeColorVariable";
|
|
4
4
|
export default {
|
|
5
5
|
library: 'chat_components',
|
|
@@ -110,23 +110,6 @@ export default {
|
|
|
110
110
|
videoBubble: {
|
|
111
111
|
border_color: '#2d3748',
|
|
112
112
|
border_color_failed: failedBdr
|
|
113
|
-
},
|
|
114
|
-
emojiFooter: {
|
|
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
113
|
}
|
|
131
114
|
}
|
|
132
115
|
};
|
|
@@ -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
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messagetextColor, primaryBlue, white, black, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, imIntegrationIcon, imTtIcon } from "./commonColorVariable";
|
|
3
3
|
export default {
|
|
4
4
|
library: 'chat_components',
|
|
5
5
|
variables: {
|
|
@@ -109,27 +109,6 @@ export default {
|
|
|
109
109
|
videoBubble: {
|
|
110
110
|
border_color: '#ebf0f5',
|
|
111
111
|
border_color_failed: failedBdr
|
|
112
|
-
},
|
|
113
|
-
emoji: {
|
|
114
|
-
active_bg_color: 'red',
|
|
115
|
-
hover_bg_color: 'green'
|
|
116
|
-
},
|
|
117
|
-
replyEditor,
|
|
118
|
-
emojiPopup: { ...emojiPopup,
|
|
119
|
-
ttIcon_path1_color: 'rgba(200, 203, 220, 0.7)',
|
|
120
|
-
ttIcon_path2_color: 'var(--dot_black)'
|
|
121
|
-
},
|
|
122
|
-
emojiFooter: {
|
|
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'
|
|
133
112
|
}
|
|
134
113
|
}
|
|
135
114
|
};
|
|
@@ -32,23 +32,4 @@ export const imIntegrationIcon = {
|
|
|
32
32
|
export const imTtIcon = {
|
|
33
33
|
path0_color: 'rgba(200,203,220,0.7)',
|
|
34
34
|
path1_color: '#000'
|
|
35
|
-
};
|
|
36
|
-
export const replyEditor = {
|
|
37
|
-
bg: '#fff',
|
|
38
|
-
color: '#000',
|
|
39
|
-
placeholder: '#c8cbdc'
|
|
40
|
-
};
|
|
41
|
-
export const emojiPopup = {
|
|
42
|
-
bg: '#f1f4f9',
|
|
43
|
-
border: '#f1f4f9',
|
|
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'
|
|
54
35
|
};
|
|
@@ -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
|
|
2
|
+
import { incomingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messagetextColor, primaryGreen, white, black, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, imIntegrationIcon, imTtIcon } from "./commonColorVariable";
|
|
3
3
|
export default {
|
|
4
4
|
library: 'chat_components',
|
|
5
5
|
variables: {
|
|
@@ -109,23 +109,6 @@ export default {
|
|
|
109
109
|
videoBubble: {
|
|
110
110
|
border_color: '#ebf0f5',
|
|
111
111
|
border_color_failed: failedBdr
|
|
112
|
-
},
|
|
113
|
-
emojiFooter: {
|
|
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)'
|
|
129
112
|
}
|
|
130
113
|
}
|
|
131
114
|
};
|