@telia-ace/knowledge-widget-bot-provider 0.0.1-alpha.43 → 0.0.1-alpha.46
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/contract/custom-component/contact-method-item.js +1 -1
- package/lib/contract/custom-component/contact-method-list.js +1 -1
- package/lib/interface/entry.interface.js +17 -1
- package/lib-esm/contract/custom-component/contact-method-item.js +1 -1
- package/lib-esm/contract/custom-component/contact-method-list.js +1 -1
- package/lib-esm/interface/entry.interface.js +17 -1
- package/package.json +7 -7
|
@@ -29,6 +29,6 @@ var ContactMethodItem = function (_a) {
|
|
|
29
29
|
else {
|
|
30
30
|
dispatch('action', "".concat(contactMethod.id, "/contact-methods/").concat(contactMethod.title));
|
|
31
31
|
}
|
|
32
|
-
}, dispatch: dispatch }, contactMethod)));
|
|
32
|
+
}, dispatch: dispatch }, contactMethod, { inline: true })));
|
|
33
33
|
};
|
|
34
34
|
export default ContactMethodItem;
|
|
@@ -8,6 +8,6 @@ import ContactMethodItem from './contact-method-item';
|
|
|
8
8
|
var ContactMethodList = function (props) {
|
|
9
9
|
return (React.createElement(Fragment, null, props.contactMethodList.map(function (contactMethod) { return (React.createElement(StyledContactMethod, { key: contactMethod.id, type: props.type, contactMethod: contactMethod, expanded: !!contactMethod.executeImmediately || undefined })); })));
|
|
10
10
|
};
|
|
11
|
-
var StyledContactMethod = styled(ContactMethodItem)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-bottom: 1px solid rgb(239, 239, 239);\n padding: ", ";\n"], ["\n border-bottom: 1px solid rgb(239, 239, 239);\n padding: ", ";\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.medium; });
|
|
11
|
+
var StyledContactMethod = styled(ContactMethodItem)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-bottom: 1px solid rgb(239, 239, 239);\n padding: ", ";\n\n &:last-child {\n border-bottom: none;\n }\n"], ["\n border-bottom: 1px solid rgb(239, 239, 239);\n padding: ", ";\n\n &:last-child {\n border-bottom: none;\n }\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.medium; });
|
|
12
12
|
export default ContactMethodList;
|
|
13
13
|
var templateObject_1;
|
|
@@ -189,6 +189,13 @@ var EntryInterface = /** @class */ (function () {
|
|
|
189
189
|
var object = this.getListActions(entry.content.items, this.getContentText(entry), entry.actions, entry.localState);
|
|
190
190
|
if (!!feedbackEntry) {
|
|
191
191
|
var feedbackObject = this.getListActions(feedbackEntry.content.items, this.getContentText(feedbackEntry), feedbackEntry.actions, feedbackEntry.localState);
|
|
192
|
+
//TODO this will be remade
|
|
193
|
+
StoreHelper.insertMessageToStore({
|
|
194
|
+
id: feedbackEntry.id,
|
|
195
|
+
message: undefined,
|
|
196
|
+
entry: feedbackEntry,
|
|
197
|
+
isUser: false,
|
|
198
|
+
});
|
|
192
199
|
return object.concat(feedbackObject);
|
|
193
200
|
}
|
|
194
201
|
return object;
|
|
@@ -200,6 +207,7 @@ var EntryInterface = /** @class */ (function () {
|
|
|
200
207
|
return { title: entry.content.header };
|
|
201
208
|
};
|
|
202
209
|
EntryInterface.prototype.textTransform = function (entry, feedbackEntry) {
|
|
210
|
+
//TODO this will be remade with the embeded contact methods
|
|
203
211
|
if (!!entry.content.items)
|
|
204
212
|
return this.listTransform(entry, feedbackEntry);
|
|
205
213
|
var returnObj = [
|
|
@@ -208,6 +216,12 @@ var EntryInterface = /** @class */ (function () {
|
|
|
208
216
|
];
|
|
209
217
|
if (!!feedbackEntry) {
|
|
210
218
|
var feedbackObject = this.getListActions(feedbackEntry.content.items, this.getContentText(feedbackEntry), feedbackEntry.actions, feedbackEntry.localState);
|
|
219
|
+
StoreHelper.insertMessageToStore({
|
|
220
|
+
id: feedbackEntry.id,
|
|
221
|
+
message: undefined,
|
|
222
|
+
entry: feedbackEntry,
|
|
223
|
+
isUser: false,
|
|
224
|
+
});
|
|
211
225
|
feedbackObject.unshift(returnObj);
|
|
212
226
|
return feedbackObject;
|
|
213
227
|
}
|
|
@@ -245,7 +259,9 @@ var EntryInterface = /** @class */ (function () {
|
|
|
245
259
|
break;
|
|
246
260
|
}
|
|
247
261
|
case _this.nextActionKey: {
|
|
248
|
-
if (!!actions['next'] &&
|
|
262
|
+
if (!!actions['next'] &&
|
|
263
|
+
actions['next'].take ===
|
|
264
|
+
items.filter(function (o) { return o.actionKey !== 'help'; }).length + 2)
|
|
249
265
|
mainListContent[o.actionKey] = o.title;
|
|
250
266
|
break;
|
|
251
267
|
}
|
|
@@ -29,6 +29,6 @@ var ContactMethodItem = function (_a) {
|
|
|
29
29
|
else {
|
|
30
30
|
dispatch('action', "".concat(contactMethod.id, "/contact-methods/").concat(contactMethod.title));
|
|
31
31
|
}
|
|
32
|
-
}, dispatch: dispatch }, contactMethod)));
|
|
32
|
+
}, dispatch: dispatch }, contactMethod, { inline: true })));
|
|
33
33
|
};
|
|
34
34
|
export default ContactMethodItem;
|
|
@@ -8,6 +8,6 @@ import ContactMethodItem from './contact-method-item';
|
|
|
8
8
|
var ContactMethodList = function (props) {
|
|
9
9
|
return (React.createElement(Fragment, null, props.contactMethodList.map(function (contactMethod) { return (React.createElement(StyledContactMethod, { key: contactMethod.id, type: props.type, contactMethod: contactMethod, expanded: !!contactMethod.executeImmediately || undefined })); })));
|
|
10
10
|
};
|
|
11
|
-
var StyledContactMethod = styled(ContactMethodItem)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-bottom: 1px solid rgb(239, 239, 239);\n padding: ", ";\n"], ["\n border-bottom: 1px solid rgb(239, 239, 239);\n padding: ", ";\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.medium; });
|
|
11
|
+
var StyledContactMethod = styled(ContactMethodItem)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-bottom: 1px solid rgb(239, 239, 239);\n padding: ", ";\n\n &:last-child {\n border-bottom: none;\n }\n"], ["\n border-bottom: 1px solid rgb(239, 239, 239);\n padding: ", ";\n\n &:last-child {\n border-bottom: none;\n }\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.medium; });
|
|
12
12
|
export default ContactMethodList;
|
|
13
13
|
var templateObject_1;
|
|
@@ -189,6 +189,13 @@ var EntryInterface = /** @class */ (function () {
|
|
|
189
189
|
var object = this.getListActions(entry.content.items, this.getContentText(entry), entry.actions, entry.localState);
|
|
190
190
|
if (!!feedbackEntry) {
|
|
191
191
|
var feedbackObject = this.getListActions(feedbackEntry.content.items, this.getContentText(feedbackEntry), feedbackEntry.actions, feedbackEntry.localState);
|
|
192
|
+
//TODO this will be remade
|
|
193
|
+
StoreHelper.insertMessageToStore({
|
|
194
|
+
id: feedbackEntry.id,
|
|
195
|
+
message: undefined,
|
|
196
|
+
entry: feedbackEntry,
|
|
197
|
+
isUser: false,
|
|
198
|
+
});
|
|
192
199
|
return object.concat(feedbackObject);
|
|
193
200
|
}
|
|
194
201
|
return object;
|
|
@@ -200,6 +207,7 @@ var EntryInterface = /** @class */ (function () {
|
|
|
200
207
|
return { title: entry.content.header };
|
|
201
208
|
};
|
|
202
209
|
EntryInterface.prototype.textTransform = function (entry, feedbackEntry) {
|
|
210
|
+
//TODO this will be remade with the embeded contact methods
|
|
203
211
|
if (!!entry.content.items)
|
|
204
212
|
return this.listTransform(entry, feedbackEntry);
|
|
205
213
|
var returnObj = [
|
|
@@ -208,6 +216,12 @@ var EntryInterface = /** @class */ (function () {
|
|
|
208
216
|
];
|
|
209
217
|
if (!!feedbackEntry) {
|
|
210
218
|
var feedbackObject = this.getListActions(feedbackEntry.content.items, this.getContentText(feedbackEntry), feedbackEntry.actions, feedbackEntry.localState);
|
|
219
|
+
StoreHelper.insertMessageToStore({
|
|
220
|
+
id: feedbackEntry.id,
|
|
221
|
+
message: undefined,
|
|
222
|
+
entry: feedbackEntry,
|
|
223
|
+
isUser: false,
|
|
224
|
+
});
|
|
211
225
|
feedbackObject.unshift(returnObj);
|
|
212
226
|
return feedbackObject;
|
|
213
227
|
}
|
|
@@ -245,7 +259,9 @@ var EntryInterface = /** @class */ (function () {
|
|
|
245
259
|
break;
|
|
246
260
|
}
|
|
247
261
|
case _this.nextActionKey: {
|
|
248
|
-
if (!!actions['next'] &&
|
|
262
|
+
if (!!actions['next'] &&
|
|
263
|
+
actions['next'].take ===
|
|
264
|
+
items.filter(function (o) { return o.actionKey !== 'help'; }).length + 2)
|
|
249
265
|
mainListContent[o.actionKey] = o.title;
|
|
250
266
|
break;
|
|
251
267
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/knowledge-widget-bot-provider",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.46",
|
|
4
4
|
"description": "Bot Provider Plugin ACE Knowledge Widgets.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"typings": "lib/index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@telia-ace/knowledge-widget-adapters": "^1.0.
|
|
29
|
-
"@telia-ace/knowledge-widget-types-grid": "^1.0.
|
|
30
|
-
"@telia-ace/knowledge-widget-ui": "^1.0.
|
|
31
|
-
"@telia-ace/widget-conversation": "^1.0.
|
|
32
|
-
"@telia-ace/widget-forms": "^1.0.
|
|
28
|
+
"@telia-ace/knowledge-widget-adapters": "^1.0.13",
|
|
29
|
+
"@telia-ace/knowledge-widget-types-grid": "^1.0.13",
|
|
30
|
+
"@telia-ace/knowledge-widget-ui": "^1.0.10",
|
|
31
|
+
"@telia-ace/widget-conversation": "^1.0.12",
|
|
32
|
+
"@telia-ace/widget-forms": "^1.0.8",
|
|
33
33
|
"@telia-ace/widget-services": "^1.0.4",
|
|
34
34
|
"@webprovisions/bootstrapping": "^1.0.12",
|
|
35
35
|
"uuid": "^8.3.2"
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/uuid": "^8.3.4"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "753397b5908ad6653fff863de21e741d50b238d5"
|
|
45
45
|
}
|