@botonic/plugin-flow-builder 0.41.1-alpha.4 → 0.42.0-alpha.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/cjs/action/index.d.ts +1 -0
- package/lib/cjs/action/index.js +9 -3
- package/lib/cjs/action/index.js.map +1 -1
- package/lib/cjs/api.js +1 -10
- package/lib/cjs/api.js.map +1 -1
- package/lib/cjs/content-fields/content-fields-base.d.ts +5 -1
- package/lib/cjs/content-fields/content-fields-base.js.map +1 -1
- package/lib/cjs/content-fields/flow-ai-agent.d.ts +2 -2
- package/lib/cjs/content-fields/flow-ai-agent.js +23 -7
- package/lib/cjs/content-fields/flow-ai-agent.js.map +1 -1
- package/lib/cjs/content-fields/flow-bot-action.d.ts +2 -1
- package/lib/cjs/content-fields/flow-bot-action.js +21 -1
- package/lib/cjs/content-fields/flow-bot-action.js.map +1 -1
- package/lib/cjs/content-fields/flow-button.d.ts +2 -1
- package/lib/cjs/content-fields/flow-button.js +7 -0
- package/lib/cjs/content-fields/flow-button.js.map +1 -1
- package/lib/cjs/content-fields/flow-carousel.d.ts +2 -4
- package/lib/cjs/content-fields/flow-carousel.js +8 -50
- package/lib/cjs/content-fields/flow-carousel.js.map +1 -1
- package/lib/cjs/content-fields/flow-channel-conditional.d.ts +14 -0
- package/lib/cjs/content-fields/flow-channel-conditional.js +56 -0
- package/lib/cjs/content-fields/flow-channel-conditional.js.map +1 -0
- package/lib/cjs/content-fields/flow-country-conditional.d.ts +13 -0
- package/lib/cjs/content-fields/flow-country-conditional.js +58 -0
- package/lib/cjs/content-fields/flow-country-conditional.js.map +1 -0
- package/lib/cjs/content-fields/flow-custom-conditional.d.ts +15 -0
- package/lib/cjs/content-fields/flow-custom-conditional.js +78 -0
- package/lib/cjs/content-fields/flow-custom-conditional.js.map +1 -0
- package/lib/cjs/content-fields/flow-element.d.ts +2 -0
- package/lib/cjs/content-fields/flow-element.js +8 -1
- package/lib/cjs/content-fields/flow-element.js.map +1 -1
- package/lib/cjs/content-fields/flow-go-to-flow.d.ts +13 -0
- package/lib/cjs/content-fields/flow-go-to-flow.js +48 -0
- package/lib/cjs/content-fields/flow-go-to-flow.js.map +1 -0
- package/lib/cjs/content-fields/flow-handoff.d.ts +1 -1
- package/lib/cjs/content-fields/flow-handoff.js +7 -0
- package/lib/cjs/content-fields/flow-handoff.js.map +1 -1
- package/lib/cjs/content-fields/flow-image.d.ts +2 -1
- package/lib/cjs/content-fields/flow-image.js +8 -1
- package/lib/cjs/content-fields/flow-image.js.map +1 -1
- package/lib/cjs/content-fields/flow-knowledge-base.d.ts +1 -1
- package/lib/cjs/content-fields/flow-knowledge-base.js +10 -1
- package/lib/cjs/content-fields/flow-knowledge-base.js.map +1 -1
- package/lib/cjs/content-fields/flow-queue-status-conditional.d.ts +30 -0
- package/lib/cjs/content-fields/flow-queue-status-conditional.js +100 -0
- package/lib/cjs/content-fields/flow-queue-status-conditional.js.map +1 -0
- package/lib/cjs/content-fields/flow-rating.d.ts +1 -1
- package/lib/cjs/content-fields/flow-rating.js +8 -1
- package/lib/cjs/content-fields/flow-rating.js.map +1 -1
- package/lib/cjs/content-fields/flow-text.d.ts +1 -3
- package/lib/cjs/content-fields/flow-text.js +7 -16
- package/lib/cjs/content-fields/flow-text.js.map +1 -1
- package/lib/cjs/content-fields/flow-video.d.ts +2 -1
- package/lib/cjs/content-fields/flow-video.js +8 -1
- package/lib/cjs/content-fields/flow-video.js.map +1 -1
- package/lib/cjs/content-fields/flow-webview.d.ts +2 -1
- package/lib/cjs/content-fields/flow-webview.js +8 -1
- package/lib/cjs/content-fields/flow-webview.js.map +1 -1
- package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.d.ts +1 -1
- package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.js +8 -1
- package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.js.map +1 -1
- package/lib/cjs/content-fields/hubtype-fields/channel-conditional.d.ts +10 -0
- package/lib/cjs/content-fields/hubtype-fields/channel-conditional.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/channel-conditional.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/country-conditional.d.ts +10 -0
- package/lib/cjs/content-fields/hubtype-fields/country-conditional.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/country-conditional.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/custom-conditional.d.ts +11 -0
- package/lib/cjs/content-fields/hubtype-fields/custom-conditional.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/custom-conditional.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/go-to-flow.d.ts +4 -3
- package/lib/cjs/content-fields/hubtype-fields/node-types.d.ts +3 -3
- package/lib/cjs/content-fields/hubtype-fields/node-types.js +1 -1
- package/lib/cjs/content-fields/hubtype-fields/node-types.js.map +1 -1
- package/lib/cjs/content-fields/hubtype-fields/nodes.d.ts +2 -2
- package/lib/cjs/content-fields/hubtype-fields/queue-status-conditional.d.ts +25 -0
- package/lib/cjs/content-fields/hubtype-fields/queue-status-conditional.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/queue-status-conditional.js.map +1 -0
- package/lib/cjs/content-fields/index.d.ts +7 -2
- package/lib/cjs/content-fields/index.js +11 -1
- package/lib/cjs/content-fields/index.js.map +1 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.d.ts +2 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +7 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +2 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +7 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +1 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +8 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -1
- package/lib/cjs/flow-factory.d.ts +12 -0
- package/lib/cjs/flow-factory.js +65 -0
- package/lib/cjs/flow-factory.js.map +1 -0
- package/lib/cjs/functions/index.d.ts +11 -10
- package/lib/cjs/functions/index.js +49 -12
- package/lib/cjs/functions/index.js.map +1 -1
- package/lib/cjs/index.d.ts +0 -3
- package/lib/cjs/index.js +13 -66
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/services/hubtype-queues-api.d.ts +14 -0
- package/lib/cjs/services/hubtype-queues-api.js +28 -0
- package/lib/cjs/services/hubtype-queues-api.js.map +1 -0
- package/lib/cjs/tracking.d.ts +3 -0
- package/lib/cjs/tracking.js +29 -15
- package/lib/cjs/tracking.js.map +1 -1
- package/lib/esm/action/index.d.ts +1 -0
- package/lib/esm/action/index.js +9 -3
- package/lib/esm/action/index.js.map +1 -1
- package/lib/esm/api.js +2 -11
- package/lib/esm/api.js.map +1 -1
- package/lib/esm/content-fields/content-fields-base.d.ts +5 -1
- package/lib/esm/content-fields/content-fields-base.js.map +1 -1
- package/lib/esm/content-fields/flow-ai-agent.d.ts +2 -2
- package/lib/esm/content-fields/flow-ai-agent.js +24 -8
- package/lib/esm/content-fields/flow-ai-agent.js.map +1 -1
- package/lib/esm/content-fields/flow-bot-action.d.ts +2 -1
- package/lib/esm/content-fields/flow-bot-action.js +22 -2
- package/lib/esm/content-fields/flow-bot-action.js.map +1 -1
- package/lib/esm/content-fields/flow-button.d.ts +2 -1
- package/lib/esm/content-fields/flow-button.js +7 -0
- package/lib/esm/content-fields/flow-button.js.map +1 -1
- package/lib/esm/content-fields/flow-carousel.d.ts +2 -4
- package/lib/esm/content-fields/flow-carousel.js +9 -51
- package/lib/esm/content-fields/flow-carousel.js.map +1 -1
- package/lib/esm/content-fields/flow-channel-conditional.d.ts +14 -0
- package/lib/esm/content-fields/flow-channel-conditional.js +52 -0
- package/lib/esm/content-fields/flow-channel-conditional.js.map +1 -0
- package/lib/esm/content-fields/flow-country-conditional.d.ts +13 -0
- package/lib/esm/content-fields/flow-country-conditional.js +54 -0
- package/lib/esm/content-fields/flow-country-conditional.js.map +1 -0
- package/lib/esm/content-fields/flow-custom-conditional.d.ts +15 -0
- package/lib/esm/content-fields/flow-custom-conditional.js +74 -0
- package/lib/esm/content-fields/flow-custom-conditional.js.map +1 -0
- package/lib/esm/content-fields/flow-element.d.ts +2 -0
- package/lib/esm/content-fields/flow-element.js +8 -1
- package/lib/esm/content-fields/flow-element.js.map +1 -1
- package/lib/esm/content-fields/flow-go-to-flow.d.ts +13 -0
- package/lib/esm/content-fields/flow-go-to-flow.js +44 -0
- package/lib/esm/content-fields/flow-go-to-flow.js.map +1 -0
- package/lib/esm/content-fields/flow-handoff.d.ts +1 -1
- package/lib/esm/content-fields/flow-handoff.js +7 -0
- package/lib/esm/content-fields/flow-handoff.js.map +1 -1
- package/lib/esm/content-fields/flow-image.d.ts +2 -1
- package/lib/esm/content-fields/flow-image.js +8 -1
- package/lib/esm/content-fields/flow-image.js.map +1 -1
- package/lib/esm/content-fields/flow-knowledge-base.d.ts +1 -1
- package/lib/esm/content-fields/flow-knowledge-base.js +10 -1
- package/lib/esm/content-fields/flow-knowledge-base.js.map +1 -1
- package/lib/esm/content-fields/flow-queue-status-conditional.d.ts +30 -0
- package/lib/esm/content-fields/flow-queue-status-conditional.js +96 -0
- package/lib/esm/content-fields/flow-queue-status-conditional.js.map +1 -0
- package/lib/esm/content-fields/flow-rating.d.ts +1 -1
- package/lib/esm/content-fields/flow-rating.js +8 -1
- package/lib/esm/content-fields/flow-rating.js.map +1 -1
- package/lib/esm/content-fields/flow-text.d.ts +1 -3
- package/lib/esm/content-fields/flow-text.js +9 -18
- package/lib/esm/content-fields/flow-text.js.map +1 -1
- package/lib/esm/content-fields/flow-video.d.ts +2 -1
- package/lib/esm/content-fields/flow-video.js +8 -1
- package/lib/esm/content-fields/flow-video.js.map +1 -1
- package/lib/esm/content-fields/flow-webview.d.ts +2 -1
- package/lib/esm/content-fields/flow-webview.js +8 -1
- package/lib/esm/content-fields/flow-webview.js.map +1 -1
- package/lib/esm/content-fields/flow-whatsapp-cta-url-button.d.ts +1 -1
- package/lib/esm/content-fields/flow-whatsapp-cta-url-button.js +8 -1
- package/lib/esm/content-fields/flow-whatsapp-cta-url-button.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/channel-conditional.d.ts +10 -0
- package/lib/esm/content-fields/hubtype-fields/channel-conditional.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/channel-conditional.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/country-conditional.d.ts +10 -0
- package/lib/esm/content-fields/hubtype-fields/country-conditional.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/country-conditional.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/custom-conditional.d.ts +11 -0
- package/lib/esm/content-fields/hubtype-fields/custom-conditional.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/custom-conditional.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/go-to-flow.d.ts +4 -3
- package/lib/esm/content-fields/hubtype-fields/node-types.d.ts +3 -3
- package/lib/esm/content-fields/hubtype-fields/node-types.js +1 -1
- package/lib/esm/content-fields/hubtype-fields/node-types.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/nodes.d.ts +2 -2
- package/lib/esm/content-fields/hubtype-fields/queue-status-conditional.d.ts +25 -0
- package/lib/esm/content-fields/hubtype-fields/queue-status-conditional.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/queue-status-conditional.js.map +1 -0
- package/lib/esm/content-fields/index.d.ts +7 -2
- package/lib/esm/content-fields/index.js +6 -1
- 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 +2 -1
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +7 -0
- 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 +2 -1
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +7 -0
- 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 +1 -1
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +8 -1
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -1
- package/lib/esm/flow-factory.d.ts +12 -0
- package/lib/esm/flow-factory.js +61 -0
- package/lib/esm/flow-factory.js.map +1 -0
- package/lib/esm/functions/index.d.ts +11 -10
- package/lib/esm/functions/index.js +46 -11
- package/lib/esm/functions/index.js.map +1 -1
- package/lib/esm/index.d.ts +0 -3
- package/lib/esm/index.js +14 -67
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/services/hubtype-queues-api.d.ts +14 -0
- package/lib/esm/services/hubtype-queues-api.js +24 -0
- package/lib/esm/services/hubtype-queues-api.js.map +1 -0
- package/lib/esm/tracking.d.ts +3 -0
- package/lib/esm/tracking.js +27 -14
- package/lib/esm/tracking.js.map +1 -1
- package/package.json +2 -2
- package/src/action/index.tsx +11 -3
- package/src/api.ts +3 -11
- package/src/content-fields/content-fields-base.ts +8 -0
- package/src/content-fields/flow-ai-agent.tsx +41 -8
- package/src/content-fields/flow-bot-action.tsx +23 -2
- package/src/content-fields/flow-button.tsx +6 -1
- package/src/content-fields/flow-carousel.tsx +7 -109
- package/src/content-fields/flow-channel-conditional.tsx +66 -0
- package/src/content-fields/flow-country-conditional.tsx +68 -0
- package/src/content-fields/flow-custom-conditional.tsx +99 -0
- package/src/content-fields/flow-element.tsx +7 -2
- package/src/content-fields/flow-go-to-flow.tsx +52 -0
- package/src/content-fields/flow-handoff.tsx +7 -1
- package/src/content-fields/flow-image.tsx +8 -2
- package/src/content-fields/flow-knowledge-base.tsx +9 -1
- package/src/content-fields/flow-queue-status-conditional.tsx +131 -0
- package/src/content-fields/flow-rating.tsx +6 -1
- package/src/content-fields/flow-text.tsx +6 -32
- package/src/content-fields/flow-video.tsx +8 -2
- package/src/content-fields/flow-webview.tsx +9 -1
- package/src/content-fields/flow-whatsapp-cta-url-button.tsx +7 -1
- package/src/content-fields/hubtype-fields/channel-conditional.ts +11 -0
- package/src/content-fields/hubtype-fields/country-conditional.ts +11 -0
- package/src/content-fields/hubtype-fields/custom-conditional.ts +12 -0
- package/src/content-fields/hubtype-fields/go-to-flow.ts +4 -3
- package/src/content-fields/hubtype-fields/node-types.ts +1 -1
- package/src/content-fields/hubtype-fields/nodes.ts +10 -1
- package/src/content-fields/hubtype-fields/queue-status-conditional.ts +53 -0
- package/src/content-fields/index.ts +15 -0
- package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.tsx +7 -1
- package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.tsx +6 -0
- package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list.tsx +7 -1
- package/src/flow-factory.ts +126 -0
- package/src/functions/index.ts +77 -11
- package/src/index.ts +24 -120
- package/src/{functions/conditional-queue-status.ts → services/hubtype-queues-api.ts} +7 -41
- package/src/tracking.ts +35 -12
- package/lib/cjs/functions/conditional-bot-variable.d.ts +0 -8
- package/lib/cjs/functions/conditional-bot-variable.js +0 -11
- package/lib/cjs/functions/conditional-bot-variable.js.map +0 -1
- package/lib/cjs/functions/conditional-country.d.ts +0 -7
- package/lib/cjs/functions/conditional-country.js +0 -9
- package/lib/cjs/functions/conditional-country.js.map +0 -1
- package/lib/cjs/functions/conditional-provider.d.ts +0 -7
- package/lib/cjs/functions/conditional-provider.js +0 -9
- package/lib/cjs/functions/conditional-provider.js.map +0 -1
- package/lib/cjs/functions/conditional-queue-status.d.ts +0 -29
- package/lib/cjs/functions/conditional-queue-status.js +0 -51
- package/lib/cjs/functions/conditional-queue-status.js.map +0 -1
- package/lib/esm/functions/conditional-bot-variable.d.ts +0 -8
- package/lib/esm/functions/conditional-bot-variable.js +0 -7
- package/lib/esm/functions/conditional-bot-variable.js.map +0 -1
- package/lib/esm/functions/conditional-country.d.ts +0 -7
- package/lib/esm/functions/conditional-country.js +0 -5
- package/lib/esm/functions/conditional-country.js.map +0 -1
- package/lib/esm/functions/conditional-provider.d.ts +0 -7
- package/lib/esm/functions/conditional-provider.js +0 -5
- package/lib/esm/functions/conditional-provider.js.map +0 -1
- package/lib/esm/functions/conditional-queue-status.d.ts +0 -29
- package/lib/esm/functions/conditional-queue-status.js +0 -45
- package/lib/esm/functions/conditional-queue-status.js.map +0 -1
- package/src/functions/conditional-bot-variable.ts +0 -18
- package/src/functions/conditional-country.ts +0 -14
- package/src/functions/conditional-provider.ts +0 -14
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FlowRating = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
6
|
const core_1 = require("@botonic/core");
|
|
6
7
|
const react_1 = require("@botonic/react");
|
|
7
8
|
const helpers_1 = require("../helpers");
|
|
9
|
+
const tracking_1 = require("../tracking");
|
|
8
10
|
const content_fields_base_1 = require("./content-fields-base");
|
|
9
11
|
const flow_button_1 = require("./flow-button");
|
|
10
12
|
const hubtype_fields_1 = require("./hubtype-fields");
|
|
11
13
|
class FlowRating extends content_fields_base_1.ContentFieldsBase {
|
|
12
14
|
constructor() {
|
|
13
15
|
super(...arguments);
|
|
14
|
-
this.code = '';
|
|
15
16
|
this.text = '';
|
|
16
17
|
this.sendButtonText = '';
|
|
17
18
|
this.ratingType = hubtype_fields_1.RatingType.Stars;
|
|
@@ -26,8 +27,14 @@ class FlowRating extends content_fields_base_1.ContentFieldsBase {
|
|
|
26
27
|
newRating.ratingType = cmsText.content.rating_type;
|
|
27
28
|
newRating.buttons = cmsText.content.buttons.map(button => flow_button_1.FlowButton.fromRating(button));
|
|
28
29
|
newRating.openListButtonText = this.getTextByLocale(locale, cmsText.content.open_list_button_text);
|
|
30
|
+
newRating.followUp = cmsText.follow_up;
|
|
29
31
|
return newRating;
|
|
30
32
|
}
|
|
33
|
+
trackFlow(request) {
|
|
34
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
yield (0, tracking_1.trackOneContent)(request, this);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
31
38
|
toBotonic(id, request) {
|
|
32
39
|
const flowBuilderPlugin = (0, helpers_1.getFlowBuilderPlugin)(request.plugins);
|
|
33
40
|
const customRatingMessageEnabled = flowBuilderPlugin.customRatingMessageEnabled;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-rating.js","sourceRoot":"","sources":["../../../src/content-fields/flow-rating.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flow-rating.js","sourceRoot":"","sources":["../../../src/content-fields/flow-rating.tsx"],"names":[],"mappings":";;;;;AAAA,wCAA4D;AAC5D,0CAKuB;AAEvB,wCAAiD;AACjD,0CAA6C;AAC7C,+DAAyD;AACzD,+CAA0C;AAC1C,qDAA2D;AAE3D,MAAa,UAAW,SAAQ,uCAAiB;IAAjD;;QACS,SAAI,GAAG,EAAE,CAAA;QACT,mBAAc,GAAG,EAAE,CAAA;QACnB,eAAU,GAAG,2BAAU,CAAC,KAAK,CAAA;QAC7B,YAAO,GAAiB,EAAE,CAAA;QAC1B,uBAAkB,GAAG,EAAE,CAAA;IA8EhC,CAAC;IA5EC,MAAM,CAAC,cAAc,CAAC,OAAqB,EAAE,MAAc;QACzD,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;QAC5C,SAAS,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;QAC7B,SA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5B,KAAK,EAAE,MAAM,CAAC,IAAI;yBACnB,CAAC,CAAC;qBACJ;iBACF,GACD,CACH,CAAA;SACF;QAED,IACE,CAAC,IAAA,gBAAS,EAAC,OAAO,CAAC,OAAO,CAAC,IAAI,IAAA,YAAK,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACtD,0BAA0B,EAC1B;YACA,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO;iBAC1B,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;iBAC7B,KAAK,EAAE;iBACP,OAAO,EAAE,CAAA;YAEZ,OAAO,CACL,uBAAC,2BAAmB,IAClB,GAAG,EAAE,IAAI,CAAC,IAAI,EACd,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,IAAI,CAAC,IAAI,EACtB,UAAU,EAAE,IAAI,CAAC,cAAc,EAC/B,UAAU,EAAE,IAAI,CAAC,UAAU,GAC3B,CACH,CAAA;SACF;QAED,OAAO,CACL,wBAAC,YAAI,eACF,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,CACxC,MAAM,CAAC,YAAY,CAAC,WAAW,CAAC,CACjC,KAJQ,EAAE,CAKN,CACR,CAAA;IACH,CAAC;CACF;AAnFD,gCAmFC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TextMessage, TextWithButtonsMessage } from '@botonic/core';
|
|
3
2
|
import { ActionRequest } from '@botonic/react';
|
|
4
3
|
import { FlowBuilderApi } from '../api';
|
|
5
4
|
import { ContentFieldsBase } from './content-fields-base';
|
|
@@ -7,12 +6,11 @@ import { FlowButton } from './flow-button';
|
|
|
7
6
|
import { HtButtonStyle, HtTextNode } from './hubtype-fields';
|
|
8
7
|
export declare class FlowText extends ContentFieldsBase {
|
|
9
8
|
text: string;
|
|
10
|
-
code: string;
|
|
11
9
|
buttons: FlowButton[];
|
|
12
10
|
buttonStyle: HtButtonStyle;
|
|
13
11
|
static fromHubtypeCMS(cmsText: HtTextNode, locale: string, cmsApi: FlowBuilderApi): FlowText;
|
|
14
12
|
static replaceVariables(text: string, request: ActionRequest): string;
|
|
15
13
|
private static isValidType;
|
|
16
|
-
|
|
14
|
+
trackFlow(request: ActionRequest): Promise<void>;
|
|
17
15
|
toBotonic(id: string, request: ActionRequest): JSX.Element;
|
|
18
16
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FlowText = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
6
|
const react_1 = require("@botonic/react");
|
|
6
7
|
const constants_1 = require("../constants");
|
|
8
|
+
const tracking_1 = require("../tracking");
|
|
7
9
|
const utils_1 = require("../utils");
|
|
8
10
|
const content_fields_base_1 = require("./content-fields-base");
|
|
9
11
|
const flow_button_1 = require("./flow-button");
|
|
@@ -12,7 +14,6 @@ class FlowText extends content_fields_base_1.ContentFieldsBase {
|
|
|
12
14
|
constructor() {
|
|
13
15
|
super(...arguments);
|
|
14
16
|
this.text = '';
|
|
15
|
-
this.code = '';
|
|
16
17
|
this.buttons = [];
|
|
17
18
|
this.buttonStyle = hubtype_fields_1.HtButtonStyle.BUTTON;
|
|
18
19
|
}
|
|
@@ -22,6 +23,7 @@ class FlowText extends content_fields_base_1.ContentFieldsBase {
|
|
|
22
23
|
newText.buttonStyle = cmsText.content.buttons_style || hubtype_fields_1.HtButtonStyle.BUTTON;
|
|
23
24
|
newText.text = this.getTextByLocale(locale, cmsText.content.text);
|
|
24
25
|
newText.buttons = cmsText.content.buttons.map(button => flow_button_1.FlowButton.fromHubtypeCMS(button, locale, cmsApi));
|
|
26
|
+
newText.followUp = cmsText.follow_up;
|
|
25
27
|
return newText;
|
|
26
28
|
}
|
|
27
29
|
static replaceVariables(text, request) {
|
|
@@ -43,21 +45,10 @@ class FlowText extends content_fields_base_1.ContentFieldsBase {
|
|
|
43
45
|
const validTypes = ['boolean', 'string', 'number'];
|
|
44
46
|
return validTypes.includes(typeof botVariable);
|
|
45
47
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Text, { children: [textMessage.content.text, textMessage.content.buttons.map((button, buttonIndex) => {
|
|
51
|
-
const buttonData = {
|
|
52
|
-
id: `${id}-button-${buttonIndex}`,
|
|
53
|
-
text: button.text,
|
|
54
|
-
url: button.url,
|
|
55
|
-
payload: button.payload
|
|
56
|
-
? `${constants_1.EMPTY_PAYLOAD}${constants_1.SOURCE_INFO_SEPARATOR}${buttonIndex}`
|
|
57
|
-
: undefined,
|
|
58
|
-
};
|
|
59
|
-
return flow_button_1.FlowButton.fromAIAgent(buttonData).renderButton(buttonIndex);
|
|
60
|
-
})] }, id));
|
|
48
|
+
trackFlow(request) {
|
|
49
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
yield (0, tracking_1.trackOneContent)(request, this);
|
|
51
|
+
});
|
|
61
52
|
}
|
|
62
53
|
toBotonic(id, request) {
|
|
63
54
|
const replacedText = FlowText.replaceVariables(this.text, request);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-text.js","sourceRoot":"","sources":["../../../src/content-fields/flow-text.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flow-text.js","sourceRoot":"","sources":["../../../src/content-fields/flow-text.tsx"],"names":[],"mappings":";;;;;AAAA,0CAAoD;AAIpD,4CAA0E;AAC1E,0CAA6C;AAC7C,oCAA8C;AAC9C,+DAAyD;AACzD,+CAA0C;AAC1C,qDAA4D;AAE5D,MAAa,QAAS,SAAQ,uCAAiB;IAA/C;;QACS,SAAI,GAAG,EAAE,CAAA;QACT,YAAO,GAAiB,EAA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gBACjG,YAAY,GAAG,YAAY,CAAC,OAAO,CACjC,KAAK,EACL,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CACpD,CAAA;YACH,CAAC,CAAC,CAAA;SACH;QAED,OAAO,YAAY,CAAA;IACrB,CAAC;IAEO,MAAM,CAAC,WAAW,CAAC,WAAgB;QACzC,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;QAClD,OAAO,UAAU,CAAC,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAA;IAChD,CAAC;IAEK,SAAS,CAAC,OAAsB;;YACpC,MAAM,IAAA,0BAAe,EAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACtC,CAAC;KAAA;IAED,SAAS,CAAC,EAAU,EAAE,OAAsB;QAC1C,MAAM,YAAY,GAAG,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QAClE,OAAO,CACL,wBAAC,YAAI,eACF,YAAY,EACZ,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,CACxC,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CACnD,KAJQ,EAAE,CAKN,CACR,CAAA;IACH,CAAC;CACF;AA/DD,4BA+DC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ActionRequest } from '@botonic/react';
|
|
2
3
|
import { ContentFieldsBase } from './content-fields-base';
|
|
3
4
|
import { HtVideoNode } from './hubtype-fields';
|
|
4
5
|
export declare class FlowVideo extends ContentFieldsBase {
|
|
5
6
|
src: string;
|
|
6
|
-
code: string;
|
|
7
7
|
static fromHubtypeCMS(component: HtVideoNode, locale: string): FlowVideo;
|
|
8
|
+
trackFlow(request: ActionRequest): Promise<void>;
|
|
8
9
|
toBotonic(id: string): JSX.Element;
|
|
9
10
|
}
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FlowVideo = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
6
|
const react_1 = require("@botonic/react");
|
|
7
|
+
const tracking_1 = require("../tracking");
|
|
6
8
|
const content_fields_base_1 = require("./content-fields-base");
|
|
7
9
|
class FlowVideo extends content_fields_base_1.ContentFieldsBase {
|
|
8
10
|
constructor() {
|
|
9
11
|
super(...arguments);
|
|
10
12
|
this.src = '';
|
|
11
|
-
this.code = '';
|
|
12
13
|
}
|
|
13
14
|
static fromHubtypeCMS(component, locale) {
|
|
14
15
|
const newVideo = new FlowVideo(component.id);
|
|
15
16
|
newVideo.code = component.code;
|
|
16
17
|
newVideo.src = this.getVideoByLocale(locale, component.content.video);
|
|
18
|
+
newVideo.followUp = component.follow_up;
|
|
17
19
|
return newVideo;
|
|
18
20
|
}
|
|
21
|
+
trackFlow(request) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
yield (0, tracking_1.trackOneContent)(request, this);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
19
26
|
toBotonic(id) {
|
|
20
27
|
return (0, jsx_runtime_1.jsx)(react_1.Video, { src: this.src }, id);
|
|
21
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-video.js","sourceRoot":"","sources":["../../../src/content-fields/flow-video.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flow-video.js","sourceRoot":"","sources":["../../../src/content-fields/flow-video.tsx"],"names":[],"mappings":";;;;;AAAA,0CAAqD;AAGrD,0CAA6C;AAC7C,+DAAyD;AAGzD,MAAa,SAAU,SAAQ,uCAAiB;IAAhD;;QACS,QAAG,GAAG,EAAE,CAAA;IAkBjB,CAAC;IAhBC,MAAM,CAAC,cAAc,CAAC,SAAsB,EAAE,MAAc;QAC1D,MAAM,QAAQ,GAAG,IAAI,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QAC5C,QAAQ,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAA;QAC9B,QAAQ,CAAC,GAAG,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QACrE,QAAQ,CAAC,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAA;QAEvC,OAAO,QAAQ,CAAA;IACjB,CAAC;IAEK,SAAS,CAAC,OAAsB;;YACpC,MAAM,IAAA,0BAAe,EAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACtC,CAAC;KAAA;IAED,SAAS,CAAC,EAAU;QAClB,OAAO,uBAAC,aAAK,IAAU,GAAG,EAAE,IAAI,CAAC,GAAG,IAAjB,EAAE,CAAmB,CAAA;IAC1C,CAAC;CACF;AAnBD,8BAmBC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { ActionRequest } from '@botonic/react';
|
|
1
2
|
import { ContentFieldsBase } from './content-fields-base';
|
|
2
3
|
import { HtWebviewExits, HtWebviewNode } from './hubtype-fields';
|
|
3
4
|
export declare class FlowWebview extends ContentFieldsBase {
|
|
4
|
-
code: string;
|
|
5
5
|
webviewTargetId: string;
|
|
6
6
|
webviewName: string;
|
|
7
7
|
webviewComponentName: string;
|
|
8
8
|
exits: HtWebviewExits[];
|
|
9
9
|
static fromHubtypeCMS(component: HtWebviewNode): FlowWebview;
|
|
10
|
+
trackFlow(_request: ActionRequest): Promise<void>;
|
|
10
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FlowWebview = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const content_fields_base_1 = require("./content-fields-base");
|
|
5
6
|
class FlowWebview extends content_fields_base_1.ContentFieldsBase {
|
|
6
7
|
constructor() {
|
|
7
8
|
super(...arguments);
|
|
8
|
-
this.code = '';
|
|
9
9
|
this.webviewTargetId = '';
|
|
10
10
|
this.webviewName = '';
|
|
11
11
|
this.webviewComponentName = '';
|
|
@@ -17,8 +17,15 @@ class FlowWebview extends content_fields_base_1.ContentFieldsBase {
|
|
|
17
17
|
newWebview.webviewName = component.content.webview_name;
|
|
18
18
|
newWebview.webviewComponentName = component.content.webview_component_name;
|
|
19
19
|
newWebview.exits = component.content.exits;
|
|
20
|
+
newWebview.followUp = component.follow_up;
|
|
20
21
|
return newWebview;
|
|
21
22
|
}
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
24
|
+
trackFlow(_request) {
|
|
25
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
// TODO: Review how implement tracking when a button has as a target a FlowWebview
|
|
27
|
+
});
|
|
28
|
+
}
|
|
22
29
|
}
|
|
23
30
|
exports.FlowWebview = FlowWebview;
|
|
24
31
|
//# sourceMappingURL=flow-webview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-webview.js","sourceRoot":"","sources":["../../../src/content-fields/flow-webview.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flow-webview.js","sourceRoot":"","sources":["../../../src/content-fields/flow-webview.tsx"],"names":[],"mappings":";;;;AAGA,+DAAyD;AAGzD,MAAa,WAAY,SAAQ,uCAAiB;IAAlD;;QACS,oBAAe,GAAW,EAAE,CAAA;QAC5B,gBAAW,GAAW,EAAE,CAAA;QACxB,yBAAoB,GAAW,EAAE,CAAA;QACjC,UAAK,GAAqB,EAAE,CAAA;IAiBrC,CAAC;IAfC,MAAM,CAAC,cAAc,CAAC,SAAwB;QAC5C,MAAM,UAAU,GAAG,IAAI,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QAChD,UAAU,CAAC,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC,iBAAiB,CAAA;QAChE,UAAU,CAAC,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC,YAAY,CAAA;QACvD,UAAU,CAAC,oBAAoB,GAAG,SAAS,CAAC,OAAO,CAAC,sBAAsB,CAAA;QAC1E,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,CAAA;QAC1C,UAAU,CAAC,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAA;QAEzC,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,6DAA6D;IACvD,SAAS,CAAC,QAAuB;;YACrC,kFAAkF;QACpF,CAAC;KAAA;CACF;AArBD,kCAqBC"}
|
|
@@ -4,7 +4,6 @@ import { FlowBuilderApi } from '../api';
|
|
|
4
4
|
import { ContentFieldsBase } from './content-fields-base';
|
|
5
5
|
import { HtWhatsappCTAUrlButtonNode } from './hubtype-fields';
|
|
6
6
|
export declare class FlowWhatsappCtaUrlButtonNode extends ContentFieldsBase {
|
|
7
|
-
code: string;
|
|
8
7
|
text: string;
|
|
9
8
|
header?: string;
|
|
10
9
|
headerType?: WhatsappCTAUrlHeaderType;
|
|
@@ -16,5 +15,6 @@ export declare class FlowWhatsappCtaUrlButtonNode extends ContentFieldsBase {
|
|
|
16
15
|
url: string;
|
|
17
16
|
static fromHubtypeCMS(component: HtWhatsappCTAUrlButtonNode, locale: string, cmsApi: FlowBuilderApi): FlowWhatsappCtaUrlButtonNode;
|
|
18
17
|
private static setHeader;
|
|
18
|
+
trackFlow(request: ActionRequest): Promise<void>;
|
|
19
19
|
toBotonic(id: string, request: ActionRequest): JSX.Element;
|
|
20
20
|
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FlowWhatsappCtaUrlButtonNode = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
6
|
const core_1 = require("@botonic/core");
|
|
6
7
|
const react_1 = require("@botonic/react");
|
|
8
|
+
const tracking_1 = require("../tracking");
|
|
7
9
|
const content_fields_base_1 = require("./content-fields-base");
|
|
8
10
|
const flow_button_1 = require("./flow-button");
|
|
9
11
|
class FlowWhatsappCtaUrlButtonNode extends content_fields_base_1.ContentFieldsBase {
|
|
10
12
|
constructor() {
|
|
11
13
|
super(...arguments);
|
|
12
|
-
this.code = '';
|
|
13
14
|
this.text = '';
|
|
14
15
|
this.displayText = '';
|
|
15
16
|
this.url = '';
|
|
@@ -27,6 +28,7 @@ class FlowWhatsappCtaUrlButtonNode extends content_fields_base_1.ContentFieldsBa
|
|
|
27
28
|
const urlNode = cmsApi.getNodeById(urlId);
|
|
28
29
|
whatsappCtaUrlButton.url = urlNode.content.url;
|
|
29
30
|
}
|
|
31
|
+
whatsappCtaUrlButton.followUp = component.follow_up;
|
|
30
32
|
return whatsappCtaUrlButton;
|
|
31
33
|
}
|
|
32
34
|
static setHeader(whatsappCtaUrlButton, component, locale) {
|
|
@@ -52,6 +54,11 @@ class FlowWhatsappCtaUrlButtonNode extends content_fields_base_1.ContentFieldsBa
|
|
|
52
54
|
whatsappCtaUrlButton.headerDocument = this.getAssetByLocale(locale, component.content.header_document);
|
|
53
55
|
}
|
|
54
56
|
}
|
|
57
|
+
trackFlow(request) {
|
|
58
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
yield (0, tracking_1.trackOneContent)(request, this);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
55
62
|
toBotonic(id, request) {
|
|
56
63
|
if (!(0, core_1.isWhatsapp)(request.session)) {
|
|
57
64
|
return ((0, jsx_runtime_1.jsxs)(react_1.Text, { children: [this.text, (0, jsx_runtime_1.jsx)(react_1.Button, Object.assign({ url: this.url }, { children: this.displayText }))] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-whatsapp-cta-url-button.js","sourceRoot":"","sources":["../../../src/content-fields/flow-whatsapp-cta-url-button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flow-whatsapp-cta-url-button.js","sourceRoot":"","sources":["../../../src/content-fields/flow-whatsapp-cta-url-button.tsx"],"names":[],"mappings":";;;;;AAAA,wCAA0C;AAC1C,0CAMuB;AAIvB,0CAA6C;AAC7C,+DAAyD;AACzD,+CAA0C;AAG1C,MAAa,4BAA6B,SAAQ,uCAAiB;IAAnE;;QACS,SAAI,GAAG,EAAE,CAAA;QAOT,gBAAW,GAAG,EAAE,CAAA;QAChB,QAAG,GAAW,EAAE,CAAA;IAkLzB,CAAC;IAhLC,MAAM,CAAC,cAAc,CACnB,SAAqC,EACrC,MAAc,EACd,MAAsB;QAEtB,MAAM,oBAAoB,GAAG,IAAI,4BAA4B,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QAC3E,oBAAoB,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAA;QAC1C,oBAAoB,CAAC,IAAI,GAAG,IAAI,CAAC,eAAe,CAC9C,MAAM,EACN,SAAS,CAAC,OAAO,CAAC,IAAI,CACvB,CAAA;QACD,4BAA4B,CAAC,SAAS,CACpC,oBAAoB,EACpB,SAAS,EACT,MAAM,CACP,CAAA;QACD,oBAAoB,CAAC,MAAM,GAAG,IAAI,CAAC,eAAe,CAChD,MAAM,EACN,SAAS,CAAC,OAAO,CAAC,MAAM,CACzB,CAAA;QACD,MAAM,MAAM,GAAG,wBAAU,CAAC,cAAc,CACtC,SAAS,CAAC,OAAO,CAAC,MAAM,EACxB,MAAM,EACN,MAAM,CACP,CAAA;QACD,oBAAoB,CAAC,WAAW,GAAG,MAAM,CAAC,IAAI,CAAA;QAC9C,MAAM,KAAK,GAAG,wBAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QACnE,IAAI,KAAK,EAAE;YACT,MAAM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I,CAAC,GAAG,IANR,EAAE,CAOP,CACH,CAAA;SACF;QAED,IACE,IAAI,CAAC,UAAU,KAAK,gCAAwB,CAAC,QAAQ;YACrD,IAAI,CAAC,cAAc,EACnB;YACA,OAAO,CACL,uBAAC,4BAAoB,IAEnB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,GAAG,EAAE,IAAI,CAAC,GAAG,IANR,EAAE,CAOP,CACH,CAAA;SACF;QAED,IAAI,IAAI,CAAC,UAAU,KAAK,gCAAwB,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;YACpE,OAAO,CACL,uBAAC,4BAAoB,IAEnB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,GAAG,EAAE,IAAI,CAAC,GAAG,IANR,EAAE,CAOP,CACH,CAAA;SACF;QAED,OAAO,CACL,uBAAC,4BAAoB,IAEnB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,GAAG,EAAE,IAAI,CAAC,GAAG,IAJR,EAAE,CAKP,CACH,CAAA;IACH,CAAC;CACF;AA3LD,oEA2LC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HtBaseNode } from './common';
|
|
2
|
+
import { HtFunctionResult } from './function';
|
|
3
|
+
import { HtNodeWithContentType } from './node-types';
|
|
4
|
+
export interface HtChannelConditionalNode extends HtBaseNode {
|
|
5
|
+
type: HtNodeWithContentType.FUNCTION;
|
|
6
|
+
content: {
|
|
7
|
+
action: string;
|
|
8
|
+
result_mapping: HtFunctionResult[];
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel-conditional.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/channel-conditional.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HtBaseNode } from './common';
|
|
2
|
+
import { HtFunctionResult } from './function';
|
|
3
|
+
import { HtNodeWithContentType } from './node-types';
|
|
4
|
+
export interface HtCountryConditionalNode extends HtBaseNode {
|
|
5
|
+
type: HtNodeWithContentType.FUNCTION;
|
|
6
|
+
content: {
|
|
7
|
+
action: string;
|
|
8
|
+
result_mapping: HtFunctionResult[];
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country-conditional.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/country-conditional.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HtBaseNode } from './common';
|
|
2
|
+
import { HtFunctionArguments, HtFunctionResult } from './function';
|
|
3
|
+
import { HtNodeWithContentType } from './node-types';
|
|
4
|
+
export interface HtCustomConditionalNode extends HtBaseNode {
|
|
5
|
+
type: HtNodeWithContentType.FUNCTION;
|
|
6
|
+
content: {
|
|
7
|
+
action: string;
|
|
8
|
+
arguments: HtFunctionArguments[];
|
|
9
|
+
result_mapping: HtFunctionResult[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-conditional.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/custom-conditional.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { HtBaseNode } from './common';
|
|
2
|
+
import { HtNodeWithContentType } from './node-types';
|
|
3
|
+
export interface HtGoToFlow extends HtBaseNode {
|
|
3
4
|
id: string;
|
|
4
|
-
type:
|
|
5
|
+
type: HtNodeWithContentType.GO_TO_FLOW;
|
|
5
6
|
content: {
|
|
6
7
|
flow_id: string;
|
|
7
8
|
};
|
|
@@ -14,12 +14,12 @@ export declare enum HtNodeWithContentType {
|
|
|
14
14
|
BOT_ACTION = "bot-action",
|
|
15
15
|
AI_AGENT = "ai-agent",
|
|
16
16
|
RATING = "rating",
|
|
17
|
-
WEBVIEW = "webview"
|
|
17
|
+
WEBVIEW = "webview",
|
|
18
|
+
GO_TO_FLOW = "go-to-flow"
|
|
18
19
|
}
|
|
19
20
|
export declare enum HtNodeWithoutContentType {
|
|
20
21
|
URL = "url",
|
|
21
|
-
PAYLOAD = "payload"
|
|
22
|
-
GO_TO_FLOW = "go-to-flow"
|
|
22
|
+
PAYLOAD = "payload"
|
|
23
23
|
}
|
|
24
24
|
export declare enum HtButtonStyle {
|
|
25
25
|
BUTTON = "button",
|
|
@@ -19,12 +19,12 @@ var HtNodeWithContentType;
|
|
|
19
19
|
HtNodeWithContentType["AI_AGENT"] = "ai-agent";
|
|
20
20
|
HtNodeWithContentType["RATING"] = "rating";
|
|
21
21
|
HtNodeWithContentType["WEBVIEW"] = "webview";
|
|
22
|
+
HtNodeWithContentType["GO_TO_FLOW"] = "go-to-flow";
|
|
22
23
|
})(HtNodeWithContentType = exports.HtNodeWithContentType || (exports.HtNodeWithContentType = {}));
|
|
23
24
|
var HtNodeWithoutContentType;
|
|
24
25
|
(function (HtNodeWithoutContentType) {
|
|
25
26
|
HtNodeWithoutContentType["URL"] = "url";
|
|
26
27
|
HtNodeWithoutContentType["PAYLOAD"] = "payload";
|
|
27
|
-
HtNodeWithoutContentType["GO_TO_FLOW"] = "go-to-flow";
|
|
28
28
|
})(HtNodeWithoutContentType = exports.HtNodeWithoutContentType || (exports.HtNodeWithoutContentType = {}));
|
|
29
29
|
var HtButtonStyle;
|
|
30
30
|
(function (HtButtonStyle) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-types.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/node-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"node-types.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/node-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAkBX;AAlBD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;IACnB,wCAAe,CAAA;IACf,sCAAa,CAAA;IACb,4CAAmB,CAAA;IACnB,sDAA6B,CAAA;IAC7B,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;IACrB,wCAAe,CAAA;IACf,sEAA6C,CAAA;IAC7C,4EAAmD,CAAA;IACnD,0DAAiC,CAAA;IACjC,kDAAyB,CAAA;IACzB,8CAAqB,CAAA;IACrB,0CAAiB,CAAA;IACjB,4CAAmB,CAAA;IACnB,kDAAyB,CAAA;AAC3B,CAAC,EAlBW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAkBhC;AAED,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,uCAAW,CAAA;IACX,+CAAmB,CAAA;AACrB,CAAC,EAHW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAGnC;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,4CAA2B,CAAA;AAC7B,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"}
|
|
@@ -17,6 +17,6 @@ import { HtVideoNode } from './video';
|
|
|
17
17
|
import { HtWebviewNode } from './webview';
|
|
18
18
|
import { HtWhatsappButtonListNode } from './whatsapp-button-list';
|
|
19
19
|
import { HtWhatsappCTAUrlButtonNode } from './whatsapp-cta-url-button';
|
|
20
|
-
export type HtNodeWithContent = HtTextNode | HtImageNode | HtVideoNode | HtCarouselNode | HtHandoffNode | HtKeywordNode | HtFunctionNode | HtFallbackNode | HtWhatsappButtonListNode | HtWhatsappCTAUrlButtonNode | HtSmartIntentNode | HtKnowledgeBaseNode | HtBotActionNode | HtAiAgentNode | HtRatingNode | HtWebviewNode;
|
|
21
|
-
export type HtNodeWithoutContent = HtUrlNode | HtPayloadNode
|
|
20
|
+
export type HtNodeWithContent = HtTextNode | HtImageNode | HtVideoNode | HtCarouselNode | HtHandoffNode | HtKeywordNode | HtFunctionNode | HtFallbackNode | HtWhatsappButtonListNode | HtWhatsappCTAUrlButtonNode | HtSmartIntentNode | HtKnowledgeBaseNode | HtBotActionNode | HtAiAgentNode | HtRatingNode | HtWebviewNode | HtGoToFlow;
|
|
21
|
+
export type HtNodeWithoutContent = HtUrlNode | HtPayloadNode;
|
|
22
22
|
export type HtNodeComponent = HtNodeWithContent | HtNodeWithoutContent;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { HtBaseNode, HtNodeLink } from './common';
|
|
2
|
+
import { HtFunctionArguments, HtFunctionResult } from './function';
|
|
3
|
+
import { HtNodeWithContentType } from './node-types';
|
|
4
|
+
export type HtQueueStatusConditionalResultMapping = [
|
|
5
|
+
{
|
|
6
|
+
result: 'open';
|
|
7
|
+
target: HtNodeLink;
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
result: 'closed';
|
|
11
|
+
target: HtNodeLink;
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
result: 'open-without-agents';
|
|
15
|
+
target: HtNodeLink;
|
|
16
|
+
}
|
|
17
|
+
];
|
|
18
|
+
export interface HtQueueStatusConditionalNode extends HtBaseNode {
|
|
19
|
+
type: HtNodeWithContentType.FUNCTION;
|
|
20
|
+
content: {
|
|
21
|
+
action: string;
|
|
22
|
+
arguments: HtFunctionArguments[];
|
|
23
|
+
result_mapping: HtFunctionResult[];
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue-status-conditional.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/queue-status-conditional.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { FlowAiAgent } from './flow-ai-agent';
|
|
2
2
|
import { FlowBotAction } from './flow-bot-action';
|
|
3
3
|
import { FlowCarousel } from './flow-carousel';
|
|
4
|
+
import { FlowChannelConditional } from './flow-channel-conditional';
|
|
5
|
+
import { FlowCountryConditional } from './flow-country-conditional';
|
|
6
|
+
import { FlowCustomConditional } from './flow-custom-conditional';
|
|
7
|
+
import { FlowGoToFlow } from './flow-go-to-flow';
|
|
4
8
|
import { FlowHandoff } from './flow-handoff';
|
|
5
9
|
import { FlowImage } from './flow-image';
|
|
6
10
|
import { DISABLED_MEMORY_LENGTH, FlowKnowledgeBase } from './flow-knowledge-base';
|
|
11
|
+
import { FlowQueueStatusConditional } from './flow-queue-status-conditional';
|
|
7
12
|
import { FlowRating } from './flow-rating';
|
|
8
13
|
import { FlowText } from './flow-text';
|
|
9
14
|
import { FlowVideo } from './flow-video';
|
|
@@ -12,6 +17,6 @@ import { FlowWhatsappButtonList } from './whatsapp-button-list/flow-whatsapp-but
|
|
|
12
17
|
export { ContentFieldsBase } from './content-fields-base';
|
|
13
18
|
export { FlowButton } from './flow-button';
|
|
14
19
|
export { FlowElement } from './flow-element';
|
|
15
|
-
export { FlowAiAgent, FlowBotAction, FlowCarousel, FlowHandoff, FlowImage, FlowKnowledgeBase, FlowRating, FlowText, FlowVideo, FlowWhatsappButtonList, FlowWhatsappCtaUrlButtonNode, };
|
|
16
|
-
export type FlowContent = FlowCarousel | FlowImage | FlowText | FlowVideo | FlowWhatsappButtonList | FlowWhatsappCtaUrlButtonNode | FlowHandoff | FlowKnowledgeBase | FlowBotAction | FlowAiAgent | FlowRating;
|
|
20
|
+
export { FlowAiAgent, FlowBotAction, FlowCarousel, FlowChannelConditional, FlowCountryConditional, FlowCustomConditional, FlowGoToFlow, FlowHandoff, FlowImage, FlowKnowledgeBase, FlowQueueStatusConditional, FlowRating, FlowText, FlowVideo, FlowWhatsappButtonList, FlowWhatsappCtaUrlButtonNode, };
|
|
21
|
+
export type FlowContent = FlowCarousel | FlowImage | FlowText | FlowVideo | FlowWhatsappButtonList | FlowWhatsappCtaUrlButtonNode | FlowHandoff | FlowKnowledgeBase | FlowBotAction | FlowAiAgent | FlowRating | FlowCountryConditional | FlowChannelConditional | FlowQueueStatusConditional | FlowCustomConditional | FlowGoToFlow;
|
|
17
22
|
export { DISABLED_MEMORY_LENGTH };
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DISABLED_MEMORY_LENGTH = exports.FlowWhatsappCtaUrlButtonNode = exports.FlowWhatsappButtonList = exports.FlowVideo = exports.FlowText = exports.FlowRating = exports.FlowKnowledgeBase = exports.FlowImage = exports.FlowHandoff = exports.FlowCarousel = exports.FlowBotAction = exports.FlowAiAgent = exports.FlowElement = exports.FlowButton = exports.ContentFieldsBase = void 0;
|
|
3
|
+
exports.DISABLED_MEMORY_LENGTH = exports.FlowWhatsappCtaUrlButtonNode = exports.FlowWhatsappButtonList = exports.FlowVideo = exports.FlowText = exports.FlowRating = exports.FlowQueueStatusConditional = exports.FlowKnowledgeBase = exports.FlowImage = exports.FlowHandoff = exports.FlowGoToFlow = exports.FlowCustomConditional = exports.FlowCountryConditional = exports.FlowChannelConditional = exports.FlowCarousel = exports.FlowBotAction = exports.FlowAiAgent = exports.FlowElement = exports.FlowButton = exports.ContentFieldsBase = void 0;
|
|
4
4
|
const flow_ai_agent_1 = require("./flow-ai-agent");
|
|
5
5
|
Object.defineProperty(exports, "FlowAiAgent", { enumerable: true, get: function () { return flow_ai_agent_1.FlowAiAgent; } });
|
|
6
6
|
const flow_bot_action_1 = require("./flow-bot-action");
|
|
7
7
|
Object.defineProperty(exports, "FlowBotAction", { enumerable: true, get: function () { return flow_bot_action_1.FlowBotAction; } });
|
|
8
8
|
const flow_carousel_1 = require("./flow-carousel");
|
|
9
9
|
Object.defineProperty(exports, "FlowCarousel", { enumerable: true, get: function () { return flow_carousel_1.FlowCarousel; } });
|
|
10
|
+
const flow_channel_conditional_1 = require("./flow-channel-conditional");
|
|
11
|
+
Object.defineProperty(exports, "FlowChannelConditional", { enumerable: true, get: function () { return flow_channel_conditional_1.FlowChannelConditional; } });
|
|
12
|
+
const flow_country_conditional_1 = require("./flow-country-conditional");
|
|
13
|
+
Object.defineProperty(exports, "FlowCountryConditional", { enumerable: true, get: function () { return flow_country_conditional_1.FlowCountryConditional; } });
|
|
14
|
+
const flow_custom_conditional_1 = require("./flow-custom-conditional");
|
|
15
|
+
Object.defineProperty(exports, "FlowCustomConditional", { enumerable: true, get: function () { return flow_custom_conditional_1.FlowCustomConditional; } });
|
|
16
|
+
const flow_go_to_flow_1 = require("./flow-go-to-flow");
|
|
17
|
+
Object.defineProperty(exports, "FlowGoToFlow", { enumerable: true, get: function () { return flow_go_to_flow_1.FlowGoToFlow; } });
|
|
10
18
|
const flow_handoff_1 = require("./flow-handoff");
|
|
11
19
|
Object.defineProperty(exports, "FlowHandoff", { enumerable: true, get: function () { return flow_handoff_1.FlowHandoff; } });
|
|
12
20
|
const flow_image_1 = require("./flow-image");
|
|
@@ -14,6 +22,8 @@ Object.defineProperty(exports, "FlowImage", { enumerable: true, get: function ()
|
|
|
14
22
|
const flow_knowledge_base_1 = require("./flow-knowledge-base");
|
|
15
23
|
Object.defineProperty(exports, "DISABLED_MEMORY_LENGTH", { enumerable: true, get: function () { return flow_knowledge_base_1.DISABLED_MEMORY_LENGTH; } });
|
|
16
24
|
Object.defineProperty(exports, "FlowKnowledgeBase", { enumerable: true, get: function () { return flow_knowledge_base_1.FlowKnowledgeBase; } });
|
|
25
|
+
const flow_queue_status_conditional_1 = require("./flow-queue-status-conditional");
|
|
26
|
+
Object.defineProperty(exports, "FlowQueueStatusConditional", { enumerable: true, get: function () { return flow_queue_status_conditional_1.FlowQueueStatusConditional; } });
|
|
17
27
|
const flow_rating_1 = require("./flow-rating");
|
|
18
28
|
Object.defineProperty(exports, "FlowRating", { enumerable: true, get: function () { return flow_rating_1.FlowRating; } });
|
|
19
29
|
const flow_text_1 = require("./flow-text");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content-fields/index.ts"],"names":[],"mappings":";;;AAAA,mDAA6C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content-fields/index.ts"],"names":[],"mappings":";;;AAAA,mDAA6C;AAwB3C,4FAxBO,2BAAW,OAwBP;AAvBb,uDAAiD;AAwB/C,8FAxBO,+BAAa,OAwBP;AAvBf,mDAA8C;AAwB5C,6FAxBO,4BAAY,OAwBP;AAvBd,yEAAmE;AAwBjE,uGAxBO,iDAAsB,OAwBP;AAvBxB,yEAAmE;AAwBjE,uGAxBO,iDAAsB,OAwBP;AAvBxB,uEAAiE;AAwB/D,sGAxBO,+CAAqB,OAwBP;AAvBvB,uDAAgD;AAwB9C,6FAxBO,8BAAY,OAwBP;AAvBd,iDAA4C;AAwB1C,4FAxBO,0BAAW,OAwBP;AAvBb,6CAAwC;AAwBtC,0FAxBO,sBAAS,OAwBP;AAvBX,+DAG8B;AAgDrB,uGAlDP,4CAAsB,OAkDO;AA3B7B,kGAtBA,uCAAiB,OAsBA;AApBnB,mFAA4E;AAqB1E,2GArBO,0DAA0B,OAqBP;AApB5B,+CAA0C;AAqBxC,2FArBO,wBAAU,OAqBP;AApBZ,2CAAsC;AAqBpC,yFArBO,oBAAQ,OAqBP;AApBV,6CAAwC;AAqBtC,0FArBO,sBAAS,OAqBP;AApBX,iFAA6E;AAsB3E,6GAtBO,2DAA4B,OAsBP;AArB9B,gGAAyF;AAoBvF,uGApBO,kDAAsB,OAoBP;AAlBxB,6DAAyD;AAAhD,wHAAA,iBAAiB,OAAA;AAC1B,6CAA0C;AAAjC,yGAAA,UAAU,OAAA;AACnB,+CAA4C;AAAnC,2GAAA,WAAW,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WhatsappButtonListRowProps } from '@botonic/react';
|
|
1
|
+
import { ActionRequest, WhatsappButtonListRowProps } from '@botonic/react';
|
|
2
2
|
import { FlowBuilderApi } from '../../api';
|
|
3
3
|
import { ContentFieldsBase } from '../content-fields-base';
|
|
4
4
|
import { HtWhatsappButtonListRow } from '../hubtype-fields';
|
|
@@ -7,6 +7,7 @@ export declare class FlowWhatsappButtonListRow extends ContentFieldsBase {
|
|
|
7
7
|
description: string;
|
|
8
8
|
targetId?: string;
|
|
9
9
|
static fromHubtypeCMS(component: HtWhatsappButtonListRow, locale: string, cmsApi: FlowBuilderApi): FlowWhatsappButtonListRow;
|
|
10
|
+
trackFlow(_request: ActionRequest): Promise<void>;
|
|
10
11
|
toBotonic(rowIndex: number, sectionIndex: number): WhatsappButtonListRowProps | undefined;
|
|
11
12
|
private getRowId;
|
|
12
13
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FlowWhatsappButtonListRow = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const constants_1 = require("../../constants");
|
|
5
6
|
const content_fields_base_1 = require("../content-fields-base");
|
|
6
7
|
class FlowWhatsappButtonListRow extends content_fields_base_1.ContentFieldsBase {
|
|
@@ -16,6 +17,12 @@ class FlowWhatsappButtonListRow extends content_fields_base_1.ContentFieldsBase
|
|
|
16
17
|
newRow.targetId = cmsApi.getPayload(component.target);
|
|
17
18
|
return newRow;
|
|
18
19
|
}
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
+
trackFlow(_request) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
// Not apply for this content, because it is a child of the FlowWhatsappButtonList content
|
|
24
|
+
});
|
|
25
|
+
}
|
|
19
26
|
toBotonic(rowIndex, sectionIndex) {
|
|
20
27
|
if (!this.targetId) {
|
|
21
28
|
console.error(`Row with title: '${this.title}' has no target`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-whatsapp-button-list-row.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flow-whatsapp-button-list-row.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.tsx"],"names":[],"mappings":";;;;AAGA,+CAAuD;AACvD,gEAA0D;AAG1D,MAAa,yBAA0B,SAAQ,uCAAiB;IAAhE;;QACS,UAAK,GAAG,EAAE,CAAA;QACV,gBAAW,GAAG,EAAE,CAAA;IAuCzB,CAAC;IApCC,MAAM,CAAC,cAAc,CACnB,SAAkC,EAClC,MAAc,EACd,MAAsB;QAEtB,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QAC1D,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;QAC3D,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC,CAAA;QACxE,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;QAErD,OAAO,MAAM,CAAA;IACf,CAAC;IAED,6DAA6D;IACvD,SAAS,CAAC,QAAuB;;YACrC,0FAA0F;QAC5F,CAAC;KAAA;IAED,SAAS,CACP,QAAgB,EAChB,YAAoB;QAEpB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,OAAO,CAAC,KAAK,CAAC,oBAAoB,IAAI,CAAC,KAAK,iBAAiB,CAAC,CAAA;YAC9D,OAAO,SAAS,CAAA;SACjB;QACD,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;YACzC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAA;IACH,CAAC;IAEO,QAAQ,CAAC,QAAgB,EAAE,YAAoB;QACrD,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,iCAAqB,GAAG,YAAY,IAAI,QAAQ,EAAE,CAAA;IAC9E,CAAC;CACF;AAzCD,8DAyCC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WhatsappButtonListSectionProps } from '@botonic/react';
|
|
1
|
+
import { ActionRequest, WhatsappButtonListSectionProps } from '@botonic/react';
|
|
2
2
|
import { FlowBuilderApi } from '../../api';
|
|
3
3
|
import { ContentFieldsBase } from '../content-fields-base';
|
|
4
4
|
import { HtWhatsappButtonListSection } from '../hubtype-fields';
|
|
@@ -7,5 +7,6 @@ export declare class FlowWhatsappButtonListSection extends ContentFieldsBase {
|
|
|
7
7
|
title: string;
|
|
8
8
|
rows: FlowWhatsappButtonListRow[];
|
|
9
9
|
static fromHubtypeCMS(component: HtWhatsappButtonListSection, locale: string, cmsApi: FlowBuilderApi): FlowWhatsappButtonListSection;
|
|
10
|
+
trackFlow(_request: ActionRequest): Promise<void>;
|
|
10
11
|
toBotonic(sectionIndex: number): WhatsappButtonListSectionProps;
|
|
11
12
|
}
|