@telia-ace/knowledge-widget-bot-provider 0.0.1-alpha.48 → 0.0.1-alpha.49
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/LICENSE.txt +5 -5
- package/README.md +12 -12
- package/dist/client/chat.client.d.ts +16 -16
- package/dist/client/contact-method.client.d.ts +34 -34
- package/dist/client/http.client.d.ts +26 -26
- package/dist/client/middleware.client.d.ts +14 -14
- package/dist/components/feedback-list.d.ts +8 -0
- package/dist/components/no-good-alternative.d.ts +6 -0
- package/dist/contact-method.js.map +1 -1
- package/dist/contract/custom-component/contact-method-item.d.ts +9 -9
- package/dist/contract/custom-component/contact-method-list.d.ts +7 -7
- package/dist/contract/custom-component/contact-method.d.ts +3 -3
- package/dist/contract/custom-component/entry-context.d.ts +5 -5
- package/dist/contract/enum/server-entry-type.enum.d.ts +7 -7
- package/dist/contract/model/conversation-api-model/list.model.d.ts +5 -5
- package/dist/contract/model/conversation-api-model/message.model.d.ts +7 -7
- package/dist/contract/model/http/action.model.d.ts +3 -3
- package/dist/contract/model/http/client-action.model.d.ts +4 -4
- package/dist/contract/model/http/client-envelope.model.d.ts +9 -9
- package/dist/contract/model/http/connect-options.model.d.ts +5 -5
- package/dist/contract/model/http/global-state.model.d.ts +8 -8
- package/dist/contract/model/http/http-client-options.model.d.ts +5 -5
- package/dist/contract/model/http/server-entry.model.d.ts +11 -11
- package/dist/contract/model/http/server-envelope.model.d.ts +10 -10
- package/dist/contract/model/middleware/aggregator-state.model.d.ts +4 -4
- package/dist/contract/model/shared/loose-object.model.d.ts +3 -3
- package/dist/feedback-list.js +104 -0
- package/dist/feedback-list.js.map +1 -0
- package/dist/helper/chat.helper.d.ts +8 -8
- package/dist/helper/http.helper.d.ts +13 -13
- package/dist/helper/middleware.helper.d.ts +12 -12
- package/dist/helper/store.helper.d.ts +23 -23
- package/dist/index.d.ts +2 -2
- package/dist/index.js +32 -11
- package/dist/index.js.map +1 -1
- package/dist/interface/entry.interface.d.ts +20 -20
- package/dist/interface/middleware/paging.interface.d.ts +4 -4
- package/dist/interface/middleware/processor.interface.d.ts +10 -10
- package/dist/no-good-alternative.js +33 -0
- package/dist/no-good-alternative.js.map +1 -0
- package/dist/plugin.d.ts +3 -3
- package/dist/ui/feedback-list.d.ts +8 -0
- package/dist/ui/no-good-alternative.d.ts +6 -0
- package/dist/utils.d.ts +2 -2
- package/package.json +8 -8
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { Container } from '@webprovisions/platform';
|
|
2
|
-
import { Message } from '../contract/model/conversation-api-model/message.model';
|
|
3
|
-
import { ServerEntry } from '../contract/model/http/server-entry.model';
|
|
4
|
-
export default class EntryInterface {
|
|
5
|
-
private container;
|
|
6
|
-
private helpActionKey;
|
|
7
|
-
private nextActionKey;
|
|
8
|
-
constructor(container: Container);
|
|
9
|
-
transform(entry: ServerEntry, feedbackEntry?: ServerEntry): Promise<Message | undefined>;
|
|
10
|
-
transformContactMethod(entry: ServerEntry): Promise<any>;
|
|
11
|
-
transformArray(entryArray: ServerEntry[]): Promise<Message[]>;
|
|
12
|
-
getUserMessage(action: string): string | undefined;
|
|
13
|
-
private listTransform;
|
|
14
|
-
private getContentText;
|
|
15
|
-
private textTransform;
|
|
16
|
-
private getListActions;
|
|
17
|
-
private getListType;
|
|
18
|
-
private getTitleFromEntry;
|
|
19
|
-
private getTitleFromList;
|
|
20
|
-
}
|
|
1
|
+
import { Container } from '@webprovisions/platform';
|
|
2
|
+
import { Message } from '../contract/model/conversation-api-model/message.model';
|
|
3
|
+
import { ServerEntry } from '../contract/model/http/server-entry.model';
|
|
4
|
+
export default class EntryInterface {
|
|
5
|
+
private container;
|
|
6
|
+
private helpActionKey;
|
|
7
|
+
private nextActionKey;
|
|
8
|
+
constructor(container: Container);
|
|
9
|
+
transform(entry: ServerEntry, feedbackEntry?: ServerEntry): Promise<Message | undefined>;
|
|
10
|
+
transformContactMethod(entry: ServerEntry): Promise<any>;
|
|
11
|
+
transformArray(entryArray: ServerEntry[]): Promise<Message[]>;
|
|
12
|
+
getUserMessage(action: string): string | undefined;
|
|
13
|
+
private listTransform;
|
|
14
|
+
private getContentText;
|
|
15
|
+
private textTransform;
|
|
16
|
+
private getListActions;
|
|
17
|
+
private getListType;
|
|
18
|
+
private getTitleFromEntry;
|
|
19
|
+
private getTitleFromList;
|
|
20
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServerEntry } from "../../contract/model/http/server-entry.model";
|
|
2
|
-
export default class PagingInterface {
|
|
3
|
-
process(entries: ServerEntry[]): ServerEntry[];
|
|
4
|
-
}
|
|
1
|
+
import { ServerEntry } from "../../contract/model/http/server-entry.model";
|
|
2
|
+
export default class PagingInterface {
|
|
3
|
+
process(entries: ServerEntry[]): ServerEntry[];
|
|
4
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ServerEntry } from '../../contract/model/http/server-entry.model';
|
|
2
|
-
export default class ProcessorInterface {
|
|
3
|
-
process(entries: ServerEntry[]): ServerEntry[];
|
|
4
|
-
processUpdate(entry: ServerEntry | undefined, updateEntryArray: ServerEntry[]): ServerEntry[];
|
|
5
|
-
private handleActionUpdateOrInsert;
|
|
6
|
-
private deletePaging;
|
|
7
|
-
private delete;
|
|
8
|
-
private merge;
|
|
9
|
-
private moveLoader;
|
|
10
|
-
}
|
|
1
|
+
import { ServerEntry } from '../../contract/model/http/server-entry.model';
|
|
2
|
+
export default class ProcessorInterface {
|
|
3
|
+
process(entries: ServerEntry[]): ServerEntry[];
|
|
4
|
+
processUpdate(entry: ServerEntry | undefined, updateEntryArray: ServerEntry[]): ServerEntry[];
|
|
5
|
+
private handleActionUpdateOrInsert;
|
|
6
|
+
private deletePaging;
|
|
7
|
+
private delete;
|
|
8
|
+
private merge;
|
|
9
|
+
private moveLoader;
|
|
10
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useDispatch, SymbolBadge } from "@telia-ace/knowledge-widget-ui";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
const NoGoodAlternative = ({ body }) => {
|
|
5
|
+
const dispatch = useDispatch();
|
|
6
|
+
return /* @__PURE__ */ React.createElement(Wrapper, {
|
|
7
|
+
onClick: () => {
|
|
8
|
+
dispatch("action", "help");
|
|
9
|
+
}
|
|
10
|
+
}, /* @__PURE__ */ React.createElement(SymbolBadge, {
|
|
11
|
+
size: 14,
|
|
12
|
+
symbol: {
|
|
13
|
+
type: "FontAwesome",
|
|
14
|
+
content: "meh-o"
|
|
15
|
+
}
|
|
16
|
+
}), /* @__PURE__ */ React.createElement("span", null, body));
|
|
17
|
+
};
|
|
18
|
+
const Wrapper = styled.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
|
|
24
|
+
> i,
|
|
25
|
+
svg {
|
|
26
|
+
margin-right: ${(p) => {
|
|
27
|
+
var _a;
|
|
28
|
+
return (_a = p.theme.sizes) == null ? void 0 : _a.small;
|
|
29
|
+
}};
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
export { NoGoodAlternative as default };
|
|
33
|
+
//# sourceMappingURL=no-good-alternative.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-good-alternative.js","sources":["../src/ui/no-good-alternative.tsx"],"sourcesContent":["import { SymbolBadge, useDispatch } from '@telia-ace/knowledge-widget-ui';\nimport React from 'react';\nimport styled from 'styled-components';\n\ntype Props = {\n body: string;\n};\nconst NoGoodAlternative: React.FC<Props> = ({ body }) => {\n const dispatch = useDispatch();\n return (\n <Wrapper\n onClick={() => {\n dispatch('action', 'help');\n }}\n >\n <SymbolBadge\n size={14}\n symbol={{\n type: 'FontAwesome',\n content: 'meh-o',\n }}\n />\n <span>{body}</span>\n </Wrapper>\n );\n};\n\nexport default NoGoodAlternative;\n\nconst Wrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n\n > i,\n svg {\n margin-right: ${(p) => p.theme.sizes?.small};\n }\n`;\n"],"names":[],"mappings":";;;AAOM,MAAA,oBAAqC,CAAC,EAAE,WAAW;AACrD,QAAM,WAAW;AACjB,SACK,sBAAA,cAAA,SAAA;AAAA,IACG,SAAS,MAAM;AACX,eAAS,UAAU,MAAM;AAAA,IAC7B;AAAA,EAAA,GAEC,sBAAA,cAAA,aAAA;AAAA,IACG,MAAM;AAAA,IACN,QAAQ;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACb;AAAA,EAAA,CACJ,GACA,sBAAA,cAAC,QAAM,MAAA,IAAK,CAChB;AAER;AAIA,MAAM,UAAU,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQC,CAAC,MAAM;;AAAA,iBAAE,MAAM,UAAR,mBAAe;AAAA;AAAA;AAAA;;"}
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Container } from '@webprovisions/platform';
|
|
2
|
-
declare const KnowledgeBotProviderPlugin: (container: Container) => Promise<void>;
|
|
3
|
-
export default KnowledgeBotProviderPlugin;
|
|
1
|
+
import { Container } from '@webprovisions/platform';
|
|
2
|
+
declare const KnowledgeBotProviderPlugin: (container: Container) => Promise<void>;
|
|
3
|
+
export default KnowledgeBotProviderPlugin;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const getContactMethodEntry: (contactMethodId: string) => import("./contract/model/http/server-entry.model").ServerEntry | undefined;
|
|
2
|
-
export declare const contactMethodFromLegacy: ({ id, title, defaultIcon, exits: [exit], exitType, confirmationText, expandFormAutomatically, form, description, }: any, validation?: any) => any;
|
|
1
|
+
export declare const getContactMethodEntry: (contactMethodId: string) => import("./contract/model/http/server-entry.model").ServerEntry | undefined;
|
|
2
|
+
export declare const contactMethodFromLegacy: ({ id, title, defaultIcon, exits: [exit], exitType, confirmationText, expandFormAutomatically, form, description, }: any, validation?: any) => any;
|
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.49",
|
|
4
4
|
"description": "Bot Provider Plugin ACE Knowledge Widgets.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
},
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@telia-ace/knowledge-widget-adapters": "^1.0.
|
|
28
|
-
"@telia-ace/knowledge-widget-types-grid": "^1.0.
|
|
29
|
-
"@telia-ace/knowledge-widget-ui": "^1.0.
|
|
30
|
-
"@telia-ace/widget-conversation": "^1.0.
|
|
31
|
-
"@telia-ace/widget-forms": "^1.0.
|
|
32
|
-
"@telia-ace/widget-services": "^1.0.
|
|
27
|
+
"@telia-ace/knowledge-widget-adapters": "^1.0.16",
|
|
28
|
+
"@telia-ace/knowledge-widget-types-grid": "^1.0.16",
|
|
29
|
+
"@telia-ace/knowledge-widget-ui": "^1.0.13",
|
|
30
|
+
"@telia-ace/widget-conversation": "^1.0.15",
|
|
31
|
+
"@telia-ace/widget-forms": "^1.0.11",
|
|
32
|
+
"@telia-ace/widget-services": "^1.0.7",
|
|
33
33
|
"@webprovisions/bootstrapping": "^1.0.12",
|
|
34
34
|
"uuid": "^8.3.2"
|
|
35
35
|
},
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/uuid": "^8.3.4"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "a8bf8e5c1ca56a4749cd8ec47f756b13431394b4"
|
|
44
44
|
}
|