@botonic/react 0.24.0-alpha.3 → 0.24.0-alpha.5
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/lib/cjs/components/index-types.d.ts +3 -1
- package/lib/cjs/components/index-types.js.map +1 -1
- package/lib/cjs/components/{message.js → message/index.js} +20 -66
- package/lib/cjs/components/message/index.js.map +1 -0
- package/lib/cjs/components/message/message-image.d.ts +7 -0
- package/lib/cjs/components/message/message-image.js +23 -0
- package/lib/cjs/components/message/message-image.js.map +1 -0
- package/lib/cjs/components/message/styles.d.ts +8 -0
- package/lib/cjs/components/message/styles.js +77 -0
- package/lib/cjs/components/message/styles.js.map +1 -0
- package/lib/cjs/components/message/timestamps.d.ts +13 -0
- package/lib/cjs/components/message/timestamps.js +45 -0
- package/lib/cjs/components/message/timestamps.js.map +1 -0
- package/lib/cjs/constants.d.ts +2 -0
- package/lib/cjs/constants.js +3 -0
- package/lib/cjs/constants.js.map +1 -1
- package/lib/cjs/index-types.d.ts +1 -1
- package/lib/cjs/webchat/components/styled-scrollbar.js +1 -1
- package/lib/cjs/webchat/components/styled-scrollbar.js.map +1 -1
- package/lib/cjs/webchat/devices/device-adapter.js +0 -4
- package/lib/cjs/webchat/devices/device-adapter.js.map +1 -1
- package/lib/cjs/webchat/message-list/index.js +1 -1
- package/lib/cjs/webchat/message-list/index.js.map +1 -1
- package/lib/cjs/webchat/message-list/unread-messages-banner.js +8 -0
- package/lib/cjs/webchat/message-list/unread-messages-banner.js.map +1 -1
- package/lib/cjs/webchat/replies.js +1 -1
- package/lib/cjs/webchat/replies.js.map +1 -1
- package/lib/cjs/webchat/trigger-button/index.js +3 -2
- package/lib/cjs/webchat/trigger-button/index.js.map +1 -1
- package/lib/cjs/webchat/webchat.js +1 -3
- package/lib/cjs/webchat/webchat.js.map +1 -1
- package/lib/esm/app.d.ts +2 -0
- package/lib/esm/app.js +6 -0
- package/lib/esm/app.js.map +1 -0
- package/lib/esm/assets/index-types.d.ts +4 -0
- package/lib/esm/assets/index-types.js +2 -0
- package/lib/esm/assets/index-types.js.map +1 -0
- package/lib/esm/botonic-tester.d.ts +18 -0
- package/lib/esm/botonic-tester.js +62 -0
- package/lib/esm/botonic-tester.js.map +1 -0
- package/lib/esm/components/audio.d.ts +8 -0
- package/lib/esm/components/audio.js +18 -0
- package/lib/esm/components/audio.js.map +1 -0
- package/lib/esm/components/button.d.ts +15 -0
- package/lib/esm/components/button.js +140 -0
- package/lib/esm/components/button.js.map +1 -0
- package/lib/esm/components/buttons-disabler.d.ts +24 -0
- package/lib/esm/components/buttons-disabler.js +84 -0
- package/lib/esm/components/buttons-disabler.js.map +1 -0
- package/lib/esm/components/carousel.d.ts +10 -0
- package/lib/esm/components/carousel.js +102 -0
- package/lib/esm/components/carousel.js.map +1 -0
- package/lib/esm/components/components.d.ts +12 -0
- package/lib/esm/components/components.js +17 -0
- package/lib/esm/components/components.js.map +1 -0
- package/lib/esm/components/custom-message.d.ts +12 -0
- package/lib/esm/components/custom-message.js +55 -0
- package/lib/esm/components/custom-message.js.map +1 -0
- package/lib/esm/components/document.d.ts +8 -0
- package/lib/esm/components/document.js +42 -0
- package/lib/esm/components/document.js.map +1 -0
- package/lib/esm/components/element.d.ts +4 -0
- package/lib/esm/components/element.js +51 -0
- package/lib/esm/components/element.js.map +1 -0
- package/lib/esm/components/handoff.d.ts +1 -0
- package/lib/esm/components/handoff.js +49 -0
- package/lib/esm/components/handoff.js.map +1 -0
- package/lib/esm/components/image.d.ts +8 -0
- package/lib/esm/components/image.js +35 -0
- package/lib/esm/components/image.js.map +1 -0
- package/lib/esm/components/index-types.d.ts +191 -0
- package/lib/esm/components/index-types.js +16 -0
- package/lib/esm/components/index-types.js.map +1 -0
- package/lib/esm/components/index.d.ts +23 -0
- package/lib/esm/components/index.js +24 -0
- package/lib/esm/components/index.js.map +1 -0
- package/lib/esm/components/location.d.ts +11 -0
- package/lib/esm/components/location.js +27 -0
- package/lib/esm/components/location.js.map +1 -0
- package/lib/esm/components/markdown.d.ts +7 -0
- package/lib/esm/components/markdown.js +152 -0
- package/lib/esm/components/markdown.js.map +1 -0
- package/lib/esm/components/message/index.d.ts +1 -0
- package/lib/esm/components/message/index.js +142 -0
- package/lib/esm/components/message/index.js.map +1 -0
- package/lib/esm/components/message/message-image.d.ts +7 -0
- package/lib/esm/components/message/message-image.js +19 -0
- package/lib/esm/components/message/message-image.js.map +1 -0
- package/lib/esm/components/message/styles.d.ts +8 -0
- package/lib/esm/components/message/styles.js +73 -0
- package/lib/esm/components/message/styles.js.map +1 -0
- package/lib/esm/components/message/timestamps.d.ts +13 -0
- package/lib/esm/components/message/timestamps.js +40 -0
- package/lib/esm/components/message/timestamps.js.map +1 -0
- package/lib/esm/components/message-template.d.ts +1 -0
- package/lib/esm/components/message-template.js +9 -0
- package/lib/esm/components/message-template.js.map +1 -0
- package/lib/esm/components/multichannel/facebook/facebook.d.ts +17 -0
- package/lib/esm/components/multichannel/facebook/facebook.js +43 -0
- package/lib/esm/components/multichannel/facebook/facebook.js.map +1 -0
- package/lib/esm/components/multichannel/index-types.d.ts +46 -0
- package/lib/esm/components/multichannel/index-types.js +2 -0
- package/lib/esm/components/multichannel/index-types.js.map +1 -0
- package/lib/esm/components/multichannel/index.d.ts +11 -0
- package/lib/esm/components/multichannel/index.js +12 -0
- package/lib/esm/components/multichannel/index.js.map +1 -0
- package/lib/esm/components/multichannel/multichannel-button.d.ts +1 -0
- package/lib/esm/components/multichannel/multichannel-button.js +71 -0
- package/lib/esm/components/multichannel/multichannel-button.js.map +1 -0
- package/lib/esm/components/multichannel/multichannel-carousel.d.ts +1 -0
- package/lib/esm/components/multichannel/multichannel-carousel.js +73 -0
- package/lib/esm/components/multichannel/multichannel-carousel.js.map +1 -0
- package/lib/esm/components/multichannel/multichannel-context.d.ts +11 -0
- package/lib/esm/components/multichannel/multichannel-context.js +12 -0
- package/lib/esm/components/multichannel/multichannel-context.js.map +1 -0
- package/lib/esm/components/multichannel/multichannel-reply.d.ts +1 -0
- package/lib/esm/components/multichannel/multichannel-reply.js +20 -0
- package/lib/esm/components/multichannel/multichannel-reply.js.map +1 -0
- package/lib/esm/components/multichannel/multichannel-text.d.ts +1 -0
- package/lib/esm/components/multichannel/multichannel-text.js +153 -0
- package/lib/esm/components/multichannel/multichannel-text.js.map +1 -0
- package/lib/esm/components/multichannel/multichannel-utils.d.ts +26 -0
- package/lib/esm/components/multichannel/multichannel-utils.js +69 -0
- package/lib/esm/components/multichannel/multichannel-utils.js.map +1 -0
- package/lib/esm/components/multichannel/multichannel.d.ts +1 -0
- package/lib/esm/components/multichannel/multichannel.js +55 -0
- package/lib/esm/components/multichannel/multichannel.js.map +1 -0
- package/lib/esm/components/multichannel/whatsapp/markdown.d.ts +1 -0
- package/lib/esm/components/multichannel/whatsapp/markdown.js +53 -0
- package/lib/esm/components/multichannel/whatsapp/markdown.js.map +1 -0
- package/lib/esm/components/pic.d.ts +6 -0
- package/lib/esm/components/pic.js +25 -0
- package/lib/esm/components/pic.js.map +1 -0
- package/lib/esm/components/raw.d.ts +9 -0
- package/lib/esm/components/raw.js +39 -0
- package/lib/esm/components/raw.js.map +1 -0
- package/lib/esm/components/reply.d.ts +9 -0
- package/lib/esm/components/reply.js +49 -0
- package/lib/esm/components/reply.js.map +1 -0
- package/lib/esm/components/share-button.d.ts +1 -0
- package/lib/esm/components/share-button.js +9 -0
- package/lib/esm/components/share-button.js.map +1 -0
- package/lib/esm/components/subtitle.d.ts +6 -0
- package/lib/esm/components/subtitle.js +19 -0
- package/lib/esm/components/subtitle.js.map +1 -0
- package/lib/esm/components/text.d.ts +8 -0
- package/lib/esm/components/text.js +42 -0
- package/lib/esm/components/text.js.map +1 -0
- package/lib/esm/components/title.d.ts +6 -0
- package/lib/esm/components/title.js +17 -0
- package/lib/esm/components/title.js.map +1 -0
- package/lib/esm/components/video.d.ts +8 -0
- package/lib/esm/components/video.js +26 -0
- package/lib/esm/components/video.js.map +1 -0
- package/lib/esm/components/webchat-settings.d.ts +3 -0
- package/lib/esm/components/webchat-settings.js +69 -0
- package/lib/esm/components/webchat-settings.js.map +1 -0
- package/lib/esm/components/whatsapp-button-list.d.ts +17 -0
- package/lib/esm/components/whatsapp-button-list.js +22 -0
- package/lib/esm/components/whatsapp-button-list.js.map +1 -0
- package/lib/esm/components/whatsapp-template.d.ts +1 -0
- package/lib/esm/components/whatsapp-template.js +20 -0
- package/lib/esm/components/whatsapp-template.js.map +1 -0
- package/lib/esm/constants.d.ts +174 -0
- package/lib/esm/constants.js +195 -0
- package/lib/esm/constants.js.map +1 -0
- package/lib/esm/contexts.d.ts +12 -0
- package/lib/esm/contexts.js +67 -0
- package/lib/esm/contexts.js.map +1 -0
- package/lib/esm/dev-app.d.ts +30 -0
- package/lib/esm/dev-app.js +74 -0
- package/lib/esm/dev-app.js.map +1 -0
- package/lib/esm/index-types.d.ts +128 -0
- package/lib/esm/index-types.js +12 -0
- package/lib/esm/index-types.js.map +1 -0
- package/lib/esm/index.d.ts +11 -0
- package/lib/esm/index.js +12 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/message-utils.d.ts +19 -0
- package/lib/esm/message-utils.js +41 -0
- package/lib/esm/message-utils.js.map +1 -0
- package/lib/esm/msg-to-botonic.d.ts +18 -0
- package/lib/esm/msg-to-botonic.js +135 -0
- package/lib/esm/msg-to-botonic.js.map +1 -0
- package/lib/esm/node-app.d.ts +12 -0
- package/lib/esm/node-app.js +21 -0
- package/lib/esm/node-app.js.map +1 -0
- package/lib/esm/react-bot.d.ts +8 -0
- package/lib/esm/react-bot.js +29 -0
- package/lib/esm/react-bot.js.map +1 -0
- package/lib/esm/util/dom.d.ts +13 -0
- package/lib/esm/util/dom.js +46 -0
- package/lib/esm/util/dom.js.map +1 -0
- package/lib/esm/util/environment.d.ts +6 -0
- package/lib/esm/util/environment.js +61 -0
- package/lib/esm/util/environment.js.map +1 -0
- package/lib/esm/util/error-boundary.d.ts +7 -0
- package/lib/esm/util/error-boundary.js +28 -0
- package/lib/esm/util/error-boundary.js.map +1 -0
- package/lib/esm/util/index.d.ts +8 -0
- package/lib/esm/util/index.js +9 -0
- package/lib/esm/util/index.js.map +1 -0
- package/lib/esm/util/logs.d.ts +2 -0
- package/lib/esm/util/logs.js +15 -0
- package/lib/esm/util/logs.js.map +1 -0
- package/lib/esm/util/objects.d.ts +3 -0
- package/lib/esm/util/objects.js +38 -0
- package/lib/esm/util/objects.js.map +1 -0
- package/lib/esm/util/react.d.ts +12 -0
- package/lib/esm/util/react.js +34 -0
- package/lib/esm/util/react.js.map +1 -0
- package/lib/esm/util/regexs.d.ts +2 -0
- package/lib/esm/util/regexs.js +18 -0
- package/lib/esm/util/regexs.js.map +1 -0
- package/lib/esm/util/webchat.d.ts +11 -0
- package/lib/esm/util/webchat.js +53 -0
- package/lib/esm/util/webchat.js.map +1 -0
- package/lib/esm/webchat/actions.d.ts +27 -0
- package/lib/esm/webchat/actions.js +29 -0
- package/lib/esm/webchat/actions.js.map +1 -0
- package/lib/esm/webchat/components/attachment.d.ts +5 -0
- package/lib/esm/webchat/components/attachment.js +24 -0
- package/lib/esm/webchat/components/attachment.js.map +1 -0
- package/lib/esm/webchat/components/common.d.ts +1 -0
- package/lib/esm/webchat/components/common.js +9 -0
- package/lib/esm/webchat/components/common.js.map +1 -0
- package/lib/esm/webchat/components/conditional-animation.d.ts +1 -0
- package/lib/esm/webchat/components/conditional-animation.js +12 -0
- package/lib/esm/webchat/components/conditional-animation.js.map +1 -0
- package/lib/esm/webchat/components/emoji-picker.d.ts +5 -0
- package/lib/esm/webchat/components/emoji-picker.js +37 -0
- package/lib/esm/webchat/components/emoji-picker.js.map +1 -0
- package/lib/esm/webchat/components/persistent-menu.d.ts +10 -0
- package/lib/esm/webchat/components/persistent-menu.js +39 -0
- package/lib/esm/webchat/components/persistent-menu.js.map +1 -0
- package/lib/esm/webchat/components/send-button.d.ts +3 -0
- package/lib/esm/webchat/components/send-button.js +14 -0
- package/lib/esm/webchat/components/send-button.js.map +1 -0
- package/lib/esm/webchat/components/styled-scrollbar.d.ts +1 -0
- package/lib/esm/webchat/components/styled-scrollbar.js +50 -0
- package/lib/esm/webchat/components/styled-scrollbar.js.map +1 -0
- package/lib/esm/webchat/components/typing-indicator.d.ts +1 -0
- package/lib/esm/webchat/components/typing-indicator.js +6 -0
- package/lib/esm/webchat/components/typing-indicator.js.map +1 -0
- package/lib/esm/webchat/devices/device-adapter.d.ts +12 -0
- package/lib/esm/webchat/devices/device-adapter.js +39 -0
- package/lib/esm/webchat/devices/device-adapter.js.map +1 -0
- package/lib/esm/webchat/devices/index.d.ts +11 -0
- package/lib/esm/webchat/devices/index.js +18 -0
- package/lib/esm/webchat/devices/index.js.map +1 -0
- package/lib/esm/webchat/devices/scrollbar-controller.d.ts +12 -0
- package/lib/esm/webchat/devices/scrollbar-controller.js +99 -0
- package/lib/esm/webchat/devices/scrollbar-controller.js.map +1 -0
- package/lib/esm/webchat/devices/webchat-resizer.d.ts +9 -0
- package/lib/esm/webchat/devices/webchat-resizer.js +43 -0
- package/lib/esm/webchat/devices/webchat-resizer.js.map +1 -0
- package/lib/esm/webchat/header.d.ts +3 -0
- package/lib/esm/webchat/header.js +79 -0
- package/lib/esm/webchat/header.js.map +1 -0
- package/lib/esm/webchat/hooks/index.d.ts +5 -0
- package/lib/esm/webchat/hooks/index.js +6 -0
- package/lib/esm/webchat/hooks/index.js.map +1 -0
- package/lib/esm/webchat/hooks/use-component-visible.d.ts +8 -0
- package/lib/esm/webchat/hooks/use-component-visible.js +20 -0
- package/lib/esm/webchat/hooks/use-component-visible.js.map +1 -0
- package/lib/esm/webchat/hooks/use-component-will-mount.d.ts +1 -0
- package/lib/esm/webchat/hooks/use-component-will-mount.js +5 -0
- package/lib/esm/webchat/hooks/use-component-will-mount.js.map +1 -0
- package/lib/esm/webchat/hooks/use-previous.d.ts +1 -0
- package/lib/esm/webchat/hooks/use-previous.js +9 -0
- package/lib/esm/webchat/hooks/use-previous.js.map +1 -0
- package/lib/esm/webchat/hooks/use-typing.d.ts +10 -0
- package/lib/esm/webchat/hooks/use-typing.js +26 -0
- package/lib/esm/webchat/hooks/use-typing.js.map +1 -0
- package/lib/esm/webchat/hooks/use-webchat.d.ts +41 -0
- package/lib/esm/webchat/hooks/use-webchat.js +177 -0
- package/lib/esm/webchat/hooks/use-webchat.js.map +1 -0
- package/lib/esm/webchat/index-types.d.ts +62 -0
- package/lib/esm/webchat/index-types.js +2 -0
- package/lib/esm/webchat/index-types.js.map +1 -0
- package/lib/esm/webchat/index.d.ts +4 -0
- package/lib/esm/webchat/index.js +10 -0
- package/lib/esm/webchat/index.js.map +1 -0
- package/lib/esm/webchat/message-list/index.d.ts +1 -0
- package/lib/esm/webchat/message-list/index.js +73 -0
- package/lib/esm/webchat/message-list/index.js.map +1 -0
- package/lib/esm/webchat/message-list/intro-message.d.ts +1 -0
- package/lib/esm/webchat/message-list/intro-message.js +18 -0
- package/lib/esm/webchat/message-list/intro-message.js.map +1 -0
- package/lib/esm/webchat/message-list/scroll-button.d.ts +5 -0
- package/lib/esm/webchat/message-list/scroll-button.js +17 -0
- package/lib/esm/webchat/message-list/scroll-button.js.map +1 -0
- package/lib/esm/webchat/message-list/styles.d.ts +4 -0
- package/lib/esm/webchat/message-list/styles.js +46 -0
- package/lib/esm/webchat/message-list/styles.js.map +1 -0
- package/lib/esm/webchat/message-list/unread-messages-banner.d.ts +6 -0
- package/lib/esm/webchat/message-list/unread-messages-banner.js +24 -0
- package/lib/esm/webchat/message-list/unread-messages-banner.js.map +1 -0
- package/lib/esm/webchat/message-list/use-debounce.d.ts +1 -0
- package/lib/esm/webchat/message-list/use-debounce.js +14 -0
- package/lib/esm/webchat/message-list/use-debounce.js.map +1 -0
- package/lib/esm/webchat/messages-reducer.d.ts +6 -0
- package/lib/esm/webchat/messages-reducer.js +82 -0
- package/lib/esm/webchat/messages-reducer.js.map +1 -0
- package/lib/esm/webchat/replies.d.ts +1 -0
- package/lib/esm/webchat/replies.js +38 -0
- package/lib/esm/webchat/replies.js.map +1 -0
- package/lib/esm/webchat/session-view.d.ts +1 -0
- package/lib/esm/webchat/session-view.js +96 -0
- package/lib/esm/webchat/session-view.js.map +1 -0
- package/lib/esm/webchat/trigger-button/index.d.ts +1 -0
- package/lib/esm/webchat/trigger-button/index.js +28 -0
- package/lib/esm/webchat/trigger-button/index.js.map +1 -0
- package/lib/esm/webchat/trigger-button/styles.d.ts +3 -0
- package/lib/esm/webchat/trigger-button/styles.js +36 -0
- package/lib/esm/webchat/trigger-button/styles.js.map +1 -0
- package/lib/esm/webchat/use-storage-state-hook.d.ts +1 -0
- package/lib/esm/webchat/use-storage-state-hook.js +38 -0
- package/lib/esm/webchat/use-storage-state-hook.js.map +1 -0
- package/lib/esm/webchat/webchat-dev.d.ts +7 -0
- package/lib/esm/webchat/webchat-dev.js +56 -0
- package/lib/esm/webchat/webchat-dev.js.map +1 -0
- package/lib/esm/webchat/webchat-reducer.d.ts +6 -0
- package/lib/esm/webchat/webchat-reducer.js +46 -0
- package/lib/esm/webchat/webchat-reducer.js.map +1 -0
- package/lib/esm/webchat/webchat.d.ts +3 -0
- package/lib/esm/webchat/webchat.js +635 -0
- package/lib/esm/webchat/webchat.js.map +1 -0
- package/lib/esm/webchat/webview.d.ts +2 -0
- package/lib/esm/webchat/webview.js +78 -0
- package/lib/esm/webchat/webview.js.map +1 -0
- package/lib/esm/webchat-app.d.ts +99 -0
- package/lib/esm/webchat-app.js +281 -0
- package/lib/esm/webchat-app.js.map +1 -0
- package/lib/esm/webview-app.d.ts +7 -0
- package/lib/esm/webview-app.js +95 -0
- package/lib/esm/webview-app.js.map +1 -0
- package/package.json +2 -2
- package/src/.DS_Store +0 -0
- package/src/components/index-types.ts +3 -1
- package/src/components/{message.jsx → message/index.jsx} +27 -93
- package/src/components/message/message-image.tsx +56 -0
- package/src/components/message/styles.ts +81 -0
- package/src/components/message/timestamps.tsx +100 -0
- package/src/constants.js +3 -0
- package/src/index-types.ts +1 -1
- package/src/webchat/components/styled-scrollbar.jsx +1 -1
- package/src/webchat/devices/device-adapter.js +0 -4
- package/src/webchat/message-list/index.tsx +1 -1
- package/src/webchat/message-list/unread-messages-banner.tsx +10 -1
- package/src/webchat/replies.jsx +1 -3
- package/src/webchat/trigger-button/index.tsx +10 -5
- package/src/webchat/webchat.jsx +4 -4
- package/lib/cjs/components/message.js.map +0 -1
- package/lib/cjs/components/timestamps.d.ts +0 -10
- package/lib/cjs/components/timestamps.js +0 -51
- package/lib/cjs/components/timestamps.js.map +0 -1
- package/src/components/timestamps.jsx +0 -68
- /package/lib/cjs/components/{message.d.ts → message/index.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botonic/react",
|
|
3
|
-
"version": "0.24.0-alpha.
|
|
3
|
+
"version": "0.24.0-alpha.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Build Chatbots using React",
|
|
6
6
|
"main": "./lib/cjs",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@botonic/core": "0.23.2-alpha.0",
|
|
39
|
-
"axios": "^1.
|
|
39
|
+
"axios": "^1.6.0",
|
|
40
40
|
"emoji-picker-react": "^4.4.9",
|
|
41
41
|
"framer-motion": "^3.1.1",
|
|
42
42
|
"he": "^1.2.0",
|
package/src/.DS_Store
ADDED
|
Binary file
|
|
@@ -124,11 +124,13 @@ export interface ThemeProps extends StyleProp {
|
|
|
124
124
|
CustomProp
|
|
125
125
|
message?: {
|
|
126
126
|
bot?: BlobProps & ImageProp & StyleProp
|
|
127
|
+
agent?: ImageProp
|
|
127
128
|
user?: BlobProps & StyleProp
|
|
128
129
|
customTypes?: React.ComponentType[]
|
|
129
130
|
} & StyleProp & {
|
|
130
131
|
timestamps?: {
|
|
131
|
-
|
|
132
|
+
EnableProp
|
|
133
|
+
withImage?: boolean
|
|
132
134
|
format: () => string
|
|
133
135
|
} & StyleProp
|
|
134
136
|
}
|
|
@@ -1,73 +1,27 @@
|
|
|
1
1
|
import { INPUT, isBrowser } from '@botonic/core'
|
|
2
2
|
import React, { useContext, useEffect, useState } from 'react'
|
|
3
3
|
import Fade from 'react-reveal/Fade'
|
|
4
|
-
import styled from 'styled-components'
|
|
5
4
|
import { v4 as uuidv4 } from 'uuid'
|
|
6
5
|
|
|
7
|
-
import { COLORS, WEBCHAT } from '
|
|
8
|
-
import { RequestContext, WebchatContext } from '
|
|
9
|
-
import { SENDERS } from '
|
|
10
|
-
import { isDev
|
|
11
|
-
import { ConditionalWrapper, renderComponent } from '
|
|
12
|
-
import { Button } from '
|
|
13
|
-
import { ButtonsDisabler } from '
|
|
14
|
-
import { getMarkdownStyle, renderLinks, renderMarkdown } from '
|
|
15
|
-
import { Reply } from '
|
|
6
|
+
import { COLORS, WEBCHAT } from '../../constants'
|
|
7
|
+
import { RequestContext, WebchatContext } from '../../contexts'
|
|
8
|
+
import { SENDERS } from '../../index-types'
|
|
9
|
+
import { isDev } from '../../util/environment'
|
|
10
|
+
import { ConditionalWrapper, renderComponent } from '../../util/react'
|
|
11
|
+
import { Button } from '../button'
|
|
12
|
+
import { ButtonsDisabler } from '../buttons-disabler'
|
|
13
|
+
import { getMarkdownStyle, renderLinks, renderMarkdown } from '../markdown'
|
|
14
|
+
import { Reply } from '../reply'
|
|
15
|
+
import { MessageImage } from './message-image'
|
|
16
|
+
import {
|
|
17
|
+
BlobContainer,
|
|
18
|
+
BlobText,
|
|
19
|
+
BlobTick,
|
|
20
|
+
BlobTickContainer,
|
|
21
|
+
MessageContainer,
|
|
22
|
+
} from './styles'
|
|
16
23
|
import { MessageTimestamp, resolveMessageTimestamps } from './timestamps'
|
|
17
24
|
|
|
18
|
-
const MessageContainer = styled.div`
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: ${props => (props.isSentByUser ? 'flex-end' : 'flex-start')};
|
|
21
|
-
position: relative;
|
|
22
|
-
padding: 0px 6px;
|
|
23
|
-
`
|
|
24
|
-
|
|
25
|
-
const BotMessageImageContainer = styled.div`
|
|
26
|
-
width: 28px;
|
|
27
|
-
padding: 12px 4px;
|
|
28
|
-
flex: none;
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
`
|
|
33
|
-
|
|
34
|
-
const Blob = styled.div`
|
|
35
|
-
position: relative;
|
|
36
|
-
margin: 8px;
|
|
37
|
-
border-radius: 8px;
|
|
38
|
-
background-color: ${props => props.bgcolor};
|
|
39
|
-
color: ${props => props.color};
|
|
40
|
-
max-width: ${props =>
|
|
41
|
-
props.blob
|
|
42
|
-
? props.blobwidth
|
|
43
|
-
? props.blobwidth
|
|
44
|
-
: '60%'
|
|
45
|
-
: 'calc(100% - 16px)'};
|
|
46
|
-
`
|
|
47
|
-
|
|
48
|
-
const BlobText = styled.div`
|
|
49
|
-
padding: ${props => (props.blob ? '8px 12px' : '0px')};
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
white-space: pre-line;
|
|
53
|
-
${props => props.markdownstyle}
|
|
54
|
-
`
|
|
55
|
-
|
|
56
|
-
const BlobTickContainer = styled.div`
|
|
57
|
-
position: absolute;
|
|
58
|
-
box-sizing: border-box;
|
|
59
|
-
height: 100%;
|
|
60
|
-
padding: 18px 0px 18px 0px;
|
|
61
|
-
display: flex;
|
|
62
|
-
top: 0;
|
|
63
|
-
align-items: center;
|
|
64
|
-
`
|
|
65
|
-
const BlobTick = styled.div`
|
|
66
|
-
position: relative;
|
|
67
|
-
margin: -${props => props.pointerSize}px 0px;
|
|
68
|
-
border: ${props => props.pointerSize}px solid ${COLORS.TRANSPARENT};
|
|
69
|
-
`
|
|
70
|
-
|
|
71
25
|
export const Message = props => {
|
|
72
26
|
const { defaultTyping, defaultDelay } = useContext(RequestContext)
|
|
73
27
|
let {
|
|
@@ -87,7 +41,6 @@ export const Message = props => {
|
|
|
87
41
|
|
|
88
42
|
const isSentByUser = sentBy === SENDERS.user
|
|
89
43
|
const isSentByBot = sentBy === SENDERS.bot
|
|
90
|
-
const isSentByAgent = sentBy === SENDERS.agent
|
|
91
44
|
const markdown = props.markdown
|
|
92
45
|
const { webchatState, addMessage, updateReplies, getThemeProperty } =
|
|
93
46
|
useContext(WebchatContext)
|
|
@@ -205,8 +158,8 @@ export const Message = props => {
|
|
|
205
158
|
getThemeProperty(`message.${userOrBotMessage}.blobTick`, true)
|
|
206
159
|
|
|
207
160
|
const renderBrowser = () => {
|
|
208
|
-
const
|
|
209
|
-
if (!
|
|
161
|
+
const messageJSON = webchatState.messagesJSON.find(m => m.id === state.id)
|
|
162
|
+
if (!messageJSON || !messageJSON.display) return <></>
|
|
210
163
|
|
|
211
164
|
const getBlobTick = pointerSize => {
|
|
212
165
|
// to add a border to the blobTick we need to create two triangles and overlap them
|
|
@@ -241,20 +194,15 @@ export const Message = props => {
|
|
|
241
194
|
)
|
|
242
195
|
}
|
|
243
196
|
|
|
244
|
-
const BotMessageImage = getThemeProperty(
|
|
245
|
-
WEBCHAT.CUSTOM_PROPERTIES.botMessageImage,
|
|
246
|
-
getThemeProperty(
|
|
247
|
-
WEBCHAT.CUSTOM_PROPERTIES.brandImage,
|
|
248
|
-
WEBCHAT.DEFAULTS.LOGO
|
|
249
|
-
)
|
|
250
|
-
)
|
|
251
197
|
const animationsEnabled = getThemeProperty(
|
|
252
198
|
WEBCHAT.CUSTOM_PROPERTIES.enableAnimations,
|
|
253
199
|
true
|
|
254
200
|
)
|
|
255
201
|
|
|
256
202
|
const resolveCustomTypeName = () =>
|
|
257
|
-
isSentByBot && type === INPUT.CUSTOM
|
|
203
|
+
isSentByBot && type === INPUT.CUSTOM
|
|
204
|
+
? ` ${messageJSON.customTypeName}`
|
|
205
|
+
: ''
|
|
258
206
|
|
|
259
207
|
const className = `${type}-${userOrBotMessage}${resolveCustomTypeName()}`
|
|
260
208
|
|
|
@@ -270,22 +218,8 @@ export const Message = props => {
|
|
|
270
218
|
...getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.messageStyle),
|
|
271
219
|
}}
|
|
272
220
|
>
|
|
273
|
-
{
|
|
274
|
-
|
|
275
|
-
style={{
|
|
276
|
-
...getThemeProperty(
|
|
277
|
-
WEBCHAT.CUSTOM_PROPERTIES.botMessageImageStyle
|
|
278
|
-
),
|
|
279
|
-
...imagestyle,
|
|
280
|
-
}}
|
|
281
|
-
>
|
|
282
|
-
<img
|
|
283
|
-
style={{ width: '100%' }}
|
|
284
|
-
src={resolveImage(BotMessageImage)}
|
|
285
|
-
/>
|
|
286
|
-
</BotMessageImageContainer>
|
|
287
|
-
)}
|
|
288
|
-
<Blob
|
|
221
|
+
<MessageImage imagestyle={imagestyle} sentBy={sentBy} />
|
|
222
|
+
<BlobContainer
|
|
289
223
|
className={className}
|
|
290
224
|
bgcolor={getBgColor()}
|
|
291
225
|
color={isSentByUser ? COLORS.SOLID_WHITE : COLORS.SOLID_BLACK}
|
|
@@ -319,13 +253,13 @@ export const Message = props => {
|
|
|
319
253
|
)}
|
|
320
254
|
{Boolean(blob) && hasBlobTick() && getBlobTick(6)}
|
|
321
255
|
{Boolean(blob) && hasBlobTick() && getBlobTick(5)}
|
|
322
|
-
</
|
|
256
|
+
</BlobContainer>
|
|
323
257
|
</MessageContainer>
|
|
324
258
|
{timestampsEnabled && (
|
|
325
259
|
<MessageTimestamp
|
|
326
|
-
|
|
260
|
+
sentBy={sentBy}
|
|
327
261
|
style={timestampStyle}
|
|
328
|
-
|
|
262
|
+
timestamp={messageJSON.timestamp}
|
|
329
263
|
/>
|
|
330
264
|
)}
|
|
331
265
|
</>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { useContext } from 'react'
|
|
2
|
+
|
|
3
|
+
import { WEBCHAT } from '../../constants'
|
|
4
|
+
import { WebchatContext } from '../../contexts'
|
|
5
|
+
import { SENDERS } from '../../index-types'
|
|
6
|
+
import { resolveImage } from '../../util/environment'
|
|
7
|
+
import { BotMessageImageContainer } from './styles'
|
|
8
|
+
|
|
9
|
+
interface MessageImageProps {
|
|
10
|
+
imagestyle: Record<string, unknown>
|
|
11
|
+
sentBy: SENDERS
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const MessageImage = ({ imagestyle, sentBy }: MessageImageProps) => {
|
|
15
|
+
const { getThemeProperty } = useContext(WebchatContext)
|
|
16
|
+
|
|
17
|
+
const isSentByAgent = sentBy === SENDERS.agent
|
|
18
|
+
const isSentByUser = sentBy === SENDERS.user
|
|
19
|
+
|
|
20
|
+
const timestampsWithImage = getThemeProperty(
|
|
21
|
+
WEBCHAT.CUSTOM_PROPERTIES.messageTimestampsWithImage
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
const BotMessageImage = getThemeProperty(
|
|
25
|
+
WEBCHAT.CUSTOM_PROPERTIES.botMessageImage,
|
|
26
|
+
getThemeProperty(
|
|
27
|
+
WEBCHAT.CUSTOM_PROPERTIES.brandImage,
|
|
28
|
+
WEBCHAT.DEFAULTS.LOGO
|
|
29
|
+
)
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
const AgentMessageImage = getThemeProperty(
|
|
33
|
+
WEBCHAT.CUSTOM_PROPERTIES.agentMessageImage,
|
|
34
|
+
BotMessageImage
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
!timestampsWithImage &&
|
|
39
|
+
!isSentByUser &&
|
|
40
|
+
BotMessageImage && (
|
|
41
|
+
<BotMessageImageContainer
|
|
42
|
+
style={{
|
|
43
|
+
...getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.botMessageImageStyle),
|
|
44
|
+
...imagestyle,
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
<img
|
|
48
|
+
style={{ width: '100%' }}
|
|
49
|
+
src={resolveImage(
|
|
50
|
+
isSentByAgent ? AgentMessageImage : BotMessageImage
|
|
51
|
+
)}
|
|
52
|
+
/>
|
|
53
|
+
</BotMessageImageContainer>
|
|
54
|
+
)
|
|
55
|
+
)
|
|
56
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import styled from 'styled-components'
|
|
2
|
+
|
|
3
|
+
import { COLORS } from '../../constants'
|
|
4
|
+
|
|
5
|
+
export const MessageContainer = styled.div`
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: ${props => (props.isSentByUser ? 'flex-end' : 'flex-start')};
|
|
8
|
+
position: relative;
|
|
9
|
+
padding: 0px 6px;
|
|
10
|
+
`
|
|
11
|
+
|
|
12
|
+
export const BotMessageImageContainer = styled.div`
|
|
13
|
+
width: 28px;
|
|
14
|
+
padding: 12px 4px;
|
|
15
|
+
flex: none;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
`
|
|
20
|
+
|
|
21
|
+
export const BlobContainer = styled.div`
|
|
22
|
+
position: relative;
|
|
23
|
+
margin: 8px;
|
|
24
|
+
border-radius: 8px;
|
|
25
|
+
background-color: ${props => props.bgcolor};
|
|
26
|
+
color: ${props => props.color};
|
|
27
|
+
max-width: ${props =>
|
|
28
|
+
props.blob
|
|
29
|
+
? props.blobwidth
|
|
30
|
+
? props.blobwidth
|
|
31
|
+
: '60%'
|
|
32
|
+
: 'calc(100% - 16px)'};
|
|
33
|
+
`
|
|
34
|
+
|
|
35
|
+
export const BlobText = styled.div`
|
|
36
|
+
padding: ${props => (props.blob ? '8px 12px' : '0px')};
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
white-space: pre-line;
|
|
40
|
+
${props => props.markdownstyle}
|
|
41
|
+
`
|
|
42
|
+
|
|
43
|
+
export const BlobTickContainer = styled.div`
|
|
44
|
+
position: absolute;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
height: 100%;
|
|
47
|
+
padding: 18px 0px 18px 0px;
|
|
48
|
+
display: flex;
|
|
49
|
+
top: 0;
|
|
50
|
+
align-items: center;
|
|
51
|
+
`
|
|
52
|
+
export const BlobTick = styled.div`
|
|
53
|
+
position: relative;
|
|
54
|
+
margin: -${props => props.pointerSize}px 0px;
|
|
55
|
+
border: ${props => props.pointerSize}px solid ${COLORS.TRANSPARENT};
|
|
56
|
+
`
|
|
57
|
+
|
|
58
|
+
export const TimestampContainer = styled.div`
|
|
59
|
+
display: flex;
|
|
60
|
+
position: relative;
|
|
61
|
+
justify-content: ${props => (props.isSentByUser ? 'flex-end' : 'flex-start')};
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 10px;
|
|
64
|
+
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
width: 100%;
|
|
67
|
+
padding: 0px 15px 4px 15px;
|
|
68
|
+
padding-top: ${props => (props.isSentByUser ? '0px' : '4px')};
|
|
69
|
+
|
|
70
|
+
img {
|
|
71
|
+
max-width: 20px;
|
|
72
|
+
}
|
|
73
|
+
`
|
|
74
|
+
|
|
75
|
+
export const TimestampText = styled.div`
|
|
76
|
+
/* @import url('https://fonts.googleapis.com/css?family=Lato');
|
|
77
|
+
font-family: Lato; */
|
|
78
|
+
font-size: 10px;
|
|
79
|
+
color: ${COLORS.SOLID_BLACK};
|
|
80
|
+
text-align: ${props => (props.isSentByUser ? 'right' : 'left')};
|
|
81
|
+
`
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React, { useContext } from 'react'
|
|
2
|
+
|
|
3
|
+
import { WEBCHAT } from '../../constants'
|
|
4
|
+
import { WebchatContext } from '../../contexts'
|
|
5
|
+
import { SENDERS } from '../../index-types'
|
|
6
|
+
import { resolveImage } from '../../util'
|
|
7
|
+
import { TimestampContainer, TimestampText } from './styles'
|
|
8
|
+
|
|
9
|
+
export const resolveMessageTimestamps = (
|
|
10
|
+
getThemeProperty,
|
|
11
|
+
timestampEnabled
|
|
12
|
+
) => {
|
|
13
|
+
const timestampsFormat = getThemeProperty(
|
|
14
|
+
WEBCHAT.CUSTOM_PROPERTIES.messageTimestampsFormat
|
|
15
|
+
)
|
|
16
|
+
const timestampStyle = getThemeProperty(
|
|
17
|
+
WEBCHAT.CUSTOM_PROPERTIES.messageTimestampsStyle
|
|
18
|
+
)
|
|
19
|
+
const timestampsEnabled = Boolean(
|
|
20
|
+
timestampEnabled !== undefined
|
|
21
|
+
? timestampEnabled
|
|
22
|
+
: getThemeProperty(
|
|
23
|
+
WEBCHAT.CUSTOM_PROPERTIES.enableMessageTimestamps,
|
|
24
|
+
Boolean(timestampStyle) || Boolean(timestampsFormat) || false
|
|
25
|
+
)
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
const defaultTimestampFormat = {
|
|
29
|
+
month: 'short',
|
|
30
|
+
day: 'numeric',
|
|
31
|
+
hour: 'numeric',
|
|
32
|
+
minute: 'numeric',
|
|
33
|
+
second: 'numeric',
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const getFormattedTimestamp = timestampsFormat
|
|
37
|
+
? timestampsFormat()
|
|
38
|
+
: // @ts-ignore
|
|
39
|
+
new Date().toLocaleString(undefined, defaultTimestampFormat)
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
timestampsEnabled,
|
|
43
|
+
getFormattedTimestamp,
|
|
44
|
+
timestampStyle,
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface MessageTimestampProps {
|
|
49
|
+
timestamp: string
|
|
50
|
+
style: Record<string, unknown>
|
|
51
|
+
sentBy: SENDERS
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const MessageTimestamp = ({
|
|
55
|
+
timestamp,
|
|
56
|
+
style,
|
|
57
|
+
sentBy,
|
|
58
|
+
}: MessageTimestampProps) => {
|
|
59
|
+
const { getThemeProperty } = useContext(WebchatContext)
|
|
60
|
+
|
|
61
|
+
const isSentByUser = sentBy === SENDERS.user
|
|
62
|
+
const isSentByAgent = sentBy === SENDERS.agent
|
|
63
|
+
|
|
64
|
+
const BotMessageImage = getThemeProperty(
|
|
65
|
+
WEBCHAT.CUSTOM_PROPERTIES.botMessageImage,
|
|
66
|
+
undefined
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
const AgentMessageImage = getThemeProperty(
|
|
70
|
+
WEBCHAT.CUSTOM_PROPERTIES.agentMessageImage,
|
|
71
|
+
BotMessageImage
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
const timestampsWithImage = getThemeProperty(
|
|
75
|
+
WEBCHAT.CUSTOM_PROPERTIES.messageTimestampsWithImage
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<TimestampContainer
|
|
80
|
+
className={`botonic-timestamp-container ${sentBy}`}
|
|
81
|
+
isSentByUser={isSentByUser}
|
|
82
|
+
>
|
|
83
|
+
{timestampsWithImage && BotMessageImage && !isSentByUser && (
|
|
84
|
+
<img
|
|
85
|
+
src={resolveImage(
|
|
86
|
+
isSentByAgent ? AgentMessageImage : BotMessageImage
|
|
87
|
+
)}
|
|
88
|
+
/>
|
|
89
|
+
)}
|
|
90
|
+
<TimestampText
|
|
91
|
+
isSentByUser={isSentByUser}
|
|
92
|
+
style={{
|
|
93
|
+
...style,
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
{timestamp}
|
|
97
|
+
</TimestampText>
|
|
98
|
+
</TimestampContainer>
|
|
99
|
+
)
|
|
100
|
+
}
|
package/src/constants.js
CHANGED
|
@@ -86,6 +86,8 @@ export const WEBCHAT = {
|
|
|
86
86
|
botMessageImage: 'message.bot.image',
|
|
87
87
|
botMessageImageStyle: 'message.bot.imageStyle',
|
|
88
88
|
botMessageStyle: 'message.bot.style',
|
|
89
|
+
// Agent Message
|
|
90
|
+
agentMessageImage: 'message.agent.image',
|
|
89
91
|
// User Message
|
|
90
92
|
customMessageTypes: 'message.customTypes',
|
|
91
93
|
messageStyle: 'message.style',
|
|
@@ -98,6 +100,7 @@ export const WEBCHAT = {
|
|
|
98
100
|
enableMessageTimestamps: 'message.timestamps.enable',
|
|
99
101
|
messageTimestampsFormat: 'message.timestamps.format',
|
|
100
102
|
messageTimestampsStyle: 'message.timestamps.style',
|
|
103
|
+
messageTimestampsWithImage: 'message.timestamps.withImage',
|
|
101
104
|
// Intro
|
|
102
105
|
customIntro: 'intro.custom',
|
|
103
106
|
introImage: 'intro.image',
|
package/src/index-types.ts
CHANGED
|
@@ -21,10 +21,6 @@ export class DeviceAdapter {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
onFocus(host) {
|
|
24
|
-
if (this.currentDevice !== DEVICES.MOBILE.IPHONE) {
|
|
25
|
-
// scrollToBottom({ host, timeout: 800 })
|
|
26
|
-
return
|
|
27
|
-
}
|
|
28
24
|
setTimeout(() => {
|
|
29
25
|
// Place onFocus logic to be run the last on the queue of asynchronous events to give enough time to init method to be called. Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#zero_delays
|
|
30
26
|
this.webchatResizer.onFocus(() =>
|
|
@@ -95,7 +95,7 @@ export const WebchatMessageList = props => {
|
|
|
95
95
|
id='botonic-scrollable-content'
|
|
96
96
|
scrollbar={scrollbarOptions}
|
|
97
97
|
autoHide={scrollbarOptions.autoHide}
|
|
98
|
-
|
|
98
|
+
ismessagescontainer={true.toString()}
|
|
99
99
|
style={{
|
|
100
100
|
...props.style,
|
|
101
101
|
}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext } from 'react'
|
|
1
|
+
import React, { useContext, useEffect } from 'react'
|
|
2
2
|
|
|
3
3
|
import ArrowDown from '../../assets/arrow-down.svg'
|
|
4
4
|
import { WEBCHAT } from '../../constants'
|
|
@@ -35,6 +35,15 @@ export const UnreadMessagesBanner = ({
|
|
|
35
35
|
'unread messages'
|
|
36
36
|
)
|
|
37
37
|
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (webchatState.isWebchatOpen && unreadMessagesBannerRef.current) {
|
|
40
|
+
unreadMessagesBannerRef.current.scrollIntoView({
|
|
41
|
+
behavior: 'smooth',
|
|
42
|
+
block: 'center',
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
}, [webchatState.isWebchatOpen, unreadMessagesBannerRef])
|
|
46
|
+
|
|
38
47
|
return (
|
|
39
48
|
notificationsEnabled && (
|
|
40
49
|
<div ref={unreadMessagesBannerRef}>
|
package/src/webchat/replies.jsx
CHANGED
|
@@ -49,11 +49,9 @@ export const WebchatReplies = props => {
|
|
|
49
49
|
autoHide={scrollbarOptions.autoHide}
|
|
50
50
|
>
|
|
51
51
|
<RepliesContainer
|
|
52
|
+
className='replies-container'
|
|
52
53
|
justify={justifyContent}
|
|
53
54
|
wrap={flexWrap}
|
|
54
|
-
style={{
|
|
55
|
-
...props.style,
|
|
56
|
-
}}
|
|
57
55
|
>
|
|
58
56
|
{webchatState.replies.map((r, i) => (
|
|
59
57
|
<ReplyContainer key={i}>{r}</ReplyContainer>
|
|
@@ -32,11 +32,16 @@ export const TriggerButton = (): JSX.Element => {
|
|
|
32
32
|
WEBCHAT.CUSTOM_PROPERTIES.triggerButtonStyle
|
|
33
33
|
)
|
|
34
34
|
|
|
35
|
-
const
|
|
36
|
-
WEBCHAT.CUSTOM_PROPERTIES.
|
|
35
|
+
const notificationsTriggerButtonEnabled = getThemeProperty(
|
|
36
|
+
WEBCHAT.CUSTOM_PROPERTIES.notificationsTriggerButtonEnabled,
|
|
37
37
|
false
|
|
38
38
|
)
|
|
39
39
|
|
|
40
|
+
const notificationsEnabled = getThemeProperty(
|
|
41
|
+
WEBCHAT.CUSTOM_PROPERTIES.notificationsEnabled,
|
|
42
|
+
notificationsTriggerButtonEnabled
|
|
43
|
+
)
|
|
44
|
+
|
|
40
45
|
const CustomTriggerButton = getThemeProperty(
|
|
41
46
|
WEBCHAT.CUSTOM_PROPERTIES.customTrigger,
|
|
42
47
|
undefined
|
|
@@ -48,10 +53,10 @@ export const TriggerButton = (): JSX.Element => {
|
|
|
48
53
|
}
|
|
49
54
|
|
|
50
55
|
return (
|
|
51
|
-
<div
|
|
52
|
-
{webchatState.
|
|
56
|
+
<div onClick={handleClick}>
|
|
57
|
+
{webchatState.numUnreadMessages !== 0 && notificationsEnabled && (
|
|
53
58
|
<UnreadMessagesCounter className='trigger-notifications'>
|
|
54
|
-
{webchatState.
|
|
59
|
+
{webchatState.numUnreadMessages}
|
|
55
60
|
</UnreadMessagesCounter>
|
|
56
61
|
)}
|
|
57
62
|
{CustomTriggerButton ? (
|
package/src/webchat/webchat.jsx
CHANGED
|
@@ -714,8 +714,6 @@ export const Webchat = forwardRef((props, ref) => {
|
|
|
714
714
|
}
|
|
715
715
|
}, [webchatState.isWebchatOpen])
|
|
716
716
|
|
|
717
|
-
const webchatReplies = () => <WebchatReplies replies={webchatState.replies} />
|
|
718
|
-
|
|
719
717
|
const isUserInputEnabled = () => {
|
|
720
718
|
const isUserInputEnabled = getThemeProperty(
|
|
721
719
|
WEBCHAT.CUSTOM_PROPERTIES.enableUserInput,
|
|
@@ -911,8 +909,10 @@ export const Webchat = forwardRef((props, ref) => {
|
|
|
911
909
|
<WebchatMessageList style={{ flex: 1 }} host={host} />
|
|
912
910
|
|
|
913
911
|
{webchatState.replies &&
|
|
914
|
-
Object.keys(webchatState.replies).length > 0 &&
|
|
915
|
-
|
|
912
|
+
Object.keys(webchatState.replies).length > 0 && (
|
|
913
|
+
<WebchatReplies replies={webchatState.replies} />
|
|
914
|
+
)}
|
|
915
|
+
|
|
916
916
|
{webchatState.isPersistentMenuOpen && (
|
|
917
917
|
<DarkenBackground component={persistentMenu()} />
|
|
918
918
|
)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"src/","sources":["components/message.jsx"],"names":[],"mappings":";;;;;AAAA,wCAAgD;AAChD,uDAA8D;AAC9D,qEAAoC;AACpC,kFAAsC;AACtC,+BAAmC;AAEnC,4CAA8C;AAC9C,0CAA4D;AAC5D,gDAAwC;AACxC,qDAAyD;AACzD,yCAAmE;AACnE,qCAAiC;AACjC,yDAAoD;AACpD,yCAA0E;AAC1E,mCAA+B;AAC/B,6CAAyE;AAEzE,MAAM,gBAAgB,G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AK,YAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CACtB,kDACE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAC3B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,IACR,SAAS,EACb,CACH,CAAC,CAAC,CAAC,CACF,kDAAS,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,IAAM,SAAS,cACjD,QAAQ,IACD,CACX,CAAA;IAEH,OAAO,IAAA,uBAAe,EAAC,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,CAAA;AACvD,CAAC,CAAA;AAzRY,QAAA,OAAO,WAyRnB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export function resolveMessageTimestamps(getThemeFn: any, messageTimestampEnabled: any): {
|
|
2
|
-
timestampsEnabled: boolean;
|
|
3
|
-
getFormattedTimestamp: any;
|
|
4
|
-
timestampStyle: any;
|
|
5
|
-
};
|
|
6
|
-
export function MessageTimestamp({ timestamp, style, isSentByUser }: {
|
|
7
|
-
timestamp: any;
|
|
8
|
-
style: any;
|
|
9
|
-
isSentByUser: any;
|
|
10
|
-
}): JSX.Element;
|