@botonic/react 0.56.0-alpha.0 → 0.57.0-rslib-esm.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/esm/app.js +4 -5
- package/lib/esm/app.js.map +1 -1
- package/lib/esm/assets/types.d.ts +4 -0
- package/lib/esm/botonic-tester.js +79 -33
- package/lib/esm/botonic-tester.js.map +1 -1
- package/lib/esm/components/audio.d.ts +1 -1
- package/lib/esm/components/audio.js +52 -20
- 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 +113 -69
- package/lib/esm/components/button/index.js.map +1 -1
- package/lib/esm/components/button/styles.js +27 -25
- package/lib/esm/components/button/styles.js.map +1 -1
- package/lib/esm/components/buttons-disabler.d.ts +1 -1
- package/lib/esm/components/buttons-disabler.js +37 -34
- 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 +143 -66
- package/lib/esm/components/carousel.js.map +1 -1
- package/lib/esm/components/components.js +5 -8
- package/lib/esm/components/components.js.map +1 -1
- package/lib/esm/components/constants.js +5 -5
- package/lib/esm/components/constants.js.map +1 -1
- package/lib/esm/components/custom-message.d.ts +1 -1
- package/lib/esm/components/custom-message.js +84 -35
- 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 +58 -26
- package/lib/esm/components/document.js.map +1 -1
- package/lib/esm/components/element.js +41 -29
- package/lib/esm/components/element.js.map +1 -1
- package/lib/esm/components/handoff.js +51 -29
- package/lib/esm/components/handoff.js.map +1 -1
- package/lib/esm/components/image.d.ts +1 -1
- package/lib/esm/components/image.js +71 -30
- package/lib/esm/components/image.js.map +1 -1
- package/lib/esm/components/index-types.d.ts +1 -1
- package/lib/esm/components/index-types.js +3 -2
- package/lib/esm/components/index-types.js.map +1 -1
- package/lib/esm/components/index.d.ts +33 -33
- package/lib/esm/components/index.js +98 -70
- package/lib/esm/components/index.js.map +1 -1
- package/lib/esm/components/location.js +57 -20
- package/lib/esm/components/location.js.map +1 -1
- package/lib/esm/components/markdown.js +53 -60
- package/lib/esm/components/markdown.js.map +1 -1
- package/lib/esm/components/message/index.js +205 -102
- package/lib/esm/components/message/index.js.map +1 -1
- package/lib/esm/components/message/message-footer.d.ts +1 -1
- package/lib/esm/components/message/message-footer.js +36 -18
- package/lib/esm/components/message/message-footer.js.map +1 -1
- package/lib/esm/components/message/message-image.d.ts +1 -1
- package/lib/esm/components/message/message-image.js +44 -24
- package/lib/esm/components/message/message-image.js.map +1 -1
- package/lib/esm/components/message/styles.js +34 -34
- package/lib/esm/components/message/styles.js.map +1 -1
- package/lib/esm/components/message/timestamps.d.ts +1 -1
- package/lib/esm/components/message/timestamps.js +54 -32
- package/lib/esm/components/message/timestamps.js.map +1 -1
- package/lib/esm/components/message-template.js +24 -11
- package/lib/esm/components/message-template.js.map +1 -1
- package/lib/esm/components/multichannel/facebook/facebook.js +33 -20
- package/lib/esm/components/multichannel/facebook/facebook.js.map +1 -1
- package/lib/esm/components/multichannel/index-types.js +4 -2
- package/lib/esm/components/multichannel/index-types.js.map +1 -1
- package/lib/esm/components/multichannel/index.d.ts +6 -6
- package/lib/esm/components/multichannel/index.js +24 -15
- package/lib/esm/components/multichannel/index.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel-button.js +63 -42
- package/lib/esm/components/multichannel/multichannel-button.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel-carousel.js +84 -41
- package/lib/esm/components/multichannel/multichannel-carousel.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel-context.js +10 -8
- package/lib/esm/components/multichannel/multichannel-context.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel-reply.js +34 -20
- package/lib/esm/components/multichannel/multichannel-reply.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel-text.js +196 -94
- package/lib/esm/components/multichannel/multichannel-text.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel-utils.js +22 -35
- package/lib/esm/components/multichannel/multichannel-utils.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel.js +91 -43
- package/lib/esm/components/multichannel/multichannel.js.map +1 -1
- package/lib/esm/components/multichannel/whatsapp/constants.js +15 -13
- package/lib/esm/components/multichannel/whatsapp/constants.js.map +1 -1
- package/lib/esm/components/multichannel/whatsapp/markdown-meta.js +3 -3
- package/lib/esm/components/multichannel/whatsapp/markdown-meta.js.map +1 -1
- package/lib/esm/components/pic.js +46 -23
- package/lib/esm/components/pic.js.map +1 -1
- package/lib/esm/components/raw.js +65 -24
- package/lib/esm/components/raw.js.map +1 -1
- package/lib/esm/components/reply.d.ts +1 -1
- package/lib/esm/components/reply.js +68 -32
- package/lib/esm/components/reply.js.map +1 -1
- package/lib/esm/components/share-button.js +24 -11
- package/lib/esm/components/share-button.js.map +1 -1
- package/lib/esm/components/subtitle.js +37 -19
- package/lib/esm/components/subtitle.js.map +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 +104 -54
- package/lib/esm/components/system-debug-trace/debug-message.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/ai-agent.d.ts +2 -2
- package/lib/esm/components/system-debug-trace/events/ai-agent/ai-agent.js +121 -34
- package/lib/esm/components/system-debug-trace/events/ai-agent/ai-agent.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/executed-tools.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/executed-tools.js +38 -13
- package/lib/esm/components/system-debug-trace/events/ai-agent/executed-tools.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/index.d.ts +2 -2
- package/lib/esm/components/system-debug-trace/events/ai-agent/index.js +6 -5
- package/lib/esm/components/system-debug-trace/events/ai-agent/index.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/parse-tools.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/parse-tools.js +10 -12
- package/lib/esm/components/system-debug-trace/events/ai-agent/parse-tools.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/rehydrate-ai-agent-event.d.ts +2 -2
- package/lib/esm/components/system-debug-trace/events/ai-agent/rehydrate-ai-agent-event.js +11 -17
- package/lib/esm/components/system-debug-trace/events/ai-agent/rehydrate-ai-agent-event.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/types.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/types.js +3 -2
- package/lib/esm/components/system-debug-trace/events/ai-agent/types.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/use-rehydrated-ai-agent-event.d.ts +2 -2
- package/lib/esm/components/system-debug-trace/events/ai-agent/use-rehydrated-ai-agent-event.js +23 -23
- package/lib/esm/components/system-debug-trace/events/ai-agent/use-rehydrated-ai-agent-event.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/ai-agent-router.d.ts +2 -2
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/ai-agent-router.js +88 -18
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/ai-agent-router.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/index.d.ts +2 -2
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/index.js +6 -5
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/index.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/types.d.ts +2 -2
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/types.js +3 -2
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/types.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 +28 -12
- 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.js +38 -11
- package/lib/esm/components/system-debug-trace/events/components/guardrail-item.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/components/index.d.ts +2 -2
- package/lib/esm/components/system-debug-trace/events/components/index.js +6 -5
- package/lib/esm/components/system-debug-trace/events/components/index.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/components/sources-section.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/events/components/sources-section.js +46 -17
- 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 +28 -12
- 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 +28 -12
- 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 +59 -17
- 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 +72 -20
- package/lib/esm/components/system-debug-trace/events/conditional-queue-status.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/constants.js +5 -5
- package/lib/esm/components/system-debug-trace/events/constants.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 +29 -12
- 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 +84 -27
- package/lib/esm/components/system-debug-trace/events/handoff-success.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/index.d.ts +14 -14
- package/lib/esm/components/system-debug-trace/events/index.js +30 -17
- package/lib/esm/components/system-debug-trace/events/index.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 +29 -12
- package/lib/esm/components/system-debug-trace/events/keyword.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/knowledge-bases-types.js +3 -2
- package/lib/esm/components/system-debug-trace/events/knowledge-bases-types.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 +28 -12
- 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 +28 -11
- 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 +45 -19
- 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 +45 -38
- 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.js +22 -19
- package/lib/esm/components/system-debug-trace/hooks/use-last-label-position.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/ai-router.js +69 -12
- package/lib/esm/components/system-debug-trace/icons/ai-router.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/ai-specialist.js +83 -13
- package/lib/esm/components/system-debug-trace/icons/ai-specialist.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 +21 -10
- 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 +21 -10
- 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 +21 -10
- 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 +21 -10
- 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 +20 -9
- 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 +20 -9
- 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 +21 -10
- 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 +21 -10
- 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 +21 -10
- 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 +21 -10
- package/lib/esm/components/system-debug-trace/icons/head-set.js.map +1 -1
- package/lib/esm/components/system-debug-trace/icons/index.d.ts +16 -16
- package/lib/esm/components/system-debug-trace/icons/index.js +34 -19
- package/lib/esm/components/system-debug-trace/icons/index.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 +21 -10
- 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 +21 -10
- 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 +21 -10
- 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 +21 -10
- 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 +21 -10
- 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 +21 -10
- 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 +21 -10
- package/lib/esm/components/system-debug-trace/icons/window-restore.js.map +1 -1
- package/lib/esm/components/system-debug-trace/index.js +35 -15
- package/lib/esm/components/system-debug-trace/index.js.map +1 -1
- package/lib/esm/components/system-debug-trace/styles.js +49 -45
- package/lib/esm/components/system-debug-trace/styles.js.map +1 -1
- package/lib/esm/components/system-debug-trace/types.d.ts +1 -1
- package/lib/esm/components/system-debug-trace/types.js +3 -2
- package/lib/esm/components/system-debug-trace/types.js.map +1 -1
- package/lib/esm/components/text.d.ts +1 -1
- package/lib/esm/components/text.js +57 -31
- package/lib/esm/components/text.js.map +1 -1
- package/lib/esm/components/title.js +33 -17
- package/lib/esm/components/title.js.map +1 -1
- package/lib/esm/components/video.d.ts +1 -1
- package/lib/esm/components/video.js +48 -21
- package/lib/esm/components/video.js.map +1 -1
- package/lib/esm/components/webchat-settings.d.ts +2 -2
- package/lib/esm/components/webchat-settings.js +43 -24
- package/lib/esm/components/webchat-settings.js.map +1 -1
- package/lib/esm/components/whatsapp-button-list.js +65 -38
- package/lib/esm/components/whatsapp-button-list.js.map +1 -1
- package/lib/esm/components/whatsapp-catalog.js +41 -18
- package/lib/esm/components/whatsapp-catalog.js.map +1 -1
- package/lib/esm/components/whatsapp-cta-url-button.js +58 -44
- package/lib/esm/components/whatsapp-cta-url-button.js.map +1 -1
- package/lib/esm/components/whatsapp-interactive-media-carousel.js +53 -19
- package/lib/esm/components/whatsapp-interactive-media-carousel.js.map +1 -1
- package/lib/esm/components/whatsapp-media-carousel.js +49 -24
- package/lib/esm/components/whatsapp-media-carousel.js.map +1 -1
- package/lib/esm/components/whatsapp-product-carousel.js +48 -22
- package/lib/esm/components/whatsapp-product-carousel.js.map +1 -1
- package/lib/esm/components/whatsapp-product-list.js +46 -19
- package/lib/esm/components/whatsapp-product-list.js.map +1 -1
- package/lib/esm/components/whatsapp-product.js +42 -18
- package/lib/esm/components/whatsapp-product.js.map +1 -1
- package/lib/esm/components/whatsapp-request-contact-info.js +40 -21
- package/lib/esm/components/whatsapp-request-contact-info.js.map +1 -1
- package/lib/esm/components/whatsapp-template/index.d.ts +1 -1
- package/lib/esm/components/whatsapp-template/index.js +45 -18
- package/lib/esm/components/whatsapp-template/index.js.map +1 -1
- package/lib/esm/components/whatsapp-template/types.js +12 -12
- package/lib/esm/components/whatsapp-template/types.js.map +1 -1
- package/lib/esm/constants.js +39 -24
- package/lib/esm/constants.js.map +1 -1
- package/lib/esm/contexts.d.ts +1 -1
- package/lib/esm/contexts.js +20 -17
- package/lib/esm/contexts.js.map +1 -1
- package/lib/esm/debug-system-messages.d.ts +1 -1
- package/lib/esm/debug-system-messages.js +80 -65
- package/lib/esm/debug-system-messages.js.map +1 -1
- package/lib/esm/dev-app.d.ts +4 -4
- package/lib/esm/dev-app.js +104 -67
- package/lib/esm/dev-app.js.map +1 -1
- package/lib/esm/index-types.d.ts +8 -8
- package/lib/esm/index-types.js +9 -9
- package/lib/esm/index-types.js.map +1 -1
- package/lib/esm/index.d.ts +12 -12
- package/lib/esm/index.js +33 -25
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/message-utils.js +40 -55
- package/lib/esm/message-utils.js.map +1 -1
- package/lib/esm/msg-to-botonic.js +166 -76
- package/lib/esm/msg-to-botonic.js.map +1 -1
- package/lib/esm/node-app.d.ts +1 -1
- package/lib/esm/node-app.js +17 -15
- package/lib/esm/node-app.js.map +1 -1
- package/lib/esm/package.json +3 -0
- package/lib/esm/react-bot.d.ts +2 -2
- package/lib/esm/react-bot.js +39 -26
- package/lib/esm/react-bot.js.map +1 -1
- package/lib/esm/shared/styles.js +12 -10
- package/lib/esm/shared/styles.js.map +1 -1
- package/lib/esm/util/dom.js +13 -16
- package/lib/esm/util/dom.js.map +1 -1
- package/lib/esm/util/environment.js +15 -24
- package/lib/esm/util/environment.js.map +1 -1
- package/lib/esm/util/error-boundary.js +29 -18
- package/lib/esm/util/error-boundary.js.map +1 -1
- package/lib/esm/util/functional.js +7 -14
- package/lib/esm/util/functional.js.map +1 -1
- package/lib/esm/util/i18n.js +12 -21
- package/lib/esm/util/i18n.js.map +1 -1
- package/lib/esm/util/index.d.ts +10 -10
- package/lib/esm/util/index.js +22 -13
- package/lib/esm/util/index.js.map +1 -1
- package/lib/esm/util/logs.js +17 -9
- package/lib/esm/util/logs.js.map +1 -1
- package/lib/esm/util/objects.js +14 -19
- package/lib/esm/util/objects.js.map +1 -1
- package/lib/esm/util/react.js +33 -27
- package/lib/esm/util/react.js.map +1 -1
- package/lib/esm/util/regexs.js +8 -11
- package/lib/esm/util/regexs.js.map +1 -1
- package/lib/esm/util/strings.js +4 -5
- package/lib/esm/util/strings.js.map +1 -1
- package/lib/esm/util/webchat.d.ts +2 -2
- package/lib/esm/util/webchat.js +48 -47
- package/lib/esm/util/webchat.js.map +1 -1
- package/lib/esm/util/webviews.d.ts +1 -1
- package/lib/esm/util/webviews.js +3 -3
- package/lib/esm/util/webviews.js.map +1 -1
- package/lib/esm/webchat/chat-area/index.js +42 -18
- package/lib/esm/webchat/chat-area/index.js.map +1 -1
- package/lib/esm/webchat/chat-area/styles.js +9 -7
- package/lib/esm/webchat/chat-area/styles.js.map +1 -1
- package/lib/esm/webchat/components/common.js +17 -10
- package/lib/esm/webchat/components/common.js.map +1 -1
- package/lib/esm/webchat/components/conditional-animation.js +32 -14
- package/lib/esm/webchat/components/conditional-animation.js.map +1 -1
- package/lib/esm/webchat/components/opened-persistent-menu.js +61 -26
- package/lib/esm/webchat/components/opened-persistent-menu.js.map +1 -1
- package/lib/esm/webchat/constants.js +5 -5
- package/lib/esm/webchat/constants.js.map +1 -1
- package/lib/esm/webchat/context/actions.js +6 -7
- package/lib/esm/webchat/context/actions.js.map +1 -1
- package/lib/esm/webchat/context/index.d.ts +3 -3
- package/lib/esm/webchat/context/index.js +59 -43
- package/lib/esm/webchat/context/index.js.map +1 -1
- package/lib/esm/webchat/context/messages-reducer.d.ts +2 -2
- package/lib/esm/webchat/context/messages-reducer.js +78 -66
- package/lib/esm/webchat/context/messages-reducer.js.map +1 -1
- package/lib/esm/webchat/context/types.d.ts +4 -4
- package/lib/esm/webchat/context/types.js +3 -2
- package/lib/esm/webchat/context/types.js.map +1 -1
- package/lib/esm/webchat/context/use-webchat.d.ts +5 -5
- package/lib/esm/webchat/context/use-webchat.js +144 -102
- package/lib/esm/webchat/context/use-webchat.js.map +1 -1
- package/lib/esm/webchat/context/webchat-reducer.d.ts +2 -2
- package/lib/esm/webchat/context/webchat-reducer.js +110 -51
- package/lib/esm/webchat/context/webchat-reducer.js.map +1 -1
- package/lib/esm/webchat/cover-component/index.js +24 -13
- package/lib/esm/webchat/cover-component/index.js.map +1 -1
- package/lib/esm/webchat/custom-messages/index.d.ts +1 -1
- package/lib/esm/webchat/custom-messages/index.js +5 -6
- package/lib/esm/webchat/custom-messages/index.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-angry.d.ts +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-angry.js +25 -7
- 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 +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-frown.js +25 -7
- 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 +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-grin-beam.js +25 -7
- 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 +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-meh.js +25 -7
- 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 +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-smile.js +25 -7
- package/lib/esm/webchat/custom-messages/rating/icons/face-smile.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/index.d.ts +6 -6
- package/lib/esm/webchat/custom-messages/rating/icons/index.js +14 -9
- package/lib/esm/webchat/custom-messages/rating/icons/index.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/star.d.ts +1 -1
- package/lib/esm/webchat/custom-messages/rating/icons/star.js +25 -7
- package/lib/esm/webchat/custom-messages/rating/icons/star.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/index.d.ts +1 -1
- package/lib/esm/webchat/custom-messages/rating/index.js +77 -28
- package/lib/esm/webchat/custom-messages/rating/index.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/rating-selector.d.ts +1 -1
- package/lib/esm/webchat/custom-messages/rating/rating-selector.js +49 -18
- 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 +20 -13
- 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 +15 -8
- package/lib/esm/webchat/custom-messages/rating/stars.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/styles.js +10 -8
- package/lib/esm/webchat/custom-messages/rating/styles.js.map +1 -1
- package/lib/esm/webchat/custom-messages/rating/types.js +6 -6
- package/lib/esm/webchat/custom-messages/rating/types.js.map +1 -1
- package/lib/esm/webchat/devices/index.js +10 -13
- package/lib/esm/webchat/devices/index.js.map +1 -1
- package/lib/esm/webchat/global.d.ts +3 -0
- package/lib/esm/webchat/header/default-header.js +71 -21
- package/lib/esm/webchat/header/default-header.js.map +1 -1
- package/lib/esm/webchat/header/index.js +42 -17
- package/lib/esm/webchat/header/index.js.map +1 -1
- package/lib/esm/webchat/header/styles.js +26 -22
- package/lib/esm/webchat/header/styles.js.map +1 -1
- package/lib/esm/webchat/hooks/index.d.ts +10 -10
- package/lib/esm/webchat/hooks/index.js +32 -23
- package/lib/esm/webchat/hooks/index.js.map +1 -1
- package/lib/esm/webchat/hooks/use-component-visible.js +17 -10
- package/lib/esm/webchat/hooks/use-component-visible.js.map +1 -1
- package/lib/esm/webchat/hooks/use-component-will-mount.js +9 -7
- package/lib/esm/webchat/hooks/use-component-will-mount.js.map +1 -1
- package/lib/esm/webchat/hooks/use-device-adapter.js +43 -24
- package/lib/esm/webchat/hooks/use-device-adapter.js.map +1 -1
- package/lib/esm/webchat/hooks/use-previous.js +9 -6
- package/lib/esm/webchat/hooks/use-previous.js.map +1 -1
- package/lib/esm/webchat/hooks/use-scroll-to-bottom.js +16 -12
- package/lib/esm/webchat/hooks/use-scroll-to-bottom.js.map +1 -1
- package/lib/esm/webchat/hooks/use-scrollbar-controller.js +48 -43
- 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 +24 -18
- package/lib/esm/webchat/hooks/use-typing.js.map +1 -1
- package/lib/esm/webchat/hooks/use-virtual-keyboard-detection.js +18 -12
- package/lib/esm/webchat/hooks/use-virtual-keyboard-detection.js.map +1 -1
- package/lib/esm/webchat/hooks/use-webchat-dimensions.js +24 -21
- package/lib/esm/webchat/hooks/use-webchat-dimensions.js.map +1 -1
- package/lib/esm/webchat/hooks/use-webchat-resizer.js +21 -21
- package/lib/esm/webchat/hooks/use-webchat-resizer.js.map +1 -1
- package/lib/esm/webchat/index-types.d.ts +1 -1
- package/lib/esm/webchat/index-types.js +3 -2
- package/lib/esm/webchat/index-types.js.map +1 -1
- package/lib/esm/webchat/index.d.ts +5 -5
- package/lib/esm/webchat/index.js +16 -13
- package/lib/esm/webchat/index.js.map +1 -1
- package/lib/esm/webchat/input-panel/attachment.js +60 -19
- package/lib/esm/webchat/input-panel/attachment.js.map +1 -1
- package/lib/esm/webchat/input-panel/emoji-picker.js +41 -20
- package/lib/esm/webchat/input-panel/emoji-picker.js.map +1 -1
- package/lib/esm/webchat/input-panel/index.js +87 -29
- package/lib/esm/webchat/input-panel/index.js.map +1 -1
- package/lib/esm/webchat/input-panel/opened-emoji-picker.js +37 -13
- package/lib/esm/webchat/input-panel/opened-emoji-picker.js.map +1 -1
- package/lib/esm/webchat/input-panel/persistent-menu.js +38 -17
- package/lib/esm/webchat/input-panel/persistent-menu.js.map +1 -1
- package/lib/esm/webchat/input-panel/send-button.js +40 -19
- package/lib/esm/webchat/input-panel/send-button.js.map +1 -1
- package/lib/esm/webchat/input-panel/styles.js +14 -10
- package/lib/esm/webchat/input-panel/styles.js.map +1 -1
- package/lib/esm/webchat/input-panel/textarea.d.ts +2 -2
- package/lib/esm/webchat/input-panel/textarea.js +56 -26
- package/lib/esm/webchat/input-panel/textarea.js.map +1 -1
- package/lib/esm/webchat/input-panel/typing-network-sender.d.ts +1 -1
- package/lib/esm/webchat/input-panel/typing-network-sender.js +57 -38
- package/lib/esm/webchat/input-panel/typing-network-sender.js.map +1 -1
- package/lib/esm/webchat/input-panel/use-typing-chat-event-sender.d.ts +1 -1
- package/lib/esm/webchat/input-panel/use-typing-chat-event-sender.js +32 -21
- package/lib/esm/webchat/input-panel/use-typing-chat-event-sender.js.map +1 -1
- package/lib/esm/webchat/input-panel/use-typing-session.d.ts +1 -1
- package/lib/esm/webchat/input-panel/use-typing-session.js +44 -33
- package/lib/esm/webchat/input-panel/use-typing-session.js.map +1 -1
- package/lib/esm/webchat/message-list/index.js +118 -58
- package/lib/esm/webchat/message-list/index.js.map +1 -1
- package/lib/esm/webchat/message-list/intro-message.js +47 -22
- package/lib/esm/webchat/message-list/intro-message.js.map +1 -1
- package/lib/esm/webchat/message-list/scroll-button.js +35 -16
- package/lib/esm/webchat/message-list/scroll-button.js.map +1 -1
- package/lib/esm/webchat/message-list/styles.js +13 -11
- package/lib/esm/webchat/message-list/styles.js.map +1 -1
- package/lib/esm/webchat/message-list/unread-messages-banner.js +43 -16
- package/lib/esm/webchat/message-list/unread-messages-banner.js.map +1 -1
- package/lib/esm/webchat/message-list/use-debounce.js +11 -8
- package/lib/esm/webchat/message-list/use-debounce.js.map +1 -1
- package/lib/esm/webchat/message-list/use-notifications.js +21 -14
- package/lib/esm/webchat/message-list/use-notifications.js.map +1 -1
- package/lib/esm/webchat/replies/index.js +41 -21
- package/lib/esm/webchat/replies/index.js.map +1 -1
- package/lib/esm/webchat/replies/styles.js +12 -10
- package/lib/esm/webchat/replies/styles.js.map +1 -1
- package/lib/esm/webchat/session-view.js +106 -41
- package/lib/esm/webchat/session-view.js.map +1 -1
- package/lib/esm/webchat/styles.js +33 -29
- package/lib/esm/webchat/styles.js.map +1 -1
- package/lib/esm/webchat/theme/default-theme.d.ts +1 -1
- package/lib/esm/webchat/theme/default-theme.js +52 -37
- package/lib/esm/webchat/theme/default-theme.js.map +1 -1
- package/lib/esm/webchat/theme/theme.d.ts +8 -0
- package/lib/esm/webchat/theme/types.d.ts +1 -1
- package/lib/esm/webchat/theme/types.js +3 -2
- package/lib/esm/webchat/theme/types.js.map +1 -1
- package/lib/esm/webchat/tracking.js +23 -15
- package/lib/esm/webchat/tracking.js.map +1 -1
- package/lib/esm/webchat/trigger-button/index.js +48 -23
- package/lib/esm/webchat/trigger-button/index.js.map +1 -1
- package/lib/esm/webchat/trigger-button/styles.js +15 -11
- package/lib/esm/webchat/trigger-button/styles.js.map +1 -1
- package/lib/esm/webchat/typing-indicator/index.js +30 -8
- package/lib/esm/webchat/typing-indicator/index.js.map +1 -1
- package/lib/esm/webchat/typing-indicator/styles.js +13 -11
- package/lib/esm/webchat/typing-indicator/styles.js.map +1 -1
- package/lib/esm/webchat/use-storage-state-hook.js +31 -18
- package/lib/esm/webchat/use-storage-state-hook.js.map +1 -1
- package/lib/esm/webchat/utils.js +9 -7
- package/lib/esm/webchat/utils.js.map +1 -1
- package/lib/esm/webchat/webchat-dev.js +74 -32
- package/lib/esm/webchat/webchat-dev.js.map +1 -1
- package/lib/esm/webchat/webchat.d.ts +1 -1
- package/lib/esm/webchat/webchat.js +455 -286
- package/lib/esm/webchat/webchat.js.map +1 -1
- package/lib/esm/webchat/webview/header.js +35 -16
- 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 +76 -42
- package/lib/esm/webchat/webview/index.js.map +1 -1
- package/lib/esm/webchat/webview/styles.js +35 -31
- package/lib/esm/webchat/webview/styles.js.map +1 -1
- package/lib/esm/webchat-app.d.ts +5 -5
- package/lib/esm/webchat-app.js +197 -134
- package/lib/esm/webchat-app.js.map +1 -1
- package/lib/esm/webview-app.js +103 -80
- package/lib/esm/webview-app.js.map +1 -1
- package/package.json +8 -10
- package/src/components/index.ts +14 -14
- package/src/dev-app.jsx +1 -1
- package/src/index-types.ts +6 -6
- package/src/webchat/context/index.tsx +1 -1
- package/src/webchat/index.ts +1 -1
- package/lib/cjs/app.d.ts +0 -2
- package/lib/cjs/app.js +0 -10
- package/lib/cjs/app.js.map +0 -1
- package/lib/cjs/assets/arrow-down.svg +0 -3
- package/lib/cjs/assets/arrow-scroll-down.svg +0 -3
- package/lib/cjs/assets/attachment-icon.svg +0 -7
- package/lib/cjs/assets/audio.svg +0 -4
- package/lib/cjs/assets/botonic_react_logo100x100.png +0 -0
- package/lib/cjs/assets/document.svg +0 -3
- package/lib/cjs/assets/emojiButton.svg +0 -6
- package/lib/cjs/assets/image.svg +0 -4
- package/lib/cjs/assets/leftArrow.svg +0 -3
- package/lib/cjs/assets/menuButton.svg +0 -3
- package/lib/cjs/assets/rightArrow.svg +0 -3
- package/lib/cjs/assets/send-button.svg +0 -1
- package/lib/cjs/assets/thumbs-down.svg +0 -3
- package/lib/cjs/assets/thumbs-up.svg +0 -3
- package/lib/cjs/assets/url-icon.png +0 -0
- package/lib/cjs/assets/video.svg +0 -3
- package/lib/cjs/botonic-tester.d.ts +0 -30
- package/lib/cjs/botonic-tester.js +0 -76
- package/lib/cjs/botonic-tester.js.map +0 -1
- package/lib/cjs/components/audio.d.ts +0 -9
- package/lib/cjs/components/audio.js +0 -27
- package/lib/cjs/components/audio.js.map +0 -1
- package/lib/cjs/components/button/index.d.ts +0 -17
- package/lib/cjs/components/button/index.js +0 -139
- package/lib/cjs/components/button/index.js.map +0 -1
- package/lib/cjs/components/button/styles.d.ts +0 -2
- package/lib/cjs/components/button/styles.js +0 -40
- package/lib/cjs/components/button/styles.js.map +0 -1
- package/lib/cjs/components/buttons-disabler.d.ts +0 -21
- package/lib/cjs/components/buttons-disabler.js +0 -94
- package/lib/cjs/components/buttons-disabler.js.map +0 -1
- package/lib/cjs/components/carousel.d.ts +0 -10
- package/lib/cjs/components/carousel.js +0 -119
- package/lib/cjs/components/carousel.js.map +0 -1
- package/lib/cjs/components/components.d.ts +0 -12
- package/lib/cjs/components/components.js +0 -21
- package/lib/cjs/components/components.js.map +0 -1
- package/lib/cjs/components/constants.d.ts +0 -11
- package/lib/cjs/components/constants.js +0 -15
- package/lib/cjs/components/constants.js.map +0 -1
- package/lib/cjs/components/custom-message.d.ts +0 -16
- package/lib/cjs/components/custom-message.js +0 -60
- package/lib/cjs/components/custom-message.js.map +0 -1
- package/lib/cjs/components/document.d.ts +0 -9
- package/lib/cjs/components/document.js +0 -50
- package/lib/cjs/components/document.js.map +0 -1
- package/lib/cjs/components/element.d.ts +0 -8
- package/lib/cjs/components/element.js +0 -56
- package/lib/cjs/components/element.js.map +0 -1
- package/lib/cjs/components/handoff.d.ts +0 -1
- package/lib/cjs/components/handoff.js +0 -54
- package/lib/cjs/components/handoff.js.map +0 -1
- package/lib/cjs/components/image.d.ts +0 -9
- package/lib/cjs/components/image.js +0 -40
- package/lib/cjs/components/image.js.map +0 -1
- package/lib/cjs/components/index-types.d.ts +0 -83
- package/lib/cjs/components/index-types.js +0 -3
- package/lib/cjs/components/index-types.js.map +0 -1
- package/lib/cjs/components/index.d.ts +0 -33
- package/lib/cjs/components/index.js +0 -71
- package/lib/cjs/components/index.js.map +0 -1
- package/lib/cjs/components/location.d.ts +0 -11
- package/lib/cjs/components/location.js +0 -31
- package/lib/cjs/components/location.js.map +0 -1
- package/lib/cjs/components/markdown.d.ts +0 -7
- package/lib/cjs/components/markdown.js +0 -172
- package/lib/cjs/components/markdown.js.map +0 -1
- package/lib/cjs/components/message/index.d.ts +0 -1
- package/lib/cjs/components/message/index.js +0 -174
- package/lib/cjs/components/message/index.js.map +0 -1
- package/lib/cjs/components/message/message-footer.d.ts +0 -8
- package/lib/cjs/components/message/message-footer.js +0 -20
- package/lib/cjs/components/message/message-footer.js.map +0 -1
- package/lib/cjs/components/message/message-image.d.ts +0 -7
- package/lib/cjs/components/message/message-image.js +0 -26
- package/lib/cjs/components/message/message-image.js.map +0 -1
- package/lib/cjs/components/message/styles.d.ts +0 -35
- package/lib/cjs/components/message/styles.js +0 -123
- package/lib/cjs/components/message/styles.js.map +0 -1
- package/lib/cjs/components/message/timestamps.d.ts +0 -13
- package/lib/cjs/components/message/timestamps.js +0 -45
- package/lib/cjs/components/message/timestamps.js.map +0 -1
- package/lib/cjs/components/message-template.d.ts +0 -1
- package/lib/cjs/components/message-template.js +0 -13
- package/lib/cjs/components/message-template.js.map +0 -1
- package/lib/cjs/components/multichannel/facebook/facebook.d.ts +0 -17
- package/lib/cjs/components/multichannel/facebook/facebook.js +0 -48
- package/lib/cjs/components/multichannel/facebook/facebook.js.map +0 -1
- package/lib/cjs/components/multichannel/index-types.d.ts +0 -42
- package/lib/cjs/components/multichannel/index-types.js +0 -3
- package/lib/cjs/components/multichannel/index-types.js.map +0 -1
- package/lib/cjs/components/multichannel/index.d.ts +0 -11
- package/lib/cjs/components/multichannel/index.js +0 -16
- package/lib/cjs/components/multichannel/index.js.map +0 -1
- package/lib/cjs/components/multichannel/multichannel-button.d.ts +0 -4
- package/lib/cjs/components/multichannel/multichannel-button.js +0 -72
- package/lib/cjs/components/multichannel/multichannel-button.js.map +0 -1
- package/lib/cjs/components/multichannel/multichannel-carousel.d.ts +0 -1
- package/lib/cjs/components/multichannel/multichannel-carousel.js +0 -80
- package/lib/cjs/components/multichannel/multichannel-carousel.js.map +0 -1
- package/lib/cjs/components/multichannel/multichannel-context.d.ts +0 -8
- package/lib/cjs/components/multichannel/multichannel-context.js +0 -13
- package/lib/cjs/components/multichannel/multichannel-context.js.map +0 -1
- package/lib/cjs/components/multichannel/multichannel-reply.d.ts +0 -4
- package/lib/cjs/components/multichannel/multichannel-reply.js +0 -27
- package/lib/cjs/components/multichannel/multichannel-reply.js.map +0 -1
- package/lib/cjs/components/multichannel/multichannel-text.d.ts +0 -1
- package/lib/cjs/components/multichannel/multichannel-text.js +0 -184
- package/lib/cjs/components/multichannel/multichannel-text.js.map +0 -1
- package/lib/cjs/components/multichannel/multichannel-utils.d.ts +0 -36
- package/lib/cjs/components/multichannel/multichannel-utils.js +0 -89
- package/lib/cjs/components/multichannel/multichannel-utils.js.map +0 -1
- package/lib/cjs/components/multichannel/multichannel.d.ts +0 -1
- package/lib/cjs/components/multichannel/multichannel.js +0 -63
- package/lib/cjs/components/multichannel/multichannel.js.map +0 -1
- package/lib/cjs/components/multichannel/whatsapp/constants.d.ts +0 -12
- package/lib/cjs/components/multichannel/whatsapp/constants.js +0 -14
- package/lib/cjs/components/multichannel/whatsapp/constants.js.map +0 -1
- package/lib/cjs/components/multichannel/whatsapp/markdown-meta.d.ts +0 -1
- package/lib/cjs/components/multichannel/whatsapp/markdown-meta.js +0 -41
- package/lib/cjs/components/multichannel/whatsapp/markdown-meta.js.map +0 -1
- package/lib/cjs/components/pic.d.ts +0 -10
- package/lib/cjs/components/pic.js +0 -32
- package/lib/cjs/components/pic.js.map +0 -1
- package/lib/cjs/components/raw.d.ts +0 -9
- package/lib/cjs/components/raw.js +0 -45
- package/lib/cjs/components/raw.js.map +0 -1
- package/lib/cjs/components/reply.d.ts +0 -11
- package/lib/cjs/components/reply.js +0 -66
- package/lib/cjs/components/reply.js.map +0 -1
- package/lib/cjs/components/share-button.d.ts +0 -1
- package/lib/cjs/components/share-button.js +0 -13
- package/lib/cjs/components/share-button.js.map +0 -1
- package/lib/cjs/components/subtitle.d.ts +0 -11
- package/lib/cjs/components/subtitle.js +0 -25
- package/lib/cjs/components/subtitle.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/debug-message.d.ts +0 -7
- package/lib/cjs/components/system-debug-trace/debug-message.js +0 -82
- package/lib/cjs/components/system-debug-trace/debug-message.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/ai-agent/ai-agent.d.ts +0 -4
- package/lib/cjs/components/system-debug-trace/events/ai-agent/ai-agent.js +0 -53
- package/lib/cjs/components/system-debug-trace/events/ai-agent/ai-agent.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/ai-agent/executed-tools.d.ts +0 -7
- package/lib/cjs/components/system-debug-trace/events/ai-agent/executed-tools.js +0 -21
- package/lib/cjs/components/system-debug-trace/events/ai-agent/executed-tools.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/ai-agent/index.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/events/ai-agent/index.js +0 -6
- package/lib/cjs/components/system-debug-trace/events/ai-agent/index.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/ai-agent/parse-tools.d.ts +0 -9
- package/lib/cjs/components/system-debug-trace/events/ai-agent/parse-tools.js +0 -32
- package/lib/cjs/components/system-debug-trace/events/ai-agent/parse-tools.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/ai-agent/rehydrate-ai-agent-event.d.ts +0 -6
- package/lib/cjs/components/system-debug-trace/events/ai-agent/rehydrate-ai-agent-event.js +0 -55
- package/lib/cjs/components/system-debug-trace/events/ai-agent/rehydrate-ai-agent-event.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/ai-agent/types.d.ts +0 -23
- package/lib/cjs/components/system-debug-trace/events/ai-agent/types.js +0 -3
- package/lib/cjs/components/system-debug-trace/events/ai-agent/types.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/ai-agent/use-rehydrated-ai-agent-event.d.ts +0 -8
- package/lib/cjs/components/system-debug-trace/events/ai-agent/use-rehydrated-ai-agent-event.js +0 -41
- package/lib/cjs/components/system-debug-trace/events/ai-agent/use-rehydrated-ai-agent-event.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/ai-agent-router/ai-agent-router.d.ts +0 -4
- package/lib/cjs/components/system-debug-trace/events/ai-agent-router/ai-agent-router.js +0 -23
- package/lib/cjs/components/system-debug-trace/events/ai-agent-router/ai-agent-router.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/ai-agent-router/index.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/events/ai-agent-router/index.js +0 -6
- package/lib/cjs/components/system-debug-trace/events/ai-agent-router/index.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/ai-agent-router/types.d.ts +0 -23
- package/lib/cjs/components/system-debug-trace/events/ai-agent-router/types.js +0 -3
- package/lib/cjs/components/system-debug-trace/events/ai-agent-router/types.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/bot-action.d.ts +0 -7
- package/lib/cjs/components/system-debug-trace/events/bot-action.js +0 -18
- package/lib/cjs/components/system-debug-trace/events/bot-action.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/components/guardrail-item.d.ts +0 -14
- package/lib/cjs/components/system-debug-trace/events/components/guardrail-item.js +0 -12
- package/lib/cjs/components/system-debug-trace/events/components/guardrail-item.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/components/index.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/events/components/index.js +0 -6
- package/lib/cjs/components/system-debug-trace/events/components/index.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/components/sources-section.d.ts +0 -11
- package/lib/cjs/components/system-debug-trace/events/components/sources-section.js +0 -27
- package/lib/cjs/components/system-debug-trace/events/components/sources-section.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/conditional-channel.d.ts +0 -7
- package/lib/cjs/components/system-debug-trace/events/conditional-channel.js +0 -18
- package/lib/cjs/components/system-debug-trace/events/conditional-channel.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/conditional-country.d.ts +0 -7
- package/lib/cjs/components/system-debug-trace/events/conditional-country.js +0 -18
- package/lib/cjs/components/system-debug-trace/events/conditional-country.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/conditional-custom.d.ts +0 -10
- package/lib/cjs/components/system-debug-trace/events/conditional-custom.js +0 -24
- package/lib/cjs/components/system-debug-trace/events/conditional-custom.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/conditional-queue-status.d.ts +0 -11
- package/lib/cjs/components/system-debug-trace/events/conditional-queue-status.js +0 -26
- package/lib/cjs/components/system-debug-trace/events/conditional-queue-status.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/constants.d.ts +0 -33
- package/lib/cjs/components/system-debug-trace/events/constants.js +0 -37
- package/lib/cjs/components/system-debug-trace/events/constants.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/fallback.d.ts +0 -9
- package/lib/cjs/components/system-debug-trace/events/fallback.js +0 -19
- package/lib/cjs/components/system-debug-trace/events/fallback.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/handoff-success.d.ts +0 -11
- package/lib/cjs/components/system-debug-trace/events/handoff-success.js +0 -42
- package/lib/cjs/components/system-debug-trace/events/handoff-success.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/index.d.ts +0 -14
- package/lib/cjs/components/system-debug-trace/events/index.js +0 -18
- package/lib/cjs/components/system-debug-trace/events/index.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/keyword.d.ts +0 -10
- package/lib/cjs/components/system-debug-trace/events/keyword.js +0 -18
- package/lib/cjs/components/system-debug-trace/events/keyword.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/knowledge-bases-types.d.ts +0 -31
- package/lib/cjs/components/system-debug-trace/events/knowledge-bases-types.js +0 -3
- package/lib/cjs/components/system-debug-trace/events/knowledge-bases-types.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/redirect-flow.d.ts +0 -10
- package/lib/cjs/components/system-debug-trace/events/redirect-flow.js +0 -18
- package/lib/cjs/components/system-debug-trace/events/redirect-flow.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/smart-intent.d.ts +0 -7
- package/lib/cjs/components/system-debug-trace/events/smart-intent.js +0 -17
- package/lib/cjs/components/system-debug-trace/events/smart-intent.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/events/webview-action-triggered.d.ts +0 -10
- package/lib/cjs/components/system-debug-trace/events/webview-action-triggered.js +0 -25
- package/lib/cjs/components/system-debug-trace/events/webview-action-triggered.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/hooks/use-knowledge-base-info.d.ts +0 -16
- package/lib/cjs/components/system-debug-trace/hooks/use-knowledge-base-info.js +0 -111
- package/lib/cjs/components/system-debug-trace/hooks/use-knowledge-base-info.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/hooks/use-last-label-position.d.ts +0 -9
- package/lib/cjs/components/system-debug-trace/hooks/use-last-label-position.js +0 -81
- package/lib/cjs/components/system-debug-trace/hooks/use-last-label-position.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/ai-router.d.ts +0 -1
- package/lib/cjs/components/system-debug-trace/icons/ai-router.js +0 -14
- package/lib/cjs/components/system-debug-trace/icons/ai-router.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/ai-specialist.d.ts +0 -1
- package/lib/cjs/components/system-debug-trace/icons/ai-specialist.js +0 -15
- package/lib/cjs/components/system-debug-trace/icons/ai-specialist.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/arrow-progress.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/arrow-progress.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/arrow-progress.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/brain.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/brain.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/brain.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/caret-down.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/caret-down.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/caret-down.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/caret-up.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/caret-up.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/caret-up.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/circle-check.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/circle-check.js +0 -11
- package/lib/cjs/components/system-debug-trace/icons/circle-check.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/code.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/code.js +0 -11
- package/lib/cjs/components/system-debug-trace/icons/code.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/file-pdf.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/file-pdf.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/file-pdf.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/file-word.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/file-word.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/file-word.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/hand.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/hand.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/hand.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/head-set.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/head-set.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/head-set.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/index.d.ts +0 -16
- package/lib/cjs/components/system-debug-trace/icons/index.js +0 -20
- package/lib/cjs/components/system-debug-trace/icons/index.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/life-ring.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/life-ring.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/life-ring.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/link.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/link.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/link.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/quote-right.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/quote-right.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/quote-right.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/screwdriver-wrench.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/screwdriver-wrench.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/screwdriver-wrench.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/split.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/split.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/split.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/wand.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/wand.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/wand.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/icons/window-restore.d.ts +0 -2
- package/lib/cjs/components/system-debug-trace/icons/window-restore.js +0 -12
- package/lib/cjs/components/system-debug-trace/icons/window-restore.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/index.d.ts +0 -10
- package/lib/cjs/components/system-debug-trace/index.js +0 -28
- package/lib/cjs/components/system-debug-trace/index.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/styles.d.ts +0 -23
- package/lib/cjs/components/system-debug-trace/styles.js +0 -286
- package/lib/cjs/components/system-debug-trace/styles.js.map +0 -1
- package/lib/cjs/components/system-debug-trace/types.d.ts +0 -13
- package/lib/cjs/components/system-debug-trace/types.js +0 -3
- package/lib/cjs/components/system-debug-trace/types.js.map +0 -1
- package/lib/cjs/components/text.d.ts +0 -8
- package/lib/cjs/components/text.js +0 -52
- package/lib/cjs/components/text.js.map +0 -1
- package/lib/cjs/components/title.d.ts +0 -11
- package/lib/cjs/components/title.js +0 -23
- package/lib/cjs/components/title.js.map +0 -1
- package/lib/cjs/components/video.d.ts +0 -9
- package/lib/cjs/components/video.js +0 -31
- package/lib/cjs/components/video.js.map +0 -1
- package/lib/cjs/components/webchat-settings.d.ts +0 -19
- package/lib/cjs/components/webchat-settings.js +0 -79
- package/lib/cjs/components/webchat-settings.js.map +0 -1
- package/lib/cjs/components/whatsapp-button-list.d.ts +0 -20
- package/lib/cjs/components/whatsapp-button-list.js +0 -51
- package/lib/cjs/components/whatsapp-button-list.js.map +0 -1
- package/lib/cjs/components/whatsapp-catalog.d.ts +0 -6
- package/lib/cjs/components/whatsapp-catalog.js +0 -25
- package/lib/cjs/components/whatsapp-catalog.js.map +0 -1
- package/lib/cjs/components/whatsapp-cta-url-button.d.ts +0 -40
- package/lib/cjs/components/whatsapp-cta-url-button.js +0 -61
- package/lib/cjs/components/whatsapp-cta-url-button.js.map +0 -1
- package/lib/cjs/components/whatsapp-interactive-media-carousel.d.ts +0 -31
- package/lib/cjs/components/whatsapp-interactive-media-carousel.js +0 -25
- package/lib/cjs/components/whatsapp-interactive-media-carousel.js.map +0 -1
- package/lib/cjs/components/whatsapp-media-carousel.d.ts +0 -46
- package/lib/cjs/components/whatsapp-media-carousel.js +0 -42
- package/lib/cjs/components/whatsapp-media-carousel.js.map +0 -1
- package/lib/cjs/components/whatsapp-product-carousel.d.ts +0 -32
- package/lib/cjs/components/whatsapp-product-carousel.js +0 -34
- package/lib/cjs/components/whatsapp-product-carousel.js.map +0 -1
- package/lib/cjs/components/whatsapp-product-list.d.ts +0 -15
- package/lib/cjs/components/whatsapp-product-list.js +0 -26
- package/lib/cjs/components/whatsapp-product-list.js.map +0 -1
- package/lib/cjs/components/whatsapp-product.d.ts +0 -7
- package/lib/cjs/components/whatsapp-product.js +0 -25
- package/lib/cjs/components/whatsapp-product.js.map +0 -1
- package/lib/cjs/components/whatsapp-request-contact-info.d.ts +0 -4
- package/lib/cjs/components/whatsapp-request-contact-info.js +0 -30
- package/lib/cjs/components/whatsapp-request-contact-info.js.map +0 -1
- package/lib/cjs/components/whatsapp-template/index.d.ts +0 -11
- package/lib/cjs/components/whatsapp-template/index.js +0 -25
- package/lib/cjs/components/whatsapp-template/index.js.map +0 -1
- package/lib/cjs/components/whatsapp-template/types.d.ts +0 -114
- package/lib/cjs/components/whatsapp-template/types.js +0 -30
- package/lib/cjs/components/whatsapp-template/types.js.map +0 -1
- package/lib/cjs/constants.d.ts +0 -163
- package/lib/cjs/constants.js +0 -189
- package/lib/cjs/constants.js.map +0 -1
- package/lib/cjs/contexts.d.ts +0 -17
- package/lib/cjs/contexts.js +0 -30
- package/lib/cjs/contexts.js.map +0 -1
- package/lib/cjs/debug-system-messages.d.ts +0 -177
- package/lib/cjs/debug-system-messages.js +0 -219
- package/lib/cjs/debug-system-messages.js.map +0 -1
- package/lib/cjs/dev-app.d.ts +0 -213
- package/lib/cjs/dev-app.js +0 -98
- package/lib/cjs/dev-app.js.map +0 -1
- package/lib/cjs/index-types.d.ts +0 -187
- package/lib/cjs/index-types.js +0 -16
- package/lib/cjs/index-types.js.map +0 -1
- package/lib/cjs/index.d.ts +0 -12
- package/lib/cjs/index.js +0 -26
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/message-utils.d.ts +0 -20
- package/lib/cjs/message-utils.js +0 -64
- package/lib/cjs/message-utils.js.map +0 -1
- package/lib/cjs/msg-to-botonic.d.ts +0 -17
- package/lib/cjs/msg-to-botonic.js +0 -142
- package/lib/cjs/msg-to-botonic.js.map +0 -1
- package/lib/cjs/node-app.d.ts +0 -7
- package/lib/cjs/node-app.js +0 -23
- package/lib/cjs/node-app.js.map +0 -1
- package/lib/cjs/react-bot.d.ts +0 -18
- package/lib/cjs/react-bot.js +0 -36
- package/lib/cjs/react-bot.js.map +0 -1
- package/lib/cjs/shared/styles.d.ts +0 -2
- package/lib/cjs/shared/styles.js +0 -32
- package/lib/cjs/shared/styles.js.map +0 -1
- package/lib/cjs/util/dom.d.ts +0 -4
- package/lib/cjs/util/dom.js +0 -31
- package/lib/cjs/util/dom.js.map +0 -1
- package/lib/cjs/util/environment.d.ts +0 -7
- package/lib/cjs/util/environment.js +0 -85
- package/lib/cjs/util/environment.js.map +0 -1
- package/lib/cjs/util/error-boundary.d.ts +0 -7
- package/lib/cjs/util/error-boundary.js +0 -32
- package/lib/cjs/util/error-boundary.js.map +0 -1
- package/lib/cjs/util/functional.d.ts +0 -3
- package/lib/cjs/util/functional.js +0 -29
- package/lib/cjs/util/functional.js.map +0 -1
- package/lib/cjs/util/i18n.d.ts +0 -26
- package/lib/cjs/util/i18n.js +0 -165
- package/lib/cjs/util/i18n.js.map +0 -1
- package/lib/cjs/util/index.d.ts +0 -10
- package/lib/cjs/util/index.js +0 -14
- package/lib/cjs/util/index.js.map +0 -1
- package/lib/cjs/util/logs.d.ts +0 -2
- package/lib/cjs/util/logs.js +0 -20
- package/lib/cjs/util/logs.js.map +0 -1
- package/lib/cjs/util/objects.d.ts +0 -3
- package/lib/cjs/util/objects.js +0 -45
- package/lib/cjs/util/objects.js.map +0 -1
- package/lib/cjs/util/react.d.ts +0 -12
- package/lib/cjs/util/react.js +0 -45
- package/lib/cjs/util/react.js.map +0 -1
- package/lib/cjs/util/regexs.d.ts +0 -2
- package/lib/cjs/util/regexs.js +0 -24
- package/lib/cjs/util/regexs.js.map +0 -1
- package/lib/cjs/util/strings.d.ts +0 -1
- package/lib/cjs/util/strings.js +0 -11
- package/lib/cjs/util/strings.js.map +0 -1
- package/lib/cjs/util/webchat.d.ts +0 -24
- package/lib/cjs/util/webchat.js +0 -100
- package/lib/cjs/util/webchat.js.map +0 -1
- package/lib/cjs/util/webviews.d.ts +0 -2
- package/lib/cjs/util/webviews.js +0 -8
- package/lib/cjs/util/webviews.js.map +0 -1
- package/lib/cjs/webchat/chat-area/index.d.ts +0 -1
- package/lib/cjs/webchat/chat-area/index.js +0 -22
- package/lib/cjs/webchat/chat-area/index.js.map +0 -1
- package/lib/cjs/webchat/chat-area/styles.d.ts +0 -3
- package/lib/cjs/webchat/chat-area/styles.js +0 -13
- package/lib/cjs/webchat/chat-area/styles.js.map +0 -1
- package/lib/cjs/webchat/components/common.d.ts +0 -1
- package/lib/cjs/webchat/components/common.js +0 -13
- package/lib/cjs/webchat/components/common.js.map +0 -1
- package/lib/cjs/webchat/components/conditional-animation.d.ts +0 -1
- package/lib/cjs/webchat/components/conditional-animation.js +0 -16
- package/lib/cjs/webchat/components/conditional-animation.js.map +0 -1
- package/lib/cjs/webchat/components/opened-persistent-menu.d.ts +0 -6
- package/lib/cjs/webchat/components/opened-persistent-menu.js +0 -37
- package/lib/cjs/webchat/components/opened-persistent-menu.js.map +0 -1
- package/lib/cjs/webchat/constants.d.ts +0 -8
- package/lib/cjs/webchat/constants.js +0 -13
- package/lib/cjs/webchat/constants.js.map +0 -1
- package/lib/cjs/webchat/context/actions.d.ts +0 -30
- package/lib/cjs/webchat/context/actions.js +0 -36
- package/lib/cjs/webchat/context/actions.js.map +0 -1
- package/lib/cjs/webchat/context/index.d.ts +0 -4
- package/lib/cjs/webchat/context/index.js +0 -102
- package/lib/cjs/webchat/context/index.js.map +0 -1
- package/lib/cjs/webchat/context/messages-reducer.d.ts +0 -6
- package/lib/cjs/webchat/context/messages-reducer.js +0 -175
- package/lib/cjs/webchat/context/messages-reducer.js.map +0 -1
- package/lib/cjs/webchat/context/types.d.ts +0 -84
- package/lib/cjs/webchat/context/types.js +0 -3
- package/lib/cjs/webchat/context/types.js.map +0 -1
- package/lib/cjs/webchat/context/use-webchat.d.ts +0 -46
- package/lib/cjs/webchat/context/use-webchat.js +0 -195
- package/lib/cjs/webchat/context/use-webchat.js.map +0 -1
- package/lib/cjs/webchat/context/webchat-reducer.d.ts +0 -6
- package/lib/cjs/webchat/context/webchat-reducer.js +0 -57
- package/lib/cjs/webchat/context/webchat-reducer.js.map +0 -1
- package/lib/cjs/webchat/cover-component/index.d.ts +0 -6
- package/lib/cjs/webchat/cover-component/index.js +0 -21
- package/lib/cjs/webchat/cover-component/index.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/index.d.ts +0 -1
- package/lib/cjs/webchat/custom-messages/index.js +0 -7
- package/lib/cjs/webchat/custom-messages/index.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-angry.d.ts +0 -3
- package/lib/cjs/webchat/custom-messages/rating/icons/face-angry.js +0 -9
- package/lib/cjs/webchat/custom-messages/rating/icons/face-angry.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-frown.d.ts +0 -3
- package/lib/cjs/webchat/custom-messages/rating/icons/face-frown.js +0 -9
- package/lib/cjs/webchat/custom-messages/rating/icons/face-frown.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-grin-beam.d.ts +0 -3
- package/lib/cjs/webchat/custom-messages/rating/icons/face-grin-beam.js +0 -9
- package/lib/cjs/webchat/custom-messages/rating/icons/face-grin-beam.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-meh.d.ts +0 -3
- package/lib/cjs/webchat/custom-messages/rating/icons/face-meh.js +0 -9
- package/lib/cjs/webchat/custom-messages/rating/icons/face-meh.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/face-smile.d.ts +0 -3
- package/lib/cjs/webchat/custom-messages/rating/icons/face-smile.js +0 -9
- package/lib/cjs/webchat/custom-messages/rating/icons/face-smile.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/index.d.ts +0 -6
- package/lib/cjs/webchat/custom-messages/rating/icons/index.js +0 -10
- package/lib/cjs/webchat/custom-messages/rating/icons/index.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/icons/star.d.ts +0 -3
- package/lib/cjs/webchat/custom-messages/rating/icons/star.js +0 -9
- package/lib/cjs/webchat/custom-messages/rating/icons/star.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/index.d.ts +0 -2
- package/lib/cjs/webchat/custom-messages/rating/index.js +0 -56
- package/lib/cjs/webchat/custom-messages/rating/index.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/rating-selector.d.ts +0 -11
- package/lib/cjs/webchat/custom-messages/rating/rating-selector.js +0 -26
- package/lib/cjs/webchat/custom-messages/rating/rating-selector.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/smileys.d.ts +0 -2
- package/lib/cjs/webchat/custom-messages/rating/smileys.js +0 -19
- package/lib/cjs/webchat/custom-messages/rating/smileys.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/stars.d.ts +0 -2
- package/lib/cjs/webchat/custom-messages/rating/stars.js +0 -11
- package/lib/cjs/webchat/custom-messages/rating/stars.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/styles.d.ts +0 -6
- package/lib/cjs/webchat/custom-messages/rating/styles.js +0 -25
- package/lib/cjs/webchat/custom-messages/rating/styles.js.map +0 -1
- package/lib/cjs/webchat/custom-messages/rating/types.d.ts +0 -13
- package/lib/cjs/webchat/custom-messages/rating/types.js +0 -9
- package/lib/cjs/webchat/custom-messages/rating/types.js.map +0 -1
- package/lib/cjs/webchat/devices/index.d.ts +0 -11
- package/lib/cjs/webchat/devices/index.js +0 -23
- package/lib/cjs/webchat/devices/index.js.map +0 -1
- package/lib/cjs/webchat/header/default-header.d.ts +0 -1
- package/lib/cjs/webchat/header/default-header.js +0 -25
- package/lib/cjs/webchat/header/default-header.js.map +0 -1
- package/lib/cjs/webchat/header/index.d.ts +0 -1
- package/lib/cjs/webchat/header/index.js +0 -23
- package/lib/cjs/webchat/header/index.js.map +0 -1
- package/lib/cjs/webchat/header/styles.d.ts +0 -7
- package/lib/cjs/webchat/header/styles.js +0 -63
- package/lib/cjs/webchat/header/styles.js.map +0 -1
- package/lib/cjs/webchat/hooks/index.d.ts +0 -10
- package/lib/cjs/webchat/hooks/index.js +0 -24
- package/lib/cjs/webchat/hooks/index.js.map +0 -1
- package/lib/cjs/webchat/hooks/use-component-visible.d.ts +0 -7
- package/lib/cjs/webchat/hooks/use-component-visible.js +0 -23
- package/lib/cjs/webchat/hooks/use-component-visible.js.map +0 -1
- package/lib/cjs/webchat/hooks/use-component-will-mount.d.ts +0 -1
- package/lib/cjs/webchat/hooks/use-component-will-mount.js +0 -9
- package/lib/cjs/webchat/hooks/use-component-will-mount.js.map +0 -1
- package/lib/cjs/webchat/hooks/use-device-adapter.d.ts +0 -3
- package/lib/cjs/webchat/hooks/use-device-adapter.js +0 -49
- package/lib/cjs/webchat/hooks/use-device-adapter.js.map +0 -1
- package/lib/cjs/webchat/hooks/use-previous.d.ts +0 -1
- package/lib/cjs/webchat/hooks/use-previous.js +0 -12
- package/lib/cjs/webchat/hooks/use-previous.js.map +0 -1
- package/lib/cjs/webchat/hooks/use-scroll-to-bottom.d.ts +0 -9
- package/lib/cjs/webchat/hooks/use-scroll-to-bottom.js +0 -25
- package/lib/cjs/webchat/hooks/use-scroll-to-bottom.js.map +0 -1
- package/lib/cjs/webchat/hooks/use-scrollbar-controller.d.ts +0 -6
- package/lib/cjs/webchat/hooks/use-scrollbar-controller.js +0 -143
- package/lib/cjs/webchat/hooks/use-scrollbar-controller.js.map +0 -1
- package/lib/cjs/webchat/hooks/use-typing.d.ts +0 -10
- package/lib/cjs/webchat/hooks/use-typing.js +0 -36
- package/lib/cjs/webchat/hooks/use-typing.js.map +0 -1
- package/lib/cjs/webchat/hooks/use-virtual-keyboard-detection.d.ts +0 -3
- package/lib/cjs/webchat/hooks/use-virtual-keyboard-detection.js +0 -26
- package/lib/cjs/webchat/hooks/use-virtual-keyboard-detection.js.map +0 -1
- package/lib/cjs/webchat/hooks/use-webchat-dimensions.d.ts +0 -4
- package/lib/cjs/webchat/hooks/use-webchat-dimensions.js +0 -41
- package/lib/cjs/webchat/hooks/use-webchat-dimensions.js.map +0 -1
- package/lib/cjs/webchat/hooks/use-webchat-resizer.d.ts +0 -4
- package/lib/cjs/webchat/hooks/use-webchat-resizer.js +0 -34
- package/lib/cjs/webchat/hooks/use-webchat-resizer.js.map +0 -1
- package/lib/cjs/webchat/index-types.d.ts +0 -7
- package/lib/cjs/webchat/index-types.js +0 -3
- package/lib/cjs/webchat/index-types.js.map +0 -1
- package/lib/cjs/webchat/index.d.ts +0 -6
- package/lib/cjs/webchat/index.js +0 -20
- package/lib/cjs/webchat/index.js.map +0 -1
- package/lib/cjs/webchat/input-panel/attachment.d.ts +0 -6
- package/lib/cjs/webchat/input-panel/attachment.js +0 -30
- package/lib/cjs/webchat/input-panel/attachment.js.map +0 -1
- package/lib/cjs/webchat/input-panel/emoji-picker.d.ts +0 -5
- package/lib/cjs/webchat/input-panel/emoji-picker.js +0 -29
- package/lib/cjs/webchat/input-panel/emoji-picker.js.map +0 -1
- package/lib/cjs/webchat/input-panel/index.d.ts +0 -9
- package/lib/cjs/webchat/input-panel/index.js +0 -51
- package/lib/cjs/webchat/input-panel/index.js.map +0 -1
- package/lib/cjs/webchat/input-panel/opened-emoji-picker.d.ts +0 -6
- package/lib/cjs/webchat/input-panel/opened-emoji-picker.js +0 -15
- package/lib/cjs/webchat/input-panel/opened-emoji-picker.js.map +0 -1
- package/lib/cjs/webchat/input-panel/persistent-menu.d.ts +0 -5
- package/lib/cjs/webchat/input-panel/persistent-menu.js +0 -21
- package/lib/cjs/webchat/input-panel/persistent-menu.js.map +0 -1
- package/lib/cjs/webchat/input-panel/send-button.d.ts +0 -5
- package/lib/cjs/webchat/input-panel/send-button.js +0 -25
- package/lib/cjs/webchat/input-panel/send-button.js.map +0 -1
- package/lib/cjs/webchat/input-panel/styles.d.ts +0 -3
- package/lib/cjs/webchat/input-panel/styles.js +0 -31
- package/lib/cjs/webchat/input-panel/styles.js.map +0 -1
- package/lib/cjs/webchat/input-panel/textarea.d.ts +0 -10
- package/lib/cjs/webchat/input-panel/textarea.js +0 -52
- package/lib/cjs/webchat/input-panel/textarea.js.map +0 -1
- package/lib/cjs/webchat/input-panel/typing-network-sender.d.ts +0 -52
- package/lib/cjs/webchat/input-panel/typing-network-sender.js +0 -122
- package/lib/cjs/webchat/input-panel/typing-network-sender.js.map +0 -1
- package/lib/cjs/webchat/input-panel/use-typing-chat-event-sender.d.ts +0 -16
- package/lib/cjs/webchat/input-panel/use-typing-chat-event-sender.js +0 -45
- package/lib/cjs/webchat/input-panel/use-typing-chat-event-sender.js.map +0 -1
- package/lib/cjs/webchat/input-panel/use-typing-session.d.ts +0 -15
- package/lib/cjs/webchat/input-panel/use-typing-session.js +0 -98
- package/lib/cjs/webchat/input-panel/use-typing-session.js.map +0 -1
- package/lib/cjs/webchat/message-list/index.d.ts +0 -1
- package/lib/cjs/webchat/message-list/index.js +0 -116
- package/lib/cjs/webchat/message-list/index.js.map +0 -1
- package/lib/cjs/webchat/message-list/intro-message.d.ts +0 -1
- package/lib/cjs/webchat/message-list/intro-message.js +0 -24
- package/lib/cjs/webchat/message-list/intro-message.js.map +0 -1
- package/lib/cjs/webchat/message-list/scroll-button.d.ts +0 -5
- package/lib/cjs/webchat/message-list/scroll-button.js +0 -18
- package/lib/cjs/webchat/message-list/scroll-button.js.map +0 -1
- package/lib/cjs/webchat/message-list/styles.d.ts +0 -9
- package/lib/cjs/webchat/message-list/styles.js +0 -61
- package/lib/cjs/webchat/message-list/styles.js.map +0 -1
- package/lib/cjs/webchat/message-list/unread-messages-banner.d.ts +0 -7
- package/lib/cjs/webchat/message-list/unread-messages-banner.js +0 -18
- package/lib/cjs/webchat/message-list/unread-messages-banner.js.map +0 -1
- package/lib/cjs/webchat/message-list/use-debounce.d.ts +0 -1
- package/lib/cjs/webchat/message-list/use-debounce.js +0 -17
- package/lib/cjs/webchat/message-list/use-debounce.js.map +0 -1
- package/lib/cjs/webchat/message-list/use-notifications.d.ts +0 -7
- package/lib/cjs/webchat/message-list/use-notifications.js +0 -23
- package/lib/cjs/webchat/message-list/use-notifications.js.map +0 -1
- package/lib/cjs/webchat/replies/index.d.ts +0 -1
- package/lib/cjs/webchat/replies/index.js +0 -31
- package/lib/cjs/webchat/replies/index.js.map +0 -1
- package/lib/cjs/webchat/replies/styles.d.ts +0 -8
- package/lib/cjs/webchat/replies/styles.js +0 -25
- package/lib/cjs/webchat/replies/styles.js.map +0 -1
- package/lib/cjs/webchat/session-view.d.ts +0 -1
- package/lib/cjs/webchat/session-view.js +0 -103
- package/lib/cjs/webchat/session-view.js.map +0 -1
- package/lib/cjs/webchat/styles.d.ts +0 -4
- package/lib/cjs/webchat/styles.js +0 -65
- package/lib/cjs/webchat/styles.js.map +0 -1
- package/lib/cjs/webchat/theme/default-theme.d.ts +0 -2
- package/lib/cjs/webchat/theme/default-theme.js +0 -104
- package/lib/cjs/webchat/theme/default-theme.js.map +0 -1
- package/lib/cjs/webchat/theme/types.d.ts +0 -213
- package/lib/cjs/webchat/theme/types.js +0 -3
- package/lib/cjs/webchat/theme/types.js.map +0 -1
- package/lib/cjs/webchat/tracking.d.ts +0 -7
- package/lib/cjs/webchat/tracking.js +0 -39
- package/lib/cjs/webchat/tracking.js.map +0 -1
- package/lib/cjs/webchat/trigger-button/index.d.ts +0 -1
- package/lib/cjs/webchat/trigger-button/index.js +0 -34
- package/lib/cjs/webchat/trigger-button/index.js.map +0 -1
- package/lib/cjs/webchat/trigger-button/styles.d.ts +0 -3
- package/lib/cjs/webchat/trigger-button/styles.js +0 -40
- package/lib/cjs/webchat/trigger-button/styles.js.map +0 -1
- package/lib/cjs/webchat/typing-indicator/index.d.ts +0 -2
- package/lib/cjs/webchat/typing-indicator/index.js +0 -10
- package/lib/cjs/webchat/typing-indicator/index.js.map +0 -1
- package/lib/cjs/webchat/typing-indicator/styles.d.ts +0 -7
- package/lib/cjs/webchat/typing-indicator/styles.js +0 -50
- package/lib/cjs/webchat/typing-indicator/styles.js.map +0 -1
- package/lib/cjs/webchat/use-storage-state-hook.d.ts +0 -1
- package/lib/cjs/webchat/use-storage-state-hook.js +0 -40
- package/lib/cjs/webchat/use-storage-state-hook.js.map +0 -1
- package/lib/cjs/webchat/utils.d.ts +0 -2
- package/lib/cjs/webchat/utils.js +0 -13
- package/lib/cjs/webchat/utils.js.map +0 -1
- package/lib/cjs/webchat/webchat-dev.d.ts +0 -6
- package/lib/cjs/webchat/webchat-dev.js +0 -56
- package/lib/cjs/webchat/webchat-dev.js.map +0 -1
- package/lib/cjs/webchat/webchat.d.ts +0 -3
- package/lib/cjs/webchat/webchat.js +0 -560
- package/lib/cjs/webchat/webchat.js.map +0 -1
- package/lib/cjs/webchat/webview/header.d.ts +0 -1
- package/lib/cjs/webchat/webview/header.js +0 -18
- package/lib/cjs/webchat/webview/header.js.map +0 -1
- package/lib/cjs/webchat/webview/index.d.ts +0 -6
- package/lib/cjs/webchat/webview/index.js +0 -82
- package/lib/cjs/webchat/webview/index.js.map +0 -1
- package/lib/cjs/webchat/webview/styles.d.ts +0 -7
- package/lib/cjs/webchat/webview/styles.js +0 -60
- package/lib/cjs/webchat/webview/styles.js.map +0 -1
- package/lib/cjs/webchat-app.d.ts +0 -114
- package/lib/cjs/webchat-app.js +0 -407
- package/lib/cjs/webchat-app.js.map +0 -1
- package/lib/cjs/webchat.template.html +0 -37
- package/lib/cjs/webview-app.d.ts +0 -7
- package/lib/cjs/webview-app.js +0 -192
- package/lib/cjs/webview-app.js.map +0 -1
- package/lib/cjs/webview.template.html +0 -39
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export class BotonicInputTester {
|
|
2
|
-
constructor(bot: any);
|
|
3
|
-
bot: any;
|
|
4
|
-
text(inp: any, session?: {
|
|
5
|
-
user: {
|
|
6
|
-
id: string;
|
|
7
|
-
};
|
|
8
|
-
}, lastRoutePath?: string): Promise<any>;
|
|
9
|
-
payload(inp: any, session?: {
|
|
10
|
-
user: {
|
|
11
|
-
id: string;
|
|
12
|
-
};
|
|
13
|
-
}, lastRoutePath?: string): Promise<any>;
|
|
14
|
-
path(inp: any, session?: {
|
|
15
|
-
user: {
|
|
16
|
-
id: string;
|
|
17
|
-
};
|
|
18
|
-
}, lastRoutePath?: string): Promise<any>;
|
|
19
|
-
}
|
|
20
|
-
export class BotonicOutputTester {
|
|
21
|
-
constructor(bot: any);
|
|
22
|
-
bot: any;
|
|
23
|
-
text(out: any, replies?: null): any;
|
|
24
|
-
reply({ text, payload, path }: {
|
|
25
|
-
text: any;
|
|
26
|
-
payload?: null | undefined;
|
|
27
|
-
path?: null | undefined;
|
|
28
|
-
}): any;
|
|
29
|
-
replies(...args: any[]): any[];
|
|
30
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BotonicOutputTester = exports.BotonicInputTester = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const core_1 = require("@botonic/core");
|
|
7
|
-
const server_1 = tslib_1.__importDefault(require("react-dom/server"));
|
|
8
|
-
const reply_1 = require("./components/reply");
|
|
9
|
-
const text_1 = require("./components/text");
|
|
10
|
-
function decodeHTMLEntities(text) {
|
|
11
|
-
const entities = {
|
|
12
|
-
'"': '"',
|
|
13
|
-
'&': '&',
|
|
14
|
-
'<': '<',
|
|
15
|
-
'>': '>',
|
|
16
|
-
''': "'",
|
|
17
|
-
};
|
|
18
|
-
return text.replace(/"|&|<|>|'/g, match => entities[match]);
|
|
19
|
-
}
|
|
20
|
-
class BotonicInputTester {
|
|
21
|
-
constructor(bot) {
|
|
22
|
-
this.bot = bot;
|
|
23
|
-
}
|
|
24
|
-
async text(inp, session = { user: { id: '123' } }, lastRoutePath = '') {
|
|
25
|
-
const res = await this.bot.input({
|
|
26
|
-
input: { type: core_1.INPUT.TEXT, data: inp },
|
|
27
|
-
session: session,
|
|
28
|
-
lastRoutePath: lastRoutePath,
|
|
29
|
-
});
|
|
30
|
-
return decodeHTMLEntities(res.response);
|
|
31
|
-
}
|
|
32
|
-
async payload(inp, session = { user: { id: '123' } }, lastRoutePath = '') {
|
|
33
|
-
const res = await this.bot.input({
|
|
34
|
-
input: { type: core_1.INPUT.POSTBACK, payload: inp },
|
|
35
|
-
session: session,
|
|
36
|
-
lastRoutePath: lastRoutePath,
|
|
37
|
-
});
|
|
38
|
-
return decodeHTMLEntities(res.response);
|
|
39
|
-
}
|
|
40
|
-
async path(inp, session = { user: { id: '123' } }, lastRoutePath = '') {
|
|
41
|
-
const res = await this.bot.input({
|
|
42
|
-
input: { type: core_1.INPUT.TEXT, payload: `__PATH_PAYLOAD__${inp}` },
|
|
43
|
-
session: session,
|
|
44
|
-
lastRoutePath: lastRoutePath,
|
|
45
|
-
});
|
|
46
|
-
return decodeHTMLEntities(res.response);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
exports.BotonicInputTester = BotonicInputTester;
|
|
50
|
-
class BotonicOutputTester {
|
|
51
|
-
constructor(bot) {
|
|
52
|
-
this.bot = bot;
|
|
53
|
-
}
|
|
54
|
-
text(out, replies = null) {
|
|
55
|
-
return decodeHTMLEntities(server_1.default.renderToStaticMarkup(!replies ? ((0, jsx_runtime_1.jsx)(text_1.Text, { children: out })) : ((0, jsx_runtime_1.jsxs)(text_1.Text, { children: [out, replies] }))));
|
|
56
|
-
}
|
|
57
|
-
reply({ text, payload = null, path = null }) {
|
|
58
|
-
if (payload) {
|
|
59
|
-
return decodeHTMLEntities(server_1.default.renderToStaticMarkup((0, jsx_runtime_1.jsx)(reply_1.Reply, { payload: payload, children: text })));
|
|
60
|
-
}
|
|
61
|
-
if (path) {
|
|
62
|
-
return decodeHTMLEntities(server_1.default.renderToStaticMarkup((0, jsx_runtime_1.jsx)(reply_1.Reply, { path: path, children: text })));
|
|
63
|
-
}
|
|
64
|
-
throw new Error('reply should contain a payload or a path');
|
|
65
|
-
}
|
|
66
|
-
replies(...args) {
|
|
67
|
-
const replies = [];
|
|
68
|
-
for (let i = 0; i < args.length; i++) {
|
|
69
|
-
const r = args[i];
|
|
70
|
-
replies.push(this.reply({ text: r.text, payload: r.payload, path: r.path }));
|
|
71
|
-
}
|
|
72
|
-
return replies;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.BotonicOutputTester = BotonicOutputTester;
|
|
76
|
-
//# sourceMappingURL=botonic-tester.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"botonic-tester.js","sourceRoot":"","sources":["../../src/botonic-tester.jsx"],"names":[],"mappings":";;;;;AAAA,wCAAqC;AACrC,sEAA6C;AAE7C,8CAA0C;AAC1C,4CAAwC;AAExC,SAAS,kBAAkB,CAAC,IAAI;IAC9B,MAAM,QAAQ,GAAG;QACf,QAAQ,EAAE,GAAG;QACb,OAAO,EAAE,GAAG;QACZ,MAAM,EAAE,GAAG;Q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A;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;YACjB,OAAO,CAAC,IAAI,CACV,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAC/D,CAAA;QACH,CAAC;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;CACF;AA9CD,kDA8CC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Audio = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const core_1 = require("@botonic/core");
|
|
7
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
8
|
-
const constants_1 = require("../constants");
|
|
9
|
-
const environment_1 = require("../util/environment");
|
|
10
|
-
const message_1 = require("./message");
|
|
11
|
-
const StyledAudio = styled_components_1.default.audio `
|
|
12
|
-
max-width: 100%;
|
|
13
|
-
`;
|
|
14
|
-
const serialize = (audioProps) => {
|
|
15
|
-
return { audio: audioProps.src };
|
|
16
|
-
};
|
|
17
|
-
const Audio = (props) => {
|
|
18
|
-
props = { ...props, src: (0, environment_1.staticAsset)(props.src) };
|
|
19
|
-
let content = props.children;
|
|
20
|
-
if ((0, core_1.isBrowser)()) {
|
|
21
|
-
content = ((0, jsx_runtime_1.jsxs)(StyledAudio, { id: 'myAudio', controls: true, children: [(0, jsx_runtime_1.jsx)("source", { src: props.src, type: 'audio/mpeg' }), "Your browser does not support this audio format."] }));
|
|
22
|
-
}
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(message_1.Message, { role: constants_1.ROLES.AUDIO_MESSAGE, json: serialize(props), ...props, type: core_1.INPUT.AUDIO, children: content }));
|
|
24
|
-
};
|
|
25
|
-
exports.Audio = Audio;
|
|
26
|
-
exports.Audio.serialize = serialize;
|
|
27
|
-
//# sourceMappingURL=audio.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"audio.js","sourceRoot":"","sources":["../../../src/components/audio.tsx"],"names":[],"mappings":";;;;;AAAA,wCAAgD;AAChD,kFAAsC;AAEtC,4CAAoC;AACpC,qDAAiD;AAEjD,uCAAmC;AAEnC,MAAM,WAAW,GAAG,2BAAM,CAAC,KAAK,CAAA;;CAE/B,CAAA;AAED,MAAM,SAAS,GAAG,CAAC,UAA2B,EAAE,EAAE;IAChD,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,EAAE,CAAA;AAClC,CAAC,CAAA;AAEM,MAAM,KAAK,GAAG,CAAC,KAAiB,EAAE,EAAE;IACzC,KAAK,GAAG,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,IAAA,yBAAW,EAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAA;IACjD,IAAI,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAA;IAC5B,IAAI,IAAA,gBAAS,GAAE,EAAE,CAAC;QAChB,OAAO,GAAG,CACR,wBAAC,WAAW,IAAC,EAAE,EAAC,SAAS,EAAC,QAAQ,mBAChC,mCAAQ,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,IAAI,EAAC,YAAY,GAAG,wDAEhC,CACf,CAAA;IACH,CAAC;IACD,OAAO,CACL,uBAAC,iBAAO,IACN,IAAI,EAAE,iBAAK,CAAC,aAAa,EACzB,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,KAClB,KAAK,EACT,IAAI,EAAE,YAAK,CAAC,KAAK,YAEhB,OAAO,GACA,CACX,CAAA;AACH,CAAC,CAAA;AArBY,QAAA,KAAK,SAqBjB;AAED,aAAK,CAAC,SAAS,GAAG,SAAS,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ButtonProps } from '../index-types';
|
|
2
|
-
export declare const Button: {
|
|
3
|
-
(props: ButtonProps): any;
|
|
4
|
-
displayName: "Button";
|
|
5
|
-
serialize(buttonProps: ButtonProps): {
|
|
6
|
-
button: {
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
autodisable?: boolean | string;
|
|
9
|
-
disabledstyle?: Record<string, string> | string;
|
|
10
|
-
payload: string | undefined;
|
|
11
|
-
url: string | undefined;
|
|
12
|
-
target: string | undefined;
|
|
13
|
-
webview: string | undefined;
|
|
14
|
-
title: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Button = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const core_1 = require("@botonic/core");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const environment_1 = require("../../util/environment");
|
|
8
|
-
const react_2 = require("../../util/react");
|
|
9
|
-
const webviews_1 = require("../../util/webviews");
|
|
10
|
-
const context_1 = require("../../webchat/context");
|
|
11
|
-
const buttons_disabler_1 = require("../buttons-disabler");
|
|
12
|
-
const constants_1 = require("../constants");
|
|
13
|
-
const styles_1 = require("./styles");
|
|
14
|
-
const Button = (props) => {
|
|
15
|
-
const { webchatState, openWebview, sendPayload, sendInput, updateMessage } = (0, react_1.useContext)(context_1.WebchatContext);
|
|
16
|
-
const autoDisable = webchatState.theme?.button?.autodisable || props.autodisable;
|
|
17
|
-
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: handleClick is a complex function
|
|
18
|
-
const handleClick = event => {
|
|
19
|
-
event.preventDefault();
|
|
20
|
-
const type = webchatState.theme?.button?.messageType;
|
|
21
|
-
if (props.webview) {
|
|
22
|
-
openWebview(props.webview, props.params);
|
|
23
|
-
}
|
|
24
|
-
else if (props.path) {
|
|
25
|
-
type === core_1.INPUT.POSTBACK
|
|
26
|
-
? sendPayload(`__PATH_PAYLOAD__${props.path}`)
|
|
27
|
-
: sendInput({
|
|
28
|
-
type: core_1.INPUT.TEXT,
|
|
29
|
-
data: String(props.children),
|
|
30
|
-
text: String(props.children),
|
|
31
|
-
payload: `__PATH_PAYLOAD__${props.path}`,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
else if (props.payload) {
|
|
35
|
-
type === core_1.INPUT.POSTBACK
|
|
36
|
-
? sendPayload(props.payload)
|
|
37
|
-
: sendInput({
|
|
38
|
-
type: core_1.INPUT.TEXT,
|
|
39
|
-
data: String(props.children),
|
|
40
|
-
text: String(props.children),
|
|
41
|
-
payload: props.payload,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
else if (props.url) {
|
|
45
|
-
const defaultTarget = props.target || '_blank';
|
|
46
|
-
const target = (0, environment_1.isInWebviewApp)() ? '_self' : defaultTarget;
|
|
47
|
-
window.open(props.url, target);
|
|
48
|
-
}
|
|
49
|
-
if (props.onClick) {
|
|
50
|
-
props.onClick();
|
|
51
|
-
}
|
|
52
|
-
if (props.setDisabled) {
|
|
53
|
-
props.setDisabled(true);
|
|
54
|
-
const messageToUpdate = webchatState.messagesJSON.filter(m => m.id === props.parentId)[0];
|
|
55
|
-
const updatedMsg = buttons_disabler_1.ButtonsDisabler.getUpdatedMessage(messageToUpdate);
|
|
56
|
-
updateMessage(updatedMsg);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
const getClassName = (isCustom = false) => {
|
|
60
|
-
if (isCustom) {
|
|
61
|
-
return 'button-custom';
|
|
62
|
-
}
|
|
63
|
-
if (props.payload) {
|
|
64
|
-
return 'button-payload';
|
|
65
|
-
}
|
|
66
|
-
if (props.url) {
|
|
67
|
-
return 'button-url';
|
|
68
|
-
}
|
|
69
|
-
if (props.webview) {
|
|
70
|
-
return 'button-webview';
|
|
71
|
-
}
|
|
72
|
-
if (props.path) {
|
|
73
|
-
return 'button-path';
|
|
74
|
-
}
|
|
75
|
-
return '';
|
|
76
|
-
};
|
|
77
|
-
const renderBrowser = () => {
|
|
78
|
-
const themeButton = webchatState.theme.button;
|
|
79
|
-
const urlIconEnabledProp = themeButton?.urlIcon?.enable;
|
|
80
|
-
const urlIconImage = themeButton?.urlIcon?.image;
|
|
81
|
-
const urlIcon = urlIconEnabledProp ? urlIconImage : undefined;
|
|
82
|
-
const CustomButton = themeButton?.custom;
|
|
83
|
-
if (CustomButton) {
|
|
84
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: getClassName(true), onClick: e => handleClick(e), children: (0, jsx_runtime_1.jsx)(CustomButton, { children: props.children }) }));
|
|
85
|
-
}
|
|
86
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.StyledButton, { className: getClassName(), onClick: e => handleClick(e), disabled: props.disabled && autoDisable, children: [props.children, props.url && urlIcon && ((0, jsx_runtime_1.jsx)(styles_1.StyledUrlImage, { className: 'botonic-url-icon', src: (0, environment_1.resolveImage)(urlIcon) }))] }));
|
|
87
|
-
};
|
|
88
|
-
const renderNode = () => {
|
|
89
|
-
const disabledProps = buttons_disabler_1.ButtonsDisabler.constructNodeProps({
|
|
90
|
-
disabled: props.disabled,
|
|
91
|
-
disabledstyle: props.disabledstyle,
|
|
92
|
-
autodisable: props.autodisable,
|
|
93
|
-
});
|
|
94
|
-
if (props.webview) {
|
|
95
|
-
return ((0, jsx_runtime_1.jsx)("button", {
|
|
96
|
-
// @ts-expect-error
|
|
97
|
-
url: (0, webviews_1.generateWebviewUrlWithParams)(props.webview, props.params), ...disabledProps, children: props.children }));
|
|
98
|
-
}
|
|
99
|
-
if (props.path) {
|
|
100
|
-
const payload = `__PATH_PAYLOAD__${props.path}`;
|
|
101
|
-
return (
|
|
102
|
-
// @ts-expect-error
|
|
103
|
-
(0, jsx_runtime_1.jsx)("button", { payload: payload, ...disabledProps, children: props.children }));
|
|
104
|
-
}
|
|
105
|
-
if (props.payload) {
|
|
106
|
-
return (
|
|
107
|
-
// @ts-expect-error
|
|
108
|
-
(0, jsx_runtime_1.jsx)("button", { payload: props.payload, ...disabledProps, children: props.children }));
|
|
109
|
-
}
|
|
110
|
-
if (props.url) {
|
|
111
|
-
return (
|
|
112
|
-
// @ts-expect-error
|
|
113
|
-
(0, jsx_runtime_1.jsx)("button", { url: props.url, target: props.target, ...disabledProps, children: props.children }));
|
|
114
|
-
}
|
|
115
|
-
if (props.onClick) {
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
throw new Error('Button missing payload, path, webview, url or onClick');
|
|
119
|
-
};
|
|
120
|
-
return (0, react_2.renderComponent)({ renderBrowser, renderNode });
|
|
121
|
-
};
|
|
122
|
-
exports.Button = Button;
|
|
123
|
-
exports.Button.displayName = constants_1.COMPONENT_DISPLAY_NAMES.Button;
|
|
124
|
-
exports.Button.serialize = (buttonProps) => {
|
|
125
|
-
const payload = buttonProps.path
|
|
126
|
-
? `__PATH_PAYLOAD__${buttonProps.path}`
|
|
127
|
-
: buttonProps.payload;
|
|
128
|
-
return {
|
|
129
|
-
button: {
|
|
130
|
-
payload,
|
|
131
|
-
url: buttonProps.url,
|
|
132
|
-
target: buttonProps.target,
|
|
133
|
-
webview: buttonProps.webview && String(buttonProps.webview),
|
|
134
|
-
title: buttonProps.children && String(buttonProps.children),
|
|
135
|
-
...buttons_disabler_1.ButtonsDisabler.withDisabledProps(buttonProps),
|
|
136
|
-
},
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/button/index.tsx"],"names":[],"mappings":";;;;AAAA,wCAAqC;AACrC,iCAAkC;AAElC,wDAAqE;AACrE,4CAAkD;AAClD,kDAAkE;AAClE,mDAAsD;AACtD,0DAAqD;AACrD,4CAAsD;AAEtD,q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,GAAG,mCAAuB,CAAC,MAAM,CAAA;AAEnD,cAAM,CAAC,SAAS,GAAG,CAAC,WAAwB,EAAE,EAAE;IAC9C,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI;QAC9B,CAAC,CAAC,mBAAmB,WAAW,CAAC,IAAI,EAAE;QACvC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAA;IAEvB,OAAO;QACL,MAAM,EAAE;YACN,OAAO;YACP,GAAG,EAAE,WAAW,CAAC,GAAG;YACpB,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,OAAO,EAAE,WAAW,CAAC,OAAO,IAAI,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC;YAC3D,KAAK,EAAE,WAAW,CAAC,QAAQ,IAAI,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC;YAC3D,GAAG,kCAAe,CAAC,iBAAiB,CAAC,WAAW,CAAC;SAClD;KACF,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const StyledButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
-
export declare const StyledUrlImage: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StyledUrlImage = exports.StyledButton = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
6
|
-
exports.StyledButton = styled_components_1.default.button `
|
|
7
|
-
display: flex;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
align-content: center;
|
|
10
|
-
gap: 6px;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
width: ${props => props.theme.button?.style?.width};
|
|
13
|
-
max-height: ${props => props.theme.button?.style?.maxHeight};
|
|
14
|
-
height: ${props => props.theme.button?.style?.height};
|
|
15
|
-
font-family: ${props => props.theme.style?.fontFamily};
|
|
16
|
-
font-size: ${props => props.theme.button?.style?.fontSize};
|
|
17
|
-
font-weight: ${props => props.theme.button?.style?.fontWeight};
|
|
18
|
-
background: ${props => props.theme.button?.style?.background};
|
|
19
|
-
color: ${props => props.theme.button?.style?.color};
|
|
20
|
-
outline: ${props => props.theme.button?.style?.outline};
|
|
21
|
-
border: ${props => props.theme.button?.style?.border};
|
|
22
|
-
border-radius: ${props => props.theme.button?.style?.borderRadius};
|
|
23
|
-
padding: ${props => props.theme.button?.style?.padding};
|
|
24
|
-
overflow: ${props => props.theme.button?.style?.overflow};
|
|
25
|
-
|
|
26
|
-
&:hover {
|
|
27
|
-
background: ${props => props.theme.button?.hoverBackground};
|
|
28
|
-
color: ${props => props.theme.button?.hoverTextColor};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&:disabled {
|
|
32
|
-
opacity: ${props => props.theme.button?.disabledstyle?.opacity};
|
|
33
|
-
cursor: ${props => props.theme.button?.disabledstyle?.cursor};
|
|
34
|
-
pointer-events: ${props => props.theme.button?.disabledstyle?.pointerEvents};
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
37
|
-
exports.StyledUrlImage = styled_components_1.default.img `
|
|
38
|
-
width: 20px;
|
|
39
|
-
`;
|
|
40
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/button/styles.ts"],"names":[],"mappings":";;;;AAAA,kFAAsC;AAEzB,QAAA,YAAY,GAAG,2BAAM,CAAC,MAAM,CAAA;;;;;;WAM9B,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK;gBACpC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS;YACjD,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAA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xB,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa;;CAErD,CAAA;AAEY,QAAA,cAAc,GAAG,2BAAM,CAAC,GAAG,CAAA;;CAEvC,CAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { WebchatMessage } from '../index-types';
|
|
3
|
-
interface DisabledProps {
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
autodisable?: boolean | string;
|
|
6
|
-
disabledstyle?: Record<string, string> | string;
|
|
7
|
-
}
|
|
8
|
-
interface AdditionalProps {
|
|
9
|
-
parentId: string;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
setDisabled: (disabled: boolean) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare class ButtonsDisabler {
|
|
14
|
-
static constructBrowserProps(props: DisabledProps): DisabledProps;
|
|
15
|
-
static constructNodeProps(props: DisabledProps): DisabledProps;
|
|
16
|
-
static withDisabledProps(props: DisabledProps): DisabledProps;
|
|
17
|
-
static updateChildrenButtons(children: React.ReactNode, additionalProps?: AdditionalProps): React.ReactNode;
|
|
18
|
-
static updateButtons(node: any, additionalProps?: AdditionalProps): any;
|
|
19
|
-
static getUpdatedMessage(messageToUpdate: WebchatMessage): WebchatMessage;
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ButtonsDisabler = void 0;
|
|
4
|
-
const message_utils_1 = require("../message-utils");
|
|
5
|
-
const objects_1 = require("../util/objects");
|
|
6
|
-
const react_1 = require("../util/react");
|
|
7
|
-
const button_1 = require("./button");
|
|
8
|
-
// biome-ignore lint/complexity/noStaticOnlyClass: ButtonsDisabler is a static class and should not be instantiated
|
|
9
|
-
class ButtonsDisabler {
|
|
10
|
-
static constructBrowserProps(props) {
|
|
11
|
-
const disabledProps = {};
|
|
12
|
-
if (props.autodisable !== undefined) {
|
|
13
|
-
disabledProps.autodisable = (0, objects_1.strToBool)(props.autodisable);
|
|
14
|
-
}
|
|
15
|
-
if (props.disabledstyle !== undefined) {
|
|
16
|
-
disabledProps.disabledstyle = props.disabledstyle;
|
|
17
|
-
}
|
|
18
|
-
return disabledProps;
|
|
19
|
-
}
|
|
20
|
-
static constructNodeProps(props) {
|
|
21
|
-
const disabledProps = {};
|
|
22
|
-
if (props.autodisable !== undefined) {
|
|
23
|
-
disabledProps.autodisable = String(props.autodisable);
|
|
24
|
-
}
|
|
25
|
-
if (props.disabledstyle !== undefined) {
|
|
26
|
-
disabledProps.disabledstyle = JSON.stringify(props.disabledstyle);
|
|
27
|
-
}
|
|
28
|
-
return disabledProps;
|
|
29
|
-
}
|
|
30
|
-
static withDisabledProps(props) {
|
|
31
|
-
return {
|
|
32
|
-
disabled: props.disabled,
|
|
33
|
-
autodisable: props.autodisable,
|
|
34
|
-
disabledstyle: props.disabledstyle,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
static updateChildrenButtons(children, additionalProps) {
|
|
38
|
-
return (0, react_1.deepMapWithIndex)(children, (node) => {
|
|
39
|
-
if (node.type === button_1.Button) {
|
|
40
|
-
return ButtonsDisabler.updateButtons(node, additionalProps);
|
|
41
|
-
}
|
|
42
|
-
return node;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
static updateButtons(node, additionalProps) {
|
|
46
|
-
if (additionalProps) {
|
|
47
|
-
additionalProps = {
|
|
48
|
-
parentId: additionalProps.parentId,
|
|
49
|
-
disabled: node.props.disabled === true
|
|
50
|
-
? node.props.disabled
|
|
51
|
-
: additionalProps.disabled,
|
|
52
|
-
setDisabled: additionalProps.setDisabled,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
return {
|
|
56
|
-
...node,
|
|
57
|
-
props: {
|
|
58
|
-
...node.props,
|
|
59
|
-
...additionalProps,
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
static getUpdatedMessage(messageToUpdate) {
|
|
64
|
-
const updateMsgButton = (button) => {
|
|
65
|
-
return {
|
|
66
|
-
...button,
|
|
67
|
-
...{
|
|
68
|
-
disabled: true,
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
if ((0, message_utils_1.isCarousel)(messageToUpdate) &&
|
|
73
|
-
messageToUpdate.data &&
|
|
74
|
-
messageToUpdate.data.elements) {
|
|
75
|
-
messageToUpdate.data.elements = messageToUpdate.data.elements.map(e => ({
|
|
76
|
-
...e,
|
|
77
|
-
...{
|
|
78
|
-
buttons: e.buttons.map(updateMsgButton),
|
|
79
|
-
},
|
|
80
|
-
}));
|
|
81
|
-
return messageToUpdate;
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
return {
|
|
85
|
-
...messageToUpdate,
|
|
86
|
-
...{
|
|
87
|
-
buttons: messageToUpdate.buttons.map(updateMsgButton),
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
exports.ButtonsDisabler = ButtonsDisabler;
|
|
94
|
-
//# sourceMappingURL=buttons-disabler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buttons-disabler.js","sourceRoot":"","sources":["../../../src/components/buttons-disabler.ts"],"names":[],"mappings":";;;AAIA,oDAA6C;AAC7C,6CAA2C;AAC3C,yCAAgD;AAChD,qCAAiC;AAcjC,mHAAmH;AACnH,MAAa,eAAe;IAC1B,MAAM,CAAC,qBAAqB,CAAC,KAAoB;QAC/C,MAAM,aAAa,GAAkB,EAAE,CAAA;QACvC,IAAI,KAAK,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACpC,aAAa,CAAC,WAAW,GAAG,IAAA,mBAAS,EAAC,KAAK,CAAC,WAAW,CAAC,CAAA;QAC1D,CAAC;QACD,IAAI,KAAK,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;YACtC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AAK,CAAC,QAAQ;oBACrB,CAAC,CAAC,eAAe,CAAC,QAAQ;gBAC9B,WAAW,EAAE,eAAe,CAAC,WAAW;aACzC,CAAA;QACH,CAAC;QACD,OAAO;YACL,GAAG,IAAI;YACP,KAAK,EAAE;gBACL,GAAG,IAAI,CAAC,KAAK;gBACb,GAAG,eAAe;aACnB;SACF,CAAA;IACH,CAAC;IAED,MAAM,CAAC,iBAAiB,CAAC,eAA+B;QACtD,MAAM,eAAe,GAAG,CAAC,MAAmB,EAAE,EAAE;YAC9C,OAAO;gBACL,GAAG,MAAM;gBACT,GAAG;oBACD,QAAQ,EAAE,IAAI;iBACf;aACF,CAAA;QACH,CAAC,CAAA;QAED,IACE,IAAA,0BAAU,EAAC,eAAe,CAAC;YAC3B,eAAe,CAAC,IAAI;YACpB,eAAe,CAAC,IAAI,CAAC,QAAQ,EAC7B,CAAC;YACD,eAAe,CAAC,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBACtE,GAAG,CAAC;gBACJ,GAAG;oBACD,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;iBACxC;aACF,CAAC,CAAC,CAAA;YACH,OAAO,eAAe,CAAA;QACxB,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,GAAG,eAAe;gBAClB,GAAG;oBACD,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;iBACtD;aACF,CAAA;QACH,CAAC;IACH,CAAC;CACF;AA9FD,0CA8FC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { INPUT } from '@botonic/core';
|
|
2
|
-
import type { CarouselProps } from './index-types';
|
|
3
|
-
export declare const Carousel: {
|
|
4
|
-
(props: CarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
displayName: "Carousel";
|
|
6
|
-
serialize: (carouselProps: any) => {
|
|
7
|
-
type: INPUT;
|
|
8
|
-
elements: any;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Carousel = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const core_1 = require("@botonic/core");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
9
|
-
const leftArrow_svg_1 = tslib_1.__importDefault(require("../assets/leftArrow.svg"));
|
|
10
|
-
const rightArrow_svg_1 = tslib_1.__importDefault(require("../assets/rightArrow.svg"));
|
|
11
|
-
const constants_1 = require("../constants");
|
|
12
|
-
const environment_1 = require("../util/environment");
|
|
13
|
-
const context_1 = require("../webchat/context");
|
|
14
|
-
const buttons_disabler_1 = require("./buttons-disabler");
|
|
15
|
-
const constants_2 = require("./constants");
|
|
16
|
-
const message_1 = require("./message");
|
|
17
|
-
const ScrollableCarousel = styled_components_1.default.div `
|
|
18
|
-
overscroll-behavior: contain;
|
|
19
|
-
-webkit-overflow-scrolling: touch;
|
|
20
|
-
`;
|
|
21
|
-
const StyledCarousel = styled_components_1.default.div `
|
|
22
|
-
padding: 10px 0px;
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: row;
|
|
25
|
-
max-width: 100%;
|
|
26
|
-
${props => props.carouselArrowsEnabled && 'overflow-x: auto;'}
|
|
27
|
-
`;
|
|
28
|
-
const StyledItems = styled_components_1.default.div `
|
|
29
|
-
display: flex;
|
|
30
|
-
`;
|
|
31
|
-
const StyledArrowContainer = styled_components_1.default.div `
|
|
32
|
-
position: absolute;
|
|
33
|
-
top: calc(50% - 20px);
|
|
34
|
-
height: 40px;
|
|
35
|
-
width: 25px;
|
|
36
|
-
background: ${constants_1.COLORS.SILVER};
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
justify-content: ${props => props.justifyContent};
|
|
41
|
-
|
|
42
|
-
${props => (props.left === 0 ? `left: ${props.left}px` : '')};
|
|
43
|
-
${props => (props.right === 0 ? `right: ${props.right}px` : '')};
|
|
44
|
-
${props => (props.arrow === 'right' ? 'border-top-right-radius: 30px' : '')};
|
|
45
|
-
${props => props.arrow === 'right' ? 'border-bottom-right-radius: 30px' : ''};
|
|
46
|
-
${props => (props.arrow === 'left' ? 'border-top-left-radius: 30px' : '')};
|
|
47
|
-
${props => (props.arrow === 'left' ? 'border-bottom-left-radius: 30px' : '')};
|
|
48
|
-
`;
|
|
49
|
-
const StyledArrow = styled_components_1.default.img `
|
|
50
|
-
width: 20px;
|
|
51
|
-
height: 20px;
|
|
52
|
-
`;
|
|
53
|
-
const serialize = carouselProps => {
|
|
54
|
-
let carouselChildren = carouselProps.children;
|
|
55
|
-
if (!Array.isArray(carouselChildren)) {
|
|
56
|
-
carouselChildren = [carouselChildren];
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
type: core_1.INPUT.CAROUSEL,
|
|
60
|
-
elements: carouselChildren.map(e => e?.type?.serialize?.(e.props)),
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
const Carousel = (props) => {
|
|
64
|
-
const { getThemeProperty } = (0, react_1.useContext)(context_1.WebchatContext);
|
|
65
|
-
const [hasLeftArrow, setLeftArrow] = (0, react_1.useState)(false);
|
|
66
|
-
const [hasRightArrow, setRightArrow] = (0, react_1.useState)(true);
|
|
67
|
-
const carouselRef = (0, react_1.useRef)(null);
|
|
68
|
-
const CustomCarouselLeftArrow = getThemeProperty(constants_1.WEBCHAT.CUSTOM_PROPERTIES.customCarouselLeftArrow);
|
|
69
|
-
const CustomCarouselRightArrow = getThemeProperty(constants_1.WEBCHAT.CUSTOM_PROPERTIES.customCarouselRightArrow);
|
|
70
|
-
// TODO: Investigate why when set to false, scroll is enabled via dragging the bar but not hovering the carousel elements
|
|
71
|
-
const carouselArrowsEnabled = getThemeProperty(constants_1.WEBCHAT.CUSTOM_PROPERTIES.enableCarouselArrows);
|
|
72
|
-
const scrollCarouselBy = value => {
|
|
73
|
-
carouselRef.current?.scrollBy({
|
|
74
|
-
left: value,
|
|
75
|
-
behavior: 'smooth',
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
const setArrowsVisibility = event => {
|
|
79
|
-
const carousel = event.currentTarget;
|
|
80
|
-
const maxRightScroll = carousel.scrollWidth -
|
|
81
|
-
carousel.offsetWidth -
|
|
82
|
-
constants_1.WEBCHAT.DEFAULTS.ELEMENT_MARGIN_RIGHT;
|
|
83
|
-
setLeftArrow(carousel.scrollLeft !== 0);
|
|
84
|
-
setRightArrow(carousel.scrollLeft < maxRightScroll);
|
|
85
|
-
};
|
|
86
|
-
const getArrows = () => {
|
|
87
|
-
const scrollBy = constants_1.WEBCHAT.DEFAULTS.ELEMENT_WIDTH + constants_1.WEBCHAT.DEFAULTS.ELEMENT_MARGIN_RIGHT;
|
|
88
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [hasLeftArrow &&
|
|
89
|
-
(CustomCarouselLeftArrow ? ((0, jsx_runtime_1.jsx)(CustomCarouselLeftArrow, { scrollCarouselBy: scrollCarouselBy })) : ((0, jsx_runtime_1.jsx)(StyledArrowContainer, { left: 0, arrow: 'right', justifyContent: 'flex-start', onClick: () => scrollCarouselBy(-scrollBy), children: (0, jsx_runtime_1.jsx)(StyledArrow, { src: (0, environment_1.resolveImage)(leftArrow_svg_1.default) }) }))), hasRightArrow &&
|
|
90
|
-
(CustomCarouselRightArrow ? ((0, jsx_runtime_1.jsx)(CustomCarouselRightArrow, { scrollCarouselBy: scrollCarouselBy })) : ((0, jsx_runtime_1.jsx)(StyledArrowContainer, { right: 0, arrow: 'left', justifyContent: 'flex-end', onClick: () => scrollCarouselBy(scrollBy), children: (0, jsx_runtime_1.jsx)(StyledArrow, { src: (0, environment_1.resolveImage)(rightArrow_svg_1.default) }) })))] }));
|
|
91
|
-
};
|
|
92
|
-
(0, react_1.useEffect)(() => {
|
|
93
|
-
const carousel = carouselRef.current;
|
|
94
|
-
if (carousel?.addEventListener) {
|
|
95
|
-
carousel.addEventListener('scroll', setArrowsVisibility, false);
|
|
96
|
-
}
|
|
97
|
-
return () => {
|
|
98
|
-
if (carousel?.removeEventListener) {
|
|
99
|
-
carousel.removeEventListener('scroll', setArrowsVisibility, false);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
}, [carouselRef.current]);
|
|
103
|
-
const carouselProps = {
|
|
104
|
-
...props,
|
|
105
|
-
children: buttons_disabler_1.ButtonsDisabler.updateChildrenButtons(props.children),
|
|
106
|
-
};
|
|
107
|
-
if ((0, core_1.isBrowser)()) {
|
|
108
|
-
return ((0, jsx_runtime_1.jsx)(message_1.Message, { style: {
|
|
109
|
-
width: '85%',
|
|
110
|
-
padding: 0,
|
|
111
|
-
backgroundColor: constants_1.COLORS.TRANSPARENT,
|
|
112
|
-
}, blob: false, json: serialize(carouselProps), type: core_1.INPUT.CAROUSEL, ...carouselProps, children: (0, jsx_runtime_1.jsx)(ScrollableCarousel, { children: (0, jsx_runtime_1.jsxs)(StyledCarousel, { ref: carouselRef, carouselArrowsEnabled: carouselArrowsEnabled, children: [(0, jsx_runtime_1.jsx)(StyledItems, { children: carouselProps.children }), carouselArrowsEnabled && getArrows()] }) }) }));
|
|
113
|
-
}
|
|
114
|
-
return ((0, jsx_runtime_1.jsx)(message_1.Message, { style: { width: '85%', padding: 0, backgroundColor: constants_1.COLORS.TRANSPARENT }, blob: false, json: serialize(carouselProps), type: core_1.INPUT.CAROUSEL, ...carouselProps, children: props.children }));
|
|
115
|
-
};
|
|
116
|
-
exports.Carousel = Carousel;
|
|
117
|
-
exports.Carousel.displayName = constants_2.COMPONENT_DISPLAY_NAMES.Carousel;
|
|
118
|
-
exports.Carousel.serialize = serialize;
|
|
119
|
-
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