@botonic/plugin-flow-builder 0.33.1 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -47,16 +47,11 @@ class FlowHandoff extends content_fields_base_1.ContentFieldsBase {
|
|
|
47
47
|
handOffBuilder.withExtraData({
|
|
48
48
|
language,
|
|
49
49
|
});
|
|
50
|
-
this.isTestIntegration = request.session.is_test_integration;
|
|
51
50
|
yield handOffBuilder.handOff();
|
|
52
51
|
}
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
54
|
toBotonic(id, request) {
|
|
56
|
-
var _a;
|
|
57
|
-
if (this.isTestIntegration) {
|
|
58
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Multichannel, { children: (0, jsx_runtime_1.jsxs)(react_1.Text, { children: ["_**HANDOFF IN PREVIEW**_ ", '\n', "\u2139\uFE0F _At this point, a new case would be created in ", (_a = this.queue) === null || _a === void 0 ? void 0 : _a.name, " queue. To continue with the preview, a case resolved scenario will be simulated._"] }) }, this.id));
|
|
59
|
-
}
|
|
60
55
|
return (0, core_1.isDev)(request.session) || (0, core_1.isWebchat)(request.session) ? ((0, jsx_runtime_1.jsx)(react_1.WebchatSettings, { enableUserInput: true }, id)) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}));
|
|
61
56
|
}
|
|
62
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-handoff.js","sourceRoot":"","sources":["../../../src/content-fields/flow-handoff.tsx"],"names":[],"mappings":";;;;;AAAA,wCAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"flow-handoff.js","sourceRoot":"","sources":["../../../src/content-fields/flow-handoff.tsx"],"names":[],"mappings":";;;;;AAAA,wCAA+E;AAC/E,0CAA+D;AAI/D,+DAAyD;AAGzD,MAAa,WAAY,SAAQ,uCAAiB;IAQhD,MAAM,CAAC,cAAc,CACnB,UAAyB,EACzB,MAAc,EACd,MAAs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AQ,CAAA;gBACzD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAA;gBAEvD,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;gBACvC,cAAc,CAAC,YAAY,CAAC;oBAC1B,QAAQ;oBACR,OAAO;iBACR,CAAC,CAAA;gBACF,cAAc,CAAC,aAAa,CAAC;oBAC3B,QAAQ;iBACT,CAAC,CAAA;gBAEF,MAAM,cAAc,CAAC,OAAO,EAAE,CAAA;aAC/B;QACH,CAAC;KAAA;IAED,SAAS,CAAC,EAAU,EAAE,OAAsB;QAC1C,OAAO,IAAA,YAAK,EAAC,OAAO,CAAC,OAAO,CAAC,IAAI,IAAA,gBAAS,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAC5D,uBAAC,uBAAe,IAAU,eAAe,EAAE,IAAI,IAAzB,EAAE,CAA2B,CACpD,CAAC,CAAC,CAAC,CACF,kDAAK,CACN,CAAA;IACH,CAAC;CACF;AAxED,kCAwEC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { HandOffBuilder, HelpdeskEvent, isDev, isWebchat } from '@botonic/core';
|
|
4
|
-
import {
|
|
4
|
+
import { WebchatSettings } from '@botonic/react';
|
|
5
5
|
import { ContentFieldsBase } from './content-fields-base';
|
|
6
6
|
export class FlowHandoff extends ContentFieldsBase {
|
|
7
7
|
static fromHubtypeCMS(cmsHandoff, locale, cmsApi) {
|
|
@@ -44,16 +44,11 @@ export class FlowHandoff extends ContentFieldsBase {
|
|
|
44
44
|
handOffBuilder.withExtraData({
|
|
45
45
|
language,
|
|
46
46
|
});
|
|
47
|
-
this.isTestIntegration = request.session.is_test_integration;
|
|
48
47
|
yield handOffBuilder.handOff();
|
|
49
48
|
}
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
51
|
toBotonic(id, request) {
|
|
53
|
-
var _a;
|
|
54
|
-
if (this.isTestIntegration) {
|
|
55
|
-
return (_jsx(Multichannel, { children: _jsxs(Text, { children: ["_**HANDOFF IN PREVIEW**_ ", '\n', "\u2139\uFE0F _At this point, a new case would be created in ", (_a = this.queue) === null || _a === void 0 ? void 0 : _a.name, " queue. To continue with the preview, a case resolved scenario will be simulated._"] }) }, this.id));
|
|
56
|
-
}
|
|
57
52
|
return isDev(request.session) || isWebchat(request.session) ? (_jsx(WebchatSettings, { enableUserInput: true }, id)) : (_jsx(_Fragment, {}));
|
|
58
53
|
}
|
|
59
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-handoff.js","sourceRoot":"","sources":["../../../src/content-fields/flow-handoff.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC/E,OAAO,
|
|
1
|
+
{"version":3,"file":"flow-handoff.js","sourceRoot":"","sources":["../../../src/content-fields/flow-handoff.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC/E,OAAO,EAAiB,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAI/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAGzD,MAAM,OAAO,WAAY,SAAQ,iBAAiB;IAQhD,MAAM,CAAC,cAAc,CACnB,UAAyB,EACzB,MAAc,EACd,MAAsB;QAEtB,MAAM,UAAU,GAAG,IAAI,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;QACjD,UAAU,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAA;QACjC,UAAU,CAAC,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EA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AAC;oBAC1B,QAAQ;oBACR,OAAO;iBACR,CAAC,CAAA;gBACF,cAAc,CAAC,aAAa,CAAC;oBAC3B,QAAQ;iBACT,CAAC,CAAA;gBAEF,MAAM,cAAc,CAAC,OAAO,EAAE,CAAA;aAC/B;QACH,CAAC;KAAA;IAED,SAAS,CAAC,EAAU,EAAE,OAAsB;QAC1C,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAC5D,KAAC,eAAe,IAAU,eAAe,EAAE,IAAI,IAAzB,EAAE,CAA2B,CACpD,CAAC,CAAC,CAAC,CACF,mBAAK,CACN,CAAA;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botonic/plugin-flow-builder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"main": "./lib/cjs/index.js",
|
|
5
5
|
"module": "./lib/esm/index.js",
|
|
6
6
|
"description": "Use Flow Builder to show your contents",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"lint_core": "../../node_modules/.bin/eslint_d --cache --quiet 'src/**/*.ts*'"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@botonic/react": "^0.
|
|
17
|
+
"@botonic/react": "^0.34.0",
|
|
18
18
|
"axios": "^1.7.9",
|
|
19
19
|
"uuid": "^10.0.0"
|
|
20
20
|
},
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { HandOffBuilder, HelpdeskEvent, isDev, isWebchat } from '@botonic/core'
|
|
2
|
-
import {
|
|
3
|
-
ActionRequest,
|
|
4
|
-
Multichannel,
|
|
5
|
-
Text,
|
|
6
|
-
WebchatSettings,
|
|
7
|
-
} from '@botonic/react'
|
|
2
|
+
import { ActionRequest, WebchatSettings } from '@botonic/react'
|
|
8
3
|
import React from 'react'
|
|
9
4
|
|
|
10
5
|
import { FlowBuilderApi } from '../api'
|
|
@@ -71,24 +66,12 @@ export class FlowHandoff extends ContentFieldsBase {
|
|
|
71
66
|
handOffBuilder.withExtraData({
|
|
72
67
|
language,
|
|
73
68
|
})
|
|
74
|
-
|
|
69
|
+
|
|
75
70
|
await handOffBuilder.handOff()
|
|
76
71
|
}
|
|
77
72
|
}
|
|
78
73
|
|
|
79
74
|
toBotonic(id: string, request: ActionRequest): JSX.Element {
|
|
80
|
-
if (this.isTestIntegration) {
|
|
81
|
-
return (
|
|
82
|
-
<Multichannel key={this.id}>
|
|
83
|
-
<Text>
|
|
84
|
-
_**HANDOFF IN PREVIEW**_ {'\n'}ℹ️ _At this point, a new case would
|
|
85
|
-
be created in {this.queue?.name} queue. To continue with the
|
|
86
|
-
preview, a case resolved scenario will be simulated._
|
|
87
|
-
</Text>
|
|
88
|
-
</Multichannel>
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
75
|
return isDev(request.session) || isWebchat(request.session) ? (
|
|
93
76
|
<WebchatSettings key={id} enableUserInput={true} />
|
|
94
77
|
) : (
|