@botonic/react 0.41.1-alpha.0 → 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/components/index-types.d.ts +0 -1
- package/lib/cjs/components/index.d.ts +0 -1
- package/lib/cjs/components/index.js +1 -3
- package/lib/cjs/components/index.js.map +1 -1
- package/lib/cjs/components/multichannel/whatsapp/constants.d.ts +0 -1
- package/lib/cjs/components/multichannel/whatsapp/constants.js +1 -2
- package/lib/cjs/components/multichannel/whatsapp/constants.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/debug-message.js +22 -0
- package/lib/cjs/components/system-debug-trace/debug-message.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/bot-action.d.ts +7 -0
- package/lib/cjs/components/system-debug-trace/events/bot-action.js +18 -0
- package/lib/cjs/components/system-debug-trace/events/bot-action.js.map +1 -0
- package/lib/cjs/components/system-debug-trace/events/conditional-channel.d.ts +7 -0
- package/lib/cjs/components/system-debug-trace/events/conditional-channel.js +18 -0
- package/lib/cjs/components/system-debug-trace/events/conditional-channel.js.map +1 -0
- package/lib/cjs/components/system-debug-trace/events/conditional-country.d.ts +7 -0
- package/lib/cjs/components/system-debug-trace/events/conditional-country.js +18 -0
- package/lib/cjs/components/system-debug-trace/events/conditional-country.js.map +1 -0
- package/lib/cjs/components/system-debug-trace/events/conditional-custom.d.ts +8 -0
- package/lib/cjs/components/system-debug-trace/events/conditional-custom.js +18 -0
- package/lib/cjs/components/system-debug-trace/events/conditional-custom.js.map +1 -0
- package/lib/cjs/components/system-debug-trace/events/conditional-queue-status.d.ts +10 -0
- package/lib/cjs/components/system-debug-trace/events/conditional-queue-status.js +20 -0
- package/lib/cjs/components/system-debug-trace/events/conditional-queue-status.js.map +1 -0
- package/lib/cjs/components/system-debug-trace/events/constants.d.ts +4 -0
- package/lib/cjs/components/system-debug-trace/events/constants.js +4 -0
- package/lib/cjs/components/system-debug-trace/events/constants.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/handoff-success.d.ts +2 -0
- package/lib/cjs/components/system-debug-trace/events/handoff-success.js +23 -4
- package/lib/cjs/components/system-debug-trace/events/handoff-success.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/index.d.ts +7 -0
- package/lib/cjs/components/system-debug-trace/events/index.js +7 -0
- package/lib/cjs/components/system-debug-trace/events/index.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/events/redirect-flow.d.ts +10 -0
- package/lib/cjs/components/system-debug-trace/events/redirect-flow.js +18 -0
- package/lib/cjs/components/system-debug-trace/events/redirect-flow.js.map +1 -0
- package/lib/cjs/components/system-debug-trace/events/webview-action-triggered.d.ts +8 -0
- package/lib/cjs/components/system-debug-trace/events/webview-action-triggered.js +18 -0
- package/lib/cjs/components/system-debug-trace/events/webview-action-triggered.js.map +1 -0
- package/lib/cjs/components/system-debug-trace/icons/arrow-progress.d.ts +2 -0
- package/lib/cjs/components/system-debug-trace/icons/arrow-progress.js +10 -0
- package/lib/cjs/components/system-debug-trace/icons/arrow-progress.js.map +1 -0
- package/lib/cjs/components/system-debug-trace/icons/code.d.ts +2 -0
- package/lib/cjs/components/system-debug-trace/icons/code.js +10 -0
- package/lib/cjs/components/system-debug-trace/icons/code.js.map +1 -0
- package/lib/cjs/components/system-debug-trace/icons/split.d.ts +2 -0
- package/lib/cjs/components/system-debug-trace/icons/split.js +10 -0
- package/lib/cjs/components/system-debug-trace/icons/split.js.map +1 -0
- package/lib/cjs/components/system-debug-trace/icons/window-restore.d.ts +2 -0
- package/lib/cjs/components/system-debug-trace/icons/window-restore.js +10 -0
- package/lib/cjs/components/system-debug-trace/icons/window-restore.js.map +1 -0
- package/lib/cjs/components/system-debug-trace/styles.js +7 -4
- package/lib/cjs/components/system-debug-trace/styles.js.map +1 -1
- package/lib/cjs/components/system-debug-trace/types.d.ts +2 -2
- package/lib/cjs/components/whatsapp-media-carousel.js +0 -3
- package/lib/cjs/components/whatsapp-media-carousel.js.map +1 -1
- package/lib/cjs/index-types.d.ts +8 -0
- package/lib/cjs/index-types.js.map +1 -1
- package/lib/cjs/webchat/context/index.js +14 -0
- package/lib/cjs/webchat/context/index.js.map +1 -1
- package/lib/esm/components/index-types.d.ts +0 -1
- package/lib/esm/components/index.d.ts +0 -1
- package/lib/esm/components/index.js +0 -1
- package/lib/esm/components/index.js.map +1 -1
- package/lib/esm/components/multichannel/whatsapp/constants.d.ts +0 -1
- package/lib/esm/components/multichannel/whatsapp/constants.js +0 -1
- package/lib/esm/components/multichannel/whatsapp/constants.js.map +1 -1
- package/lib/esm/components/system-debug-trace/debug-message.js +24 -2
- package/lib/esm/components/system-debug-trace/debug-message.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/bot-action.d.ts +7 -0
- package/lib/esm/components/system-debug-trace/events/bot-action.js +14 -0
- package/lib/esm/components/system-debug-trace/events/bot-action.js.map +1 -0
- package/lib/esm/components/system-debug-trace/events/conditional-channel.d.ts +7 -0
- package/lib/esm/components/system-debug-trace/events/conditional-channel.js +14 -0
- package/lib/esm/components/system-debug-trace/events/conditional-channel.js.map +1 -0
- package/lib/esm/components/system-debug-trace/events/conditional-country.d.ts +7 -0
- package/lib/esm/components/system-debug-trace/events/conditional-country.js +14 -0
- package/lib/esm/components/system-debug-trace/events/conditional-country.js.map +1 -0
- package/lib/esm/components/system-debug-trace/events/conditional-custom.d.ts +8 -0
- package/lib/esm/components/system-debug-trace/events/conditional-custom.js +14 -0
- package/lib/esm/components/system-debug-trace/events/conditional-custom.js.map +1 -0
- package/lib/esm/components/system-debug-trace/events/conditional-queue-status.d.ts +10 -0
- package/lib/esm/components/system-debug-trace/events/conditional-queue-status.js +16 -0
- package/lib/esm/components/system-debug-trace/events/conditional-queue-status.js.map +1 -0
- package/lib/esm/components/system-debug-trace/events/constants.d.ts +4 -0
- package/lib/esm/components/system-debug-trace/events/constants.js +4 -0
- package/lib/esm/components/system-debug-trace/events/constants.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/handoff-success.d.ts +2 -0
- package/lib/esm/components/system-debug-trace/events/handoff-success.js +23 -4
- package/lib/esm/components/system-debug-trace/events/handoff-success.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/index.d.ts +7 -0
- package/lib/esm/components/system-debug-trace/events/index.js +7 -0
- package/lib/esm/components/system-debug-trace/events/index.js.map +1 -1
- package/lib/esm/components/system-debug-trace/events/redirect-flow.d.ts +10 -0
- package/lib/esm/components/system-debug-trace/events/redirect-flow.js +14 -0
- package/lib/esm/components/system-debug-trace/events/redirect-flow.js.map +1 -0
- package/lib/esm/components/system-debug-trace/events/webview-action-triggered.d.ts +8 -0
- package/lib/esm/components/system-debug-trace/events/webview-action-triggered.js +14 -0
- package/lib/esm/components/system-debug-trace/events/webview-action-triggered.js.map +1 -0
- package/lib/esm/components/system-debug-trace/icons/arrow-progress.d.ts +2 -0
- package/lib/esm/components/system-debug-trace/icons/arrow-progress.js +6 -0
- package/lib/esm/components/system-debug-trace/icons/arrow-progress.js.map +1 -0
- package/lib/esm/components/system-debug-trace/icons/code.d.ts +2 -0
- package/lib/esm/components/system-debug-trace/icons/code.js +6 -0
- package/lib/esm/components/system-debug-trace/icons/code.js.map +1 -0
- package/lib/esm/components/system-debug-trace/icons/split.d.ts +2 -0
- package/lib/esm/components/system-debug-trace/icons/split.js +6 -0
- package/lib/esm/components/system-debug-trace/icons/split.js.map +1 -0
- package/lib/esm/components/system-debug-trace/icons/window-restore.d.ts +2 -0
- package/lib/esm/components/system-debug-trace/icons/window-restore.js +6 -0
- package/lib/esm/components/system-debug-trace/icons/window-restore.js.map +1 -0
- package/lib/esm/components/system-debug-trace/styles.js +7 -4
- package/lib/esm/components/system-debug-trace/styles.js.map +1 -1
- package/lib/esm/components/system-debug-trace/types.d.ts +2 -2
- package/lib/esm/components/whatsapp-media-carousel.js +0 -3
- package/lib/esm/components/whatsapp-media-carousel.js.map +1 -1
- package/lib/esm/index-types.d.ts +8 -0
- package/lib/esm/index-types.js.map +1 -1
- package/lib/esm/webchat/context/index.js +14 -0
- package/lib/esm/webchat/context/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/index-types.ts +0 -1
- package/src/components/index.ts +0 -4
- package/src/components/multichannel/whatsapp/constants.ts +0 -1
- package/src/components/system-debug-trace/debug-message.tsx +30 -2
- package/src/components/system-debug-trace/events/bot-action.tsx +28 -0
- package/src/components/system-debug-trace/events/conditional-channel.tsx +28 -0
- package/src/components/system-debug-trace/events/conditional-country.tsx +28 -0
- package/src/components/system-debug-trace/events/conditional-custom.tsx +29 -0
- package/src/components/system-debug-trace/events/conditional-queue-status.tsx +37 -0
- package/src/components/system-debug-trace/events/constants.ts +4 -0
- package/src/components/system-debug-trace/events/handoff-success.tsx +45 -8
- package/src/components/system-debug-trace/events/index.ts +7 -0
- package/src/components/system-debug-trace/events/redirect-flow.tsx +31 -0
- package/src/components/system-debug-trace/events/webview-action-triggered.tsx +29 -0
- package/src/components/system-debug-trace/icons/arrow-progress.tsx +15 -0
- package/src/components/system-debug-trace/icons/code.tsx +15 -0
- package/src/components/system-debug-trace/icons/split.tsx +15 -0
- package/src/components/system-debug-trace/icons/window-restore.tsx +15 -0
- package/src/components/system-debug-trace/styles.ts +7 -4
- package/src/components/system-debug-trace/types.ts +14 -0
- package/src/components/whatsapp-media-carousel.tsx +0 -3
- package/src/index-types.ts +9 -0
- package/src/webchat/context/index.tsx +17 -0
- package/lib/cjs/components/whatsapp-interactive-media-carousel.d.ts +0 -15
- package/lib/cjs/components/whatsapp-interactive-media-carousel.js +0 -19
- package/lib/cjs/components/whatsapp-interactive-media-carousel.js.map +0 -1
- package/lib/esm/components/whatsapp-interactive-media-carousel.d.ts +0 -15
- package/lib/esm/components/whatsapp-interactive-media-carousel.js +0 -15
- package/lib/esm/components/whatsapp-interactive-media-carousel.js.map +0 -1
- package/src/components/whatsapp-interactive-media-carousel.tsx +0 -52
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WindowRestoreSvg = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const WindowRestoreSvg = ({ color = constants_1.COLORS.N500 }) => {
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("svg", Object.assign({ xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 640 640', fill: color }, { children: (0, jsx_runtime_1.jsx)("path", { d: 'M544 160L192 160C192 124.7 220.7 96 256 96L544 96C579.3 96 608 124.7 608 160L608 352C608 387.3 579.3 416 544 416L496 416L496 352L544 352L544 160zM32 288C32 252.7 60.7 224 96 224L384 224C419.3 224 448 252.7 448 288L448 480C448 515.3 419.3 544 384 544L96 544C60.7 544 32 515.3 32 480L32 288zM96 328C96 341.3 106.7 352 120 352L360 352C373.3 352 384 341.3 384 328C384 314.7 373.3 304 360 304L120 304C106.7 304 96 314.7 96 328z', fill: 'currentColor' }) })));
|
|
8
|
+
};
|
|
9
|
+
exports.WindowRestoreSvg = WindowRestoreSvg;
|
|
10
|
+
//# sourceMappingURL=window-restore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-restore.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/icons/window-restore.tsx"],"names":[],"mappings":";;;;AAEA,kDAA2C;AAGpC,MAAM,gBAAgB,GAAG,CAAC,EAAE,KAAK,GAAG,kBAAM,CAAC,IAAI,EAAa,EAAE,EAAE;IACrE,OAAO,CACL,8CAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAE,KAAK,gBACvE,iCACE,CAAC,EAAC,waAAwa,EAC1a,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC,CAAA;AATY,QAAA,gBAAgB,oBAS5B"}
|
|
@@ -112,13 +112,14 @@ exports.StyledDebugLabel = styled_components_1.default.strong `
|
|
|
112
112
|
line-height: 1.5;
|
|
113
113
|
`;
|
|
114
114
|
exports.StyledDebugValue = styled_components_1.default.div `
|
|
115
|
-
display: flex;
|
|
116
|
-
align-items: center;
|
|
117
|
-
gap: 8px;
|
|
118
115
|
font-weight: 600;
|
|
119
116
|
font-size: 12px;
|
|
120
117
|
color: ${constants_1.COLORS.N700};
|
|
121
118
|
line-height: 1.5;
|
|
119
|
+
width: 100%;
|
|
120
|
+
overflow-wrap: break-word;
|
|
121
|
+
word-break: break-word;
|
|
122
|
+
white-space: pre-wrap;
|
|
122
123
|
|
|
123
124
|
> svg {
|
|
124
125
|
width: 14px;
|
|
@@ -126,7 +127,9 @@ exports.StyledDebugValue = styled_components_1.default.div `
|
|
|
126
127
|
min-width: 14px;
|
|
127
128
|
min-height: 14px;
|
|
128
129
|
flex-shrink: 0;
|
|
129
|
-
display: block;
|
|
130
|
+
display: inline-block;
|
|
131
|
+
vertical-align: middle;
|
|
132
|
+
margin-right: 8px;
|
|
130
133
|
}
|
|
131
134
|
`;
|
|
132
135
|
exports.StyledDebugItemWithIcon = styled_components_1.default.div `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/system-debug-trace/styles.ts"],"names":[],"mappings":";;;;AAAA,kFAAsC;AAEtC,+CAAwC;AAE3B,QAAA,oBAAoB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;sBAOxB,kBAAM,CAAC,WAAW;;;;;;;;;;;;;0BAad,kBAAM,CAAC,GAAG;;;CAGnC,CAAA;AAEY,QAAA,iBAAiB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;;;CAS1C,CAAA;AAEY,QAAA,gBAAgB,GAAG,2BAAM,CAAC,IAAI,CAAA;;;;;;;;;;;;CAY1C,CAAA;AAEY,QAAA,eAAe,GAAG,2BAAM,CAAC,IAAI,CAAA;;;;;;;;;;;;;CAazC,CAAA;AAEY,QAAA,gBAAgB,GAAG,2BAAM,CAAC,IAAI,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AM,CAAC,IAAI,CAAA;;;;WAIpC,kBAAM,CAAC,IAAI;CACrB,CAAA;AAEY,QAAA,iBAAiB,GAAG,2BAAM,CAAC,IAAI,CAAA;;;;WAIjC,kBAAM,CAAC,IAAI;CACrB,CAAA;AAEY,QAAA,qBAAqB,GAAG,IAAA,2BAAM,EAAC,yBAAiB,CAAC,CAAA;;;;;;;CAO7D,CAAA;AAEY,QAAA,oBAAoB,GAAG,2BAAM,CAAC,CAAC,CAAA;;;;WAIjC,kBAAM,CAAC,IAAI;;;;;;;;;;;aAWT,kBAAM,CAAC,YAAY;;;;aAInB,kBAAM,CAAC,IAAI;;CAEvB,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AiAgentDebugEvent, FallbackDebugEvent, HandoffSuccessDebugEvent, KeywordDebugEvent, KnowledgeBaseDebugEvent, SmartIntentDebugEvent } from './events';
|
|
2
|
+
import { AiAgentDebugEvent, BotActionDebugEvent, ConditionalChannelDebugEvent, ConditionalCountryDebugEvent, ConditionalCustomDebugEvent, ConditionalQueueStatusDebugEvent, FallbackDebugEvent, HandoffSuccessDebugEvent, KeywordDebugEvent, KnowledgeBaseDebugEvent, RedirectFlowDebugEvent, SmartIntentDebugEvent, WebviewActionTriggeredDebugEvent } from './events';
|
|
3
3
|
export interface IconProps {
|
|
4
4
|
color?: string;
|
|
5
5
|
}
|
|
6
|
-
export type DebugEvent = KeywordDebugEvent | AiAgentDebugEvent | KnowledgeBaseDebugEvent | FallbackDebugEvent | SmartIntentDebugEvent | HandoffSuccessDebugEvent;
|
|
6
|
+
export type DebugEvent = KeywordDebugEvent | AiAgentDebugEvent | KnowledgeBaseDebugEvent | FallbackDebugEvent | SmartIntentDebugEvent | HandoffSuccessDebugEvent | BotActionDebugEvent | ConditionalChannelDebugEvent | ConditionalCountryDebugEvent | ConditionalCustomDebugEvent | ConditionalQueueStatusDebugEvent | RedirectFlowDebugEvent | WebviewActionTriggeredDebugEvent;
|
|
7
7
|
export interface DebugEventConfig {
|
|
8
8
|
action: string;
|
|
9
9
|
title: React.ReactNode;
|
|
@@ -9,9 +9,6 @@ const message_1 = require("./message");
|
|
|
9
9
|
const serialize = (message) => {
|
|
10
10
|
return { text: message };
|
|
11
11
|
};
|
|
12
|
-
/*
|
|
13
|
-
Reference: https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates/media-card-carousel-templates
|
|
14
|
-
*/
|
|
15
12
|
const WhatsappMediaCarousel = (props) => {
|
|
16
13
|
const renderBrowser = () => {
|
|
17
14
|
// Return a dummy message for browser
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whatsapp-media-carousel.js","sourceRoot":"","sources":["../../../src/components/whatsapp-media-carousel.tsx"],"names":[],"mappings":";;;;AAAA,wCAAqC;AAGrC,mDAAoD;AACpD,yCAA+C;AAC/C,uCAAmC;AAsDnC,MAAM,SAAS,GAAG,CAAC,OAAe,EAAE,EAAE;IACpC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA;AAC1B,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"whatsapp-media-carousel.js","sourceRoot":"","sources":["../../../src/components/whatsapp-media-carousel.tsx"],"names":[],"mappings":";;;;AAAA,wCAAqC;AAGrC,mDAAoD;AACpD,yCAA+C;AAC/C,uCAAmC;AAsDnC,MAAM,SAAS,GAAG,CAAC,OAAe,EAAE,EAAE;IACpC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA;AAC1B,CAAC,CAAA;AAEM,MAAM,qBAAqB,GAAG,CAAC,KAAiC,EAAE,EAAE;IACzE,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,qCAAqC;QACrC,MAAM,OAAO,GAAG,oDAAoD,CAAA;QACpE,OAAO,CACL,uBAAC,iBAAO,kBAAC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,IAAM,KAAK,IAAE,IAAI,EAAE,YAAK,CAAC,IAAI,gBAC3D,OAAO,IACA,CACX,CAAA;IACH,CAAC,CAAA;IAED,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE;QACjC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;;YAC5B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;gBACnB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;aACvB;YACD,MAAA,IAAI,CAAC,OAAO,0CAAE,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;gBACtC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;oBACvB,MAAM,CAAC,WAAW,GAAG,KAAK,CAAA;iBAC3B;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QACF,OAAO,IAAA,4BAAe,EAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAA;IAED,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,OAAO;QACL,gFAAgF;QAChF,oDACM,KAAK,IACT,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,IAAA,4BAAe,EAAC,KAAK,CAAC,cAAc,CAAC,CAAC,EACrE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAC5C,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EACxC,IAAI,EAAE,YAAK,CAAC,uBAAuB,IACnC,CACH,CAAA;IACH,CAAC,CAAA;IAED,OAAO,IAAA,uBAAe,EAAC,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,CAAA;AACvD,CAAC,CAAA;AAxCY,QAAA,qBAAqB,yBAwCjC"}
|
package/lib/cjs/index-types.d.ts
CHANGED
|
@@ -52,9 +52,17 @@ interface AddBotResponseArgs {
|
|
|
52
52
|
interface AddSystemResponseArgs {
|
|
53
53
|
response: any;
|
|
54
54
|
}
|
|
55
|
+
export interface MinimalHubtypeMessage {
|
|
56
|
+
id: string;
|
|
57
|
+
type: string;
|
|
58
|
+
action: string;
|
|
59
|
+
text: string;
|
|
60
|
+
}
|
|
55
61
|
export interface PreviewUtils {
|
|
56
62
|
getChunkIdsGroupedBySource: (chunkIds: string[]) => Promise<ChunkIdsGroupedBySourceData[]>;
|
|
57
63
|
onClickOpenChunks: (chunkIdsGroupedBySource: ChunkIdsGroupedBySourceData[]) => void;
|
|
64
|
+
getMessageById: (messageId: string) => Promise<MinimalHubtypeMessage>;
|
|
65
|
+
trackPreviewEventOpened: (eventProperties: Record<string, unknown>) => void;
|
|
58
66
|
}
|
|
59
67
|
export interface WebchatArgs {
|
|
60
68
|
theme?: Partial<WebchatTheme>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-types.js","sourceRoot":"","sources":["../../src/index-types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index-types.js","sourceRoot":"","sources":["../../src/index-types.ts"],"names":[],"mappings":";;;AA8JA,IAAY,OAKX;AALD,WAAY,OAAO;IACjB,sBAAW,CAAA;IACX,wBAAa,CAAA;IACb,0BAAe,CAAA;IACf,4BAAiB,CAAA;AACnB,CAAC,EALW,OAAO,GAAP,eAAO,KAAP,eAAO,QAKlB;AAED,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,0BAAgB,CAAA;IAChB,4BAAkB,CAAA;AACpB,CAAC,EAHW,MAAM,GAAN,cAAM,KAAN,cAAM,QAGjB"}
|
|
@@ -73,6 +73,20 @@ exports.WebchatContext = (0, react_1.createContext)({
|
|
|
73
73
|
return;
|
|
74
74
|
},
|
|
75
75
|
webchatState: {},
|
|
76
|
+
previewUtils: {
|
|
77
|
+
trackPreviewEventOpened: () => {
|
|
78
|
+
return;
|
|
79
|
+
},
|
|
80
|
+
getChunkIdsGroupedBySource: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
81
|
+
return [];
|
|
82
|
+
}),
|
|
83
|
+
onClickOpenChunks: () => {
|
|
84
|
+
return;
|
|
85
|
+
},
|
|
86
|
+
getMessageById: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
87
|
+
return {};
|
|
88
|
+
}),
|
|
89
|
+
},
|
|
76
90
|
trackEvent: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
77
91
|
return;
|
|
78
92
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/webchat/context/index.tsx"],"names":[],"mappings":";;;;AAAA,iCAAqC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/webchat/context/index.tsx"],"names":[],"mappings":";;;;AAAA,iCAAqC;AAOrC,6CAA0C;AAAjC,yGAAA,UAAU,OAAA;AAEN,QAAA,cAAc,GAAG,IAAA,qBAAa,EAAsB;IAC/D,UAAU,EAAE,GAAG,EAAE;QACf,OAAM;IACR,CAAC;IACD,gBAAgB,EAAE,GAAG,EAAE;QACrB,OAAM;IACR,CAAC;IACD,YAAY,EAAE,GAAS,EAAE;QACvB,OAAM;IACR,CAAC,CAAA;IACD,WAAW,EAAE,GAAG,EAAE;QAChB,OAAM;IACR,CAAC;IACD,WAAW,EAAE,GAAG,EAAE;QAChB,OAAM;IACR,CAAC;IACD,mBAAmB,EAAE,GAAG,EAAE;QACxB,OAAM;IACR,CAAC;IACD,iBAAiB,EAAE,GAAG,EAAE;QACtB,OAAM;IACR,CAAC;IACD,qBAAqB,EAAE,GAAG,EAAE;QAC1B,OAAM;IACR,CAAC;IACD,cAAc,EAAE,GAAS,EAAE;QACzB,OAAM;IACR,CAAC,CAAA;IACD,SAAS,EAAE,GAAS,EAAE;QACpB,OAAM;IACR,CAAC,CAAA;IACD,WAAW,EAAE,GAAS,EAAE;QACtB,OAAM;IACR,CAAC,CAAA;IACD,QAAQ,EAAE,GAAS,EAAE;QACnB,OAAM;IACR,CAAC,CAAA;IACD,oBAAoB,EAAE,GAAG,EAAE;QACzB,OAAM;IACR,CAAC;I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
23
23
|
export { WhatsappButtonList, WhatsappButtonListProps, WhatsappButtonListRowProps, WhatsappButtonListSectionProps, } from './whatsapp-button-list';
|
|
24
24
|
export { WhatsappCatalog, WhatsappCatalogProps } from './whatsapp-catalog';
|
|
25
25
|
export { WhatsappCTAUrlButton, WhatsappCTAUrlButtonProps, WhatsappCTAUrlHeaderType, } from './whatsapp-cta-url-button';
|
|
26
|
-
export { WhatsappInteractiveMediaCarousel, WhatsappInteractiveMediaCarouselProps, } from './whatsapp-interactive-media-carousel';
|
|
27
26
|
export { WhatsappMediaCarousel, WhatsappMediaCarouselProps, } from './whatsapp-media-carousel';
|
|
28
27
|
export { WhatsappProduct } from './whatsapp-product';
|
|
29
28
|
export { WhatsappProductCarousel, WhatsappProductCarouselProps, } from './whatsapp-product-carousel';
|
|
@@ -23,7 +23,6 @@ export { normalizeWebchatSettings, WebchatSettings, } from './webchat-settings';
|
|
|
23
23
|
export { WhatsappButtonList, } from './whatsapp-button-list';
|
|
24
24
|
export { WhatsappCatalog } from './whatsapp-catalog';
|
|
25
25
|
export { WhatsappCTAUrlButton, WhatsappCTAUrlHeaderType, } from './whatsapp-cta-url-button';
|
|
26
|
-
export { WhatsappInteractiveMediaCarousel, } from './whatsapp-interactive-media-carousel';
|
|
27
26
|
export { WhatsappMediaCarousel, } from './whatsapp-media-carousel';
|
|
28
27
|
export { WhatsappProduct } from './whatsapp-product';
|
|
29
28
|
export { WhatsappProductCarousel, } from './whatsapp-product-carousel';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,QAAQ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AExB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAEL,mBAAmB,GAGpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -6,7 +6,6 @@ export declare const WHATSAPP_LIST_MAX_BUTTONS = 10;
|
|
|
6
6
|
export declare const WHATSAPP_MAX_BUTTON_CHARS = 20;
|
|
7
7
|
export declare const WHATSAPP_MAX_HEADER_CHARS = 60;
|
|
8
8
|
export declare const WHATSAPP_MAX_BODY_CHARS = 1024;
|
|
9
|
-
export declare const WHATSAPP_MAX_CAROUSEL_CARD_TEXT_CHARS = 160;
|
|
10
9
|
export declare const WHATSAPP_MAX_FOOTER_CHARS = 60;
|
|
11
10
|
export declare const DEFAULT_WHATSAPP_MAX_BUTTON_SEPARATOR = "More options:";
|
|
12
11
|
export declare const MENU_BUTTON_WHATSAPP_BUTTON_LIST = "Show options";
|
|
@@ -4,7 +4,6 @@ export const WHATSAPP_LIST_MAX_BUTTONS = 10;
|
|
|
4
4
|
export const WHATSAPP_MAX_BUTTON_CHARS = 20;
|
|
5
5
|
export const WHATSAPP_MAX_HEADER_CHARS = 60;
|
|
6
6
|
export const WHATSAPP_MAX_BODY_CHARS = 1024;
|
|
7
|
-
export const WHATSAPP_MAX_CAROUSEL_CARD_TEXT_CHARS = 160;
|
|
8
7
|
export const WHATSAPP_MAX_FOOTER_CHARS = 60;
|
|
9
8
|
export const DEFAULT_WHATSAPP_MAX_BUTTON_SEPARATOR = 'More options:';
|
|
10
9
|
export const MENU_BUTTON_WHATSAPP_BUTTON_LIST = 'Show options';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/components/multichannel/whatsapp/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;AAE9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AACrC,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAA;AAC3C,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAA;AAC3C,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAA;AAC3C,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAA;AAC3C,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/components/multichannel/whatsapp/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;AAE9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AACrC,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAA;AAC3C,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAA;AAC3C,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAA;AAC3C,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAA;AAC3C,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAA;AAC3C,MAAM,CAAC,MAAM,qCAAqC,GAAG,eAAe,CAAA;AACpE,MAAM,CAAC,MAAM,gCAAgC,GAAG,cAAc,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { EventAction } from '@botonic/core';
|
|
3
|
-
import { useRef, useState } from 'react';
|
|
4
|
-
import {
|
|
3
|
+
import { useContext, useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { WebchatContext } from '../../webchat/context';
|
|
5
|
+
import { getAiAgentEventConfig, getBotActionEventConfig, getConditionalChannelEventConfig, getConditionalCountryEventConfig, getConditionalCustomEventConfig, getConditionalQueueStatusEventConfig, getFallbackEventConfig, getHandoffSuccessEventConfig, getKeywordEventConfig, getKnowledgeBaseEventConfig, getRedirectFlowEventConfig, getSmartIntentEventConfig, getWebviewActionTriggeredEventConfig, } from './events';
|
|
5
6
|
import { useLastLabelPosition } from './hooks/use-last-label-position';
|
|
6
7
|
import { CaretDownSvg, CaretUpSvg } from './icons';
|
|
7
8
|
import { StyledDebugArrow, StyledDebugContainer, StyledDebugContent, StyledDebugContentWrapper, StyledDebugHeader, StyledDebugIcon, StyledDebugTitle, } from './styles';
|
|
@@ -19,6 +20,20 @@ const getEventConfig = (debugEvent) => {
|
|
|
19
20
|
return getKnowledgeBaseEventConfig(debugEvent);
|
|
20
21
|
case EventAction.Fallback:
|
|
21
22
|
return getFallbackEventConfig(debugEvent);
|
|
23
|
+
case EventAction.BotAction:
|
|
24
|
+
return getBotActionEventConfig(debugEvent);
|
|
25
|
+
case EventAction.ConditionalChannel:
|
|
26
|
+
return getConditionalChannelEventConfig(debugEvent);
|
|
27
|
+
case EventAction.ConditionalCountry:
|
|
28
|
+
return getConditionalCountryEventConfig(debugEvent);
|
|
29
|
+
case EventAction.ConditionalCustom:
|
|
30
|
+
return getConditionalCustomEventConfig(debugEvent);
|
|
31
|
+
case EventAction.ConditionalQueueStatus:
|
|
32
|
+
return getConditionalQueueStatusEventConfig(debugEvent);
|
|
33
|
+
case EventAction.RedirectFlow:
|
|
34
|
+
return getRedirectFlowEventConfig(debugEvent);
|
|
35
|
+
case EventAction.WebviewActionTriggered:
|
|
36
|
+
return getWebviewActionTriggeredEventConfig(debugEvent);
|
|
22
37
|
default:
|
|
23
38
|
return undefined;
|
|
24
39
|
}
|
|
@@ -27,6 +42,7 @@ export const DebugMessage = ({ debugEvent, messageId }) => {
|
|
|
27
42
|
var _a;
|
|
28
43
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
29
44
|
const wrapperRef = useRef(null);
|
|
45
|
+
const { previewUtils } = useContext(WebchatContext);
|
|
30
46
|
const eventConfig = getEventConfig(debugEvent);
|
|
31
47
|
useLastLabelPosition({
|
|
32
48
|
wrapperRef,
|
|
@@ -34,6 +50,12 @@ export const DebugMessage = ({ debugEvent, messageId }) => {
|
|
|
34
50
|
debugEvent,
|
|
35
51
|
isCollapsible: (_a = eventConfig === null || eventConfig === void 0 ? void 0 : eventConfig.collapsible) !== null && _a !== void 0 ? _a : false,
|
|
36
52
|
});
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
var _a;
|
|
55
|
+
if (isExpanded) {
|
|
56
|
+
(_a = previewUtils === null || previewUtils === void 0 ? void 0 : previewUtils.trackPreviewEventOpened) === null || _a === void 0 ? void 0 : _a.call(previewUtils, { action: debugEvent.action });
|
|
57
|
+
}
|
|
58
|
+
}, [previewUtils, isExpanded, debugEvent]);
|
|
37
59
|
if (!eventConfig) {
|
|
38
60
|
return null;
|
|
39
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-message.js","sourceRoot":"","sources":["../../../../src/components/system-debug-trace/debug-message.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"debug-message.js","sourceRoot":"","sources":["../../../../src/components/system-debug-trace/debug-message.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAc,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEtE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,gCAAgC,EAChC,gCAAgC,EAChC,+BAA+B,EAC/B,oCAAoC,EACpC,sBAAsB,EACtB,4BAA4B,EAC5B,qBAAqB,EACrB,2BAA2B,EAC3B,0BAA0B,EAC1B,yBAAyB,EACzB,oCAAoC,GACrC,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,oBAAoB,EA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AAC,4BAA4B,CAAC,CAAA;YAE7D,IAAI,CAAC,QAAQ,EAAE;gBACb,CAAC,CAAC,eAAe,EAAE,CAAA;gBACnB,aAAa,CAAC,CAAC,UAAU,CAAC,CAAA;aAC3B;SACF;IACH,CAAC,CAAA;IAED,MAAM,kBAAkB,GAAG,WAAW;QACpC,CAAC,CAAC,cAAc,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE;QAC/C,CAAC,CAAC,EAAE,CAAA;IAEN,OAAO,CACL,MAAC,oBAAoB,kBACnB,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,iBAE9C,MAAC,iBAAiB,eAChB,KAAC,eAAe,cAAE,IAAI,GAAmB,EACzC,KAAC,gBAAgB,cAAE,KAAK,GAAoB,EAC3C,WAAW,IAAI,CACd,KAAC,gBAAgB,cACd,UAAU,CAAC,CAAC,CAAC,KAAC,UAAU,KAAG,CAAC,CAAC,CAAC,KAAC,YAAY,KAAG,GAC9B,CACpB,IACiB,EACnB,SAAS,IAAI,CACZ,KAAC,kBAAkB,kBAAC,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,gBACnE,KAAC,yBAAyB,kBAAC,GAAG,EAAE,UAAU,gBACxC,KAAC,SAAS,oBAAK,UAAU,IAAE,SAAS,EAAE,SAAS,IAAI,IACzB,IACT,CACtB,KACoB,CACxB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EventAction } from '@botonic/core';
|
|
2
|
+
import { DebugEventConfig } from '../types';
|
|
3
|
+
export interface BotActionDebugEvent {
|
|
4
|
+
action: EventAction.BotAction;
|
|
5
|
+
payload: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const getBotActionEventConfig: (data: BotActionDebugEvent) => DebugEventConfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EventAction } from '@botonic/core';
|
|
3
|
+
import { CodeSvg } from '../icons/code';
|
|
4
|
+
export const getBotActionEventConfig = (data) => {
|
|
5
|
+
const title = (_jsxs(_Fragment, { children: ["Bot action triggered ", _jsxs("span", { children: ["- ", data.payload] })] }));
|
|
6
|
+
return {
|
|
7
|
+
action: EventAction.BotAction,
|
|
8
|
+
title,
|
|
9
|
+
component: null,
|
|
10
|
+
icon: _jsx(CodeSvg, {}),
|
|
11
|
+
collapsible: false,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=bot-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot-action.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/events/bot-action.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG3C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAQvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,IAAyB,EACP,EAAE;IACpB,MAAM,KAAK,GAAG,CACZ,uDACuB,iCAAS,IAAI,CAAC,OAAO,IAAQ,IACjD,CACJ,CAAA;IAED,OAAO;QACL,MAAM,EAAE,WAAW,CAAC,SAAS;QAC7B,KAAK;QACL,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,KAAC,OAAO,KAAG;QACjB,WAAW,EAAE,KAAK;KACnB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EventAction } from '@botonic/core';
|
|
2
|
+
import { DebugEventConfig } from '../types';
|
|
3
|
+
export interface ConditionalChannelDebugEvent {
|
|
4
|
+
action: EventAction.ConditionalChannel;
|
|
5
|
+
channel: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const getConditionalChannelEventConfig: (data: ConditionalChannelDebugEvent) => DebugEventConfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EventAction } from '@botonic/core';
|
|
3
|
+
import { SplitSvg } from '../icons/split';
|
|
4
|
+
export const getConditionalChannelEventConfig = (data) => {
|
|
5
|
+
const title = (_jsxs(_Fragment, { children: ["Channel checked ", _jsxs("span", { children: ["- ", data.channel] })] }));
|
|
6
|
+
return {
|
|
7
|
+
action: EventAction.ConditionalChannel,
|
|
8
|
+
title,
|
|
9
|
+
component: null,
|
|
10
|
+
icon: _jsx(SplitSvg, {}),
|
|
11
|
+
collapsible: false,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=conditional-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditional-channel.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/events/conditional-channel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAQzC,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAC9C,IAAkC,EAChB,EAAE;IACpB,MAAM,KAAK,GAAG,CACZ,kDACkB,iCAAS,IAAI,CAAC,OAAO,IAAQ,IAC5C,CACJ,CAAA;IAED,OAAO;QACL,MAAM,EAAE,WAAW,CAAC,kBAAkB;QACtC,KAAK;QACL,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,KAAC,QAAQ,KAAG;QAClB,WAAW,EAAE,KAAK;KACnB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EventAction } from '@botonic/core';
|
|
2
|
+
import { DebugEventConfig } from '../types';
|
|
3
|
+
export interface ConditionalCountryDebugEvent {
|
|
4
|
+
action: EventAction.ConditionalCountry;
|
|
5
|
+
country: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const getConditionalCountryEventConfig: (data: ConditionalCountryDebugEvent) => DebugEventConfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EventAction } from '@botonic/core';
|
|
3
|
+
import { SplitSvg } from '../icons/split';
|
|
4
|
+
export const getConditionalCountryEventConfig = (data) => {
|
|
5
|
+
const title = (_jsxs(_Fragment, { children: ["Country checked ", _jsxs("span", { children: ["- ", data.country] })] }));
|
|
6
|
+
return {
|
|
7
|
+
action: EventAction.ConditionalCountry,
|
|
8
|
+
title,
|
|
9
|
+
component: null,
|
|
10
|
+
icon: _jsx(SplitSvg, {}),
|
|
11
|
+
collapsible: false,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=conditional-country.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditional-country.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/events/conditional-country.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAQzC,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAC9C,IAAkC,EAChB,EAAE;IACpB,MAAM,KAAK,GAAG,CACZ,kDACkB,iCAAS,IAAI,CAAC,OAAO,IAAQ,IAC5C,CACJ,CAAA;IAED,OAAO;QACL,MAAM,EAAE,WAAW,CAAC,kBAAkB;QACtC,KAAK;QACL,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,KAAC,QAAQ,KAAG;QAClB,WAAW,EAAE,KAAK;KACnB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EventAction } from '@botonic/core';
|
|
2
|
+
import { DebugEventConfig } from '../types';
|
|
3
|
+
export interface ConditionalCustomDebugEvent {
|
|
4
|
+
action: EventAction.ConditionalCustom;
|
|
5
|
+
conditional_variable: string;
|
|
6
|
+
variable_format: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const getConditionalCustomEventConfig: (data: ConditionalCustomDebugEvent) => DebugEventConfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EventAction } from '@botonic/core';
|
|
3
|
+
import { SplitSvg } from '../icons/split';
|
|
4
|
+
export const getConditionalCustomEventConfig = (data) => {
|
|
5
|
+
const title = (_jsxs(_Fragment, { children: ["Custom condition checked ", _jsxs("span", { children: ["- ", data.conditional_variable] })] }));
|
|
6
|
+
return {
|
|
7
|
+
action: EventAction.ConditionalCustom,
|
|
8
|
+
title,
|
|
9
|
+
component: null,
|
|
10
|
+
icon: _jsx(SplitSvg, {}),
|
|
11
|
+
collapsible: false,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=conditional-custom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditional-custom.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/events/conditional-custom.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AASzC,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC7C,IAAiC,EACf,EAAE;IACpB,MAAM,KAAK,GAAG,CACZ,2DAC2B,iCAAS,IAAI,CAAC,oBAAoB,IAAQ,IAClE,CACJ,CAAA;IAED,OAAO;QACL,MAAM,EAAE,WAAW,CAAC,iBAAiB;QACrC,KAAK;QACL,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,KAAC,QAAQ,KAAG;QAClB,WAAW,EAAE,KAAK;KACnB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EventAction } from '@botonic/core';
|
|
2
|
+
import { DebugEventConfig } from '../types';
|
|
3
|
+
export interface ConditionalQueueStatusDebugEvent {
|
|
4
|
+
action: EventAction.ConditionalQueueStatus;
|
|
5
|
+
queue_id: string;
|
|
6
|
+
queue_name: string;
|
|
7
|
+
is_queue_open: boolean;
|
|
8
|
+
is_available_agent: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const getConditionalQueueStatusEventConfig: (data: ConditionalQueueStatusDebugEvent) => DebugEventConfig;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EventAction } from '@botonic/core';
|
|
3
|
+
import { SplitSvg } from '../icons/split';
|
|
4
|
+
export const getConditionalQueueStatusEventConfig = (data) => {
|
|
5
|
+
const queueStatus = data.is_queue_open ? 'Open' : 'Closed';
|
|
6
|
+
const agentStatus = data.is_available_agent ? 'Available' : 'Unavailable';
|
|
7
|
+
const title = (_jsxs(_Fragment, { children: ["Queue status checked", ' ', _jsxs("span", { children: ["- ", queueStatus, " (Agent ", agentStatus, ")"] })] }));
|
|
8
|
+
return {
|
|
9
|
+
action: EventAction.ConditionalQueueStatus,
|
|
10
|
+
title,
|
|
11
|
+
component: null,
|
|
12
|
+
icon: _jsx(SplitSvg, {}),
|
|
13
|
+
collapsible: false,
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=conditional-queue-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditional-queue-status.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/events/conditional-queue-status.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAWzC,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAClD,IAAsC,EACpB,EAAE;IACpB,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAA;IAC1D,MAAM,WAAW,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,CAAA;IAEzE,MAAM,KAAK,GAAG,CACZ,sDACuB,GAAG,EACxB,iCACK,WAAW,cAAU,WAAW,SAC9B,IACN,CACJ,CAAA;IAED,OAAO;QACL,MAAM,EAAE,WAAW,CAAC,sBAAsB;QAC1C,KAAK;QACL,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,KAAC,QAAQ,KAAG;QAClB,WAAW,EAAE,KAAK;KACnB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -7,9 +7,13 @@ export declare const LABELS: {
|
|
|
7
7
|
readonly KNOWLEDGE_GATHERED: "Knowledge gathered";
|
|
8
8
|
readonly EXECUTED_TOOLS: "Executed tools";
|
|
9
9
|
readonly NO_TOOLS_EXECUTED: "No tools executed";
|
|
10
|
+
readonly AUTO_ASSIGN_ON: "ON";
|
|
11
|
+
readonly AUTO_ASSIGN_OFF: "OFF";
|
|
10
12
|
readonly EXIT: "Exit";
|
|
11
13
|
readonly ERROR: "Error";
|
|
12
14
|
readonly QUEUE: "Queue";
|
|
15
|
+
readonly AUTO_ASSIGN: "Auto-assign";
|
|
16
|
+
readonly NOTE: "Note";
|
|
13
17
|
readonly KNOWLEDGE_BASE_FAIL_REASON: "Knowledge Base Fail Reason";
|
|
14
18
|
readonly SEE_CHUNKS_BUTTON: "See chunks";
|
|
15
19
|
};
|
|
@@ -7,9 +7,13 @@ export const LABELS = {
|
|
|
7
7
|
KNOWLEDGE_GATHERED: 'Knowledge gathered',
|
|
8
8
|
EXECUTED_TOOLS: 'Executed tools',
|
|
9
9
|
NO_TOOLS_EXECUTED: 'No tools executed',
|
|
10
|
+
AUTO_ASSIGN_ON: 'ON',
|
|
11
|
+
AUTO_ASSIGN_OFF: 'OFF',
|
|
10
12
|
EXIT: 'Exit',
|
|
11
13
|
ERROR: 'Error',
|
|
12
14
|
QUEUE: 'Queue',
|
|
15
|
+
AUTO_ASSIGN: 'Auto-assign',
|
|
16
|
+
NOTE: 'Note',
|
|
13
17
|
KNOWLEDGE_BASE_FAIL_REASON: 'Knowledge Base Fail Reason',
|
|
14
18
|
SEE_CHUNKS_BUTTON: 'See chunks',
|
|
15
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/events/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;IAClC,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,kBAAkB,EAAE,oBAAoB;IACxC,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;IACtC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,0BAA0B,EAAE,4BAA4B;IACxD,iBAAiB,EAAE,YAAY;CACvB,CAAA"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/events/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;IAClC,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,kBAAkB,EAAE,oBAAoB;IACxC,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;IACtC,cAAc,EAAE,IAAI;IACpB,eAAe,EAAE,KAAK;IACtB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,MAAM;IACZ,0BAA0B,EAAE,4BAA4B;IACxD,iBAAiB,EAAE,YAAY;CACvB,CAAA"}
|
|
@@ -4,6 +4,8 @@ export interface HandoffSuccessDebugEvent {
|
|
|
4
4
|
action: EventAction.HandoffSuccess;
|
|
5
5
|
handoff_queue_name: string;
|
|
6
6
|
handoff_is_queue_open: boolean;
|
|
7
|
+
handoff_has_auto_assign: boolean;
|
|
8
|
+
handoff_note_id: string;
|
|
7
9
|
}
|
|
8
10
|
export declare const HandoffSuccess: (props: HandoffSuccessDebugEvent) => import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export declare const getHandoffSuccessEventConfig: (data: HandoffSuccessDebugEvent) => DebugEventConfig;
|
|
@@ -1,19 +1,38 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
3
|
import { EventAction } from '@botonic/core';
|
|
4
|
+
import { useContext, useEffect, useState } from 'react';
|
|
5
|
+
import { WebchatContext } from '../../../webchat/context';
|
|
3
6
|
import { HeadSetSvg } from '../icons';
|
|
4
7
|
import { StyledDebugDetail, StyledDebugLabel, StyledDebugValue, } from '../styles';
|
|
5
8
|
import { LABELS } from './constants';
|
|
6
9
|
export const HandoffSuccess = (props) => {
|
|
7
|
-
|
|
10
|
+
const { previewUtils } = useContext(WebchatContext);
|
|
11
|
+
const [noteMessage, setNoteMessage] = useState();
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const fetchNoteMessage = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
+
if (!previewUtils || !props.handoff_note_id) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const noteMessage = yield previewUtils.getMessageById(props.handoff_note_id);
|
|
18
|
+
if (!noteMessage) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
setNoteMessage(noteMessage.text);
|
|
22
|
+
});
|
|
23
|
+
fetchNoteMessage();
|
|
24
|
+
}, [previewUtils, props.handoff_note_id]);
|
|
25
|
+
return (_jsxs(_Fragment, { children: [_jsxs(StyledDebugDetail, { children: [_jsx(StyledDebugLabel, { children: LABELS.QUEUE }), _jsx(StyledDebugValue, { children: props.handoff_queue_name })] }), _jsxs(StyledDebugDetail, { children: [_jsx(StyledDebugLabel, { children: LABELS.AUTO_ASSIGN }), _jsx(StyledDebugValue, { children: props.handoff_has_auto_assign
|
|
26
|
+
? LABELS.AUTO_ASSIGN_ON
|
|
27
|
+
: LABELS.AUTO_ASSIGN_OFF })] }), Boolean(noteMessage) && (_jsxs(StyledDebugDetail, { children: [_jsx(StyledDebugLabel, { children: LABELS.NOTE }), _jsx(StyledDebugValue, { children: noteMessage })] }))] }));
|
|
8
28
|
};
|
|
9
29
|
export const getHandoffSuccessEventConfig = (data) => {
|
|
10
30
|
return {
|
|
11
31
|
action: EventAction.HandoffSuccess,
|
|
12
32
|
title: (_jsxs(_Fragment, { children: ["Handoff to agent ", _jsxs("span", { children: ["- ", data.handoff_queue_name] })] })),
|
|
13
33
|
icon: _jsx(HeadSetSvg, {}),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
collapsible: false,
|
|
34
|
+
component: HandoffSuccess,
|
|
35
|
+
collapsible: true,
|
|
17
36
|
};
|
|
18
37
|
};
|
|
19
38
|
//# sourceMappingURL=handoff-success.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handoff-success.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/events/handoff-success.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handoff-success.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/events/handoff-success.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAc,EAAE,UAAU,EAAE,SAAS,EAA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M,CAAC,eAAe,GACT,IACD,EACnB,OAAO,CAAC,WAAW,CAAC,IAAI,CACvB,MAAC,iBAAiB,eAChB,KAAC,gBAAgB,cAAE,MAAM,CAAC,IAAI,GAAoB,EAClD,KAAC,gBAAgB,cAAE,WAAW,GAAoB,IAChC,CACrB,IACA,CACJ,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAC1C,IAA8B,EACZ,EAAE;IACpB,OAAO;QACL,MAAM,EAAE,WAAW,CAAC,cAAc;QAClC,KAAK,EAAE,CACL,mDACmB,iCAAS,IAAI,CAAC,kBAAkB,IAAQ,IACxD,CACJ;QACD,IAAI,EAAE,KAAC,UAAU,KAAG;QACpB,SAAS,EAAE,cAAc;QACzB,WAAW,EAAE,IAAI;KAClB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
export * from './ai-agent';
|
|
2
|
+
export * from './bot-action';
|
|
3
|
+
export * from './conditional-channel';
|
|
4
|
+
export * from './conditional-country';
|
|
5
|
+
export * from './conditional-custom';
|
|
6
|
+
export * from './conditional-queue-status';
|
|
2
7
|
export * from './fallback';
|
|
3
8
|
export * from './handoff-success';
|
|
4
9
|
export * from './keyword';
|
|
5
10
|
export * from './knowledge-base';
|
|
6
11
|
export * from './knowledge-bases-types';
|
|
12
|
+
export * from './redirect-flow';
|
|
7
13
|
export * from './smart-intent';
|
|
14
|
+
export * from './webview-action-triggered';
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
export * from './ai-agent';
|
|
2
|
+
export * from './bot-action';
|
|
3
|
+
export * from './conditional-channel';
|
|
4
|
+
export * from './conditional-country';
|
|
5
|
+
export * from './conditional-custom';
|
|
6
|
+
export * from './conditional-queue-status';
|
|
2
7
|
export * from './fallback';
|
|
3
8
|
export * from './handoff-success';
|
|
4
9
|
export * from './keyword';
|
|
5
10
|
export * from './knowledge-base';
|
|
6
11
|
export * from './knowledge-bases-types';
|
|
12
|
+
export * from './redirect-flow';
|
|
7
13
|
export * from './smart-intent';
|
|
14
|
+
export * from './webview-action-triggered';
|
|
8
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EventAction } from '@botonic/core';
|
|
2
|
+
import { DebugEventConfig } from '../types';
|
|
3
|
+
export interface RedirectFlowDebugEvent {
|
|
4
|
+
action: EventAction.RedirectFlow;
|
|
5
|
+
flow_id: string;
|
|
6
|
+
flow_name: string;
|
|
7
|
+
flow_target_id: string;
|
|
8
|
+
flow_target_name: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const getRedirectFlowEventConfig: (data: RedirectFlowDebugEvent) => DebugEventConfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EventAction } from '@botonic/core';
|
|
3
|
+
import { ArrowProgressSvg } from '../icons/arrow-progress';
|
|
4
|
+
export const getRedirectFlowEventConfig = (data) => {
|
|
5
|
+
const title = (_jsxs(_Fragment, { children: ["Redirected to flow ", _jsxs("span", { children: ["- ", data.flow_target_name] })] }));
|
|
6
|
+
return {
|
|
7
|
+
action: EventAction.RedirectFlow,
|
|
8
|
+
title,
|
|
9
|
+
component: null,
|
|
10
|
+
icon: _jsx(ArrowProgressSvg, {}),
|
|
11
|
+
collapsible: false,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=redirect-flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redirect-flow.js","sourceRoot":"","sources":["../../../../../src/components/system-debug-trace/events/redirect-flow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAW1D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,IAA4B,EACV,EAAE;IACpB,MAAM,KAAK,GAAG,CACZ,qDACqB,iCAAS,IAAI,CAAC,gBAAgB,IAAQ,IACxD,CACJ,CAAA;IAED,OAAO;QACL,MAAM,EAAE,WAAW,CAAC,YAAY;QAChC,KAAK;QACL,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,KAAC,gBAAgB,KAAG;QAC1B,WAAW,EAAE,KAAK;KACnB,CAAA;AACH,CAAC,CAAA"}
|