@botonic/react 0.56.0-alpha.0 → 0.57.0-rslib-esm.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app.js +9 -0
- package/lib/app.js.map +1 -0
- package/lib/assets/types.d.ts +4 -0
- package/lib/botonic-tester.js +122 -0
- package/lib/botonic-tester.js.map +1 -0
- package/lib/components/audio.d.ts +9 -0
- package/lib/components/audio.js +59 -0
- package/lib/components/audio.js.map +1 -0
- package/lib/components/button/index.d.ts +17 -0
- package/lib/components/button/index.js +183 -0
- package/lib/components/button/index.js.map +1 -0
- package/lib/components/button/styles.js +42 -0
- package/lib/components/button/styles.js.map +1 -0
- package/lib/components/buttons-disabler.d.ts +21 -0
- package/lib/components/buttons-disabler.js +97 -0
- package/lib/components/buttons-disabler.js.map +1 -0
- package/lib/components/carousel.d.ts +10 -0
- package/lib/components/carousel.js +196 -0
- package/lib/components/carousel.js.map +1 -0
- package/lib/components/components.js +18 -0
- package/lib/components/components.js.map +1 -0
- package/lib/components/constants.js +15 -0
- package/lib/components/constants.js.map +1 -0
- package/lib/components/custom-message.d.ts +16 -0
- package/lib/components/custom-message.js +109 -0
- package/lib/components/custom-message.js.map +1 -0
- package/lib/components/document.d.ts +9 -0
- package/lib/components/document.js +82 -0
- package/lib/components/document.js.map +1 -0
- package/lib/components/element.js +68 -0
- package/lib/components/element.js.map +1 -0
- package/lib/components/handoff.d.ts +1 -0
- package/lib/components/handoff.js +76 -0
- package/lib/components/handoff.js.map +1 -0
- package/lib/components/image.d.ts +9 -0
- package/lib/components/image.js +81 -0
- package/lib/components/image.js.map +1 -0
- package/lib/components/index-types.d.ts +83 -0
- package/lib/components/index-types.js +4 -0
- package/lib/components/index-types.js.map +1 -0
- package/lib/components/index.d.ts +33 -0
- package/lib/components/index.js +99 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/location.js +68 -0
- package/lib/components/location.js.map +1 -0
- package/lib/components/markdown.js +165 -0
- package/lib/components/markdown.js.map +1 -0
- package/lib/components/message/index.js +277 -0
- package/lib/components/message/index.js.map +1 -0
- package/lib/components/message/message-footer.d.ts +8 -0
- package/lib/components/message/message-footer.js +38 -0
- package/lib/components/message/message-footer.js.map +1 -0
- package/lib/components/message/message-image.d.ts +7 -0
- package/lib/components/message/message-image.js +46 -0
- package/lib/components/message/message-image.js.map +1 -0
- package/lib/components/message/styles.js +123 -0
- package/lib/components/message/styles.js.map +1 -0
- package/lib/components/message/timestamps.d.ts +13 -0
- package/lib/components/message/timestamps.js +67 -0
- package/lib/components/message/timestamps.js.map +1 -0
- package/lib/components/message-template.js +26 -0
- package/lib/components/message-template.js.map +1 -0
- package/lib/components/multichannel/facebook/facebook.js +61 -0
- package/lib/components/multichannel/facebook/facebook.js.map +1 -0
- package/lib/components/multichannel/index-types.js +5 -0
- package/lib/components/multichannel/index-types.js.map +1 -0
- package/lib/components/multichannel/index.d.ts +11 -0
- package/lib/components/multichannel/index.js +25 -0
- package/lib/components/multichannel/index.js.map +1 -0
- package/lib/components/multichannel/multichannel-button.d.ts +4 -0
- package/lib/components/multichannel/multichannel-button.js +93 -0
- package/lib/components/multichannel/multichannel-button.js.map +1 -0
- package/lib/components/multichannel/multichannel-carousel.d.ts +1 -0
- package/lib/components/multichannel/multichannel-carousel.js +123 -0
- package/lib/components/multichannel/multichannel-carousel.js.map +1 -0
- package/lib/components/multichannel/multichannel-context.js +15 -0
- package/lib/components/multichannel/multichannel-context.js.map +1 -0
- package/lib/components/multichannel/multichannel-reply.d.ts +4 -0
- package/lib/components/multichannel/multichannel-reply.js +41 -0
- package/lib/components/multichannel/multichannel-reply.js.map +1 -0
- package/lib/components/multichannel/multichannel-text.d.ts +2 -0
- package/lib/components/multichannel/multichannel-text.js +286 -0
- package/lib/components/multichannel/multichannel-text.js.map +1 -0
- package/lib/components/multichannel/multichannel-utils.js +76 -0
- package/lib/components/multichannel/multichannel-utils.js.map +1 -0
- package/lib/components/multichannel/multichannel.js +111 -0
- package/lib/components/multichannel/multichannel.js.map +1 -0
- package/lib/components/multichannel/whatsapp/constants.js +16 -0
- package/lib/components/multichannel/whatsapp/constants.js.map +1 -0
- package/lib/components/multichannel/whatsapp/markdown-meta.js +41 -0
- package/lib/components/multichannel/whatsapp/markdown-meta.js.map +1 -0
- package/lib/components/pic.js +55 -0
- package/lib/components/pic.js.map +1 -0
- package/lib/components/raw.d.ts +9 -0
- package/lib/components/raw.js +86 -0
- package/lib/components/raw.js.map +1 -0
- package/lib/components/reply.d.ts +11 -0
- package/lib/components/reply.js +102 -0
- package/lib/components/reply.js.map +1 -0
- package/lib/components/share-button.js +26 -0
- package/lib/components/share-button.js.map +1 -0
- package/lib/components/subtitle.js +43 -0
- package/lib/components/subtitle.js.map +1 -0
- package/lib/components/system-debug-trace/debug-message.d.ts +8 -0
- package/lib/components/system-debug-trace/debug-message.js +132 -0
- package/lib/components/system-debug-trace/debug-message.js.map +1 -0
- package/lib/components/system-debug-trace/events/ai-agent/ai-agent.d.ts +4 -0
- package/lib/components/system-debug-trace/events/ai-agent/ai-agent.js +140 -0
- package/lib/components/system-debug-trace/events/ai-agent/ai-agent.js.map +1 -0
- package/lib/components/system-debug-trace/events/ai-agent/executed-tools.d.ts +7 -0
- package/lib/components/system-debug-trace/events/ai-agent/executed-tools.js +46 -0
- package/lib/components/system-debug-trace/events/ai-agent/executed-tools.js.map +1 -0
- package/lib/components/system-debug-trace/events/ai-agent/index.d.ts +2 -0
- package/lib/components/system-debug-trace/events/ai-agent/index.js +7 -0
- package/lib/components/system-debug-trace/events/ai-agent/index.js.map +1 -0
- package/lib/components/system-debug-trace/events/ai-agent/parse-tools.d.ts +9 -0
- package/lib/components/system-debug-trace/events/ai-agent/parse-tools.js +30 -0
- package/lib/components/system-debug-trace/events/ai-agent/parse-tools.js.map +1 -0
- package/lib/components/system-debug-trace/events/ai-agent/rehydrate-ai-agent-event.d.ts +6 -0
- package/lib/components/system-debug-trace/events/ai-agent/rehydrate-ai-agent-event.js +49 -0
- package/lib/components/system-debug-trace/events/ai-agent/rehydrate-ai-agent-event.js.map +1 -0
- package/lib/components/system-debug-trace/events/ai-agent/types.d.ts +23 -0
- package/lib/components/system-debug-trace/events/ai-agent/types.js +4 -0
- package/lib/components/system-debug-trace/events/ai-agent/types.js.map +1 -0
- package/lib/components/system-debug-trace/events/ai-agent/use-rehydrated-ai-agent-event.d.ts +8 -0
- package/lib/components/system-debug-trace/events/ai-agent/use-rehydrated-ai-agent-event.js +41 -0
- package/lib/components/system-debug-trace/events/ai-agent/use-rehydrated-ai-agent-event.js.map +1 -0
- package/lib/components/system-debug-trace/events/ai-agent-router/ai-agent-router.d.ts +4 -0
- package/lib/components/system-debug-trace/events/ai-agent-router/ai-agent-router.js +93 -0
- package/lib/components/system-debug-trace/events/ai-agent-router/ai-agent-router.js.map +1 -0
- package/lib/components/system-debug-trace/events/ai-agent-router/index.d.ts +2 -0
- package/lib/components/system-debug-trace/events/ai-agent-router/index.js +7 -0
- package/lib/components/system-debug-trace/events/ai-agent-router/index.js.map +1 -0
- package/lib/components/system-debug-trace/events/ai-agent-router/types.d.ts +23 -0
- package/lib/components/system-debug-trace/events/ai-agent-router/types.js +4 -0
- package/lib/components/system-debug-trace/events/ai-agent-router/types.js.map +1 -0
- package/lib/components/system-debug-trace/events/bot-action.d.ts +7 -0
- package/lib/components/system-debug-trace/events/bot-action.js +34 -0
- package/lib/components/system-debug-trace/events/bot-action.js.map +1 -0
- package/lib/components/system-debug-trace/events/components/guardrail-item.js +39 -0
- package/lib/components/system-debug-trace/events/components/guardrail-item.js.map +1 -0
- package/lib/components/system-debug-trace/events/components/index.d.ts +2 -0
- package/lib/components/system-debug-trace/events/components/index.js +7 -0
- package/lib/components/system-debug-trace/events/components/index.js.map +1 -0
- package/lib/components/system-debug-trace/events/components/sources-section.d.ts +11 -0
- package/lib/components/system-debug-trace/events/components/sources-section.js +56 -0
- package/lib/components/system-debug-trace/events/components/sources-section.js.map +1 -0
- package/lib/components/system-debug-trace/events/conditional-channel.d.ts +7 -0
- package/lib/components/system-debug-trace/events/conditional-channel.js +34 -0
- package/lib/components/system-debug-trace/events/conditional-channel.js.map +1 -0
- package/lib/components/system-debug-trace/events/conditional-country.d.ts +7 -0
- package/lib/components/system-debug-trace/events/conditional-country.js +34 -0
- package/lib/components/system-debug-trace/events/conditional-country.js.map +1 -0
- package/lib/components/system-debug-trace/events/conditional-custom.d.ts +10 -0
- package/lib/components/system-debug-trace/events/conditional-custom.js +66 -0
- package/lib/components/system-debug-trace/events/conditional-custom.js.map +1 -0
- package/lib/components/system-debug-trace/events/conditional-queue-status.d.ts +11 -0
- package/lib/components/system-debug-trace/events/conditional-queue-status.js +78 -0
- package/lib/components/system-debug-trace/events/conditional-queue-status.js.map +1 -0
- package/lib/components/system-debug-trace/events/constants.js +37 -0
- package/lib/components/system-debug-trace/events/constants.js.map +1 -0
- package/lib/components/system-debug-trace/events/fallback.d.ts +9 -0
- package/lib/components/system-debug-trace/events/fallback.js +36 -0
- package/lib/components/system-debug-trace/events/fallback.js.map +1 -0
- package/lib/components/system-debug-trace/events/handoff-success.d.ts +11 -0
- package/lib/components/system-debug-trace/events/handoff-success.js +99 -0
- package/lib/components/system-debug-trace/events/handoff-success.js.map +1 -0
- package/lib/components/system-debug-trace/events/index.d.ts +14 -0
- package/lib/components/system-debug-trace/events/index.js +31 -0
- package/lib/components/system-debug-trace/events/index.js.map +1 -0
- package/lib/components/system-debug-trace/events/keyword.d.ts +10 -0
- package/lib/components/system-debug-trace/events/keyword.js +35 -0
- package/lib/components/system-debug-trace/events/keyword.js.map +1 -0
- package/lib/components/system-debug-trace/events/knowledge-bases-types.js +4 -0
- package/lib/components/system-debug-trace/events/knowledge-bases-types.js.map +1 -0
- package/lib/components/system-debug-trace/events/redirect-flow.d.ts +10 -0
- package/lib/components/system-debug-trace/events/redirect-flow.js +34 -0
- package/lib/components/system-debug-trace/events/redirect-flow.js.map +1 -0
- package/lib/components/system-debug-trace/events/smart-intent.d.ts +7 -0
- package/lib/components/system-debug-trace/events/smart-intent.js +34 -0
- package/lib/components/system-debug-trace/events/smart-intent.js.map +1 -0
- package/lib/components/system-debug-trace/events/webview-action-triggered.d.ts +10 -0
- package/lib/components/system-debug-trace/events/webview-action-triggered.js +51 -0
- package/lib/components/system-debug-trace/events/webview-action-triggered.js.map +1 -0
- package/lib/components/system-debug-trace/hooks/use-knowledge-base-info.d.ts +16 -0
- package/lib/components/system-debug-trace/hooks/use-knowledge-base-info.js +118 -0
- package/lib/components/system-debug-trace/hooks/use-knowledge-base-info.js.map +1 -0
- package/lib/components/system-debug-trace/hooks/use-last-label-position.js +84 -0
- package/lib/components/system-debug-trace/hooks/use-last-label-position.js.map +1 -0
- package/lib/components/system-debug-trace/icons/ai-router.d.ts +1 -0
- package/lib/components/system-debug-trace/icons/ai-router.js +71 -0
- package/lib/components/system-debug-trace/icons/ai-router.js.map +1 -0
- package/lib/components/system-debug-trace/icons/ai-specialist.d.ts +1 -0
- package/lib/components/system-debug-trace/icons/ai-specialist.js +85 -0
- package/lib/components/system-debug-trace/icons/ai-specialist.js.map +1 -0
- package/lib/components/system-debug-trace/icons/arrow-progress.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/arrow-progress.js +23 -0
- package/lib/components/system-debug-trace/icons/arrow-progress.js.map +1 -0
- package/lib/components/system-debug-trace/icons/brain.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/brain.js +23 -0
- package/lib/components/system-debug-trace/icons/brain.js.map +1 -0
- package/lib/components/system-debug-trace/icons/caret-down.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/caret-down.js +23 -0
- package/lib/components/system-debug-trace/icons/caret-down.js.map +1 -0
- package/lib/components/system-debug-trace/icons/caret-up.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/caret-up.js +23 -0
- package/lib/components/system-debug-trace/icons/caret-up.js.map +1 -0
- package/lib/components/system-debug-trace/icons/circle-check.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/circle-check.js +22 -0
- package/lib/components/system-debug-trace/icons/circle-check.js.map +1 -0
- package/lib/components/system-debug-trace/icons/code.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/code.js +22 -0
- package/lib/components/system-debug-trace/icons/code.js.map +1 -0
- package/lib/components/system-debug-trace/icons/file-pdf.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/file-pdf.js +23 -0
- package/lib/components/system-debug-trace/icons/file-pdf.js.map +1 -0
- package/lib/components/system-debug-trace/icons/file-word.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/file-word.js +23 -0
- package/lib/components/system-debug-trace/icons/file-word.js.map +1 -0
- package/lib/components/system-debug-trace/icons/hand.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/hand.js +23 -0
- package/lib/components/system-debug-trace/icons/hand.js.map +1 -0
- package/lib/components/system-debug-trace/icons/head-set.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/head-set.js +23 -0
- package/lib/components/system-debug-trace/icons/head-set.js.map +1 -0
- package/lib/components/system-debug-trace/icons/index.d.ts +16 -0
- package/lib/components/system-debug-trace/icons/index.js +35 -0
- package/lib/components/system-debug-trace/icons/index.js.map +1 -0
- package/lib/components/system-debug-trace/icons/life-ring.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/life-ring.js +23 -0
- package/lib/components/system-debug-trace/icons/life-ring.js.map +1 -0
- package/lib/components/system-debug-trace/icons/link.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/link.js +23 -0
- package/lib/components/system-debug-trace/icons/link.js.map +1 -0
- package/lib/components/system-debug-trace/icons/quote-right.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/quote-right.js +23 -0
- package/lib/components/system-debug-trace/icons/quote-right.js.map +1 -0
- package/lib/components/system-debug-trace/icons/screwdriver-wrench.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/screwdriver-wrench.js +23 -0
- package/lib/components/system-debug-trace/icons/screwdriver-wrench.js.map +1 -0
- package/lib/components/system-debug-trace/icons/split.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/split.js +23 -0
- package/lib/components/system-debug-trace/icons/split.js.map +1 -0
- package/lib/components/system-debug-trace/icons/wand.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/wand.js +23 -0
- package/lib/components/system-debug-trace/icons/wand.js.map +1 -0
- package/lib/components/system-debug-trace/icons/window-restore.d.ts +2 -0
- package/lib/components/system-debug-trace/icons/window-restore.js +23 -0
- package/lib/components/system-debug-trace/icons/window-restore.js.map +1 -0
- package/lib/components/system-debug-trace/index.d.ts +10 -0
- package/lib/components/system-debug-trace/index.js +48 -0
- package/lib/components/system-debug-trace/index.js.map +1 -0
- package/lib/components/system-debug-trace/styles.js +290 -0
- package/lib/components/system-debug-trace/styles.js.map +1 -0
- package/lib/components/system-debug-trace/types.d.ts +13 -0
- package/lib/components/system-debug-trace/types.js +4 -0
- package/lib/components/system-debug-trace/types.js.map +1 -0
- package/lib/components/text.d.ts +8 -0
- package/lib/components/text.js +78 -0
- package/lib/components/text.js.map +1 -0
- package/lib/components/title.js +39 -0
- package/lib/components/title.js.map +1 -0
- package/lib/components/video.d.ts +9 -0
- package/lib/components/video.js +58 -0
- package/lib/components/video.js.map +1 -0
- package/lib/components/webchat-settings.d.ts +19 -0
- package/lib/components/webchat-settings.js +98 -0
- package/lib/components/webchat-settings.js.map +1 -0
- package/lib/components/whatsapp-button-list.js +78 -0
- package/lib/components/whatsapp-button-list.js.map +1 -0
- package/lib/components/whatsapp-catalog.js +48 -0
- package/lib/components/whatsapp-catalog.js.map +1 -0
- package/lib/components/whatsapp-cta-url-button.js +75 -0
- package/lib/components/whatsapp-cta-url-button.js.map +1 -0
- package/lib/components/whatsapp-interactive-media-carousel.d.ts +31 -0
- package/lib/components/whatsapp-interactive-media-carousel.js +59 -0
- package/lib/components/whatsapp-interactive-media-carousel.js.map +1 -0
- package/lib/components/whatsapp-media-carousel.js +67 -0
- package/lib/components/whatsapp-media-carousel.js.map +1 -0
- package/lib/components/whatsapp-product-carousel.js +60 -0
- package/lib/components/whatsapp-product-carousel.js.map +1 -0
- package/lib/components/whatsapp-product-list.js +53 -0
- package/lib/components/whatsapp-product-list.js.map +1 -0
- package/lib/components/whatsapp-product.js +49 -0
- package/lib/components/whatsapp-product.js.map +1 -0
- package/lib/components/whatsapp-request-contact-info.js +49 -0
- package/lib/components/whatsapp-request-contact-info.js.map +1 -0
- package/lib/components/whatsapp-template/index.d.ts +11 -0
- package/lib/components/whatsapp-template/index.js +52 -0
- package/lib/components/whatsapp-template/index.js.map +1 -0
- package/lib/components/whatsapp-template/types.js +30 -0
- package/lib/components/whatsapp-template/types.js.map +1 -0
- package/lib/constants.js +204 -0
- package/lib/constants.js.map +1 -0
- package/lib/contexts.d.ts +17 -0
- package/lib/contexts.js +33 -0
- package/lib/contexts.js.map +1 -0
- package/lib/debug-system-messages.d.ts +177 -0
- package/lib/debug-system-messages.js +234 -0
- package/lib/debug-system-messages.js.map +1 -0
- package/lib/dev-app.d.ts +213 -0
- package/lib/dev-app.js +135 -0
- package/lib/dev-app.js.map +1 -0
- package/lib/index-types.d.ts +187 -0
- package/lib/index-types.js +16 -0
- package/lib/index-types.js.map +1 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +34 -0
- package/lib/index.js.map +1 -0
- package/lib/message-utils.js +49 -0
- package/lib/message-utils.js.map +1 -0
- package/lib/msg-to-botonic.js +232 -0
- package/lib/msg-to-botonic.js.map +1 -0
- package/lib/node-app.d.ts +7 -0
- package/lib/node-app.js +25 -0
- package/lib/node-app.js.map +1 -0
- package/lib/react-bot.d.ts +18 -0
- package/lib/react-bot.js +49 -0
- package/lib/react-bot.js.map +1 -0
- package/lib/shared/styles.js +34 -0
- package/lib/shared/styles.js.map +1 -0
- package/lib/util/dom.js +28 -0
- package/lib/util/dom.js.map +1 -0
- package/lib/util/environment.js +76 -0
- package/lib/util/environment.js.map +1 -0
- package/lib/util/error-boundary.d.ts +7 -0
- package/lib/util/error-boundary.js +43 -0
- package/lib/util/error-boundary.js.map +1 -0
- package/lib/util/functional.js +22 -0
- package/lib/util/functional.js.map +1 -0
- package/lib/util/i18n.js +156 -0
- package/lib/util/i18n.js.map +1 -0
- package/lib/util/index.d.ts +10 -0
- package/lib/util/index.js +23 -0
- package/lib/util/index.js.map +1 -0
- package/lib/util/logs.js +28 -0
- package/lib/util/logs.js.map +1 -0
- package/lib/util/objects.js +40 -0
- package/lib/util/objects.js.map +1 -0
- package/lib/util/react.js +51 -0
- package/lib/util/react.js.map +1 -0
- package/lib/util/regexs.js +21 -0
- package/lib/util/regexs.js.map +1 -0
- package/lib/util/strings.js +10 -0
- package/lib/util/strings.js.map +1 -0
- package/lib/util/webchat.d.ts +24 -0
- package/lib/util/webchat.js +101 -0
- package/lib/util/webchat.js.map +1 -0
- package/lib/util/webviews.d.ts +2 -0
- package/lib/util/webviews.js +8 -0
- package/lib/util/webviews.js.map +1 -0
- package/lib/webchat/chat-area/index.d.ts +1 -0
- package/lib/webchat/chat-area/index.js +46 -0
- package/lib/webchat/chat-area/index.js.map +1 -0
- package/lib/webchat/chat-area/styles.js +15 -0
- package/lib/webchat/chat-area/styles.js.map +1 -0
- package/lib/webchat/components/common.d.ts +1 -0
- package/lib/webchat/components/common.js +20 -0
- package/lib/webchat/components/common.js.map +1 -0
- package/lib/webchat/components/conditional-animation.d.ts +1 -0
- package/lib/webchat/components/conditional-animation.js +34 -0
- package/lib/webchat/components/conditional-animation.js.map +1 -0
- package/lib/webchat/components/opened-persistent-menu.d.ts +6 -0
- package/lib/webchat/components/opened-persistent-menu.js +72 -0
- package/lib/webchat/components/opened-persistent-menu.js.map +1 -0
- package/lib/webchat/constants.js +13 -0
- package/lib/webchat/constants.js.map +1 -0
- package/lib/webchat/context/actions.js +35 -0
- package/lib/webchat/context/actions.js.map +1 -0
- package/lib/webchat/context/index.d.ts +4 -0
- package/lib/webchat/context/index.js +118 -0
- package/lib/webchat/context/index.js.map +1 -0
- package/lib/webchat/context/messages-reducer.d.ts +6 -0
- package/lib/webchat/context/messages-reducer.js +187 -0
- package/lib/webchat/context/messages-reducer.js.map +1 -0
- package/lib/webchat/context/types.d.ts +84 -0
- package/lib/webchat/context/types.js +4 -0
- package/lib/webchat/context/types.js.map +1 -0
- package/lib/webchat/context/use-webchat.d.ts +46 -0
- package/lib/webchat/context/use-webchat.js +237 -0
- package/lib/webchat/context/use-webchat.js.map +1 -0
- package/lib/webchat/context/webchat-reducer.d.ts +6 -0
- package/lib/webchat/context/webchat-reducer.js +116 -0
- package/lib/webchat/context/webchat-reducer.js.map +1 -0
- package/lib/webchat/cover-component/index.d.ts +6 -0
- package/lib/webchat/cover-component/index.js +32 -0
- package/lib/webchat/cover-component/index.js.map +1 -0
- package/lib/webchat/custom-messages/index.d.ts +1 -0
- package/lib/webchat/custom-messages/index.js +6 -0
- package/lib/webchat/custom-messages/index.js.map +1 -0
- package/lib/webchat/custom-messages/rating/icons/face-angry.d.ts +3 -0
- package/lib/webchat/custom-messages/rating/icons/face-angry.js +27 -0
- package/lib/webchat/custom-messages/rating/icons/face-angry.js.map +1 -0
- package/lib/webchat/custom-messages/rating/icons/face-frown.d.ts +3 -0
- package/lib/webchat/custom-messages/rating/icons/face-frown.js +27 -0
- package/lib/webchat/custom-messages/rating/icons/face-frown.js.map +1 -0
- package/lib/webchat/custom-messages/rating/icons/face-grin-beam.d.ts +3 -0
- package/lib/webchat/custom-messages/rating/icons/face-grin-beam.js +27 -0
- package/lib/webchat/custom-messages/rating/icons/face-grin-beam.js.map +1 -0
- package/lib/webchat/custom-messages/rating/icons/face-meh.d.ts +3 -0
- package/lib/webchat/custom-messages/rating/icons/face-meh.js +27 -0
- package/lib/webchat/custom-messages/rating/icons/face-meh.js.map +1 -0
- package/lib/webchat/custom-messages/rating/icons/face-smile.d.ts +3 -0
- package/lib/webchat/custom-messages/rating/icons/face-smile.js +27 -0
- package/lib/webchat/custom-messages/rating/icons/face-smile.js.map +1 -0
- package/lib/webchat/custom-messages/rating/icons/index.d.ts +6 -0
- package/lib/webchat/custom-messages/rating/icons/index.js +15 -0
- package/lib/webchat/custom-messages/rating/icons/index.js.map +1 -0
- package/lib/webchat/custom-messages/rating/icons/star.d.ts +3 -0
- package/lib/webchat/custom-messages/rating/icons/star.js +27 -0
- package/lib/webchat/custom-messages/rating/icons/star.js.map +1 -0
- package/lib/webchat/custom-messages/rating/index.d.ts +2 -0
- package/lib/webchat/custom-messages/rating/index.js +105 -0
- package/lib/webchat/custom-messages/rating/index.js.map +1 -0
- package/lib/webchat/custom-messages/rating/rating-selector.d.ts +11 -0
- package/lib/webchat/custom-messages/rating/rating-selector.js +57 -0
- package/lib/webchat/custom-messages/rating/rating-selector.js.map +1 -0
- package/lib/webchat/custom-messages/rating/smileys.d.ts +2 -0
- package/lib/webchat/custom-messages/rating/smileys.js +26 -0
- package/lib/webchat/custom-messages/rating/smileys.js.map +1 -0
- package/lib/webchat/custom-messages/rating/stars.d.ts +2 -0
- package/lib/webchat/custom-messages/rating/stars.js +18 -0
- package/lib/webchat/custom-messages/rating/stars.js.map +1 -0
- package/lib/webchat/custom-messages/rating/styles.js +27 -0
- package/lib/webchat/custom-messages/rating/styles.js.map +1 -0
- package/lib/webchat/custom-messages/rating/types.js +9 -0
- package/lib/webchat/custom-messages/rating/types.js.map +1 -0
- package/lib/webchat/devices/index.js +20 -0
- package/lib/webchat/devices/index.js.map +1 -0
- package/lib/webchat/global.d.ts +3 -0
- package/lib/webchat/header/default-header.d.ts +1 -0
- package/lib/webchat/header/default-header.js +75 -0
- package/lib/webchat/header/default-header.js.map +1 -0
- package/lib/webchat/header/index.js +48 -0
- package/lib/webchat/header/index.js.map +1 -0
- package/lib/webchat/header/styles.js +67 -0
- package/lib/webchat/header/styles.js.map +1 -0
- package/lib/webchat/hooks/index.d.ts +10 -0
- package/lib/webchat/hooks/index.js +33 -0
- package/lib/webchat/hooks/index.js.map +1 -0
- package/lib/webchat/hooks/use-component-visible.js +30 -0
- package/lib/webchat/hooks/use-component-visible.js.map +1 -0
- package/lib/webchat/hooks/use-component-will-mount.js +11 -0
- package/lib/webchat/hooks/use-component-will-mount.js.map +1 -0
- package/lib/webchat/hooks/use-device-adapter.js +68 -0
- package/lib/webchat/hooks/use-device-adapter.js.map +1 -0
- package/lib/webchat/hooks/use-previous.js +15 -0
- package/lib/webchat/hooks/use-previous.js.map +1 -0
- package/lib/webchat/hooks/use-scroll-to-bottom.js +29 -0
- package/lib/webchat/hooks/use-scroll-to-bottom.js.map +1 -0
- package/lib/webchat/hooks/use-scrollbar-controller.js +148 -0
- package/lib/webchat/hooks/use-scrollbar-controller.js.map +1 -0
- package/lib/webchat/hooks/use-typing.d.ts +10 -0
- package/lib/webchat/hooks/use-typing.js +42 -0
- package/lib/webchat/hooks/use-typing.js.map +1 -0
- package/lib/webchat/hooks/use-virtual-keyboard-detection.js +32 -0
- package/lib/webchat/hooks/use-virtual-keyboard-detection.js.map +1 -0
- package/lib/webchat/hooks/use-webchat-dimensions.js +44 -0
- package/lib/webchat/hooks/use-webchat-dimensions.js.map +1 -0
- package/lib/webchat/hooks/use-webchat-resizer.js +34 -0
- package/lib/webchat/hooks/use-webchat-resizer.js.map +1 -0
- package/lib/webchat/index-types.d.ts +7 -0
- package/lib/webchat/index-types.js +4 -0
- package/lib/webchat/index-types.js.map +1 -0
- package/lib/webchat/index.d.ts +6 -0
- package/lib/webchat/index.js +23 -0
- package/lib/webchat/index.js.map +1 -0
- package/lib/webchat/input-panel/attachment.d.ts +6 -0
- package/lib/webchat/input-panel/attachment.js +71 -0
- package/lib/webchat/input-panel/attachment.js.map +1 -0
- package/lib/webchat/input-panel/emoji-picker.d.ts +5 -0
- package/lib/webchat/input-panel/emoji-picker.js +50 -0
- package/lib/webchat/input-panel/emoji-picker.js.map +1 -0
- package/lib/webchat/input-panel/index.d.ts +9 -0
- package/lib/webchat/input-panel/index.js +109 -0
- package/lib/webchat/input-panel/index.js.map +1 -0
- package/lib/webchat/input-panel/opened-emoji-picker.d.ts +6 -0
- package/lib/webchat/input-panel/opened-emoji-picker.js +39 -0
- package/lib/webchat/input-panel/opened-emoji-picker.js.map +1 -0
- package/lib/webchat/input-panel/persistent-menu.d.ts +5 -0
- package/lib/webchat/input-panel/persistent-menu.js +42 -0
- package/lib/webchat/input-panel/persistent-menu.js.map +1 -0
- package/lib/webchat/input-panel/send-button.d.ts +5 -0
- package/lib/webchat/input-panel/send-button.js +46 -0
- package/lib/webchat/input-panel/send-button.js.map +1 -0
- package/lib/webchat/input-panel/styles.js +35 -0
- package/lib/webchat/input-panel/styles.js.map +1 -0
- package/lib/webchat/input-panel/textarea.d.ts +10 -0
- package/lib/webchat/input-panel/textarea.js +82 -0
- package/lib/webchat/input-panel/textarea.js.map +1 -0
- package/lib/webchat/input-panel/typing-network-sender.d.ts +52 -0
- package/lib/webchat/input-panel/typing-network-sender.js +141 -0
- package/lib/webchat/input-panel/typing-network-sender.js.map +1 -0
- package/lib/webchat/input-panel/use-typing-chat-event-sender.d.ts +16 -0
- package/lib/webchat/input-panel/use-typing-chat-event-sender.js +56 -0
- package/lib/webchat/input-panel/use-typing-chat-event-sender.js.map +1 -0
- package/lib/webchat/input-panel/use-typing-session.d.ts +15 -0
- package/lib/webchat/input-panel/use-typing-session.js +109 -0
- package/lib/webchat/input-panel/use-typing-session.js.map +1 -0
- package/lib/webchat/message-list/index.d.ts +2 -0
- package/lib/webchat/message-list/index.js +176 -0
- package/lib/webchat/message-list/index.js.map +1 -0
- package/lib/webchat/message-list/intro-message.d.ts +1 -0
- package/lib/webchat/message-list/intro-message.js +49 -0
- package/lib/webchat/message-list/intro-message.js.map +1 -0
- package/lib/webchat/message-list/scroll-button.js +37 -0
- package/lib/webchat/message-list/scroll-button.js.map +1 -0
- package/lib/webchat/message-list/styles.js +63 -0
- package/lib/webchat/message-list/styles.js.map +1 -0
- package/lib/webchat/message-list/unread-messages-banner.js +45 -0
- package/lib/webchat/message-list/unread-messages-banner.js.map +1 -0
- package/lib/webchat/message-list/use-debounce.js +20 -0
- package/lib/webchat/message-list/use-debounce.js.map +1 -0
- package/lib/webchat/message-list/use-notifications.js +30 -0
- package/lib/webchat/message-list/use-notifications.js.map +1 -0
- package/lib/webchat/replies/index.d.ts +1 -0
- package/lib/webchat/replies/index.js +51 -0
- package/lib/webchat/replies/index.js.map +1 -0
- package/lib/webchat/replies/styles.js +27 -0
- package/lib/webchat/replies/styles.js.map +1 -0
- package/lib/webchat/session-view.d.ts +1 -0
- package/lib/webchat/session-view.js +168 -0
- package/lib/webchat/session-view.js.map +1 -0
- package/lib/webchat/styles.js +69 -0
- package/lib/webchat/styles.js.map +1 -0
- package/lib/webchat/theme/default-theme.d.ts +2 -0
- package/lib/webchat/theme/default-theme.js +119 -0
- package/lib/webchat/theme/default-theme.js.map +1 -0
- package/lib/webchat/theme/theme.d.ts +8 -0
- package/lib/webchat/theme/types.d.ts +213 -0
- package/lib/webchat/theme/types.js +4 -0
- package/lib/webchat/theme/types.js.map +1 -0
- package/lib/webchat/tracking.js +47 -0
- package/lib/webchat/tracking.js.map +1 -0
- package/lib/webchat/trigger-button/index.js +59 -0
- package/lib/webchat/trigger-button/index.js.map +1 -0
- package/lib/webchat/trigger-button/styles.js +44 -0
- package/lib/webchat/trigger-button/styles.js.map +1 -0
- package/lib/webchat/typing-indicator/index.js +32 -0
- package/lib/webchat/typing-indicator/index.js.map +1 -0
- package/lib/webchat/typing-indicator/styles.js +52 -0
- package/lib/webchat/typing-indicator/styles.js.map +1 -0
- package/lib/webchat/use-storage-state-hook.js +53 -0
- package/lib/webchat/use-storage-state-hook.js.map +1 -0
- package/lib/webchat/utils.js +15 -0
- package/lib/webchat/utils.js.map +1 -0
- package/lib/webchat/webchat-dev.js +98 -0
- package/lib/webchat/webchat-dev.js.map +1 -0
- package/lib/webchat/webchat.d.ts +3 -0
- package/lib/webchat/webchat.js +729 -0
- package/lib/webchat/webchat.js.map +1 -0
- package/lib/webchat/webview/header.d.ts +1 -0
- package/lib/webchat/webview/header.js +37 -0
- package/lib/webchat/webview/header.js.map +1 -0
- package/lib/webchat/webview/index.d.ts +6 -0
- package/lib/webchat/webview/index.js +116 -0
- package/lib/webchat/webview/index.js.map +1 -0
- package/lib/webchat/webview/styles.js +64 -0
- package/lib/webchat/webview/styles.js.map +1 -0
- package/lib/webchat-app.d.ts +114 -0
- package/lib/webchat-app.js +470 -0
- package/lib/webchat-app.js.map +1 -0
- package/lib/webview-app.js +215 -0
- package/lib/webview-app.js.map +1 -0
- package/package.json +12 -13
- package/src/components/index.ts +14 -14
- package/src/components/multichannel/index.ts +7 -6
- 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/src/webchat/webchat.tsx +1 -0
- package/lib/cjs/app.js +0 -10
- package/lib/cjs/app.js.map +0 -1
- 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.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.js +0 -21
- package/lib/cjs/components/components.js.map +0 -1
- 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.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.js +0 -31
- package/lib/cjs/components/location.js.map +0 -1
- package/lib/cjs/components/markdown.js +0 -172
- package/lib/cjs/components/markdown.js.map +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.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.js +0 -13
- package/lib/cjs/components/message-template.js.map +0 -1
- 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.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.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.js +0 -89
- package/lib/cjs/components/multichannel/multichannel-utils.js.map +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.js +0 -14
- package/lib/cjs/components/multichannel/whatsapp/constants.js.map +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.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.js +0 -13
- package/lib/cjs/components/share-button.js.map +0 -1
- 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.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.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.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.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.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.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.js +0 -51
- package/lib/cjs/components/whatsapp-button-list.js.map +0 -1
- 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.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.js +0 -42
- package/lib/cjs/components/whatsapp-media-carousel.js.map +0 -1
- 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.js +0 -26
- package/lib/cjs/components/whatsapp-product-list.js.map +0 -1
- 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.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.js +0 -30
- package/lib/cjs/components/whatsapp-template/types.js.map +0 -1
- 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.js +0 -64
- package/lib/cjs/message-utils.js.map +0 -1
- 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.js +0 -32
- package/lib/cjs/shared/styles.js.map +0 -1
- package/lib/cjs/util/dom.js +0 -31
- package/lib/cjs/util/dom.js.map +0 -1
- 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.js +0 -29
- package/lib/cjs/util/functional.js.map +0 -1
- 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.js +0 -20
- package/lib/cjs/util/logs.js.map +0 -1
- package/lib/cjs/util/objects.js +0 -45
- package/lib/cjs/util/objects.js.map +0 -1
- package/lib/cjs/util/react.js +0 -45
- package/lib/cjs/util/react.js.map +0 -1
- package/lib/cjs/util/regexs.js +0 -24
- package/lib/cjs/util/regexs.js.map +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.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.js +0 -13
- package/lib/cjs/webchat/constants.js.map +0 -1
- 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.js +0 -25
- package/lib/cjs/webchat/custom-messages/rating/styles.js.map +0 -1
- 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.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.js +0 -23
- package/lib/cjs/webchat/header/index.js.map +0 -1
- 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.js +0 -23
- package/lib/cjs/webchat/hooks/use-component-visible.js.map +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.js +0 -49
- package/lib/cjs/webchat/hooks/use-device-adapter.js.map +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.js +0 -25
- package/lib/cjs/webchat/hooks/use-scroll-to-bottom.js.map +0 -1
- 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.js +0 -26
- package/lib/cjs/webchat/hooks/use-virtual-keyboard-detection.js.map +0 -1
- 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.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.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.js +0 -18
- package/lib/cjs/webchat/message-list/scroll-button.js.map +0 -1
- 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.js +0 -18
- package/lib/cjs/webchat/message-list/unread-messages-banner.js.map +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.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.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.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.js +0 -39
- package/lib/cjs/webchat/tracking.js.map +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.js +0 -40
- package/lib/cjs/webchat/trigger-button/styles.js.map +0 -1
- 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.js +0 -50
- package/lib/cjs/webchat/typing-indicator/styles.js.map +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.js +0 -13
- package/lib/cjs/webchat/utils.js.map +0 -1
- 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.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/webview-app.js +0 -192
- package/lib/cjs/webview-app.js.map +0 -1
- package/lib/esm/app.d.ts +0 -2
- package/lib/esm/app.js +0 -10
- package/lib/esm/app.js.map +0 -1
- package/lib/esm/assets/arrow-down.svg +0 -3
- package/lib/esm/assets/arrow-scroll-down.svg +0 -3
- package/lib/esm/assets/attachment-icon.svg +0 -7
- package/lib/esm/assets/audio.svg +0 -4
- package/lib/esm/assets/botonic_react_logo100x100.png +0 -0
- package/lib/esm/assets/document.svg +0 -3
- package/lib/esm/assets/emojiButton.svg +0 -6
- package/lib/esm/assets/image.svg +0 -4
- package/lib/esm/assets/leftArrow.svg +0 -3
- package/lib/esm/assets/menuButton.svg +0 -3
- package/lib/esm/assets/rightArrow.svg +0 -3
- package/lib/esm/assets/send-button.svg +0 -1
- package/lib/esm/assets/thumbs-down.svg +0 -3
- package/lib/esm/assets/thumbs-up.svg +0 -3
- package/lib/esm/assets/url-icon.png +0 -0
- package/lib/esm/assets/video.svg +0 -3
- package/lib/esm/botonic-tester.d.ts +0 -30
- package/lib/esm/botonic-tester.js +0 -76
- package/lib/esm/botonic-tester.js.map +0 -1
- package/lib/esm/components/audio.d.ts +0 -9
- package/lib/esm/components/audio.js +0 -27
- package/lib/esm/components/audio.js.map +0 -1
- package/lib/esm/components/button/index.d.ts +0 -17
- package/lib/esm/components/button/index.js +0 -139
- package/lib/esm/components/button/index.js.map +0 -1
- package/lib/esm/components/button/styles.d.ts +0 -2
- package/lib/esm/components/button/styles.js +0 -40
- package/lib/esm/components/button/styles.js.map +0 -1
- package/lib/esm/components/buttons-disabler.d.ts +0 -21
- package/lib/esm/components/buttons-disabler.js +0 -94
- package/lib/esm/components/buttons-disabler.js.map +0 -1
- package/lib/esm/components/carousel.d.ts +0 -10
- package/lib/esm/components/carousel.js +0 -119
- package/lib/esm/components/carousel.js.map +0 -1
- package/lib/esm/components/components.d.ts +0 -12
- package/lib/esm/components/components.js +0 -21
- package/lib/esm/components/components.js.map +0 -1
- package/lib/esm/components/constants.d.ts +0 -11
- package/lib/esm/components/constants.js +0 -15
- package/lib/esm/components/constants.js.map +0 -1
- package/lib/esm/components/custom-message.d.ts +0 -16
- package/lib/esm/components/custom-message.js +0 -60
- package/lib/esm/components/custom-message.js.map +0 -1
- package/lib/esm/components/document.d.ts +0 -9
- package/lib/esm/components/document.js +0 -50
- package/lib/esm/components/document.js.map +0 -1
- package/lib/esm/components/element.d.ts +0 -8
- package/lib/esm/components/element.js +0 -56
- package/lib/esm/components/element.js.map +0 -1
- package/lib/esm/components/handoff.d.ts +0 -1
- package/lib/esm/components/handoff.js +0 -54
- package/lib/esm/components/handoff.js.map +0 -1
- package/lib/esm/components/image.d.ts +0 -9
- package/lib/esm/components/image.js +0 -40
- package/lib/esm/components/image.js.map +0 -1
- package/lib/esm/components/index-types.d.ts +0 -83
- package/lib/esm/components/index-types.js +0 -3
- package/lib/esm/components/index-types.js.map +0 -1
- package/lib/esm/components/index.d.ts +0 -33
- package/lib/esm/components/index.js +0 -71
- package/lib/esm/components/index.js.map +0 -1
- package/lib/esm/components/location.d.ts +0 -11
- package/lib/esm/components/location.js +0 -31
- package/lib/esm/components/location.js.map +0 -1
- package/lib/esm/components/markdown.d.ts +0 -7
- package/lib/esm/components/markdown.js +0 -172
- package/lib/esm/components/markdown.js.map +0 -1
- package/lib/esm/components/message/index.d.ts +0 -1
- package/lib/esm/components/message/index.js +0 -174
- package/lib/esm/components/message/index.js.map +0 -1
- package/lib/esm/components/message/message-footer.d.ts +0 -8
- package/lib/esm/components/message/message-footer.js +0 -20
- package/lib/esm/components/message/message-footer.js.map +0 -1
- package/lib/esm/components/message/message-image.d.ts +0 -7
- package/lib/esm/components/message/message-image.js +0 -26
- package/lib/esm/components/message/message-image.js.map +0 -1
- package/lib/esm/components/message/styles.d.ts +0 -35
- package/lib/esm/components/message/styles.js +0 -123
- package/lib/esm/components/message/styles.js.map +0 -1
- package/lib/esm/components/message/timestamps.d.ts +0 -13
- package/lib/esm/components/message/timestamps.js +0 -45
- package/lib/esm/components/message/timestamps.js.map +0 -1
- package/lib/esm/components/message-template.d.ts +0 -1
- package/lib/esm/components/message-template.js +0 -13
- package/lib/esm/components/message-template.js.map +0 -1
- package/lib/esm/components/multichannel/facebook/facebook.d.ts +0 -17
- package/lib/esm/components/multichannel/facebook/facebook.js +0 -48
- package/lib/esm/components/multichannel/facebook/facebook.js.map +0 -1
- package/lib/esm/components/multichannel/index-types.d.ts +0 -42
- package/lib/esm/components/multichannel/index-types.js +0 -3
- package/lib/esm/components/multichannel/index-types.js.map +0 -1
- package/lib/esm/components/multichannel/index.d.ts +0 -11
- package/lib/esm/components/multichannel/index.js +0 -16
- package/lib/esm/components/multichannel/index.js.map +0 -1
- package/lib/esm/components/multichannel/multichannel-button.d.ts +0 -4
- package/lib/esm/components/multichannel/multichannel-button.js +0 -72
- package/lib/esm/components/multichannel/multichannel-button.js.map +0 -1
- package/lib/esm/components/multichannel/multichannel-carousel.d.ts +0 -1
- package/lib/esm/components/multichannel/multichannel-carousel.js +0 -80
- package/lib/esm/components/multichannel/multichannel-carousel.js.map +0 -1
- package/lib/esm/components/multichannel/multichannel-context.d.ts +0 -8
- package/lib/esm/components/multichannel/multichannel-context.js +0 -13
- package/lib/esm/components/multichannel/multichannel-context.js.map +0 -1
- package/lib/esm/components/multichannel/multichannel-reply.d.ts +0 -4
- package/lib/esm/components/multichannel/multichannel-reply.js +0 -27
- package/lib/esm/components/multichannel/multichannel-reply.js.map +0 -1
- package/lib/esm/components/multichannel/multichannel-text.d.ts +0 -1
- package/lib/esm/components/multichannel/multichannel-text.js +0 -184
- package/lib/esm/components/multichannel/multichannel-text.js.map +0 -1
- package/lib/esm/components/multichannel/multichannel-utils.d.ts +0 -36
- package/lib/esm/components/multichannel/multichannel-utils.js +0 -89
- package/lib/esm/components/multichannel/multichannel-utils.js.map +0 -1
- package/lib/esm/components/multichannel/multichannel.d.ts +0 -1
- package/lib/esm/components/multichannel/multichannel.js +0 -63
- package/lib/esm/components/multichannel/multichannel.js.map +0 -1
- package/lib/esm/components/multichannel/whatsapp/constants.d.ts +0 -12
- package/lib/esm/components/multichannel/whatsapp/constants.js +0 -14
- package/lib/esm/components/multichannel/whatsapp/constants.js.map +0 -1
- package/lib/esm/components/multichannel/whatsapp/markdown-meta.d.ts +0 -1
- package/lib/esm/components/multichannel/whatsapp/markdown-meta.js +0 -41
- package/lib/esm/components/multichannel/whatsapp/markdown-meta.js.map +0 -1
- package/lib/esm/components/pic.d.ts +0 -10
- package/lib/esm/components/pic.js +0 -32
- package/lib/esm/components/pic.js.map +0 -1
- package/lib/esm/components/raw.d.ts +0 -9
- package/lib/esm/components/raw.js +0 -45
- package/lib/esm/components/raw.js.map +0 -1
- package/lib/esm/components/reply.d.ts +0 -11
- package/lib/esm/components/reply.js +0 -66
- package/lib/esm/components/reply.js.map +0 -1
- package/lib/esm/components/share-button.d.ts +0 -1
- package/lib/esm/components/share-button.js +0 -13
- package/lib/esm/components/share-button.js.map +0 -1
- package/lib/esm/components/subtitle.d.ts +0 -11
- package/lib/esm/components/subtitle.js +0 -25
- package/lib/esm/components/subtitle.js.map +0 -1
- package/lib/esm/components/system-debug-trace/debug-message.d.ts +0 -7
- package/lib/esm/components/system-debug-trace/debug-message.js +0 -82
- package/lib/esm/components/system-debug-trace/debug-message.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/ai-agent.d.ts +0 -4
- package/lib/esm/components/system-debug-trace/events/ai-agent/ai-agent.js +0 -53
- package/lib/esm/components/system-debug-trace/events/ai-agent/ai-agent.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/executed-tools.d.ts +0 -7
- package/lib/esm/components/system-debug-trace/events/ai-agent/executed-tools.js +0 -21
- package/lib/esm/components/system-debug-trace/events/ai-agent/executed-tools.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/index.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/events/ai-agent/index.js +0 -6
- package/lib/esm/components/system-debug-trace/events/ai-agent/index.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/parse-tools.d.ts +0 -9
- package/lib/esm/components/system-debug-trace/events/ai-agent/parse-tools.js +0 -32
- package/lib/esm/components/system-debug-trace/events/ai-agent/parse-tools.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/rehydrate-ai-agent-event.d.ts +0 -6
- package/lib/esm/components/system-debug-trace/events/ai-agent/rehydrate-ai-agent-event.js +0 -55
- package/lib/esm/components/system-debug-trace/events/ai-agent/rehydrate-ai-agent-event.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/types.d.ts +0 -23
- package/lib/esm/components/system-debug-trace/events/ai-agent/types.js +0 -3
- package/lib/esm/components/system-debug-trace/events/ai-agent/types.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent/use-rehydrated-ai-agent-event.d.ts +0 -8
- package/lib/esm/components/system-debug-trace/events/ai-agent/use-rehydrated-ai-agent-event.js +0 -41
- package/lib/esm/components/system-debug-trace/events/ai-agent/use-rehydrated-ai-agent-event.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/ai-agent-router.d.ts +0 -4
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/ai-agent-router.js +0 -23
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/ai-agent-router.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/index.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/index.js +0 -6
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/index.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/types.d.ts +0 -23
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/types.js +0 -3
- package/lib/esm/components/system-debug-trace/events/ai-agent-router/types.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/bot-action.d.ts +0 -7
- package/lib/esm/components/system-debug-trace/events/bot-action.js +0 -18
- package/lib/esm/components/system-debug-trace/events/bot-action.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/components/guardrail-item.d.ts +0 -14
- package/lib/esm/components/system-debug-trace/events/components/guardrail-item.js +0 -12
- package/lib/esm/components/system-debug-trace/events/components/guardrail-item.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/components/index.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/events/components/index.js +0 -6
- package/lib/esm/components/system-debug-trace/events/components/index.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/components/sources-section.d.ts +0 -11
- package/lib/esm/components/system-debug-trace/events/components/sources-section.js +0 -27
- package/lib/esm/components/system-debug-trace/events/components/sources-section.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/conditional-channel.d.ts +0 -7
- package/lib/esm/components/system-debug-trace/events/conditional-channel.js +0 -18
- package/lib/esm/components/system-debug-trace/events/conditional-channel.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/conditional-country.d.ts +0 -7
- package/lib/esm/components/system-debug-trace/events/conditional-country.js +0 -18
- package/lib/esm/components/system-debug-trace/events/conditional-country.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/conditional-custom.d.ts +0 -10
- package/lib/esm/components/system-debug-trace/events/conditional-custom.js +0 -24
- package/lib/esm/components/system-debug-trace/events/conditional-custom.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/conditional-queue-status.d.ts +0 -11
- package/lib/esm/components/system-debug-trace/events/conditional-queue-status.js +0 -26
- package/lib/esm/components/system-debug-trace/events/conditional-queue-status.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/constants.d.ts +0 -33
- package/lib/esm/components/system-debug-trace/events/constants.js +0 -37
- package/lib/esm/components/system-debug-trace/events/constants.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/fallback.d.ts +0 -9
- package/lib/esm/components/system-debug-trace/events/fallback.js +0 -19
- package/lib/esm/components/system-debug-trace/events/fallback.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/handoff-success.d.ts +0 -11
- package/lib/esm/components/system-debug-trace/events/handoff-success.js +0 -42
- package/lib/esm/components/system-debug-trace/events/handoff-success.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/index.d.ts +0 -14
- package/lib/esm/components/system-debug-trace/events/index.js +0 -18
- package/lib/esm/components/system-debug-trace/events/index.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/keyword.d.ts +0 -10
- package/lib/esm/components/system-debug-trace/events/keyword.js +0 -18
- package/lib/esm/components/system-debug-trace/events/keyword.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/knowledge-bases-types.d.ts +0 -31
- package/lib/esm/components/system-debug-trace/events/knowledge-bases-types.js +0 -3
- package/lib/esm/components/system-debug-trace/events/knowledge-bases-types.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/redirect-flow.d.ts +0 -10
- package/lib/esm/components/system-debug-trace/events/redirect-flow.js +0 -18
- package/lib/esm/components/system-debug-trace/events/redirect-flow.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/smart-intent.d.ts +0 -7
- package/lib/esm/components/system-debug-trace/events/smart-intent.js +0 -17
- package/lib/esm/components/system-debug-trace/events/smart-intent.js.map +0 -1
- package/lib/esm/components/system-debug-trace/events/webview-action-triggered.d.ts +0 -10
- package/lib/esm/components/system-debug-trace/events/webview-action-triggered.js +0 -25
- package/lib/esm/components/system-debug-trace/events/webview-action-triggered.js.map +0 -1
- package/lib/esm/components/system-debug-trace/hooks/use-knowledge-base-info.d.ts +0 -16
- package/lib/esm/components/system-debug-trace/hooks/use-knowledge-base-info.js +0 -111
- package/lib/esm/components/system-debug-trace/hooks/use-knowledge-base-info.js.map +0 -1
- package/lib/esm/components/system-debug-trace/hooks/use-last-label-position.d.ts +0 -9
- package/lib/esm/components/system-debug-trace/hooks/use-last-label-position.js +0 -81
- package/lib/esm/components/system-debug-trace/hooks/use-last-label-position.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/ai-router.d.ts +0 -1
- package/lib/esm/components/system-debug-trace/icons/ai-router.js +0 -14
- package/lib/esm/components/system-debug-trace/icons/ai-router.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/ai-specialist.d.ts +0 -1
- package/lib/esm/components/system-debug-trace/icons/ai-specialist.js +0 -15
- package/lib/esm/components/system-debug-trace/icons/ai-specialist.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/arrow-progress.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/arrow-progress.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/arrow-progress.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/brain.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/brain.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/brain.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/caret-down.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/caret-down.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/caret-down.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/caret-up.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/caret-up.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/caret-up.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/circle-check.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/circle-check.js +0 -11
- package/lib/esm/components/system-debug-trace/icons/circle-check.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/code.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/code.js +0 -11
- package/lib/esm/components/system-debug-trace/icons/code.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/file-pdf.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/file-pdf.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/file-pdf.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/file-word.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/file-word.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/file-word.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/hand.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/hand.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/hand.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/head-set.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/head-set.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/head-set.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/index.d.ts +0 -16
- package/lib/esm/components/system-debug-trace/icons/index.js +0 -20
- package/lib/esm/components/system-debug-trace/icons/index.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/life-ring.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/life-ring.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/life-ring.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/link.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/link.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/link.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/quote-right.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/quote-right.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/quote-right.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/screwdriver-wrench.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/screwdriver-wrench.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/screwdriver-wrench.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/split.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/split.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/split.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/wand.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/wand.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/wand.js.map +0 -1
- package/lib/esm/components/system-debug-trace/icons/window-restore.d.ts +0 -2
- package/lib/esm/components/system-debug-trace/icons/window-restore.js +0 -12
- package/lib/esm/components/system-debug-trace/icons/window-restore.js.map +0 -1
- package/lib/esm/components/system-debug-trace/index.d.ts +0 -10
- package/lib/esm/components/system-debug-trace/index.js +0 -28
- package/lib/esm/components/system-debug-trace/index.js.map +0 -1
- package/lib/esm/components/system-debug-trace/styles.d.ts +0 -23
- package/lib/esm/components/system-debug-trace/styles.js +0 -286
- package/lib/esm/components/system-debug-trace/styles.js.map +0 -1
- package/lib/esm/components/system-debug-trace/types.d.ts +0 -13
- package/lib/esm/components/system-debug-trace/types.js +0 -3
- package/lib/esm/components/system-debug-trace/types.js.map +0 -1
- package/lib/esm/components/text.d.ts +0 -8
- package/lib/esm/components/text.js +0 -52
- package/lib/esm/components/text.js.map +0 -1
- package/lib/esm/components/title.d.ts +0 -11
- package/lib/esm/components/title.js +0 -23
- package/lib/esm/components/title.js.map +0 -1
- package/lib/esm/components/video.d.ts +0 -9
- package/lib/esm/components/video.js +0 -31
- package/lib/esm/components/video.js.map +0 -1
- package/lib/esm/components/webchat-settings.d.ts +0 -19
- package/lib/esm/components/webchat-settings.js +0 -79
- package/lib/esm/components/webchat-settings.js.map +0 -1
- package/lib/esm/components/whatsapp-button-list.d.ts +0 -20
- package/lib/esm/components/whatsapp-button-list.js +0 -51
- package/lib/esm/components/whatsapp-button-list.js.map +0 -1
- package/lib/esm/components/whatsapp-catalog.d.ts +0 -6
- package/lib/esm/components/whatsapp-catalog.js +0 -25
- package/lib/esm/components/whatsapp-catalog.js.map +0 -1
- package/lib/esm/components/whatsapp-cta-url-button.d.ts +0 -40
- package/lib/esm/components/whatsapp-cta-url-button.js +0 -61
- package/lib/esm/components/whatsapp-cta-url-button.js.map +0 -1
- package/lib/esm/components/whatsapp-interactive-media-carousel.d.ts +0 -31
- package/lib/esm/components/whatsapp-interactive-media-carousel.js +0 -25
- package/lib/esm/components/whatsapp-interactive-media-carousel.js.map +0 -1
- package/lib/esm/components/whatsapp-media-carousel.d.ts +0 -46
- package/lib/esm/components/whatsapp-media-carousel.js +0 -42
- package/lib/esm/components/whatsapp-media-carousel.js.map +0 -1
- package/lib/esm/components/whatsapp-product-carousel.d.ts +0 -32
- package/lib/esm/components/whatsapp-product-carousel.js +0 -34
- package/lib/esm/components/whatsapp-product-carousel.js.map +0 -1
- package/lib/esm/components/whatsapp-product-list.d.ts +0 -15
- package/lib/esm/components/whatsapp-product-list.js +0 -26
- package/lib/esm/components/whatsapp-product-list.js.map +0 -1
- package/lib/esm/components/whatsapp-product.d.ts +0 -7
- package/lib/esm/components/whatsapp-product.js +0 -25
- package/lib/esm/components/whatsapp-product.js.map +0 -1
- package/lib/esm/components/whatsapp-request-contact-info.d.ts +0 -4
- package/lib/esm/components/whatsapp-request-contact-info.js +0 -30
- package/lib/esm/components/whatsapp-request-contact-info.js.map +0 -1
- package/lib/esm/components/whatsapp-template/index.d.ts +0 -11
- package/lib/esm/components/whatsapp-template/index.js +0 -25
- package/lib/esm/components/whatsapp-template/index.js.map +0 -1
- package/lib/esm/components/whatsapp-template/types.d.ts +0 -114
- package/lib/esm/components/whatsapp-template/types.js +0 -30
- package/lib/esm/components/whatsapp-template/types.js.map +0 -1
- package/lib/esm/constants.d.ts +0 -163
- package/lib/esm/constants.js +0 -189
- package/lib/esm/constants.js.map +0 -1
- package/lib/esm/contexts.d.ts +0 -17
- package/lib/esm/contexts.js +0 -30
- package/lib/esm/contexts.js.map +0 -1
- package/lib/esm/debug-system-messages.d.ts +0 -177
- package/lib/esm/debug-system-messages.js +0 -219
- package/lib/esm/debug-system-messages.js.map +0 -1
- package/lib/esm/dev-app.d.ts +0 -213
- package/lib/esm/dev-app.js +0 -98
- package/lib/esm/dev-app.js.map +0 -1
- package/lib/esm/index-types.d.ts +0 -187
- package/lib/esm/index-types.js +0 -16
- package/lib/esm/index-types.js.map +0 -1
- package/lib/esm/index.d.ts +0 -12
- package/lib/esm/index.js +0 -26
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/message-utils.d.ts +0 -20
- package/lib/esm/message-utils.js +0 -64
- package/lib/esm/message-utils.js.map +0 -1
- package/lib/esm/msg-to-botonic.d.ts +0 -17
- package/lib/esm/msg-to-botonic.js +0 -142
- package/lib/esm/msg-to-botonic.js.map +0 -1
- package/lib/esm/node-app.d.ts +0 -7
- package/lib/esm/node-app.js +0 -23
- package/lib/esm/node-app.js.map +0 -1
- package/lib/esm/react-bot.d.ts +0 -18
- package/lib/esm/react-bot.js +0 -36
- package/lib/esm/react-bot.js.map +0 -1
- package/lib/esm/shared/styles.d.ts +0 -2
- package/lib/esm/shared/styles.js +0 -32
- package/lib/esm/shared/styles.js.map +0 -1
- package/lib/esm/util/dom.d.ts +0 -4
- package/lib/esm/util/dom.js +0 -31
- package/lib/esm/util/dom.js.map +0 -1
- package/lib/esm/util/environment.d.ts +0 -7
- package/lib/esm/util/environment.js +0 -85
- package/lib/esm/util/environment.js.map +0 -1
- package/lib/esm/util/error-boundary.d.ts +0 -7
- package/lib/esm/util/error-boundary.js +0 -32
- package/lib/esm/util/error-boundary.js.map +0 -1
- package/lib/esm/util/functional.d.ts +0 -3
- package/lib/esm/util/functional.js +0 -29
- package/lib/esm/util/functional.js.map +0 -1
- package/lib/esm/util/i18n.d.ts +0 -26
- package/lib/esm/util/i18n.js +0 -165
- package/lib/esm/util/i18n.js.map +0 -1
- package/lib/esm/util/index.d.ts +0 -10
- package/lib/esm/util/index.js +0 -14
- package/lib/esm/util/index.js.map +0 -1
- package/lib/esm/util/logs.d.ts +0 -2
- package/lib/esm/util/logs.js +0 -20
- package/lib/esm/util/logs.js.map +0 -1
- package/lib/esm/util/objects.d.ts +0 -3
- package/lib/esm/util/objects.js +0 -45
- package/lib/esm/util/objects.js.map +0 -1
- package/lib/esm/util/react.d.ts +0 -12
- package/lib/esm/util/react.js +0 -45
- package/lib/esm/util/react.js.map +0 -1
- package/lib/esm/util/regexs.d.ts +0 -2
- package/lib/esm/util/regexs.js +0 -24
- package/lib/esm/util/regexs.js.map +0 -1
- package/lib/esm/util/strings.d.ts +0 -1
- package/lib/esm/util/strings.js +0 -11
- package/lib/esm/util/strings.js.map +0 -1
- package/lib/esm/util/webchat.d.ts +0 -24
- package/lib/esm/util/webchat.js +0 -100
- package/lib/esm/util/webchat.js.map +0 -1
- package/lib/esm/util/webviews.d.ts +0 -2
- package/lib/esm/util/webviews.js +0 -8
- package/lib/esm/util/webviews.js.map +0 -1
- package/lib/esm/webchat/chat-area/index.d.ts +0 -1
- package/lib/esm/webchat/chat-area/index.js +0 -22
- package/lib/esm/webchat/chat-area/index.js.map +0 -1
- package/lib/esm/webchat/chat-area/styles.d.ts +0 -3
- package/lib/esm/webchat/chat-area/styles.js +0 -13
- package/lib/esm/webchat/chat-area/styles.js.map +0 -1
- package/lib/esm/webchat/components/common.d.ts +0 -1
- package/lib/esm/webchat/components/common.js +0 -13
- package/lib/esm/webchat/components/common.js.map +0 -1
- package/lib/esm/webchat/components/conditional-animation.d.ts +0 -1
- package/lib/esm/webchat/components/conditional-animation.js +0 -16
- package/lib/esm/webchat/components/conditional-animation.js.map +0 -1
- package/lib/esm/webchat/components/opened-persistent-menu.d.ts +0 -6
- package/lib/esm/webchat/components/opened-persistent-menu.js +0 -37
- package/lib/esm/webchat/components/opened-persistent-menu.js.map +0 -1
- package/lib/esm/webchat/constants.d.ts +0 -8
- package/lib/esm/webchat/constants.js +0 -13
- package/lib/esm/webchat/constants.js.map +0 -1
- package/lib/esm/webchat/context/actions.d.ts +0 -30
- package/lib/esm/webchat/context/actions.js +0 -36
- package/lib/esm/webchat/context/actions.js.map +0 -1
- package/lib/esm/webchat/context/index.d.ts +0 -4
- package/lib/esm/webchat/context/index.js +0 -102
- package/lib/esm/webchat/context/index.js.map +0 -1
- package/lib/esm/webchat/context/messages-reducer.d.ts +0 -6
- package/lib/esm/webchat/context/messages-reducer.js +0 -175
- package/lib/esm/webchat/context/messages-reducer.js.map +0 -1
- package/lib/esm/webchat/context/types.d.ts +0 -84
- package/lib/esm/webchat/context/types.js +0 -3
- package/lib/esm/webchat/context/types.js.map +0 -1
- package/lib/esm/webchat/context/use-webchat.d.ts +0 -46
- package/lib/esm/webchat/context/use-webchat.js +0 -195
- package/lib/esm/webchat/context/use-webchat.js.map +0 -1
- package/lib/esm/webchat/context/webchat-reducer.d.ts +0 -6
- package/lib/esm/webchat/context/webchat-reducer.js +0 -57
- package/lib/esm/webchat/context/webchat-reducer.js.map +0 -1
- package/lib/esm/webchat/cover-component/index.d.ts +0 -6
- package/lib/esm/webchat/cover-component/index.js +0 -21
- package/lib/esm/webchat/cover-component/index.js.map +0 -1
- package/lib/esm/webchat/custom-messages/index.d.ts +0 -1
- package/lib/esm/webchat/custom-messages/index.js +0 -7
- package/lib/esm/webchat/custom-messages/index.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-angry.d.ts +0 -3
- package/lib/esm/webchat/custom-messages/rating/icons/face-angry.js +0 -9
- package/lib/esm/webchat/custom-messages/rating/icons/face-angry.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-frown.d.ts +0 -3
- package/lib/esm/webchat/custom-messages/rating/icons/face-frown.js +0 -9
- package/lib/esm/webchat/custom-messages/rating/icons/face-frown.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-grin-beam.d.ts +0 -3
- package/lib/esm/webchat/custom-messages/rating/icons/face-grin-beam.js +0 -9
- package/lib/esm/webchat/custom-messages/rating/icons/face-grin-beam.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-meh.d.ts +0 -3
- package/lib/esm/webchat/custom-messages/rating/icons/face-meh.js +0 -9
- package/lib/esm/webchat/custom-messages/rating/icons/face-meh.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/icons/face-smile.d.ts +0 -3
- package/lib/esm/webchat/custom-messages/rating/icons/face-smile.js +0 -9
- package/lib/esm/webchat/custom-messages/rating/icons/face-smile.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/icons/index.d.ts +0 -6
- package/lib/esm/webchat/custom-messages/rating/icons/index.js +0 -10
- package/lib/esm/webchat/custom-messages/rating/icons/index.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/icons/star.d.ts +0 -3
- package/lib/esm/webchat/custom-messages/rating/icons/star.js +0 -9
- package/lib/esm/webchat/custom-messages/rating/icons/star.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/index.d.ts +0 -2
- package/lib/esm/webchat/custom-messages/rating/index.js +0 -56
- package/lib/esm/webchat/custom-messages/rating/index.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/rating-selector.d.ts +0 -11
- package/lib/esm/webchat/custom-messages/rating/rating-selector.js +0 -26
- package/lib/esm/webchat/custom-messages/rating/rating-selector.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/smileys.d.ts +0 -2
- package/lib/esm/webchat/custom-messages/rating/smileys.js +0 -19
- package/lib/esm/webchat/custom-messages/rating/smileys.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/stars.d.ts +0 -2
- package/lib/esm/webchat/custom-messages/rating/stars.js +0 -11
- package/lib/esm/webchat/custom-messages/rating/stars.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/styles.d.ts +0 -6
- package/lib/esm/webchat/custom-messages/rating/styles.js +0 -25
- package/lib/esm/webchat/custom-messages/rating/styles.js.map +0 -1
- package/lib/esm/webchat/custom-messages/rating/types.d.ts +0 -13
- package/lib/esm/webchat/custom-messages/rating/types.js +0 -9
- package/lib/esm/webchat/custom-messages/rating/types.js.map +0 -1
- package/lib/esm/webchat/devices/index.d.ts +0 -11
- package/lib/esm/webchat/devices/index.js +0 -23
- package/lib/esm/webchat/devices/index.js.map +0 -1
- package/lib/esm/webchat/header/default-header.d.ts +0 -1
- package/lib/esm/webchat/header/default-header.js +0 -25
- package/lib/esm/webchat/header/default-header.js.map +0 -1
- package/lib/esm/webchat/header/index.d.ts +0 -1
- package/lib/esm/webchat/header/index.js +0 -23
- package/lib/esm/webchat/header/index.js.map +0 -1
- package/lib/esm/webchat/header/styles.d.ts +0 -7
- package/lib/esm/webchat/header/styles.js +0 -63
- package/lib/esm/webchat/header/styles.js.map +0 -1
- package/lib/esm/webchat/hooks/index.d.ts +0 -10
- package/lib/esm/webchat/hooks/index.js +0 -24
- package/lib/esm/webchat/hooks/index.js.map +0 -1
- package/lib/esm/webchat/hooks/use-component-visible.d.ts +0 -7
- package/lib/esm/webchat/hooks/use-component-visible.js +0 -23
- package/lib/esm/webchat/hooks/use-component-visible.js.map +0 -1
- package/lib/esm/webchat/hooks/use-component-will-mount.d.ts +0 -1
- package/lib/esm/webchat/hooks/use-component-will-mount.js +0 -9
- package/lib/esm/webchat/hooks/use-component-will-mount.js.map +0 -1
- package/lib/esm/webchat/hooks/use-device-adapter.d.ts +0 -3
- package/lib/esm/webchat/hooks/use-device-adapter.js +0 -49
- package/lib/esm/webchat/hooks/use-device-adapter.js.map +0 -1
- package/lib/esm/webchat/hooks/use-previous.d.ts +0 -1
- package/lib/esm/webchat/hooks/use-previous.js +0 -12
- package/lib/esm/webchat/hooks/use-previous.js.map +0 -1
- package/lib/esm/webchat/hooks/use-scroll-to-bottom.d.ts +0 -9
- package/lib/esm/webchat/hooks/use-scroll-to-bottom.js +0 -25
- package/lib/esm/webchat/hooks/use-scroll-to-bottom.js.map +0 -1
- package/lib/esm/webchat/hooks/use-scrollbar-controller.d.ts +0 -6
- package/lib/esm/webchat/hooks/use-scrollbar-controller.js +0 -143
- package/lib/esm/webchat/hooks/use-scrollbar-controller.js.map +0 -1
- package/lib/esm/webchat/hooks/use-typing.d.ts +0 -10
- package/lib/esm/webchat/hooks/use-typing.js +0 -36
- package/lib/esm/webchat/hooks/use-typing.js.map +0 -1
- package/lib/esm/webchat/hooks/use-virtual-keyboard-detection.d.ts +0 -3
- package/lib/esm/webchat/hooks/use-virtual-keyboard-detection.js +0 -26
- package/lib/esm/webchat/hooks/use-virtual-keyboard-detection.js.map +0 -1
- package/lib/esm/webchat/hooks/use-webchat-dimensions.d.ts +0 -4
- package/lib/esm/webchat/hooks/use-webchat-dimensions.js +0 -41
- package/lib/esm/webchat/hooks/use-webchat-dimensions.js.map +0 -1
- package/lib/esm/webchat/hooks/use-webchat-resizer.d.ts +0 -4
- package/lib/esm/webchat/hooks/use-webchat-resizer.js +0 -34
- package/lib/esm/webchat/hooks/use-webchat-resizer.js.map +0 -1
- package/lib/esm/webchat/index-types.d.ts +0 -7
- package/lib/esm/webchat/index-types.js +0 -3
- package/lib/esm/webchat/index-types.js.map +0 -1
- package/lib/esm/webchat/index.d.ts +0 -6
- package/lib/esm/webchat/index.js +0 -20
- package/lib/esm/webchat/index.js.map +0 -1
- package/lib/esm/webchat/input-panel/attachment.d.ts +0 -6
- package/lib/esm/webchat/input-panel/attachment.js +0 -30
- package/lib/esm/webchat/input-panel/attachment.js.map +0 -1
- package/lib/esm/webchat/input-panel/emoji-picker.d.ts +0 -5
- package/lib/esm/webchat/input-panel/emoji-picker.js +0 -29
- package/lib/esm/webchat/input-panel/emoji-picker.js.map +0 -1
- package/lib/esm/webchat/input-panel/index.d.ts +0 -9
- package/lib/esm/webchat/input-panel/index.js +0 -51
- package/lib/esm/webchat/input-panel/index.js.map +0 -1
- package/lib/esm/webchat/input-panel/opened-emoji-picker.d.ts +0 -6
- package/lib/esm/webchat/input-panel/opened-emoji-picker.js +0 -15
- package/lib/esm/webchat/input-panel/opened-emoji-picker.js.map +0 -1
- package/lib/esm/webchat/input-panel/persistent-menu.d.ts +0 -5
- package/lib/esm/webchat/input-panel/persistent-menu.js +0 -21
- package/lib/esm/webchat/input-panel/persistent-menu.js.map +0 -1
- package/lib/esm/webchat/input-panel/send-button.d.ts +0 -5
- package/lib/esm/webchat/input-panel/send-button.js +0 -25
- package/lib/esm/webchat/input-panel/send-button.js.map +0 -1
- package/lib/esm/webchat/input-panel/styles.d.ts +0 -3
- package/lib/esm/webchat/input-panel/styles.js +0 -31
- package/lib/esm/webchat/input-panel/styles.js.map +0 -1
- package/lib/esm/webchat/input-panel/textarea.d.ts +0 -10
- package/lib/esm/webchat/input-panel/textarea.js +0 -52
- package/lib/esm/webchat/input-panel/textarea.js.map +0 -1
- package/lib/esm/webchat/input-panel/typing-network-sender.d.ts +0 -52
- package/lib/esm/webchat/input-panel/typing-network-sender.js +0 -122
- package/lib/esm/webchat/input-panel/typing-network-sender.js.map +0 -1
- package/lib/esm/webchat/input-panel/use-typing-chat-event-sender.d.ts +0 -16
- package/lib/esm/webchat/input-panel/use-typing-chat-event-sender.js +0 -45
- package/lib/esm/webchat/input-panel/use-typing-chat-event-sender.js.map +0 -1
- package/lib/esm/webchat/input-panel/use-typing-session.d.ts +0 -15
- package/lib/esm/webchat/input-panel/use-typing-session.js +0 -98
- package/lib/esm/webchat/input-panel/use-typing-session.js.map +0 -1
- package/lib/esm/webchat/message-list/index.d.ts +0 -1
- package/lib/esm/webchat/message-list/index.js +0 -116
- package/lib/esm/webchat/message-list/index.js.map +0 -1
- package/lib/esm/webchat/message-list/intro-message.d.ts +0 -1
- package/lib/esm/webchat/message-list/intro-message.js +0 -24
- package/lib/esm/webchat/message-list/intro-message.js.map +0 -1
- package/lib/esm/webchat/message-list/scroll-button.d.ts +0 -5
- package/lib/esm/webchat/message-list/scroll-button.js +0 -18
- package/lib/esm/webchat/message-list/scroll-button.js.map +0 -1
- package/lib/esm/webchat/message-list/styles.d.ts +0 -9
- package/lib/esm/webchat/message-list/styles.js +0 -61
- package/lib/esm/webchat/message-list/styles.js.map +0 -1
- package/lib/esm/webchat/message-list/unread-messages-banner.d.ts +0 -7
- package/lib/esm/webchat/message-list/unread-messages-banner.js +0 -18
- package/lib/esm/webchat/message-list/unread-messages-banner.js.map +0 -1
- package/lib/esm/webchat/message-list/use-debounce.d.ts +0 -1
- package/lib/esm/webchat/message-list/use-debounce.js +0 -17
- package/lib/esm/webchat/message-list/use-debounce.js.map +0 -1
- package/lib/esm/webchat/message-list/use-notifications.d.ts +0 -7
- package/lib/esm/webchat/message-list/use-notifications.js +0 -23
- package/lib/esm/webchat/message-list/use-notifications.js.map +0 -1
- package/lib/esm/webchat/replies/index.d.ts +0 -1
- package/lib/esm/webchat/replies/index.js +0 -31
- package/lib/esm/webchat/replies/index.js.map +0 -1
- package/lib/esm/webchat/replies/styles.d.ts +0 -8
- package/lib/esm/webchat/replies/styles.js +0 -25
- package/lib/esm/webchat/replies/styles.js.map +0 -1
- package/lib/esm/webchat/session-view.d.ts +0 -1
- package/lib/esm/webchat/session-view.js +0 -103
- package/lib/esm/webchat/session-view.js.map +0 -1
- package/lib/esm/webchat/styles.d.ts +0 -4
- package/lib/esm/webchat/styles.js +0 -65
- package/lib/esm/webchat/styles.js.map +0 -1
- package/lib/esm/webchat/theme/default-theme.d.ts +0 -2
- package/lib/esm/webchat/theme/default-theme.js +0 -104
- package/lib/esm/webchat/theme/default-theme.js.map +0 -1
- package/lib/esm/webchat/theme/types.d.ts +0 -213
- package/lib/esm/webchat/theme/types.js +0 -3
- package/lib/esm/webchat/theme/types.js.map +0 -1
- package/lib/esm/webchat/tracking.d.ts +0 -7
- package/lib/esm/webchat/tracking.js +0 -39
- package/lib/esm/webchat/tracking.js.map +0 -1
- package/lib/esm/webchat/trigger-button/index.d.ts +0 -1
- package/lib/esm/webchat/trigger-button/index.js +0 -34
- package/lib/esm/webchat/trigger-button/index.js.map +0 -1
- package/lib/esm/webchat/trigger-button/styles.d.ts +0 -3
- package/lib/esm/webchat/trigger-button/styles.js +0 -40
- package/lib/esm/webchat/trigger-button/styles.js.map +0 -1
- package/lib/esm/webchat/typing-indicator/index.d.ts +0 -2
- package/lib/esm/webchat/typing-indicator/index.js +0 -10
- package/lib/esm/webchat/typing-indicator/index.js.map +0 -1
- package/lib/esm/webchat/typing-indicator/styles.d.ts +0 -7
- package/lib/esm/webchat/typing-indicator/styles.js +0 -50
- package/lib/esm/webchat/typing-indicator/styles.js.map +0 -1
- package/lib/esm/webchat/use-storage-state-hook.d.ts +0 -1
- package/lib/esm/webchat/use-storage-state-hook.js +0 -40
- package/lib/esm/webchat/use-storage-state-hook.js.map +0 -1
- package/lib/esm/webchat/utils.d.ts +0 -2
- package/lib/esm/webchat/utils.js +0 -13
- package/lib/esm/webchat/utils.js.map +0 -1
- package/lib/esm/webchat/webchat-dev.d.ts +0 -6
- package/lib/esm/webchat/webchat-dev.js +0 -56
- package/lib/esm/webchat/webchat-dev.js.map +0 -1
- package/lib/esm/webchat/webchat.d.ts +0 -3
- package/lib/esm/webchat/webchat.js +0 -560
- package/lib/esm/webchat/webchat.js.map +0 -1
- package/lib/esm/webchat/webview/header.d.ts +0 -1
- package/lib/esm/webchat/webview/header.js +0 -18
- package/lib/esm/webchat/webview/header.js.map +0 -1
- package/lib/esm/webchat/webview/index.d.ts +0 -6
- package/lib/esm/webchat/webview/index.js +0 -82
- package/lib/esm/webchat/webview/index.js.map +0 -1
- package/lib/esm/webchat/webview/styles.d.ts +0 -7
- package/lib/esm/webchat/webview/styles.js +0 -60
- package/lib/esm/webchat/webview/styles.js.map +0 -1
- package/lib/esm/webchat-app.d.ts +0 -114
- package/lib/esm/webchat-app.js +0 -407
- package/lib/esm/webchat-app.js.map +0 -1
- package/lib/esm/webchat.template.html +0 -37
- package/lib/esm/webview-app.d.ts +0 -7
- package/lib/esm/webview-app.js +0 -192
- package/lib/esm/webview-app.js.map +0 -1
- package/lib/esm/webview.template.html +0 -39
- /package/lib/{cjs/app.d.ts → app.d.ts} +0 -0
- /package/lib/{cjs/assets → assets}/arrow-down.svg +0 -0
- /package/lib/{cjs/assets → assets}/arrow-scroll-down.svg +0 -0
- /package/lib/{cjs/assets → assets}/attachment-icon.svg +0 -0
- /package/lib/{cjs/assets → assets}/audio.svg +0 -0
- /package/lib/{cjs/assets → assets}/botonic_react_logo100x100.png +0 -0
- /package/lib/{cjs/assets → assets}/document.svg +0 -0
- /package/lib/{cjs/assets → assets}/emojiButton.svg +0 -0
- /package/lib/{cjs/assets → assets}/image.svg +0 -0
- /package/lib/{cjs/assets → assets}/leftArrow.svg +0 -0
- /package/lib/{cjs/assets → assets}/menuButton.svg +0 -0
- /package/lib/{cjs/assets → assets}/rightArrow.svg +0 -0
- /package/lib/{cjs/assets → assets}/send-button.svg +0 -0
- /package/lib/{cjs/assets → assets}/thumbs-down.svg +0 -0
- /package/lib/{cjs/assets → assets}/thumbs-up.svg +0 -0
- /package/lib/{cjs/assets → assets}/url-icon.png +0 -0
- /package/lib/{cjs/assets → assets}/video.svg +0 -0
- /package/lib/{cjs/botonic-tester.d.ts → botonic-tester.d.ts} +0 -0
- /package/lib/{cjs/components → components}/button/styles.d.ts +0 -0
- /package/lib/{cjs/components → components}/components.d.ts +0 -0
- /package/lib/{cjs/components → components}/constants.d.ts +0 -0
- /package/lib/{cjs/components → components}/element.d.ts +0 -0
- /package/lib/{cjs/components → components}/location.d.ts +0 -0
- /package/lib/{cjs/components → components}/markdown.d.ts +0 -0
- /package/lib/{cjs/components → components}/message/index.d.ts +0 -0
- /package/lib/{cjs/components → components}/message/styles.d.ts +0 -0
- /package/lib/{cjs/components → components}/message-template.d.ts +0 -0
- /package/lib/{cjs/components → components}/multichannel/facebook/facebook.d.ts +0 -0
- /package/lib/{cjs/components → components}/multichannel/index-types.d.ts +0 -0
- /package/lib/{cjs/components → components}/multichannel/multichannel-context.d.ts +0 -0
- /package/lib/{cjs/components → components}/multichannel/multichannel-utils.d.ts +0 -0
- /package/lib/{cjs/components → components}/multichannel/multichannel.d.ts +0 -0
- /package/lib/{cjs/components → components}/multichannel/whatsapp/constants.d.ts +0 -0
- /package/lib/{cjs/components → components}/multichannel/whatsapp/markdown-meta.d.ts +0 -0
- /package/lib/{cjs/components → components}/pic.d.ts +0 -0
- /package/lib/{cjs/components → components}/share-button.d.ts +0 -0
- /package/lib/{cjs/components → components}/subtitle.d.ts +0 -0
- /package/lib/{cjs/components → components}/system-debug-trace/events/components/guardrail-item.d.ts +0 -0
- /package/lib/{cjs/components → components}/system-debug-trace/events/constants.d.ts +0 -0
- /package/lib/{cjs/components → components}/system-debug-trace/events/knowledge-bases-types.d.ts +0 -0
- /package/lib/{cjs/components → components}/system-debug-trace/hooks/use-last-label-position.d.ts +0 -0
- /package/lib/{cjs/components → components}/system-debug-trace/styles.d.ts +0 -0
- /package/lib/{cjs/components → components}/title.d.ts +0 -0
- /package/lib/{cjs/components → components}/whatsapp-button-list.d.ts +0 -0
- /package/lib/{cjs/components → components}/whatsapp-catalog.d.ts +0 -0
- /package/lib/{cjs/components → components}/whatsapp-cta-url-button.d.ts +0 -0
- /package/lib/{cjs/components → components}/whatsapp-media-carousel.d.ts +0 -0
- /package/lib/{cjs/components → components}/whatsapp-product-carousel.d.ts +0 -0
- /package/lib/{cjs/components → components}/whatsapp-product-list.d.ts +0 -0
- /package/lib/{cjs/components → components}/whatsapp-product.d.ts +0 -0
- /package/lib/{cjs/components → components}/whatsapp-request-contact-info.d.ts +0 -0
- /package/lib/{cjs/components → components}/whatsapp-template/types.d.ts +0 -0
- /package/lib/{cjs/constants.d.ts → constants.d.ts} +0 -0
- /package/lib/{cjs/message-utils.d.ts → message-utils.d.ts} +0 -0
- /package/lib/{cjs/msg-to-botonic.d.ts → msg-to-botonic.d.ts} +0 -0
- /package/lib/{cjs/shared → shared}/styles.d.ts +0 -0
- /package/lib/{cjs/util → util}/dom.d.ts +0 -0
- /package/lib/{cjs/util → util}/environment.d.ts +0 -0
- /package/lib/{cjs/util → util}/functional.d.ts +0 -0
- /package/lib/{cjs/util → util}/i18n.d.ts +0 -0
- /package/lib/{cjs/util → util}/logs.d.ts +0 -0
- /package/lib/{cjs/util → util}/objects.d.ts +0 -0
- /package/lib/{cjs/util → util}/react.d.ts +0 -0
- /package/lib/{cjs/util → util}/regexs.d.ts +0 -0
- /package/lib/{cjs/util → util}/strings.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/chat-area/styles.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/constants.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/context/actions.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/custom-messages/rating/styles.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/custom-messages/rating/types.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/devices/index.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/header/index.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/header/styles.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/hooks/use-component-visible.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/hooks/use-component-will-mount.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/hooks/use-device-adapter.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/hooks/use-previous.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/hooks/use-scroll-to-bottom.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/hooks/use-scrollbar-controller.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/hooks/use-virtual-keyboard-detection.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/hooks/use-webchat-dimensions.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/hooks/use-webchat-resizer.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/input-panel/styles.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/message-list/scroll-button.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/message-list/styles.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/message-list/unread-messages-banner.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/message-list/use-debounce.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/message-list/use-notifications.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/replies/styles.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/styles.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/tracking.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/trigger-button/index.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/trigger-button/styles.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/typing-indicator/index.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/typing-indicator/styles.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/use-storage-state-hook.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/utils.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/webchat-dev.d.ts +0 -0
- /package/lib/{cjs/webchat → webchat}/webview/styles.d.ts +0 -0
- /package/lib/{cjs/webchat.template.html → webchat.template.html} +0 -0
- /package/lib/{cjs/webview-app.d.ts → webview-app.d.ts} +0 -0
- /package/lib/{cjs/webview.template.html → webview.template.html} +0 -0
package/lib/react-bot.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CoreBot } from "@botonic/core";
|
|
3
|
+
import { Text } from "./components/text.js";
|
|
4
|
+
import { RequestContext } from "./contexts.js";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ReactBot extends CoreBot {
|
|
15
|
+
async renderReactActions({ request, actions }) {
|
|
16
|
+
const renderedActions = [];
|
|
17
|
+
for (const Action of actions){
|
|
18
|
+
if (Action) {
|
|
19
|
+
const props = Action.botonicInit ? await Action.botonicInit(request) : {};
|
|
20
|
+
const renderedAction = /*#__PURE__*/ jsx(RequestContext.Provider, {
|
|
21
|
+
value: request,
|
|
22
|
+
children: /*#__PURE__*/ jsx(Action, {
|
|
23
|
+
...props
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
renderedActions.push(renderedAction);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return renderedActions;
|
|
30
|
+
}
|
|
31
|
+
constructor(options){
|
|
32
|
+
super({
|
|
33
|
+
defaultRoutes: [
|
|
34
|
+
{
|
|
35
|
+
path: '404',
|
|
36
|
+
action: ()=>/*#__PURE__*/ jsx(Text, {
|
|
37
|
+
children: "I don't understand you"
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
renderer: (args)=>this.renderReactActions(args),
|
|
42
|
+
...options
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { ReactBot };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=react-bot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-bot.js","sources":["../src/react-bot.tsx"],"sourcesContent":["import { CoreBot } from '@botonic/core'\nimport type React from 'react'\n\nimport { Text } from './components/text'\nimport { RequestContext } from './contexts'\nimport type { ActionRequest } from './index-types'\n\ntype ActionComponentType<P = any> = React.ComponentType<P> & {\n botonicInit?: (request: ActionRequest) => Promise<P>\n contextType?: React.Context<typeof RequestContext>\n render: (props: P) => JSX.Element\n}\ninterface RenderReactActionsArgs {\n request: ActionRequest\n actions: ActionComponentType[]\n}\n\nexport class ReactBot extends CoreBot {\n constructor(options: any) {\n super({\n defaultRoutes: [\n {\n path: '404',\n action: () => <Text>I don't understand you</Text>, // eslint-disable-line\n },\n ],\n renderer: (args: RenderReactActionsArgs) => this.renderReactActions(args),\n ...options,\n })\n }\n\n async renderReactActions({ request, actions }: RenderReactActionsArgs) {\n const renderedActions: JSX.Element[] = []\n\n for (const Action of actions) {\n if (Action) {\n const props = Action.botonicInit\n ? await Action.botonicInit(request)\n : {}\n const renderedAction: JSX.Element = (\n <RequestContext.Provider value={request}>\n <Action {...props} />\n </RequestContext.Provider>\n )\n renderedActions.push(renderedAction)\n }\n }\n\n return renderedActions\n }\n}\n"],"names":["CoreBot","Text","RequestContext","ReactBot","request","actions","renderedActions","Action","props","renderedAction","options","args"],"mappings":";;;;;;;;;;AAAuC;AAGC;AACG;AAapC,MAAMG,QAAQA,SAASH,OAAOA;IAcnC,MAAM,mBAAmB,EAAEI,OAAO,EAAEC,OAAO,EAA0B,EAAE;QACrE,MAAMC,kBAAiC,EAAE;QAEzC,KAAK,MAAMC,UAAUF,QAAS;YAC5B,IAAIE,QAAQ;gBACV,MAAMC,QAAQD,OAAO,WAAW,GAC5B,MAAMA,OAAO,WAAW,CAACH,WACzB,CAAC;gBACL,MAAMK,+BACJ,IAACP,uBAAuB;oBAAC,OAAOE;8BAC9B,kBAACG;wBAAQ,GAAGC,KAAK;;;gBAGrBF,gBAAgB,IAAI,CAACG;YACvB;QACF;QAEA,OAAOH;IACT;IA/BA,YAAYI,OAAY,CAAE;QACxB,KAAK,CAAC;YACJ,eAAe;gBACb;oBACE,MAAM;oBACN,QAAQ,kBAAM,IAACT,IAAIA;sCAAC;;gBACtB;aACD;YACD,UAAU,CAACU,OAAiC,IAAI,CAAC,kBAAkB,CAACA;YACpE,GAAGD,OAAO;QACZ;IACF;AAqBF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import styled_components, { keyframes } from "styled-components";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
const fadeIn = keyframes`
|
|
6
|
+
from { opacity: 0; }
|
|
7
|
+
to { opacity: 1; }
|
|
8
|
+
`;
|
|
9
|
+
const Fade = styled_components.div`
|
|
10
|
+
opacity: 0;
|
|
11
|
+
animation: ${fadeIn} 0.8s forwards;
|
|
12
|
+
`;
|
|
13
|
+
const scaleUp = keyframes`
|
|
14
|
+
from { transform: scale(1); }
|
|
15
|
+
to { transform: scale(1.2); }
|
|
16
|
+
`;
|
|
17
|
+
const scaleDown = keyframes`
|
|
18
|
+
from { transform: scale(1.2); }
|
|
19
|
+
to { transform: scale(1); }
|
|
20
|
+
`;
|
|
21
|
+
const Scale = styled_components.div`
|
|
22
|
+
display: inline-block;
|
|
23
|
+
animation-fill-mode: forwards;
|
|
24
|
+
&:hover {
|
|
25
|
+
animation: ${scaleUp} 0.2s forwards;
|
|
26
|
+
}
|
|
27
|
+
&:not():hover {
|
|
28
|
+
animation: ${scaleDown} 0.2s forwards;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
export { Fade, Scale };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared/styles.js","sources":["../../src/shared/styles.ts"],"sourcesContent":["import styled, { keyframes } from 'styled-components'\n\nconst fadeIn = keyframes`\n from { opacity: 0; }\n to { opacity: 1; }\n`\n\nexport const Fade = styled.div`\n opacity: 0;\n animation: ${fadeIn} 0.8s forwards;\n`\n\nconst scaleUp = keyframes`\n from { transform: scale(1); }\n to { transform: scale(1.2); }\n`\n\nconst scaleDown = keyframes`\n from { transform: scale(1.2); }\n to { transform: scale(1); }\n`\n\nexport const Scale = styled.div`\n display: inline-block;\n animation-fill-mode: forwards;\n &:hover {\n animation: ${scaleUp} 0.2s forwards;\n }\n &:not():hover {\n animation: ${scaleDown} 0.2s forwards;\n }\n`\n"],"names":["styled","keyframes","fadeIn","Fade","scaleUp","scaleDown","Scale"],"mappings":";;;AAAqD;AAErD,MAAME,MAAMA,GAAGD,SAAS,CAAC;;;AAGzB,CAAC;AAEM,MAAME,IAAIA,GAAGH,qBAAU,CAAC;;aAElB,EAAEE,MAAMA,CAAC;AACtB,CAAC;AAED,MAAME,OAAOA,GAAGH,SAAS,CAAC;;;AAG1B,CAAC;AAED,MAAMI,SAASA,GAAGJ,SAAS,CAAC;;;AAG5B,CAAC;AAEM,MAAMK,KAAKA,GAAGN,qBAAU,CAAC;;;;eAIjB,EAAEI,OAAOA,CAAC;;;eAGV,EAAEC,SAASA,CAAC;;AAE3B,CAAC"}
|
package/lib/util/dom.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BotonicContainerId } from "../webchat/constants.js";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
const getWebchatElement = (host)=>host?.querySelector(`#${BotonicContainerId.Webchat}`);
|
|
6
|
+
const getScrollableMessagesListElement = (host)=>host?.querySelector(`#${BotonicContainerId.ScrollableMessagesList}`);
|
|
7
|
+
// https://stackoverflow.com/questions/9457891/how-to-detect-if-domcontentloaded-was-fired
|
|
8
|
+
const onDOMLoaded = (callback)=>{
|
|
9
|
+
if (/complete|interactive|loaded/.test(document.readyState)) {
|
|
10
|
+
// In case the document has finished parsing, document's readyState will
|
|
11
|
+
// be one of "complete", "interactive" or (non-standard) "loaded".
|
|
12
|
+
callback();
|
|
13
|
+
} else {
|
|
14
|
+
// The document is not ready yet, so wait for the DOMContentLoaded event
|
|
15
|
+
document.addEventListener('DOMContentLoaded', callback, false);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const isShadowDOMSupported = ()=>{
|
|
19
|
+
try {
|
|
20
|
+
return document.head.createShadowRoot || document.head.attachShadow;
|
|
21
|
+
} catch (_e) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { getScrollableMessagesListElement, getWebchatElement, isShadowDOMSupported, onDOMLoaded };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=dom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util/dom.js","sources":["../../src/util/dom.js"],"sourcesContent":["import { BotonicContainerId } from '../webchat/constants'\n\nexport const getWebchatElement = host =>\n host?.querySelector(`#${BotonicContainerId.Webchat}`)\n\nexport const getScrollableMessagesListElement = host =>\n host?.querySelector(`#${BotonicContainerId.ScrollableMessagesList}`)\n\n// https://stackoverflow.com/questions/9457891/how-to-detect-if-domcontentloaded-was-fired\nexport const onDOMLoaded = callback => {\n if (/complete|interactive|loaded/.test(document.readyState)) {\n // In case the document has finished parsing, document's readyState will\n // be one of \"complete\", \"interactive\" or (non-standard) \"loaded\".\n callback()\n } else {\n // The document is not ready yet, so wait for the DOMContentLoaded event\n document.addEventListener('DOMContentLoaded', callback, false)\n }\n}\n\nexport const isShadowDOMSupported = () => {\n try {\n return document.head.createShadowRoot || document.head.attachShadow\n } catch (_e) {\n return false\n }\n}\n"],"names":["BotonicContainerId","getWebchatElement","host","getScrollableMessagesListElement","onDOMLoaded","callback","document","isShadowDOMSupported","_e"],"mappings":";;;AAAyD;AAElD,MAAMC,iBAAiBA,GAAGC,CAAAA,OAC/BA,MAAM,cAAc,CAAC,CAAC,EAAEF,0BAA0B,EAAE,EAAC;AAEhD,MAAMG,gCAAgCA,GAAGD,CAAAA,OAC9CA,MAAM,cAAc,CAAC,CAAC,EAAEF,yCAAyC,EAAE,EAAC;AAEtE,0FAA0F;AACnF,MAAMI,WAAWA,GAAGC,CAAAA;IACzB,IAAI,8BAA8B,IAAI,CAACC,SAAS,UAAU,GAAG;QAC3D,wEAAwE;QACxE,kEAAkE;QAClED;IACF,OAAO;QACL,wEAAwE;QACxEC,SAAS,gBAAgB,CAAC,oBAAoBD,UAAU;IAC1D;AACF,EAAC;AAEM,MAAME,oBAAoBA,GAAG;IAClC,IAAI;QACF,OAAOD,SAAS,IAAI,CAAC,gBAAgB,IAAIA,SAAS,IAAI,CAAC,YAAY;IACrE,EAAE,OAAOE,IAAI;QACX,OAAO;IACT;AACF,EAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const isDev = process.env.NODE_ENV === 'development';
|
|
2
|
+
const isProd = process.env.NODE_ENV === 'production';
|
|
3
|
+
const staticAsset = (path)=>{
|
|
4
|
+
try {
|
|
5
|
+
if (isURL(path)) {
|
|
6
|
+
return path // Webpack 5 or Rspack >= fully resolves absolute path to assets
|
|
7
|
+
;
|
|
8
|
+
}
|
|
9
|
+
const scriptBaseURL = document.querySelector('script[src*="webchat.botonic.js"]').getAttribute('src');
|
|
10
|
+
const scriptName = scriptBaseURL.split('/').pop();
|
|
11
|
+
const basePath = scriptBaseURL.replace(`/${scriptName}`, '/');
|
|
12
|
+
const resolvedStaticAssetPath = basePath + path;
|
|
13
|
+
return resolvedStaticAssetPath;
|
|
14
|
+
} catch (_e) {
|
|
15
|
+
console.error(`Could not resolve path: '${path}'`);
|
|
16
|
+
return normalize(path);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const resolveImage = (src)=>{
|
|
20
|
+
if (isURL(src)) {
|
|
21
|
+
return src;
|
|
22
|
+
}
|
|
23
|
+
return staticAsset(src);
|
|
24
|
+
};
|
|
25
|
+
function isURL(urlPath) {
|
|
26
|
+
// @stephenhay (38 chars) from: https://mathiasbynens.be/demo/url-regex
|
|
27
|
+
const pattern = new RegExp(/^(blob:)?(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/);
|
|
28
|
+
return !!pattern.test(urlPath);
|
|
29
|
+
}
|
|
30
|
+
function normalize(path) {
|
|
31
|
+
const isAbsolute = path.charAt(0) === '/';
|
|
32
|
+
const trailingSlash = path && path[path.length - 1] === '/';
|
|
33
|
+
// Normalize the path
|
|
34
|
+
path = normalizeArray(path.split('/'), !isAbsolute).join('/');
|
|
35
|
+
if (!path && !isAbsolute) {
|
|
36
|
+
path = '.';
|
|
37
|
+
}
|
|
38
|
+
if (path && trailingSlash) {
|
|
39
|
+
path += '/';
|
|
40
|
+
}
|
|
41
|
+
return (isAbsolute ? '/' : '') + path;
|
|
42
|
+
}
|
|
43
|
+
function normalizeArray(parts, allowAboveRoot) {
|
|
44
|
+
const res = [];
|
|
45
|
+
for(let i = 0; i < parts.length; i++){
|
|
46
|
+
const p = parts[i];
|
|
47
|
+
if (!p || p === '.') {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (p === '..') {
|
|
51
|
+
if (res.length && res[res.length - 1] !== '..') {
|
|
52
|
+
res.pop();
|
|
53
|
+
} else if (allowAboveRoot) {
|
|
54
|
+
res.push('..');
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
res.push(p);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return res;
|
|
61
|
+
}
|
|
62
|
+
function isInWebviewApp() {
|
|
63
|
+
const userAgent = window.navigator.userAgent || '';
|
|
64
|
+
const standalone = window.navigator.standalone;
|
|
65
|
+
const isIOS = /iPad|iPhone|iPod/.test(userAgent);
|
|
66
|
+
const isAndroid = /Android/.test(userAgent);
|
|
67
|
+
// Detects iOS WebView
|
|
68
|
+
const isIOSWebView = isIOS && !userAgent.includes('Safari') && !standalone;
|
|
69
|
+
// Detects Android WebView
|
|
70
|
+
const isAndroidWebView = isAndroid && userAgent.includes('wv');
|
|
71
|
+
return isIOSWebView || isAndroidWebView;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { isDev, isInWebviewApp, isProd, isURL, normalize, resolveImage, staticAsset };
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util/environment.js","sources":["../../src/util/environment.js"],"sourcesContent":["export const isDev = process.env.NODE_ENV === 'development'\nexport const isProd = process.env.NODE_ENV === 'production'\n\nexport const staticAsset = path => {\n try {\n if (isURL(path)) {\n return path // Webpack 5 or Rspack >= fully resolves absolute path to assets\n }\n const scriptBaseURL = document\n .querySelector('script[src*=\"webchat.botonic.js\"]')\n .getAttribute('src')\n const scriptName = scriptBaseURL.split('/').pop()\n const basePath = scriptBaseURL.replace(`/${scriptName}`, '/')\n const resolvedStaticAssetPath = basePath + path\n return resolvedStaticAssetPath\n } catch (_e) {\n console.error(`Could not resolve path: '${path}'`)\n return normalize(path)\n }\n}\n\nexport const resolveImage = src => {\n if (isURL(src)) {\n return src\n }\n return staticAsset(src)\n}\n\nexport function isURL(urlPath) {\n // @stephenhay (38 chars) from: https://mathiasbynens.be/demo/url-regex\n const pattern = new RegExp(/^(blob:)?(https?|ftp):\\/\\/[^\\s/$.?#].[^\\s]*$/)\n return !!pattern.test(urlPath)\n}\n\nexport function normalize(path) {\n const isAbsolute = path.charAt(0) === '/'\n const trailingSlash = path && path[path.length - 1] === '/'\n // Normalize the path\n path = normalizeArray(path.split('/'), !isAbsolute).join('/')\n if (!path && !isAbsolute) {\n path = '.'\n }\n if (path && trailingSlash) {\n path += '/'\n }\n return (isAbsolute ? '/' : '') + path\n}\n\nfunction normalizeArray(parts, allowAboveRoot) {\n const res = []\n for (let i = 0; i < parts.length; i++) {\n const p = parts[i]\n if (!p || p === '.') {\n continue\n }\n if (p === '..') {\n if (res.length && res[res.length - 1] !== '..') {\n res.pop()\n } else if (allowAboveRoot) {\n res.push('..')\n }\n } else {\n res.push(p)\n }\n }\n return res\n}\n\nexport function isInWebviewApp() {\n const userAgent = window.navigator.userAgent || ''\n const standalone = window.navigator.standalone\n\n const isIOS = /iPad|iPhone|iPod/.test(userAgent)\n const isAndroid = /Android/.test(userAgent)\n\n // Detects iOS WebView\n const isIOSWebView = isIOS && !userAgent.includes('Safari') && !standalone\n\n // Detects Android WebView\n const isAndroidWebView = isAndroid && userAgent.includes('wv')\n\n return isIOSWebView || isAndroidWebView\n}\n"],"names":["isDev","process","isProd","staticAsset","path","isURL","scriptBaseURL","document","scriptName","basePath","resolvedStaticAssetPath","_e","console","normalize","resolveImage","src","urlPath","pattern","RegExp","isAbsolute","trailingSlash","normalizeArray","parts","allowAboveRoot","res","i","p","isInWebviewApp","userAgent","window","standalone","isIOS","isAndroid","isIOSWebView","isAndroidWebView"],"mappings":"AAAO,MAAMA,KAAKA,GAAGC,oBAAoB,KAAK,cAAa;AACpD,MAAMC,MAAMA,GAAGD,oBAAoB,KAAK,aAAY;AAEpD,MAAME,WAAWA,GAAGC,CAAAA;IACzB,IAAI;QACF,IAAIC,KAAKA,CAACD,OAAO;YACf,OAAOA,KAAK,gEAAgE;;QAC9E;QACA,MAAME,gBAAgBC,SACnB,aAAa,CAAC,qCACd,YAAY,CAAC;QAChB,MAAMC,aAAaF,cAAc,KAAK,CAAC,KAAK,GAAG;QAC/C,MAAMG,WAAWH,cAAc,OAAO,CAAC,CAAC,CAAC,EAAEE,YAAY,EAAE;QACzD,MAAME,0BAA0BD,WAAWL;QAC3C,OAAOM;IACT,EAAE,OAAOC,IAAI;QACXC,QAAQ,KAAK,CAAC,CAAC,yBAAyB,EAAER,KAAK,CAAC,CAAC;QACjD,OAAOS,SAASA,CAACT;IACnB;AACF,EAAC;AAEM,MAAMU,YAAYA,GAAGC,CAAAA;IAC1B,IAAIV,KAAKA,CAACU,MAAM;QACd,OAAOA;IACT;IACA,OAAOZ,WAAWA,CAACY;AACrB,EAAC;AAEM,SAASV,KAAKA,CAACW,OAAO;IAC3B,uEAAuE;IACvE,MAAMC,UAAU,IAAIC,OAAO;IAC3B,OAAO,CAAC,CAACD,QAAQ,IAAI,CAACD;AACxB;AAEO,SAASH,SAASA,CAACT,IAAI;IAC5B,MAAMe,aAAaf,KAAK,MAAM,CAAC,OAAO;IACtC,MAAMgB,gBAAgBhB,QAAQA,IAAI,CAACA,KAAK,MAAM,GAAG,EAAE,KAAK;IACxD,qBAAqB;IACrBA,OAAOiB,cAAcA,CAACjB,KAAK,KAAK,CAAC,MAAM,CAACe,YAAY,IAAI,CAAC;IACzD,IAAI,CAACf,QAAQ,CAACe,YAAY;QACxBf,OAAO;IACT;IACA,IAAIA,QAAQgB,eAAe;QACzBhB,QAAQ;IACV;IACA,OAAQe,CAAAA,aAAa,MAAM,EAAC,IAAKf;AACnC;AAEA,SAASiB,cAAcA,CAACC,KAAK,EAAEC,cAAc;IAC3C,MAAMC,MAAM,EAAE;IACd,IAAK,IAAIC,IAAI,GAAGA,IAAIH,MAAM,MAAM,EAAEG,IAAK;QACrC,MAAMC,IAAIJ,KAAK,CAACG,EAAE;QAClB,IAAI,CAACC,KAAKA,MAAM,KAAK;YACnB;QACF;QACA,IAAIA,MAAM,MAAM;YACd,IAAIF,IAAI,MAAM,IAAIA,GAAG,CAACA,IAAI,MAAM,GAAG,EAAE,KAAK,MAAM;gBAC9CA,IAAI,GAAG;YACT,OAAO,IAAID,gBAAgB;gBACzBC,IAAI,IAAI,CAAC;YACX;QACF,OAAO;YACLA,IAAI,IAAI,CAACE;QACX;IACF;IACA,OAAOF;AACT;AAEO,SAASG,cAAcA;IAC5B,MAAMC,YAAYC,OAAO,SAAS,CAAC,SAAS,IAAI;IAChD,MAAMC,aAAaD,OAAO,SAAS,CAAC,UAAU;IAE9C,MAAME,QAAQ,mBAAmB,IAAI,CAACH;IACtC,MAAMI,YAAY,UAAU,IAAI,CAACJ;IAEjC,sBAAsB;IACtB,MAAMK,eAAeF,SAAS,CAACH,UAAU,QAAQ,CAAC,aAAa,CAACE;IAEhE,0BAA0B;IAC1B,MAAMI,mBAAmBF,aAAaJ,UAAU,QAAQ,CAAC;IAEzD,OAAOK,gBAAgBC;AACzB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { isNode } from "@botonic/core";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Text } from "../components/text.js";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// @ts-nocheck
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
const createErrorBoundary = ({ errorComponent = ({ errorMessage })=>/*#__PURE__*/ jsx(Text, {
|
|
16
|
+
children: "The message cannot be displayed"
|
|
17
|
+
}) } = {})=>{
|
|
18
|
+
const ErrorBoundary = ({ children })=>{
|
|
19
|
+
const [error, _setError] = useState(null);
|
|
20
|
+
const _componentDidCatch = (error, _errorInfo)=>{
|
|
21
|
+
if (isNode()) {
|
|
22
|
+
console.error(`Failure at:`, error);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const _getDerivedStateFromError = (error)=>{
|
|
26
|
+
return {
|
|
27
|
+
error
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
if (error) {
|
|
31
|
+
return errorComponent({
|
|
32
|
+
errorMessage: error.message
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
return children;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return ErrorBoundary;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { createErrorBoundary };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=error-boundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util/error-boundary.js","sources":["../../src/util/error-boundary.jsx"],"sourcesContent":["// @ts-nocheck\nimport { isNode } from '@botonic/core'\nimport { useState } from 'react'\n\nimport { Text } from '../components/text'\n\nexport const createErrorBoundary = ({\n errorComponent = ({ errorMessage }) => (\n <Text>The message cannot be displayed</Text>\n ),\n} = {}) => {\n const ErrorBoundary = ({ children }) => {\n const [error, _setError] = useState(null)\n\n const _componentDidCatch = (error, _errorInfo) => {\n if (isNode()) {\n console.error(`Failure at:`, error)\n }\n }\n\n const _getDerivedStateFromError = error => {\n return { error }\n }\n\n if (error) {\n return errorComponent({\n errorMessage: error.message,\n })\n } else {\n return children\n }\n }\n\n return ErrorBoundary\n}\n"],"names":["isNode","useState","Text","createErrorBoundary","errorComponent","errorMessage","ErrorBoundary","children","error","_setError","_componentDidCatch","_errorInfo","console","_getDerivedStateFromError"],"mappings":";;;;;;;;;;AAAA,cAAc;AACwB;AACN;AAES;AAElC,MAAMG,mBAAmBA,GAAG,CAAC,EAClCC,iBAAiB,CAAC,EAAEC,YAAY,EAAE,iBAChC,IAACH,IAAIA;kBAAC;MACP,EACF,GAAG,CAAC,CAAC;IACJ,MAAMI,gBAAgB,CAAC,EAAEC,QAAQ,EAAE;QACjC,MAAM,CAACC,OAAOC,UAAU,GAAGR,QAAQA,CAAC;QAEpC,MAAMS,qBAAqB,CAACF,OAAOG;YACjC,IAAIX,MAAMA,IAAI;gBACZY,QAAQ,KAAK,CAAC,CAAC,WAAW,CAAC,EAAEJ;YAC/B;QACF;QAEA,MAAMK,4BAA4BL,CAAAA;YAChC,OAAO;gBAAEA;YAAM;QACjB;QAEA,IAAIA,OAAO;YACT,OAAOJ,eAAe;gBACpB,cAAcI,MAAM,OAAO;YAC7B;QACF,OAAO;YACL,OAAOD;QACT;IACF;IAEA,OAAOD;AACT,EAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function camelCaseToSnake(str) {
|
|
2
|
+
return str.replace(/([a-z])([A-Z])/g, '$1_$2').replace(/([A-Za-z])(\d)/g, '$1_$2').replace(/(\d)([A-Za-z])/g, '$1_$2').toLowerCase();
|
|
3
|
+
}
|
|
4
|
+
function toSnakeCaseKeys(input) {
|
|
5
|
+
if (Array.isArray(input)) {
|
|
6
|
+
return input.map((item)=>toSnakeCaseKeys(item));
|
|
7
|
+
}
|
|
8
|
+
if (typeof input === 'object' && input !== null) {
|
|
9
|
+
const result = Object.keys(input).reduce((acc, key)=>{
|
|
10
|
+
const snakeKey = camelCaseToSnake(key);
|
|
11
|
+
const value = input[key];
|
|
12
|
+
acc[snakeKey] = typeof value === 'object' && value !== null ? toSnakeCaseKeys(value) : value;
|
|
13
|
+
return acc;
|
|
14
|
+
}, {});
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
return input;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { toSnakeCaseKeys };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=functional.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util/functional.js","sources":["../../src/util/functional.ts"],"sourcesContent":["function camelCaseToSnake(str: string): string {\n return str\n .replace(/([a-z])([A-Z])/g, '$1_$2')\n .replace(/([A-Za-z])(\\d)/g, '$1_$2')\n .replace(/(\\d)([A-Za-z])/g, '$1_$2')\n .toLowerCase()\n}\ntype Input = Record<string, any> | Record<string, any>[] | undefined\n\nexport function toSnakeCaseKeys(input: Input): Input {\n if (Array.isArray(input)) {\n return input.map(item => toSnakeCaseKeys(item))\n }\n\n if (typeof input === 'object' && input !== null) {\n const result = Object.keys(input).reduce((acc, key) => {\n const snakeKey = camelCaseToSnake(key)\n const value = input[key]\n acc[snakeKey] =\n typeof value === 'object' && value !== null\n ? toSnakeCaseKeys(value)\n : value\n\n return acc\n }, {})\n\n return result\n }\n\n return input\n}\n"],"names":["camelCaseToSnake","str","toSnakeCaseKeys","input","Array","item","result","Object","acc","key","snakeKey","value"],"mappings":"AAAA,SAASA,gBAAgBA,CAACC,GAAW;IACnC,OAAOA,IACJ,OAAO,CAAC,mBAAmB,SAC3B,OAAO,CAAC,mBAAmB,SAC3B,OAAO,CAAC,mBAAmB,SAC3B,WAAW;AAChB;AAGO,SAASC,eAAeA,CAACC,KAAY;IAC1C,IAAIC,MAAM,OAAO,CAACD,QAAQ;QACxB,OAAOA,MAAM,GAAG,CAACE,CAAAA,OAAQH,eAAeA,CAACG;IAC3C;IAEA,IAAI,OAAOF,UAAU,YAAYA,UAAU,MAAM;QAC/C,MAAMG,SAASC,OAAO,IAAI,CAACJ,OAAO,MAAM,CAAC,CAACK,KAAKC;YAC7C,MAAMC,WAAWV,gBAAgBA,CAACS;YAClC,MAAME,QAAQR,KAAK,CAACM,IAAI;YACxBD,GAAG,CAACE,SAAS,GACX,OAAOC,UAAU,YAAYA,UAAU,OACnCT,eAAeA,CAACS,SAChBA;YAEN,OAAOH;QACT,GAAG,CAAC;QAEJ,OAAOF;IACT;IAEA,OAAOH;AACT"}
|
package/lib/util/i18n.js
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/* eslint-disable filenames/match-regex */ /**
|
|
2
|
+
* Normalizes a locale string to a valid format.
|
|
3
|
+
* Keeps letter-based region codes (e.g., 'en-GB', 'es-ES') but strips
|
|
4
|
+
* numeric UN M.49 region codes (e.g., 'es-419' -> 'es').
|
|
5
|
+
* Handles both dash and underscore separators.
|
|
6
|
+
* @example
|
|
7
|
+
* normalizeLocale('en-GB') // 'en-GB' (letter region preserved)
|
|
8
|
+
* normalizeLocale('es-419') // 'es' (numeric region stripped)
|
|
9
|
+
* normalizeLocale('zh-Hans-CN') // 'zh-CN' (script stripped, letter region preserved)
|
|
10
|
+
* normalizeLocale('en_US') // 'en-US' (underscore normalized)
|
|
11
|
+
*/ function normalizeLocale(locale = navigator.language) {
|
|
12
|
+
// Normalize underscore separators to dashes (some systems use underscores)
|
|
13
|
+
const normalizedLocale = locale.replace(/_/g, '-');
|
|
14
|
+
try {
|
|
15
|
+
const parsed = new Intl.Locale(normalizedLocale);
|
|
16
|
+
const language = parsed.language;
|
|
17
|
+
const region = parsed.region;
|
|
18
|
+
// If no region, return just the language
|
|
19
|
+
if (!region) {
|
|
20
|
+
return language;
|
|
21
|
+
}
|
|
22
|
+
// If region is numeric (UN M.49 code like '419'), return just the language
|
|
23
|
+
if (/^\d+$/.test(region)) {
|
|
24
|
+
return language;
|
|
25
|
+
}
|
|
26
|
+
// Otherwise, return language-REGION (letter-based region codes)
|
|
27
|
+
return `${language}-${region}`;
|
|
28
|
+
} catch {
|
|
29
|
+
// Fallback: check if the part after dash is numeric
|
|
30
|
+
const parts = normalizedLocale.split('-');
|
|
31
|
+
if (parts.length > 1 && /^\d+$/.test(parts[1])) {
|
|
32
|
+
return parts[0];
|
|
33
|
+
}
|
|
34
|
+
return normalizedLocale;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Gets the country code from a time zone string.
|
|
39
|
+
* @param timeZone - IANA time zone string (e.g., 'Europe/Madrid')
|
|
40
|
+
* @returns ISO 3166-1 alpha-2 country code (e.g., 'ES') or undefined if not found
|
|
41
|
+
* @example
|
|
42
|
+
* getCountryFromTimeZone('Europe/Madrid') // 'ES'
|
|
43
|
+
* getCountryFromTimeZone('America/New_York') // 'US'
|
|
44
|
+
*/ function getCountryFromTimeZone(timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone) {
|
|
45
|
+
return timeZoneToCountryCode[timeZone];
|
|
46
|
+
}
|
|
47
|
+
/* eslint-disable @typescript-eslint/naming-convention */ /**
|
|
48
|
+
* Mapping of IANA time zones to ISO 3166-1 alpha-2 country codes.
|
|
49
|
+
* Used to infer a user's country from their browser's time zone.
|
|
50
|
+
*/ const timeZoneToCountryCode = {
|
|
51
|
+
'Africa/Abidjan': 'CI',
|
|
52
|
+
'Africa/Accra': 'GH',
|
|
53
|
+
'Africa/Addis_Ababa': 'ET',
|
|
54
|
+
'Africa/Algiers': 'DZ',
|
|
55
|
+
'Africa/Asmara': 'ER',
|
|
56
|
+
'Africa/Bamako': 'ML',
|
|
57
|
+
'Africa/Bangui': 'CF',
|
|
58
|
+
'Africa/Banjul': 'GM',
|
|
59
|
+
'Africa/Bissau': 'GW',
|
|
60
|
+
'Africa/Blantyre': 'MW',
|
|
61
|
+
'Africa/Brazzaville': 'CG',
|
|
62
|
+
'Africa/Bujumbura': 'BI',
|
|
63
|
+
'Africa/Cairo': 'EG',
|
|
64
|
+
'Africa/Casablanca': 'MA',
|
|
65
|
+
'Africa/Ceuta': 'ES',
|
|
66
|
+
'Africa/Conakry': 'GN',
|
|
67
|
+
'Africa/Dakar': 'SN',
|
|
68
|
+
'Africa/Dar_es_Salaam': 'TZ',
|
|
69
|
+
'Africa/Djibouti': 'DJ',
|
|
70
|
+
'Africa/Douala': 'CM',
|
|
71
|
+
'Africa/El_Aaiun': 'EH',
|
|
72
|
+
'Africa/Freetown': 'SL',
|
|
73
|
+
'Africa/Gaborone': 'BW',
|
|
74
|
+
'Africa/Harare': 'ZW',
|
|
75
|
+
'Africa/Johannesburg': 'ZA',
|
|
76
|
+
'Africa/Juba': 'SS',
|
|
77
|
+
'Africa/Kampala': 'UG',
|
|
78
|
+
'Africa/Khartoum': 'SD',
|
|
79
|
+
'Africa/Kigali': 'RW',
|
|
80
|
+
'Africa/Kinshasa': 'CD',
|
|
81
|
+
'Africa/Lagos': 'NG',
|
|
82
|
+
'Africa/Libreville': 'GA',
|
|
83
|
+
'Africa/Lome': 'TG',
|
|
84
|
+
'Africa/Luanda': 'AO',
|
|
85
|
+
'Africa/Lubumbashi': 'CD',
|
|
86
|
+
'Africa/Lusaka': 'ZM',
|
|
87
|
+
'Africa/Malabo': 'GQ',
|
|
88
|
+
'Africa/Maputo': 'MZ',
|
|
89
|
+
'Africa/Maseru': 'LS',
|
|
90
|
+
'Africa/Mbabane': 'SZ',
|
|
91
|
+
'Africa/Mogadishu': 'SO',
|
|
92
|
+
'Africa/Monrovia': 'LR',
|
|
93
|
+
'Africa/Nairobi': 'KE',
|
|
94
|
+
'Africa/Ndjamena': 'TD',
|
|
95
|
+
'Africa/Niamey': 'NE',
|
|
96
|
+
'Africa/Nouakchott': 'MR',
|
|
97
|
+
'Africa/Ouagadougou': 'BF',
|
|
98
|
+
'Africa/Porto-Novo': 'BJ',
|
|
99
|
+
'Africa/Sao_Tome': 'ST',
|
|
100
|
+
'Africa/Tripoli': 'LY',
|
|
101
|
+
'Africa/Tunis': 'TN',
|
|
102
|
+
'Africa/Windhoek': 'NA',
|
|
103
|
+
'America/Argentina/Buenos_Aires': 'AR',
|
|
104
|
+
'America/Bogota': 'CO',
|
|
105
|
+
'America/Caracas': 'VE',
|
|
106
|
+
'America/Chicago': 'US',
|
|
107
|
+
'America/Denver': 'US',
|
|
108
|
+
'America/Guatemala': 'GT',
|
|
109
|
+
'America/Halifax': 'CA',
|
|
110
|
+
'America/La_Paz': 'BO',
|
|
111
|
+
'America/Lima': 'PE',
|
|
112
|
+
'America/Los_Angeles': 'US',
|
|
113
|
+
'America/Mexico_City': 'MX',
|
|
114
|
+
'America/Montevideo': 'UY',
|
|
115
|
+
'America/New_York': 'US',
|
|
116
|
+
'America/Phoenix': 'US',
|
|
117
|
+
'America/Santiago': 'CL',
|
|
118
|
+
'America/Sao_Paulo': 'BR',
|
|
119
|
+
'America/Toronto': 'CA',
|
|
120
|
+
'Asia/Bangkok': 'TH',
|
|
121
|
+
'Asia/Colombo': 'LK',
|
|
122
|
+
'Asia/Dubai': 'AE',
|
|
123
|
+
'Asia/Hong_Kong': 'HK',
|
|
124
|
+
'Asia/Jakarta': 'ID',
|
|
125
|
+
'Asia/Kolkata': 'IN',
|
|
126
|
+
'Asia/Manila': 'PH',
|
|
127
|
+
'Asia/Seoul': 'KR',
|
|
128
|
+
'Asia/Shanghai': 'CN',
|
|
129
|
+
'Asia/Singapore': 'SG',
|
|
130
|
+
'Asia/Taipei': 'TW',
|
|
131
|
+
'Asia/Tokyo': 'JP',
|
|
132
|
+
'Australia/Brisbane': 'AU',
|
|
133
|
+
'Australia/Melbourne': 'AU',
|
|
134
|
+
'Australia/Perth': 'AU',
|
|
135
|
+
'Australia/Sydney': 'AU',
|
|
136
|
+
'Europe/Amsterdam': 'NL',
|
|
137
|
+
'Europe/Berlin': 'DE',
|
|
138
|
+
'Europe/Brussels': 'BE',
|
|
139
|
+
'Europe/Bucharest': 'RO',
|
|
140
|
+
'Europe/Copenhagen': 'DK',
|
|
141
|
+
'Europe/Helsinki': 'FI',
|
|
142
|
+
'Europe/Lisbon': 'PT',
|
|
143
|
+
'Europe/London': 'GB',
|
|
144
|
+
'Europe/Madrid': 'ES',
|
|
145
|
+
'Europe/Oslo': 'NO',
|
|
146
|
+
'Europe/Paris': 'FR',
|
|
147
|
+
'Europe/Prague': 'CZ',
|
|
148
|
+
'Europe/Rome': 'IT',
|
|
149
|
+
'Europe/Stockholm': 'SE',
|
|
150
|
+
'Europe/Warsaw': 'PL',
|
|
151
|
+
'Pacific/Auckland': 'NZ'
|
|
152
|
+
} /* eslint-enable @typescript-eslint/naming-convention */ ;
|
|
153
|
+
|
|
154
|
+
export { getCountryFromTimeZone, normalizeLocale, timeZoneToCountryCode };
|
|
155
|
+
|
|
156
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util/i18n.js","sources":["../../src/util/i18n.ts"],"sourcesContent":["/* eslint-disable filenames/match-regex */\n/**\n * Normalizes a locale string to a valid format.\n * Keeps letter-based region codes (e.g., 'en-GB', 'es-ES') but strips\n * numeric UN M.49 region codes (e.g., 'es-419' -> 'es').\n * Handles both dash and underscore separators.\n * @example\n * normalizeLocale('en-GB') // 'en-GB' (letter region preserved)\n * normalizeLocale('es-419') // 'es' (numeric region stripped)\n * normalizeLocale('zh-Hans-CN') // 'zh-CN' (script stripped, letter region preserved)\n * normalizeLocale('en_US') // 'en-US' (underscore normalized)\n */\nexport function normalizeLocale(locale = navigator.language) {\n // Normalize underscore separators to dashes (some systems use underscores)\n const normalizedLocale = locale.replace(/_/g, '-')\n try {\n const parsed = new Intl.Locale(normalizedLocale)\n const language = parsed.language\n const region = parsed.region\n\n // If no region, return just the language\n if (!region) {\n return language\n }\n\n // If region is numeric (UN M.49 code like '419'), return just the language\n if (/^\\d+$/.test(region)) {\n return language\n }\n\n // Otherwise, return language-REGION (letter-based region codes)\n return `${language}-${region}`\n } catch {\n // Fallback: check if the part after dash is numeric\n const parts = normalizedLocale.split('-')\n if (parts.length > 1 && /^\\d+$/.test(parts[1])) {\n return parts[0]\n }\n return normalizedLocale\n }\n}\n\n/**\n * Gets the country code from a time zone string.\n * @param timeZone - IANA time zone string (e.g., 'Europe/Madrid')\n * @returns ISO 3166-1 alpha-2 country code (e.g., 'ES') or undefined if not found\n * @example\n * getCountryFromTimeZone('Europe/Madrid') // 'ES'\n * getCountryFromTimeZone('America/New_York') // 'US'\n */\nexport function getCountryFromTimeZone(\n timeZone: string = Intl.DateTimeFormat().resolvedOptions().timeZone\n): string | undefined {\n return timeZoneToCountryCode[timeZone]\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * Mapping of IANA time zones to ISO 3166-1 alpha-2 country codes.\n * Used to infer a user's country from their browser's time zone.\n */\nexport const timeZoneToCountryCode: Record<string, string> = {\n 'Africa/Abidjan': 'CI',\n 'Africa/Accra': 'GH',\n 'Africa/Addis_Ababa': 'ET',\n 'Africa/Algiers': 'DZ',\n 'Africa/Asmara': 'ER',\n 'Africa/Bamako': 'ML',\n 'Africa/Bangui': 'CF',\n 'Africa/Banjul': 'GM',\n 'Africa/Bissau': 'GW',\n 'Africa/Blantyre': 'MW',\n 'Africa/Brazzaville': 'CG',\n 'Africa/Bujumbura': 'BI',\n 'Africa/Cairo': 'EG',\n 'Africa/Casablanca': 'MA',\n 'Africa/Ceuta': 'ES',\n 'Africa/Conakry': 'GN',\n 'Africa/Dakar': 'SN',\n 'Africa/Dar_es_Salaam': 'TZ',\n 'Africa/Djibouti': 'DJ',\n 'Africa/Douala': 'CM',\n 'Africa/El_Aaiun': 'EH',\n 'Africa/Freetown': 'SL',\n 'Africa/Gaborone': 'BW',\n 'Africa/Harare': 'ZW',\n 'Africa/Johannesburg': 'ZA',\n 'Africa/Juba': 'SS',\n 'Africa/Kampala': 'UG',\n 'Africa/Khartoum': 'SD',\n 'Africa/Kigali': 'RW',\n 'Africa/Kinshasa': 'CD',\n 'Africa/Lagos': 'NG',\n 'Africa/Libreville': 'GA',\n 'Africa/Lome': 'TG',\n 'Africa/Luanda': 'AO',\n 'Africa/Lubumbashi': 'CD',\n 'Africa/Lusaka': 'ZM',\n 'Africa/Malabo': 'GQ',\n 'Africa/Maputo': 'MZ',\n 'Africa/Maseru': 'LS',\n 'Africa/Mbabane': 'SZ',\n 'Africa/Mogadishu': 'SO',\n 'Africa/Monrovia': 'LR',\n 'Africa/Nairobi': 'KE',\n 'Africa/Ndjamena': 'TD',\n 'Africa/Niamey': 'NE',\n 'Africa/Nouakchott': 'MR',\n 'Africa/Ouagadougou': 'BF',\n 'Africa/Porto-Novo': 'BJ',\n 'Africa/Sao_Tome': 'ST',\n 'Africa/Tripoli': 'LY',\n 'Africa/Tunis': 'TN',\n 'Africa/Windhoek': 'NA',\n 'America/Argentina/Buenos_Aires': 'AR',\n 'America/Bogota': 'CO',\n 'America/Caracas': 'VE',\n 'America/Chicago': 'US',\n 'America/Denver': 'US',\n 'America/Guatemala': 'GT',\n 'America/Halifax': 'CA',\n 'America/La_Paz': 'BO',\n 'America/Lima': 'PE',\n 'America/Los_Angeles': 'US',\n 'America/Mexico_City': 'MX',\n 'America/Montevideo': 'UY',\n 'America/New_York': 'US',\n 'America/Phoenix': 'US',\n 'America/Santiago': 'CL',\n 'America/Sao_Paulo': 'BR',\n 'America/Toronto': 'CA',\n 'Asia/Bangkok': 'TH',\n 'Asia/Colombo': 'LK',\n 'Asia/Dubai': 'AE',\n 'Asia/Hong_Kong': 'HK',\n 'Asia/Jakarta': 'ID',\n 'Asia/Kolkata': 'IN',\n 'Asia/Manila': 'PH',\n 'Asia/Seoul': 'KR',\n 'Asia/Shanghai': 'CN',\n 'Asia/Singapore': 'SG',\n 'Asia/Taipei': 'TW',\n 'Asia/Tokyo': 'JP',\n 'Australia/Brisbane': 'AU',\n 'Australia/Melbourne': 'AU',\n 'Australia/Perth': 'AU',\n 'Australia/Sydney': 'AU',\n 'Europe/Amsterdam': 'NL',\n 'Europe/Berlin': 'DE',\n 'Europe/Brussels': 'BE',\n 'Europe/Bucharest': 'RO',\n 'Europe/Copenhagen': 'DK',\n 'Europe/Helsinki': 'FI',\n 'Europe/Lisbon': 'PT',\n 'Europe/London': 'GB',\n 'Europe/Madrid': 'ES',\n 'Europe/Oslo': 'NO',\n 'Europe/Paris': 'FR',\n 'Europe/Prague': 'CZ',\n 'Europe/Rome': 'IT',\n 'Europe/Stockholm': 'SE',\n 'Europe/Warsaw': 'PL',\n 'Pacific/Auckland': 'NZ',\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n"],"names":["normalizeLocale","locale","navigator","normalizedLocale","parsed","Intl","language","region","parts","getCountryFromTimeZone","timeZone","timeZoneToCountryCode"],"mappings":"AAAA,wCAAwC,GACxC;;;;;;;;;;CAUC,GACM,SAASA,eAAeA,CAACC,SAASC,UAAU,QAAQ;IACzD,2EAA2E;IAC3E,MAAMC,mBAAmBF,OAAO,OAAO,CAAC,MAAM;IAC9C,IAAI;QACF,MAAMG,SAAS,IAAIC,KAAK,MAAM,CAACF;QAC/B,MAAMG,WAAWF,OAAO,QAAQ;QAChC,MAAMG,SAASH,OAAO,MAAM;QAE5B,yCAAyC;QACzC,IAAI,CAACG,QAAQ;YACX,OAAOD;QACT;QAEA,2EAA2E;QAC3E,IAAI,QAAQ,IAAI,CAACC,SAAS;YACxB,OAAOD;QACT;QAEA,gEAAgE;QAChE,OAAO,GAAGA,SAAS,CAAC,EAAEC,QAAQ;IAChC,EAAE,OAAM;QACN,oDAAoD;QACpD,MAAMC,QAAQL,iBAAiB,KAAK,CAAC;QACrC,IAAIK,MAAM,MAAM,GAAG,KAAK,QAAQ,IAAI,CAACA,KAAK,CAAC,EAAE,GAAG;YAC9C,OAAOA,KAAK,CAAC,EAAE;QACjB;QACA,OAAOL;IACT;AACF;AAEA;;;;;;;CAOC,GACM,SAASM,sBAAsBA,CACpCC,WAAmBL,KAAK,cAAc,GAAG,eAAe,GAAG,QAAQ;IAEnE,OAAOM,qBAAqB,CAACD,SAAS;AACxC;AAEA,uDAAuD,GACvD;;;CAGC,GACM,MAAMC,qBAAqBA,GAA2B;IAC3D,kBAAkB;IAClB,gBAAgB;IAChB,sBAAsB;IACtB,kBAAkB;IAClB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,mBAAmB;IACnB,sBAAsB;IACtB,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;IACrB,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,wBAAwB;IACxB,mBAAmB;IACnB,iBAAiB;IACjB,mBAAmB;IACnB,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,uBAAuB;IACvB,eAAe;IACf,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,mBAAmB;IACnB,gBAAgB;IAChB,qBAAqB;IACrB,eAAe;IACf,iBAAiB;IACjB,qBAAqB;IACrB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,kBAAkB;IAClB,oBAAoB;IACpB,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,qBAAqB;IACrB,sBAAsB;IACtB,qBAAqB;IACrB,mBAAmB;IACnB,kBAAkB;IAClB,gBAAgB;IAChB,mBAAmB;IACnB,kCAAkC;IAClC,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;IACnB,kBAAkB;IAClB,gBAAgB;IAChB,uBAAuB;IACvB,uBAAuB;IACvB,sBAAsB;IACtB,oBAAoB;IACpB,mBAAmB;IACnB,oBAAoB;IACpB,qBAAqB;IACrB,mBAAmB;IACnB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,kBAAkB;IAClB,gBAAgB;IAChB,gBAAgB;IAChB,eAAe;IACf,cAAc;IACd,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,sBAAsB;IACtB,uBAAuB;IACvB,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;IACjB,mBAAmB;IACnB,oBAAoB;IACpB,qBAAqB;IACrB,mBAAmB;IACnB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,iBAAiB;IACjB,eAAe;IACf,oBAAoB;IACpB,iBAAiB;IACjB,oBAAoB;AACtB,EACA,sDAAsD,IADrD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './dom.js';
|
|
2
|
+
export * from './environment.js';
|
|
3
|
+
export * from './error-boundary.js';
|
|
4
|
+
export * from './i18n.js';
|
|
5
|
+
export * from './logs.js';
|
|
6
|
+
export * from './objects.js';
|
|
7
|
+
export * from './react.js';
|
|
8
|
+
export * from './regexs.js';
|
|
9
|
+
export * from './strings.js';
|
|
10
|
+
export * from './webchat.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from "./dom.js";
|
|
2
|
+
export * from "./environment.js";
|
|
3
|
+
export * from "./error-boundary.js";
|
|
4
|
+
export * from "./i18n.js";
|
|
5
|
+
export * from "./logs.js";
|
|
6
|
+
export * from "./objects.js";
|
|
7
|
+
export * from "./react.js";
|
|
8
|
+
export * from "./regexs.js";
|
|
9
|
+
export * from "./strings.js";
|
|
10
|
+
export * from "./webchat.js";
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util/index.js","sources":["../../src/util/index.ts"],"sourcesContent":["export * from './dom'\nexport * from './environment'\nexport * from './error-boundary'\nexport * from './i18n'\nexport * from './logs'\nexport * from './objects'\nexport * from './react'\nexport * from './regexs'\nexport * from './strings'\nexport * from './webchat'\n"],"names":[],"mappings":";;;;;;;;;;AAAqB;AACQ;AACG;AACV;AACA;AACG;AACF;AACC;AACC;AACA"}
|
package/lib/util/logs.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getProperty } from "./objects.js";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
function warnDeprecated(legacyCode, newCode, extraInfo = undefined) {
|
|
6
|
+
console.warn(`${extraInfo ? extraInfo : ''} '${legacyCode}' is deprecated. Use '${newCode}' instead.`);
|
|
7
|
+
}
|
|
8
|
+
function warnDeprecatedProps(props, extraInfo) {
|
|
9
|
+
const legacyNewProps = [
|
|
10
|
+
{
|
|
11
|
+
legacy: 'enableTimestamps',
|
|
12
|
+
new: 'enabletimestamps'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
legacy: 'imageStyle',
|
|
16
|
+
new: 'imagestyle'
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
legacyNewProps.forEach((p)=>{
|
|
20
|
+
if (getProperty(props, p.legacy) !== undefined) {
|
|
21
|
+
warnDeprecated(p.legacy, p.new, extraInfo);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { warnDeprecated, warnDeprecatedProps };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=logs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util/logs.js","sources":["../../src/util/logs.js"],"sourcesContent":["import { getProperty } from '../util/objects'\n\nexport function warnDeprecated(legacyCode, newCode, extraInfo = undefined) {\n console.warn(\n `${\n extraInfo ? extraInfo : ''\n } '${legacyCode}' is deprecated. Use '${newCode}' instead.`\n )\n}\n\nexport function warnDeprecatedProps(props, extraInfo) {\n const legacyNewProps = [\n { legacy: 'enableTimestamps', new: 'enabletimestamps' },\n { legacy: 'imageStyle', new: 'imagestyle' },\n ]\n legacyNewProps.forEach(p => {\n if (getProperty(props, p.legacy) !== undefined) {\n warnDeprecated(p.legacy, p.new, extraInfo)\n }\n })\n}\n"],"names":["getProperty","warnDeprecated","legacyCode","newCode","extraInfo","undefined","console","warnDeprecatedProps","props","legacyNewProps","p"],"mappings":";;;AAA6C;AAEtC,SAASC,cAAcA,CAACC,UAAU,EAAEC,OAAO,EAAEC,YAAYC,SAAS;IACvEC,QAAQ,IAAI,CACV,GACEF,YAAYA,YAAY,GACzB,EAAE,EAAEF,WAAW,sBAAsB,EAAEC,QAAQ,UAAU,CAAC;AAE/D;AAEO,SAASI,mBAAmBA,CAACC,KAAK,EAAEJ,SAAS;IAClD,MAAMK,iBAAiB;QACrB;YAAE,QAAQ;YAAoB,KAAK;QAAmB;QACtD;YAAE,QAAQ;YAAc,KAAK;QAAa;KAC3C;IACDA,eAAe,OAAO,CAACC,CAAAA;QACrB,IAAIV,WAAWA,CAACQ,OAAOE,EAAE,MAAM,MAAML,WAAW;YAC9CJ,cAAcA,CAACS,EAAE,MAAM,EAAEA,EAAE,GAAG,EAAEN;QAClC;IACF;AACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* given an object and a property, returns the property if exists (recursively), else undefined
|
|
3
|
+
* ex:
|
|
4
|
+
* let obj = { a: { b: { c: 5 } } }
|
|
5
|
+
* getProperty(obj, 'a.b.c'), returns 5
|
|
6
|
+
* getProperty(obj, 'a.b.z'), returns undefined
|
|
7
|
+
*/ const getProperty = (obj, property)=>{
|
|
8
|
+
if (!property) {
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
const properties = property.split('.');
|
|
12
|
+
for(let i = 0; i < properties.length; i++){
|
|
13
|
+
const prop = properties[i];
|
|
14
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
15
|
+
if (!obj || !Object.hasOwn(obj, prop)) {
|
|
16
|
+
return undefined;
|
|
17
|
+
} else {
|
|
18
|
+
obj = obj[prop];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return obj;
|
|
22
|
+
};
|
|
23
|
+
function strToBool(string) {
|
|
24
|
+
const regex = /^\s*(true|1|on)\s*$/i;
|
|
25
|
+
string = String(string);
|
|
26
|
+
return regex.test(string);
|
|
27
|
+
}
|
|
28
|
+
const mapObject = (obj, conversion = ([key, value])=>[
|
|
29
|
+
key,
|
|
30
|
+
value
|
|
31
|
+
])=>{
|
|
32
|
+
return obj && Object.entries(obj).map(conversion).reduce((prev, curr)=>{
|
|
33
|
+
prev[curr[0]] = curr[1];
|
|
34
|
+
return prev;
|
|
35
|
+
}, {});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { getProperty, mapObject, strToBool };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=objects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util/objects.js","sources":["../../src/util/objects.js"],"sourcesContent":["/**\n * given an object and a property, returns the property if exists (recursively), else undefined\n * ex:\n * let obj = { a: { b: { c: 5 } } }\n * getProperty(obj, 'a.b.c'), returns 5\n * getProperty(obj, 'a.b.z'), returns undefined\n */\nexport const getProperty = (obj, property) => {\n if (!property) {\n return undefined\n }\n const properties = property.split('.')\n for (let i = 0; i < properties.length; i++) {\n const prop = properties[i]\n // eslint-disable-next-line no-prototype-builtins\n if (!obj || !Object.hasOwn(obj, prop)) {\n return undefined\n } else {\n obj = obj[prop]\n }\n }\n return obj\n}\n\nexport function strToBool(string) {\n const regex = /^\\s*(true|1|on)\\s*$/i\n string = String(string)\n return regex.test(string)\n}\n\nexport const mapObject = (obj, conversion = ([key, value]) => [key, value]) => {\n return (\n obj &&\n Object.entries(obj)\n .map(conversion)\n .reduce((prev, curr) => {\n prev[curr[0]] = curr[1]\n return prev\n }, {})\n )\n}\n"],"names":["getProperty","obj","property","undefined","properties","i","prop","Object","strToBool","string","regex","String","mapObject","conversion","key","value","prev","curr"],"mappings":"AAAA;;;;;;CAMC,GACM,MAAMA,WAAWA,GAAG,CAACC,KAAKC;IAC/B,IAAI,CAACA,UAAU;QACb,OAAOC;IACT;IACA,MAAMC,aAAaF,SAAS,KAAK,CAAC;IAClC,IAAK,IAAIG,IAAI,GAAGA,IAAID,WAAW,MAAM,EAAEC,IAAK;QAC1C,MAAMC,OAAOF,UAAU,CAACC,EAAE;QAC1B,iDAAiD;QACjD,IAAI,CAACJ,OAAO,CAACM,OAAO,MAAM,CAACN,KAAKK,OAAO;YACrC,OAAOH;QACT,OAAO;YACLF,MAAMA,GAAG,CAACK,KAAK;QACjB;IACF;IACA,OAAOL;AACT,EAAC;AAEM,SAASO,SAASA,CAACC,MAAM;IAC9B,MAAMC,QAAQ;IACdD,SAASE,OAAOF;IAChB,OAAOC,MAAM,IAAI,CAACD;AACpB;AAEO,MAAMG,SAASA,GAAG,CAACX,KAAKY,aAAa,CAAC,CAACC,KAAKC,MAAM,GAAK;QAACD;QAAKC;KAAM;IACxE,OACEd,OACAM,OAAO,OAAO,CAACN,KACZ,GAAG,CAACY,YACJ,MAAM,CAAC,CAACG,MAAMC;QACbD,IAAI,CAACC,IAAI,CAAC,EAAE,CAAC,GAAGA,IAAI,CAAC,EAAE;QACvB,OAAOD;IACT,GAAG,CAAC;AAEV,EAAC"}
|