@zohoim/chat-components 0.0.13 → 0.0.14
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/ActionIcon/ActionIcon.js +57 -35
- package/es/ActionIcon/css/ActionIcon.module.css +4 -23
- package/es/ActionIcon/props/defaultProps.js +4 -2
- package/es/ActionIcon/props/propTypes.js +10 -3
- package/es/ActionIconWrapper/ActionIconWrapper.js +49 -0
- package/es/ActionIconWrapper/css/ActionIconWrapper.module.css +27 -0
- package/es/ActionIconWrapper/index.js +1 -0
- package/es/{MediaControls → ActionIconWrapper}/props/defaultProps.js +3 -3
- package/es/ActionIconWrapper/props/propTypes.js +11 -0
- package/es/AttachmentBubble/AttachmentBubble.js +28 -28
- package/es/AttachmentBubble/css/AttachmentBubble.module.css +16 -15
- package/es/AttachmentBubble/props/defaultProps.js +2 -2
- package/es/AttachmentBubble/props/propTypes.js +10 -5
- package/es/AttachmentBubbleInfo/AttachmentBubbleInfo.js +7 -19
- package/es/AttachmentBubbleInfo/css/AttachmentBubbleInfo.module.css +20 -16
- package/es/AttachmentBubbleInfo/props/defaultProps.js +1 -1
- package/es/AttachmentBubbleInfo/props/propTypes.js +3 -3
- package/es/AttachmentIcon/AttachmentIcon.js +47 -0
- package/es/AttachmentIcon/css/AttachmentIcon.module.css +4 -0
- package/es/AttachmentIcon/index.js +1 -0
- package/es/{im/IMAttachmentIcon → AttachmentIcon}/props/defaultProps.js +3 -3
- package/es/AttachmentIcon/props/propTypes.js +11 -0
- package/es/{im/IMAttachmentIcon/IMAttachmentIcon.js → AttachmentIcon/utils/getAttachmentIconComponent.js} +10 -40
- package/es/Audio/Audio.js +14 -36
- package/es/Audio/css/Audio.module.css +3 -3
- package/es/Audio/props/defaultProps.js +2 -3
- package/es/Audio/props/propTypes.js +3 -4
- package/es/AudioBubble/AudioBubble.js +25 -42
- package/es/AudioBubble/props/defaultProps.js +2 -4
- package/es/AudioBubble/props/propTypes.js +10 -7
- package/es/Fonts/puviFont.module.css +55 -54
- package/es/ImageBubble/ImageBubble.js +20 -20
- package/es/ImageBubble/css/ImageBubble.module.css +8 -11
- package/es/ImageBubble/props/defaultProps.js +1 -1
- package/es/ImageBubble/props/propTypes.js +5 -3
- package/es/InfoBubble/InfoBubble.js +6 -8
- package/es/InfoBubble/props/defaultProps.js +1 -1
- package/es/LazyLoadImage/LazyLoadImage.js +6 -16
- package/es/LazyLoadImage/css/LazyLoadImage.module.css +1 -0
- package/es/LazyLoadImage/props/defaultProps.js +1 -1
- package/es/LazyLoadImage/props/propTypes.js +3 -3
- package/es/LocationBubble/LocationBubble.js +15 -33
- package/es/LocationBubble/css/LocationBubble.module.css +11 -11
- package/es/LocationBubble/props/defaultProps.js +1 -1
- package/es/LocationBubble/props/propTypes.js +2 -2
- package/es/MediaBubbleWrapper/MediaBubbleWrapper.js +59 -0
- package/es/MediaBubbleWrapper/css/MediaBubbleWrapper.module.css +3 -0
- package/es/MediaBubbleWrapper/index.js +1 -0
- package/es/MediaBubbleWrapper/props/defaultProps.js +7 -0
- package/es/MediaBubbleWrapper/props/propTypes.js +16 -0
- package/es/Message/Message.js +59 -37
- package/es/Message/props/defaultProps.js +3 -3
- package/es/Message/props/propTypes.js +17 -38
- package/es/MessageAction/MessageAction.js +31 -18
- package/es/MessageAction/props/defaultProps.js +4 -4
- package/es/MessageAction/props/propTypes.js +11 -8
- package/es/MessageActions/MessageActions.js +54 -96
- package/es/MessageActions/css/MessageActions.module.css +2 -9
- package/es/MessageActions/props/defaultProps.js +2 -4
- package/es/MessageActions/props/propTypes.js +13 -19
- package/es/MessageActionsMore/MessageActionsMore.js +43 -35
- package/es/MessageActionsMore/css/MessageActionsMore.module.css +8 -5
- package/es/MessageActionsMore/props/defaultProps.js +3 -2
- package/es/MessageActionsMore/props/propTypes.js +3 -2
- package/es/MessageActionsWrapper/MessageActionsWrapper.js +36 -44
- package/es/MessageActionsWrapper/css/MessageActionsWrapper.module.css +1 -1
- package/es/MessageActionsWrapper/props/defaultProps.js +4 -5
- package/es/MessageActionsWrapper/props/propTypes.js +7 -4
- package/es/MessageAvatar/MessageAvatar.js +11 -19
- package/es/MessageAvatar/css/MessageAvatar.module.css +3 -3
- package/es/MessageAvatar/props/defaultProps.js +2 -6
- package/es/MessageAvatar/props/propTypes.js +5 -5
- package/es/MessageBox/MessageBox.js +24 -25
- package/es/MessageBox/css/MessageBox.module.css +12 -14
- package/es/MessageBox/css/cssJSLogic.js +1 -21
- package/es/MessageBox/props/defaultProps.js +1 -3
- package/es/MessageBox/props/propTypes.js +8 -7
- package/es/MessageBubble/MessageBubble.js +61 -38
- package/es/MessageBubble/css/MessageBubble.module.css +11 -8
- package/es/MessageBubble/css/cssJSLogic.js +10 -26
- package/es/MessageBubble/props/defaultProps.js +1 -1
- package/es/MessageBubble/props/propTypes.js +7 -7
- package/es/MessageStatus/MessageStatus.js +11 -11
- package/es/MessageStatus/css/MessageStatus.module.css +1 -1
- package/es/MessageStatus/css/cssJSLogic.js +13 -9
- package/es/MessageStatus/props/defaultProps.js +1 -1
- package/es/MessageStatus/props/propTypes.js +4 -14
- package/es/MoreActionItem/MoreActionItem.js +21 -33
- package/es/MoreActionItem/css/MoreActionItem.module.css +5 -11
- package/es/MoreActionItem/props/defaultProps.js +1 -5
- package/es/MoreActionItem/props/propTypes.js +6 -5
- package/es/ReplyBubble/ReplyBubble.js +59 -28
- package/es/ReplyBubble/css/ReplyBubble.module.css +17 -0
- package/es/ReplyBubble/props/defaultProps.js +3 -4
- package/es/ReplyBubble/props/propTypes.js +15 -8
- package/es/ReplyBubbleContent/ReplyBubbleContent.js +11 -22
- package/es/ReplyBubbleContent/css/ReplyBubbleContent.module.css +38 -38
- package/es/ReplyBubbleContent/props/defaultProps.js +1 -1
- package/es/ReplyBubbleContent/props/propTypes.js +4 -4
- package/es/ReplyBubbleHeader/ReplyBubbleHeader.js +25 -31
- package/es/ReplyBubbleHeader/css/ReplyBubbleHeader.module.css +4 -7
- package/es/ReplyBubbleHeader/props/defaultProps.js +2 -4
- package/es/ReplyBubbleHeader/props/propTypes.js +3 -2
- package/es/TextBubble/TextBubble.js +11 -29
- package/es/TextBubble/css/TextBubble.module.css +13 -9
- package/es/TextBubble/props/defaultProps.js +2 -5
- package/es/TextBubble/props/propTypes.js +3 -4
- package/es/Theme/{DeskAssets.js → ThemeAssets.js} +10 -6
- package/es/Theme/ThemeWrapper.js +54 -57
- package/es/Theme/{ToolttipWrapper.js → TooltipWrapper.js} +29 -25
- package/es/Theme/constants/index.js +1 -4
- package/es/Theme/crm/dark/blueFanTheme.js +5 -5
- package/es/Theme/crm/dark/blueTheme.js +5 -5
- package/es/Theme/crm/dark/commonColorVariable.js +5 -5
- package/es/Theme/crm/dark/darkBlueTheme.js +5 -5
- package/es/Theme/crm/dark/darkGreyTheme.js +5 -5
- package/es/Theme/crm/dark/greenTheme.js +5 -5
- package/es/Theme/crm/dark/orangeTheme.js +5 -5
- package/es/Theme/crm/dark/pinkTheme.js +5 -5
- package/es/Theme/crm/dark/tealTheme.js +5 -5
- package/es/Theme/crm/dark/whiteTheme.js +5 -5
- package/es/Theme/crm/light/blueFanTheme.js +5 -5
- package/es/Theme/crm/light/blueTheme.js +3 -3
- package/es/Theme/crm/light/commonColorVariable.js +3 -3
- package/es/Theme/crm/light/darkBlueTheme.js +5 -5
- package/es/Theme/crm/light/darkGreyTheme.js +5 -5
- package/es/Theme/crm/light/greenTheme.js +3 -3
- package/es/Theme/crm/light/orangeTheme.js +3 -3
- package/es/Theme/crm/light/pinkTheme.js +3 -3
- package/es/Theme/crm/light/tealTheme.js +3 -3
- package/es/Theme/crm/light/whiteTheme.js +5 -5
- package/es/Theme/crm/pureDark/blueFanTheme.js +5 -5
- package/es/Theme/crm/pureDark/blueTheme.js +5 -5
- package/es/Theme/crm/pureDark/commonColorVariable.js +3 -3
- package/es/Theme/crm/pureDark/darkBlueTheme.js +5 -5
- package/es/Theme/crm/pureDark/darkGreyTheme.js +5 -5
- package/es/Theme/crm/pureDark/greenTheme.js +5 -5
- package/es/Theme/crm/pureDark/orangeTheme.js +5 -5
- package/es/Theme/crm/pureDark/pinkTheme.js +5 -5
- package/es/Theme/crm/pureDark/tealTheme.js +5 -5
- package/es/Theme/crm/pureDark/whiteTheme.js +5 -5
- package/es/Theme/css/TooltipWrapper.module.css +2 -2
- package/es/Theme/props/defaultProps.js +2 -3
- package/es/Theme/props/propTypes.js +5 -6
- package/es/Theme/{desk/commonDeskColorVariable.js → themeVariables/commonThemeColorVariable.js} +2 -3
- package/es/Theme/{desk → themeVariables}/dark/blueTheme.js +11 -11
- package/es/Theme/{desk → themeVariables}/dark/commonColorVariable.js +1 -1
- package/es/Theme/{desk → themeVariables}/dark/greenTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/dark/orangeTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/dark/redTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/dark/yellowTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/light/blueTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/light/commonColorVariable.js +1 -1
- package/es/Theme/{desk → themeVariables}/light/greenTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/light/orangeTheme.js +6 -6
- package/es/Theme/{desk → themeVariables}/light/redTheme.js +6 -6
- package/es/Theme/{desk → themeVariables}/light/yellowTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/pureDark/blueTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/pureDark/commonColorVariable.js +1 -1
- package/es/Theme/{desk → themeVariables}/pureDark/greenTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/pureDark/orangeTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/pureDark/redTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/pureDark/yellowTheme.js +7 -7
- package/es/Theme/utils/combineConfigurations.js +17 -0
- package/es/Theme/utils/flatVariables.js +12 -0
- package/es/Theme/utils/getCustomizedCssVariables.js +19 -0
- package/es/Theme/utils/getThemeConfigurations.js +47 -175
- package/es/Theme/utils/getWrapperDivProps.js +12 -0
- package/es/Video/Video.js +13 -45
- package/es/Video/css/Video.module.css +2 -7
- package/es/Video/props/defaultProps.js +2 -3
- package/es/Video/props/propTypes.js +3 -4
- package/es/VideoBubble/VideoBubble.js +31 -35
- package/es/VideoBubble/css/VideoBubble.module.css +4 -4
- package/es/VideoBubble/props/defaultProps.js +2 -3
- package/es/VideoBubble/props/propTypes.js +11 -7
- package/es/icons/create-icon-components.js +30 -0
- package/es/icons/icon.template.js +9 -8
- package/es/icons/iconSrc/common/index.js +1 -2
- package/es/im/ArticleBubble/ArticleBubble.js +66 -0
- package/es/{ArticleBubble → im/ArticleBubble}/css/ArticleBubble.module.css +9 -10
- package/es/{ArticleBubble → im/ArticleBubble}/props/defaultProps.js +1 -1
- package/es/im/ArticleBubble/props/propTypes.js +13 -0
- package/es/im/IMAutoMessageInfo/IMAutoMessageInfo.js +10 -20
- package/es/im/IMAutoMessageInfo/css/IMAutoMessageInfo.module.css +2 -3
- package/es/im/IMAutoMessageInfo/props/defaultProps.js +1 -1
- package/es/im/IMAutoMessageInfo/props/propTypes.js +11 -9
- package/es/im/IMInfoBubble/IMInfoBubble.js +6 -8
- package/es/im/IMInfoBubble/props/defaultProps.js +1 -1
- package/es/im/IMIntegrationIcon/IMIntegrationIcon.js +31 -38
- package/es/im/IMIntegrationIcon/css/IMIntegrationIcon.module.css +5 -8
- package/es/im/IMIntegrationIcon/css/cssJSLogic.js +9 -13
- package/es/im/IMIntegrationIcon/index.js +1 -2
- package/es/im/IMIntegrationIcon/props/defaultProps.js +6 -4
- package/es/im/IMIntegrationIcon/props/propTypes.js +6 -17
- package/es/im/IMMessage/IMMessage.js +76 -91
- package/es/im/IMMessage/props/defaultProps.js +1 -10
- package/es/im/IMMessage/props/propTypes.js +49 -96
- package/es/im/IMMessageContent/IMMessageContent.js +74 -65
- package/es/im/IMMessageContent/css/IMMessageContent.module.css +1 -1
- package/es/im/IMMessageContent/props/defaultProps.js +2 -3
- package/es/im/IMMessageContent/props/propTypes.js +28 -23
- package/es/im/IMMessageMeta/IMMessageMeta.js +26 -21
- package/es/im/IMMessageMeta/css/IMMessageMeta.module.css +15 -4
- package/es/im/IMMessageMeta/css/cssJSLogic.js +11 -3
- package/es/im/IMMessageMeta/props/defaultProps.js +1 -1
- package/es/im/IMMessageMeta/props/propTypes.js +17 -12
- package/es/im/IMReplyBubble/IMReplyBubble.js +20 -59
- package/es/im/IMReplyBubble/props/defaultProps.js +2 -4
- package/es/im/IMReplyBubble/props/propTypes.js +16 -14
- package/es/im/IMTextBubble/IMTextBubble.js +15 -31
- package/es/im/IMTextBubble/props/defaultProps.js +3 -9
- package/es/im/IMTextBubble/props/propTypes.js +22 -8
- package/es/im/IMTicketLink/IMTicketLink.js +13 -11
- package/es/im/IMTicketLink/css/IMTicketLink.module.css +3 -4
- package/es/im/IMTicketLink/props/defaultProps.js +1 -1
- package/es/im/IMTicketLink/props/propTypes.js +4 -3
- package/es/im/index.js +1 -9
- package/es/index.js +4 -6
- package/package.json +32 -14
- package/es/ActionIcon/css/cssJSLogic.js +0 -10
- package/es/ArticleBubble/ArticleBubble.js +0 -70
- package/es/ArticleBubble/css/cssJSLogic.js +0 -34
- package/es/ArticleBubble/props/propTypes.js +0 -10
- package/es/AttachmentBubble/css/cssJSLogic.js +0 -18
- package/es/AttachmentBubbleInfo/css/cssJSLogic.js +0 -18
- package/es/Audio/css/cssJSLogic.js +0 -14
- package/es/AudioBubble/css/AudioBubble.module.css +0 -3
- package/es/AudioBubble/css/cssJSLogic.js +0 -20
- package/es/ImageBubble/css/cssJSLogic.js +0 -22
- package/es/LazyLoadImage/css/cssJSLogic.js +0 -10
- package/es/LocationBubble/css/cssJSLogic.js +0 -30
- package/es/MediaControls/MediaControls.js +0 -59
- package/es/MediaControls/css/MediaControls.module.css +0 -1
- package/es/MediaControls/css/cssJSLogic.js +0 -22
- package/es/MediaControls/index.js +0 -1
- package/es/MediaControls/props/propTypes.js +0 -11
- package/es/Message/css/Message.module.css +0 -0
- package/es/Message/css/cssJSLogic.js +0 -10
- package/es/MessageAction/css/MessageAction.module.css +0 -0
- package/es/MessageAction/css/cssJSLogic.js +0 -0
- package/es/MessageActions/css/cssJSLogic.js +0 -20
- package/es/MessageActionsMore/css/cssJSLogic.js +0 -28
- package/es/MessageActionsWrapper/css/cssJSLogic.js +0 -10
- package/es/MessageActionsWrapper/props/propConstants.js +0 -7
- package/es/MessageAvatar/css/cssJSLogic.js +0 -18
- package/es/MessageBubble/props/propConstants.js +0 -6
- package/es/MoreActionItem/css/cssJSLogic.js +0 -27
- package/es/ReplyBubble/css/cssJSLogic.js +0 -10
- package/es/ReplyBubbleContent/css/cssJSLogic.js +0 -22
- package/es/ReplyBubbleHeader/css/cssJSLogic.js +0 -18
- package/es/TextBubble/css/cssJSLogic.js +0 -18
- package/es/Theme/css/cssJSLogic.js +0 -14
- package/es/Video/css/cssJSLogic.js +0 -14
- package/es/VideoBubble/css/cssJSLogic.js +0 -10
- package/es/icons/factory/actions/convertTicket.svg +0 -21
- package/es/icons/factory/common/quote.svg +0 -1
- package/es/icons/iconSrc/actions/ConvertTicket.js +0 -25
- package/es/icons/iconSrc/actions/index.js +0 -1
- package/es/icons/iconSrc/common/Quote.js +0 -17
- package/es/im/IMArticleBubble/IMArticleBubble.js +0 -54
- package/es/im/IMArticleBubble/css/IMArticleBubble.module.css +0 -0
- package/es/im/IMArticleBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMArticleBubble/index.js +0 -1
- package/es/im/IMArticleBubble/props/defaultProps.js +0 -8
- package/es/im/IMArticleBubble/props/propTypes.js +0 -14
- package/es/im/IMAttachmentBubble/IMAttachmentBubble.js +0 -62
- package/es/im/IMAttachmentBubble/css/IMAttachmentBubble.module.css +0 -1
- package/es/im/IMAttachmentBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMAttachmentBubble/index.js +0 -1
- package/es/im/IMAttachmentBubble/props/defaultProps.js +0 -10
- package/es/im/IMAttachmentBubble/props/propTypes.js +0 -16
- package/es/im/IMAttachmentIcon/css/IMAttachmentIcon.module.css +0 -4
- package/es/im/IMAttachmentIcon/css/cssJSLogic.js +0 -16
- package/es/im/IMAttachmentIcon/index.js +0 -1
- package/es/im/IMAttachmentIcon/props/propTypes.js +0 -26
- package/es/im/IMAudioBubble/IMAudioBubble.js +0 -62
- package/es/im/IMAudioBubble/css/IMAudioBubble.module.css +0 -8
- package/es/im/IMAudioBubble/css/cssJSLogic.js +0 -20
- package/es/im/IMAudioBubble/index.js +0 -1
- package/es/im/IMAudioBubble/props/defaultProps.js +0 -11
- package/es/im/IMAudioBubble/props/propTypes.js +0 -17
- package/es/im/IMAutoMessageInfo/css/cssJSLogic.js +0 -10
- package/es/im/IMDateTime/IMDateTime.js +0 -40
- package/es/im/IMDateTime/css/IMDateTime.module.css +0 -10
- package/es/im/IMDateTime/css/cssJSLogic.js +0 -10
- package/es/im/IMDateTime/index.js +0 -1
- package/es/im/IMDateTime/props/defaultProps.js +0 -6
- package/es/im/IMDateTime/props/propTypes.js +0 -6
- package/es/im/IMImageBubble/IMImageBubble.js +0 -50
- package/es/im/IMImageBubble/css/IMImageBubble.module.css +0 -0
- package/es/im/IMImageBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMImageBubble/index.js +0 -1
- package/es/im/IMImageBubble/props/defaultProps.js +0 -7
- package/es/im/IMImageBubble/props/propTypes.js +0 -13
- package/es/im/IMIntegrationIcon/props/propConstants.js +0 -8
- package/es/im/IMLocationBubble/IMLocationBubble.js +0 -50
- package/es/im/IMLocationBubble/css/IMLocationBubble.module.css +0 -0
- package/es/im/IMLocationBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMLocationBubble/index.js +0 -1
- package/es/im/IMLocationBubble/props/defaultProps.js +0 -8
- package/es/im/IMLocationBubble/props/propTypes.js +0 -11
- package/es/im/IMMessage/css/IMMessage.module.css +0 -0
- package/es/im/IMMessage/css/cssJSLogic.js +0 -10
- package/es/im/IMMessageAvatar/IMMessageAvatar.js +0 -45
- package/es/im/IMMessageAvatar/css/IMMessageAvatar.module.css +0 -0
- package/es/im/IMMessageAvatar/css/cssJSLogic.js +0 -0
- package/es/im/IMMessageAvatar/index.js +0 -1
- package/es/im/IMMessageAvatar/props/defaultProps.js +0 -12
- package/es/im/IMMessageAvatar/props/propTypes.js +0 -53
- package/es/im/IMMessageContent/css/cssJSLogic.js +0 -10
- package/es/im/IMReplyBubble/css/IMReplyBubble.module.css +0 -18
- package/es/im/IMReplyBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMTextBubble/css/IMTextBubble.module.css +0 -1
- package/es/im/IMTextBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMVideoBubble/IMVideoBubble.js +0 -61
- package/es/im/IMVideoBubble/css/IMVideoBubble.module.css +0 -1
- package/es/im/IMVideoBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMVideoBubble/index.js +0 -1
- package/es/im/IMVideoBubble/props/defaultProps.js +0 -11
- package/es/im/IMVideoBubble/props/propTypes.js +0 -17
- package/es/unused/AvatarSpace/AvatarSpace.js +0 -40
- package/es/unused/AvatarSpace/css/AvatarSpace.module.css +0 -1
- package/es/unused/AvatarSpace/css/cssJSLogic.js +0 -15
- package/es/unused/AvatarSpace/index.js +0 -1
- package/es/unused/AvatarSpace/props/defaultProps.js +0 -10
- package/es/unused/AvatarSpace/props/propConstants.js +0 -7
- package/es/unused/AvatarSpace/props/propTypes.js +0 -8
- package/es/unused/MessageBoxFooter/MessageBoxFooter.js +0 -39
- package/es/unused/MessageBoxFooter/css/MessageBoxFooter.module.css +0 -3
- package/es/unused/MessageBoxFooter/css/cssJSLogic.js +0 -10
- package/es/unused/MessageBoxFooter/index.js +0 -1
- package/es/unused/MessageBoxFooter/props/defaultProps.js +0 -5
- package/es/unused/MessageBoxFooter/props/propTypes.js +0 -6
- package/es/unused/MessageBoxHeader/MessageBoxHeader.js +0 -7
- package/es/unused/MessageBoxHeader/css/MessageBoxHeader.module.css +0 -0
- package/es/unused/MessageBoxHeader/css/cssJsLogic.js +0 -0
- package/es/unused/MessageBoxHeader/index.js +0 -2
- package/es/unused/MessageBoxHeader/props/defaultProps.js +0 -0
- package/es/unused/MessageBoxHeader/props/propTypes.js +0 -0
- package/es/unused/MessageWrapper/MessageWrapper.js +0 -36
- package/es/unused/MessageWrapper/css/MessageWrapper.module.css +0 -0
- package/es/unused/MessageWrapper/css/cssJSLogic.js +0 -10
- package/es/unused/MessageWrapper/index.js +0 -1
- package/es/unused/MessageWrapper/props/defaultProps.js +0 -6
- package/es/unused/MessageWrapper/props/propTypes.js +0 -6
- package/es/unused/TextMessage/DefaultActions.js +0 -60
- package/es/unused/TextMessage/TextMessage.js +0 -67
- package/es/unused/TextMessage/TextMessage1.js +0 -66
- package/es/unused/TextMessage/css/TextMessage.module.css +0 -5
- package/es/unused/TextMessage/css/cssJSLogic.js +0 -0
- package/es/unused/TextMessage/index.js +0 -1
- package/es/unused/TextMessage/props/defaultProps.js +0 -4
- package/es/unused/TextMessage/props/propConstants.js +0 -3
- package/es/unused/TextMessage/props/propTypes.js +0 -17
- package/es/unused/darkTheme.js +0 -9
- package/es/unused/defaultTheme.js +0 -33
- /package/es/{ArticleBubble → im/ArticleBubble}/index.js +0 -0
|
@@ -1,58 +1,52 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-no-bind */
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
|
-
|
|
4
1
|
/** ** Libraries *** */
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
2
|
+
import React, { useMemo, useCallback } from 'react';
|
|
7
3
|
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
4
|
|
|
5
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
10
6
|
/** ** Constants *** */
|
|
7
|
+
|
|
11
8
|
import replyBubbleHeaderDefaultProps from './props/defaultProps';
|
|
12
9
|
import replyBubbleHeaderPropTypes from './props/propTypes';
|
|
13
|
-
|
|
14
|
-
/** ** Methods *** */
|
|
15
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
16
|
-
|
|
17
10
|
/** ** Styles *** */
|
|
18
|
-
import style from './css/ReplyBubbleHeader.module.css';
|
|
19
11
|
|
|
12
|
+
import style from './css/ReplyBubbleHeader.module.css';
|
|
20
13
|
/** ** Components *** */
|
|
21
|
-
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
22
14
|
|
|
15
|
+
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
23
16
|
/** ** Icons *** */
|
|
17
|
+
|
|
24
18
|
import ReplyIcon from '@zohodesk/icon/es/general/Reply';
|
|
19
|
+
/** ** Methods *** */
|
|
20
|
+
|
|
21
|
+
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
25
22
|
export default function ReplyBubbleHeader(props) {
|
|
26
23
|
const {
|
|
27
24
|
customStyle,
|
|
28
25
|
replyText,
|
|
29
|
-
time
|
|
26
|
+
time,
|
|
27
|
+
renderCustomReplyIcon
|
|
30
28
|
} = props;
|
|
29
|
+
/* External CSS Customization */
|
|
31
30
|
|
|
32
|
-
/* External customization */
|
|
33
31
|
const newStyle = useMergeStyle(style, customStyle);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
const iconStyle = useMemo(() => ({
|
|
33
|
+
base: newStyle.replyIcon
|
|
34
|
+
}), [newStyle.replyIcon]);
|
|
35
|
+
const renderIcon = useCallback(() => {
|
|
36
|
+
const customIcon = renderHandler(renderCustomReplyIcon)();
|
|
37
|
+
return customIcon || /*#__PURE__*/React.createElement(ReplyIcon, {
|
|
38
|
+
customStyle: iconStyle
|
|
39
|
+
});
|
|
40
|
+
}, [iconStyle, renderCustomReplyIcon]);
|
|
40
41
|
return /*#__PURE__*/React.createElement(Container, {
|
|
41
|
-
alignBox: "row"
|
|
42
|
-
className: replyBubbleHeaderClass
|
|
42
|
+
alignBox: "row"
|
|
43
43
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
44
44
|
flexible: true
|
|
45
45
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
46
46
|
alignBox: "row"
|
|
47
|
-
}, /*#__PURE__*/React.createElement(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
}), /*#__PURE__*/React.createElement(Box, {
|
|
52
|
-
className: replyTextClass
|
|
53
|
-
}, replyText))), /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: timeClass
|
|
55
|
-
}, time));
|
|
47
|
+
}, renderIcon(), /*#__PURE__*/React.createElement(Box, {
|
|
48
|
+
className: newStyle.replyText
|
|
49
|
+
}, replyText))), /*#__PURE__*/React.createElement("div", null, time));
|
|
56
50
|
}
|
|
57
51
|
ReplyBubbleHeader.propTypes = replyBubbleHeaderPropTypes;
|
|
58
52
|
ReplyBubbleHeader.defaultProps = replyBubbleHeaderDefaultProps;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
.replyIcon {
|
|
2
|
-
width: var(--
|
|
3
|
-
height: var(--
|
|
2
|
+
width: var(--zd_size20) ;
|
|
3
|
+
height: var(--zd_size20) ;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.replyText {
|
|
7
|
-
max-width: var(--zd_size100);
|
|
7
|
+
max-width: var(--zd_size100) ;
|
|
8
8
|
white-space: nowrap;
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
text-overflow: ellipsis;
|
|
11
|
-
font-size: var(--
|
|
12
|
-
}
|
|
13
|
-
.time {
|
|
14
|
-
/*time class*/
|
|
11
|
+
font-size: var(--zd_font_size14) ;
|
|
15
12
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/** ** Constants *** */
|
|
2
|
-
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
2
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
3
3
|
const replyBubbleHeaderDefaultProps = {
|
|
4
|
-
customStyle: dummyObject
|
|
5
|
-
replyText: '',
|
|
6
|
-
time: ''
|
|
4
|
+
customStyle: dummyObject
|
|
7
5
|
};
|
|
8
6
|
export default replyBubbleHeaderDefaultProps;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
const replyBubbleHeaderPropTypes = {
|
|
4
|
+
replyText: PropTypes.string.isRequired,
|
|
4
5
|
customStyle: PropTypes.object,
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
time: PropTypes.string,
|
|
7
|
+
renderCustomReplyIcon: PropTypes.func
|
|
7
8
|
};
|
|
8
9
|
export default replyBubbleHeaderPropTypes;
|
|
@@ -1,52 +1,34 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-no-bind */
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
|
-
|
|
4
1
|
/** ** Libraries *** */
|
|
5
2
|
import React from 'react';
|
|
6
|
-
|
|
7
3
|
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
-
import useTextBubble from '@zohoim/chat-components-hooks/es/TextBubble/useTextBubble';
|
|
10
4
|
|
|
5
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
11
6
|
/** ** Constants *** */
|
|
7
|
+
|
|
12
8
|
import textBubbleDefaultProps from './props/defaultProps';
|
|
13
9
|
import textBubblePropTypes from './props/propTypes';
|
|
14
|
-
|
|
15
|
-
/** ** Methods *** */
|
|
16
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
17
|
-
|
|
18
10
|
/** ** Styles *** */
|
|
11
|
+
|
|
19
12
|
import style from './css/TextBubble.module.css';
|
|
20
13
|
export default function TextBubble(props) {
|
|
21
14
|
const {
|
|
22
|
-
customStyle
|
|
23
|
-
} = props;
|
|
24
|
-
const {
|
|
15
|
+
customStyle,
|
|
25
16
|
moreText,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} =
|
|
17
|
+
message,
|
|
18
|
+
onClickMore
|
|
19
|
+
} = props;
|
|
20
|
+
/* External CSS Customization */
|
|
29
21
|
|
|
30
|
-
/* External customization */
|
|
31
22
|
const newStyle = useMergeStyle(style, customStyle);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
textBubbleClass,
|
|
35
|
-
moreTextClass,
|
|
36
|
-
textBubbleWrapperClass
|
|
37
|
-
} = cssJSLogic(props, newStyle);
|
|
38
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
39
|
-
className: textBubbleWrapperClass
|
|
40
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
41
|
-
className: textBubbleClass
|
|
42
|
-
// eslint-disable-next-line react/no-danger, @zohodesk/zsecurity/no-unsecure-html
|
|
23
|
+
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("span", {
|
|
24
|
+
className: newStyle.textBubble // eslint-disable-next-line react/no-danger, @zohodesk/zsecurity/no-unsecure-html
|
|
43
25
|
,
|
|
44
26
|
dangerouslySetInnerHTML: {
|
|
45
27
|
// __html: HTMLPurifier.sanitize(message)
|
|
46
28
|
__html: message
|
|
47
29
|
}
|
|
48
30
|
}), moreText ? /*#__PURE__*/React.createElement("div", {
|
|
49
|
-
className:
|
|
31
|
+
className: newStyle.moreText,
|
|
50
32
|
onClick: onClickMore
|
|
51
33
|
}, moreText) : null);
|
|
52
34
|
}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
+
.textBubble {
|
|
2
|
+
/* Use this class name for css customisation */
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
.moreText {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
text-transform: uppercase;
|
|
7
|
+
font-size: var(--zd_font_size11) ;
|
|
8
|
+
color: var(--imlib_chat_components_textBubble_see_more_color);
|
|
9
|
+
cursor: pointer;
|
|
6
10
|
}
|
|
7
11
|
|
|
8
|
-
.textBubble a{
|
|
9
|
-
|
|
12
|
+
.textBubble a {
|
|
13
|
+
color: var(--imlib_chat_components_textBubble_url_color);
|
|
10
14
|
}
|
|
11
15
|
|
|
12
|
-
.textBubble a:hover{
|
|
13
|
-
|
|
14
|
-
}
|
|
16
|
+
.textBubble a:hover {
|
|
17
|
+
text-decoration: underline;
|
|
18
|
+
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/** ** Constants *** */
|
|
2
|
-
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
2
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
3
3
|
const textBubbleDefaultProps = {
|
|
4
|
-
customStyle: dummyObject
|
|
5
|
-
moreText: 'See More',
|
|
6
|
-
message: '',
|
|
7
|
-
isShowMoreText: false
|
|
4
|
+
customStyle: dummyObject
|
|
8
5
|
};
|
|
9
6
|
export default textBubbleDefaultProps;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
const textBubblePropTypes = {
|
|
4
|
+
message: PropTypes.string.isRequired,
|
|
4
5
|
customStyle: PropTypes.object,
|
|
5
|
-
|
|
6
|
-
onClickMore: PropTypes.func
|
|
7
|
-
isShowMoreText: PropTypes.string,
|
|
8
|
-
moreText: PropTypes.string
|
|
6
|
+
moreText: PropTypes.string,
|
|
7
|
+
onClickMore: PropTypes.func
|
|
9
8
|
};
|
|
10
9
|
export default textBubblePropTypes;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/** ** Libraries *** */
|
|
2
|
+
import PropTypes from 'prop-types'; // Component Package default mode & themes
|
|
3
|
+
|
|
2
4
|
import '@zohodesk/components/assets/Appearance/default/themes/blue/blueDefaultCTATheme.module.css';
|
|
3
5
|
import '@zohodesk/components/assets/Appearance/default/themes/green/greenDefaultCTATheme.module.css';
|
|
4
6
|
import '@zohodesk/components/assets/Appearance/default/themes/orange/orangeDefaultCTATheme.module.css';
|
|
@@ -9,9 +11,8 @@ import '@zohodesk/components/assets/Appearance/default/themes/green/greenDefault
|
|
|
9
11
|
import '@zohodesk/components/assets/Appearance/default/themes/orange/orangeDefaultComponentTheme.module.css';
|
|
10
12
|
import '@zohodesk/components/assets/Appearance/default/themes/red/redDefaultComponentTheme.module.css';
|
|
11
13
|
import '@zohodesk/components/assets/Appearance/default/themes/yellow/yellowDefaultComponentTheme.module.css';
|
|
12
|
-
import '@zohodesk/components/assets/Appearance/default/mode/defaultMode.module.css';
|
|
14
|
+
import '@zohodesk/components/assets/Appearance/default/mode/defaultMode.module.css'; // Component Package dark mode & themes
|
|
13
15
|
|
|
14
|
-
// Component Package dark mode & themes
|
|
15
16
|
import '@zohodesk/components/assets/Appearance/dark/themes/blue/blueDarkCTATheme.module.css';
|
|
16
17
|
import '@zohodesk/components/assets/Appearance/dark/themes/green/greenDarkCTATheme.module.css';
|
|
17
18
|
import '@zohodesk/components/assets/Appearance/dark/themes/orange/orangeDarkCTATheme.module.css';
|
|
@@ -23,8 +24,8 @@ import '@zohodesk/components/assets/Appearance/dark/themes/orange/orangeDarkComp
|
|
|
23
24
|
import '@zohodesk/components/assets/Appearance/dark/themes/red/redDarkComponentTheme.module.css';
|
|
24
25
|
import '@zohodesk/components/assets/Appearance/dark/themes/yellow/yellowDarkComponentTheme.module.css';
|
|
25
26
|
import '@zohodesk/components/assets/Appearance/dark/mode/darkMode.module.css';
|
|
26
|
-
|
|
27
27
|
/* pure dark mode & theme css */
|
|
28
|
+
|
|
28
29
|
import '@zohodesk/components/assets/Appearance/pureDark/themes/blue/bluePureDarkCTATheme.module.css';
|
|
29
30
|
import '@zohodesk/components/assets/Appearance/pureDark/themes/green/greenPureDarkCTATheme.module.css';
|
|
30
31
|
import '@zohodesk/components/assets/Appearance/pureDark/themes/orange/orangePureDarkCTATheme.module.css';
|
|
@@ -36,8 +37,8 @@ import '@zohodesk/components/assets/Appearance/pureDark/themes/orange/orangePure
|
|
|
36
37
|
import '@zohodesk/components/assets/Appearance/pureDark/themes/red/redPureDarkComponentTheme.module.css';
|
|
37
38
|
import '@zohodesk/components/assets/Appearance/pureDark/themes/yellow/yellowPureDarkComponentTheme.module.css';
|
|
38
39
|
import '@zohodesk/components/assets/Appearance/pureDark/mode/pureDarkMode.module.css';
|
|
39
|
-
|
|
40
40
|
/** ** Desk Components Assets *** */
|
|
41
|
+
|
|
41
42
|
import '@zohodesk/variables/assets/colorVariables.module.css';
|
|
42
43
|
import '@zohodesk/variables/assets/dotVariables.module.css';
|
|
43
44
|
import '@zohodesk/variables/assets/sizeVariables.module.css';
|
|
@@ -50,4 +51,7 @@ export default function DeskAssets(props) {
|
|
|
50
51
|
children
|
|
51
52
|
} = props;
|
|
52
53
|
return children || null;
|
|
53
|
-
}
|
|
54
|
+
}
|
|
55
|
+
DeskAssets.propTypes = {
|
|
56
|
+
children: PropTypes.node
|
|
57
|
+
};
|
package/es/Theme/ThemeWrapper.js
CHANGED
|
@@ -1,91 +1,88 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
/** ** Libraries *** */
|
|
4
|
-
import React from 'react';
|
|
5
|
-
|
|
6
|
-
import sizeVariable from '@zohodesk/theme-defaults/es/sizeVariable';
|
|
7
|
-
import fontSizeVariable from '@zohodesk/theme-defaults/es/fontSizeVariable';
|
|
8
|
-
import fontVariable from '@zohodesk/theme-defaults/es/fontVariable';
|
|
9
|
-
import { transitionVariable, motionTransitionVariable } from '@zohodesk/theme-defaults/es/transitionVariable';
|
|
4
|
+
import React, { useMemo, useCallback } from 'react';
|
|
5
|
+
/** ** Constants *** */
|
|
10
6
|
|
|
11
|
-
// import chatDefaultTheme from './defaultTheme';
|
|
12
|
-
// import chatDarkTheme from './darkTheme';
|
|
13
|
-
import { MSG_ACTION_POPUP_PORTAL } from '../constants';
|
|
14
|
-
import { baseUnitLimit } from './constants';
|
|
15
|
-
import DeskAssets from './DeskAssets';
|
|
16
|
-
import TooltipWrapper from './ToolttipWrapper';
|
|
17
|
-
import { Container } from '@zohodesk/components/es/Layout';
|
|
18
7
|
import themeWrapperPropTypes from './props/propTypes';
|
|
19
8
|
import themeWrapperDefaultProps from './props/defaultProps';
|
|
9
|
+
import { styleTagId } from './constants';
|
|
10
|
+
import { MSG_ACTION_POPUP_PORTAL } from '../constants';
|
|
11
|
+
/** ** Components *** */
|
|
12
|
+
|
|
13
|
+
import ThemeAssets from './ThemeAssets';
|
|
14
|
+
import TooltipWrapper from './TooltipWrapper';
|
|
15
|
+
import { Container } from '@zohodesk/components/es/Layout';
|
|
16
|
+
/** ** Methods *** */
|
|
17
|
+
|
|
20
18
|
import getThemeConfigurations from './utils/getThemeConfigurations';
|
|
21
|
-
import
|
|
22
|
-
|
|
19
|
+
import getCustomizedCssVariables from './utils/getCustomizedCssVariables';
|
|
20
|
+
import getWrapperDivProps from './utils/getWrapperDivProps';
|
|
21
|
+
/** ** Fonts *** */
|
|
23
22
|
|
|
24
23
|
import '../Fonts/puviFont.module.css';
|
|
25
24
|
export default function ThemeWrapper(props) {
|
|
26
25
|
const {
|
|
27
26
|
children,
|
|
28
|
-
|
|
27
|
+
needThemeAssets,
|
|
29
28
|
needTooltip,
|
|
30
29
|
themeConfigurations: propThemeConfigurations,
|
|
31
|
-
mode,
|
|
32
|
-
theme,
|
|
33
|
-
app,
|
|
30
|
+
mode: propMode,
|
|
31
|
+
theme: propTheme,
|
|
34
32
|
modeKey,
|
|
35
33
|
themeKey,
|
|
36
34
|
tooltipCustomStyle
|
|
37
35
|
} = props;
|
|
36
|
+
/** ** containerRef for Tooltip *** */
|
|
37
|
+
|
|
38
38
|
const containerRef = React.useRef(null);
|
|
39
|
+
const getContainerRef = useCallback(() => containerRef.current, []);
|
|
40
|
+
/** ** ThemeConfigurations Handling *** */
|
|
41
|
+
|
|
39
42
|
const {
|
|
40
43
|
themeConfigurations,
|
|
41
|
-
deskMode,
|
|
42
|
-
deskTheme
|
|
43
|
-
} = getThemeConfigurations({
|
|
44
|
-
app,
|
|
45
44
|
mode,
|
|
46
45
|
theme
|
|
46
|
+
} = getThemeConfigurations({
|
|
47
|
+
mode: propMode,
|
|
48
|
+
theme: propTheme
|
|
47
49
|
});
|
|
48
50
|
const configurations = propThemeConfigurations || themeConfigurations;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
/** ** Style Handling *** */
|
|
52
|
+
|
|
53
|
+
const selector = `#${styleTagId}`;
|
|
54
|
+
const prefix = '--imlib_';
|
|
55
|
+
const configuration = useMemo(() => [configurations], [configurations]);
|
|
56
|
+
const customizedVariables = useMemo(() => getCustomizedCssVariables(configuration, prefix), [configuration, prefix]);
|
|
57
|
+
const wrapperDivProps = getWrapperDivProps({
|
|
58
|
+
modeKey,
|
|
59
|
+
themeKey,
|
|
60
|
+
mode,
|
|
61
|
+
theme
|
|
62
|
+
});
|
|
63
|
+
/** ** Children Render Functions *** */
|
|
64
|
+
|
|
65
|
+
const renderPortal = useCallback(() => /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
"data-portal": MSG_ACTION_POPUP_PORTAL
|
|
67
|
+
}), []);
|
|
68
|
+
const renderStyle = useCallback(() => /*#__PURE__*/React.createElement("style", {
|
|
69
|
+
id: "zoho-im-variables"
|
|
70
|
+
}, `${selector}{${customizedVariables}}`), [selector, customizedVariables]);
|
|
71
|
+
const renderAssets = useCallback(() => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(React.Fragment, null, needThemeAssets ? /*#__PURE__*/React.createElement(ThemeAssets, null) : null), /*#__PURE__*/React.createElement(React.Fragment, null, needTooltip ? /*#__PURE__*/React.createElement(TooltipWrapper, {
|
|
72
|
+
containerRef: containerRef.current,
|
|
73
|
+
customStyle: tooltipCustomStyle,
|
|
74
|
+
getContainerRef: getContainerRef
|
|
75
|
+
}) : null)), [getContainerRef, needTooltip, needThemeAssets, tooltipCustomStyle]);
|
|
56
76
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
57
|
-
id:
|
|
77
|
+
id: styleTagId
|
|
58
78
|
}, wrapperDivProps, {
|
|
59
79
|
style: {
|
|
60
80
|
width: '100%',
|
|
61
81
|
height: '100%'
|
|
62
82
|
}
|
|
63
|
-
}), /*#__PURE__*/React.createElement(
|
|
64
|
-
// i18n={i18n}
|
|
65
|
-
, {
|
|
66
|
-
datePattern: "DD/MM/YYYY",
|
|
67
|
-
isEnabledCurrentYear: true,
|
|
68
|
-
timeFormat: "hh:mm",
|
|
69
|
-
timeZone: "Asia/Kolkata"
|
|
70
|
-
// tzdata should already have been fetched and set as default
|
|
71
|
-
// tzData={datetime.tz.data()}
|
|
72
|
-
}, /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
73
|
-
configuration: [sizeVariable(baseUnitLimit.size), fontSizeVariable(baseUnitLimit.fontSize), fontVariable, transitionVariable(baseUnitLimit.transition), motionTransitionVariable(baseUnitLimit.motionTransition), configurations
|
|
74
|
-
// themeConfigration
|
|
75
|
-
// chatDarkTheme
|
|
76
|
-
],
|
|
77
|
-
|
|
78
|
-
prefix: "--imlib_",
|
|
79
|
-
selector: "#chat-components"
|
|
80
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
83
|
+
}), renderStyle(), /*#__PURE__*/React.createElement(Container, {
|
|
81
84
|
eleRef: containerRef
|
|
82
|
-
}, children),
|
|
83
|
-
"data-portal": MSG_ACTION_POPUP_PORTAL
|
|
84
|
-
}), needDeskAssets ? /*#__PURE__*/React.createElement(DeskAssets, null) : null, needTooltip ? /*#__PURE__*/React.createElement(TooltipWrapper, {
|
|
85
|
-
containerRef: containerRef.current,
|
|
86
|
-
customStyle: tooltipCustomStyle,
|
|
87
|
-
getContainerRef: getContainerRef
|
|
88
|
-
}) : null)));
|
|
85
|
+
}, children), renderPortal(), renderAssets());
|
|
89
86
|
}
|
|
90
87
|
ThemeWrapper.propTypes = themeWrapperPropTypes;
|
|
91
88
|
ThemeWrapper.defaultProps = themeWrapperDefaultProps;
|
|
@@ -1,81 +1,85 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
/** ** Libraries *** */
|
|
4
4
|
import React from 'react';
|
|
5
|
-
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
6
|
/** ** Components *** */
|
|
7
|
-
import Tooltip from '@zohodesk/components/es/Tooltip/Tooltip';
|
|
8
7
|
|
|
8
|
+
import Tooltip from '@zohodesk/components/es/Tooltip/Tooltip';
|
|
9
9
|
/** ** Hooks *** */
|
|
10
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
11
10
|
|
|
11
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
12
12
|
/** ** Methods *** */
|
|
13
|
+
|
|
13
14
|
import { setLibraryConfig, getLibraryConfig } from '@zohodesk/components/lib/Provider/Config';
|
|
14
|
-
|
|
15
|
+
/** ** Constants *** */
|
|
15
16
|
|
|
17
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
16
18
|
/** ** Styles *** */
|
|
19
|
+
|
|
17
20
|
import style from './css/TooltipWrapper.module.css';
|
|
18
21
|
export default function TooltipWrapper(props) {
|
|
19
22
|
const {
|
|
20
23
|
getContainerRef,
|
|
21
|
-
customStyle =
|
|
24
|
+
customStyle = dummyObject
|
|
22
25
|
} = props;
|
|
23
|
-
const containerRef = getContainerRef();
|
|
24
26
|
let timer = null;
|
|
25
27
|
const tooltipRef = React.useRef(null);
|
|
26
28
|
setLibraryConfig({
|
|
27
29
|
getTooltipContainer: () => getContainerRef()
|
|
28
30
|
});
|
|
31
|
+
|
|
29
32
|
function handleMouseOverDispatch(e) {
|
|
30
33
|
const containerRef = getContainerRef();
|
|
34
|
+
|
|
31
35
|
if (tooltipRef && tooltipRef.current) {
|
|
32
36
|
tooltipRef.current.handleOver(e, containerRef);
|
|
33
37
|
}
|
|
34
38
|
}
|
|
39
|
+
|
|
35
40
|
function handleOver(e) {
|
|
36
41
|
if (timer) {
|
|
37
42
|
timer = clearTimeout(timer);
|
|
38
43
|
}
|
|
44
|
+
|
|
39
45
|
timer = setTimeout(() => handleMouseOverDispatch(e), getLibraryConfig('tooltipDebounce'));
|
|
40
46
|
}
|
|
47
|
+
|
|
41
48
|
function removeTimeout() {
|
|
42
49
|
if (timer) {
|
|
43
50
|
timer = clearTimeout(timer);
|
|
44
51
|
}
|
|
45
|
-
}
|
|
52
|
+
} // componentDidMount and componentWillUnmount case
|
|
53
|
+
|
|
46
54
|
|
|
47
|
-
// componentDidMount and componentWillUnmount case
|
|
48
55
|
React.useEffect(() => {
|
|
49
56
|
const containerRef = getContainerRef();
|
|
57
|
+
|
|
50
58
|
if (containerRef) {
|
|
51
59
|
containerRef.addEventListener('mouseover', handleOver, false);
|
|
52
60
|
containerRef.addEventListener('mouseout', removeTimeout, false);
|
|
53
61
|
tooltipRef.current.observeElement();
|
|
54
62
|
}
|
|
63
|
+
|
|
55
64
|
return () => {
|
|
56
65
|
if (containerRef) {
|
|
57
66
|
containerRef.removeEventListener('mouseover', handleOver, false);
|
|
58
|
-
containerRef.removeEventListener('mouseout', removeTimeout, false);
|
|
67
|
+
containerRef.removeEventListener('mouseout', removeTimeout, false); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
|
+
|
|
59
69
|
tooltipRef.current.unObserveElement();
|
|
60
70
|
}
|
|
61
|
-
};
|
|
62
|
-
}, [
|
|
71
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
72
|
+
}, []);
|
|
73
|
+
/* External CSS Customization */
|
|
63
74
|
|
|
64
|
-
/* External customization */
|
|
65
75
|
const newStyle = useMergeStyle(style, customStyle);
|
|
66
|
-
|
|
67
|
-
/* CSS classnames added based on logic */
|
|
68
|
-
const {
|
|
69
|
-
tooltipClass,
|
|
70
|
-
tooltipWrapperClass
|
|
71
|
-
} = cssJSLogic(props, newStyle);
|
|
72
76
|
return /*#__PURE__*/React.createElement("div", {
|
|
73
|
-
className:
|
|
77
|
+
className: newStyle.tooltipWrapper
|
|
74
78
|
}, /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
75
79
|
ref: tooltipRef
|
|
76
|
-
}, props
|
|
77
|
-
customClass: tooltipClass
|
|
78
|
-
})));
|
|
80
|
+
}, props)));
|
|
79
81
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
TooltipWrapper.propTypes = {
|
|
83
|
+
customStyle: PropTypes.object,
|
|
84
|
+
getContainerRef: PropTypes.func
|
|
85
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export const styleTagId = 'im-chat-components';
|
|
1
2
|
export const baseUnitLimit = {
|
|
2
3
|
size: {
|
|
3
4
|
base: 16,
|
|
@@ -20,10 +21,6 @@ export const baseUnitLimit = {
|
|
|
20
21
|
limit: 20
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
|
-
export const appConstants = {
|
|
24
|
-
DESK: 'DESK',
|
|
25
|
-
CRM: 'CRM'
|
|
26
|
-
};
|
|
27
24
|
export const modeConstants = {
|
|
28
25
|
LIGHT: 'LIGHT',
|
|
29
26
|
DARK: 'DARK',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, outgoingBubbleBgColor,
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, actionIconWrapperBgColor, actionIconWrapperBorderColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messageStatusReadColor } from './commonColorVariable';
|
|
3
3
|
export default {
|
|
4
4
|
library: 'chat_components',
|
|
5
5
|
variables: {
|
|
@@ -14,10 +14,10 @@ export default {
|
|
|
14
14
|
failed_bg_color: '#fcebeb',
|
|
15
15
|
text_color: '#000'
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
color:
|
|
19
|
-
bg_color:
|
|
20
|
-
border_color:
|
|
17
|
+
actionIconWrapper: {
|
|
18
|
+
color: actionIconWrapperColor,
|
|
19
|
+
bg_color: actionIconWrapperBgColor,
|
|
20
|
+
border_color: actionIconWrapperBorderColor
|
|
21
21
|
},
|
|
22
22
|
messageStatus: {
|
|
23
23
|
send_color: messageStatusSendColor,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, outgoingBubbleBgColor,
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, actionIconWrapperBgColor, actionIconWrapperBorderColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor } from './commonColorVariable';
|
|
3
3
|
export default {
|
|
4
4
|
library: 'chat_components',
|
|
5
5
|
variables: {
|
|
@@ -14,10 +14,10 @@ export default {
|
|
|
14
14
|
failed_bg_color: '#fcebeb',
|
|
15
15
|
text_color: '#000'
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
color:
|
|
19
|
-
bg_color:
|
|
20
|
-
border_color:
|
|
17
|
+
actionIconWrapper: {
|
|
18
|
+
color: actionIconWrapperColor,
|
|
19
|
+
bg_color: actionIconWrapperBgColor,
|
|
20
|
+
border_color: actionIconWrapperBorderColor
|
|
21
21
|
},
|
|
22
22
|
messageStatus: {
|
|
23
23
|
send_color: messageStatusSendColor,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const incomingBubbleBgColor = '#232b38';
|
|
2
|
-
export const outgoingBubbleBgColor = '#2c3b4d';
|
|
3
|
-
|
|
2
|
+
export const outgoingBubbleBgColor = '#2c3b4d'; // greenTheme, tealTheme
|
|
3
|
+
|
|
4
4
|
export const outgoingBubbleBgColor2 = '#26373b';
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
5
|
+
export const actionIconWrapperColor = '#e2e4e6';
|
|
6
|
+
export const actionIconWrapperBgColor = '#2c3b4d';
|
|
7
|
+
export const actionIconWrapperBorderColor = '#3f536b';
|
|
8
8
|
export const bubbleActiveBgColor = '#1b2e33';
|
|
9
9
|
export const messageStatusSendColor = '#61667a';
|
|
10
10
|
export const messageStatusFailedColor = '#de3535';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { incomingBubbleBgColor, outgoingBubbleBgColor,
|
|
2
|
+
import { incomingBubbleBgColor, outgoingBubbleBgColor, actionIconWrapperBgColor, actionIconWrapperBorderColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, messageStatusReadColor } from './commonColorVariable';
|
|
3
3
|
export default {
|
|
4
4
|
library: 'chat_components',
|
|
5
5
|
variables: {
|
|
@@ -14,10 +14,10 @@ export default {
|
|
|
14
14
|
failed_bg_color: '#fcebeb',
|
|
15
15
|
text_color: '#000'
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
color:
|
|
19
|
-
bg_color:
|
|
20
|
-
border_color:
|
|
17
|
+
actionIconWrapper: {
|
|
18
|
+
color: actionIconWrapperColor,
|
|
19
|
+
bg_color: actionIconWrapperBgColor,
|
|
20
|
+
border_color: actionIconWrapperBorderColor
|
|
21
21
|
},
|
|
22
22
|
messageStatus: {
|
|
23
23
|
send_color: messageStatusSendColor,
|