@zohoim/chat-components 1.0.9-beta.6 → 1.0.9-beta.7
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 +0 -5
- package/es/AttachmentHandler/AttachmentHandler.js +84 -0
- package/es/AttachmentHandler/css/AttachmentHandler.module.css +27 -0
- package/es/AttachmentHandler/index.js +1 -0
- package/es/AttachmentHandler/props/defaultProps.js +10 -0
- package/es/AttachmentHandler/props/propTypes.js +17 -0
- package/es/AttachmentPreview/AttachmentPreview.js +121 -0
- package/es/AttachmentPreview/css/AttachmentPreview.module.css +39 -0
- package/es/AttachmentPreview/index.js +1 -0
- package/es/AttachmentPreview/props/defaultProps.js +9 -0
- package/es/AttachmentPreview/props/propTypes.js +33 -0
- package/es/AttachmentPreviewBody/AttachmentPreviewBody.js +97 -0
- package/es/AttachmentPreviewBody/css/AttachmentPreviewBody.module.css +74 -0
- package/es/AttachmentPreviewBody/index.js +1 -0
- package/es/AttachmentPreviewBody/props/defaultProps.js +7 -0
- package/es/AttachmentPreviewBody/props/propTypes.js +20 -0
- package/es/AttachmentPreviewHeader/AttachmentPreviewHeader.js +84 -0
- package/es/AttachmentPreviewHeader/css/AttachmentPreviewHeader.module.css +47 -0
- package/es/AttachmentPreviewHeader/index.js +1 -0
- package/es/AttachmentPreviewHeader/props/defaultProps.js +7 -0
- package/es/AttachmentPreviewHeader/props/propTypes.js +16 -0
- package/es/Emoji/Emoji.js +72 -0
- package/es/Emoji/css/Emoji.module.css +48 -0
- package/es/Emoji/css/cssJSLogic.js +18 -0
- package/es/Emoji/index.js +1 -0
- package/es/Emoji/props/defaultProps.js +8 -0
- package/es/Emoji/props/propTypes.js +16 -0
- package/es/EmojiPopup/EmojiPopup.js +116 -0
- package/es/EmojiPopup/css/EmojiPopup.module.css +55 -0
- package/es/EmojiPopup/index.js +1 -0
- package/es/EmojiPopup/props/defaultProps.js +11 -0
- package/es/EmojiPopup/props/propTypes.js +21 -0
- package/es/Emojis/Emojis.js +79 -0
- package/es/Emojis/index.js +1 -0
- package/es/Emojis/props/defaultProps.js +10 -0
- package/es/Emojis/props/propTypes.js +19 -0
- package/es/EmojisEmptyState/EmojisEmptyState.js +50 -0
- package/es/EmojisEmptyState/css/EmojisEmptyState.module.css +18 -0
- package/es/EmojisEmptyState/index.js +1 -0
- package/es/EmojisEmptyState/props/defaultProps.js +9 -0
- package/es/EmojisEmptyState/props/propTypes.js +8 -0
- package/es/EmojisFooter/EmojisFooter.js +71 -0
- package/es/EmojisFooter/css/EmojisFooter.module.css +40 -0
- package/es/EmojisFooter/index.js +1 -0
- package/es/EmojisFooter/props/defaultProps.js +7 -0
- package/es/EmojisFooter/props/propTypes.js +12 -0
- package/es/EmojisHeader/EmojisHeader.js +65 -0
- package/es/EmojisHeader/css/EmojisHeader.module.css +36 -0
- package/es/EmojisHeader/index.js +1 -0
- package/es/EmojisHeader/props/defaultProps.js +8 -0
- package/es/EmojisHeader/props/propTypes.js +13 -0
- package/es/EmojisList/EmojisList.js +130 -0
- package/es/EmojisList/css/EmojisList.module.css +50 -0
- package/es/EmojisList/css/cssJSLogic.js +25 -0
- package/es/EmojisList/index.js +1 -0
- package/es/EmojisList/props/defaultProps.js +10 -0
- package/es/EmojisList/props/propTypes.js +20 -0
- package/es/Message/Message.js +2 -8
- package/es/MessageActions/MessageActions.js +0 -2
- package/es/MessageActions/props/propTypes.js +1 -2
- package/es/MessageActionsMore/MessageActionsMore.js +3 -5
- package/es/MessageActionsMore/props/propTypes.js +5 -3
- package/es/MessageActionsWrapper/MessageActionsWrapper.js +4 -7
- package/es/MessageActionsWrapper/props/propTypes.js +1 -2
- package/es/MessageBubble/css/MessageBubble.module.css +7 -0
- package/es/MessageBubble/props/defaultProps.js +1 -2
- package/es/MessageBubble/props/propTypes.js +1 -2
- package/es/Theme/ThemeAssets.js +2 -2
- package/es/Theme/ThemeWrapper.js +18 -7
- package/es/Theme/TooltipWrapper.js +1 -1
- package/es/Theme/props/defaultProps.js +2 -1
- package/es/Theme/props/propTypes.js +2 -1
- package/es/Theme/themeVariables/dark/blueTheme.js +18 -1
- package/es/Theme/themeVariables/dark/commonColorVariable.js +20 -1
- package/es/Theme/themeVariables/dark/greenTheme.js +18 -1
- package/es/Theme/themeVariables/dark/orangeTheme.js +18 -1
- package/es/Theme/themeVariables/dark/redTheme.js +18 -1
- package/es/Theme/themeVariables/dark/yellowTheme.js +18 -1
- package/es/Theme/themeVariables/light/blueTheme.js +22 -1
- package/es/Theme/themeVariables/light/commonColorVariable.js +19 -0
- package/es/Theme/themeVariables/light/greenTheme.js +18 -1
- package/es/Theme/themeVariables/light/orangeTheme.js +18 -1
- package/es/Theme/themeVariables/light/redTheme.js +18 -1
- package/es/Theme/themeVariables/light/yellowTheme.js +18 -1
- package/es/Theme/themeVariables/pureDark/blueTheme.js +18 -1
- package/es/Theme/themeVariables/pureDark/commonColorVariable.js +20 -1
- package/es/Theme/themeVariables/pureDark/greenTheme.js +18 -1
- package/es/Theme/themeVariables/pureDark/orangeTheme.js +18 -1
- package/es/Theme/themeVariables/pureDark/redTheme.js +18 -1
- package/es/Theme/themeVariables/pureDark/yellowTheme.js +18 -1
- package/es/Theme/utils/getThemeConfigurations.js +1 -1
- package/es/constants/index.js +7 -1
- package/es/constants/propConstants/editorPropConstants.js +3 -0
- package/es/constants/propConstants/popupPropConstants.js +2 -0
- package/es/im/IMAttachmentHandler/IMAttachmentHandler.js +50 -0
- package/es/im/IMAttachmentHandler/index.js +1 -0
- package/es/im/IMAttachmentHandler/props/defaultProps.js +10 -0
- package/es/im/IMAttachmentHandler/props/propTypes.js +28 -0
- package/es/im/ReplyComposer/ReplyComposer.js +153 -0
- package/es/im/ReplyComposer/css/ReplyComposer.module.css +10 -0
- package/es/im/ReplyComposer/css/cssJSLogic.js +13 -0
- package/es/im/ReplyComposer/index.js +1 -0
- package/es/im/ReplyComposer/props/defaultProps.js +7 -0
- package/es/im/ReplyComposer/props/propTypes.js +60 -0
- package/es/im/ReplyComposerFooter/ReplyComposerFooter.js +41 -0
- package/es/im/ReplyComposerFooter/css/ReplyComposerFooter.module.css +10 -0
- package/es/im/ReplyComposerFooter/index.js +1 -0
- package/es/im/ReplyComposerFooter/props/defaultProps.js +8 -0
- package/es/im/ReplyComposerFooter/props/propTypes.js +17 -0
- package/es/im/ReplyEditor/ReplyEditor.js +103 -0
- package/es/im/ReplyEditor/css/ReplyEditor.module.css +48 -0
- package/es/im/ReplyEditor/css/cssJSLogic.js +10 -0
- package/es/im/ReplyEditor/index.js +1 -0
- package/es/im/ReplyEditor/props/defaultProps.js +8 -0
- package/es/im/ReplyEditor/props/propTypes.js +27 -0
- package/es/im/ReplyEditorExtensions/ReplyEditorExtensions.js +149 -0
- package/es/im/ReplyEditorExtensions/css/ReplyEditorExtensions.module.css +5 -0
- package/es/im/ReplyEditorExtensions/index.js +1 -0
- package/es/im/ReplyEditorExtensions/props/defaultProps.js +6 -0
- package/es/im/ReplyEditorExtensions/props/propTypes.js +16 -0
- package/es/im/ReplyEditorSuggestions/ReplyEditorSuggestions.js +93 -0
- package/es/im/ReplyEditorSuggestions/css/ReplyEditorSuggestions.module.css +8 -0
- package/es/im/ReplyEditorSuggestions/index.js +1 -0
- package/es/im/ReplyEditorSuggestions/props/defaultProps.js +6 -0
- package/es/im/ReplyEditorSuggestions/props/propTypes.js +21 -0
- package/es/im/ReplyEditorSuggestionsPopup/ReplyEditorSuggestionsPopup.js +91 -0
- package/es/im/ReplyEditorSuggestionsPopup/css/ReplyEditorSuggestionsPopup.module.css +7 -0
- package/es/im/ReplyEditorSuggestionsPopup/index.js +1 -0
- package/es/im/ReplyEditorSuggestionsPopup/props/defaultProps.js +10 -0
- package/es/im/ReplyEditorSuggestionsPopup/props/propTypes.js +21 -0
- package/es/im/index.js +8 -1
- package/es/index.js +13 -2
- package/es/rte/Editor/Editor.js +80 -0
- package/es/rte/Editor/css/Editor.module.css +17 -0
- package/es/rte/Editor/index.js +1 -0
- package/es/rte/Editor/props/defaultProps.js +21 -0
- package/es/rte/Editor/props/propTypes.js +52 -0
- package/es/rte/index.js +1 -0
- package/package.json +7 -7
- package/es/Theme/constants/index.js +0 -41
|
@@ -0,0 +1,52 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Editor";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohoim/chat-components",
|
|
3
|
-
"version": "1.0.9-beta.
|
|
3
|
+
"version": "1.0.9-beta.7",
|
|
4
4
|
"description": "Chat Components",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"!**/__tests__"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zohodesk/components": "1.2.
|
|
33
|
-
"@zohodesk/hooks": "2.0.
|
|
32
|
+
"@zohodesk/components": "1.2.43",
|
|
33
|
+
"@zohodesk/hooks": "2.0.4",
|
|
34
34
|
"@zohodesk/icon": "1.3.15",
|
|
35
|
-
"@zohodesk/icons": "1.0.
|
|
35
|
+
"@zohodesk/icons": "1.0.43",
|
|
36
36
|
"@zohodesk/utils": "1.3.13",
|
|
37
37
|
"@zohodesk/variables": "1.0.0",
|
|
38
38
|
"@zohodesk/virtualizer": "1.0.13",
|
|
39
|
-
"@zohoim/chat-components-hooks": "1.0.4-beta.
|
|
40
|
-
"@zohoim/chat-components-utils": "1.0.4"
|
|
39
|
+
"@zohoim/chat-components-hooks": "1.0.4-beta.7",
|
|
40
|
+
"@zohoim/chat-components-utils": "1.0.4-beta.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@zohodesk-private/css-variable-migrator": "1.0.7",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"jsdom": "23.0.0",
|
|
46
46
|
"react-to-jsx": "1.3.2"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "44f84bf3e27cc3b76db2abc64e889ab026a258b7"
|
|
49
49
|
}
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
};
|