@botonic/plugin-flow-builder 0.55.2 → 0.57.0-rslib-esm.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/action/ai-agent-from-user-input.d.ts +2 -2
- package/lib/esm/action/ai-agent-from-user-input.js +9 -6
- package/lib/esm/action/ai-agent-from-user-input.js.map +1 -1
- package/lib/esm/action/context.d.ts +2 -2
- package/lib/esm/action/context.js +9 -6
- package/lib/esm/action/context.js.map +1 -1
- package/lib/esm/action/fallback.d.ts +2 -2
- package/lib/esm/action/fallback.js +16 -11
- package/lib/esm/action/fallback.js.map +1 -1
- package/lib/esm/action/first-interaction.d.ts +2 -2
- package/lib/esm/action/first-interaction.js +39 -27
- package/lib/esm/action/first-interaction.js.map +1 -1
- package/lib/esm/action/get-contents.d.ts +1 -1
- package/lib/esm/action/get-contents.js +37 -20
- package/lib/esm/action/get-contents.js.map +1 -1
- package/lib/esm/action/index.d.ts +1 -1
- package/lib/esm/action/index.js +68 -32
- package/lib/esm/action/index.js.map +1 -1
- package/lib/esm/action/payload.d.ts +2 -2
- package/lib/esm/action/payload.js +27 -23
- package/lib/esm/action/payload.js.map +1 -1
- package/lib/esm/api.d.ts +2 -2
- package/lib/esm/api.js +55 -44
- package/lib/esm/api.js.map +1 -1
- package/lib/esm/constants.js +16 -18
- package/lib/esm/constants.js.map +1 -1
- package/lib/esm/content-fields/content-fields-base.d.ts +2 -2
- package/lib/esm/content-fields/content-fields-base.js +33 -29
- package/lib/esm/content-fields/content-fields-base.js.map +1 -1
- package/lib/esm/content-fields/custom-conditional/custom-conditional-v2-evaluators.d.ts +1 -1
- package/lib/esm/content-fields/custom-conditional/custom-conditional-v2-evaluators.js +35 -33
- package/lib/esm/content-fields/custom-conditional/custom-conditional-v2-evaluators.js.map +1 -1
- package/lib/esm/content-fields/custom-conditional/custom-conditional-v2-resolver.d.ts +1 -1
- package/lib/esm/content-fields/custom-conditional/custom-conditional-v2-resolver.js +15 -15
- package/lib/esm/content-fields/custom-conditional/custom-conditional-v2-resolver.js.map +1 -1
- package/lib/esm/content-fields/custom-conditional/flow-custom-condition-v2.d.ts +2 -2
- package/lib/esm/content-fields/custom-conditional/flow-custom-condition-v2.js +50 -35
- package/lib/esm/content-fields/custom-conditional/flow-custom-condition-v2.js.map +1 -1
- package/lib/esm/content-fields/flow-ai-agent-base.d.ts +4 -4
- package/lib/esm/content-fields/flow-ai-agent-base.js +50 -43
- package/lib/esm/content-fields/flow-ai-agent-base.js.map +1 -1
- package/lib/esm/content-fields/flow-ai-agent-router.d.ts +5 -5
- package/lib/esm/content-fields/flow-ai-agent-router.js +57 -46
- package/lib/esm/content-fields/flow-ai-agent-router.js.map +1 -1
- package/lib/esm/content-fields/flow-ai-agent.d.ts +4 -4
- package/lib/esm/content-fields/flow-ai-agent.js +33 -22
- package/lib/esm/content-fields/flow-ai-agent.js.map +1 -1
- package/lib/esm/content-fields/flow-bot-action.d.ts +3 -3
- package/lib/esm/content-fields/flow-bot-action.js +23 -15
- package/lib/esm/content-fields/flow-bot-action.js.map +1 -1
- package/lib/esm/content-fields/flow-button.d.ts +5 -5
- package/lib/esm/content-fields/flow-button.js +48 -29
- package/lib/esm/content-fields/flow-button.js.map +1 -1
- package/lib/esm/content-fields/flow-capture-user-input.d.ts +2 -2
- package/lib/esm/content-fields/flow-capture-user-input.js +24 -23
- package/lib/esm/content-fields/flow-capture-user-input.js.map +1 -1
- package/lib/esm/content-fields/flow-carousel.d.ts +4 -4
- package/lib/esm/content-fields/flow-carousel.js +99 -58
- package/lib/esm/content-fields/flow-carousel.js.map +1 -1
- package/lib/esm/content-fields/flow-channel-conditional.d.ts +3 -3
- package/lib/esm/content-fields/flow-channel-conditional.js +26 -22
- package/lib/esm/content-fields/flow-channel-conditional.js.map +1 -1
- package/lib/esm/content-fields/flow-country-conditional.d.ts +3 -3
- package/lib/esm/content-fields/flow-country-conditional.js +26 -21
- package/lib/esm/content-fields/flow-country-conditional.js.map +1 -1
- package/lib/esm/content-fields/flow-custom-conditional.d.ts +3 -3
- package/lib/esm/content-fields/flow-custom-conditional.js +31 -33
- package/lib/esm/content-fields/flow-custom-conditional.js.map +1 -1
- package/lib/esm/content-fields/flow-element.d.ts +4 -4
- package/lib/esm/content-fields/flow-element.js +37 -20
- package/lib/esm/content-fields/flow-element.js.map +1 -1
- package/lib/esm/content-fields/flow-go-to-flow.d.ts +3 -3
- package/lib/esm/content-fields/flow-go-to-flow.js +25 -20
- package/lib/esm/content-fields/flow-go-to-flow.js.map +1 -1
- package/lib/esm/content-fields/flow-handoff.d.ts +3 -3
- package/lib/esm/content-fields/flow-handoff.js +30 -19
- package/lib/esm/content-fields/flow-handoff.js.map +1 -1
- package/lib/esm/content-fields/flow-image.d.ts +2 -2
- package/lib/esm/content-fields/flow-image.js +24 -15
- package/lib/esm/content-fields/flow-image.js.map +1 -1
- package/lib/esm/content-fields/flow-queue-status-conditional.d.ts +3 -3
- package/lib/esm/content-fields/flow-queue-status-conditional.js +45 -40
- package/lib/esm/content-fields/flow-queue-status-conditional.js.map +1 -1
- package/lib/esm/content-fields/flow-rating.d.ts +3 -3
- package/lib/esm/content-fields/flow-rating.js +62 -40
- package/lib/esm/content-fields/flow-rating.js.map +1 -1
- package/lib/esm/content-fields/flow-text.d.ts +4 -4
- package/lib/esm/content-fields/flow-text.js +51 -29
- package/lib/esm/content-fields/flow-text.js.map +1 -1
- package/lib/esm/content-fields/flow-video.d.ts +2 -2
- package/lib/esm/content-fields/flow-video.js +24 -15
- package/lib/esm/content-fields/flow-video.js.map +1 -1
- package/lib/esm/content-fields/flow-webview.d.ts +2 -2
- package/lib/esm/content-fields/flow-webview.js +31 -28
- package/lib/esm/content-fields/flow-webview.js.map +1 -1
- package/lib/esm/content-fields/flow-whatsapp-cta-url-button.d.ts +3 -3
- package/lib/esm/content-fields/flow-whatsapp-cta-url-button.js +91 -52
- package/lib/esm/content-fields/flow-whatsapp-cta-url-button.js.map +1 -1
- package/lib/esm/content-fields/flow-whatsapp-request-contact-info.d.ts +10 -0
- package/lib/esm/content-fields/flow-whatsapp-request-contact-info.js +51 -0
- package/lib/esm/content-fields/flow-whatsapp-request-contact-info.js.map +1 -0
- package/lib/esm/content-fields/flow-whatsapp-template.d.ts +3 -2
- package/lib/esm/content-fields/flow-whatsapp-template.js +126 -98
- package/lib/esm/content-fields/flow-whatsapp-template.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/ai-agent-router.d.ts +3 -3
- package/lib/esm/content-fields/hubtype-fields/ai-agent-router.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/ai-agent-router.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/ai-agent.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/ai-agent.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/ai-agent.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/bot-action.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/bot-action.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/bot-action.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/button.d.ts +1 -1
- package/lib/esm/content-fields/hubtype-fields/button.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/button.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/capture-user-input.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/capture-user-input.js +6 -6
- package/lib/esm/content-fields/hubtype-fields/capture-user-input.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/carousel.d.ts +3 -3
- package/lib/esm/content-fields/hubtype-fields/carousel.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/carousel.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/channel-conditional.d.ts +3 -3
- package/lib/esm/content-fields/hubtype-fields/channel-conditional.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/channel-conditional.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/common.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/common.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/common.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/country-conditional.d.ts +3 -3
- package/lib/esm/content-fields/hubtype-fields/country-conditional.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/country-conditional.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/custom-conditional-v2.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/custom-conditional-v2.js +15 -15
- package/lib/esm/content-fields/hubtype-fields/custom-conditional-v2.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/custom-conditional.d.ts +3 -3
- package/lib/esm/content-fields/hubtype-fields/custom-conditional.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/custom-conditional.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/fallback.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/fallback.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/fallback.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/function.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/function.js +6 -6
- package/lib/esm/content-fields/hubtype-fields/function.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/go-to-flow.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/go-to-flow.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/go-to-flow.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/handoff.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/handoff.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/handoff.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/image.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/image.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/image.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/index.d.ts +27 -26
- package/lib/esm/content-fields/hubtype-fields/index.js +56 -29
- package/lib/esm/content-fields/hubtype-fields/index.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/keyword.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/keyword.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/keyword.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/node-types.d.ts +1 -0
- package/lib/esm/content-fields/hubtype-fields/node-types.js +13 -12
- package/lib/esm/content-fields/hubtype-fields/node-types.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/nodes.d.ts +24 -23
- package/lib/esm/content-fields/hubtype-fields/nodes.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/nodes.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/payload.d.ts +1 -1
- package/lib/esm/content-fields/hubtype-fields/payload.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/payload.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/queue-status-conditional.d.ts +3 -3
- package/lib/esm/content-fields/hubtype-fields/queue-status-conditional.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/queue-status-conditional.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/rating.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/rating.js +6 -6
- package/lib/esm/content-fields/hubtype-fields/rating.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/smart-intent.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/smart-intent.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/smart-intent.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/text.d.ts +3 -3
- package/lib/esm/content-fields/hubtype-fields/text.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/text.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/url.d.ts +1 -1
- package/lib/esm/content-fields/hubtype-fields/url.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/url.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/video.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/video.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/video.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/webview.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/webview.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/webview.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/whatsapp-cta-url-button.d.ts +3 -3
- package/lib/esm/content-fields/hubtype-fields/whatsapp-cta-url-button.js +3 -2
- package/lib/esm/content-fields/hubtype-fields/whatsapp-cta-url-button.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/whatsapp-request-contact-info.d.ts +8 -0
- package/lib/esm/content-fields/hubtype-fields/whatsapp-request-contact-info.js +4 -0
- package/lib/esm/content-fields/hubtype-fields/whatsapp-request-contact-info.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/whatsapp-template.d.ts +7 -3
- package/lib/esm/content-fields/hubtype-fields/whatsapp-template.js +6 -6
- package/lib/esm/content-fields/hubtype-fields/whatsapp-template.js.map +1 -1
- package/lib/esm/content-fields/index.d.ts +25 -24
- package/lib/esm/content-fields/index.js +72 -49
- package/lib/esm/content-fields/index.js.map +1 -1
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.d.ts +3 -3
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +16 -14
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -1
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +4 -4
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +20 -15
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -1
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +4 -4
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +46 -26
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -1
- package/lib/esm/content-fields/whatsapp-button-list/index.d.ts +3 -3
- package/lib/esm/content-fields/whatsapp-button-list/index.js +11 -9
- package/lib/esm/content-fields/whatsapp-button-list/index.js.map +1 -1
- package/lib/esm/filters/index.d.ts +2 -2
- package/lib/esm/filters/index.js +8 -9
- package/lib/esm/filters/index.js.map +1 -1
- package/lib/esm/flow-factory.d.ts +3 -3
- package/lib/esm/flow-factory.js +57 -49
- package/lib/esm/flow-factory.js.map +1 -1
- package/lib/esm/functions/index.d.ts +1 -1
- package/lib/esm/functions/index.js +25 -19
- package/lib/esm/functions/index.js.map +1 -1
- package/lib/esm/index.d.ts +12 -12
- package/lib/esm/index.js +94 -77
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/package.json +3 -0
- package/lib/esm/services/hubtype-queues-api.js +14 -14
- package/lib/esm/services/hubtype-queues-api.js.map +1 -1
- package/lib/esm/structured-output/flow-builder-content.js +14 -13
- package/lib/esm/structured-output/flow-builder-content.js.map +1 -1
- package/lib/esm/tracking.d.ts +2 -2
- package/lib/esm/tracking.js +27 -21
- package/lib/esm/tracking.js.map +1 -1
- package/lib/esm/types.d.ts +5 -5
- package/lib/esm/types.js +9 -9
- package/lib/esm/types.js.map +1 -1
- package/lib/esm/user-input/capture-user-input-api.d.ts +2 -2
- package/lib/esm/user-input/capture-user-input-api.js +44 -33
- package/lib/esm/user-input/capture-user-input-api.js.map +1 -1
- package/lib/esm/user-input/index.d.ts +2 -2
- package/lib/esm/user-input/index.js +23 -14
- package/lib/esm/user-input/index.js.map +1 -1
- package/lib/esm/user-input/keyword.d.ts +2 -2
- package/lib/esm/user-input/keyword.js +31 -26
- package/lib/esm/user-input/keyword.js.map +1 -1
- package/lib/esm/user-input/smart-intent.d.ts +2 -2
- package/lib/esm/user-input/smart-intent.js +36 -32
- package/lib/esm/user-input/smart-intent.js.map +1 -1
- package/lib/esm/utils/ai-agent.d.ts +3 -3
- package/lib/esm/utils/ai-agent.js +17 -12
- package/lib/esm/utils/ai-agent.js.map +1 -1
- package/lib/esm/utils/authentication.js +10 -7
- package/lib/esm/utils/authentication.js.map +1 -1
- package/lib/esm/utils/flow-locale.js +14 -18
- package/lib/esm/utils/flow-locale.js.map +1 -1
- package/lib/esm/utils/get-flow-builder-plugin.d.ts +1 -1
- package/lib/esm/utils/get-flow-builder-plugin.js +4 -4
- package/lib/esm/utils/get-flow-builder-plugin.js.map +1 -1
- package/lib/esm/utils/hubtype-assistant-content.d.ts +1 -1
- package/lib/esm/utils/hubtype-assistant-content.js +57 -43
- package/lib/esm/utils/hubtype-assistant-content.js.map +1 -1
- package/lib/esm/utils/input.js +16 -14
- package/lib/esm/utils/input.js.map +1 -1
- package/lib/esm/webview/contents-context.d.ts +1 -1
- package/lib/esm/webview/contents-context.js +13 -11
- package/lib/esm/webview/contents-context.js.map +1 -1
- package/lib/esm/webview/index.d.ts +3 -3
- package/lib/esm/webview/index.js +10 -9
- package/lib/esm/webview/index.js.map +1 -1
- package/lib/esm/webview/types.d.ts +1 -1
- package/lib/esm/webview/types.js +6 -6
- package/lib/esm/webview/types.js.map +1 -1
- package/lib/esm/webview/use-webview-contents.d.ts +1 -1
- package/lib/esm/webview/use-webview-contents.js +46 -39
- package/lib/esm/webview/use-webview-contents.js.map +1 -1
- package/package.json +8 -7
- package/src/content-fields/flow-whatsapp-request-contact-info.tsx +48 -0
- package/src/content-fields/flow-whatsapp-template.tsx +16 -0
- package/src/content-fields/hubtype-fields/index.ts +1 -0
- package/src/content-fields/hubtype-fields/node-types.ts +1 -0
- package/src/content-fields/hubtype-fields/nodes.ts +2 -0
- package/src/content-fields/hubtype-fields/whatsapp-request-contact-info.ts +9 -0
- package/src/content-fields/hubtype-fields/whatsapp-template.ts +5 -0
- package/src/content-fields/index.ts +3 -0
- package/src/flow-factory.ts +6 -0
- package/src/index.ts +5 -5
- package/src/types.ts +6 -6
- package/lib/cjs/action/ai-agent-from-user-input.d.ts +0 -3
- package/lib/cjs/action/ai-agent-from-user-input.js +0 -32
- package/lib/cjs/action/ai-agent-from-user-input.js.map +0 -1
- package/lib/cjs/action/context.d.ts +0 -11
- package/lib/cjs/action/context.js +0 -17
- package/lib/cjs/action/context.js.map +0 -1
- package/lib/cjs/action/fallback.d.ts +0 -3
- package/lib/cjs/action/fallback.js +0 -36
- package/lib/cjs/action/fallback.js.map +0 -1
- package/lib/cjs/action/first-interaction.d.ts +0 -3
- package/lib/cjs/action/first-interaction.js +0 -88
- package/lib/cjs/action/first-interaction.js.map +0 -1
- package/lib/cjs/action/get-contents.d.ts +0 -3
- package/lib/cjs/action/get-contents.js +0 -39
- package/lib/cjs/action/get-contents.js.map +0 -1
- package/lib/cjs/action/index.d.ts +0 -25
- package/lib/cjs/action/index.js +0 -90
- package/lib/cjs/action/index.js.map +0 -1
- package/lib/cjs/action/payload.d.ts +0 -3
- package/lib/cjs/action/payload.js +0 -74
- package/lib/cjs/action/payload.js.map +0 -1
- package/lib/cjs/api.d.ts +0 -40
- package/lib/cjs/api.js +0 -205
- package/lib/cjs/api.js.map +0 -1
- package/lib/cjs/constants.d.ts +0 -13
- package/lib/cjs/constants.js +0 -19
- package/lib/cjs/constants.js.map +0 -1
- package/lib/cjs/content-fields/content-fields-base.d.ts +0 -20
- package/lib/cjs/content-fields/content-fields-base.js +0 -74
- package/lib/cjs/content-fields/content-fields-base.js.map +0 -1
- package/lib/cjs/content-fields/custom-conditional/custom-conditional-v2-evaluators.d.ts +0 -15
- package/lib/cjs/content-fields/custom-conditional/custom-conditional-v2-evaluators.js +0 -71
- package/lib/cjs/content-fields/custom-conditional/custom-conditional-v2-evaluators.js.map +0 -1
- package/lib/cjs/content-fields/custom-conditional/custom-conditional-v2-resolver.d.ts +0 -9
- package/lib/cjs/content-fields/custom-conditional/custom-conditional-v2-resolver.js +0 -58
- package/lib/cjs/content-fields/custom-conditional/custom-conditional-v2-resolver.js.map +0 -1
- package/lib/cjs/content-fields/custom-conditional/flow-custom-condition-v2.d.ts +0 -17
- package/lib/cjs/content-fields/custom-conditional/flow-custom-condition-v2.js +0 -79
- package/lib/cjs/content-fields/custom-conditional/flow-custom-condition-v2.js.map +0 -1
- package/lib/cjs/content-fields/flow-ai-agent-base.d.ts +0 -25
- package/lib/cjs/content-fields/flow-ai-agent-base.js +0 -93
- package/lib/cjs/content-fields/flow-ai-agent-base.js.map +0 -1
- package/lib/cjs/content-fields/flow-ai-agent-router.d.ts +0 -21
- package/lib/cjs/content-fields/flow-ai-agent-router.js +0 -125
- package/lib/cjs/content-fields/flow-ai-agent-router.js.map +0 -1
- package/lib/cjs/content-fields/flow-ai-agent.d.ts +0 -17
- package/lib/cjs/content-fields/flow-ai-agent.js +0 -64
- package/lib/cjs/content-fields/flow-ai-agent.js.map +0 -1
- package/lib/cjs/content-fields/flow-bot-action.d.ts +0 -14
- package/lib/cjs/content-fields/flow-bot-action.js +0 -45
- package/lib/cjs/content-fields/flow-bot-action.js.map +0 -1
- package/lib/cjs/content-fields/flow-button.d.ts +0 -31
- package/lib/cjs/content-fields/flow-button.js +0 -86
- package/lib/cjs/content-fields/flow-button.js.map +0 -1
- package/lib/cjs/content-fields/flow-capture-user-input.d.ts +0 -14
- package/lib/cjs/content-fields/flow-capture-user-input.js +0 -45
- package/lib/cjs/content-fields/flow-capture-user-input.js.map +0 -1
- package/lib/cjs/content-fields/flow-carousel.d.ts +0 -22
- package/lib/cjs/content-fields/flow-carousel.js +0 -152
- package/lib/cjs/content-fields/flow-carousel.js.map +0 -1
- package/lib/cjs/content-fields/flow-channel-conditional.d.ts +0 -14
- package/lib/cjs/content-fields/flow-channel-conditional.js +0 -57
- package/lib/cjs/content-fields/flow-channel-conditional.js.map +0 -1
- package/lib/cjs/content-fields/flow-country-conditional.d.ts +0 -13
- package/lib/cjs/content-fields/flow-country-conditional.js +0 -59
- package/lib/cjs/content-fields/flow-country-conditional.js.map +0 -1
- package/lib/cjs/content-fields/flow-custom-conditional.d.ts +0 -17
- package/lib/cjs/content-fields/flow-custom-conditional.js +0 -89
- package/lib/cjs/content-fields/flow-custom-conditional.js.map +0 -1
- package/lib/cjs/content-fields/flow-element.d.ts +0 -22
- package/lib/cjs/content-fields/flow-element.js +0 -50
- package/lib/cjs/content-fields/flow-element.js.map +0 -1
- package/lib/cjs/content-fields/flow-go-to-flow.d.ts +0 -13
- package/lib/cjs/content-fields/flow-go-to-flow.js +0 -51
- package/lib/cjs/content-fields/flow-go-to-flow.js.map +0 -1
- package/lib/cjs/content-fields/flow-handoff.d.ts +0 -17
- package/lib/cjs/content-fields/flow-handoff.js +0 -68
- package/lib/cjs/content-fields/flow-handoff.js.map +0 -1
- package/lib/cjs/content-fields/flow-image.d.ts +0 -10
- package/lib/cjs/content-fields/flow-image.js +0 -33
- package/lib/cjs/content-fields/flow-image.js.map +0 -1
- package/lib/cjs/content-fields/flow-queue-status-conditional.d.ts +0 -30
- package/lib/cjs/content-fields/flow-queue-status-conditional.js +0 -95
- package/lib/cjs/content-fields/flow-queue-status-conditional.js.map +0 -1
- package/lib/cjs/content-fields/flow-rating.d.ts +0 -15
- package/lib/cjs/content-fields/flow-rating.js +0 -66
- package/lib/cjs/content-fields/flow-rating.js.map +0 -1
- package/lib/cjs/content-fields/flow-text.d.ts +0 -15
- package/lib/cjs/content-fields/flow-text.js +0 -60
- package/lib/cjs/content-fields/flow-text.js.map +0 -1
- package/lib/cjs/content-fields/flow-video.d.ts +0 -10
- package/lib/cjs/content-fields/flow-video.js +0 -33
- package/lib/cjs/content-fields/flow-video.js.map +0 -1
- package/lib/cjs/content-fields/flow-webview.d.ts +0 -16
- package/lib/cjs/content-fields/flow-webview.js +0 -78
- package/lib/cjs/content-fields/flow-webview.js.map +0 -1
- package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.d.ts +0 -21
- package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.js +0 -92
- package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.js.map +0 -1
- package/lib/cjs/content-fields/flow-whatsapp-template.d.ts +0 -36
- package/lib/cjs/content-fields/flow-whatsapp-template.js +0 -253
- package/lib/cjs/content-fields/flow-whatsapp-template.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/ai-agent-router.d.ts +0 -21
- package/lib/cjs/content-fields/hubtype-fields/ai-agent-router.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/ai-agent-router.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/ai-agent.d.ts +0 -25
- package/lib/cjs/content-fields/hubtype-fields/ai-agent.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/ai-agent.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/bot-action.d.ts +0 -10
- package/lib/cjs/content-fields/hubtype-fields/bot-action.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/bot-action.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/button.d.ts +0 -8
- package/lib/cjs/content-fields/hubtype-fields/button.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/button.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/capture-user-input.d.ts +0 -19
- package/lib/cjs/content-fields/hubtype-fields/capture-user-input.js +0 -12
- package/lib/cjs/content-fields/hubtype-fields/capture-user-input.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/carousel.d.ts +0 -17
- package/lib/cjs/content-fields/hubtype-fields/carousel.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/carousel.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/channel-conditional.d.ts +0 -10
- package/lib/cjs/content-fields/hubtype-fields/channel-conditional.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/channel-conditional.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/common.d.ts +0 -83
- package/lib/cjs/content-fields/hubtype-fields/common.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/common.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/country-conditional.d.ts +0 -10
- package/lib/cjs/content-fields/hubtype-fields/country-conditional.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/country-conditional.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/custom-conditional-v2.d.ts +0 -56
- package/lib/cjs/content-fields/hubtype-fields/custom-conditional-v2.js +0 -36
- package/lib/cjs/content-fields/hubtype-fields/custom-conditional-v2.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/custom-conditional.d.ts +0 -11
- package/lib/cjs/content-fields/hubtype-fields/custom-conditional.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/custom-conditional.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/fallback.d.ts +0 -9
- package/lib/cjs/content-fields/hubtype-fields/fallback.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/fallback.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/function.d.ts +0 -30
- package/lib/cjs/content-fields/hubtype-fields/function.js +0 -11
- package/lib/cjs/content-fields/hubtype-fields/function.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/go-to-flow.d.ts +0 -9
- package/lib/cjs/content-fields/hubtype-fields/go-to-flow.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/go-to-flow.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/handoff.d.ts +0 -11
- package/lib/cjs/content-fields/hubtype-fields/handoff.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/handoff.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/image.d.ts +0 -8
- package/lib/cjs/content-fields/hubtype-fields/image.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/image.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/index.d.ts +0 -26
- package/lib/cjs/content-fields/hubtype-fields/index.js +0 -30
- package/lib/cjs/content-fields/hubtype-fields/index.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/keyword.d.ts +0 -9
- package/lib/cjs/content-fields/hubtype-fields/keyword.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/keyword.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/node-types.d.ts +0 -30
- package/lib/cjs/content-fields/hubtype-fields/node-types.js +0 -37
- package/lib/cjs/content-fields/hubtype-fields/node-types.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/nodes.d.ts +0 -25
- package/lib/cjs/content-fields/hubtype-fields/nodes.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/nodes.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/payload.d.ts +0 -8
- package/lib/cjs/content-fields/hubtype-fields/payload.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/payload.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/queue-status-conditional.d.ts +0 -25
- package/lib/cjs/content-fields/hubtype-fields/queue-status-conditional.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/queue-status-conditional.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/rating.d.ts +0 -23
- package/lib/cjs/content-fields/hubtype-fields/rating.js +0 -9
- package/lib/cjs/content-fields/hubtype-fields/rating.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/smart-intent.d.ts +0 -12
- package/lib/cjs/content-fields/hubtype-fields/smart-intent.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/smart-intent.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/text.d.ts +0 -11
- package/lib/cjs/content-fields/hubtype-fields/text.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/text.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/url.d.ts +0 -8
- package/lib/cjs/content-fields/hubtype-fields/url.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/url.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/video.d.ts +0 -8
- package/lib/cjs/content-fields/hubtype-fields/video.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/video.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/webview.d.ts +0 -17
- package/lib/cjs/content-fields/hubtype-fields/webview.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/webview.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.d.ts +0 -21
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-cta-url-button.d.ts +0 -17
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-cta-url-button.js +0 -3
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-cta-url-button.js.map +0 -1
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-template.d.ts +0 -92
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-template.js +0 -9
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-template.js.map +0 -1
- package/lib/cjs/content-fields/index.d.ts +0 -24
- package/lib/cjs/content-fields/index.js +0 -50
- package/lib/cjs/content-fields/index.js.map +0 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.d.ts +0 -14
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +0 -41
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +0 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +0 -13
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +0 -36
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +0 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +0 -14
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +0 -46
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +0 -1
- package/lib/cjs/content-fields/whatsapp-button-list/index.d.ts +0 -3
- package/lib/cjs/content-fields/whatsapp-button-list/index.js +0 -10
- package/lib/cjs/content-fields/whatsapp-button-list/index.js.map +0 -1
- package/lib/cjs/filters/index.d.ts +0 -12
- package/lib/cjs/filters/index.js +0 -17
- package/lib/cjs/filters/index.js.map +0 -1
- package/lib/cjs/flow-factory.d.ts +0 -12
- package/lib/cjs/flow-factory.js +0 -67
- package/lib/cjs/flow-factory.js.map +0 -1
- package/lib/cjs/functions/index.d.ts +0 -11
- package/lib/cjs/functions/index.js +0 -49
- package/lib/cjs/functions/index.js.map +0 -1
- package/lib/cjs/index.d.ts +0 -45
- package/lib/cjs/index.js +0 -178
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/services/hubtype-queues-api.d.ts +0 -14
- package/lib/cjs/services/hubtype-queues-api.js +0 -26
- package/lib/cjs/services/hubtype-queues-api.js.map +0 -1
- package/lib/cjs/structured-output/flow-builder-content.d.ts +0 -13
- package/lib/cjs/structured-output/flow-builder-content.js +0 -15
- package/lib/cjs/structured-output/flow-builder-content.js.map +0 -1
- package/lib/cjs/tracking.d.ts +0 -16
- package/lib/cjs/tracking.js +0 -71
- package/lib/cjs/tracking.js.map +0 -1
- package/lib/cjs/types.d.ts +0 -62
- package/lib/cjs/types.js +0 -14
- package/lib/cjs/types.js.map +0 -1
- package/lib/cjs/user-input/capture-user-input-api.d.ts +0 -21
- package/lib/cjs/user-input/capture-user-input-api.js +0 -88
- package/lib/cjs/user-input/capture-user-input-api.js.map +0 -1
- package/lib/cjs/user-input/index.d.ts +0 -4
- package/lib/cjs/user-input/index.js +0 -37
- package/lib/cjs/user-input/index.js.map +0 -1
- package/lib/cjs/user-input/keyword.d.ts +0 -27
- package/lib/cjs/user-input/keyword.js +0 -84
- package/lib/cjs/user-input/keyword.js.map +0 -1
- package/lib/cjs/user-input/smart-intent.d.ts +0 -24
- package/lib/cjs/user-input/smart-intent.js +0 -89
- package/lib/cjs/user-input/smart-intent.js.map +0 -1
- package/lib/cjs/utils/ai-agent.d.ts +0 -11
- package/lib/cjs/utils/ai-agent.js +0 -28
- package/lib/cjs/utils/ai-agent.js.map +0 -1
- package/lib/cjs/utils/authentication.d.ts +0 -2
- package/lib/cjs/utils/authentication.js +0 -21
- package/lib/cjs/utils/authentication.js.map +0 -1
- package/lib/cjs/utils/flow-locale.d.ts +0 -22
- package/lib/cjs/utils/flow-locale.js +0 -79
- package/lib/cjs/utils/flow-locale.js.map +0 -1
- package/lib/cjs/utils/get-flow-builder-plugin.d.ts +0 -3
- package/lib/cjs/utils/get-flow-builder-plugin.js +0 -16
- package/lib/cjs/utils/get-flow-builder-plugin.js.map +0 -1
- package/lib/cjs/utils/hubtype-assistant-content.d.ts +0 -12
- package/lib/cjs/utils/hubtype-assistant-content.js +0 -173
- package/lib/cjs/utils/hubtype-assistant-content.js.map +0 -1
- package/lib/cjs/utils/input.d.ts +0 -6
- package/lib/cjs/utils/input.js +0 -35
- package/lib/cjs/utils/input.js.map +0 -1
- package/lib/cjs/webview/contents-context.d.ts +0 -2
- package/lib/cjs/webview/contents-context.js +0 -12
- package/lib/cjs/webview/contents-context.js.map +0 -1
- package/lib/cjs/webview/index.d.ts +0 -3
- package/lib/cjs/webview/index.js +0 -10
- package/lib/cjs/webview/index.js.map +0 -1
- package/lib/cjs/webview/types.d.ts +0 -47
- package/lib/cjs/webview/types.js +0 -9
- package/lib/cjs/webview/types.js.map +0 -1
- package/lib/cjs/webview/use-webview-contents.d.ts +0 -2
- package/lib/cjs/webview/use-webview-contents.js +0 -83
- package/lib/cjs/webview/use-webview-contents.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WhatsappButtonListRowProps } from '@botonic/react';
|
|
2
|
-
import type { FlowBuilderApi } from '../../api';
|
|
3
|
-
import { ContentFieldsBase } from '../content-fields-base';
|
|
4
|
-
import type { HtWhatsappButtonListRow } from '../hubtype-fields';
|
|
2
|
+
import type { FlowBuilderApi } from '../../api.js';
|
|
3
|
+
import { ContentFieldsBase } from '../content-fields-base.js';
|
|
4
|
+
import type { HtWhatsappButtonListRow } from '../hubtype-fields/index.js';
|
|
5
5
|
export declare class FlowWhatsappButtonListRow extends ContentFieldsBase {
|
|
6
6
|
title: string;
|
|
7
7
|
description: string;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
this.title = '';
|
|
10
|
-
this.description = '';
|
|
11
|
-
}
|
|
1
|
+
import { SOURCE_INFO_SEPARATOR } from "../../constants.js";
|
|
2
|
+
import { ContentFieldsBase } from "../content-fields-base.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FlowWhatsappButtonListRow extends ContentFieldsBase {
|
|
12
9
|
static fromHubtypeCMS(component, locale, cmsApi) {
|
|
13
10
|
const newRow = new FlowWhatsappButtonListRow(component.id);
|
|
14
11
|
newRow.title = FlowWhatsappButtonListRow.getTextByLocale(locale, component.text);
|
|
@@ -30,12 +27,17 @@ class FlowWhatsappButtonListRow extends content_fields_base_1.ContentFieldsBase
|
|
|
30
27
|
return {
|
|
31
28
|
id: this.getRowId(rowIndex, sectionIndex),
|
|
32
29
|
title: this.title,
|
|
33
|
-
description: this.description
|
|
30
|
+
description: this.description
|
|
34
31
|
};
|
|
35
32
|
}
|
|
36
33
|
getRowId(rowIndex, sectionIndex) {
|
|
37
|
-
return `${this.targetId}${
|
|
34
|
+
return `${this.targetId}${SOURCE_INFO_SEPARATOR}${sectionIndex}.${rowIndex}`;
|
|
35
|
+
}
|
|
36
|
+
constructor(...args){
|
|
37
|
+
super(...args), this.title = '', this.description = '';
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
|
|
41
|
+
export { FlowWhatsappButtonListRow };
|
|
42
|
+
|
|
41
43
|
//# sourceMappingURL=flow-whatsapp-button-list-row.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-whatsapp-button-list-row.js","
|
|
1
|
+
{"version":3,"file":"content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.tsx"],"sourcesContent":["import type { WhatsappButtonListRowProps } from '@botonic/react'\n\nimport type { FlowBuilderApi } from '../../api'\nimport { SOURCE_INFO_SEPARATOR } from '../../constants'\nimport { ContentFieldsBase } from '../content-fields-base'\nimport type { HtWhatsappButtonListRow } from '../hubtype-fields'\n\nexport class FlowWhatsappButtonListRow extends ContentFieldsBase {\n public title = ''\n public description = ''\n public targetId?: string\n\n static fromHubtypeCMS(\n component: HtWhatsappButtonListRow,\n locale: string,\n cmsApi: FlowBuilderApi\n ): FlowWhatsappButtonListRow {\n const newRow = new FlowWhatsappButtonListRow(component.id)\n newRow.title = FlowWhatsappButtonListRow.getTextByLocale(\n locale,\n component.text\n )\n newRow.description = FlowWhatsappButtonListRow.getTextByLocale(\n locale,\n component.description\n )\n newRow.targetId = cmsApi.getPayload(component.target)\n\n return newRow\n }\n\n async trackFlow(): Promise<void> {\n return\n }\n\n async processContent(): Promise<void> {\n return\n }\n\n renderRow(\n rowIndex: number,\n sectionIndex: number\n ): WhatsappButtonListRowProps | undefined {\n if (!this.targetId) {\n console.error(`Row with title: '${this.title}' has no target`)\n return undefined\n }\n return {\n id: this.getRowId(rowIndex, sectionIndex),\n title: this.title,\n description: this.description,\n }\n }\n\n private getRowId(rowIndex: number, sectionIndex: number): string {\n return `${this.targetId}${SOURCE_INFO_SEPARATOR}${sectionIndex}.${rowIndex}`\n }\n}\n"],"names":["SOURCE_INFO_SEPARATOR","ContentFieldsBase","FlowWhatsappButtonListRow","component","locale","cmsApi","newRow","rowIndex","sectionIndex","console","undefined"],"mappings":";;;;;AAGuD;AACG;AAGnD,MAAME,yBAAyBA,SAASD,iBAAiBA;IAK9D,OAAO,eACLE,SAAkC,EAClCC,MAAc,EACdC,MAAsB,EACK;QAC3B,MAAMC,SAAS,IAAIJ,yBAAyBA,CAACC,UAAU,EAAE;QACzDG,OAAO,KAAK,GAAGJ,yBAAyBA,CAAC,eAAe,CACtDE,QACAD,UAAU,IAAI;QAEhBG,OAAO,WAAW,GAAGJ,yBAAyBA,CAAC,eAAe,CAC5DE,QACAD,UAAU,WAAW;QAEvBG,OAAO,QAAQ,GAAGD,OAAO,UAAU,CAACF,UAAU,MAAM;QAEpD,OAAOG;IACT;IAEA,MAAM,YAA2B;QAC/B;IACF;IAEA,MAAM,iBAAgC;QACpC;IACF;IAEA,UACEC,QAAgB,EAChBC,YAAoB,EACoB;QACxC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClBC,QAAQ,KAAK,CAAC,CAAC,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;YAC7D,OAAOC;QACT;QACA,OAAO;YACL,IAAI,IAAI,CAAC,QAAQ,CAACH,UAAUC;YAC5B,OAAO,IAAI,CAAC,KAAK;YACjB,aAAa,IAAI,CAAC,WAAW;QAC/B;IACF;IAEQ,SAASD,QAAgB,EAAEC,YAAoB,EAAU;QAC/D,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAGR,qBAAqBA,GAAGQ,aAAa,CAAC,EAAED,UAAU;IAC9E;;QAjDK,qBACE,QAAQ,SACR,cAAc;;AAgDvB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { WhatsappButtonListSectionProps } from '@botonic/react';
|
|
2
|
-
import type { FlowBuilderApi } from '../../api';
|
|
3
|
-
import { ContentFieldsBase } from '../content-fields-base';
|
|
4
|
-
import type { HtWhatsappButtonListSection } from '../hubtype-fields';
|
|
5
|
-
import { FlowWhatsappButtonListRow } from './flow-whatsapp-button-list-row';
|
|
2
|
+
import type { FlowBuilderApi } from '../../api.js';
|
|
3
|
+
import { ContentFieldsBase } from '../content-fields-base.js';
|
|
4
|
+
import type { HtWhatsappButtonListSection } from '../hubtype-fields/index.js';
|
|
5
|
+
import { FlowWhatsappButtonListRow } from './flow-whatsapp-button-list-row.js';
|
|
6
6
|
export declare class FlowWhatsappButtonListSection extends ContentFieldsBase {
|
|
7
7
|
title: string;
|
|
8
8
|
rows: FlowWhatsappButtonListRow[];
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
this.title = '';
|
|
10
|
-
this.rows = [];
|
|
11
|
-
}
|
|
1
|
+
import { ContentFieldsBase } from "../content-fields-base.js";
|
|
2
|
+
import { FlowWhatsappButtonListRow } from "./flow-whatsapp-button-list-row.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FlowWhatsappButtonListSection extends ContentFieldsBase {
|
|
12
9
|
static fromHubtypeCMS(component, locale, cmsApi) {
|
|
13
10
|
const newButton = new FlowWhatsappButtonListSection(component.id);
|
|
14
11
|
newButton.title = FlowWhatsappButtonListSection.getTextByLocale(locale, component.title);
|
|
15
|
-
newButton.rows = component.rows.map(row
|
|
12
|
+
newButton.rows = component.rows.map((row)=>FlowWhatsappButtonListRow.fromHubtypeCMS(row, locale, cmsApi));
|
|
16
13
|
return newButton;
|
|
17
14
|
}
|
|
18
15
|
async trackFlow() {
|
|
@@ -22,15 +19,23 @@ class FlowWhatsappButtonListSection extends content_fields_base_1.ContentFieldsB
|
|
|
22
19
|
return;
|
|
23
20
|
}
|
|
24
21
|
renderSection(sectionIndex) {
|
|
25
|
-
const rows = this.rows.reduce((acc, row, rowIndex)
|
|
22
|
+
const rows = this.rows.reduce((acc, row, rowIndex)=>{
|
|
26
23
|
const botonicRow = row.renderRow(rowIndex, sectionIndex);
|
|
27
24
|
if (botonicRow) {
|
|
28
25
|
acc.push(botonicRow);
|
|
29
26
|
}
|
|
30
27
|
return acc;
|
|
31
28
|
}, []);
|
|
32
|
-
return {
|
|
29
|
+
return {
|
|
30
|
+
title: this.title,
|
|
31
|
+
rows
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
constructor(...args){
|
|
35
|
+
super(...args), this.title = '', this.rows = [];
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
|
-
|
|
38
|
+
|
|
39
|
+
export { FlowWhatsappButtonListSection };
|
|
40
|
+
|
|
36
41
|
//# sourceMappingURL=flow-whatsapp-button-list-section.js.map
|
package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-whatsapp-button-list-section.js","
|
|
1
|
+
{"version":3,"file":"content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.tsx"],"sourcesContent":["import type {\n WhatsappButtonListRowProps,\n WhatsappButtonListSectionProps,\n} from '@botonic/react'\n\nimport type { FlowBuilderApi } from '../../api'\nimport { ContentFieldsBase } from '../content-fields-base'\nimport type { HtWhatsappButtonListSection } from '../hubtype-fields'\nimport { FlowWhatsappButtonListRow } from './flow-whatsapp-button-list-row'\n\nexport class FlowWhatsappButtonListSection extends ContentFieldsBase {\n public title = ''\n public rows: FlowWhatsappButtonListRow[] = []\n\n static fromHubtypeCMS(\n component: HtWhatsappButtonListSection,\n locale: string,\n cmsApi: FlowBuilderApi\n ): FlowWhatsappButtonListSection {\n const newButton = new FlowWhatsappButtonListSection(component.id)\n newButton.title = FlowWhatsappButtonListSection.getTextByLocale(\n locale,\n component.title\n )\n newButton.rows = component.rows.map(row =>\n FlowWhatsappButtonListRow.fromHubtypeCMS(row, locale, cmsApi)\n )\n return newButton\n }\n\n async trackFlow(): Promise<void> {\n return\n }\n\n async processContent(): Promise<void> {\n return\n }\n\n renderSection(sectionIndex: number): WhatsappButtonListSectionProps {\n const rows = this.rows.reduce(\n (acc: WhatsappButtonListRowProps[], row, rowIndex) => {\n const botonicRow = row.renderRow(rowIndex, sectionIndex)\n if (botonicRow) {\n acc.push(botonicRow)\n }\n return acc\n },\n []\n )\n\n return { title: this.title, rows }\n }\n}\n"],"names":["ContentFieldsBase","FlowWhatsappButtonListRow","FlowWhatsappButtonListSection","component","locale","cmsApi","newButton","row","sectionIndex","rows","acc","rowIndex","botonicRow"],"mappings":";;;;;AAM0D;AAEiB;AAEpE,MAAME,6BAA6BA,SAASF,iBAAiBA;IAIlE,OAAO,eACLG,SAAsC,EACtCC,MAAc,EACdC,MAAsB,EACS;QAC/B,MAAMC,YAAY,IAAIJ,6BAA6BA,CAACC,UAAU,EAAE;QAChEG,UAAU,KAAK,GAAGJ,6BAA6BA,CAAC,eAAe,CAC7DE,QACAD,UAAU,KAAK;QAEjBG,UAAU,IAAI,GAAGH,UAAU,IAAI,CAAC,GAAG,CAACI,CAAAA,MAClCN,wCAAwC,CAACM,KAAKH,QAAQC;QAExD,OAAOC;IACT;IAEA,MAAM,YAA2B;QAC/B;IACF;IAEA,MAAM,iBAAgC;QACpC;IACF;IAEA,cAAcE,YAAoB,EAAkC;QAClE,MAAMC,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAC3B,CAACC,KAAmCH,KAAKI;YACvC,MAAMC,aAAaL,IAAI,SAAS,CAACI,UAAUH;YAC3C,IAAII,YAAY;gBACdF,IAAI,IAAI,CAACE;YACX;YACA,OAAOF;QACT,GACA,EAAE;QAGJ,OAAO;YAAE,OAAO,IAAI,CAAC,KAAK;YAAED;QAAK;IACnC;;QAzCK,qBACE,QAAQ,SACR,OAAoC,EAAE;;AAwC/C"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type BotContext } from '@botonic/core';
|
|
2
|
-
import type { FlowBuilderApi } from '../../api';
|
|
3
|
-
import { ContentFieldsBase } from '../content-fields-base';
|
|
4
|
-
import type { HtWhatsappButtonListNode } from '../hubtype-fields';
|
|
5
|
-
import { FlowWhatsappButtonListSection } from './flow-whatsapp-button-list-section';
|
|
2
|
+
import type { FlowBuilderApi } from '../../api.js';
|
|
3
|
+
import { ContentFieldsBase } from '../content-fields-base.js';
|
|
4
|
+
import type { HtWhatsappButtonListNode } from '../hubtype-fields/index.js';
|
|
5
|
+
import { FlowWhatsappButtonListSection } from './flow-whatsapp-button-list-section.js';
|
|
6
6
|
export declare class FlowWhatsappButtonList extends ContentFieldsBase {
|
|
7
7
|
text: string;
|
|
8
8
|
listButtonText: string;
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { isWhatsapp } from "@botonic/core";
|
|
3
|
+
import { Button, Text, WhatsappButtonList } from "@botonic/react";
|
|
4
|
+
import { trackOneContent } from "../../tracking.js";
|
|
5
|
+
import { ContentFieldsBase } from "../content-fields-base.js";
|
|
6
|
+
import { FlowWhatsappButtonListSection } from "./flow-whatsapp-button-list-section.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class FlowWhatsappButtonList extends ContentFieldsBase {
|
|
17
21
|
static fromHubtypeCMS(component, locale, cmsApi) {
|
|
18
22
|
const newWhatsappButtonList = new FlowWhatsappButtonList(component.id);
|
|
19
23
|
newWhatsappButtonList.code = component.code;
|
|
20
24
|
newWhatsappButtonList.text = FlowWhatsappButtonList.getTextByLocale(locale, component.content.text);
|
|
21
|
-
newWhatsappButtonList.listButtonText =
|
|
22
|
-
|
|
23
|
-
newWhatsappButtonList.sections = component.content.sections.map(section => flow_whatsapp_button_list_section_1.FlowWhatsappButtonListSection.fromHubtypeCMS(section, locale, cmsApi));
|
|
25
|
+
newWhatsappButtonList.listButtonText = FlowWhatsappButtonList.getTextByLocale(locale, component.content.button_text);
|
|
26
|
+
newWhatsappButtonList.sections = component.content.sections.map((section)=>FlowWhatsappButtonListSection.fromHubtypeCMS(section, locale, cmsApi));
|
|
24
27
|
newWhatsappButtonList.followUp = component.follow_up;
|
|
25
28
|
return newWhatsappButtonList;
|
|
26
29
|
}
|
|
27
30
|
async trackFlow(botContext) {
|
|
28
|
-
await
|
|
31
|
+
await trackOneContent(botContext, this);
|
|
29
32
|
}
|
|
30
33
|
async processContent(botContext) {
|
|
31
34
|
await this.trackFlow(botContext);
|
|
@@ -34,13 +37,30 @@ class FlowWhatsappButtonList extends content_fields_base_1.ContentFieldsBase {
|
|
|
34
37
|
}
|
|
35
38
|
toBotonic(botContext) {
|
|
36
39
|
const replacedText = this.replaceVariables(this.text, botContext);
|
|
37
|
-
if (!
|
|
38
|
-
const rows = this.sections.flatMap(section
|
|
39
|
-
const buttons = rows.map(row
|
|
40
|
-
|
|
40
|
+
if (!isWhatsapp(botContext.session)) {
|
|
41
|
+
const rows = this.sections.flatMap((section)=>section.rows);
|
|
42
|
+
const buttons = rows.map((row)=>/*#__PURE__*/ jsx(Button, {
|
|
43
|
+
payload: row.targetId,
|
|
44
|
+
children: row.title
|
|
45
|
+
}, row.id));
|
|
46
|
+
return /*#__PURE__*/ jsxs(Text, {
|
|
47
|
+
children: [
|
|
48
|
+
replacedText,
|
|
49
|
+
buttons
|
|
50
|
+
]
|
|
51
|
+
});
|
|
41
52
|
}
|
|
42
|
-
return
|
|
53
|
+
return /*#__PURE__*/ jsx(WhatsappButtonList, {
|
|
54
|
+
body: replacedText,
|
|
55
|
+
button: this.listButtonText,
|
|
56
|
+
sections: this.sections.map((section, sectionIndex)=>section.renderSection(sectionIndex))
|
|
57
|
+
}, this.id);
|
|
58
|
+
}
|
|
59
|
+
constructor(...args){
|
|
60
|
+
super(...args), this.text = '', this.listButtonText = '', this.sections = [];
|
|
43
61
|
}
|
|
44
62
|
}
|
|
45
|
-
|
|
63
|
+
|
|
64
|
+
export { FlowWhatsappButtonList };
|
|
65
|
+
|
|
46
66
|
//# sourceMappingURL=flow-whatsapp-button-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-whatsapp-button-list.js","
|
|
1
|
+
{"version":3,"file":"content-fields/whatsapp-button-list/flow-whatsapp-button-list.js","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list.tsx"],"sourcesContent":["import { type BotContext, isWhatsapp } from '@botonic/core'\nimport { Button, Text, WhatsappButtonList } from '@botonic/react'\n\nimport type { FlowBuilderApi } from '../../api'\nimport { trackOneContent } from '../../tracking'\nimport { ContentFieldsBase } from '../content-fields-base'\nimport type { HtWhatsappButtonListNode } from '../hubtype-fields'\nimport { FlowWhatsappButtonListSection } from './flow-whatsapp-button-list-section'\n\nexport class FlowWhatsappButtonList extends ContentFieldsBase {\n public text = ''\n public listButtonText = ''\n public sections: FlowWhatsappButtonListSection[] = []\n\n static fromHubtypeCMS(\n component: HtWhatsappButtonListNode,\n locale: string,\n cmsApi: FlowBuilderApi\n ): FlowWhatsappButtonList {\n const newWhatsappButtonList = new FlowWhatsappButtonList(component.id)\n newWhatsappButtonList.code = component.code\n newWhatsappButtonList.text = FlowWhatsappButtonList.getTextByLocale(\n locale,\n component.content.text\n )\n newWhatsappButtonList.listButtonText =\n FlowWhatsappButtonList.getTextByLocale(\n locale,\n component.content.button_text\n )\n newWhatsappButtonList.sections = component.content.sections.map(section =>\n FlowWhatsappButtonListSection.fromHubtypeCMS(section, locale, cmsApi)\n )\n newWhatsappButtonList.followUp = component.follow_up\n\n return newWhatsappButtonList\n }\n\n async trackFlow(botContext: BotContext): Promise<void> {\n await trackOneContent(botContext, this)\n }\n\n async processContent(botContext: BotContext): Promise<void> {\n await this.trackFlow(botContext)\n await this.filterContent(botContext, this)\n return\n }\n\n toBotonic(botContext: BotContext): JSX.Element {\n const replacedText = this.replaceVariables(this.text, botContext)\n\n if (!isWhatsapp(botContext.session)) {\n const rows = this.sections.flatMap(section => section.rows)\n const buttons = rows.map(row => (\n <Button key={row.id} payload={row.targetId}>\n {row.title}\n </Button>\n ))\n\n return (\n <Text>\n {replacedText}\n {buttons}\n </Text>\n )\n }\n\n return (\n <WhatsappButtonList\n key={this.id}\n body={replacedText}\n button={this.listButtonText}\n sections={this.sections.map((section, sectionIndex) =>\n section.renderSection(sectionIndex)\n )}\n />\n )\n }\n}\n"],"names":["isWhatsapp","Button","Text","WhatsappButtonList","trackOneContent","ContentFieldsBase","FlowWhatsappButtonListSection","FlowWhatsappButtonList","component","locale","cmsApi","newWhatsappButtonList","section","botContext","replacedText","rows","buttons","row","sectionIndex"],"mappings":";;;;;;;;;;;;;;AAA2D;AACM;AAGjB;AACU;AAEyB;AAE5E,MAAMO,sBAAsBA,SAASF,iBAAiBA;IAK3D,OAAO,eACLG,SAAmC,EACnCC,MAAc,EACdC,MAAsB,EACE;QACxB,MAAMC,wBAAwB,IAAIJ,sBAAsBA,CAACC,UAAU,EAAE;QACrEG,sBAAsB,IAAI,GAAGH,UAAU,IAAI;QAC3CG,sBAAsB,IAAI,GAAGJ,sBAAsBA,CAAC,eAAe,CACjEE,QACAD,UAAU,OAAO,CAAC,IAAI;QAExBG,sBAAsB,cAAc,GAClCJ,sBAAsBA,CAAC,eAAe,CACpCE,QACAD,UAAU,OAAO,CAAC,WAAW;QAEjCG,sBAAsB,QAAQ,GAAGH,UAAU,OAAO,CAAC,QAAQ,CAAC,GAAG,CAACI,CAAAA,UAC9DN,4CAA4C,CAACM,SAASH,QAAQC;QAEhEC,sBAAsB,QAAQ,GAAGH,UAAU,SAAS;QAEpD,OAAOG;IACT;IAEA,MAAM,UAAUE,UAAsB,EAAiB;QACrD,MAAMT,eAAeA,CAACS,YAAY,IAAI;IACxC;IAEA,MAAM,eAAeA,UAAsB,EAAiB;QAC1D,MAAM,IAAI,CAAC,SAAS,CAACA;QACrB,MAAM,IAAI,CAAC,aAAa,CAACA,YAAY,IAAI;QACzC;IACF;IAEA,UAAUA,UAAsB,EAAe;QAC7C,MAAMC,eAAe,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAED;QAEtD,IAAI,CAACb,UAAUA,CAACa,WAAW,OAAO,GAAG;YACnC,MAAME,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAACH,CAAAA,UAAWA,QAAQ,IAAI;YAC1D,MAAMI,UAAUD,KAAK,GAAG,CAACE,CAAAA,oBACvB,IAAChB,MAAMA;oBAAc,SAASgB,IAAI,QAAQ;8BACvCA,IAAI,KAAK;mBADCA,IAAI,EAAE;YAKrB,qBACE,KAACf,IAAIA;;oBACFY;oBACAE;;;QAGP;QAEA,qBACE,IAACb,kBAAkBA;YAEjB,MAAMW;YACN,QAAQ,IAAI,CAAC,cAAc;YAC3B,UAAU,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAACF,SAASM,eACpCN,QAAQ,aAAa,CAACM;WAJnB,IAAI,CAAC,EAAE;IAQlB;;QApEK,qBACE,OAAO,SACP,iBAAiB,SACjB,WAA4C,EAAE;;AAkEvD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { FlowWhatsappButtonList } from './flow-whatsapp-button-list';
|
|
2
|
-
export { FlowWhatsappButtonListRow } from './flow-whatsapp-button-list-row';
|
|
3
|
-
export { FlowWhatsappButtonListSection } from './flow-whatsapp-button-list-section';
|
|
1
|
+
export { FlowWhatsappButtonList } from './flow-whatsapp-button-list.js';
|
|
2
|
+
export { FlowWhatsappButtonListRow } from './flow-whatsapp-button-list-row.js';
|
|
3
|
+
export { FlowWhatsappButtonListSection } from './flow-whatsapp-button-list-section.js';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export { FlowWhatsappButtonList } from "./flow-whatsapp-button-list.js";
|
|
9
|
+
export { FlowWhatsappButtonListRow } from "./flow-whatsapp-button-list-row.js";
|
|
10
|
+
export { FlowWhatsappButtonListSection } from "./flow-whatsapp-button-list-section.js";
|
|
11
|
+
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"content-fields/whatsapp-button-list/index.js","sources":["../../../../src/content-fields/whatsapp-button-list/index.ts"],"sourcesContent":["export { FlowWhatsappButtonList } from './flow-whatsapp-button-list'\nexport { FlowWhatsappButtonListRow } from './flow-whatsapp-button-list-row'\nexport { FlowWhatsappButtonListSection } from './flow-whatsapp-button-list-section'\n"],"names":["FlowWhatsappButtonList","FlowWhatsappButtonListRow","FlowWhatsappButtonListSection"],"mappings":";;;AAAoE;AACO;AACQ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BotContext } from '@botonic/core';
|
|
2
|
-
import type { FlowContent } from '../content-fields';
|
|
3
|
-
import type { ContentFilter } from '../types';
|
|
2
|
+
import type { FlowContent } from '../content-fields/index.js';
|
|
3
|
+
import type { ContentFilter } from '../types.js';
|
|
4
4
|
interface ContentFilterExecutorOptions {
|
|
5
5
|
filters: ContentFilter[];
|
|
6
6
|
}
|
package/lib/esm/filters/index.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContentFilterExecutor = void 0;
|
|
4
1
|
class ContentFilterExecutor {
|
|
5
|
-
constructor(options) {
|
|
6
|
-
this.filters = [];
|
|
7
|
-
this.filters = options.filters;
|
|
8
|
-
}
|
|
9
2
|
async filter(request, content) {
|
|
10
|
-
for (const filter of this.filters)
|
|
3
|
+
for (const filter of this.filters){
|
|
11
4
|
content = await filter(request, content);
|
|
12
5
|
}
|
|
13
6
|
return content;
|
|
14
7
|
}
|
|
8
|
+
constructor(options){
|
|
9
|
+
this.filters = [];
|
|
10
|
+
this.filters = options.filters;
|
|
11
|
+
}
|
|
15
12
|
}
|
|
16
|
-
|
|
13
|
+
|
|
14
|
+
export { ContentFilterExecutor };
|
|
15
|
+
|
|
17
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"filters/index.js","sources":["../../../src/filters/index.ts"],"sourcesContent":["import type { BotContext } from '@botonic/core'\n\nimport type { FlowContent } from '../content-fields'\nimport type { ContentFilter } from '../types'\n\ninterface ContentFilterExecutorOptions {\n filters: ContentFilter[]\n}\n\nexport class ContentFilterExecutor {\n private filters: ContentFilter[] = []\n\n constructor(options: ContentFilterExecutorOptions) {\n this.filters = options.filters\n }\n\n async filter(\n request: BotContext,\n content: FlowContent\n ): Promise<FlowContent> {\n for (const filter of this.filters) {\n content = await filter(request, content)\n }\n\n return content\n }\n}\n"],"names":["ContentFilterExecutor","request","content","filter","options"],"mappings":"AASO,MAAMA,qBAAqBA;IAOhC,MAAM,OACJC,OAAmB,EACnBC,OAAoB,EACE;QACtB,KAAK,MAAMC,UAAU,IAAI,CAAC,OAAO,CAAE;YACjCD,UAAU,MAAMC,OAAOF,SAASC;QAClC;QAEA,OAAOA;IACT;IAbA,YAAYE,OAAqC,CAAE;aAF3C,UAA2B,EAAE;QAGnC,IAAI,CAAC,OAAO,GAAGA,QAAQ,OAAO;IAChC;AAYF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BotContext } from '@botonic/core';
|
|
2
|
-
import type { FlowBuilderApi } from './api';
|
|
3
|
-
import { type FlowContent } from './content-fields';
|
|
4
|
-
import { type HtNodeComponent } from './content-fields/hubtype-fields';
|
|
2
|
+
import type { FlowBuilderApi } from './api.js';
|
|
3
|
+
import { type FlowContent } from './content-fields/index.js';
|
|
4
|
+
import { type HtNodeComponent } from './content-fields/hubtype-fields/index.js';
|
|
5
5
|
export declare class FlowFactory {
|
|
6
6
|
botContext: BotContext;
|
|
7
7
|
cmsApi: FlowBuilderApi;
|
package/lib/esm/flow-factory.js
CHANGED
|
@@ -1,67 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { FlowAiAgent, FlowAiAgentRouter, FlowBotAction, FlowCarousel, FlowChannelConditional, FlowCountryConditional, FlowCustomConditional, FlowCustomConditionalV2, FlowGoToFlow, FlowHandoff, FlowImage, FlowQueueStatusConditional, FlowRating, FlowText, FlowVideo, FlowWhatsappButtonList, FlowWhatsappCtaUrlButtonNode, FlowWhatsappRequestContactInfoNode, FlowWhatsappTemplate } from "./content-fields/index.js";
|
|
2
|
+
import { FlowCaptureUserInput } from "./content-fields/flow-capture-user-input.js";
|
|
3
|
+
import { HtNodeWithContentType } from "./content-fields/hubtype-fields/index.js";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
7
11
|
class FlowFactory {
|
|
8
|
-
constructor(botContext, cmsApi, locale) {
|
|
9
|
-
this.botContext = botContext;
|
|
10
|
-
this.cmsApi = cmsApi;
|
|
11
|
-
this.locale = locale;
|
|
12
|
-
}
|
|
13
12
|
async getFlowContent(hubtypeContent) {
|
|
14
|
-
switch
|
|
15
|
-
case
|
|
16
|
-
return
|
|
17
|
-
case
|
|
18
|
-
return
|
|
19
|
-
case
|
|
20
|
-
return
|
|
21
|
-
case
|
|
22
|
-
return
|
|
23
|
-
case
|
|
24
|
-
return
|
|
25
|
-
case
|
|
26
|
-
return
|
|
27
|
-
case
|
|
28
|
-
return
|
|
29
|
-
case
|
|
30
|
-
return
|
|
31
|
-
case
|
|
32
|
-
return
|
|
33
|
-
case
|
|
34
|
-
return
|
|
35
|
-
case
|
|
36
|
-
return
|
|
37
|
-
case
|
|
13
|
+
switch(hubtypeContent.type){
|
|
14
|
+
case HtNodeWithContentType.TEXT:
|
|
15
|
+
return FlowText.fromHubtypeCMS(hubtypeContent, this.locale, this.cmsApi, this.botContext);
|
|
16
|
+
case HtNodeWithContentType.IMAGE:
|
|
17
|
+
return FlowImage.fromHubtypeCMS(hubtypeContent, this.locale);
|
|
18
|
+
case HtNodeWithContentType.CAROUSEL:
|
|
19
|
+
return FlowCarousel.fromHubtypeCMS(hubtypeContent, this.locale, this.cmsApi, this.botContext);
|
|
20
|
+
case HtNodeWithContentType.VIDEO:
|
|
21
|
+
return FlowVideo.fromHubtypeCMS(hubtypeContent, this.locale);
|
|
22
|
+
case HtNodeWithContentType.WHATSAPP_BUTTON_LIST:
|
|
23
|
+
return FlowWhatsappButtonList.fromHubtypeCMS(hubtypeContent, this.locale, this.cmsApi);
|
|
24
|
+
case HtNodeWithContentType.WHATSAPP_CTA_URL_BUTTON:
|
|
25
|
+
return FlowWhatsappCtaUrlButtonNode.fromHubtypeCMS(hubtypeContent, this.locale, this.cmsApi, this.botContext);
|
|
26
|
+
case HtNodeWithContentType.WHATSAPP_REQUEST_CONTACT_INFO:
|
|
27
|
+
return FlowWhatsappRequestContactInfoNode.fromHubtypeCMS(hubtypeContent, this.locale);
|
|
28
|
+
case HtNodeWithContentType.HANDOFF:
|
|
29
|
+
return FlowHandoff.fromHubtypeCMS(hubtypeContent, this.locale, this.cmsApi);
|
|
30
|
+
case HtNodeWithContentType.AI_AGENT_ROUTER:
|
|
31
|
+
return FlowAiAgentRouter.fromHubtypeCMS(hubtypeContent, this.botContext);
|
|
32
|
+
case HtNodeWithContentType.AI_AGENT:
|
|
33
|
+
return FlowAiAgent.fromHubtypeCMS(hubtypeContent, this.botContext);
|
|
34
|
+
case HtNodeWithContentType.RATING:
|
|
35
|
+
return FlowRating.fromHubtypeCMS(hubtypeContent, this.locale);
|
|
36
|
+
case HtNodeWithContentType.BOT_ACTION:
|
|
37
|
+
return FlowBotAction.fromHubtypeCMS(hubtypeContent, this.cmsApi);
|
|
38
|
+
case HtNodeWithContentType.FUNCTION:
|
|
38
39
|
return this.resolveFlowFunctionContent(hubtypeContent);
|
|
39
|
-
case
|
|
40
|
-
return
|
|
41
|
-
case
|
|
42
|
-
return
|
|
43
|
-
case
|
|
44
|
-
return
|
|
45
|
-
case
|
|
46
|
-
return
|
|
40
|
+
case HtNodeWithContentType.GO_TO_FLOW:
|
|
41
|
+
return FlowGoToFlow.fromHubtypeCMS(hubtypeContent, this.cmsApi);
|
|
42
|
+
case HtNodeWithContentType.WHATSAPP_TEMPLATE:
|
|
43
|
+
return FlowWhatsappTemplate.fromHubtypeCMS(hubtypeContent, this.locale);
|
|
44
|
+
case HtNodeWithContentType.CAPTURE_USER_INPUT:
|
|
45
|
+
return FlowCaptureUserInput.fromHubtypeCMS(hubtypeContent);
|
|
46
|
+
case HtNodeWithContentType.CUSTOM_CONDITION:
|
|
47
|
+
return FlowCustomConditionalV2.fromHubtypeCMS(hubtypeContent, this.botContext);
|
|
47
48
|
default:
|
|
48
49
|
return undefined;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
async resolveFlowFunctionContent(hubtypeContent) {
|
|
52
|
-
switch
|
|
53
|
+
switch(hubtypeContent.content.action){
|
|
53
54
|
case 'check-country':
|
|
54
|
-
return
|
|
55
|
+
return FlowCountryConditional.fromHubtypeCMS(hubtypeContent, this.botContext);
|
|
55
56
|
case 'get-channel-type':
|
|
56
|
-
return
|
|
57
|
+
return FlowChannelConditional.fromHubtypeCMS(hubtypeContent, this.botContext);
|
|
57
58
|
case 'check-queue-status':
|
|
58
|
-
return
|
|
59
|
+
return FlowQueueStatusConditional.fromHubtypeCMS(hubtypeContent, this.locale);
|
|
59
60
|
case 'check-bot-variable':
|
|
60
|
-
return
|
|
61
|
+
return FlowCustomConditional.fromHubtypeCMS(hubtypeContent, this.botContext);
|
|
61
62
|
default:
|
|
62
63
|
return undefined;
|
|
63
64
|
}
|
|
64
65
|
}
|
|
66
|
+
constructor(botContext, cmsApi, locale){
|
|
67
|
+
this.botContext = botContext;
|
|
68
|
+
this.cmsApi = cmsApi;
|
|
69
|
+
this.locale = locale;
|
|
70
|
+
}
|
|
65
71
|
}
|
|
66
|
-
|
|
72
|
+
|
|
73
|
+
export { FlowFactory };
|
|
74
|
+
|
|
67
75
|
//# sourceMappingURL=flow-factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-factory.js","
|
|
1
|
+
{"version":3,"file":"flow-factory.js","sources":["../../src/flow-factory.ts"],"sourcesContent":["import type { BotContext } from '@botonic/core'\n\nimport type { FlowBuilderApi } from './api'\nimport {\n FlowAiAgent,\n FlowAiAgentRouter,\n FlowBotAction,\n FlowCarousel,\n FlowChannelConditional,\n type FlowContent,\n FlowCountryConditional,\n FlowCustomConditional,\n FlowCustomConditionalV2,\n FlowGoToFlow,\n FlowHandoff,\n FlowImage,\n FlowQueueStatusConditional,\n FlowRating,\n FlowText,\n FlowVideo,\n FlowWhatsappButtonList,\n FlowWhatsappCtaUrlButtonNode,\n FlowWhatsappRequestContactInfoNode,\n FlowWhatsappTemplate,\n} from './content-fields'\nimport { FlowCaptureUserInput } from './content-fields/flow-capture-user-input'\nimport {\n type HtFunctionNode,\n type HtNodeComponent,\n HtNodeWithContentType,\n} from './content-fields/hubtype-fields'\n\nexport class FlowFactory {\n public botContext: BotContext\n public cmsApi: FlowBuilderApi\n public locale: string\n\n constructor(botContext: BotContext, cmsApi: FlowBuilderApi, locale: string) {\n this.botContext = botContext\n this.cmsApi = cmsApi\n this.locale = locale\n }\n\n async getFlowContent(\n hubtypeContent: HtNodeComponent\n ): Promise<FlowContent | undefined> {\n switch (hubtypeContent.type) {\n case HtNodeWithContentType.TEXT:\n return FlowText.fromHubtypeCMS(\n hubtypeContent,\n this.locale,\n this.cmsApi,\n this.botContext\n )\n case HtNodeWithContentType.IMAGE:\n return FlowImage.fromHubtypeCMS(hubtypeContent, this.locale)\n case HtNodeWithContentType.CAROUSEL:\n return FlowCarousel.fromHubtypeCMS(\n hubtypeContent,\n this.locale,\n this.cmsApi,\n this.botContext\n )\n case HtNodeWithContentType.VIDEO:\n return FlowVideo.fromHubtypeCMS(hubtypeContent, this.locale)\n case HtNodeWithContentType.WHATSAPP_BUTTON_LIST:\n return FlowWhatsappButtonList.fromHubtypeCMS(\n hubtypeContent,\n this.locale,\n this.cmsApi\n )\n case HtNodeWithContentType.WHATSAPP_CTA_URL_BUTTON:\n return FlowWhatsappCtaUrlButtonNode.fromHubtypeCMS(\n hubtypeContent,\n this.locale,\n this.cmsApi,\n this.botContext\n )\n case HtNodeWithContentType.WHATSAPP_REQUEST_CONTACT_INFO:\n return FlowWhatsappRequestContactInfoNode.fromHubtypeCMS(\n hubtypeContent,\n this.locale\n )\n case HtNodeWithContentType.HANDOFF:\n return FlowHandoff.fromHubtypeCMS(\n hubtypeContent,\n this.locale,\n this.cmsApi\n )\n\n case HtNodeWithContentType.AI_AGENT_ROUTER:\n return FlowAiAgentRouter.fromHubtypeCMS(hubtypeContent, this.botContext)\n\n case HtNodeWithContentType.AI_AGENT:\n return FlowAiAgent.fromHubtypeCMS(hubtypeContent, this.botContext)\n\n case HtNodeWithContentType.RATING:\n return FlowRating.fromHubtypeCMS(hubtypeContent, this.locale)\n\n case HtNodeWithContentType.BOT_ACTION:\n return FlowBotAction.fromHubtypeCMS(hubtypeContent, this.cmsApi)\n\n case HtNodeWithContentType.FUNCTION:\n return this.resolveFlowFunctionContent(hubtypeContent)\n\n case HtNodeWithContentType.GO_TO_FLOW:\n return FlowGoToFlow.fromHubtypeCMS(hubtypeContent, this.cmsApi)\n\n case HtNodeWithContentType.WHATSAPP_TEMPLATE:\n return FlowWhatsappTemplate.fromHubtypeCMS(hubtypeContent, this.locale)\n\n case HtNodeWithContentType.CAPTURE_USER_INPUT:\n return FlowCaptureUserInput.fromHubtypeCMS(hubtypeContent)\n\n case HtNodeWithContentType.CUSTOM_CONDITION:\n return FlowCustomConditionalV2.fromHubtypeCMS(\n hubtypeContent,\n this.botContext\n )\n\n default:\n return undefined\n }\n }\n\n private async resolveFlowFunctionContent(\n hubtypeContent: HtFunctionNode\n ): Promise<FlowContent | undefined> {\n switch (hubtypeContent.content.action) {\n case 'check-country':\n return FlowCountryConditional.fromHubtypeCMS(\n hubtypeContent,\n this.botContext\n )\n case 'get-channel-type':\n return FlowChannelConditional.fromHubtypeCMS(\n hubtypeContent,\n this.botContext\n )\n case 'check-queue-status':\n return FlowQueueStatusConditional.fromHubtypeCMS(\n hubtypeContent,\n this.locale\n )\n case 'check-bot-variable':\n return FlowCustomConditional.fromHubtypeCMS(\n hubtypeContent,\n this.botContext\n )\n default:\n return undefined\n }\n }\n}\n"],"names":["FlowAiAgent","FlowAiAgentRouter","FlowBotAction","FlowCarousel","FlowChannelConditional","FlowCountryConditional","FlowCustomConditional","FlowCustomConditionalV2","FlowGoToFlow","FlowHandoff","FlowImage","FlowQueueStatusConditional","FlowRating","FlowText","FlowVideo","FlowWhatsappButtonList","FlowWhatsappCtaUrlButtonNode","FlowWhatsappRequestContactInfoNode","FlowWhatsappTemplate","FlowCaptureUserInput","HtNodeWithContentType","FlowFactory","hubtypeContent","undefined","botContext","cmsApi","locale"],"mappings":";;;;;;;AAwByB;AACsD;AAKvC;AAEjC,MAAMqB,WAAWA;IAWtB,MAAM,eACJC,cAA+B,EACG;QAClC,OAAQA,eAAe,IAAI;YACzB,KAAKF,0BAA0B;gBAC7B,OAAOP,uBAAuB,CAC5BS,gBACA,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,UAAU;YAEnB,KAAKF,2BAA2B;gBAC9B,OAAOV,wBAAwB,CAACY,gBAAgB,IAAI,CAAC,MAAM;YAC7D,KAAKF,8BAA8B;gBACjC,OAAOjB,2BAA2B,CAChCmB,gBACA,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,UAAU;YAEnB,KAAKF,2BAA2B;gBAC9B,OAAON,wBAAwB,CAACQ,gBAAgB,IAAI,CAAC,MAAM;YAC7D,KAAKF,0CAA0C;gBAC7C,OAAOL,qCAAqC,CAC1CO,gBACA,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM;YAEf,KAAKF,6CAA6C;gBAChD,OAAOJ,2CAA2C,CAChDM,gBACA,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,UAAU;YAEnB,KAAKF,mDAAmD;gBACtD,OAAOH,iDAAiD,CACtDK,gBACA,IAAI,CAAC,MAAM;YAEf,KAAKF,6BAA6B;gBAChC,OAAOX,0BAA0B,CAC/Ba,gBACA,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM;YAGf,KAAKF,qCAAqC;gBACxC,OAAOnB,gCAAgC,CAACqB,gBAAgB,IAAI,CAAC,UAAU;YAEzE,KAAKF,8BAA8B;gBACjC,OAAOpB,0BAA0B,CAACsB,gBAAgB,IAAI,CAAC,UAAU;YAEnE,KAAKF,4BAA4B;gBAC/B,OAAOR,yBAAyB,CAACU,gBAAgB,IAAI,CAAC,MAAM;YAE9D,KAAKF,gCAAgC;gBACnC,OAAOlB,4BAA4B,CAACoB,gBAAgB,IAAI,CAAC,MAAM;YAEjE,KAAKF,8BAA8B;gBACjC,OAAO,IAAI,CAAC,0BAA0B,CAACE;YAEzC,KAAKF,gCAAgC;gBACnC,OAAOZ,2BAA2B,CAACc,gBAAgB,IAAI,CAAC,MAAM;YAEhE,KAAKF,uCAAuC;gBAC1C,OAAOF,mCAAmC,CAACI,gBAAgB,IAAI,CAAC,MAAM;YAExE,KAAKF,wCAAwC;gBAC3C,OAAOD,mCAAmC,CAACG;YAE7C,KAAKF,sCAAsC;gBACzC,OAAOb,sCAAsC,CAC3Ce,gBACA,IAAI,CAAC,UAAU;YAGnB;gBACE,OAAOC;QACX;IACF;IAEA,MAAc,2BACZD,cAA8B,EACI;QAClC,OAAQA,eAAe,OAAO,CAAC,MAAM;YACnC,KAAK;gBACH,OAAOjB,qCAAqC,CAC1CiB,gBACA,IAAI,CAAC,UAAU;YAEnB,KAAK;gBACH,OAAOlB,qCAAqC,CAC1CkB,gBACA,IAAI,CAAC,UAAU;YAEnB,KAAK;gBACH,OAAOX,yCAAyC,CAC9CW,gBACA,IAAI,CAAC,MAAM;YAEf,KAAK;gBACH,OAAOhB,oCAAoC,CACzCgB,gBACA,IAAI,CAAC,UAAU;YAEnB;gBACE,OAAOC;QACX;IACF;IAnHA,YAAYC,UAAsB,EAAEC,MAAsB,EAAEC,MAAc,CAAE;QAC1E,IAAI,CAAC,UAAU,GAAGF;QAClB,IAAI,CAAC,MAAM,GAAGC;QACd,IAAI,CAAC,MAAM,GAAGC;IAChB;AAgHF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ActionRequest } from '@botonic/react';
|
|
2
|
-
import type { HtFunctionArgument, HtFunctionArguments, HtFunctionNode } from '../content-fields/hubtype-fields';
|
|
2
|
+
import type { HtFunctionArgument, HtFunctionArguments, HtFunctionNode } from '../content-fields/hubtype-fields/index.js';
|
|
3
3
|
export declare const DEFAULT_FUNCTION_NAMES: string[];
|
|
4
4
|
export declare class CustomFunction {
|
|
5
5
|
functions: Record<any, any>;
|