@zohoim/chat-components 1.1.2-beta.7 → 1.1.3-beta.1
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 +4 -0
- package/es/ActionIcon/ActionIcon.js +5 -4
- package/es/ActionIconWrapper/css/ActionIconWrapper.module.css +2 -2
- package/es/AttachmentBubble/AttachmentBubble.js +9 -8
- package/es/AttachmentBubble/css/AttachmentBubble.module.css +2 -1
- package/es/AttachmentBubbleInfo/css/AttachmentBubbleInfo.module.css +2 -2
- package/es/AttachmentHandler/AttachmentHandler.js +5 -4
- package/es/AttachmentPreview/AttachmentPreview.js +7 -7
- package/es/AttachmentPreviewBody/AttachmentPreviewBody.js +7 -7
- package/es/AttachmentPreviewHeader/AttachmentPreviewHeader.js +7 -7
- package/es/AudioBubble/AudioBubble.js +9 -8
- package/es/Emoji/Emoji.js +0 -0
- package/es/Emoji/css/Emoji.module.css +4 -4
- package/es/Emoji/css/cssJSLogic.js +0 -0
- package/es/Emoji/index.js +0 -0
- package/es/Emoji/props/defaultProps.js +0 -0
- package/es/Emoji/props/propTypes.js +0 -0
- package/es/EmojiPopup/EmojiPopup.js +9 -10
- package/es/Emojis/Emojis.js +9 -10
- package/es/Emojis/index.js +0 -0
- package/es/Emojis/props/defaultProps.js +0 -0
- package/es/Emojis/props/propTypes.js +0 -0
- package/es/EmojisEmptyState/EmojisEmptyState.js +0 -0
- package/es/EmojisEmptyState/css/EmojisEmptyState.module.css +0 -0
- package/es/EmojisEmptyState/index.js +0 -0
- package/es/EmojisEmptyState/props/defaultProps.js +0 -0
- package/es/EmojisEmptyState/props/propTypes.js +0 -0
- package/es/EmojisFooter/EmojisFooter.js +5 -4
- package/es/EmojisFooter/css/EmojisFooter.module.css +0 -0
- package/es/EmojisFooter/index.js +0 -0
- package/es/EmojisFooter/props/defaultProps.js +0 -0
- package/es/EmojisFooter/props/propTypes.js +0 -0
- package/es/EmojisHeader/EmojisHeader.js +5 -4
- package/es/EmojisHeader/css/EmojisHeader.module.css +0 -0
- package/es/EmojisHeader/index.js +0 -0
- package/es/EmojisHeader/props/defaultProps.js +0 -0
- package/es/EmojisHeader/props/propTypes.js +0 -0
- package/es/EmojisList/EmojisList.js +6 -6
- package/es/EmojisList/css/EmojisList.module.css +3 -3
- package/es/EmojisList/css/cssJSLogic.js +0 -0
- package/es/EmojisList/index.js +0 -0
- package/es/EmojisList/props/defaultProps.js +0 -0
- package/es/EmojisList/props/propTypes.js +0 -0
- package/es/ImageBubble/css/ImageBubble.module.css +1 -1
- package/es/MediaBubbleWrapper/MediaBubbleWrapper.js +6 -4
- package/es/Message/Message.js +9 -16
- package/es/MessageAction/MessageAction.js +10 -11
- package/es/MessageActions/MessageActions.js +11 -13
- package/es/MessageActionsWrapper/MessageActionsWrapper.js +5 -4
- package/es/MessageBox/css/MessageBox.module.css +5 -5
- package/es/MessageBubble/css/MessageBubble.module.css +3 -3
- package/es/MoreActionItem/css/MoreActionItem.module.css +2 -2
- package/es/ReplyBubble/ReplyBubble.js +10 -11
- package/es/Theme/ThemeWrapper.js +6 -4
- package/es/Theme/TooltipWrapper.js +5 -4
- package/es/VideoBubble/VideoBubble.js +9 -8
- package/es/icons/iconSrc/attachments/Audio.js +1 -2
- package/es/icons/iconSrc/attachments/Code.js +1 -2
- package/es/icons/iconSrc/attachments/Image.js +1 -2
- package/es/icons/iconSrc/attachments/Pdf.js +1 -2
- package/es/icons/iconSrc/attachments/Ppt.js +1 -2
- package/es/icons/iconSrc/attachments/Text.js +1 -2
- package/es/icons/iconSrc/attachments/Txt.js +1 -2
- package/es/icons/iconSrc/attachments/Unknown.js +1 -2
- package/es/icons/iconSrc/attachments/Video.js +1 -2
- package/es/icons/iconSrc/attachments/Xls.js +1 -2
- package/es/icons/iconSrc/attachments/Zip.js +1 -2
- package/es/icons/iconSrc/common/AlertTriangle.js +1 -2
- package/es/icons/iconSrc/common/Article.js +1 -2
- package/es/icons/iconSrc/common/Reply.js +1 -2
- package/es/icons/iconSrc/messageStatus/Clock.js +1 -2
- package/es/icons/iconSrc/messageStatus/DoubleTick.js +1 -2
- package/es/icons/iconSrc/messageStatus/Failed.js +1 -2
- package/es/icons/iconSrc/messageStatus/Tick.js +1 -2
- package/es/im/IMAttachmentHandler/IMAttachmentHandler.js +7 -6
- package/es/im/IMAttachmentHandler/props/propTypes.js +1 -1
- package/es/im/IMIntegrationIcon/css/IMIntegrationIcon.module.css +4 -4
- package/es/im/IMMessage/IMMessage.js +17 -20
- package/es/im/IMMessage/css/IMMessage.module.css +3 -3
- package/es/im/IMMessage/props/propTypes.js +1 -1
- package/es/im/IMMessageContent/IMMessageContent.js +18 -30
- package/es/im/IMMessageMeta/IMMessageMeta.js +5 -4
- package/es/im/IMMessageMeta/css/IMMessageMeta.module.css +3 -3
- package/es/im/IMMessageMetaInfo/css/IMMessageMetaInfo.module.css +2 -2
- package/es/im/IMReplyBubble/IMReplyBubble.js +6 -4
- package/es/im/IMTextBubble/IMTextBubble.js +6 -4
- package/es/im/ReplyComposer/ReplyComposer.js +12 -14
- package/es/im/ReplyEditor/ReplyEditor.js +5 -4
- package/es/im/ReplyEditorExtensions/ReplyEditorExtensions.js +11 -12
- package/es/im/ReplyEditorSuggestions/ReplyEditorSuggestions.js +8 -9
- package/es/im/ReplyEditorSuggestionsPopup/ReplyEditorSuggestionsPopup.js +5 -4
- package/es/rte/Editor/css/Editor.module.css +0 -0
- package/es/rte/Editor/index.js +0 -0
- package/es/rte/Editor/props/defaultProps.js +0 -0
- package/es/rte/Editor/props/propTypes.js +0 -0
- package/lib/ActionIcon/ActionIcon.js +97 -0
- package/lib/ActionIcon/css/ActionIcon.module.css +8 -0
- package/lib/ActionIcon/index.js +15 -0
- package/lib/ActionIcon/props/defaultProps.js +17 -0
- package/lib/ActionIcon/props/propTypes.js +30 -0
- package/lib/ActionIconWrapper/ActionIconWrapper.js +81 -0
- package/lib/ActionIconWrapper/css/ActionIconWrapper.module.css +32 -0
- package/lib/ActionIconWrapper/css/cssJSLogic.js +21 -0
- package/lib/ActionIconWrapper/index.js +15 -0
- package/lib/ActionIconWrapper/props/defaultProps.js +15 -0
- package/lib/ActionIconWrapper/props/propTypes.js +24 -0
- package/lib/AttachmentBubble/AttachmentBubble.js +93 -0
- package/lib/AttachmentBubble/css/AttachmentBubble.module.css +56 -0
- package/lib/AttachmentBubble/css/cssJSLogic.js +22 -0
- package/lib/AttachmentBubble/index.js +15 -0
- package/lib/AttachmentBubble/props/defaultProps.js +17 -0
- package/lib/AttachmentBubble/props/propTypes.js +30 -0
- package/lib/AttachmentBubbleInfo/AttachmentBubbleInfo.js +63 -0
- package/lib/AttachmentBubbleInfo/css/AttachmentBubbleInfo.module.css +39 -0
- package/lib/AttachmentBubbleInfo/css/cssJSLogic.js +20 -0
- package/lib/AttachmentBubbleInfo/index.js +15 -0
- package/lib/AttachmentBubbleInfo/props/defaultProps.js +15 -0
- package/lib/AttachmentBubbleInfo/props/propTypes.js +20 -0
- package/lib/AttachmentHandler/AttachmentHandler.js +101 -0
- package/lib/AttachmentHandler/css/AttachmentHandler.module.css +27 -0
- package/lib/AttachmentHandler/index.js +15 -0
- package/lib/AttachmentHandler/props/defaultProps.js +19 -0
- package/lib/AttachmentHandler/props/propTypes.js +28 -0
- package/lib/AttachmentIcon/AttachmentIcon.js +84 -0
- package/lib/AttachmentIcon/css/AttachmentIcon.module.css +8 -0
- package/lib/AttachmentIcon/css/cssJSLogic.js +20 -0
- package/lib/AttachmentIcon/index.js +15 -0
- package/lib/AttachmentIcon/props/defaultProps.js +17 -0
- package/lib/AttachmentIcon/props/propTypes.js +31 -0
- package/lib/AttachmentIcon/utils/getAttachmentIconComponent.js +78 -0
- package/lib/AttachmentPreview/AttachmentPreview.js +144 -0
- package/lib/AttachmentPreview/css/AttachmentPreview.module.css +39 -0
- package/lib/AttachmentPreview/index.js +15 -0
- package/lib/AttachmentPreview/props/defaultProps.js +18 -0
- package/lib/AttachmentPreview/props/propTypes.js +44 -0
- package/lib/AttachmentPreviewBody/AttachmentPreviewBody.js +120 -0
- package/lib/AttachmentPreviewBody/css/AttachmentPreviewBody.module.css +71 -0
- package/lib/AttachmentPreviewBody/index.js +15 -0
- package/lib/AttachmentPreviewBody/props/defaultProps.js +16 -0
- package/lib/AttachmentPreviewBody/props/propTypes.js +31 -0
- package/lib/AttachmentPreviewHeader/AttachmentPreviewHeader.js +94 -0
- package/lib/AttachmentPreviewHeader/css/AttachmentPreviewHeader.module.css +47 -0
- package/lib/AttachmentPreviewHeader/index.js +15 -0
- package/lib/AttachmentPreviewHeader/props/defaultProps.js +16 -0
- package/lib/AttachmentPreviewHeader/props/propTypes.js +27 -0
- package/lib/Audio/Audio.js +55 -0
- package/lib/Audio/css/Audio.module.css +7 -0
- package/lib/Audio/index.js +15 -0
- package/lib/Audio/props/defaultProps.js +15 -0
- package/lib/Audio/props/propTypes.js +19 -0
- package/lib/AudioBubble/AudioBubble.js +68 -0
- package/lib/AudioBubble/css/AudioBubble.module.css +4 -0
- package/lib/AudioBubble/index.js +15 -0
- package/lib/AudioBubble/props/defaultProps.js +16 -0
- package/lib/AudioBubble/props/propTypes.js +27 -0
- package/lib/Emoji/Emoji.js +87 -0
- package/lib/Emoji/css/Emoji.module.css +48 -0
- package/lib/Emoji/css/cssJSLogic.js +22 -0
- package/lib/Emoji/index.js +15 -0
- package/lib/Emoji/props/defaultProps.js +17 -0
- package/lib/Emoji/props/propTypes.js +27 -0
- package/lib/EmojiPopup/EmojiPopup.js +135 -0
- package/lib/EmojiPopup/css/EmojiPopup.module.css +55 -0
- package/lib/EmojiPopup/index.js +15 -0
- package/lib/EmojiPopup/props/defaultProps.js +20 -0
- package/lib/EmojiPopup/props/propTypes.js +33 -0
- package/lib/Emojis/Emojis.js +92 -0
- package/lib/Emojis/index.js +15 -0
- package/lib/Emojis/props/defaultProps.js +19 -0
- package/lib/Emojis/props/propTypes.js +31 -0
- package/lib/EmojisEmptyState/EmojisEmptyState.js +74 -0
- package/lib/EmojisEmptyState/css/EmojisEmptyState.module.css +18 -0
- package/lib/EmojisEmptyState/index.js +15 -0
- package/lib/EmojisEmptyState/props/defaultProps.js +18 -0
- package/lib/EmojisEmptyState/props/propTypes.js +19 -0
- package/lib/EmojisFooter/EmojisFooter.js +87 -0
- package/lib/EmojisFooter/css/EmojisFooter.module.css +40 -0
- package/lib/EmojisFooter/index.js +15 -0
- package/lib/EmojisFooter/props/defaultProps.js +16 -0
- package/lib/EmojisFooter/props/propTypes.js +23 -0
- package/lib/EmojisHeader/EmojisHeader.js +74 -0
- package/lib/EmojisHeader/css/EmojisHeader.module.css +36 -0
- package/lib/EmojisHeader/index.js +15 -0
- package/lib/EmojisHeader/props/defaultProps.js +17 -0
- package/lib/EmojisHeader/props/propTypes.js +24 -0
- package/lib/EmojisList/EmojisList.js +143 -0
- package/lib/EmojisList/css/EmojisList.module.css +50 -0
- package/lib/EmojisList/css/cssJSLogic.js +27 -0
- package/lib/EmojisList/index.js +15 -0
- package/lib/EmojisList/props/defaultProps.js +19 -0
- package/lib/EmojisList/props/propTypes.js +31 -0
- package/lib/Fonts/puviFont.module.css +62 -0
- package/lib/ImageBubble/ImageBubble.js +98 -0
- package/lib/ImageBubble/css/ImageBubble.module.css +63 -0
- package/lib/ImageBubble/css/cssJSLogic.js +21 -0
- package/lib/ImageBubble/index.js +15 -0
- package/lib/ImageBubble/props/defaultProps.js +15 -0
- package/lib/ImageBubble/props/propTypes.js +24 -0
- package/lib/LazyLoadImage/LazyLoadImage.js +54 -0
- package/lib/LazyLoadImage/css/LazyLoadImage.module.css +5 -0
- package/lib/LazyLoadImage/index.js +15 -0
- package/lib/LazyLoadImage/props/defaultProps.js +15 -0
- package/lib/LazyLoadImage/props/propTypes.js +19 -0
- package/lib/LocationBubble/LocationBubble.js +77 -0
- package/lib/LocationBubble/css/LocationBubble.module.css +57 -0
- package/lib/LocationBubble/css/cssJSLogic.js +20 -0
- package/lib/LocationBubble/images/location.png +0 -0
- package/lib/LocationBubble/index.js +15 -0
- package/lib/LocationBubble/props/defaultProps.js +15 -0
- package/lib/LocationBubble/props/propTypes.js +19 -0
- package/lib/MediaBubbleWrapper/MediaBubbleWrapper.js +76 -0
- package/lib/MediaBubbleWrapper/css/MediaBubbleWrapper.module.css +7 -0
- package/lib/MediaBubbleWrapper/index.js +15 -0
- package/lib/MediaBubbleWrapper/props/defaultProps.js +16 -0
- package/lib/MediaBubbleWrapper/props/propTypes.js +28 -0
- package/lib/Message/Message.js +157 -0
- package/lib/Message/index.js +15 -0
- package/lib/Message/props/defaultProps.js +22 -0
- package/lib/Message/props/propTypes.js +55 -0
- package/lib/MessageAction/MessageAction.js +77 -0
- package/lib/MessageAction/index.js +15 -0
- package/lib/MessageAction/props/defaultProps.js +17 -0
- package/lib/MessageAction/props/propTypes.js +34 -0
- package/lib/MessageActions/MessageActions.js +135 -0
- package/lib/MessageActions/css/MessageActions.module.css +24 -0
- package/lib/MessageActions/index.js +15 -0
- package/lib/MessageActions/props/defaultProps.js +20 -0
- package/lib/MessageActions/props/propTypes.js +38 -0
- package/lib/MessageActionsMore/MessageActionsMore.js +128 -0
- package/lib/MessageActionsMore/css/MessageActionsMore.module.css +24 -0
- package/lib/MessageActionsMore/index.js +15 -0
- package/lib/MessageActionsMore/props/defaultProps.js +18 -0
- package/lib/MessageActionsMore/props/propTypes.js +29 -0
- package/lib/MessageActionsWrapper/MessageActionsWrapper.js +91 -0
- package/lib/MessageActionsWrapper/css/MessageActionsWrapper.module.css +7 -0
- package/lib/MessageActionsWrapper/index.js +15 -0
- package/lib/MessageActionsWrapper/props/defaultProps.js +19 -0
- package/lib/MessageActionsWrapper/props/propTypes.js +27 -0
- package/lib/MessageAvatar/MessageAvatar.js +64 -0
- package/lib/MessageAvatar/css/MessageAvatar.module.css +23 -0
- package/lib/MessageAvatar/index.js +15 -0
- package/lib/MessageAvatar/props/defaultProps.js +16 -0
- package/lib/MessageAvatar/props/propTypes.js +24 -0
- package/lib/MessageBox/MessageBox.js +82 -0
- package/lib/MessageBox/css/MessageBox.module.css +56 -0
- package/lib/MessageBox/css/cssJSLogic.js +22 -0
- package/lib/MessageBox/index.js +15 -0
- package/lib/MessageBox/props/defaultProps.js +15 -0
- package/lib/MessageBox/props/propTypes.js +24 -0
- package/lib/MessageBubble/MessageBubble.js +153 -0
- package/lib/MessageBubble/css/MessageBubble.module.css +101 -0
- package/lib/MessageBubble/css/cssJSLogic.js +38 -0
- package/lib/MessageBubble/index.js +15 -0
- package/lib/MessageBubble/props/defaultProps.js +22 -0
- package/lib/MessageBubble/props/propTypes.js +30 -0
- package/lib/MessageStatus/MessageStatus.js +88 -0
- package/lib/MessageStatus/css/MessageStatus.module.css +17 -0
- package/lib/MessageStatus/css/cssJSLogic.js +33 -0
- package/lib/MessageStatus/index.js +15 -0
- package/lib/MessageStatus/props/defaultProps.js +15 -0
- package/lib/MessageStatus/props/propTypes.js +24 -0
- package/lib/MoreActionItem/MoreActionItem.js +94 -0
- package/lib/MoreActionItem/css/MoreActionItem.module.css +27 -0
- package/lib/MoreActionItem/index.js +15 -0
- package/lib/MoreActionItem/props/defaultProps.js +16 -0
- package/lib/MoreActionItem/props/propTypes.js +25 -0
- package/lib/ReplyBubble/ReplyBubble.js +136 -0
- package/lib/ReplyBubble/css/ReplyBubble.module.css +23 -0
- package/lib/ReplyBubble/css/cssJSLogic.js +20 -0
- package/lib/ReplyBubble/index.js +15 -0
- package/lib/ReplyBubble/props/defaultProps.js +17 -0
- package/lib/ReplyBubble/props/propTypes.js +39 -0
- package/lib/ReplyBubbleContent/ReplyBubbleContent.js +77 -0
- package/lib/ReplyBubbleContent/css/ReplyBubbleContent.module.css +75 -0
- package/lib/ReplyBubbleContent/css/cssJSLogic.js +20 -0
- package/lib/ReplyBubbleContent/index.js +15 -0
- package/lib/ReplyBubbleContent/props/defaultProps.js +15 -0
- package/lib/ReplyBubbleContent/props/propTypes.js +22 -0
- package/lib/ReplyBubbleHeader/ReplyBubbleHeader.js +97 -0
- package/lib/ReplyBubbleHeader/css/ReplyBubbleHeader.module.css +44 -0
- package/lib/ReplyBubbleHeader/css/cssJSLogic.js +18 -0
- package/lib/ReplyBubbleHeader/index.js +15 -0
- package/lib/ReplyBubbleHeader/props/defaultProps.js +16 -0
- package/lib/ReplyBubbleHeader/props/propTypes.js +24 -0
- package/lib/TextBubble/TextBubble.js +69 -0
- package/lib/TextBubble/css/TextBubble.module.css +35 -0
- package/lib/TextBubble/css/cssJSLogic.js +22 -0
- package/lib/TextBubble/index.js +15 -0
- package/lib/TextBubble/props/defaultProps.js +15 -0
- package/lib/TextBubble/props/propTypes.js +21 -0
- package/lib/Theme/ThemeAssets.js +182 -0
- package/lib/Theme/ThemeWrapper.js +130 -0
- package/lib/Theme/TooltipWrapper.js +97 -0
- package/lib/Theme/css/TooltipWrapper.module.css +10 -0
- package/lib/Theme/index.js +15 -0
- package/lib/Theme/props/defaultProps.js +20 -0
- package/lib/Theme/props/propTypes.js +26 -0
- package/lib/Theme/utils/combineConfigurations.js +31 -0
- package/lib/Theme/utils/flatVariables.js +21 -0
- package/lib/Theme/utils/getCustomizedCssVariables.js +29 -0
- package/lib/Theme/utils/getThemeConfigurations.js +28 -0
- package/lib/Theme/utils/getWrapperDivProps.js +23 -0
- package/lib/Video/Video.js +55 -0
- package/lib/Video/css/Video.module.css +5 -0
- package/lib/Video/index.js +15 -0
- package/lib/Video/props/defaultProps.js +15 -0
- package/lib/Video/props/propTypes.js +19 -0
- package/lib/VideoBubble/VideoBubble.js +77 -0
- package/lib/VideoBubble/css/VideoBubble.module.css +12 -0
- package/lib/VideoBubble/css/cssJSLogic.js +20 -0
- package/lib/VideoBubble/index.js +15 -0
- package/lib/VideoBubble/props/defaultProps.js +16 -0
- package/lib/VideoBubble/props/propTypes.js +28 -0
- package/lib/constants/index.js +18 -0
- package/lib/constants/propConstants/editorPropConstants.js +12 -0
- package/lib/constants/propConstants/popupPropConstants.js +10 -0
- package/lib/css/common.module.css +6 -0
- package/lib/icons/create-icon-components.js +199 -0
- package/lib/icons/factory/attachments/audio.svg +19 -0
- package/lib/icons/factory/attachments/code.svg +21 -0
- package/lib/icons/factory/attachments/image.svg +20 -0
- package/lib/icons/factory/attachments/pdf.svg +19 -0
- package/lib/icons/factory/attachments/ppt.svg +1 -0
- package/lib/icons/factory/attachments/text.svg +22 -0
- package/lib/icons/factory/attachments/unknown.svg +21 -0
- package/lib/icons/factory/attachments/video.svg +19 -0
- package/lib/icons/factory/attachments/xls.svg +1 -0
- package/lib/icons/factory/attachments/zip.svg +27 -0
- package/lib/icons/factory/common/alertTriangle.svg +5 -0
- package/lib/icons/factory/common/article.svg +4 -0
- package/lib/icons/factory/common/reply.svg +6 -0
- package/lib/icons/factory/messageStatus/clock.svg +7 -0
- package/lib/icons/factory/messageStatus/doubleTick.svg +1 -0
- package/lib/icons/factory/messageStatus/failed.svg +7 -0
- package/lib/icons/factory/messageStatus/tick.svg +1 -0
- package/lib/icons/icon.template.js +18 -0
- package/lib/icons/iconSrc/attachments/Audio.js +41 -0
- package/lib/icons/iconSrc/attachments/Code.js +47 -0
- package/lib/icons/iconSrc/attachments/Image.js +46 -0
- package/lib/icons/iconSrc/attachments/Pdf.js +41 -0
- package/lib/icons/iconSrc/attachments/Ppt.js +38 -0
- package/lib/icons/iconSrc/attachments/Text.js +50 -0
- package/lib/icons/iconSrc/attachments/Txt.js +50 -0
- package/lib/icons/iconSrc/attachments/Unknown.js +44 -0
- package/lib/icons/iconSrc/attachments/Video.js +41 -0
- package/lib/icons/iconSrc/attachments/Xls.js +38 -0
- package/lib/icons/iconSrc/attachments/Zip.js +89 -0
- package/lib/icons/iconSrc/attachments/index.js +87 -0
- package/lib/icons/iconSrc/common/AlertTriangle.js +35 -0
- package/lib/icons/iconSrc/common/Article.js +29 -0
- package/lib/icons/iconSrc/common/Reply.js +25 -0
- package/lib/icons/iconSrc/common/index.js +31 -0
- package/lib/icons/iconSrc/messageStatus/Clock.js +26 -0
- package/lib/icons/iconSrc/messageStatus/DoubleTick.js +28 -0
- package/lib/icons/iconSrc/messageStatus/Failed.js +26 -0
- package/lib/icons/iconSrc/messageStatus/Tick.js +25 -0
- package/lib/icons/iconSrc/messageStatus/index.js +39 -0
- package/lib/im/ArticleBubble/ArticleBubble.js +104 -0
- package/lib/im/ArticleBubble/css/ArticleBubble.module.css +75 -0
- package/lib/im/ArticleBubble/css/cssJSLogic.js +18 -0
- package/lib/im/ArticleBubble/index.js +15 -0
- package/lib/im/ArticleBubble/props/defaultProps.js +15 -0
- package/lib/im/ArticleBubble/props/propTypes.js +25 -0
- package/lib/im/IMAttachmentHandler/IMAttachmentHandler.js +59 -0
- package/lib/im/IMAttachmentHandler/index.js +15 -0
- package/lib/im/IMAttachmentHandler/props/defaultProps.js +19 -0
- package/lib/im/IMAttachmentHandler/props/propTypes.js +38 -0
- package/lib/im/IMIntegrationIcon/IMIntegrationIcon.js +82 -0
- package/lib/im/IMIntegrationIcon/css/IMIntegrationIcon.module.css +72 -0
- package/lib/im/IMIntegrationIcon/css/cssJSLogic.js +48 -0
- package/lib/im/IMIntegrationIcon/index.js +15 -0
- package/lib/im/IMIntegrationIcon/props/defaultProps.js +21 -0
- package/lib/im/IMIntegrationIcon/props/propTypes.js +27 -0
- package/lib/im/IMMessage/IMMessage.js +223 -0
- package/lib/im/IMMessage/css/IMMessage.module.css +36 -0
- package/lib/im/IMMessage/css/cssJSLogic.js +21 -0
- package/lib/im/IMMessage/index.js +15 -0
- package/lib/im/IMMessage/props/defaultProps.js +25 -0
- package/lib/im/IMMessage/props/propTypes.js +118 -0
- package/lib/im/IMMessageContent/IMMessageContent.js +149 -0
- package/lib/im/IMMessageContent/css/IMMessageContent.module.css +8 -0
- package/lib/im/IMMessageContent/index.js +15 -0
- package/lib/im/IMMessageContent/props/defaultProps.js +18 -0
- package/lib/im/IMMessageContent/props/propTypes.js +65 -0
- package/lib/im/IMMessageMeta/IMMessageMeta.js +79 -0
- package/lib/im/IMMessageMeta/css/IMMessageMeta.module.css +46 -0
- package/lib/im/IMMessageMeta/css/cssJSLogic.js +35 -0
- package/lib/im/IMMessageMeta/index.js +15 -0
- package/lib/im/IMMessageMeta/props/defaultProps.js +21 -0
- package/lib/im/IMMessageMeta/props/propTypes.js +44 -0
- package/lib/im/IMMessageMetaInfo/IMMessageMetaInfo.js +42 -0
- package/lib/im/IMMessageMetaInfo/css/IMMessageMetaInfo.module.css +14 -0
- package/lib/im/IMMessageMetaInfo/index.js +15 -0
- package/lib/im/IMMessageMetaInfo/props/defaultProps.js +17 -0
- package/lib/im/IMMessageMetaInfo/props/propTypes.js +19 -0
- package/lib/im/IMPermaLink/IMPermaLink.js +64 -0
- package/lib/im/IMPermaLink/css/IMPermaLink.module.css +14 -0
- package/lib/im/IMPermaLink/css/cssJSLogic.js +20 -0
- package/lib/im/IMPermaLink/index.js +15 -0
- package/lib/im/IMPermaLink/props/defaultProps.js +15 -0
- package/lib/im/IMPermaLink/props/propTypes.js +22 -0
- package/lib/im/IMReplyBubble/IMReplyBubble.js +59 -0
- package/lib/im/IMReplyBubble/index.js +15 -0
- package/lib/im/IMReplyBubble/props/defaultProps.js +16 -0
- package/lib/im/IMReplyBubble/props/propTypes.js +40 -0
- package/lib/im/IMTextBubble/IMTextBubble.js +47 -0
- package/lib/im/IMTextBubble/index.js +15 -0
- package/lib/im/IMTextBubble/props/defaultProps.js +18 -0
- package/lib/im/IMTextBubble/props/propTypes.js +42 -0
- package/lib/im/ReplyComposer/ReplyComposer.js +176 -0
- package/lib/im/ReplyComposer/css/ReplyComposer.module.css +10 -0
- package/lib/im/ReplyComposer/css/cssJSLogic.js +18 -0
- package/lib/im/ReplyComposer/index.js +15 -0
- package/lib/im/ReplyComposer/props/defaultProps.js +16 -0
- package/lib/im/ReplyComposer/props/propTypes.js +72 -0
- package/lib/im/ReplyComposerFooter/ReplyComposerFooter.js +64 -0
- package/lib/im/ReplyComposerFooter/css/ReplyComposerFooter.module.css +10 -0
- package/lib/im/ReplyComposerFooter/index.js +15 -0
- package/lib/im/ReplyComposerFooter/props/defaultProps.js +17 -0
- package/lib/im/ReplyComposerFooter/props/propTypes.js +28 -0
- package/lib/im/ReplyEditor/ReplyEditor.js +124 -0
- package/lib/im/ReplyEditor/css/ReplyEditor.module.css +50 -0
- package/lib/im/ReplyEditor/css/cssJSLogic.js +17 -0
- package/lib/im/ReplyEditor/index.js +15 -0
- package/lib/im/ReplyEditor/props/defaultProps.js +17 -0
- package/lib/im/ReplyEditor/props/propTypes.js +39 -0
- package/lib/im/ReplyEditorExtensions/ReplyEditorExtensions.js +160 -0
- package/lib/im/ReplyEditorExtensions/css/ReplyEditorExtensions.module.css +5 -0
- package/lib/im/ReplyEditorExtensions/index.js +15 -0
- package/lib/im/ReplyEditorExtensions/props/defaultProps.js +15 -0
- package/lib/im/ReplyEditorExtensions/props/propTypes.js +27 -0
- package/lib/im/ReplyEditorSuggestions/ReplyEditorSuggestions.js +119 -0
- package/lib/im/ReplyEditorSuggestions/css/ReplyEditorSuggestions.module.css +8 -0
- package/lib/im/ReplyEditorSuggestions/index.js +15 -0
- package/lib/im/ReplyEditorSuggestions/props/defaultProps.js +15 -0
- package/lib/im/ReplyEditorSuggestions/props/propTypes.js +32 -0
- package/lib/im/ReplyEditorSuggestionsPopup/ReplyEditorSuggestionsPopup.js +107 -0
- package/lib/im/ReplyEditorSuggestionsPopup/css/ReplyEditorSuggestionsPopup.module.css +7 -0
- package/lib/im/ReplyEditorSuggestionsPopup/index.js +15 -0
- package/lib/im/ReplyEditorSuggestionsPopup/props/defaultProps.js +19 -0
- package/lib/im/ReplyEditorSuggestionsPopup/props/propTypes.js +33 -0
- package/lib/im/css/common.module.css +6 -0
- package/lib/im/index.js +213 -0
- package/lib/rte/Editor/Editor.js +97 -0
- package/lib/rte/Editor/css/Editor.module.css +17 -0
- package/lib/rte/Editor/index.js +15 -0
- package/lib/rte/Editor/props/defaultProps.js +30 -0
- package/lib/rte/Editor/props/propTypes.js +74 -0
- package/lib/rte/index.js +18 -0
- package/package.json +45 -27
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = cssJSLogic;
|
|
7
|
+
|
|
8
|
+
var _utils = require("@zohodesk/utils");
|
|
9
|
+
|
|
10
|
+
var _integrationConstants = _interopRequireDefault(require("@zohoim/chat-components-utils/es/imUtils/constants/integrationConstants"));
|
|
11
|
+
|
|
12
|
+
var _sizes = _interopRequireDefault(require("@zohoim/chat-components-utils/es/constants/sizes"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
|
|
18
|
+
var WHATSAPP = _integrationConstants["default"].WHATSAPP,
|
|
19
|
+
TELEGRAM = _integrationConstants["default"].TELEGRAM,
|
|
20
|
+
INSTAGRAM = _integrationConstants["default"].INSTAGRAM,
|
|
21
|
+
IM_TALK = _integrationConstants["default"].IM_TALK,
|
|
22
|
+
WECHAT = _integrationConstants["default"].WECHAT,
|
|
23
|
+
TWILLIO = _integrationConstants["default"].TWILLIO,
|
|
24
|
+
LINE = _integrationConstants["default"].LINE,
|
|
25
|
+
FACEBOOKMESSENGER = _integrationConstants["default"].FACEBOOKMESSENGER;
|
|
26
|
+
|
|
27
|
+
function cssJSLogic(props, style) {
|
|
28
|
+
var _compileClassNames, _compileClassNames2;
|
|
29
|
+
|
|
30
|
+
var integrationName = props.integrationName,
|
|
31
|
+
size = props.size;
|
|
32
|
+
var isWhatsAppIcon = integrationName === WHATSAPP;
|
|
33
|
+
var isTelegramIcon = integrationName === TELEGRAM;
|
|
34
|
+
var isInstagramIcon = integrationName === INSTAGRAM;
|
|
35
|
+
var isIMTalkIcon = integrationName === IM_TALK;
|
|
36
|
+
var isWeChatIcon = integrationName === WECHAT;
|
|
37
|
+
var isTwillioIcon = integrationName === TWILLIO;
|
|
38
|
+
var isLineIcon = integrationName === LINE;
|
|
39
|
+
var isFbIcon = integrationName === FACEBOOKMESSENGER;
|
|
40
|
+
var isSmall = size === _sizes["default"].SMALL;
|
|
41
|
+
var isMedium = size === _sizes["default"].MEDIUM;
|
|
42
|
+
var iconWrapperClass = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, style.integrationIcon, true), _defineProperty(_compileClassNames, style.small, isSmall), _defineProperty(_compileClassNames, style.medium, isMedium), _defineProperty(_compileClassNames, style.whatsappIcon, isWhatsAppIcon), _defineProperty(_compileClassNames, style.telegramIcon, isTelegramIcon), _defineProperty(_compileClassNames, style.instagramIcon, isInstagramIcon), _defineProperty(_compileClassNames, style.asapIcon, isIMTalkIcon), _defineProperty(_compileClassNames, style.weChatIcon, isWeChatIcon), _defineProperty(_compileClassNames, style.twillioIcon, isTwillioIcon), _defineProperty(_compileClassNames, style.lineIcon, isLineIcon), _defineProperty(_compileClassNames, style.fbIcon, isFbIcon), _compileClassNames));
|
|
43
|
+
var iconClass = (0, _utils.compileClassNames)((_compileClassNames2 = {}, _defineProperty(_compileClassNames2, style.small, isSmall), _defineProperty(_compileClassNames2, style.medium, isMedium), _compileClassNames2));
|
|
44
|
+
return {
|
|
45
|
+
iconWrapperClass: iconWrapperClass,
|
|
46
|
+
iconClass: iconClass
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "IMIntegrationIcon", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _IMIntegrationIcon["default"];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _IMIntegrationIcon = _interopRequireDefault(require("./IMIntegrationIcon"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _emptyConstants = require("@zohoim/chat-components-utils/es/constants/emptyConstants");
|
|
9
|
+
|
|
10
|
+
var _sizes = _interopRequireDefault(require("@zohoim/chat-components-utils/es/constants/sizes"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
/** ** Constants *** */
|
|
15
|
+
var SMALL = _sizes["default"].SMALL;
|
|
16
|
+
var imIntegrationIconDefaultProps = {
|
|
17
|
+
customStyle: _emptyConstants.dummyObject,
|
|
18
|
+
size: SMALL
|
|
19
|
+
};
|
|
20
|
+
var _default = imIntegrationIconDefaultProps;
|
|
21
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _integrationConstants = _interopRequireDefault(require("@zohoim/chat-components-utils/es/imUtils/constants/integrationConstants"));
|
|
11
|
+
|
|
12
|
+
var _sizes = _interopRequireDefault(require("@zohoim/chat-components-utils/es/constants/sizes"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
/** ** Libraries *** */
|
|
17
|
+
|
|
18
|
+
/** ** Constants *** */
|
|
19
|
+
var imIntegrationIconPropTypes = {
|
|
20
|
+
integrationName: _propTypes["default"].oneOf(Object.values(_integrationConstants["default"])).isRequired,
|
|
21
|
+
customStyle: _propTypes["default"].object,
|
|
22
|
+
onClick: _propTypes["default"].func,
|
|
23
|
+
renderCustomIcon: _propTypes["default"].func,
|
|
24
|
+
size: _propTypes["default"].oneOf([_sizes["default"].SMALL, _sizes["default"].MEDIUM])
|
|
25
|
+
};
|
|
26
|
+
var _default = imIntegrationIconPropTypes;
|
|
27
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = IMMessage;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _useMergeStyle = _interopRequireDefault(require("@zohodesk/hooks/es/utils/useMergeStyle"));
|
|
13
|
+
|
|
14
|
+
var _useIMMessage2 = _interopRequireDefault(require("@zohoim/chat-components-hooks/es/im/IMMessage/useIMMessage"));
|
|
15
|
+
|
|
16
|
+
var _cssJSLogic2 = _interopRequireDefault(require("./css/cssJSLogic"));
|
|
17
|
+
|
|
18
|
+
var _defaultProps = _interopRequireDefault(require("./props/defaultProps"));
|
|
19
|
+
|
|
20
|
+
var _propTypes = _interopRequireDefault(require("./props/propTypes"));
|
|
21
|
+
|
|
22
|
+
var _emptyConstants = require("@zohoim/chat-components-utils/es/constants/emptyConstants");
|
|
23
|
+
|
|
24
|
+
var _Message = _interopRequireDefault(require("../../Message/Message"));
|
|
25
|
+
|
|
26
|
+
var _IMMessageContent = _interopRequireDefault(require("../IMMessageContent/IMMessageContent"));
|
|
27
|
+
|
|
28
|
+
var _IMPermaLink = _interopRequireDefault(require("../IMPermaLink/IMPermaLink"));
|
|
29
|
+
|
|
30
|
+
var _IMIntegrationIcon = _interopRequireDefault(require("../IMIntegrationIcon/IMIntegrationIcon"));
|
|
31
|
+
|
|
32
|
+
var _IMMessageMeta = _interopRequireDefault(require("../IMMessageMeta/IMMessageMeta"));
|
|
33
|
+
|
|
34
|
+
var _IMMessageModule = _interopRequireDefault(require("./css/IMMessage.module.css"));
|
|
35
|
+
|
|
36
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
|
+
|
|
38
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
|
+
|
|
40
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
41
|
+
|
|
42
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
43
|
+
|
|
44
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
45
|
+
|
|
46
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
47
|
+
|
|
48
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
49
|
+
|
|
50
|
+
function IMMessage(props) {
|
|
51
|
+
var defaultAvatarUrls = props.defaultAvatarUrls,
|
|
52
|
+
messageDetails = props.messageDetails,
|
|
53
|
+
sessionDetails = props.sessionDetails,
|
|
54
|
+
messageDisplayProps = props.messageDisplayProps,
|
|
55
|
+
actions = props.actions,
|
|
56
|
+
onSelectAction = props.onSelectAction,
|
|
57
|
+
onMouseEnterAction = props.onMouseEnterAction,
|
|
58
|
+
replyText = props.replyText,
|
|
59
|
+
seeMoreText = props.seeMoreText,
|
|
60
|
+
deleteMessageText = props.deleteMessageText,
|
|
61
|
+
messageBubbleTitleI18N = props.messageBubbleTitleI18N,
|
|
62
|
+
messageStatusI18N = props.messageStatusI18N,
|
|
63
|
+
messageMetaInfoI18N = props.messageMetaInfoI18N,
|
|
64
|
+
onLoadFullMessage = props.onLoadFullMessage,
|
|
65
|
+
onClickReply = props.onClickReply,
|
|
66
|
+
onTicketClick = props.onTicketClick,
|
|
67
|
+
messageContentClickMapping = props.messageContentClickMapping,
|
|
68
|
+
customStyle = props.customStyle,
|
|
69
|
+
customProps = props.customProps;
|
|
70
|
+
var _customProps$messageP = customProps.messageProps,
|
|
71
|
+
messageProps = _customProps$messageP === void 0 ? _emptyConstants.dummyObject : _customProps$messageP,
|
|
72
|
+
_customProps$imMessag = customProps.imMessageContentProps,
|
|
73
|
+
imMessageContentProps = _customProps$imMessag === void 0 ? _emptyConstants.dummyObject : _customProps$imMessag,
|
|
74
|
+
_customProps$imTicket = customProps.imTicketLinkProps,
|
|
75
|
+
imTicketLinkProps = _customProps$imTicket === void 0 ? _emptyConstants.dummyObject : _customProps$imTicket,
|
|
76
|
+
_customProps$imIntegr = customProps.imIntegrationIconProps,
|
|
77
|
+
imIntegrationIconProps = _customProps$imIntegr === void 0 ? _emptyConstants.dummyObject : _customProps$imIntegr,
|
|
78
|
+
_customProps$imMessag2 = customProps.imMessageMetaProps,
|
|
79
|
+
imMessageMetaProps = _customProps$imMessag2 === void 0 ? _emptyConstants.dummyObject : _customProps$imMessag2;
|
|
80
|
+
var isHighlightMessage = messageDisplayProps.isHighlightMessage,
|
|
81
|
+
needSender = messageDisplayProps.needSender,
|
|
82
|
+
isShowSender = messageDisplayProps.isShowSender,
|
|
83
|
+
isShowMessageTime = messageDisplayProps.isShowMessageTime,
|
|
84
|
+
isShowMessageStatus = messageDisplayProps.isShowMessageStatus,
|
|
85
|
+
needMessageActions = messageDisplayProps.needMessageActions,
|
|
86
|
+
isShowFullContent = messageDisplayProps.isShowFullContent;
|
|
87
|
+
var newStyle = (0, _useMergeStyle["default"])(_IMMessageModule["default"], customStyle);
|
|
88
|
+
|
|
89
|
+
var _useIMMessage = (0, _useIMMessage2["default"])({
|
|
90
|
+
defaultAvatarUrls: defaultAvatarUrls,
|
|
91
|
+
messageDetails: messageDetails,
|
|
92
|
+
sessionDetails: sessionDetails,
|
|
93
|
+
messageStatusI18N: messageStatusI18N
|
|
94
|
+
}),
|
|
95
|
+
direction = _useIMMessage.direction,
|
|
96
|
+
isIncoming = _useIMMessage.isIncoming,
|
|
97
|
+
isOutgoing = _useIMMessage.isOutgoing,
|
|
98
|
+
senderSrc = _useIMMessage.senderSrc,
|
|
99
|
+
senderAlternateSrc = _useIMMessage.senderAlternateSrc,
|
|
100
|
+
senderName = _useIMMessage.senderName,
|
|
101
|
+
isShowIntegrationIcon = _useIMMessage.isShowIntegrationIcon,
|
|
102
|
+
integrationName = _useIMMessage.integrationName,
|
|
103
|
+
messageStatus = _useIMMessage.messageStatus,
|
|
104
|
+
isFailedMessage = _useIMMessage.isFailedMessage,
|
|
105
|
+
isSendingMessage = _useIMMessage.isSendingMessage,
|
|
106
|
+
messageStatusTitle = _useIMMessage.messageStatusTitle,
|
|
107
|
+
isValidAttachment = _useIMMessage.isValidAttachment,
|
|
108
|
+
dateTimeDetails = _useIMMessage.dateTimeDetails,
|
|
109
|
+
autoMessageType = _useIMMessage.autoMessageType,
|
|
110
|
+
ticketId = _useIMMessage.ticketId,
|
|
111
|
+
ticketNumber = _useIMMessage.ticketNumber,
|
|
112
|
+
ticketUrl = _useIMMessage.ticketUrl;
|
|
113
|
+
/** ** Render Footer *** */
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
var handleRenderMessageBoxFooter = (0, _react.useCallback)(function () {
|
|
117
|
+
var _ref = dateTimeDetails || {},
|
|
118
|
+
displayDateTime = _ref.displayDateTime,
|
|
119
|
+
tooltip = _ref.tooltip;
|
|
120
|
+
|
|
121
|
+
return /*#__PURE__*/_react["default"].createElement(_IMMessageMeta["default"], _extends({
|
|
122
|
+
autoMessageType: autoMessageType,
|
|
123
|
+
direction: direction,
|
|
124
|
+
isValidAttachment: isValidAttachment,
|
|
125
|
+
messageMetaInfoI18N: messageMetaInfoI18N,
|
|
126
|
+
time: isShowMessageTime ? displayDateTime : '',
|
|
127
|
+
timeTooltip: tooltip
|
|
128
|
+
}, imMessageMetaProps));
|
|
129
|
+
}, [isShowMessageTime, dateTimeDetails, direction, autoMessageType, imMessageMetaProps, isValidAttachment, messageMetaInfoI18N]);
|
|
130
|
+
/** ** Render Message Content *** */
|
|
131
|
+
|
|
132
|
+
var handleRenderMessage = (0, _react.useCallback)(function () {
|
|
133
|
+
return /*#__PURE__*/_react["default"].createElement(_IMMessageContent["default"], _extends({
|
|
134
|
+
deleteMessageText: deleteMessageText,
|
|
135
|
+
isFailed: isFailedMessage,
|
|
136
|
+
isSending: isSendingMessage,
|
|
137
|
+
isShowFullContent: isShowFullContent,
|
|
138
|
+
messageBubbleTitleI18N: messageBubbleTitleI18N,
|
|
139
|
+
messageContentClickMapping: messageContentClickMapping,
|
|
140
|
+
messageDetails: messageDetails,
|
|
141
|
+
onClickReply: onClickReply,
|
|
142
|
+
onLoadFullMessage: onLoadFullMessage,
|
|
143
|
+
replyText: replyText,
|
|
144
|
+
seeMoreText: seeMoreText,
|
|
145
|
+
sessionDetails: sessionDetails
|
|
146
|
+
}, imMessageContentProps));
|
|
147
|
+
}, [seeMoreText, replyText, deleteMessageText, messageDetails, sessionDetails, messageContentClickMapping, messageBubbleTitleI18N, onLoadFullMessage, onClickReply, isFailedMessage, isSendingMessage, imMessageContentProps, isShowFullContent]);
|
|
148
|
+
/** ** Render Secondary Actions - TicketId *** */
|
|
149
|
+
|
|
150
|
+
var handleRenderSecondaryActions = (0, _react.useCallback)(function () {
|
|
151
|
+
var _cssJSLogic = (0, _cssJSLogic2["default"])({
|
|
152
|
+
isIncoming: isIncoming,
|
|
153
|
+
isOutgoing: isOutgoing
|
|
154
|
+
}, newStyle),
|
|
155
|
+
imTicketLinkClass = _cssJSLogic.imTicketLinkClass;
|
|
156
|
+
|
|
157
|
+
var customStyle = {
|
|
158
|
+
text: imTicketLinkClass
|
|
159
|
+
};
|
|
160
|
+
return /*#__PURE__*/_react["default"].createElement(_IMPermaLink["default"], _extends({
|
|
161
|
+
customStyle: customStyle,
|
|
162
|
+
href: ticketUrl,
|
|
163
|
+
id: ticketId,
|
|
164
|
+
onClick: onTicketClick,
|
|
165
|
+
text: ticketNumber ? "#".concat(ticketNumber) : ''
|
|
166
|
+
}, imTicketLinkProps));
|
|
167
|
+
}, [ticketNumber, ticketUrl, ticketId, onTicketClick, imTicketLinkProps, newStyle, isIncoming, isOutgoing]);
|
|
168
|
+
/** ** Render Owner Status Icon *** */
|
|
169
|
+
|
|
170
|
+
var handleRenderIntegIcon = (0, _react.useCallback)(function () {
|
|
171
|
+
return /*#__PURE__*/_react["default"].createElement(_IMIntegrationIcon["default"], _extends({
|
|
172
|
+
integrationName: isShowIntegrationIcon ? integrationName : ''
|
|
173
|
+
}, imIntegrationIconProps));
|
|
174
|
+
}, [isShowIntegrationIcon, integrationName, imIntegrationIconProps]);
|
|
175
|
+
/** ** Construct Owner Details *** */
|
|
176
|
+
|
|
177
|
+
var ownerDetails = (0, _react.useMemo)(function () {
|
|
178
|
+
return {
|
|
179
|
+
src: senderSrc,
|
|
180
|
+
alternateSrc: senderAlternateSrc,
|
|
181
|
+
name: senderName
|
|
182
|
+
};
|
|
183
|
+
}, [senderSrc, senderAlternateSrc, senderName]);
|
|
184
|
+
/** ** Construct Custom Props With default Footer *** */
|
|
185
|
+
|
|
186
|
+
var messageCustomProps = (0, _react.useMemo)(function () {
|
|
187
|
+
var _ref2 = messageProps || _emptyConstants.dummyObject,
|
|
188
|
+
customProps = _ref2.customProps;
|
|
189
|
+
|
|
190
|
+
var _ref3 = customProps || _emptyConstants.dummyObject,
|
|
191
|
+
_ref3$messageBubblePr = _ref3.messageBubbleProps,
|
|
192
|
+
messageBubbleProps = _ref3$messageBubblePr === void 0 ? _emptyConstants.dummyObject : _ref3$messageBubblePr;
|
|
193
|
+
|
|
194
|
+
return _objectSpread(_objectSpread({}, messageProps), {}, {
|
|
195
|
+
customProps: _objectSpread(_objectSpread({}, customProps), {}, {
|
|
196
|
+
messageBubbleProps: _objectSpread({
|
|
197
|
+
renderMessageBoxFooter: handleRenderMessageBoxFooter
|
|
198
|
+
}, messageBubbleProps)
|
|
199
|
+
})
|
|
200
|
+
});
|
|
201
|
+
}, [messageProps, handleRenderMessageBoxFooter]);
|
|
202
|
+
return /*#__PURE__*/_react["default"].createElement(_Message["default"], _extends({
|
|
203
|
+
actions: actions,
|
|
204
|
+
direction: direction,
|
|
205
|
+
isActive: isHighlightMessage,
|
|
206
|
+
isShowMessageStatus: isShowMessageStatus,
|
|
207
|
+
isShowSender: isShowSender,
|
|
208
|
+
needMessageActions: needMessageActions,
|
|
209
|
+
needSender: needSender,
|
|
210
|
+
onMouseEnterAction: onMouseEnterAction,
|
|
211
|
+
onSelectAction: onSelectAction,
|
|
212
|
+
ownerDetails: ownerDetails,
|
|
213
|
+
renderContent: handleRenderMessage,
|
|
214
|
+
renderOwnerStatusIcon: handleRenderIntegIcon,
|
|
215
|
+
renderSecondaryActions: handleRenderSecondaryActions,
|
|
216
|
+
status: messageStatus,
|
|
217
|
+
statusTooltip: messageStatusTitle
|
|
218
|
+
}, messageCustomProps));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
IMMessage.propTypes = _propTypes["default"];
|
|
222
|
+
IMMessage.defaultProps = _defaultProps["default"];
|
|
223
|
+
IMMessage.displayName = 'IMMessage';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.varClass {
|
|
2
|
+
--imTicketLink-top_gap: 5px;
|
|
3
|
+
--imTicketLink-font_size: 12px;
|
|
4
|
+
--imTicketLink-max_width: 150px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.ticketLink {
|
|
8
|
+
composes: varClass;
|
|
9
|
+
font-size: var(--imTicketLink-font_size);
|
|
10
|
+
max-width: var(--imTicketLink-max_width);
|
|
11
|
+
margin-top: var(--imTicketLink-top_gap);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ticketLinkRight {
|
|
15
|
+
composes: ticketLink;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[dir=ltr] .ticketLinkRight {
|
|
19
|
+
text-align: left;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[dir=rtl] .ticketLinkRight {
|
|
23
|
+
text-align: right;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ticketLinkLeft {
|
|
27
|
+
composes: ticketLink;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[dir=ltr] .ticketLinkLeft {
|
|
31
|
+
text-align: right;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
[dir=rtl] .ticketLinkLeft {
|
|
35
|
+
text-align: left;
|
|
36
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = cssJSLogic;
|
|
7
|
+
|
|
8
|
+
var _utils = require("@zohodesk/utils");
|
|
9
|
+
|
|
10
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
|
|
12
|
+
function cssJSLogic(props, style) {
|
|
13
|
+
var _compileClassNames;
|
|
14
|
+
|
|
15
|
+
var isIncoming = props.isIncoming,
|
|
16
|
+
isOutgoing = props.isOutgoing;
|
|
17
|
+
var imTicketLinkClass = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, style.ticketLinkLeft, isOutgoing), _defineProperty(_compileClassNames, style.ticketLinkRight, isIncoming), _compileClassNames));
|
|
18
|
+
return {
|
|
19
|
+
imTicketLinkClass: imTicketLinkClass
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "IMMessage", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _IMMessage["default"];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _IMMessage = _interopRequireDefault(require("./IMMessage"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _emptyConstants = require("@zohoim/chat-components-utils/es/constants/emptyConstants");
|
|
9
|
+
|
|
10
|
+
// import React from 'react';
|
|
11
|
+
|
|
12
|
+
/** ** Constants *** */
|
|
13
|
+
var imMessageDefaultProps = {
|
|
14
|
+
messageDetails: _emptyConstants.dummyObject,
|
|
15
|
+
sessionDetails: _emptyConstants.dummyObject,
|
|
16
|
+
messageStatusI18N: _emptyConstants.dummyObject,
|
|
17
|
+
messageBubbleTitleI18N: _emptyConstants.dummyObject,
|
|
18
|
+
messageMetaInfoI18N: _emptyConstants.dummyObject,
|
|
19
|
+
customProps: _emptyConstants.dummyObject,
|
|
20
|
+
customStyle: _emptyConstants.dummyObject,
|
|
21
|
+
messageDisplayProps: _emptyConstants.dummyObject,
|
|
22
|
+
messageContentClickMapping: _emptyConstants.dummyObject
|
|
23
|
+
};
|
|
24
|
+
var _default = imMessageDefaultProps;
|
|
25
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _messageActionConstants = require("@zohoim/chat-components-utils/es/constants/messageActionConstants");
|
|
11
|
+
|
|
12
|
+
var _messageStatusConstants = _interopRequireDefault(require("@zohoim/chat-components-utils/es/constants/messageStatusConstants"));
|
|
13
|
+
|
|
14
|
+
var _autoMessageTypes = _interopRequireDefault(require("@zohoim/chat-components-utils/es/imUtils/constants/autoMessageTypes"));
|
|
15
|
+
|
|
16
|
+
var _PropTypes$shape, _PropTypes$shape2, _PropTypes$shape3;
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
+
|
|
22
|
+
var WELCOMEMSG = _autoMessageTypes["default"].WELCOMEMSG,
|
|
23
|
+
WORKFLOW_MESSAGE = _autoMessageTypes["default"].WORKFLOW_MESSAGE,
|
|
24
|
+
WORKFLOW_NOTIFICATION = _autoMessageTypes["default"].WORKFLOW_NOTIFICATION,
|
|
25
|
+
UN_SUPPORTED_FILE = _autoMessageTypes["default"].UN_SUPPORTED_FILE;
|
|
26
|
+
var SENT = _messageStatusConstants["default"].SENT,
|
|
27
|
+
SAVED = _messageStatusConstants["default"].SAVED,
|
|
28
|
+
QUEUED = _messageStatusConstants["default"].QUEUED,
|
|
29
|
+
DELIVERED = _messageStatusConstants["default"].DELIVERED,
|
|
30
|
+
READ = _messageStatusConstants["default"].READ,
|
|
31
|
+
UNSENT = _messageStatusConstants["default"].UNSENT,
|
|
32
|
+
FAILED = _messageStatusConstants["default"].FAILED,
|
|
33
|
+
OUTGOING = _messageStatusConstants["default"].OUTGOING;
|
|
34
|
+
var imMessagePropTypes = {
|
|
35
|
+
messageDetails: _propTypes["default"].shape({
|
|
36
|
+
displayMessage: _propTypes["default"].string.isRequired,
|
|
37
|
+
actor: _propTypes["default"].shape({
|
|
38
|
+
contactName: _propTypes["default"].string,
|
|
39
|
+
externalId: _propTypes["default"].string,
|
|
40
|
+
name: _propTypes["default"].string,
|
|
41
|
+
photoURL: _propTypes["default"].string,
|
|
42
|
+
type: _propTypes["default"].string
|
|
43
|
+
}),
|
|
44
|
+
attachment: _propTypes["default"].string,
|
|
45
|
+
contentType: _propTypes["default"].string,
|
|
46
|
+
dateTimeDetails: _propTypes["default"].shape({
|
|
47
|
+
displayDateTime: _propTypes["default"].string,
|
|
48
|
+
tooltip: _propTypes["default"].string
|
|
49
|
+
}),
|
|
50
|
+
direction: _propTypes["default"].string,
|
|
51
|
+
id: _propTypes["default"].string,
|
|
52
|
+
isCustomMessage: _propTypes["default"].bool,
|
|
53
|
+
layout: _propTypes["default"].string,
|
|
54
|
+
locationUrl: _propTypes["default"].string,
|
|
55
|
+
meta: _propTypes["default"].shape({
|
|
56
|
+
DESK_TICKET_ID: _propTypes["default"].string,
|
|
57
|
+
DESK_TICKET_NUMBER: _propTypes["default"].string,
|
|
58
|
+
SYSTEM_MESSAGE_TYPE: _propTypes["default"].string
|
|
59
|
+
}),
|
|
60
|
+
replyToMessage: _propTypes["default"].object,
|
|
61
|
+
status: _propTypes["default"].string,
|
|
62
|
+
type: _propTypes["default"].string
|
|
63
|
+
}).isRequired,
|
|
64
|
+
sessionDetails: _propTypes["default"].shape({
|
|
65
|
+
integrationService: _propTypes["default"].string
|
|
66
|
+
}),
|
|
67
|
+
defaultAvatarUrls: _propTypes["default"].shape({
|
|
68
|
+
autoMessageAvatar: _propTypes["default"].string,
|
|
69
|
+
defaultAgentAvatar: _propTypes["default"].string,
|
|
70
|
+
defaultContactAvatar: _propTypes["default"].string
|
|
71
|
+
}),
|
|
72
|
+
messageDisplayProps: _propTypes["default"].shape({
|
|
73
|
+
isHighlightMessage: _propTypes["default"].bool,
|
|
74
|
+
isShowFullContent: _propTypes["default"].bool,
|
|
75
|
+
isShowMessageStatus: _propTypes["default"].bool,
|
|
76
|
+
isShowMessageTime: _propTypes["default"].bool,
|
|
77
|
+
isShowSender: _propTypes["default"].bool,
|
|
78
|
+
needMessageActions: _propTypes["default"].bool,
|
|
79
|
+
needSender: _propTypes["default"].bool
|
|
80
|
+
}),
|
|
81
|
+
messageStatusI18N: _propTypes["default"].shape((_PropTypes$shape = {}, _defineProperty(_PropTypes$shape, DELIVERED, _propTypes["default"].string), _defineProperty(_PropTypes$shape, FAILED, _propTypes["default"].string), _defineProperty(_PropTypes$shape, OUTGOING, _propTypes["default"].string), _defineProperty(_PropTypes$shape, QUEUED, _propTypes["default"].string), _defineProperty(_PropTypes$shape, READ, _propTypes["default"].string), _defineProperty(_PropTypes$shape, SAVED, _propTypes["default"].string), _defineProperty(_PropTypes$shape, SENT, _propTypes["default"].string), _defineProperty(_PropTypes$shape, UNSENT, _propTypes["default"].string), _PropTypes$shape)),
|
|
82
|
+
messageBubbleTitleI18N: _propTypes["default"].shape({
|
|
83
|
+
attachmentBubbleTitle: _propTypes["default"].string
|
|
84
|
+
}),
|
|
85
|
+
messageMetaInfoI18N: _propTypes["default"].shape({
|
|
86
|
+
autoMessagesI18N: _propTypes["default"].shape((_PropTypes$shape2 = {}, _defineProperty(_PropTypes$shape2, UN_SUPPORTED_FILE, _propTypes["default"].string), _defineProperty(_PropTypes$shape2, WELCOMEMSG, _propTypes["default"].string), _defineProperty(_PropTypes$shape2, WORKFLOW_MESSAGE, _propTypes["default"].string), _defineProperty(_PropTypes$shape2, WORKFLOW_NOTIFICATION, _propTypes["default"].string), _PropTypes$shape2)),
|
|
87
|
+
autoMessagesTitleI18N: _propTypes["default"].shape((_PropTypes$shape3 = {}, _defineProperty(_PropTypes$shape3, UN_SUPPORTED_FILE, _propTypes["default"].string), _defineProperty(_PropTypes$shape3, WELCOMEMSG, _propTypes["default"].string), _defineProperty(_PropTypes$shape3, WORKFLOW_MESSAGE, _propTypes["default"].string), _defineProperty(_PropTypes$shape3, WORKFLOW_NOTIFICATION, _propTypes["default"].string), _PropTypes$shape3)),
|
|
88
|
+
restrictedAttachmentMetaInfo: _propTypes["default"].shape({
|
|
89
|
+
info: _propTypes["default"].string,
|
|
90
|
+
title: _propTypes["default"].string
|
|
91
|
+
})
|
|
92
|
+
}),
|
|
93
|
+
actions: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
94
|
+
displayText: _propTypes["default"].string.isRequired,
|
|
95
|
+
id: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].oneOf(Object.values(_messageActionConstants.defaultMessageActions))]).isRequired,
|
|
96
|
+
iconTitle: _propTypes["default"].string,
|
|
97
|
+
isDisabled: _propTypes["default"].bool,
|
|
98
|
+
renderFunction: _propTypes["default"].func
|
|
99
|
+
})),
|
|
100
|
+
onSelectAction: _propTypes["default"].func,
|
|
101
|
+
onMouseEnterAction: _propTypes["default"].func,
|
|
102
|
+
replyText: _propTypes["default"].string,
|
|
103
|
+
seeMoreText: _propTypes["default"].string,
|
|
104
|
+
deleteMessageText: _propTypes["default"].string,
|
|
105
|
+
onLoadFullMessage: _propTypes["default"].func,
|
|
106
|
+
onClickReply: _propTypes["default"].func,
|
|
107
|
+
onTicketClick: _propTypes["default"].func,
|
|
108
|
+
messageContentClickMapping: _propTypes["default"].object,
|
|
109
|
+
customStyle: _propTypes["default"].object,
|
|
110
|
+
customProps: _propTypes["default"].shape({
|
|
111
|
+
imIntegrationIconProps: _propTypes["default"].object,
|
|
112
|
+
imMessageContentProps: _propTypes["default"].object,
|
|
113
|
+
imPermaLinkProps: _propTypes["default"].object,
|
|
114
|
+
messageProps: _propTypes["default"].object
|
|
115
|
+
})
|
|
116
|
+
};
|
|
117
|
+
var _default = imMessagePropTypes;
|
|
118
|
+
exports["default"] = _default;
|