@botonic/react 0.44.1-alpha.3 → 0.45.0-alpha.0
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/botonic-tester.js +0 -1
- package/lib/cjs/botonic-tester.js.map +1 -1
- package/lib/cjs/components/audio.d.ts +1 -1
- package/lib/cjs/components/audio.js +2 -1
- package/lib/cjs/components/audio.js.map +1 -1
- package/lib/cjs/components/button/index.d.ts +1 -1
- package/lib/cjs/components/button/index.js +5 -8
- package/lib/cjs/components/button/index.js.map +1 -1
- package/lib/cjs/components/buttons-disabler.d.ts +2 -2
- package/lib/cjs/components/buttons-disabler.js +12 -6
- package/lib/cjs/components/buttons-disabler.js.map +1 -1
- package/lib/cjs/components/carousel.d.ts +1 -1
- package/lib/cjs/components/carousel.js +5 -4
- package/lib/cjs/components/carousel.js.map +1 -1
- package/lib/cjs/components/custom-message.d.ts +1 -1
- package/lib/cjs/components/custom-message.js +1 -2
- package/lib/cjs/components/custom-message.js.map +1 -1
- package/lib/cjs/components/document.d.ts +1 -1
- package/lib/cjs/components/document.js +2 -1
- package/lib/cjs/components/document.js.map +1 -1
- package/lib/cjs/components/element.d.ts +1 -1
- package/lib/cjs/components/element.js +7 -5
- package/lib/cjs/components/element.js.map +1 -1
- package/lib/cjs/components/handoff.d.ts +1 -1
- package/lib/cjs/components/handoff.js +2 -2
- package/lib/cjs/components/handoff.js.map +1 -1
- package/lib/cjs/components/image.d.ts +1 -1
- package/lib/cjs/components/image.js.map +1 -1
- package/lib/cjs/components/index-types.d.ts +2 -2
- package/lib/cjs/components/location.js +2 -3
- package/lib/cjs/components/location.js.map +1 -1
- package/lib/cjs/components/markdown.d.ts +1 -1
- package/lib/cjs/components/markdown.js +24 -16
- package/lib/cjs/components/markdown.js.map +1 -1
- package/lib/cjs/components/message/index.js +25 -20
- package/lib/cjs/components/message/index.js.map +1 -1
- package/lib/cjs/components/message/message-feedback.js.map +1 -1
- package/lib/cjs/components/message/message-footer.js.map +1 -1
- package/lib/cjs/components/message/message-image.js.map +1 -1
- package/lib/cjs/components/message/timestamps.js +1 -1
- package/lib/cjs/components/message/timestamps.js.map +1 -1
- package/lib/cjs/components/message-template.js +3 -4
- package/lib/cjs/components/message-template.js.map +1 -1
- package/lib/cjs/components/multichannel/facebook/facebook.js +3 -2
- package/lib/cjs/components/multichannel/facebook/facebook.js.map +1 -1
- package/lib/cjs/components/multichannel/multichannel-button.js +6 -6
- package/lib/cjs/components/multichannel/multichannel-button.js.map +1 -1
- package/lib/cjs/components/multichannel/multichannel-carousel.js +11 -7
- package/lib/cjs/components/multichannel/multichannel-carousel.js.map +1 -1
- package/lib/cjs/components/multichannel/multichannel-reply.js +3 -3
- package/lib/cjs/components/multichannel/multichannel-reply.js.map +1 -1
- package/lib/cjs/components/multichannel/multichannel-text.js +15 -9
- package/lib/cjs/components/multichannel/multichannel-text.js.map +1 -1
- package/lib/cjs/components/multichannel/multichannel-utils.js +8 -4
- package/lib/cjs/components/multichannel/multichannel-utils.js.map +1 -1
- package/lib/cjs/components/multichannel/multichannel.js +1 -2
- package/lib/cjs/components/multichannel/multichannel.js.map +1 -1
- package/lib/cjs/components/pic.js +1 -1
- package/lib/cjs/components/pic.js.map +1 -1
- package/lib/cjs/components/raw.js +3 -2
- package/lib/cjs/components/raw.js.map +1 -1
- package/lib/cjs/components/reply.d.ts +1 -1
- package/lib/cjs/components/reply.js +6 -4
- package/lib/cjs/components/reply.js.map +1 -1
- package/lib/cjs/components/share-button.js +3 -4
- package/lib/cjs/components/share-button.js.map +1 -1
- package/lib/cjs/components/subtitle.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/debug-message.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/debug-message.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/ai-agent.d.ts +2 -2
- package/lib/cjs/components/system-debug-trace/events/ai-agent.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/bot-action.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/events/bot-action.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/components/guardrail-item.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/events/components/sources-section.d.ts +2 -2
- package/lib/cjs/components/system-debug-trace/events/components/sources-section.js +2 -1
- package/lib/cjs/components/system-debug-trace/events/components/sources-section.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/conditional-channel.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/events/conditional-channel.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/conditional-country.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/events/conditional-country.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/conditional-custom.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/events/conditional-custom.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/conditional-queue-status.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/events/conditional-queue-status.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/fallback.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/events/fallback.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/handoff-success.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/events/handoff-success.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/keyword.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/events/keyword.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/knowledge-base.d.ts +2 -2
- package/lib/cjs/components/system-debug-trace/events/knowledge-base.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/redirect-flow.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/events/redirect-flow.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/smart-intent.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/events/smart-intent.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/webview-action-triggered.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/events/webview-action-triggered.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/hooks/use-knowledge-base-info.d.ts +2 -2
- package/lib/cjs/components/system-debug-trace/hooks/use-knowledge-base-info.js +2 -2
- package/lib/cjs/components/system-debug-trace/hooks/use-knowledge-base-info.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/hooks/use-last-label-position.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/hooks/use-last-label-position.js +6 -3
- package/lib/cjs/components/system-debug-trace/hooks/use-last-label-position.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/arrow-progress.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/arrow-progress.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/arrow-progress.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/brain.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/brain.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/brain.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/caret-down.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/caret-down.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/caret-down.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/caret-up.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/caret-up.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/caret-up.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/circle-check.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/circle-check.js +1 -0
- package/lib/cjs/components/system-debug-trace/icons/circle-check.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/code.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/code.js +1 -0
- package/lib/cjs/components/system-debug-trace/icons/code.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/file-pdf.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/file-pdf.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/file-pdf.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/file-word.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/file-word.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/file-word.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/hand.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/hand.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/hand.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/head-set.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/head-set.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/head-set.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/life-ring.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/life-ring.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/life-ring.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/link.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/link.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/link.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/quote-right.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/quote-right.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/quote-right.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/screwdriver-wrench.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/screwdriver-wrench.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/screwdriver-wrench.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/split.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/split.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/split.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/wand.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/wand.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/wand.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/icons/window-restore.d.ts +1 -1
- package/lib/cjs/components/system-debug-trace/icons/window-restore.js +3 -1
- package/lib/cjs/components/system-debug-trace/icons/window-restore.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/index.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/types.d.ts +2 -2
- package/lib/cjs/components/text.d.ts +1 -1
- package/lib/cjs/components/text.js +8 -4
- package/lib/cjs/components/text.js.map +1 -1
- package/lib/cjs/components/title.d.ts +1 -1
- package/lib/cjs/components/video.d.ts +1 -1
- package/lib/cjs/components/video.js +2 -1
- package/lib/cjs/components/video.js.map +1 -1
- package/lib/cjs/components/webchat-settings.d.ts +3 -3
- package/lib/cjs/components/webchat-settings.js +40 -35
- package/lib/cjs/components/webchat-settings.js.map +1 -1
- package/lib/cjs/components/whatsapp-button-list.js +1 -1
- package/lib/cjs/components/whatsapp-button-list.js.map +1 -1
- package/lib/cjs/components/whatsapp-catalog.js +1 -1
- package/lib/cjs/components/whatsapp-catalog.js.map +1 -1
- package/lib/cjs/components/whatsapp-cta-url-button.js +1 -1
- package/lib/cjs/components/whatsapp-cta-url-button.js.map +1 -1
- package/lib/cjs/components/whatsapp-interactive-media-carousel.js +1 -1
- package/lib/cjs/components/whatsapp-interactive-media-carousel.js.map +1 -1
- package/lib/cjs/components/whatsapp-media-carousel.js +1 -1
- package/lib/cjs/components/whatsapp-media-carousel.js.map +1 -1
- package/lib/cjs/components/whatsapp-product-carousel.js +1 -1
- package/lib/cjs/components/whatsapp-product-carousel.js.map +1 -1
- package/lib/cjs/components/whatsapp-product-list.js +1 -1
- package/lib/cjs/components/whatsapp-product-list.js.map +1 -1
- package/lib/cjs/components/whatsapp-product.js +1 -1
- package/lib/cjs/components/whatsapp-product.js.map +1 -1
- package/lib/cjs/components/whatsapp-template/index.js +1 -1
- package/lib/cjs/components/whatsapp-template/index.js.map +1 -1
- package/lib/cjs/contexts.d.ts +2 -2
- package/lib/cjs/dev-app.js +4 -7
- package/lib/cjs/dev-app.js.map +1 -1
- package/lib/cjs/index-types.d.ts +7 -7
- package/lib/cjs/message-utils.js +2 -1
- package/lib/cjs/message-utils.js.map +1 -1
- package/lib/cjs/msg-to-botonic.d.ts +0 -1
- package/lib/cjs/msg-to-botonic.js +16 -15
- package/lib/cjs/msg-to-botonic.js.map +1 -1
- package/lib/cjs/react-bot.d.ts +2 -2
- package/lib/cjs/util/dom.js +3 -3
- package/lib/cjs/util/dom.js.map +1 -1
- package/lib/cjs/util/environment.d.ts +1 -1
- package/lib/cjs/util/environment.js +17 -12
- package/lib/cjs/util/environment.js.map +1 -1
- package/lib/cjs/util/error-boundary.js +4 -5
- package/lib/cjs/util/error-boundary.js.map +1 -1
- package/lib/cjs/util/logs.js +2 -1
- package/lib/cjs/util/logs.js.map +1 -1
- package/lib/cjs/util/objects.js +4 -3
- package/lib/cjs/util/objects.js.map +1 -1
- package/lib/cjs/util/react.js +6 -3
- package/lib/cjs/util/react.js.map +1 -1
- package/lib/cjs/util/regexs.js +3 -2
- package/lib/cjs/util/regexs.js.map +1 -1
- package/lib/cjs/util/webchat.d.ts +2 -2
- package/lib/cjs/util/webchat.js +13 -7
- package/lib/cjs/util/webchat.js.map +1 -1
- package/lib/cjs/webchat/chat-area/index.js.map +1 -1
- package/lib/cjs/webchat/components/common.js +0 -1
- package/lib/cjs/webchat/components/common.js.map +1 -1
- package/lib/cjs/webchat/components/conditional-animation.js +1 -2
- package/lib/cjs/webchat/components/conditional-animation.js.map +1 -1
- package/lib/cjs/webchat/components/opened-persistent-menu.js +4 -2
- package/lib/cjs/webchat/components/opened-persistent-menu.js.map +1 -1
- package/lib/cjs/webchat/context/index.d.ts +1 -1
- package/lib/cjs/webchat/context/messages-reducer.d.ts +1 -1
- package/lib/cjs/webchat/context/messages-reducer.js +2 -2
- package/lib/cjs/webchat/context/messages-reducer.js.map +1 -1
- package/lib/cjs/webchat/context/types.d.ts +5 -5
- package/lib/cjs/webchat/context/use-webchat.d.ts +6 -6
- package/lib/cjs/webchat/context/use-webchat.js.map +1 -1
- package/lib/cjs/webchat/context/webchat-reducer.d.ts +1 -1
- package/lib/cjs/webchat/cover-component/index.js.map +1 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-angry.d.ts +2 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-angry.js.map +1 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-frown.d.ts +2 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-frown.js.map +1 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-grin-beam.d.ts +2 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-grin-beam.js.map +1 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-meh.d.ts +2 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-meh.js.map +1 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-smile.d.ts +2 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-smile.js.map +1 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/star.d.ts +2 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/star.js.map +1 -1
- package/lib/cjs/webchat/custom-messages/rating/index.js +2 -1
- package/lib/cjs/webchat/custom-messages/rating/index.js.map +1 -1
- package/lib/cjs/webchat/custom-messages/rating/rating-selector.js +5 -2
- package/lib/cjs/webchat/custom-messages/rating/rating-selector.js.map +1 -1
- package/lib/cjs/webchat/custom-messages/rating/smileys.d.ts +1 -1
- package/lib/cjs/webchat/custom-messages/rating/smileys.js.map +1 -1
- package/lib/cjs/webchat/custom-messages/rating/stars.d.ts +1 -1
- package/lib/cjs/webchat/custom-messages/rating/stars.js.map +1 -1
- package/lib/cjs/webchat/header/default-header.js +1 -1
- package/lib/cjs/webchat/header/default-header.js.map +1 -1
- package/lib/cjs/webchat/header/index.d.ts +1 -2
- package/lib/cjs/webchat/header/index.js.map +1 -1
- package/lib/cjs/webchat/hooks/use-device-adapter.d.ts +1 -1
- package/lib/cjs/webchat/hooks/use-device-adapter.js +8 -5
- package/lib/cjs/webchat/hooks/use-device-adapter.js.map +1 -1
- package/lib/cjs/webchat/hooks/use-scroll-to-bottom.js +4 -2
- package/lib/cjs/webchat/hooks/use-scroll-to-bottom.js.map +1 -1
- package/lib/cjs/webchat/hooks/use-scrollbar-controller.js +15 -11
- package/lib/cjs/webchat/hooks/use-scrollbar-controller.js.map +1 -1
- package/lib/cjs/webchat/hooks/use-typing.d.ts +2 -2
- package/lib/cjs/webchat/hooks/use-typing.js +11 -6
- package/lib/cjs/webchat/hooks/use-typing.js.map +1 -1
- package/lib/cjs/webchat/hooks/use-virtual-keyboard-detection.d.ts +1 -1
- package/lib/cjs/webchat/hooks/use-virtual-keyboard-detection.js +3 -5
- package/lib/cjs/webchat/hooks/use-virtual-keyboard-detection.js.map +1 -1
- package/lib/cjs/webchat/hooks/use-webchat-dimensions.js +5 -4
- package/lib/cjs/webchat/hooks/use-webchat-dimensions.js.map +1 -1
- package/lib/cjs/webchat/index-types.d.ts +1 -1
- package/lib/cjs/webchat/input-panel/attachment.js.map +1 -1
- package/lib/cjs/webchat/input-panel/emoji-picker.js +2 -0
- package/lib/cjs/webchat/input-panel/emoji-picker.js.map +1 -1
- package/lib/cjs/webchat/input-panel/index.d.ts +1 -1
- package/lib/cjs/webchat/input-panel/index.js +4 -2
- package/lib/cjs/webchat/input-panel/index.js.map +1 -1
- package/lib/cjs/webchat/input-panel/persistent-menu.js +2 -0
- package/lib/cjs/webchat/input-panel/persistent-menu.js.map +1 -1
- package/lib/cjs/webchat/input-panel/send-button.js +2 -0
- package/lib/cjs/webchat/input-panel/send-button.js.map +1 -1
- package/lib/cjs/webchat/input-panel/textarea.d.ts +1 -1
- package/lib/cjs/webchat/input-panel/textarea.js +10 -5
- package/lib/cjs/webchat/input-panel/textarea.js.map +1 -1
- package/lib/cjs/webchat/message-list/index.js.map +1 -1
- package/lib/cjs/webchat/message-list/intro-message.js.map +1 -1
- package/lib/cjs/webchat/message-list/scroll-button.js +2 -1
- package/lib/cjs/webchat/message-list/scroll-button.js.map +1 -1
- package/lib/cjs/webchat/message-list/unread-messages-banner.d.ts +2 -1
- package/lib/cjs/webchat/message-list/unread-messages-banner.js.map +1 -1
- package/lib/cjs/webchat/replies/index.js +1 -1
- package/lib/cjs/webchat/replies/index.js.map +1 -1
- package/lib/cjs/webchat/session-view.js +0 -2
- package/lib/cjs/webchat/session-view.js.map +1 -1
- package/lib/cjs/webchat/theme/default-theme.d.ts +1 -1
- package/lib/cjs/webchat/theme/types.d.ts +1 -1
- package/lib/cjs/webchat/tracking.d.ts +1 -1
- package/lib/cjs/webchat/trigger-button/index.js +2 -0
- package/lib/cjs/webchat/trigger-button/index.js.map +1 -1
- package/lib/cjs/webchat/typing-indicator/index.d.ts +1 -2
- package/lib/cjs/webchat/typing-indicator/index.js.map +1 -1
- package/lib/cjs/webchat/utils.d.ts +1 -1
- package/lib/cjs/webchat/utils.js +2 -1
- package/lib/cjs/webchat/utils.js.map +1 -1
- package/lib/cjs/webchat/webchat-dev.d.ts +2 -3
- package/lib/cjs/webchat/webchat-dev.js +1 -2
- package/lib/cjs/webchat/webchat-dev.js.map +1 -1
- package/lib/cjs/webchat/webchat.d.ts +2 -3
- package/lib/cjs/webchat/webchat.js +72 -45
- package/lib/cjs/webchat/webchat.js.map +1 -1
- package/lib/cjs/webchat/webview/header.js.map +1 -1
- package/lib/cjs/webchat/webview/index.d.ts +1 -1
- package/lib/cjs/webchat/webview/index.js.map +1 -1
- package/lib/cjs/webchat/webview/styles.js.map +1 -1
- package/lib/cjs/webchat-app.d.ts +6 -6
- package/lib/cjs/webchat-app.js +25 -22
- package/lib/cjs/webchat-app.js.map +1 -1
- package/lib/cjs/webview-app.js +7 -4
- package/lib/cjs/webview-app.js.map +1 -1
- package/lib/esm/botonic-tester.js +0 -1
- package/lib/esm/botonic-tester.js.map +1 -1
- package/lib/esm/components/audio.d.ts +1 -1
- package/lib/esm/components/audio.js +2 -1
- package/lib/esm/components/audio.js.map +1 -1
- package/lib/esm/components/button/index.d.ts +1 -1
- package/lib/esm/components/button/index.js +5 -8
- package/lib/esm/components/button/index.js.map +1 -1
- package/lib/esm/components/buttons-disabler.d.ts +2 -2
- package/lib/esm/components/buttons-disabler.js +12 -6
- package/lib/esm/components/buttons-disabler.js.map +1 -1
- package/lib/esm/components/carousel.d.ts +1 -1
- package/lib/esm/components/carousel.js +5 -4
- package/lib/esm/components/carousel.js.map +1 -1
- package/lib/esm/components/custom-message.d.ts +1 -1
- package/lib/esm/components/custom-message.js +1 -2
- package/lib/esm/components/custom-message.js.map +1 -1
- package/lib/esm/components/document.d.ts +1 -1
- package/lib/esm/components/document.js +2 -1
- package/lib/esm/components/document.js.map +1 -1
- package/lib/esm/components/element.d.ts +1 -1
- package/lib/esm/components/element.js +7 -5
- package/lib/esm/components/element.js.map +1 -1
- package/lib/esm/components/handoff.d.ts +1 -1
- package/lib/esm/components/handoff.js +2 -2
- package/lib/esm/components/handoff.js.map +1 -1
- package/lib/esm/components/image.d.ts +1 -1
- package/lib/esm/components/image.js.map +1 -1
- package/lib/esm/components/index-types.d.ts +2 -2
- package/lib/esm/components/location.js +2 -3
- package/lib/esm/components/location.js.map +1 -1
- package/lib/esm/components/markdown.d.ts +1 -1
- package/lib/esm/components/markdown.js +24 -16
- package/lib/esm/components/markdown.js.map +1 -1
- package/lib/esm/components/message/index.js +25 -20
- package/lib/esm/components/message/index.js.map +1 -1
- package/lib/esm/components/message/message-feedback.js.map +1 -1
- package/lib/esm/components/message/message-footer.js.map +1 -1
- package/lib/esm/components/message/message-image.js.map +1 -1
- package/lib/esm/components/message/timestamps.js +1 -1
- package/lib/esm/components/message/timestamps.js.map +1 -1
- package/lib/esm/components/message-template.js +3 -4
- package/lib/esm/components/message-template.js.map +1 -1
- package/lib/esm/components/multichannel/facebook/facebook.js +3 -2
- package/lib/esm/components/multichannel/facebook/facebook.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel-button.js +6 -6
- package/lib/esm/components/multichannel/multichannel-button.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel-carousel.js +11 -7
- package/lib/esm/components/multichannel/multichannel-carousel.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel-reply.js +3 -3
- package/lib/esm/components/multichannel/multichannel-reply.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel-text.js +15 -9
- package/lib/esm/components/multichannel/multichannel-text.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel-utils.js +8 -4
- package/lib/esm/components/multichannel/multichannel-utils.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel.js +1 -2
- package/lib/esm/components/multichannel/multichannel.js.map +1 -1
- package/lib/esm/components/pic.js +1 -1
- package/lib/esm/components/pic.js.map +1 -1
- package/lib/esm/components/raw.js +3 -2
- package/lib/esm/components/raw.js.map +1 -1
- package/lib/esm/components/reply.d.ts +1 -1
- package/lib/esm/components/reply.js +6 -4
- package/lib/esm/components/reply.js.map +1 -1
- package/lib/esm/components/share-button.js +3 -4
- package/lib/esm/components/share-button.js.map +1 -1
- package/lib/esm/components/subtitle.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/debug-message.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/debug-message.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent.d.ts +2 -2
- package/lib/esm/components/system-debug-trace/events/ai-agent.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/bot-action.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/bot-action.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/components/guardrail-item.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/components/sources-section.d.ts +2 -2
- package/lib/esm/components/system-debug-trace/events/components/sources-section.js +2 -1
- package/lib/esm/components/system-debug-trace/events/components/sources-section.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/conditional-channel.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/conditional-channel.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/conditional-country.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/conditional-country.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/conditional-custom.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/conditional-custom.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/conditional-queue-status.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/conditional-queue-status.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/fallback.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/fallback.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/handoff-success.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/handoff-success.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/keyword.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/keyword.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/knowledge-base.d.ts +2 -2
- package/lib/esm/components/system-debug-trace/events/knowledge-base.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/redirect-flow.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/redirect-flow.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/smart-intent.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/smart-intent.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/webview-action-triggered.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/webview-action-triggered.js.map +1 -1
- package/lib/esm/components/system-debug-trace/hooks/use-knowledge-base-info.d.ts +2 -2
- package/lib/esm/components/system-debug-trace/hooks/use-knowledge-base-info.js +2 -2
- package/lib/esm/components/system-debug-trace/hooks/use-knowledge-base-info.js.map +1 -1
- package/lib/esm/components/system-debug-trace/hooks/use-last-label-position.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/hooks/use-last-label-position.js +6 -3
- package/lib/esm/components/system-debug-trace/hooks/use-last-label-position.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/arrow-progress.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/arrow-progress.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/arrow-progress.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/brain.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/brain.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/brain.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/caret-down.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/caret-down.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/caret-down.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/caret-up.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/caret-up.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/caret-up.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/circle-check.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/circle-check.js +1 -0
- package/lib/esm/components/system-debug-trace/icons/circle-check.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/code.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/code.js +1 -0
- package/lib/esm/components/system-debug-trace/icons/code.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/file-pdf.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/file-pdf.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/file-pdf.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/file-word.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/file-word.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/file-word.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/hand.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/hand.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/hand.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/head-set.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/head-set.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/head-set.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/life-ring.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/life-ring.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/life-ring.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/link.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/link.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/link.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/quote-right.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/quote-right.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/quote-right.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/screwdriver-wrench.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/screwdriver-wrench.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/screwdriver-wrench.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/split.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/split.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/split.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/wand.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/wand.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/wand.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/window-restore.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/icons/window-restore.js +3 -1
- package/lib/esm/components/system-debug-trace/icons/window-restore.js.map +1 -1
- package/lib/esm/components/system-debug-trace/index.js.map +1 -1
- package/lib/esm/components/system-debug-trace/types.d.ts +2 -2
- package/lib/esm/components/text.d.ts +1 -1
- package/lib/esm/components/text.js +8 -4
- package/lib/esm/components/text.js.map +1 -1
- package/lib/esm/components/title.d.ts +1 -1
- package/lib/esm/components/video.d.ts +1 -1
- package/lib/esm/components/video.js +2 -1
- package/lib/esm/components/video.js.map +1 -1
- package/lib/esm/components/webchat-settings.d.ts +3 -3
- package/lib/esm/components/webchat-settings.js +40 -35
- package/lib/esm/components/webchat-settings.js.map +1 -1
- package/lib/esm/components/whatsapp-button-list.js +1 -1
- package/lib/esm/components/whatsapp-button-list.js.map +1 -1
- package/lib/esm/components/whatsapp-catalog.js +1 -1
- package/lib/esm/components/whatsapp-catalog.js.map +1 -1
- package/lib/esm/components/whatsapp-cta-url-button.js +1 -1
- package/lib/esm/components/whatsapp-cta-url-button.js.map +1 -1
- package/lib/esm/components/whatsapp-interactive-media-carousel.js +1 -1
- package/lib/esm/components/whatsapp-interactive-media-carousel.js.map +1 -1
- package/lib/esm/components/whatsapp-media-carousel.js +1 -1
- package/lib/esm/components/whatsapp-media-carousel.js.map +1 -1
- package/lib/esm/components/whatsapp-product-carousel.js +1 -1
- package/lib/esm/components/whatsapp-product-carousel.js.map +1 -1
- package/lib/esm/components/whatsapp-product-list.js +1 -1
- package/lib/esm/components/whatsapp-product-list.js.map +1 -1
- package/lib/esm/components/whatsapp-product.js +1 -1
- package/lib/esm/components/whatsapp-product.js.map +1 -1
- package/lib/esm/components/whatsapp-template/index.js +1 -1
- package/lib/esm/components/whatsapp-template/index.js.map +1 -1
- package/lib/esm/contexts.d.ts +2 -2
- package/lib/esm/dev-app.js +4 -7
- package/lib/esm/dev-app.js.map +1 -1
- package/lib/esm/index-types.d.ts +7 -7
- package/lib/esm/message-utils.js +2 -1
- package/lib/esm/message-utils.js.map +1 -1
- package/lib/esm/msg-to-botonic.d.ts +0 -1
- package/lib/esm/msg-to-botonic.js +16 -15
- package/lib/esm/msg-to-botonic.js.map +1 -1
- package/lib/esm/react-bot.d.ts +2 -2
- package/lib/esm/util/dom.js +3 -3
- package/lib/esm/util/dom.js.map +1 -1
- package/lib/esm/util/environment.d.ts +1 -1
- package/lib/esm/util/environment.js +17 -12
- package/lib/esm/util/environment.js.map +1 -1
- package/lib/esm/util/error-boundary.js +4 -5
- package/lib/esm/util/error-boundary.js.map +1 -1
- package/lib/esm/util/logs.js +2 -1
- package/lib/esm/util/logs.js.map +1 -1
- package/lib/esm/util/objects.js +4 -3
- package/lib/esm/util/objects.js.map +1 -1
- package/lib/esm/util/react.js +6 -3
- package/lib/esm/util/react.js.map +1 -1
- package/lib/esm/util/regexs.js +3 -2
- package/lib/esm/util/regexs.js.map +1 -1
- package/lib/esm/util/webchat.d.ts +2 -2
- package/lib/esm/util/webchat.js +13 -7
- package/lib/esm/util/webchat.js.map +1 -1
- package/lib/esm/webchat/chat-area/index.js.map +1 -1
- package/lib/esm/webchat/components/common.js +0 -1
- package/lib/esm/webchat/components/common.js.map +1 -1
- package/lib/esm/webchat/components/conditional-animation.js +1 -2
- package/lib/esm/webchat/components/conditional-animation.js.map +1 -1
- package/lib/esm/webchat/components/opened-persistent-menu.js +4 -2
- package/lib/esm/webchat/components/opened-persistent-menu.js.map +1 -1
- package/lib/esm/webchat/context/index.d.ts +1 -1
- package/lib/esm/webchat/context/messages-reducer.d.ts +1 -1
- package/lib/esm/webchat/context/messages-reducer.js +2 -2
- package/lib/esm/webchat/context/messages-reducer.js.map +1 -1
- package/lib/esm/webchat/context/types.d.ts +5 -5
- package/lib/esm/webchat/context/use-webchat.d.ts +6 -6
- package/lib/esm/webchat/context/use-webchat.js.map +1 -1
- package/lib/esm/webchat/context/webchat-reducer.d.ts +1 -1
- package/lib/esm/webchat/cover-component/index.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-angry.d.ts +2 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-angry.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-frown.d.ts +2 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-frown.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-grin-beam.d.ts +2 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-grin-beam.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-meh.d.ts +2 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-meh.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-smile.d.ts +2 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-smile.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/star.d.ts +2 -1
- package/lib/esm/webchat/custom-messages/rating/icons/star.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/index.js +2 -1
- package/lib/esm/webchat/custom-messages/rating/index.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/rating-selector.js +5 -2
- package/lib/esm/webchat/custom-messages/rating/rating-selector.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/smileys.d.ts +1 -1
- package/lib/esm/webchat/custom-messages/rating/smileys.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/stars.d.ts +1 -1
- package/lib/esm/webchat/custom-messages/rating/stars.js.map +1 -1
- package/lib/esm/webchat/header/default-header.js +1 -1
- package/lib/esm/webchat/header/default-header.js.map +1 -1
- package/lib/esm/webchat/header/index.d.ts +1 -2
- package/lib/esm/webchat/header/index.js.map +1 -1
- package/lib/esm/webchat/hooks/use-device-adapter.d.ts +1 -1
- package/lib/esm/webchat/hooks/use-device-adapter.js +8 -5
- package/lib/esm/webchat/hooks/use-device-adapter.js.map +1 -1
- package/lib/esm/webchat/hooks/use-scroll-to-bottom.js +4 -2
- package/lib/esm/webchat/hooks/use-scroll-to-bottom.js.map +1 -1
- package/lib/esm/webchat/hooks/use-scrollbar-controller.js +15 -11
- package/lib/esm/webchat/hooks/use-scrollbar-controller.js.map +1 -1
- package/lib/esm/webchat/hooks/use-typing.d.ts +2 -2
- package/lib/esm/webchat/hooks/use-typing.js +11 -6
- package/lib/esm/webchat/hooks/use-typing.js.map +1 -1
- package/lib/esm/webchat/hooks/use-virtual-keyboard-detection.d.ts +1 -1
- package/lib/esm/webchat/hooks/use-virtual-keyboard-detection.js +3 -5
- package/lib/esm/webchat/hooks/use-virtual-keyboard-detection.js.map +1 -1
- package/lib/esm/webchat/hooks/use-webchat-dimensions.js +5 -4
- package/lib/esm/webchat/hooks/use-webchat-dimensions.js.map +1 -1
- package/lib/esm/webchat/index-types.d.ts +1 -1
- package/lib/esm/webchat/input-panel/attachment.js.map +1 -1
- package/lib/esm/webchat/input-panel/emoji-picker.js +2 -0
- package/lib/esm/webchat/input-panel/emoji-picker.js.map +1 -1
- package/lib/esm/webchat/input-panel/index.d.ts +1 -1
- package/lib/esm/webchat/input-panel/index.js +4 -2
- package/lib/esm/webchat/input-panel/index.js.map +1 -1
- package/lib/esm/webchat/input-panel/persistent-menu.js +2 -0
- package/lib/esm/webchat/input-panel/persistent-menu.js.map +1 -1
- package/lib/esm/webchat/input-panel/send-button.js +2 -0
- package/lib/esm/webchat/input-panel/send-button.js.map +1 -1
- package/lib/esm/webchat/input-panel/textarea.d.ts +1 -1
- package/lib/esm/webchat/input-panel/textarea.js +10 -5
- package/lib/esm/webchat/input-panel/textarea.js.map +1 -1
- package/lib/esm/webchat/message-list/index.js.map +1 -1
- package/lib/esm/webchat/message-list/intro-message.js.map +1 -1
- package/lib/esm/webchat/message-list/scroll-button.js +2 -1
- package/lib/esm/webchat/message-list/scroll-button.js.map +1 -1
- package/lib/esm/webchat/message-list/unread-messages-banner.d.ts +2 -1
- package/lib/esm/webchat/message-list/unread-messages-banner.js.map +1 -1
- package/lib/esm/webchat/replies/index.js +1 -1
- package/lib/esm/webchat/replies/index.js.map +1 -1
- package/lib/esm/webchat/session-view.js +0 -2
- package/lib/esm/webchat/session-view.js.map +1 -1
- package/lib/esm/webchat/theme/default-theme.d.ts +1 -1
- package/lib/esm/webchat/theme/types.d.ts +1 -1
- package/lib/esm/webchat/tracking.d.ts +1 -1
- package/lib/esm/webchat/trigger-button/index.js +2 -0
- package/lib/esm/webchat/trigger-button/index.js.map +1 -1
- package/lib/esm/webchat/typing-indicator/index.d.ts +1 -2
- package/lib/esm/webchat/typing-indicator/index.js.map +1 -1
- package/lib/esm/webchat/utils.d.ts +1 -1
- package/lib/esm/webchat/utils.js +2 -1
- package/lib/esm/webchat/utils.js.map +1 -1
- package/lib/esm/webchat/webchat-dev.d.ts +2 -3
- package/lib/esm/webchat/webchat-dev.js +1 -2
- package/lib/esm/webchat/webchat-dev.js.map +1 -1
- package/lib/esm/webchat/webchat.d.ts +2 -3
- package/lib/esm/webchat/webchat.js +72 -45
- package/lib/esm/webchat/webchat.js.map +1 -1
- package/lib/esm/webchat/webview/header.js.map +1 -1
- package/lib/esm/webchat/webview/index.d.ts +1 -1
- package/lib/esm/webchat/webview/index.js.map +1 -1
- package/lib/esm/webchat/webview/styles.js.map +1 -1
- package/lib/esm/webchat-app.d.ts +6 -6
- package/lib/esm/webchat-app.js +25 -22
- package/lib/esm/webchat-app.js.map +1 -1
- package/lib/esm/webview-app.js +7 -4
- package/lib/esm/webview-app.js.map +1 -1
- package/package.json +5 -5
- package/src/botonic-tester.jsx +0 -1
- package/src/components/audio.tsx +3 -3
- package/src/components/button/index.tsx +7 -10
- package/src/components/buttons-disabler.ts +16 -8
- package/src/components/carousel.tsx +8 -8
- package/src/components/custom-message.tsx +2 -3
- package/src/components/document.tsx +4 -3
- package/src/components/element.tsx +10 -6
- package/src/components/handoff.jsx +2 -2
- package/src/components/image.tsx +2 -2
- package/src/components/index-types.ts +2 -2
- package/src/components/location.jsx +0 -1
- package/src/components/markdown.js +26 -22
- package/src/components/message/index.jsx +72 -64
- package/src/components/message/message-feedback.tsx +1 -1
- package/src/components/message/message-footer.tsx +1 -1
- package/src/components/message/message-image.tsx +1 -1
- package/src/components/message/timestamps.tsx +2 -1
- package/src/components/message-template.jsx +1 -2
- package/src/components/multichannel/facebook/facebook.jsx +3 -3
- package/src/components/multichannel/multichannel-button.jsx +7 -5
- package/src/components/multichannel/multichannel-carousel.jsx +16 -6
- package/src/components/multichannel/multichannel-reply.jsx +4 -2
- package/src/components/multichannel/multichannel-text.jsx +17 -9
- package/src/components/multichannel/multichannel-utils.ts +12 -4
- package/src/components/multichannel/multichannel.jsx +1 -1
- package/src/components/pic.tsx +1 -2
- package/src/components/raw.jsx +3 -2
- package/src/components/reply.tsx +11 -7
- package/src/components/share-button.jsx +1 -2
- package/src/components/subtitle.tsx +1 -1
- package/src/components/system-debug-trace/debug-message.tsx +3 -2
- package/src/components/system-debug-trace/events/ai-agent.tsx +3 -3
- package/src/components/system-debug-trace/events/bot-action.tsx +1 -2
- package/src/components/system-debug-trace/events/components/guardrail-item.tsx +1 -1
- package/src/components/system-debug-trace/events/components/sources-section.tsx +5 -3
- package/src/components/system-debug-trace/events/conditional-channel.tsx +1 -2
- package/src/components/system-debug-trace/events/conditional-country.tsx +1 -2
- package/src/components/system-debug-trace/events/conditional-custom.tsx +1 -2
- package/src/components/system-debug-trace/events/conditional-queue-status.tsx +1 -2
- package/src/components/system-debug-trace/events/fallback.tsx +1 -2
- package/src/components/system-debug-trace/events/handoff-success.tsx +2 -2
- package/src/components/system-debug-trace/events/keyword.tsx +1 -2
- package/src/components/system-debug-trace/events/knowledge-base.tsx +3 -3
- package/src/components/system-debug-trace/events/redirect-flow.tsx +1 -2
- package/src/components/system-debug-trace/events/smart-intent.tsx +1 -2
- package/src/components/system-debug-trace/events/webview-action-triggered.tsx +1 -2
- package/src/components/system-debug-trace/hooks/use-knowledge-base-info.tsx +9 -5
- package/src/components/system-debug-trace/hooks/use-last-label-position.ts +10 -4
- package/src/components/system-debug-trace/icons/arrow-progress.tsx +2 -3
- package/src/components/system-debug-trace/icons/brain.tsx +2 -3
- package/src/components/system-debug-trace/icons/caret-down.tsx +2 -3
- package/src/components/system-debug-trace/icons/caret-up.tsx +2 -3
- package/src/components/system-debug-trace/icons/circle-check.tsx +2 -3
- package/src/components/system-debug-trace/icons/code.tsx +2 -3
- package/src/components/system-debug-trace/icons/file-pdf.tsx +2 -3
- package/src/components/system-debug-trace/icons/file-word.tsx +2 -3
- package/src/components/system-debug-trace/icons/hand.tsx +2 -3
- package/src/components/system-debug-trace/icons/head-set.tsx +2 -3
- package/src/components/system-debug-trace/icons/life-ring.tsx +2 -3
- package/src/components/system-debug-trace/icons/link.tsx +2 -3
- package/src/components/system-debug-trace/icons/quote-right.tsx +2 -3
- package/src/components/system-debug-trace/icons/screwdriver-wrench.tsx +2 -3
- package/src/components/system-debug-trace/icons/split.tsx +2 -3
- package/src/components/system-debug-trace/icons/wand.tsx +2 -3
- package/src/components/system-debug-trace/icons/window-restore.tsx +2 -3
- package/src/components/system-debug-trace/index.tsx +0 -1
- package/src/components/system-debug-trace/types.ts +2 -2
- package/src/components/text.tsx +11 -6
- package/src/components/title.tsx +1 -1
- package/src/components/video.tsx +3 -3
- package/src/components/webchat-settings.tsx +51 -40
- package/src/components/whatsapp-button-list.tsx +1 -2
- package/src/components/whatsapp-catalog.tsx +1 -2
- package/src/components/whatsapp-cta-url-button.tsx +1 -2
- package/src/components/whatsapp-interactive-media-carousel.tsx +5 -4
- package/src/components/whatsapp-media-carousel.tsx +1 -2
- package/src/components/whatsapp-product-carousel.tsx +1 -2
- package/src/components/whatsapp-product-list.tsx +1 -2
- package/src/components/whatsapp-product.tsx +1 -2
- package/src/components/whatsapp-template/index.tsx +1 -2
- package/src/contexts.tsx +2 -2
- package/src/dev-app.jsx +4 -6
- package/src/index-types.ts +9 -9
- package/src/message-utils.js +3 -1
- package/src/msg-to-botonic.jsx +19 -20
- package/src/react-bot.tsx +2 -2
- package/src/util/dom.js +3 -3
- package/src/util/environment.js +18 -8
- package/src/util/error-boundary.jsx +4 -4
- package/src/util/logs.js +2 -1
- package/src/util/objects.js +5 -3
- package/src/util/react.js +8 -3
- package/src/util/regexs.js +4 -2
- package/src/util/webchat.ts +20 -9
- package/src/webchat/chat-area/index.tsx +1 -1
- package/src/webchat/components/common.jsx +0 -1
- package/src/webchat/components/conditional-animation.jsx +1 -1
- package/src/webchat/components/opened-persistent-menu.jsx +4 -2
- package/src/webchat/context/index.tsx +3 -3
- package/src/webchat/context/messages-reducer.ts +3 -5
- package/src/webchat/context/types.ts +5 -5
- package/src/webchat/context/use-webchat.ts +11 -6
- package/src/webchat/context/webchat-reducer.ts +1 -1
- package/src/webchat/cover-component/index.tsx +1 -1
- package/src/webchat/custom-messages/rating/icons/face-angry.tsx +2 -3
- package/src/webchat/custom-messages/rating/icons/face-frown.tsx +2 -3
- package/src/webchat/custom-messages/rating/icons/face-grin-beam.tsx +2 -3
- package/src/webchat/custom-messages/rating/icons/face-meh.tsx +2 -3
- package/src/webchat/custom-messages/rating/icons/face-smile.tsx +2 -3
- package/src/webchat/custom-messages/rating/icons/star.tsx +2 -3
- package/src/webchat/custom-messages/rating/index.tsx +7 -4
- package/src/webchat/custom-messages/rating/rating-selector.tsx +7 -3
- package/src/webchat/custom-messages/rating/smileys.tsx +1 -3
- package/src/webchat/custom-messages/rating/stars.tsx +1 -3
- package/src/webchat/header/default-header.tsx +2 -2
- package/src/webchat/header/index.tsx +1 -1
- package/src/webchat/hooks/use-device-adapter.ts +17 -4
- package/src/webchat/hooks/use-scroll-to-bottom.ts +6 -2
- package/src/webchat/hooks/use-scrollbar-controller.ts +18 -11
- package/src/webchat/hooks/use-typing.ts +14 -8
- package/src/webchat/hooks/use-virtual-keyboard-detection.ts +4 -5
- package/src/webchat/hooks/use-webchat-dimensions.ts +7 -5
- package/src/webchat/index-types.ts +1 -1
- package/src/webchat/input-panel/attachment.tsx +1 -1
- package/src/webchat/input-panel/emoji-picker.tsx +3 -1
- package/src/webchat/input-panel/index.tsx +8 -3
- package/src/webchat/input-panel/opened-emoji-picker.tsx +1 -1
- package/src/webchat/input-panel/persistent-menu.tsx +3 -1
- package/src/webchat/input-panel/send-button.tsx +3 -1
- package/src/webchat/input-panel/textarea.tsx +16 -7
- package/src/webchat/message-list/index.tsx +1 -1
- package/src/webchat/message-list/intro-message.tsx +1 -1
- package/src/webchat/message-list/scroll-button.tsx +8 -11
- package/src/webchat/message-list/unread-messages-banner.tsx +3 -1
- package/src/webchat/replies/index.tsx +2 -2
- package/src/webchat/session-view.jsx +0 -2
- package/src/webchat/theme/default-theme.ts +1 -1
- package/src/webchat/theme/types.ts +1 -1
- package/src/webchat/tracking.ts +2 -2
- package/src/webchat/trigger-button/index.tsx +3 -1
- package/src/webchat/typing-indicator/index.tsx +1 -1
- package/src/webchat/utils.ts +4 -2
- package/src/webchat/webchat-dev.jsx +1 -2
- package/src/webchat/webchat.tsx +99 -49
- package/src/webchat/webview/header.tsx +1 -1
- package/src/webchat/webview/index.tsx +7 -6
- package/src/webchat/webview/styles.ts +1 -1
- package/src/webchat-app.tsx +46 -38
- package/src/webview-app.tsx +12 -6
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/** biome-ignore-all lint/a11y/noSvgWithoutTitle: This is a SVG icon */
|
|
2
|
+
import type { RatingIconProps } from '../types';
|
|
2
3
|
export declare const FaceSmileSvg: ({ color, selected }: RatingIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"face-smile.js","sourceRoot":"","sources":["../../../../../../src/webchat/custom-messages/rating/icons/face-smile.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"face-smile.js","sourceRoot":"","sources":["../../../../../../src/webchat/custom-messages/rating/icons/face-smile.tsx"],"names":[],"mappings":";;;;AAGO,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAmB,EAAE,EAAE;IACnE,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,gCAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa,EAAC,KAAK,EAAE,KAAK,YACxE,iCACE,CAAC,EAAC,mVAAmV,EACrV,IAAI,EAAC,cAAc,GACnB,GACE,CACP,CAAC,CAAC,CAAC,CACF,gCAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa,EAAC,KAAK,EAAE,KAAK,YACxE,iCACE,CAAC,EAAC,kYAAkY,EACpY,IAAI,EAAC,cAAc,GACnB,GACE,CACP,CAAA;AACH,CAAC,CAAA;AAhBY,QAAA,YAAY,gBAgBxB"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/** biome-ignore-all lint/a11y/noSvgWithoutTitle: This is a SVG icon */
|
|
2
|
+
import type { RatingIconProps } from '../types';
|
|
2
3
|
export declare const StarSvg: ({ color, selected }: RatingIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"star.js","sourceRoot":"","sources":["../../../../../../src/webchat/custom-messages/rating/icons/star.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"star.js","sourceRoot":"","sources":["../../../../../../src/webchat/custom-messages/rating/icons/star.tsx"],"names":[],"mappings":";;;;AAGO,MAAM,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAmB,EAAE,EAAE;IAC9D,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,gCAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa,EAAC,KAAK,EAAE,KAAK,YACxE,iCACE,CAAC,EAAC,gVAAgV,EAClV,IAAI,EAAC,cAAc,GACnB,GACE,CACP,CAAC,CAAC,CAAC,CACF,gCAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa,EAAC,KAAK,EAAE,KAAK,YACxE,iCACE,CAAC,EAAC,glBAAglB,EACllB,IAAI,EAAC,cAAc,GACnB,GACE,CACP,CAAA;AACH,CAAC,CAAA;AAhBY,QAAA,OAAO,WAgBnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/webchat/custom-messages/rating/index.tsx"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/webchat/custom-messages/rating/index.tsx"],"names":[],"mappings":";;;AAAA,wCAAqD;AAErD,iCAA4C;AAC5C,yDAAgD;AAEhD,oDAA2D;AAC3D,2CAA8C;AAC9C,uDAAkD;AAClD,qCAAwC;AAYxC,MAAM,mBAAmB,GAAuC,KAAK,CAAC,EAAE;IACtE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,KAAK,CAAA;IAC9E,MAAM,EAAE,wBAAwB,EAAE,SAAS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E,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,GACpB,IACY,EACf,CAAC,KAAK,EAAE,SAAS,IAAI,UAAU,IAAI,CAClC,uBAAC,mBAAM,IACL,WAAW,EAAE,IAAI,EACjB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,gBAAgB,YAExB,UAAU,GACJ,CACV,IACG,CACP,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,IAAA,0BAAa,EAAC;IAC3B,IAAI,EAAE,eAAe;IACrB,SAAS,EAAE,mBAAmB;CAC/B,CAAC,CAAA"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RatingSelector = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
/** biome-ignore-all lint/a11y/noStaticElementInteractions: we need to use static elements for the rating selector */
|
|
6
|
+
/** biome-ignore-all lint/a11y/useKeyWithClickEvents: we need to use key with click events for the rating selector */
|
|
5
7
|
const react_1 = require("react");
|
|
6
8
|
const smileys_1 = require("./smileys");
|
|
7
9
|
const stars_1 = require("./stars");
|
|
@@ -11,12 +13,13 @@ const NUMBER_OF_RATING_BUTTONS = 5;
|
|
|
11
13
|
const RatingSelector = ({ color, isSent, onRatingChange, ratingValue, ratingType, valueSent, }) => {
|
|
12
14
|
const [hover, setHover] = (0, react_1.useState)(valueSent ? valueSent : -1);
|
|
13
15
|
const onHover = (ratingNumber) => {
|
|
14
|
-
if (!valueSent)
|
|
16
|
+
if (!valueSent) {
|
|
15
17
|
setHover(ratingNumber);
|
|
18
|
+
}
|
|
16
19
|
};
|
|
17
20
|
return ((0, jsx_runtime_1.jsx)(styles_1.RatingSelectorContainer, { isSent: isSent, children: Array.from({ length: NUMBER_OF_RATING_BUTTONS }, (_star, i) => {
|
|
18
21
|
const ratingNumber = i + 1;
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)("div", { onMouseEnter: () => onHover(ratingNumber), onMouseLeave: () => onHover(ratingValue), onClick: () => onRatingChange(ratingNumber), children: [ratingType === types_1.RatingType.Stars && ((0, jsx_runtime_1.jsx)(stars_1.Stars, { color: color, ratingNumber: ratingNumber, hover: hover })), ratingType === types_1.RatingType.Smileys && ((0, jsx_runtime_1.jsx)(smileys_1.Smileys, { color: color, ratingNumber: ratingNumber, hover: hover }))] },
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)("div", { onMouseEnter: () => onHover(ratingNumber), onMouseLeave: () => onHover(ratingValue), onClick: () => onRatingChange(ratingNumber), children: [ratingType === types_1.RatingType.Stars && ((0, jsx_runtime_1.jsx)(stars_1.Stars, { color: color, ratingNumber: ratingNumber, hover: hover })), ratingType === types_1.RatingType.Smileys && ((0, jsx_runtime_1.jsx)(smileys_1.Smileys, { color: color, ratingNumber: ratingNumber, hover: hover }))] }, ratingNumber));
|
|
20
23
|
}) }));
|
|
21
24
|
};
|
|
22
25
|
exports.RatingSelector = RatingSelector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rating-selector.js","sourceRoot":"","sources":["../../../../../src/webchat/custom-messages/rating/rating-selector.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"rating-selector.js","sourceRoot":"","sources":["../../../../../src/webchat/custom-messages/rating/rating-selector.tsx"],"names":[],"mappings":";;;;AAAA,qHAAqH;AACrH,qHAAqH;AACrH,iCAAgC;AAEhC,uCAAmC;AACnC,mCAA+B;AAC/B,qCAAkD;AAClD,mCAAoC;AAEpC,MAAM,wBAAwB,GAAG,CAAC,CAAA;AAU3B,MAAM,cAAc,GAAG,CAAC,EAC7B,KAAK,EACL,MAAM,EACN,cAAc,EACd,WAAW,EACX,UAAU,EACV,SAAS,GACW,EAAE,EAAE;IACxB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAS,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEtE,MAAM,OAAO,GAAG,CAAC,YAAoB,EAAE,EAAE;QACvC,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,QAAQ,CAAC,YAAY,CAAC,CAAA;QACxB,CAAC;IACH,CAAC,CAAA;IAED,OAAO,CACL,uBAAC,gCAAuB,IAAC,MAAM,EAAE,MAAM,YACpC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,wBAAwB,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;YAC7D,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,CAAA;YAE1B,OAAO,CACL,iCAEE,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,EACzC,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,EACxC,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,YAAY,CAAC,aAE1C,UAAU,KAAK,kBAAU,CAAC,KAAK,IAAI,CAClC,uBAAC,aAAK,IAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,GAAI,CAClE,EACA,UAAU,KAAK,kBAAU,CAAC,OAAO,IAAI,CACpC,uBAAC,iBAAO,IACN,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,GACZ,CACH,KAdI,YAAY,CAeb,CACP,CAAA;QACH,CAAC,CAAC,GACsB,CAC3B,CAAA;AACH,CAAC,CAAA;AA3CY,QAAA,cAAc,kBA2C1B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RatingItemProps } from './types';
|
|
1
|
+
import type { RatingItemProps } from './types';
|
|
2
2
|
export declare const Smileys: ({ color, ratingNumber, hover }: RatingItemProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smileys.js","sourceRoot":"","sources":["../../../../../src/webchat/custom-messages/rating/smileys.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"smileys.js","sourceRoot":"","sources":["../../../../../src/webchat/custom-messages/rating/smileys.tsx"],"names":[],"mappings":";;;;AAAA,mCAMgB;AAGhB,MAAM,UAAU,GAAG;IACjB,CAAC,EAAE,oBAAY;IACf,CAAC,EAAE,oBAAY;IACf,CAAC,EAAE,kBAAU;IACb,CAAC,EAAE,oBAAY;IACf,CAAC,EAAE,uBAAe;CACV,CAAA;AAEH,MAAM,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAmB,EAAE,EAAE;IACzE,MAAM,UAAU,GAAG,KAAK,KAAK,YAAY,CAAA;IACzC,MAAM,eAAe,GAAG,UAAU,CAAC,YAAuC,CAAC,CAAA;IAE3E,OAAO,eAAe,CAAC,CAAC,CAAC,CACvB,uBAAC,eAAe,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,GAAI,CACxD,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC,CAAA;AAPY,QAAA,OAAO,WAOnB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RatingItemProps } from './types';
|
|
1
|
+
import type { RatingItemProps } from './types';
|
|
2
2
|
export declare const Stars: ({ color, ratingNumber, hover }: RatingItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stars.js","sourceRoot":"","sources":["../../../../../src/webchat/custom-messages/rating/stars.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"stars.js","sourceRoot":"","sources":["../../../../../src/webchat/custom-messages/rating/stars.tsx"],"names":[],"mappings":";;;;AAAA,yCAAuC;AAGhC,MAAM,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAmB,EAAE,EAAE;IACvE,MAAM,UAAU,GAAG,KAAK,IAAI,YAAY,CAAA;IACxC,OAAO,uBAAC,eAAO,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,GAAI,CAAA;AACxD,CAAC,CAAA;AAHY,QAAA,KAAK,SAGjB"}
|
|
@@ -19,7 +19,7 @@ const DefaultHeader = () => {
|
|
|
19
19
|
toggleWebchat(false);
|
|
20
20
|
};
|
|
21
21
|
const color = getThemeProperty(constants_1.WEBCHAT.CUSTOM_PROPERTIES.brandColor);
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)(styles_2.HeaderContainer, { role: constants_1.ROLES.HEADER, color: color, style: { ...getThemeProperty(constants_1.WEBCHAT.CUSTOM_PROPERTIES.headerStyle) }, children: [headerImage && ((0, jsx_runtime_1.jsx)(styles_2.ImageContainer, { children: (0, jsx_runtime_1.jsx)("img", { src: (0, environment_1.resolveImage)(headerImage) }) })), (0, jsx_runtime_1.jsxs)(styles_2.TextContainer, { children: [(0, jsx_runtime_1.jsx)(styles_2.Title, { children: headerTitle }), headerSubtitle ? (0, jsx_runtime_1.jsx)(styles_2.Subtitle, { children: headerSubtitle }) : null] }), (0, jsx_runtime_1.jsx)(react_2.ConditionalWrapper, { condition: animationsEnabled, wrapper: children => (0, jsx_runtime_1.jsx)(styles_1.Scale, { children: children }), children: (0, jsx_runtime_1.jsx)(styles_2.CloseHeader, { onClick: handleCloseWebchat, children: "\u2A2F" }) })] }));
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(styles_2.HeaderContainer, { role: constants_1.ROLES.HEADER, color: color, style: { ...getThemeProperty(constants_1.WEBCHAT.CUSTOM_PROPERTIES.headerStyle) }, children: [headerImage && ((0, jsx_runtime_1.jsx)(styles_2.ImageContainer, { children: (0, jsx_runtime_1.jsx)("img", { src: (0, environment_1.resolveImage)(headerImage), alt: 'Header' }) })), (0, jsx_runtime_1.jsxs)(styles_2.TextContainer, { children: [(0, jsx_runtime_1.jsx)(styles_2.Title, { children: headerTitle }), headerSubtitle ? (0, jsx_runtime_1.jsx)(styles_2.Subtitle, { children: headerSubtitle }) : null] }), (0, jsx_runtime_1.jsx)(react_2.ConditionalWrapper, { condition: animationsEnabled, wrapper: children => (0, jsx_runtime_1.jsx)(styles_1.Scale, { children: children }), children: (0, jsx_runtime_1.jsx)(styles_2.CloseHeader, { onClick: handleCloseWebchat, children: "\u2A2F" }) })] }));
|
|
23
23
|
};
|
|
24
24
|
exports.DefaultHeader = DefaultHeader;
|
|
25
25
|
//# sourceMappingURL=default-header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-header.js","sourceRoot":"","sources":["../../../../src/webchat/header/default-header.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"default-header.js","sourceRoot":"","sources":["../../../../src/webchat/header/default-header.tsx"],"names":[],"mappings":";;;;AAAA,iCAAkC;AAElC,+CAAgD;AAChD,gDAA2C;AAC3C,wDAAqD;AACrD,4CAAqD;AACrD,mDAAsD;AACtD,qCAOiB;AAEV,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,GAAG,IAAA,kBAAU,EAAC,wBAAc,CAAC,CAAA;IAEtE,MAAM,iBAAiB,GAAG,gBAAgB,CACxC,mBAAO,CAAC,iBAAiB,CAAC,gBAAgB,CAC3C,CAAA;IAED,MAAM,WAAW,GAAG,gBAAgB,CAClC,mBAAO,CAAC,iBAAiB,CAAC,WAAW,EACrC,gBAAgB,CAAC,mBAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,CACvD,CAAA;IAED,MAAM,WAAW,GAAG,gBAAgB,CAAC,mBAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAE3E,MAAM,cAAc,GAAG,gBAAgB,CACrC,mBAAO,CAAC,iBAAiB,CAAC,cAAc,CACzC,CAAA;IAED,MAAM,kBAAkB,GAAG,GAAG,EAAE;QAC9B,aAAa,CAAC,KAAK,CAAC,CAAA;IACtB,CAAC,CAAA;IAED,MAAM,KAAK,GAAG,gBAAgB,CAAC,mBAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAA;IAEpE,OAAO,CACL,wBAAC,wBAAe,IACd,IAAI,EAAE,iBAAK,CAAC,MAAM,EAClB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,EAAE,GAAG,gBAAgB,CAAC,mBAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,aAEpE,WAAW,IAAI,CACd,uBAAC,uBAAc,cACb,gCAAK,GAAG,EAAE,IAAA,0BAAY,EAAC,WAAW,CAAC,EAAE,GAAG,EAAC,QAAQ,GAAG,GACrC,CAClB,EACD,wBAAC,sBAAa,eACZ,uBAAC,cAAK,cAAE,WAAW,GAAS,EAC3B,cAAc,CAAC,CAAC,CAAC,uBAAC,iBAAQ,cAAE,cAAc,GAAY,CAAC,CAAC,CAAC,IAAI,IAChD,EAChB,uBAAC,0BAAkB,IACjB,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC,uBAAC,cAAK,cAAE,QAAQ,GAAS,YAE9C,uBAAC,oBAAW,IAAC,OAAO,EAAE,kBAAkB,uBAAiB,GACtC,IACL,CACnB,CAAA;AACH,CAAC,CAAA;AA/CY,QAAA,aAAa,iBA+CzB"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const WebchatHeader: React.ForwardRefExoticComponent<React.RefAttributes<HTMLDivElement>>;
|
|
1
|
+
export declare const WebchatHeader: import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/webchat/header/index.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/webchat/header/index.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiE;AAEjE,+CAAyC;AACzC,mDAAsD;AACtD,4CAAiD;AACjD,qDAAgD;AAChD,qCAA8C;AAEjC,QAAA,aAAa,GAAG,IAAA,kBAAU,EACrC,CAAC,CAAC,EAAE,GAAiC,EAAE,EAAE;IACvC,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,GAAG,IAAA,kBAAU,EAAC,wBAAc,CAAC,CAAA;IAEtE,MAAM,kBAAkB,GAAG,GAAG,EAAE;QAC9B,aAAa,CAAC,KAAK,CAAC,CAAA;IACtB,CAAC,CAAA;IAED,MAAM,YAAY,GAAG,gBAAgB,CACnC,mBAAO,CAAC,iBAAiB,CAAC,YAAY,CACvC,CAAA;IAED,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,CACL,gCAAK,EAAE,EAAE,8BAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,YAC1C,uBAAC,YAAY,IAAC,YAAY,EAAE,kBAAkB,GAAI,GAC9C,CACP,CAAA;IACH,CAAC;IAED,OAAO,CACL,uBAAC,4BAAmB,IAAC,EAAE,EAAE,8BAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,YAC1D,uBAAC,8BAAa,KAAG,GACG,CACvB,CAAA;AACH,CAAC,CACF,CAAA;AAED,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAA"}
|
|
@@ -8,9 +8,10 @@ const use_scrollbar_controller_1 = require("./use-scrollbar-controller");
|
|
|
8
8
|
const use_virtual_keyboard_detection_1 = require("./use-virtual-keyboard-detection");
|
|
9
9
|
const use_webchat_resizer_1 = require("./use-webchat-resizer");
|
|
10
10
|
function getCurrentDevice() {
|
|
11
|
-
|
|
12
|
-
if (
|
|
13
|
-
return
|
|
11
|
+
const nav = navigator;
|
|
12
|
+
if (nav.userAgentData) {
|
|
13
|
+
return nav.userAgentData.platform;
|
|
14
|
+
}
|
|
14
15
|
return navigator.platform;
|
|
15
16
|
}
|
|
16
17
|
const useDeviceAdapter = (host, isWebchatOpen) => {
|
|
@@ -20,8 +21,9 @@ const useDeviceAdapter = (host, isWebchatOpen) => {
|
|
|
20
21
|
const { handleKeyboardShown, handleKeyboardHidden } = (0, use_webchat_resizer_1.useWebchatResizer)();
|
|
21
22
|
const { handleScrollEvents } = (0, use_scrollbar_controller_1.useScrollbarController)(currentDevice, host);
|
|
22
23
|
(0, react_1.useEffect)(() => {
|
|
23
|
-
if (currentDevice !== devices_1.DEVICES.MOBILE.IPHONE)
|
|
24
|
+
if (currentDevice !== devices_1.DEVICES.MOBILE.IPHONE) {
|
|
24
25
|
return;
|
|
26
|
+
}
|
|
25
27
|
if (isVirtualKeyboardVisible) {
|
|
26
28
|
handleKeyboardShown();
|
|
27
29
|
scrollToBottom();
|
|
@@ -33,8 +35,9 @@ const useDeviceAdapter = (host, isWebchatOpen) => {
|
|
|
33
35
|
}, [isVirtualKeyboardVisible]);
|
|
34
36
|
(0, react_1.useEffect)(() => {
|
|
35
37
|
if (host && isWebchatOpen) {
|
|
36
|
-
if (currentDevice !== devices_1.DEVICES.MOBILE.IPHONE)
|
|
38
|
+
if (currentDevice !== devices_1.DEVICES.MOBILE.IPHONE) {
|
|
37
39
|
return;
|
|
40
|
+
}
|
|
38
41
|
handleScrollEvents();
|
|
39
42
|
}
|
|
40
43
|
}, [host, isWebchatOpen, handleScrollEvents]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-device-adapter.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-device-adapter.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AAEjC,wCAAoC;AACpC,iEAA0D;AAC1D,yEAAmE;AACnE,qFAA8E;AAC9E,+DAAyD;
|
|
1
|
+
{"version":3,"file":"use-device-adapter.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-device-adapter.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AAEjC,wCAAoC;AACpC,iEAA0D;AAC1D,yEAAmE;AACnE,qFAA8E;AAC9E,+DAAyD;AASzD,SAAS,gBAAgB;IACvB,MAAM,GAAG,GAAG,SAAuC,CAAA;IACnD,IAA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aAAa;KACd,CAAA;AACH,CAAC,CAAA;AAvCY,QAAA,gBAAgB,oBAuC5B"}
|
|
@@ -5,11 +5,13 @@ const dom_1 = require("../../util/dom");
|
|
|
5
5
|
const useScrollToBottom = ({ host, behavior = 'smooth', timeout = 200, }) => {
|
|
6
6
|
const scrollToBottom = () => {
|
|
7
7
|
const webchatElement = (0, dom_1.getWebchatElement)(host);
|
|
8
|
-
if (!webchatElement)
|
|
8
|
+
if (!webchatElement) {
|
|
9
9
|
return;
|
|
10
|
+
}
|
|
10
11
|
const scrollableMessagesListElement = (0, dom_1.getScrollableMessagesListElement)(host);
|
|
11
|
-
if (!scrollableMessagesListElement)
|
|
12
|
+
if (!scrollableMessagesListElement) {
|
|
12
13
|
return;
|
|
14
|
+
}
|
|
13
15
|
setTimeout(() => {
|
|
14
16
|
scrollableMessagesListElement.scrollTo({
|
|
15
17
|
top: scrollableMessagesListElement.scrollHeight,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-scroll-to-bottom.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-scroll-to-bottom.ts"],"names":[],"mappings":";;;AAAA,wCAGuB;AAQhB,MAAM,iBAAiB,GAAG,CAAC,EAChC,IAAI,EACJ,QAAQ,GAAG,QAAQ,EACnB,OAAO,GAAG,GAAG,GACK,EAAE,EAAE;IACtB,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,MAAM,cAAc,GAAG,IAAA,uBAAiB,EAAC,IAAI,CAAC,CAAA;QAC9C,IAAI,CAAC,cAAc;
|
|
1
|
+
{"version":3,"file":"use-scroll-to-bottom.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-scroll-to-bottom.ts"],"names":[],"mappings":";;;AAAA,wCAGuB;AAQhB,MAAM,iBAAiB,GAAG,CAAC,EAChC,IAAI,EACJ,QAAQ,GAAG,QAAQ,EACnB,OAAO,GAAG,GAAG,GACK,EAAE,EAAE;IACtB,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,MAAM,cAAc,GAAG,IAAA,uBAAiB,EAAC,IAAI,CAAC,CAAA;QAC9C,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,OAAM;QACR,CAAC;QACD,MAAM,6BAA6B,GAAG,IAAA,sCAAgC,EAAC,IAAI,CAAC,CAAA;QAC5E,IAAI,CAAC,6BAA6B,EAAE,CAAC;YACnC,OAAM;QACR,CAAC;QAED,UAAU,CAAC,GAAG,EAAE;YACd,6BAA6B,CAAC,QAAQ,CAAC;gBACrC,GAAG,EAAE,6BAA6B,CAAC,YAAY;gBAC/C,QAAQ,EAAE,QAAQ;aACnB,CAAC,CAAA;QACJ,CAAC,EAAE,OAAO,CAAC,CAAA;IACb,CAAC,CAAA;IAED,OAAO,EAAE,cAAc,EAAE,CAAA;AAC3B,CAAC,CAAA;AAxBY,QAAA,iBAAiB,qBAwB7B"}
|
|
@@ -6,8 +6,8 @@ const context_1 = require("../../webchat/context");
|
|
|
6
6
|
const devices_1 = require("../devices");
|
|
7
7
|
// TODO: Investigate why when we have some messages, scroll actions are not disabled properly
|
|
8
8
|
const debounced = (delay, fn) => {
|
|
9
|
-
let timerId;
|
|
10
|
-
return
|
|
9
|
+
let timerId = null;
|
|
10
|
+
return (...args) => {
|
|
11
11
|
if (timerId) {
|
|
12
12
|
clearTimeout(timerId);
|
|
13
13
|
}
|
|
@@ -18,10 +18,12 @@ const debounced = (delay, fn) => {
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
const stopAtScrollLimit = element => {
|
|
21
|
-
if (element.scrollTop === 0)
|
|
21
|
+
if (element.scrollTop === 0) {
|
|
22
22
|
element.scrollTop = 1;
|
|
23
|
-
|
|
23
|
+
}
|
|
24
|
+
if (element.scrollHeight - element.scrollTop === element.clientHeight) {
|
|
24
25
|
element.scrollTop -= 1;
|
|
26
|
+
}
|
|
25
27
|
};
|
|
26
28
|
const useScrollbarController = (currentDevice, host) => {
|
|
27
29
|
const { webchatContainerRef, chatAreaRef, repliesRef, scrollableMessagesListRef, } = (0, react_1.useContext)(context_1.WebchatContext);
|
|
@@ -41,11 +43,11 @@ const useScrollbarController = (currentDevice, host) => {
|
|
|
41
43
|
const toggleOnMouseWheelEvents = () => {
|
|
42
44
|
if (scrollableMessagesListRef.current) {
|
|
43
45
|
if (hasScrollbar()) {
|
|
44
|
-
// @ts-
|
|
46
|
+
// @ts-expect-error
|
|
45
47
|
scrollableMessagesListRef.current.onmousewheel = {};
|
|
46
48
|
return;
|
|
47
49
|
}
|
|
48
|
-
// @ts-
|
|
50
|
+
// @ts-expect-error
|
|
49
51
|
scrollableMessagesListRef.current.onmousewheel = e => {
|
|
50
52
|
e.preventDefault();
|
|
51
53
|
};
|
|
@@ -87,18 +89,19 @@ const useScrollbarController = (currentDevice, host) => {
|
|
|
87
89
|
toggleOnTouchMoveEvents();
|
|
88
90
|
};
|
|
89
91
|
const limitScrollBoundaries = () => {
|
|
90
|
-
if (currentDevice !== devices_1.DEVICES.MOBILE.IPHONE)
|
|
92
|
+
if (currentDevice !== devices_1.DEVICES.MOBILE.IPHONE) {
|
|
91
93
|
return;
|
|
94
|
+
}
|
|
92
95
|
const chatArea = chatAreaRef.current;
|
|
93
96
|
const dStopAtScrollLimit = debounced(100, stopAtScrollLimit);
|
|
94
97
|
if (chatArea) {
|
|
95
|
-
// @ts-
|
|
98
|
+
// @ts-expect-error
|
|
96
99
|
if (window.addEventListener) {
|
|
97
100
|
chatArea.addEventListener('scroll', () => dStopAtScrollLimit(chatArea), true);
|
|
98
|
-
// @ts-
|
|
101
|
+
// @ts-expect-error
|
|
99
102
|
}
|
|
100
103
|
else if (window.attachEvent) {
|
|
101
|
-
// @ts-
|
|
104
|
+
// @ts-expect-error
|
|
102
105
|
chatAreaRef.attachEvent('scroll', () => dStopAtScrollLimit(chatArea));
|
|
103
106
|
}
|
|
104
107
|
}
|
|
@@ -106,8 +109,9 @@ const useScrollbarController = (currentDevice, host) => {
|
|
|
106
109
|
const handleScrollEvents = () => {
|
|
107
110
|
if (webchatContainerRef.current) {
|
|
108
111
|
if ((0, devices_1.isMobileDevice)()) {
|
|
109
|
-
if (currentDevice !== devices_1.DEVICES.MOBILE.IPHONE)
|
|
112
|
+
if (currentDevice !== devices_1.DEVICES.MOBILE.IPHONE) {
|
|
110
113
|
return;
|
|
114
|
+
}
|
|
111
115
|
limitScrollBoundaries();
|
|
112
116
|
webchatContainerRef.current.ontouchstart = handleOnTouchMoveEvents;
|
|
113
117
|
webchatContainerRef.current.ontouchmove = handleOnTouchMoveEvents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-scrollbar-controller.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-scrollbar-controller.ts"],"names":[],"mappings":";;;AAAA,iCAA6C;AAE7C,mDAAsD;AACtD,wCAAoD;AAEpD,6FAA6F;AAE7F,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;IAC9B,IAAI,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"use-scrollbar-controller.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-scrollbar-controller.ts"],"names":[],"mappings":";;;AAAA,iCAA6C;AAE7C,mDAAsD;AACtD,wCAAoD;AAEpD,6FAA6F;AAE7F,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;IAC9B,IAAI,OAAO,GAA0B,IAAI,CAAA;IACzC,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE;QACjB,IAAI,OAAO,EAAE,CAAC;YACZ,YAAY,CAAC,OAAO,CAAC,CAAA;QACvB,CAAC;QACD,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;YACxB,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;YACX,OAAO,GAAG,IAAI,CAAA;QAChB,CAAC,EAAE,KAAK,CAAC,CAAA;IACX,CAAC,CAAA;AACH,CAAC,CAAA;AAED,MAAM,iBAAiB,GAAG,OAAO,CAAC,EAAE;IAClC,IAAI,OAAO,CAAC,SA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CAAA;YACnE,CAAC;iBAAM,CAAC;gBACN,mBAAmB,CAAC,OAAO,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE,CAC5C,uBAAuB,CAAC,CAAC,CAAC,CAAA;YAC9B,CAAC;QACH,CAAC;IACH,CAAC,CAAA;IAED,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAA;QAE3C,kBAAkB,EAAE,CAAA;QAEpB,OAAO,GAAG,EAAE;YACV,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,CAAC,WAAW,GAAG,IAAI,CAAA;gBAC1B,OAAO,CAAC,YAAY,GAAG,IAAI,CAAA;gBAC3B,OAAO,CAAC,WAAW,GAAG,IAAI,CAAA;YAC5B,CAAC;QACH,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CAAA;IAEzB,OAAO;QACL,kBAAkB;QAClB,uBAAuB;QACvB,uBAAuB;QACvB,YAAY;KACb,CAAA;AACH,CAAC,CAAA;AA7IY,QAAA,sBAAsB,0BA6IlC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WebchatMessage } from '../../index-types';
|
|
2
|
-
import { WebchatState } from '../context';
|
|
1
|
+
import type { WebchatMessage } from '../../index-types';
|
|
2
|
+
import type { WebchatState } from '../context';
|
|
3
3
|
interface UseTyping {
|
|
4
4
|
webchatState: WebchatState;
|
|
5
5
|
updateTyping: (typing: boolean) => void;
|
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useTyping = useTyping;
|
|
4
|
+
/* eslint-disable no-empty */
|
|
4
5
|
const react_1 = require("react");
|
|
5
6
|
function useTyping({ webchatState, updateTyping, updateMessage, }) {
|
|
6
7
|
(0, react_1.useEffect)(() => {
|
|
7
|
-
let delayTimeout
|
|
8
|
+
let delayTimeout = null;
|
|
9
|
+
let typingTimeout = null;
|
|
8
10
|
try {
|
|
9
11
|
const nextMsg = webchatState.messagesJSON.filter(m => !m.display)[0];
|
|
10
12
|
if (nextMsg) {
|
|
11
13
|
if (nextMsg.delay && nextMsg.typing) {
|
|
12
14
|
delayTimeout = setTimeout(() => updateTyping(true), nextMsg.delay * 1000);
|
|
13
15
|
}
|
|
14
|
-
else if (nextMsg.typing)
|
|
16
|
+
else if (nextMsg.typing) {
|
|
15
17
|
updateTyping(true);
|
|
18
|
+
}
|
|
16
19
|
const totalDelay = nextMsg.delay + nextMsg.typing;
|
|
17
|
-
if (totalDelay)
|
|
20
|
+
if (totalDelay) {
|
|
18
21
|
typingTimeout = setTimeout(() => {
|
|
19
22
|
updateMessage({ ...nextMsg, display: true });
|
|
20
23
|
updateTyping(false);
|
|
21
24
|
}, totalDelay * 1000);
|
|
25
|
+
}
|
|
22
26
|
}
|
|
27
|
+
// biome-ignore lint/suspicious/noEmptyBlockStatements: error is not used
|
|
23
28
|
}
|
|
24
|
-
catch (
|
|
29
|
+
catch (_e) { }
|
|
25
30
|
return () => {
|
|
26
|
-
clearTimeout(delayTimeout);
|
|
27
|
-
clearTimeout(typingTimeout);
|
|
31
|
+
delayTimeout && clearTimeout(delayTimeout);
|
|
32
|
+
typingTimeout && clearTimeout(typingTimeout);
|
|
28
33
|
};
|
|
29
34
|
}, [webchatState.messagesJSON, webchatState.typing]);
|
|
30
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-typing.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-typing.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"use-typing.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-typing.ts"],"names":[],"mappings":";;AAaA,8BAkCC;AA/CD,6BAA6B;AAC7B,iCAAiC;AAYjC,SAAgB,SAAS,CAAC,EACxB,YAAY,EACZ,YAAY,EACZ,aAAa,GACH;IACV,IAAA,iBAAS,EAAC,GAAG,EA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|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useVirtualKeyboardDetection = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const useVirtualKeyboardDetection = originalHeight => {
|
|
5
|
+
const useVirtualKeyboardDetection = (originalHeight) => {
|
|
6
6
|
const [isVirtualKeyboardVisible, setIsVirtualKeyboardVisible] = (0, react_1.useState)(false);
|
|
7
7
|
(0, react_1.useEffect)(() => {
|
|
8
8
|
const handleResize = () => {
|
|
@@ -15,11 +15,9 @@ const useVirtualKeyboardDetection = originalHeight => {
|
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
window.visualViewport
|
|
19
|
-
window.visualViewport.addEventListener('resize', handleResize);
|
|
18
|
+
window.visualViewport?.addEventListener('resize', handleResize);
|
|
20
19
|
return () => {
|
|
21
|
-
window.visualViewport
|
|
22
|
-
window.visualViewport.removeEventListener('resize', handleResize);
|
|
20
|
+
window.visualViewport?.removeEventListener('resize', handleResize);
|
|
23
21
|
};
|
|
24
22
|
}, [originalHeight]);
|
|
25
23
|
return { isVirtualKeyboardVisible };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-virtual-keyboard-detection.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-virtual-keyboard-detection.ts"],"names":[],"mappings":";;;AAAA,iCAA2C;AAEpC,MAAM,2BAA2B,GAAG,
|
|
1
|
+
{"version":3,"file":"use-virtual-keyboard-detection.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-virtual-keyboard-detection.ts"],"names":[],"mappings":";;;AAAA,iCAA2C;AAEpC,MAAM,2BAA2B,GAAG,CAAC,cAAsB,EAAE,EAAE;IACpE,MAAM,CAAC,wBAAwB,EAAE,2BAA2B,CAAC,GAC3D,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAA;IAEjB,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,GAAG,EAAE;YACxB,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;gBAC1B,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,GAAG,cAAc,EAAE,CAAC;oBAClD,2BAA2B,CAAC,IAAI,CAAC,CAAA;oBACjC,OAAM;gBACR,CAAC;gBACD,2BAA2B,CAAC,KAAK,CAAC,CAAA;gBAClC,OAAM;YACR,CAAC;QACH,CAAC,CAAA;QACD,MAAM,CAAC,cAAc,EAAE,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;QAE/D,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;QACpE,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAA;IAEpB,OAAO,EAAE,wBAAwB,EAAE,CAAA;AACrC,CAAC,CAAA;AAvBY,QAAA,2BAA2B,+BAuBvC"}
|
|
@@ -7,11 +7,11 @@ const useWebchatDimensions = () => {
|
|
|
7
7
|
const { webchatContainerRef, headerRef, inputPanelRef, webchatState: { isWebchatOpen }, } = (0, react_1.useContext)(context_1.WebchatContext);
|
|
8
8
|
const calculateResizedPercentualWebchatHeight = (0, react_1.useCallback)(() => {
|
|
9
9
|
const webchatElement = webchatContainerRef.current;
|
|
10
|
-
if (!isWebchatOpen || !webchatElement)
|
|
10
|
+
if (!isWebchatOpen || !webchatElement) {
|
|
11
11
|
return 0;
|
|
12
|
+
}
|
|
12
13
|
const webchatHeight = webchatElement.clientHeight || 0;
|
|
13
|
-
const keyboardOffset =
|
|
14
|
-
window.innerHeight;
|
|
14
|
+
const keyboardOffset = window.visualViewport?.height || window.innerHeight;
|
|
15
15
|
let newWebchatPercentualHeight = keyboardOffset / webchatHeight;
|
|
16
16
|
newWebchatPercentualHeight =
|
|
17
17
|
Math.round(newWebchatPercentualHeight * 100 * 100) / 100; // Two decimal places
|
|
@@ -21,8 +21,9 @@ const useWebchatDimensions = () => {
|
|
|
21
21
|
const webchatElement = webchatContainerRef.current;
|
|
22
22
|
const headerElement = headerRef.current;
|
|
23
23
|
const inputPanelElement = inputPanelRef.current;
|
|
24
|
-
if (!isWebchatOpen || !webchatElement)
|
|
24
|
+
if (!isWebchatOpen || !webchatElement) {
|
|
25
25
|
return 0;
|
|
26
|
+
}
|
|
26
27
|
const headerElementHeight = headerElement ? headerElement.clientHeight : 0;
|
|
27
28
|
const inputPanelElementHeight = inputPanelElement
|
|
28
29
|
? inputPanelElement.clientHeight
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-webchat-dimensions.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-webchat-dimensions.ts"],"names":[],"mappings":";;;AAAA,iCAA+C;AAE/C,mDAAsD;AAE/C,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,MAAM,EACJ,mBAAmB,EACnB,SAAS,EACT,aAAa,EACb,YAAY,EAAE,EAAE,aAAa,EAAE,GAChC,GAAG,IAAA,kBAAU,EAAC,wBAAc,CAAC,CAAA;IAE9B,MAAM,uCAAuC,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAC/D,MAAM,cAAc,GAAG,mBAAmB,CAAC,OAAO,CAAA;QAClD,IAAI,CAAC,aAAa,IAAI,CAAC,cAAc;
|
|
1
|
+
{"version":3,"file":"use-webchat-dimensions.js","sourceRoot":"","sources":["../../../../src/webchat/hooks/use-webchat-dimensions.ts"],"names":[],"mappings":";;;AAAA,iCAA+C;AAE/C,mDAAsD;AAE/C,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,MAAM,EACJ,mBAAmB,EACnB,SAAS,EACT,aAAa,EACb,YAAY,EAAE,EAAE,aAAa,EAAE,GAChC,GAAG,IAAA,kBAAU,EAAC,wBAAc,CAAC,CAAA;IAE9B,MAAM,uCAAuC,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAC/D,MAAM,cAAc,GAAG,mBAAmB,CAAC,OAAO,CAAA;QAClD,IA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version":3,"file":"attachment.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/attachment.tsx"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"attachment.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/attachment.tsx"],"names":[],"mappings":";;;;;AAAA,iCAA0C;AAE1C,mGAA6D;AAC7D,+CAAuC;AACvC,mDAAsD;AACtD,iDAA2C;AAC3C,+EAA0E;AAOnE,MAAM,UAAU,GAAG,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAmB,EAAE,EAAE;IAClE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,kBAAU,EAAC,wBAAc,CAAC,CAAA;IAEnD,MAAM,YAAY,GAAG,IAAA,cAAM,EAA0B,IAAI,CAAC,CAAA;IAE1D,MAAM,iBAAiB,GAAG,YAAY,CAAC,KAAK,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,CAAA;IAE3E,MAAM,oBAAoB,GAAG,GAAG,EAAE;QAChC,MAAM,oBAAoB,GAAG,CAAC,CAAC,iBAAiB,CAAA;QAChD,OAAO,CACL,YAAY,CAAC,KAAK,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,IAAI,oBAAoB,CAC1E,CAAA;IACH,CAAC,CAAA;IACD,MAAM,kBAAkB,GAAG,oBAAoB,EAAE,CAAA;IAEjD,MAAM,cAAc,GAAG,KAAK,CAAC,EAAE;QAC7B,QAAQ,CAAC,KAAK,CAAC,CAAA;QACf,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;YACzB,YAAY,CAAC,OAAO,CAAC,KAAK,GAAG,EAAE,CAAA;QACjC,CAAC;IACH,CAAC,CAAA;IAED,OAAO,CACL,2DACG,kBAAkB,CAAC,CAAC,CAAC,CACpB,uBAAC,4CAAoB,cACnB,iCAAK,IAAI,EAAE,iBAAK,CAAC,eAAe,aAC9B,kCAAO,OAAO,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,YAChD,iBAAiB,CAAC,CAAC,CAAC,CACnB,uBAAC,iBAAiB,KAAG,CACtB,CAAC,CAAC,CAAC,CACF,uBAAC,aAAI,IAAC,GAAG,EAAE,6BAAc,GAAI,CAC9B,GACK,EACR,kCACE,GAAG,EAAE,YAAY,EACjB,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,YAAY,EACf,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAC1B,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,MAAM,GACd,IACE,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA;AAhDY,QAAA,UAAU,cAgDtB"}
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EmojiPicker = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/** biome-ignore-all lint/a11y/noStaticElementInteractions: we need to use static elements for the emoji picker */
|
|
7
|
+
/** biome-ignore-all lint/a11y/useKeyWithClickEvents: we need to use key with click events for the emoji picker */
|
|
6
8
|
const react_1 = require("react");
|
|
7
9
|
const emojiButton_svg_1 = tslib_1.__importDefault(require("../../assets/emojiButton.svg"));
|
|
8
10
|
const constants_1 = require("../../constants");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji-picker.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/emoji-picker.tsx"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"emoji-picker.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/emoji-picker.tsx"],"names":[],"mappings":";;;;;AAAA,kHAAkH;AAClH,kHAAkH;AAClH,iCAAkC;AAElC,2FAAoD;AACpD,+CAAuC;AACvC,mDAAsD;AACtD,iDAA2C;AAC3C,+EAA0E;AAMnE,MAAM,WAAW,GAAG,CAAC,EAAE,OAAO,EAAoB,EAAE,EAAE;IAC3D,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,kBAAU,EAAC,wBAAc,CAAC,CAAA;IAEnD,MAAM,iBAAiB,GAAG,YAAY,CAAC,KAAK,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,CAAA;IAE3E,MAAM,oBAAoB,GAAG,GAAG,EAAE;QAChC,MAAM,oBAAoB,GAAG,CAAC,CAAC,iBAAiB,CAAA;QAChD,OAAO,CACL,YAAY,CAAC,KAAK,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,IAAI,oBAAoB,CAC1E,CAAA;IACH,CAAC,CAAA;IACD,MAAM,kBAAkB,GAAG,oBAAoB,EAAE,CAAA;IAEjD,MAAM,WAAW,GAAG,CAAC,KAAU,EAAE,EAAE;QACjC,OAAO,EAAE,CAAA;QACT,KAAK,CAAC,eAAe,EAAE,CAAA;IACzB,CAAC,CAAA;IAED,OAAO,CACL,2DACG,kBAAkB,CAAC,CAAC,CAAC,CACpB,uBAAC,4CAAoB,cACnB,gCAAK,IAAI,EAAE,iBAAK,CAAC,iBAAiB,EAAE,OAAO,EAAE,WAAW,YACrD,iBAAiB,CAAC,CAAC,CAAC,CACnB,uBAAC,iBAAiB,KAAG,CACtB,CAAC,CAAC,CAAC,CACF,uBAAC,aAAI,IAAC,GAAG,EAAE,yBAAS,GAAI,CACzB,GACG,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA;AAjCY,QAAA,WAAW,eAiCvB"}
|
|
@@ -19,8 +19,9 @@ const textarea_1 = require("./textarea");
|
|
|
19
19
|
const InputPanel = ({ handleAttachment, textareaRef, host, onUserInput, }) => {
|
|
20
20
|
const { getThemeProperty, sendText, togglePersistentMenu, toggleEmojiPicker, webchatState, inputPanelRef, } = (0, react_1.useContext)(context_1.WebchatContext);
|
|
21
21
|
const handleSelectedEmoji = event => {
|
|
22
|
-
if (!textareaRef.current)
|
|
22
|
+
if (!textareaRef.current) {
|
|
23
23
|
return;
|
|
24
|
+
}
|
|
24
25
|
textareaRef.current.value += event.emoji;
|
|
25
26
|
textareaRef.current.focus();
|
|
26
27
|
};
|
|
@@ -31,8 +32,9 @@ const InputPanel = ({ handleAttachment, textareaRef, host, onUserInput, }) => {
|
|
|
31
32
|
togglePersistentMenu(!webchatState.isPersistentMenuOpen);
|
|
32
33
|
};
|
|
33
34
|
const sendTextAreaText = async () => {
|
|
34
|
-
if (!textareaRef.current)
|
|
35
|
+
if (!textareaRef.current) {
|
|
35
36
|
return;
|
|
37
|
+
}
|
|
36
38
|
await sendText(textareaRef.current?.value);
|
|
37
39
|
textareaRef.current.value = '';
|
|
38
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/index.tsx"],"names":[],"mappings":";;;;AAAA,wCAAqC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/index.tsx"],"names":[],"mappings":";;;;AAAA,wCAAqC;AAErC,iCAAkC;AAClC,+BAAmC;AAEnC,+CAAyC;AACzC,uDAA0D;AAC1D,mDAAsD;AACtD,4CAAiD;AACjD,6CAAyC;AACzC,iDAA4C;AAC5C,+DAAyD;AACzD,uDAAkD;AAClD,+CAA0C;AAC1C,qCAA6C;AAC7C,yCAAqC;AAS9B,MAAM,UAAU,GAAG,CAAC,EACzB,gBAAgB,EAChB,WAAW,EACX,IAAI,EACJ,WAAW,GACK,EAAE,EAAE;IACpB,MAAM,EACJ,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,aAAa,GACd,GAAG,IAAA,kBAAU,EAAC,wBAAc,CAAC,CAAA;IAE9B,MAAM,mBAAmB,GAAG,KAAK,CAAC,EAAE;QAClC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YACzB,OAAM;QACR,CAAC;QAED,WAAW,CAAC,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AAsB,aAE/B,YAAY,CAAC,iBAAiB,IAAI,CACjC,uBAAC,uCAAiB,IAChB,YAAY,EAAE,mBAAmB,EACjC,OAAO,EAAE,gBAAgB,GACzB,CACH,EAED,uBAAC,gCAAc,IAAC,OAAO,EAAE,UAAU,GAAI,EAEvC,uBAAC,mBAAQ,IACP,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,GAClC,EAEF,uBAAC,0BAAW,IAAC,OAAO,EAAE,gBAAgB,GAAI,EAE1C,uBAAC,uBAAU,IACT,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,EAAE,IAAA,oCAAoB,GAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GACxC,EAEF,uBAAC,wBAAU,IAAC,OAAO,EAAE,gBAAgB,GAAI,IACtB,CACtB,CAAA;AACH,CAAC,CAAA;AA5FY,QAAA,UAAU,cA4FtB"}
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PersistentMenu = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/** biome-ignore-all lint/a11y/noStaticElementInteractions: we need to use static elements for the persistent menu */
|
|
7
|
+
/** biome-ignore-all lint/a11y/useKeyWithClickEvents: we need to use key with click events for the persistent menu */
|
|
6
8
|
const react_1 = require("react");
|
|
7
9
|
const menuButton_svg_1 = tslib_1.__importDefault(require("../../assets/menuButton.svg"));
|
|
8
10
|
const constants_1 = require("../../constants");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistent-menu.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/persistent-menu.tsx"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"persistent-menu.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/persistent-menu.tsx"],"names":[],"mappings":";;;;;AAAA,qHAAqH;AACrH,qHAAqH;AACrH,iCAAkC;AAElC,yFAAkD;AAClD,+CAAuC;AACvC,mDAAsD;AACtD,iDAA2C;AAC3C,+EAA0E;AAMnE,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAuB,EAAE,EAAE;IACjE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,kBAAU,EAAC,wBAAc,CAAC,CAAA;IAEnD,MAAM,qBAAqB,GAAG,YAAY,CAAC,KAAK,CAAC,SAAS,EAAE,cAAc,CAAA;IAE1E,MAAM,gBAAgB,GAAG,YAAY,CAAC,KAAK,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,CAAA;IAEzE,OAAO,CACL,2DACG,qBAAqB,CAAC,CAAC,CAAC,CACvB,uBAAC,4CAAoB,cACnB,gCAAK,IAAI,EAAE,iBAAK,CAAC,oBAAoB,EAAE,OAAO,EAAE,OAAO,YACpD,gBAAgB,CAAC,CAAC,CAAC,uBAAC,gBAAgB,KAAG,CAAC,CAAC,CAAC,uBAAC,aAAI,IAAC,GAAG,EAAE,wBAAQ,GAAI,GAC9D,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA;AAlBY,QAAA,cAAc,kBAkB1B"}
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SendButton = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/** biome-ignore-all lint/a11y/noStaticElementInteractions: we need to use static elements for the send button */
|
|
7
|
+
/** biome-ignore-all lint/a11y/useKeyWithClickEvents: we need to use key with click events for the send button */
|
|
6
8
|
const react_1 = require("react");
|
|
7
9
|
const send_button_svg_1 = tslib_1.__importDefault(require("../../assets/send-button.svg"));
|
|
8
10
|
const constants_1 = require("../../constants");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-button.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/send-button.tsx"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"send-button.js","sourceRoot":"","sources":["../../../../src/webchat/input-panel/send-button.tsx"],"names":[],"mappings":";;;;;AAAA,iHAAiH;AACjH,iHAAiH;AACjH,iCAAkC;AAElC,2FAAyD;AACzD,+CAAuC;AACvC,mDAAsD;AACtD,iDAA2C;AAC3C,+EAA0E;AAMnE,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAmB,EAAE,EAAE;IACzD,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,kBAAU,EAAC,wBAAc,CAAC,CAAA;IAEnD,MAAM,gBAAgB,GAAG,YAAY,CAAC,KAAK,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,CAAA;IAEzE,MAAM,mBAAmB,GAAG,GAAG,EAAE;QAC/B,MAAM,mBAAmB,GAAG,CAAC,CAAC,gBAAgB,CAAA;QAC9C,OAAO,CACL,YAAY,CAAC,KAAK,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,mBAAmB,CACxE,CAAA;IACH,CAAC,CAAA;IACD,MAAM,iBAAiB,GAAG,mBAAmB,EAAE,CAAA;IAE/C,OAAO,CACL,2DACG,iBAAiB,CAAC,CAAC,CAAC,CACnB,uBAAC,4CAAoB,cACnB,gCAAK,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAK,CAAC,gBAAgB,YAChD,gBAAgB,CAAC,CAAC,CAAC,CAClB,uBAAC,gBAAgB,KAAG,CACrB,CAAC,CAAC,CAAC,CACF,uBAAC,aAAI,IAAC,GAAG,EAAE,yBAAc,GAAI,CAC9B,GACG,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA;AA5BY,QAAA,UAAU,cA4BtB"}
|