@telia-ace/knowledge-widget-bot-provider 0.0.15-experimental.9 → 0.0.15
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/dist/contact-method-list.70f5e518.js +94 -0
- package/dist/contact-method-list.70f5e518.js.map +1 -0
- package/dist/contact-method.4b049dad.js +123 -0
- package/dist/contact-method.4b049dad.js.map +1 -0
- package/dist/feedback-list.73d8aa69.js +76 -0
- package/dist/feedback-list.73d8aa69.js.map +1 -0
- package/dist/index.a7a0d62d.js +787 -0
- package/dist/index.a7a0d62d.js.map +1 -0
- package/dist/index.js +6 -779
- package/dist/index.js.map +1 -1
- package/dist/no-good-alternative.e5e48f22.js +50 -0
- package/dist/no-good-alternative.e5e48f22.js.map +1 -0
- package/dist/notification-list.c3df3ee1.js +66 -0
- package/dist/notification-list.c3df3ee1.js.map +1 -0
- package/dist/styles.a00306c5.js +12 -0
- package/dist/styles.a00306c5.js.map +1 -0
- package/dist/ui/contact-method-list.d.ts +8 -1
- package/dist/ui/feedback-list.d.ts +6 -1
- package/dist/ui/no-good-alternative.d.ts +4 -1
- package/dist/ui/notification-list.d.ts +9 -1
- package/dist/utils.d.ts +2 -3
- package/package.json +10 -14
- package/dist/contact-method-list.2b3b6ea5.js +0 -5
- package/dist/contact-method-list.2b3b6ea5.js.map +0 -1
- package/dist/contact-method.016a8ec5.js +0 -5
- package/dist/contact-method.016a8ec5.js.map +0 -1
- package/dist/feedback-list.042775aa.js +0 -5
- package/dist/feedback-list.042775aa.js.map +0 -1
- package/dist/new-feedback-list.4dc450c7.js +0 -61
- package/dist/new-feedback-list.4dc450c7.js.map +0 -1
- package/dist/new-no-good-alternative.63439a76.js +0 -48
- package/dist/new-no-good-alternative.63439a76.js.map +0 -1
- package/dist/new-notification-list.8acdfeb4.js +0 -60
- package/dist/new-notification-list.8acdfeb4.js.map +0 -1
- package/dist/no-good-alternative.4e277f5b.js +0 -5
- package/dist/no-good-alternative.4e277f5b.js.map +0 -1
- package/dist/notification-list.399e34ff.js +0 -5
- package/dist/notification-list.399e34ff.js.map +0 -1
- package/dist/ui/new-feedback-list.d.ts +0 -13
- package/dist/ui/new-no-good-alternative.d.ts +0 -8
- package/dist/ui/new-notification-list.d.ts +0 -11
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-no-good-alternative.63439a76.js","sources":["../src/ui/new-no-good-alternative.ts"],"sourcesContent":["import { html, LitElement, unsafeCSS } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport styles from './no-good-alternative.scss?inline';\n\n@customElement('ace-knowledge-bot-no-good-alternative')\nexport class NoGoodAlternative extends LitElement {\n static styles = unsafeCSS(styles);\n\n @property({ type: String })\n declare body: string;\n\n constructor() {\n super();\n\n this.body = '';\n }\n\n onClick(event: Event) {\n event.stopPropagation();\n event.preventDefault();\n const ev = new CustomEvent('action', {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n actionKey: 'help',\n },\n });\n this.dispatchEvent(ev);\n }\n\n render() {\n return html`<div class=\"wrapper\">\n <button @click=${this.onClick} aria-label=${this.body} title=${this.body}>\n <ui-symbol-badge\n .size=${14}\n .symbol=${{ type: 'FontAwesome', content: 'meh-o' }}\n ></ui-symbol-badge>\n <span>${this.body}</span>\n </button>\n </div>`;\n }\n}\n"],"names":["NoGoodAlternative","LitElement","event","ev","html","unsafeCSS","styles","__decorateClass","property","customElement"],"mappings":";;;;;;;;;AAKa,IAAAA,IAAN,cAAgCC,EAAW;AAAA,EAM9C,cAAc;AACJ,aAEN,KAAK,OAAO;AAAA,EAChB;AAAA,EAEA,QAAQC,GAAc;AAClB,IAAAA,EAAM,gBAAgB,GACtBA,EAAM,eAAe;AACf,UAAAC,IAAK,IAAI,YAAY,UAAU;AAAA,MACjC,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,QAAQ;AAAA,QACJ,WAAW;AAAA,MACf;AAAA,IAAA,CACH;AACD,SAAK,cAAcA,CAAE;AAAA,EACzB;AAAA,EAEA,SAAS;AACE,WAAAC;AAAA,6BACc,KAAK,sBAAsB,KAAK,cAAc,KAAK;AAAA;AAAA,4BAEpD;AAAA,8BACE,EAAE,MAAM,eAAe,SAAS,QAAQ;AAAA;AAAA,wBAE9C,KAAK;AAAA;AAAA;AAAA,EAGzB;AACJ;AArCaJ,EACF,SAASK,EAAUC,CAAM;AAGxBC,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,QAAQ;AAAA,GAHjBR,EAID,WAAA,QAAA,CAAA;AAJCA,IAANO,EAAA;AAAA,EADNE,EAAc,uCAAuC;AAAA,GACzCT,CAAA;"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { NotificationListUi as m } from "@telia-ace/knowledge-widget-ui";
|
|
2
|
-
import { LitElement as p, nothing as c, html as d, unsafeCSS as u } from "lit";
|
|
3
|
-
import { property as r, customElement as y } from "lit/decorators.js";
|
|
4
|
-
const h = `ui-notification-list{--notification-list-padding: var(--size-medium) 0;--notification-list-margin: 0 var(--size-medium);--notification-list-min-width: 10em}
|
|
5
|
-
`;
|
|
6
|
-
var b = Object.defineProperty, g = Object.getOwnPropertyDescriptor, o = (s, t, l, n) => {
|
|
7
|
-
for (var i = n > 1 ? void 0 : n ? g(t, l) : t, a = s.length - 1, f; a >= 0; a--)
|
|
8
|
-
(f = s[a]) && (i = (n ? f(t, l, i) : f(i)) || i);
|
|
9
|
-
return n && i && b(t, l, i), i;
|
|
10
|
-
};
|
|
11
|
-
customElements.get("ui-notification-list") || customElements.define("ui-notification-list", m);
|
|
12
|
-
let e = class extends p {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(), this.items = [];
|
|
15
|
-
}
|
|
16
|
-
render() {
|
|
17
|
-
if (!this.items.length)
|
|
18
|
-
return c;
|
|
19
|
-
const s = {
|
|
20
|
-
id: this.id,
|
|
21
|
-
title: this.header,
|
|
22
|
-
symbol: this.symbol,
|
|
23
|
-
defaultHeaderOptions: {
|
|
24
|
-
visible: !0
|
|
25
|
-
},
|
|
26
|
-
notifications: this.items.map((t) => ({
|
|
27
|
-
id: t.id.toString(),
|
|
28
|
-
title: t.title,
|
|
29
|
-
body: t.body,
|
|
30
|
-
modified: t.modified,
|
|
31
|
-
expandable: !0
|
|
32
|
-
}))
|
|
33
|
-
};
|
|
34
|
-
return d`<ui-notification-list
|
|
35
|
-
.notificationList=${s}
|
|
36
|
-
.showHeader=${!0}
|
|
37
|
-
.loading=${!1}
|
|
38
|
-
></ui-notification-list>`;
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
e.styles = u(h);
|
|
42
|
-
o([
|
|
43
|
-
r({ type: Array })
|
|
44
|
-
], e.prototype, "items", 2);
|
|
45
|
-
o([
|
|
46
|
-
r({ type: String })
|
|
47
|
-
], e.prototype, "header", 2);
|
|
48
|
-
o([
|
|
49
|
-
r({ type: String })
|
|
50
|
-
], e.prototype, "id", 2);
|
|
51
|
-
o([
|
|
52
|
-
r({ type: Object })
|
|
53
|
-
], e.prototype, "symbol", 2);
|
|
54
|
-
e = o([
|
|
55
|
-
y("ace-knowledge-bot-notification-list")
|
|
56
|
-
], e);
|
|
57
|
-
export {
|
|
58
|
-
e as NewNotificationList
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=new-notification-list.8acdfeb4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-notification-list.8acdfeb4.js","sources":["../src/ui/new-notification-list.ts"],"sourcesContent":["import { NotificationListUi, Symbol } from '@telia-ace/knowledge-widget-ui';\nimport { html, LitElement, nothing, unsafeCSS } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport styles from './notification-list.scss?inline';\n\nif (!customElements.get('ui-notification-list')) {\n customElements.define('ui-notification-list', NotificationListUi);\n}\n\n@customElement('ace-knowledge-bot-notification-list')\nexport class NewNotificationList extends LitElement {\n static styles = unsafeCSS(styles);\n\n @property({ type: Array })\n declare items: any[];\n\n @property({ type: String })\n declare header: string;\n\n @property({ type: String })\n declare id: string;\n\n @property({ type: Object })\n declare symbol: Symbol;\n\n constructor() {\n super();\n this.items = [];\n }\n\n render() {\n if (!this.items.length) {\n return nothing;\n }\n\n const list = {\n id: this.id,\n title: this.header,\n symbol: this.symbol,\n defaultHeaderOptions: {\n visible: true,\n },\n notifications: this.items.map((item) => ({\n id: item.id.toString(),\n title: item.title,\n body: item.body,\n modified: item.modified,\n expandable: true,\n })),\n };\n\n return html`<ui-notification-list\n .notificationList=${list}\n .showHeader=${true}\n .loading=${false}\n ></ui-notification-list>`;\n }\n}\n"],"names":["NotificationListUi","NewNotificationList","LitElement","nothing","list","item","html","unsafeCSS","styles","__decorateClass","property","customElement"],"mappings":";;;;;;;;;;AAKK,eAAe,IAAI,sBAAsB,KAC3B,eAAA,OAAO,wBAAwBA,CAAkB;AAIvD,IAAAC,IAAN,cAAkCC,EAAW;AAAA,EAehD,cAAc;AACJ,aACN,KAAK,QAAQ;EACjB;AAAA,EAEA,SAAS;AACD,QAAA,CAAC,KAAK,MAAM;AACL,aAAAC;AAGX,UAAMC,IAAO;AAAA,MACT,IAAI,KAAK;AAAA,MACT,OAAO,KAAK;AAAA,MACZ,QAAQ,KAAK;AAAA,MACb,sBAAsB;AAAA,QAClB,SAAS;AAAA,MACb;AAAA,MACA,eAAe,KAAK,MAAM,IAAI,CAACC,OAAU;AAAA,QACrC,IAAIA,EAAK,GAAG,SAAS;AAAA,QACrB,OAAOA,EAAK;AAAA,QACZ,MAAMA,EAAK;AAAA,QACX,UAAUA,EAAK;AAAA,QACf,YAAY;AAAA,MAAA,EACd;AAAA,IAAA;AAGC,WAAAC;AAAA,gCACiBF;AAAA,0BACN;AAAA,uBACH;AAAA;AAAA,EAEnB;AACJ;AA/CaH,EACF,SAASM,EAAUC,CAAM;AAGxBC,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,OAAO;AAAA,GAHhBT,EAID,WAAA,SAAA,CAAA;AAGAQ,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,QAAQ;AAAA,GANjBT,EAOD,WAAA,UAAA,CAAA;AAGAQ,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,QAAQ;AAAA,GATjBT,EAUD,WAAA,MAAA,CAAA;AAGAQ,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,QAAQ;AAAA,GAZjBT,EAaD,WAAA,UAAA,CAAA;AAbCA,IAANQ,EAAA;AAAA,EADNE,EAAc,qCAAqC;AAAA,GACvCV,CAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"no-good-alternative.4e277f5b.js","sources":["../src/ui/no-good-alternative.tsx"],"sourcesContent":["import React from 'react';\n\nconst NoGoodAlternative: React.FC<any> = () => {\n return null;\n};\nexport default NoGoodAlternative;\n// import styled from '@emotion/styled';\n// import { borderTabStyle, Button, SymbolBadge, useDispatch } from '@telia-ace/knowledge-widget-ui';\n// import React from 'react';\n// import { messageContentPadding } from './styles';\n\n// type Props = {\n// body: string;\n// };\n// const NoGoodAlternative: React.FC<Props> = ({ body }) => {\n// const dispatch = useDispatch();\n// return (\n// <Wrapper>\n// <StyledButton\n// onClick={() => {\n// dispatch('action', 'help');\n// }}\n// aria-label={body}\n// title={body}\n// >\n// <SymbolBadge\n// size={14}\n// symbol={{\n// type: 'FontAwesome',\n// content: 'meh-o',\n// }}\n// />\n// <span>{body}</span>\n// </StyledButton>\n// </Wrapper>\n// );\n// };\n\n// export default NoGoodAlternative;\n\n// const Wrapper = styled.div`\n// display: flex;\n// align-items: center;\n// justify-content: center;\n// ${messageContentPadding}\n// `;\n\n// const StyledButton = styled(Button)`\n// > i,\n// svg {\n// margin-right: ${(p) => p.theme.sizes?.small};\n// }\n\n// &:focus-visible {\n// ${borderTabStyle}\n// }\n// `;\n"],"names":["NoGoodAlternative"],"mappings":"AAEA,MAAMA,IAAmC,MAC9B;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification-list.399e34ff.js","sources":["../src/ui/notification-list.tsx"],"sourcesContent":["// import styled from '@emotion/styled';\n// import { NotificationList as NotificationListUi, Symbol } from '@telia-ace/knowledge-widget-ui';\n// import React, { useMemo } from 'react';\n// import { messageContentPadding } from './styles';\n\n// type Props = {\n// id: string;\n// header: string;\n// items: any[];\n// symbol?: Symbol;\n// className?: string;\n// };\n// const NotificationList: React.FC<Props> = ({ id, header, items, symbol, className, ...other }) => {\n// const list = useMemo(() => {\n// return {\n// id: id,\n// title: header,\n// symbol,\n// defaultHeaderOptions: {\n// visible: true,\n// },\n// notifications: items.map((item) => ({\n// id: item.id.toString(),\n// title: item.title,\n// body: item.body,\n// modified: item.modified,\n// expandable: true,\n// })),\n// };\n// }, [header, items]);\n\n// if (!list) {\n// return null;\n// }\n\n// return (\n// <StyledNotificationListUi\n// className={className}\n// showHeader={true}\n// notificationList={list}\n// loading={false}\n// {...other}\n// />\n// );\n// };\n\n// export default NotificationList;\n\n// const StyledNotificationListUi = styled(NotificationListUi)`\n// ${messageContentPadding}\n// min-width: 10em;\n\n// span {\n// color: ${(p) => p.theme.colors?.text};\n// }\n// `;\n\nimport React from 'react';\n\nconst NotificationList: React.FC<any> = () => {\n return null;\n};\nexport default NotificationList;\n"],"names":["NotificationList"],"mappings":"AA2DA,MAAMA,IAAkC,MAC7B;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
type FeedbackAction = {
|
|
3
|
-
actionKey: string;
|
|
4
|
-
label: string;
|
|
5
|
-
};
|
|
6
|
-
export declare class FeedbackList extends LitElement {
|
|
7
|
-
static styles: import("lit").CSSResult;
|
|
8
|
-
actions: FeedbackAction[];
|
|
9
|
-
constructor();
|
|
10
|
-
onClick(event: Event, key: string): void;
|
|
11
|
-
render(): import("lit").TemplateResult<1>;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Symbol } from '@telia-ace/knowledge-widget-ui';
|
|
2
|
-
import { LitElement, nothing } from 'lit';
|
|
3
|
-
export declare class NewNotificationList extends LitElement {
|
|
4
|
-
static styles: import("lit").CSSResult;
|
|
5
|
-
items: any[];
|
|
6
|
-
header: string;
|
|
7
|
-
id: string;
|
|
8
|
-
symbol: Symbol;
|
|
9
|
-
constructor();
|
|
10
|
-
render(): import("lit").TemplateResult<1> | typeof nothing;
|
|
11
|
-
}
|