@zohoim/chat-components 1.0.9-beta.3 → 1.0.9-beta.4
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/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 -112
- package/es/AttachmentPreview/css/AttachmentPreview.module.css +0 -39
- package/es/AttachmentPreview/index.js +0 -1
- package/es/AttachmentPreview/props/defaultProps.js +0 -7
- package/es/AttachmentPreview/props/propTypes.js +0 -31
- package/es/AttachmentPreviewBody/AttachmentPreviewBody.js +0 -81
- package/es/AttachmentPreviewBody/css/AttachmentPreviewBody.module.css +0 -70
- 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 -81
- 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 -133
- 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 -137
- package/es/im/ReplyComposer/css/ReplyComposer.module.css +0 -5
- 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 -42
- 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 -87
- 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 -20
- 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 -19
- 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/es/rte/Editor/Editor.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/** ** Libraries *** */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
/** ** Hooks *** */
|
|
4
|
-
|
|
5
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
6
|
-
import useEditor from '@zohoim/chat-components-hooks/es/rte/Editor/useEditor';
|
|
7
|
-
/** ** Constants *** */
|
|
8
|
-
|
|
9
|
-
import editorDefaultProps from "./props/defaultProps";
|
|
10
|
-
import editorPropTypes from "./props/propTypes";
|
|
11
|
-
import { defaultEditorURL } from "../../constants";
|
|
12
|
-
/** ** Styles *** */
|
|
13
|
-
|
|
14
|
-
import style from "./css/Editor.module.css";
|
|
15
|
-
export default function Editor(props) {
|
|
16
|
-
const {
|
|
17
|
-
customStyle,
|
|
18
|
-
id,
|
|
19
|
-
EDITORURL = defaultEditorURL,
|
|
20
|
-
content,
|
|
21
|
-
placeHolder,
|
|
22
|
-
isHTMLContent,
|
|
23
|
-
menuBarProps,
|
|
24
|
-
formats,
|
|
25
|
-
features,
|
|
26
|
-
needAutoFocus,
|
|
27
|
-
isReadOnly,
|
|
28
|
-
insertContentDetails,
|
|
29
|
-
customOptions,
|
|
30
|
-
onReadyCallback,
|
|
31
|
-
onErrorCallback,
|
|
32
|
-
onChange,
|
|
33
|
-
onKeyDown,
|
|
34
|
-
onPaste,
|
|
35
|
-
langCode,
|
|
36
|
-
appearance,
|
|
37
|
-
isRTL,
|
|
38
|
-
handlers,
|
|
39
|
-
domId: propDomId
|
|
40
|
-
} = props;
|
|
41
|
-
/* External CSS Customization */
|
|
42
|
-
|
|
43
|
-
const newStyle = useMergeStyle(style, customStyle);
|
|
44
|
-
const {
|
|
45
|
-
domId
|
|
46
|
-
} = useEditor({
|
|
47
|
-
id,
|
|
48
|
-
EDITORURL,
|
|
49
|
-
content,
|
|
50
|
-
placeHolder,
|
|
51
|
-
isHTMLContent,
|
|
52
|
-
menuBarProps,
|
|
53
|
-
formats,
|
|
54
|
-
className: newStyle.editableDiv,
|
|
55
|
-
features,
|
|
56
|
-
needAutoFocus,
|
|
57
|
-
isReadOnly,
|
|
58
|
-
insertContentDetails,
|
|
59
|
-
customOptions,
|
|
60
|
-
onReadyCallback,
|
|
61
|
-
onErrorCallback,
|
|
62
|
-
onChange,
|
|
63
|
-
onKeyDown,
|
|
64
|
-
onPaste,
|
|
65
|
-
langCode,
|
|
66
|
-
appearance,
|
|
67
|
-
isRTL,
|
|
68
|
-
handlers,
|
|
69
|
-
domId: propDomId
|
|
70
|
-
});
|
|
71
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
72
|
-
className: newStyle.editorWrapper
|
|
73
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
className: newStyle.editor,
|
|
75
|
-
id: domId
|
|
76
|
-
}));
|
|
77
|
-
}
|
|
78
|
-
Editor.propTypes = editorPropTypes;
|
|
79
|
-
Editor.defaultProps = editorDefaultProps;
|
|
80
|
-
Editor.displayName = 'Editor';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
.editorWrapper {
|
|
2
|
-
/* Use this class for css customisation */
|
|
3
|
-
/* max-height: 160px !important; */
|
|
4
|
-
padding: var(--zd_size16) ;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.editor {
|
|
8
|
-
/* Use this class for css customisation */
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.editableDiv {
|
|
12
|
-
/* Use this class for css customisation */
|
|
13
|
-
min-height: var(--zd_size120) !important;
|
|
14
|
-
max-height: var(--zd_size120) !important;
|
|
15
|
-
overflow: auto !important;
|
|
16
|
-
font-size: var(--zd_font_size14) !important;
|
|
17
|
-
font-family: var(--zd_regular) !important;
|
|
18
|
-
padding: 0 !important;
|
|
19
|
-
}
|
package/es/rte/Editor/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Editor } from "./Editor";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/** ** Constants *** */
|
|
2
|
-
import { dummyArray, dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
3
|
-
const editorDefaultProps = {
|
|
4
|
-
customStyle: dummyObject,
|
|
5
|
-
id: 'Editor',
|
|
6
|
-
placeHolder: ' ',
|
|
7
|
-
isHTMLContent: false,
|
|
8
|
-
needAutoFocus: true,
|
|
9
|
-
isReadOnly: false,
|
|
10
|
-
isRTL: false,
|
|
11
|
-
langCode: 'en_US',
|
|
12
|
-
menuBarProps: dummyObject,
|
|
13
|
-
appearance: dummyObject,
|
|
14
|
-
features: dummyArray,
|
|
15
|
-
formats: dummyArray,
|
|
16
|
-
handlers: {
|
|
17
|
-
needIDReRender: true,
|
|
18
|
-
needContentUpdate: true
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
export default editorDefaultProps;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/** ** Libraries *** */
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
/** ** Constants *** */
|
|
4
|
-
|
|
5
|
-
import { modeConstants } from '@zohoim/chat-components-utils/es/constants/themeConstants';
|
|
6
|
-
import { features, formats, langCode } from "../../../constants/propConstants/editorPropConstants";
|
|
7
|
-
const editorPropTypes = {
|
|
8
|
-
id: PropTypes.string.isRequired,
|
|
9
|
-
domId: PropTypes.string,
|
|
10
|
-
content: PropTypes.string.isRequired,
|
|
11
|
-
EDITORURL: PropTypes.string.isRequired,
|
|
12
|
-
placeHolder: PropTypes.string,
|
|
13
|
-
customStyle: PropTypes.object,
|
|
14
|
-
isHTMLContent: PropTypes.bool,
|
|
15
|
-
appearance: PropTypes.shape({
|
|
16
|
-
mode: PropTypes.oneOf([modeConstants.LIGHT, modeConstants.DARK, modeConstants.PURE_DARK]).isRequired,
|
|
17
|
-
themeVariables: PropTypes.object
|
|
18
|
-
}),
|
|
19
|
-
// Editor Options - Refer the learn document (Override the options)
|
|
20
|
-
customOptions: PropTypes.object,
|
|
21
|
-
menuBarProps: PropTypes.shape({
|
|
22
|
-
isShow: PropTypes.bool.isRequired,
|
|
23
|
-
groupLength: PropTypes.number,
|
|
24
|
-
order: PropTypes.arrayOf(PropTypes.oneOf([...formats, ...features])),
|
|
25
|
-
position: PropTypes.oneOf(['top', 'bottom']),
|
|
26
|
-
responsive: PropTypes.bool,
|
|
27
|
-
tooltip: PropTypes.bool
|
|
28
|
-
}),
|
|
29
|
-
features: PropTypes.arrayOf(PropTypes.oneOf(features)),
|
|
30
|
-
formats: PropTypes.arrayOf(PropTypes.oneOf(formats)),
|
|
31
|
-
needAutoFocus: PropTypes.bool,
|
|
32
|
-
isReadOnly: PropTypes.bool,
|
|
33
|
-
isRTL: PropTypes.bool,
|
|
34
|
-
langCode: PropTypes.oneOf(langCode),
|
|
35
|
-
insertContentDetails: PropTypes.shape({
|
|
36
|
-
content: PropTypes.string.isRequired,
|
|
37
|
-
range: PropTypes.shape({
|
|
38
|
-
from: PropTypes.number,
|
|
39
|
-
to: PropTypes.number
|
|
40
|
-
})
|
|
41
|
-
}),
|
|
42
|
-
onChange: PropTypes.func,
|
|
43
|
-
onPaste: PropTypes.func,
|
|
44
|
-
onKeyDown: PropTypes.func,
|
|
45
|
-
onReadyCallback: PropTypes.func,
|
|
46
|
-
onErrorCallback: PropTypes.func,
|
|
47
|
-
handlers: PropTypes.shape({
|
|
48
|
-
needContentUpdate: PropTypes.bool,
|
|
49
|
-
needIDReRender: PropTypes.bool
|
|
50
|
-
})
|
|
51
|
-
};
|
|
52
|
-
export default editorPropTypes;
|
package/es/rte/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Editor";
|