@botonic/plugin-flow-builder 0.22.0-beta.3 → 0.22.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.d.ts +16 -2
- package/lib/cjs/action.js +21 -19
- package/lib/cjs/action.js.map +1 -1
- package/lib/cjs/api.d.ts +19 -0
- package/lib/cjs/api.js +108 -0
- package/lib/cjs/api.js.map +1 -0
- package/lib/cjs/content-fields/content-fields-base.d.ts +4 -4
- package/lib/cjs/content-fields/content-fields-base.js.map +1 -1
- package/lib/cjs/content-fields/flow-button.d.ts +6 -3
- package/lib/cjs/content-fields/flow-button.js +28 -21
- package/lib/cjs/content-fields/flow-button.js.map +1 -1
- package/lib/cjs/content-fields/flow-carousel.d.ts +3 -2
- package/lib/cjs/content-fields/flow-carousel.js +3 -10
- package/lib/cjs/content-fields/flow-carousel.js.map +1 -1
- package/lib/cjs/content-fields/flow-element.d.ts +6 -3
- package/lib/cjs/content-fields/flow-element.js +16 -5
- package/lib/cjs/content-fields/flow-element.js.map +1 -1
- package/lib/cjs/content-fields/flow-image.d.ts +2 -2
- package/lib/cjs/content-fields/flow-image.js.map +1 -1
- package/lib/cjs/content-fields/flow-text.d.ts +4 -3
- package/lib/cjs/content-fields/flow-text.js +9 -9
- package/lib/cjs/content-fields/flow-text.js.map +1 -1
- package/lib/cjs/content-fields/flow-video.d.ts +2 -2
- package/lib/cjs/content-fields/flow-video.js +0 -1
- package/lib/cjs/content-fields/flow-video.js.map +1 -1
- package/lib/cjs/content-fields/hubtype-fields/button.d.ts +9 -0
- package/lib/cjs/content-fields/hubtype-fields/button.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/button.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/carousel.d.ts +16 -0
- package/lib/cjs/content-fields/hubtype-fields/carousel.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/carousel.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/common.d.ts +55 -0
- package/lib/cjs/content-fields/hubtype-fields/common.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/common.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/fallback.d.ts +9 -0
- package/lib/cjs/content-fields/hubtype-fields/fallback.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/fallback.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/function.d.ts +28 -0
- package/lib/cjs/content-fields/hubtype-fields/function.js +10 -0
- package/lib/cjs/content-fields/hubtype-fields/function.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/handoff.d.ts +10 -0
- package/lib/cjs/content-fields/hubtype-fields/handoff.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/handoff.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/image.d.ts +8 -0
- package/lib/cjs/content-fields/{types.js → hubtype-fields/image.js} +1 -1
- package/lib/cjs/content-fields/hubtype-fields/image.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/index.d.ts +17 -0
- package/lib/cjs/content-fields/hubtype-fields/index.js +21 -0
- package/lib/cjs/content-fields/hubtype-fields/index.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/intent.d.ts +10 -0
- package/lib/cjs/content-fields/hubtype-fields/intent.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/intent.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/keyword.d.ts +9 -0
- package/lib/cjs/content-fields/hubtype-fields/keyword.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/keyword.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/node-types.d.ts +23 -0
- package/lib/cjs/content-fields/hubtype-fields/node-types.js +31 -0
- package/lib/cjs/content-fields/hubtype-fields/node-types.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/nodes.d.ts +16 -0
- package/lib/cjs/content-fields/hubtype-fields/nodes.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/nodes.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/payload.d.ts +8 -0
- package/lib/cjs/content-fields/hubtype-fields/payload.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/payload.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/start.d.ts +7 -0
- package/lib/cjs/content-fields/hubtype-fields/start.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/start.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/text.d.ts +11 -0
- package/lib/cjs/content-fields/hubtype-fields/text.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/text.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/url.d.ts +8 -0
- package/lib/cjs/content-fields/hubtype-fields/url.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/url.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/video.d.ts +8 -0
- package/lib/cjs/content-fields/hubtype-fields/video.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/video.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.d.ts +21 -0
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.js.map +1 -0
- package/lib/cjs/content-fields/index.d.ts +7 -5
- package/lib/cjs/content-fields/index.js +11 -9
- 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 +10 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +32 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +10 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +29 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +12 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +33 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -0
- package/lib/cjs/functions/conditional-provider.d.ts +2 -2
- package/lib/cjs/functions/conditional-provider.js +2 -2
- package/lib/cjs/functions/conditional-provider.js.map +1 -1
- package/lib/cjs/functions/conditional-queue-status.d.ts +7 -2
- package/lib/cjs/functions/conditional-queue-status.js +11 -1
- package/lib/cjs/functions/conditional-queue-status.js.map +1 -1
- package/lib/cjs/handoff.d.ts +2 -2
- package/lib/cjs/handoff.js +17 -9
- package/lib/cjs/handoff.js.map +1 -1
- package/lib/cjs/helpers.d.ts +2 -1
- package/lib/cjs/helpers.js +5 -13
- package/lib/cjs/helpers.js.map +1 -1
- package/lib/cjs/index.d.ts +10 -21
- package/lib/cjs/index.js +36 -151
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/types.d.ts +8 -2
- package/lib/cjs/types.js.map +1 -1
- package/lib/esm/action.d.ts +16 -2
- package/lib/esm/action.js +21 -19
- package/lib/esm/action.js.map +1 -1
- package/lib/esm/api.d.ts +19 -0
- package/lib/esm/api.js +103 -0
- package/lib/esm/api.js.map +1 -0
- package/lib/esm/content-fields/content-fields-base.d.ts +4 -4
- package/lib/esm/content-fields/content-fields-base.js.map +1 -1
- package/lib/esm/content-fields/flow-button.d.ts +6 -3
- package/lib/esm/content-fields/flow-button.js +28 -21
- package/lib/esm/content-fields/flow-button.js.map +1 -1
- package/lib/esm/content-fields/flow-carousel.d.ts +3 -2
- package/lib/esm/content-fields/flow-carousel.js +4 -11
- package/lib/esm/content-fields/flow-carousel.js.map +1 -1
- package/lib/esm/content-fields/flow-element.d.ts +6 -3
- package/lib/esm/content-fields/flow-element.js +15 -5
- package/lib/esm/content-fields/flow-element.js.map +1 -1
- package/lib/esm/content-fields/flow-image.d.ts +2 -2
- package/lib/esm/content-fields/flow-image.js.map +1 -1
- package/lib/esm/content-fields/flow-text.d.ts +4 -3
- package/lib/esm/content-fields/flow-text.js +9 -9
- 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 +0 -1
- package/lib/esm/content-fields/flow-video.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/button.d.ts +9 -0
- package/lib/esm/content-fields/hubtype-fields/button.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/button.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/carousel.d.ts +16 -0
- package/lib/esm/content-fields/hubtype-fields/carousel.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/carousel.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/common.d.ts +55 -0
- package/lib/esm/content-fields/hubtype-fields/common.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/common.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/fallback.d.ts +9 -0
- package/lib/esm/content-fields/hubtype-fields/fallback.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/fallback.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/function.d.ts +28 -0
- package/lib/esm/content-fields/hubtype-fields/function.js +7 -0
- package/lib/esm/content-fields/hubtype-fields/function.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/handoff.d.ts +10 -0
- package/lib/esm/content-fields/hubtype-fields/handoff.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/handoff.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/image.d.ts +8 -0
- package/lib/esm/content-fields/hubtype-fields/image.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/image.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/index.d.ts +17 -0
- package/lib/esm/content-fields/hubtype-fields/index.js +18 -0
- package/lib/esm/content-fields/hubtype-fields/index.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/intent.d.ts +10 -0
- package/lib/esm/content-fields/hubtype-fields/intent.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/intent.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/keyword.d.ts +9 -0
- package/lib/esm/content-fields/hubtype-fields/keyword.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/keyword.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/node-types.d.ts +23 -0
- package/lib/esm/content-fields/hubtype-fields/node-types.js +28 -0
- package/lib/esm/content-fields/hubtype-fields/node-types.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/nodes.d.ts +16 -0
- package/lib/esm/content-fields/hubtype-fields/nodes.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/nodes.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/payload.d.ts +8 -0
- package/lib/esm/content-fields/hubtype-fields/payload.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/payload.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/start.d.ts +7 -0
- package/lib/esm/content-fields/hubtype-fields/start.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/start.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/text.d.ts +11 -0
- package/lib/esm/content-fields/hubtype-fields/text.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/text.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/url.d.ts +8 -0
- package/lib/esm/content-fields/hubtype-fields/url.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/url.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/video.d.ts +8 -0
- package/lib/esm/content-fields/hubtype-fields/video.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/video.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.d.ts +21 -0
- package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.js.map +1 -0
- package/lib/esm/content-fields/index.d.ts +7 -5
- package/lib/esm/content-fields/index.js +6 -4
- 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 +10 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +28 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +10 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +25 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +12 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +28 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -0
- package/lib/esm/functions/conditional-provider.d.ts +2 -2
- package/lib/esm/functions/conditional-provider.js +2 -2
- package/lib/esm/functions/conditional-provider.js.map +1 -1
- package/lib/esm/functions/conditional-queue-status.d.ts +7 -2
- package/lib/esm/functions/conditional-queue-status.js +11 -1
- package/lib/esm/functions/conditional-queue-status.js.map +1 -1
- package/lib/esm/handoff.d.ts +2 -2
- package/lib/esm/handoff.js +17 -9
- package/lib/esm/handoff.js.map +1 -1
- package/lib/esm/helpers.d.ts +2 -1
- package/lib/esm/helpers.js +3 -11
- package/lib/esm/helpers.js.map +1 -1
- package/lib/esm/index.d.ts +10 -21
- package/lib/esm/index.js +38 -153
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/types.d.ts +8 -2
- package/lib/esm/types.js.map +1 -1
- package/package.json +4 -5
- package/src/action.tsx +31 -22
- package/src/api.ts +162 -0
- package/src/content-fields/content-fields-base.ts +7 -7
- package/src/content-fields/flow-button.tsx +40 -19
- package/src/content-fields/flow-carousel.tsx +10 -18
- package/src/content-fields/flow-element.tsx +26 -9
- package/src/content-fields/flow-image.tsx +2 -2
- package/src/content-fields/flow-text.tsx +15 -12
- package/src/content-fields/flow-video.tsx +2 -3
- package/src/content-fields/hubtype-fields/button.ts +15 -0
- package/src/content-fields/hubtype-fields/carousel.ts +18 -0
- package/src/content-fields/hubtype-fields/common.ts +65 -0
- package/src/content-fields/hubtype-fields/fallback.ts +10 -0
- package/src/content-fields/hubtype-fields/function.ts +33 -0
- package/src/content-fields/hubtype-fields/handoff.ts +11 -0
- package/src/content-fields/hubtype-fields/image.ts +9 -0
- package/src/content-fields/hubtype-fields/index.ts +17 -0
- package/src/content-fields/hubtype-fields/intent.ts +11 -0
- package/src/content-fields/hubtype-fields/keyword.ts +10 -0
- package/src/content-fields/hubtype-fields/node-types.ts +26 -0
- package/src/content-fields/hubtype-fields/nodes.ts +32 -0
- package/src/content-fields/hubtype-fields/payload.ts +9 -0
- package/src/content-fields/hubtype-fields/start.ts +8 -0
- package/src/content-fields/hubtype-fields/text.ts +12 -0
- package/src/content-fields/hubtype-fields/url.ts +9 -0
- package/src/content-fields/hubtype-fields/video.ts +9 -0
- package/src/content-fields/hubtype-fields/whatsapp-button-list.ts +25 -0
- package/src/content-fields/index.ts +14 -5
- package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.tsx +33 -0
- package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.tsx +35 -0
- package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list.tsx +46 -0
- package/src/functions/conditional-provider.ts +2 -2
- package/src/functions/conditional-queue-status.ts +22 -3
- package/src/handoff.ts +27 -14
- package/src/helpers.ts +8 -19
- package/src/index.ts +55 -197
- package/src/types.ts +14 -2
- package/lib/cjs/content-fields/types.d.ts +0 -5
- package/lib/cjs/content-fields/types.js.map +0 -1
- package/lib/cjs/flow-builder-models.d.ts +0 -196
- package/lib/cjs/flow-builder-models.js +0 -24
- package/lib/cjs/flow-builder-models.js.map +0 -1
- package/lib/esm/content-fields/types.d.ts +0 -5
- package/lib/esm/content-fields/types.js +0 -2
- package/lib/esm/content-fields/types.js.map +0 -1
- package/lib/esm/flow-builder-models.d.ts +0 -196
- package/lib/esm/flow-builder-models.js +0 -21
- package/lib/esm/flow-builder-models.js.map +0 -1
- package/src/.DS_Store +0 -0
- package/src/content-fields/types.ts +0 -6
- package/src/flow-builder-models.ts +0 -249
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HtButton } from './button';
|
|
2
|
+
import { HtBaseNode, HtMediaFileLocale, HtTextLocale } from './common';
|
|
3
|
+
import { HtNodeWithContentType } from './node-types';
|
|
4
|
+
export interface HtCarouselElement {
|
|
5
|
+
id: string;
|
|
6
|
+
title: HtTextLocale[];
|
|
7
|
+
subtitle: HtTextLocale[];
|
|
8
|
+
image: HtMediaFileLocale[];
|
|
9
|
+
button: HtButton;
|
|
10
|
+
}
|
|
11
|
+
export interface HtCarouselNode extends HtBaseNode {
|
|
12
|
+
type: HtNodeWithContentType.CAROUSEL;
|
|
13
|
+
content: {
|
|
14
|
+
elements: HtCarouselElement[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/carousel.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { HtNodeWithContentType, HtNodeWithoutContentType } from './node-types';
|
|
2
|
+
import { HtNodeComponent } from './nodes';
|
|
3
|
+
export interface HtFlowBuilderData {
|
|
4
|
+
version: string;
|
|
5
|
+
name: string;
|
|
6
|
+
locales: string[];
|
|
7
|
+
start_node_id?: string;
|
|
8
|
+
ai_model_id?: string;
|
|
9
|
+
nodes: HtNodeComponent[];
|
|
10
|
+
}
|
|
11
|
+
export interface HtNodeLink {
|
|
12
|
+
id: string;
|
|
13
|
+
type: HtNodeWithContentType | HtNodeWithoutContentType;
|
|
14
|
+
}
|
|
15
|
+
export interface HtBaseNode {
|
|
16
|
+
id: string;
|
|
17
|
+
code: string;
|
|
18
|
+
meta: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
};
|
|
22
|
+
follow_up?: HtNodeLink;
|
|
23
|
+
target?: HtNodeLink;
|
|
24
|
+
}
|
|
25
|
+
export interface HtTextLocale {
|
|
26
|
+
message: string;
|
|
27
|
+
locale: string;
|
|
28
|
+
}
|
|
29
|
+
export interface HtMediaFileLocale {
|
|
30
|
+
id: string;
|
|
31
|
+
file: string;
|
|
32
|
+
locale: string;
|
|
33
|
+
}
|
|
34
|
+
export interface HtVideoLocale {
|
|
35
|
+
url: string;
|
|
36
|
+
is_embedded: boolean;
|
|
37
|
+
locale: string;
|
|
38
|
+
}
|
|
39
|
+
export interface HtQueueLocale {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
locale: string;
|
|
43
|
+
}
|
|
44
|
+
export interface HtInputLocale {
|
|
45
|
+
values: string[];
|
|
46
|
+
locale: string;
|
|
47
|
+
}
|
|
48
|
+
export interface HtUrlLocale {
|
|
49
|
+
id: string;
|
|
50
|
+
locale: string;
|
|
51
|
+
}
|
|
52
|
+
export interface HtPayloadLocale {
|
|
53
|
+
id: string;
|
|
54
|
+
locale: string;
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/common.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HtBaseNode, HtNodeLink } from './common';
|
|
2
|
+
import { HtNodeWithContentType } from './node-types';
|
|
3
|
+
export interface HtFallbackNode extends HtBaseNode {
|
|
4
|
+
type: HtNodeWithContentType.FALLBACK;
|
|
5
|
+
content: {
|
|
6
|
+
first_message?: HtNodeLink;
|
|
7
|
+
second_message?: HtNodeLink;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fallback.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/fallback.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HtBaseNode, HtNodeLink } from './common';
|
|
2
|
+
import { HtNodeWithContentType } from './node-types';
|
|
3
|
+
export declare enum HtArgumentType {
|
|
4
|
+
NUMBER = "number",
|
|
5
|
+
STRING = "string",
|
|
6
|
+
JSON = "json"
|
|
7
|
+
}
|
|
8
|
+
export interface HtFunctionArgument {
|
|
9
|
+
type: HtArgumentType;
|
|
10
|
+
name: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
export interface HtFunctionArgumentLocale {
|
|
14
|
+
locale: string;
|
|
15
|
+
values: HtFunctionArgument[];
|
|
16
|
+
}
|
|
17
|
+
export interface HtFunctionResult {
|
|
18
|
+
result: string;
|
|
19
|
+
target?: HtNodeLink;
|
|
20
|
+
}
|
|
21
|
+
export interface HtFunctionNode extends HtBaseNode {
|
|
22
|
+
type: HtNodeWithContentType.FUNCTION;
|
|
23
|
+
content: {
|
|
24
|
+
action: string;
|
|
25
|
+
arguments: HtFunctionArgumentLocale[];
|
|
26
|
+
result_mapping: HtFunctionResult[];
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/function.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;AACf,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HtBaseNode, HtPayloadLocale, HtQueueLocale } from './common';
|
|
2
|
+
import { HtNodeWithContentType } from './node-types';
|
|
3
|
+
export interface HtHandoffNode extends HtBaseNode {
|
|
4
|
+
type: HtNodeWithContentType.HANDOFF;
|
|
5
|
+
content: {
|
|
6
|
+
queue: HtQueueLocale[];
|
|
7
|
+
payload: HtPayloadLocale[];
|
|
8
|
+
has_auto_assign: boolean;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handoff.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/handoff.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/image.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './button';
|
|
2
|
+
export * from './carousel';
|
|
3
|
+
export * from './common';
|
|
4
|
+
export * from './fallback';
|
|
5
|
+
export * from './function';
|
|
6
|
+
export * from './handoff';
|
|
7
|
+
export * from './image';
|
|
8
|
+
export * from './intent';
|
|
9
|
+
export * from './keyword';
|
|
10
|
+
export * from './node-types';
|
|
11
|
+
export * from './nodes';
|
|
12
|
+
export * from './payload';
|
|
13
|
+
export * from './start';
|
|
14
|
+
export * from './text';
|
|
15
|
+
export * from './url';
|
|
16
|
+
export * from './video';
|
|
17
|
+
export * from './whatsapp-button-list';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './button';
|
|
2
|
+
export * from './carousel';
|
|
3
|
+
export * from './common';
|
|
4
|
+
export * from './fallback';
|
|
5
|
+
export * from './function';
|
|
6
|
+
export * from './handoff';
|
|
7
|
+
export * from './image';
|
|
8
|
+
export * from './intent';
|
|
9
|
+
export * from './keyword';
|
|
10
|
+
export * from './node-types';
|
|
11
|
+
export * from './nodes';
|
|
12
|
+
export * from './payload';
|
|
13
|
+
export * from './start';
|
|
14
|
+
export * from './text';
|
|
15
|
+
export * from './url';
|
|
16
|
+
export * from './video';
|
|
17
|
+
export * from './whatsapp-button-list';
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HtBaseNode, HtInputLocale, HtTextLocale } from './common';
|
|
2
|
+
import { HtNodeWithContentType } from './node-types';
|
|
3
|
+
export interface HtIntentNode extends HtBaseNode {
|
|
4
|
+
type: HtNodeWithContentType.INTENT;
|
|
5
|
+
content: {
|
|
6
|
+
title: HtTextLocale[];
|
|
7
|
+
intents: HtInputLocale[];
|
|
8
|
+
confidence: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/intent.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HtBaseNode, HtInputLocale, HtTextLocale } from './common';
|
|
2
|
+
import { HtNodeWithContentType } from './node-types';
|
|
3
|
+
export interface HtKeywordNode extends HtBaseNode {
|
|
4
|
+
type: HtNodeWithContentType.KEYWORD;
|
|
5
|
+
content: {
|
|
6
|
+
title: HtTextLocale[];
|
|
7
|
+
keywords: HtInputLocale[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyword.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/keyword.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum HtNodeWithContentType {
|
|
2
|
+
CAROUSEL = "carousel",
|
|
3
|
+
HANDOFF = "handoff",
|
|
4
|
+
IMAGE = "image",
|
|
5
|
+
TEXT = "text",
|
|
6
|
+
KEYWORD = "keyword",
|
|
7
|
+
INTENT = "intent",
|
|
8
|
+
FUNCTION = "function",
|
|
9
|
+
FALLBACK = "fallback",
|
|
10
|
+
VIDEO = "video",
|
|
11
|
+
WHATSAPP_BUTTON_LIST = "whatsapp-button-list"
|
|
12
|
+
}
|
|
13
|
+
export declare enum HtNodeStartType {
|
|
14
|
+
STARTUP = "start-up"
|
|
15
|
+
}
|
|
16
|
+
export declare enum HtNodeWithoutContentType {
|
|
17
|
+
URL = "url",
|
|
18
|
+
PAYLOAD = "payload"
|
|
19
|
+
}
|
|
20
|
+
export declare enum HtButtonStyle {
|
|
21
|
+
BUTTON = "button",
|
|
22
|
+
QUICK_REPLY = "quick-reply"
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export var HtNodeWithContentType;
|
|
2
|
+
(function (HtNodeWithContentType) {
|
|
3
|
+
HtNodeWithContentType["CAROUSEL"] = "carousel";
|
|
4
|
+
HtNodeWithContentType["HANDOFF"] = "handoff";
|
|
5
|
+
HtNodeWithContentType["IMAGE"] = "image";
|
|
6
|
+
HtNodeWithContentType["TEXT"] = "text";
|
|
7
|
+
HtNodeWithContentType["KEYWORD"] = "keyword";
|
|
8
|
+
HtNodeWithContentType["INTENT"] = "intent";
|
|
9
|
+
HtNodeWithContentType["FUNCTION"] = "function";
|
|
10
|
+
HtNodeWithContentType["FALLBACK"] = "fallback";
|
|
11
|
+
HtNodeWithContentType["VIDEO"] = "video";
|
|
12
|
+
HtNodeWithContentType["WHATSAPP_BUTTON_LIST"] = "whatsapp-button-list";
|
|
13
|
+
})(HtNodeWithContentType || (HtNodeWithContentType = {}));
|
|
14
|
+
export var HtNodeStartType;
|
|
15
|
+
(function (HtNodeStartType) {
|
|
16
|
+
HtNodeStartType["STARTUP"] = "start-up";
|
|
17
|
+
})(HtNodeStartType || (HtNodeStartType = {}));
|
|
18
|
+
export var HtNodeWithoutContentType;
|
|
19
|
+
(function (HtNodeWithoutContentType) {
|
|
20
|
+
HtNodeWithoutContentType["URL"] = "url";
|
|
21
|
+
HtNodeWithoutContentType["PAYLOAD"] = "payload";
|
|
22
|
+
})(HtNodeWithoutContentType || (HtNodeWithoutContentType = {}));
|
|
23
|
+
export var HtButtonStyle;
|
|
24
|
+
(function (HtButtonStyle) {
|
|
25
|
+
HtButtonStyle["BUTTON"] = "button";
|
|
26
|
+
HtButtonStyle["QUICK_REPLY"] = "quick-reply";
|
|
27
|
+
})(HtButtonStyle || (HtButtonStyle = {}));
|
|
28
|
+
//# sourceMappingURL=node-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-types.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/node-types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;IACnB,wCAAe,CAAA;IACf,sCAAa,CAAA;IACb,4CAAmB,CAAA;IACnB,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;IACrB,wCAAe,CAAA;IACf,sEAA6C,CAAA;AAC/C,CAAC,EAXW,qBAAqB,KAArB,qBAAqB,QAWhC;AAED,MAAM,CAAN,IAAY,eAEX;AAFD,WAAY,eAAe;IACzB,uCAAoB,CAAA;AACtB,CAAC,EAFW,eAAe,KAAf,eAAe,QAE1B;AAED,MAAM,CAAN,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,uCAAW,CAAA;IACX,+CAAmB,CAAA;AACrB,CAAC,EAHW,wBAAwB,KAAxB,wBAAwB,QAGnC;AAED,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,4CAA2B,CAAA;AAC7B,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HtCarouselNode } from './carousel';
|
|
2
|
+
import { HtFallbackNode } from './fallback';
|
|
3
|
+
import { HtFunctionNode } from './function';
|
|
4
|
+
import { HtHandoffNode } from './handoff';
|
|
5
|
+
import { HtImageNode } from './image';
|
|
6
|
+
import { HtIntentNode } from './intent';
|
|
7
|
+
import { HtKeywordNode } from './keyword';
|
|
8
|
+
import { HtPayloadNode } from './payload';
|
|
9
|
+
import { HtStartNode } from './start';
|
|
10
|
+
import { HtTextNode } from './text';
|
|
11
|
+
import { HtUrlNode } from './url';
|
|
12
|
+
import { HtVideoNode } from './video';
|
|
13
|
+
import { HtWhatsappButtonListNode } from './whatsapp-button-list';
|
|
14
|
+
export type HtNodeWithContent = HtTextNode | HtImageNode | HtVideoNode | HtCarouselNode | HtHandoffNode | HtKeywordNode | HtIntentNode | HtFunctionNode | HtFallbackNode | HtWhatsappButtonListNode;
|
|
15
|
+
export type HtNodeWithoutContent = HtUrlNode | HtPayloadNode;
|
|
16
|
+
export type HtNodeComponent = HtNodeWithContent | HtNodeWithoutContent | HtStartNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/nodes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/payload.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/start.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HtButton } from './button';
|
|
2
|
+
import { HtBaseNode, HtTextLocale } from './common';
|
|
3
|
+
import { HtButtonStyle, HtNodeWithContentType } from './node-types';
|
|
4
|
+
export interface HtTextNode extends HtBaseNode {
|
|
5
|
+
type: HtNodeWithContentType.TEXT;
|
|
6
|
+
content: {
|
|
7
|
+
text: HtTextLocale[];
|
|
8
|
+
buttons_style?: HtButtonStyle;
|
|
9
|
+
buttons: HtButton[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/text.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/url.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/video.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HtBaseNode, HtNodeLink, HtTextLocale } from './common';
|
|
2
|
+
import { HtNodeWithContentType } from './node-types';
|
|
3
|
+
export interface HtWhatsappButtonListRow {
|
|
4
|
+
id: string;
|
|
5
|
+
text: HtTextLocale[];
|
|
6
|
+
description: HtTextLocale[];
|
|
7
|
+
target?: HtNodeLink;
|
|
8
|
+
}
|
|
9
|
+
export interface HtWhatsappButtonListSection {
|
|
10
|
+
id: string;
|
|
11
|
+
title: HtTextLocale[];
|
|
12
|
+
rows: HtWhatsappButtonListRow[];
|
|
13
|
+
}
|
|
14
|
+
export interface HtWhatsappButtonListNode extends HtBaseNode {
|
|
15
|
+
type: HtNodeWithContentType.WHATSAPP_BUTTON_LIST;
|
|
16
|
+
content: {
|
|
17
|
+
text: HtTextLocale[];
|
|
18
|
+
button_text: HtTextLocale[];
|
|
19
|
+
sections: HtWhatsappButtonListSection[];
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whatsapp-button-list.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/whatsapp-button-list.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { FlowCarousel } from './flow-carousel';
|
|
2
|
+
import { FlowImage } from './flow-image';
|
|
3
|
+
import { FlowText } from './flow-text';
|
|
4
|
+
import { FlowVideo } from './flow-video';
|
|
5
|
+
import { FlowWhatsappButtonList } from './whatsapp-button-list/flow-whatsapp-button-list';
|
|
1
6
|
export { ContentFieldsBase } from './content-fields-base';
|
|
2
7
|
export { FlowButton } from './flow-button';
|
|
3
|
-
export { FlowCarousel } from './flow-carousel';
|
|
4
8
|
export { FlowElement } from './flow-element';
|
|
5
|
-
export { FlowImage
|
|
6
|
-
export
|
|
7
|
-
export { FlowVideo } from './flow-video';
|
|
8
|
-
export type { FlowContent } from './types';
|
|
9
|
+
export { FlowCarousel, FlowImage, FlowText, FlowVideo, FlowWhatsappButtonList };
|
|
10
|
+
export type FlowContent = FlowCarousel | FlowImage | FlowText | FlowVideo | FlowWhatsappButtonList;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { FlowCarousel } from './flow-carousel';
|
|
2
|
+
import { FlowImage } from './flow-image';
|
|
3
|
+
import { FlowText } from './flow-text';
|
|
4
|
+
import { FlowVideo } from './flow-video';
|
|
5
|
+
import { FlowWhatsappButtonList } from './whatsapp-button-list/flow-whatsapp-button-list';
|
|
1
6
|
export { ContentFieldsBase } from './content-fields-base';
|
|
2
7
|
export { FlowButton } from './flow-button';
|
|
3
|
-
export { FlowCarousel } from './flow-carousel';
|
|
4
8
|
export { FlowElement } from './flow-element';
|
|
5
|
-
export { FlowImage
|
|
6
|
-
export { FlowText } from './flow-text';
|
|
7
|
-
export { FlowVideo } from './flow-video';
|
|
9
|
+
export { FlowCarousel, FlowImage, FlowText, FlowVideo, FlowWhatsappButtonList };
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content-fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content-fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAA;AAEzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WhatsappButtonListRowProps } from '@botonic/react/lib/cjs/components/whatsapp-button-list';
|
|
2
|
+
import { ContentFieldsBase } from '../content-fields-base';
|
|
3
|
+
import { HtWhatsappButtonListRow } from '../hubtype-fields';
|
|
4
|
+
export declare class FlowWhatsappButtonListRow extends ContentFieldsBase {
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
targetId?: string;
|
|
8
|
+
static fromHubtypeCMS(component: HtWhatsappButtonListRow, locale: string): FlowWhatsappButtonListRow;
|
|
9
|
+
toBotonic(): WhatsappButtonListRowProps | undefined;
|
|
10
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ContentFieldsBase } from '../content-fields-base';
|
|
2
|
+
export class FlowWhatsappButtonListRow extends ContentFieldsBase {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.title = '';
|
|
6
|
+
this.description = '';
|
|
7
|
+
}
|
|
8
|
+
static fromHubtypeCMS(component, locale) {
|
|
9
|
+
var _a;
|
|
10
|
+
const newRow = new FlowWhatsappButtonListRow(component.id);
|
|
11
|
+
newRow.title = this.getTextByLocale(locale, component.text);
|
|
12
|
+
newRow.description = this.getTextByLocale(locale, component.description);
|
|
13
|
+
newRow.targetId = (_a = component.target) === null || _a === void 0 ? void 0 : _a.id;
|
|
14
|
+
return newRow;
|
|
15
|
+
}
|
|
16
|
+
toBotonic() {
|
|
17
|
+
if (!this.targetId) {
|
|
18
|
+
console.error(`Row with title: '${this.title}' has no target`);
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
id: this.targetId,
|
|
23
|
+
title: this.title,
|
|
24
|
+
description: this.description,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=flow-whatsapp-button-list-row.js.map
|
|
@@ -0,0 +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":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG1D,MAAM,OAAO,yBAA0B,SAAQ,iBAAiB;IAAhE;;QACS,UAAK,GAAG,EAAE,CAAA;QACV,gBAAW,GAAG,EAAE,CAAA;IAyBzB,CAAC;IAtBC,MAAM,CAAC,cAAc,CACnB,SAAkC,EAClC,MAAc;;QAEd,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,MAAA,SAAS,CAAC,MAAM,0CAAE,EAAE,CAAA;QACtC,OAAO,MAAM,CAAA;IACf,CAAC;IAED,SAAS;QACP,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;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAA;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WhatsappButtonListSectionProps } from '@botonic/react/lib/cjs/components/whatsapp-button-list';
|
|
2
|
+
import { HtWhatsappButtonListSection } from '../hubtype-fields';
|
|
3
|
+
import { ContentFieldsBase } from './../content-fields-base';
|
|
4
|
+
import { FlowWhatsappButtonListRow } from './flow-whatsapp-button-list-row';
|
|
5
|
+
export declare class FlowWhatsappButtonListSection extends ContentFieldsBase {
|
|
6
|
+
title: string;
|
|
7
|
+
rows: FlowWhatsappButtonListRow[];
|
|
8
|
+
static fromHubtypeCMS(component: HtWhatsappButtonListSection, locale: string): FlowWhatsappButtonListSection;
|
|
9
|
+
toBotonic(): WhatsappButtonListSectionProps;
|
|
10
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ContentFieldsBase } from './../content-fields-base';
|
|
2
|
+
import { FlowWhatsappButtonListRow } from './flow-whatsapp-button-list-row';
|
|
3
|
+
export class FlowWhatsappButtonListSection extends ContentFieldsBase {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments);
|
|
6
|
+
this.title = '';
|
|
7
|
+
this.rows = [];
|
|
8
|
+
}
|
|
9
|
+
static fromHubtypeCMS(component, locale) {
|
|
10
|
+
const newButton = new FlowWhatsappButtonListSection(component.id);
|
|
11
|
+
newButton.title = this.getTextByLocale(locale, component.title);
|
|
12
|
+
newButton.rows = component.rows.map(row => FlowWhatsappButtonListRow.fromHubtypeCMS(row, locale));
|
|
13
|
+
return newButton;
|
|
14
|
+
}
|
|
15
|
+
toBotonic() {
|
|
16
|
+
const rows = this.rows.reduce((acc, row) => {
|
|
17
|
+
const botonicRow = row.toBotonic();
|
|
18
|
+
if (botonicRow)
|
|
19
|
+
acc.push(botonicRow);
|
|
20
|
+
return acc;
|
|
21
|
+
}, []);
|
|
22
|
+
return { title: this.title, rows };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=flow-whatsapp-button-list-section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-whatsapp-button-list-section.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAE3E,MAAM,OAAO,6BAA8B,SAAQ,iBAAiB;IAApE;;QACS,UAAK,GAAG,EAAE,CAAA;QACV,SAAI,GAAgC,EAAE,CAAA;IAuB/C,CAAC;IArBC,MAAM,CAAC,cAAc,CACnB,SAAsC,EACtC,MAAc;QAEd,MAAM,SAAS,GAAG,IAAI,6BAA6B,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QACjE,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAA;QAC/D,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CACxC,yBAAyB,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CACtD,CAAA;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,SAAS;QACP,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAiC,EAAE,GAAG,EAAE,EAAE;YACvE,MAAM,UAAU,GAAG,GAAG,CAAC,SAAS,EAAE,CAAA;YAClC,IAAI,UAAU;gBAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YACpC,OAAO,GAAG,CAAA;QACZ,CAAC,EAAE,EAAE,CAAC,CAAA;QAEN,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,CAAA;IACpC,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { HtWhatsappButtonListNode } from '../hubtype-fields';
|
|
3
|
+
import { ContentFieldsBase } from './../content-fields-base';
|
|
4
|
+
import { FlowWhatsappButtonListSection } from './flow-whatsapp-button-list-section';
|
|
5
|
+
export declare class FlowWhatsappButtonList extends ContentFieldsBase {
|
|
6
|
+
code: string;
|
|
7
|
+
text: string;
|
|
8
|
+
listButtonText: string;
|
|
9
|
+
sections: FlowWhatsappButtonListSection[];
|
|
10
|
+
static fromHubtypeCMS(component: HtWhatsappButtonListNode, locale: string): FlowWhatsappButtonList;
|
|
11
|
+
toBotonic(id: string): JSX.Element;
|
|
12
|
+
}
|