@telia-ace/widget-conversation 1.0.34-experimental.17 → 1.0.34-experimental.18

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.
@@ -3,10 +3,27 @@ import './ui/conversation-content';
3
3
  import './ui/conversation-input';
4
4
  import './ui/conversation-message';
5
5
  import './ui/message';
6
- export default class Conversation extends LitElement {
6
+ declare const Conversation_base: (new (...args: any[]) => import("@telia-ace/widget-ui/dist/mixins/requester").RequesterInterface) & typeof LitElement;
7
+ export default class Conversation extends Conversation_base {
7
8
  static styles: import("lit").CSSResult;
8
9
  _messages: any[];
10
+ _inputPlaceholder: string;
11
+ _userLabel: string;
9
12
  _conversationControllerId: string;
10
13
  constructor();
14
+ onUserSubmit(event: CustomEvent<{
15
+ text: string;
16
+ }>): void;
17
+ onUserTyping(event: CustomEvent<{
18
+ length: number;
19
+ }>): void;
20
+ onActionClick(event: CustomEvent<{
21
+ action: any;
22
+ }>): void;
23
+ dispatch(type: string, data: any): Promise<void>;
24
+ getDescriptor(): {
25
+ [key: string]: any;
26
+ } | null;
11
27
  render(): import("lit").TemplateResult<1>;
12
28
  }
29
+ export {};
@@ -1,19 +1,8 @@
1
1
  import { LitElement } from 'lit';
2
- declare const ConversationContent_base: (new (...args: any[]) => import("@telia-ace/widget-ui/dist/mixins/requester").RequesterInterface) & typeof LitElement;
3
- export declare class ConversationContent extends ConversationContent_base {
4
- static styles: import("lit").CSSResult[];
2
+ export declare class ConversationContent extends LitElement {
5
3
  messages: any[];
4
+ userLabel: string;
6
5
  constructor();
7
- dispatch(type: string, data: any): Promise<void>;
8
- getDescriptor(): {
9
- [key: string]: any;
10
- } | null;
11
- onUserSubmit(event: CustomEvent<{
12
- text: string;
13
- }>): void;
14
- onUserTyping(event: CustomEvent<{
15
- length: number;
16
- }>): void;
17
6
  render(): import("lit").TemplateResult<1>;
7
+ protected createRenderRoot(): Element | ShadowRoot;
18
8
  }
19
- export {};
@@ -1,9 +1,12 @@
1
1
  import { LitElement } from 'lit';
2
+ import { Ref } from 'lit/directives/ref.js';
2
3
  export declare class ConversationInput extends LitElement {
3
- static styles: import("lit").CSSResult;
4
+ inputRef: Ref<HTMLInputElement>;
5
+ hasContent: boolean;
6
+ placeholder: string;
4
7
  constructor();
5
8
  onSubmit(e: any): void;
6
9
  onChange(e: any): void;
7
- private get inputEl();
8
10
  render(): import("lit").TemplateResult<1>;
11
+ protected createRenderRoot(): Element | ShadowRoot;
9
12
  }
@@ -1,11 +1,16 @@
1
1
  import { LitElement, nothing } from 'lit';
2
+ import { ConversationMessageType } from '../../../conversation-controller';
2
3
  import { BundledConversationMessage } from '../plugin';
3
4
  export declare class ConversationMessage extends LitElement {
4
5
  static styles: import("lit").CSSResult[];
5
6
  sender: BundledConversationMessage['sender'] | null;
6
7
  content: BundledConversationMessage['content'];
7
8
  timestamp: number;
9
+ messageType: ConversationMessageType;
10
+ userLabel: string;
8
11
  constructor();
12
+ getMessageStackPosition(index: number): "first" | "last" | "middle";
9
13
  renderTimestamp(name: string, timestamp: number): import("lit").TemplateResult<1> | typeof nothing;
10
14
  render(): import("lit").TemplateResult<1> | typeof nothing;
15
+ protected createRenderRoot(): Element | ShadowRoot;
11
16
  }
@@ -2,8 +2,12 @@ import { LitElement } from 'lit';
2
2
  import { ItemPayload } from '../../../types';
3
3
  import { BundledMessageContent } from '../plugin';
4
4
  export declare class Message extends LitElement {
5
- static styles: import("lit").CSSResult[];
6
5
  content: BundledMessageContent;
7
- renderItem(item: ItemPayload): import("lit").TemplateResult<1>;
8
- render(): import("lit").TemplateResult<1>;
6
+ isUser: boolean;
7
+ stacked: 'first' | 'last' | 'middle';
8
+ constructor();
9
+ onActionClick(action: any): void;
10
+ renderItem(item: ItemPayload): import("lit").TemplateResult<2 | 1>;
11
+ render(): import("lit").TemplateResult<2 | 1>;
12
+ protected createRenderRoot(): Element | ShadowRoot;
9
13
  }
@@ -0,0 +1,104 @@
1
+ var h = (i, e, r) => new Promise((o, t) => {
2
+ var s = (a) => {
3
+ try {
4
+ c(r.next(a));
5
+ } catch (p) {
6
+ t(p);
7
+ }
8
+ }, n = (a) => {
9
+ try {
10
+ c(r.throw(a));
11
+ } catch (p) {
12
+ t(p);
13
+ }
14
+ }, c = (a) => a.done ? o(a.value) : Promise.resolve(a.value).then(s, n);
15
+ c((r = r.apply(i, e)).next());
16
+ });
17
+ import { Requester as g, WidgetComponentMixin as u, NodeConnector as b } from "@telia-ace/widget-ui";
18
+ import { ComponentPlatform as v, ComponentQuery as y } from "@telia-ace/widget-core";
19
+ import { LitElement as f, html as w, unsafeCSS as x } from "lit";
20
+ import { property as m } from "lit/decorators.js";
21
+ const k = `:host{--send-button-color: #a6a6a6}.wrapper{position:absolute;inset:0;overflow:hidden;display:flex;flex-direction:column;overflow-y:auto}.scrollable{display:flex;flex-direction:column;align-items:stretch;padding:0 var(--size-medium)}.scrollable:focus-visible{outline:var(--accessibility-border);color:var(--accessibility-colors-inactiveText);border-color:transparent}.message-container{display:flex}.message-container-left{justify-content:start}.message-container-center{justify-content:center}.message-container-right{justify-content:end}.conversation-entry{margin:0;margin-bottom:var(--size-medium)}.conversation-entry:first-of-type{margin-top:var(--size-medium)}.conversation-entry:last-of-type{padding-bottom:var(--size-medium)}.conversation-entry span,.conversation-entry p,.conversation-entry a,.conversation-entry div{font-weight:300}.conversation-entry b,.conversation-entry h1{font-weight:400}.conversation-entry .agent-message{display:grid;margin-right:10%;width:90%;grid-template-columns:1fr;grid-template-rows:1fr auto;grid-template-areas:"content" "info"}.conversation-entry .agent-message.has-avatar{grid-template-columns:auto 1fr;grid-template-rows:1fr auto;grid-template-areas:"avatar content" ". info"}.conversation-entry .user-message{margin-left:10%;width:90%;display:flex;flex-direction:column;align-items:flex-end}.conversation-entry .content-bundle{grid-area:content;max-width:100%;overflow:hidden}.conversation-entry .timestamp{font-size:var(--fonts-small);color:var(--colors-text);font-weight:300;margin:0;line-height:1.5em;grid-area:info}.content{display:inline-block;margin-top:var(--size-normal);max-width:100%}.content>*{overflow-wrap:break-word;word-wrap:break-word;word-break:break-all;word-break:break-word;hyphens:auto}.content.full-width{width:100%}.content.padded{padding:var(--sized-medium)}.content.user.stacked{background-color:var(--colors-primary);color:var(--colors-accent);border-top-left-radius:var(--borderRadius);border-bottom-left-radius:var(--borderRadius)}.content.user.stacked.stacked-first{border-top-right-radius:var(--borderRadius)}.content.user.stacked.stacked-last{border-bottom-right-radius:var(--borderRadius)}.content.stacked:not(.user){background-color:var(--colors-accent);color:var(--colors-text);border:var(--border, "none");border-top-right-radius:var(--borderRadius);border-bottom-right-radius:var(--borderRadius)}.content.stacked:not(.user).stacked-first{border-top-left-radius:var(--borderRadius)}.content.stacked:not(.user).stacked-last{border-bottom-left-radius:var(--borderRadius)}.message-type-text{margin:var(--size-medium) 0;padding:0 var(--size-medium)}.message-type-html{font-size:var(--fonts-normal);font-weight:300;line-height:1.5em;color:var(--colors-text);margin:var(--size-medium) 0;padding:0 var(--size-medium);color:inherit}.message-type-html h1,.message-type-html h2,.message-type-html h3,.message-type-html h4,.message-type-html h5,.message-type-html h6{word-break:break-word}.message-type-html h1:first-child,.message-type-html h2:first-child,.message-type-html h3:first-child,.message-type-html h4:first-child,.message-type-html h5:first-child,.message-type-html h6:first-child{margin-top:0}.message-type-html h1:only-child,.message-type-html h2:only-child,.message-type-html h3:only-child,.message-type-html h4:only-child,.message-type-html h5:only-child,.message-type-html h6:only-child{margin:0}.message-type-html h1:last-child,.message-type-html h2:last-child,.message-type-html h3:last-child,.message-type-html h4:last-child,.message-type-html h5:last-child,.message-type-html h6:last-child{margin-bottom:0}.message-type-html a:focus-visible{outline:var(--accessibility-border);color:var(--accessibility-colors-inactiveText);border-color:transparent;text-decoration:underline}.message-type-html img{max-width:100%!important;height:auto!important}.message-type-html p{word-break:break-word;margin:var(--size-normal) 0}.message-type-html p:first-child{margin:0 0 var(--size-normal)}.message-type-html p:last-child{margin:var(--size-normal) 0 0}.message-type-html p:only-child{margin:0}.message-type-html a{color:var(--colors-link)}.message-type-html a:focus-visible{outline:var(--accessibility-border);color:var(--accessibility-colors-inactiveText);border-color:transparent}.message-type-separator{width:100%;border-bottom:var(--border)}.message-type-button-list{margin:var(--size-medium) 0;padding:0 var(--size-medium)}.message-type-button-list ul{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:var(--size-normal)}.message-type-button-list ul>li{margin:0}.message-type-button-list-button{text-align:center;font-weight:300;border-radius:var(--borderRadius);font-family:inherit;font-size:var(--fonts-normal);display:block;padding:var(--size-normal);background-color:var(--colors-primary);width:100%;color:#fff;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-size:inherit;border:none}.message-type-button-list-button:focus-visible{outline:var(--accessibility-border);color:var(--accessibility-colors-inactiveText);border-color:transparent;background-color:transparent}.message-type-button-list-button i,.message-type-button-list-button svg{margin-right:var(--size-small)}.message-type-link-list{margin:var(--size-medium) 0;padding:0 var(--size-medium)}.message-type-link-list h1{white-space:normal;font-size:var(--fonts-medium);font-weight:400;margin:0 0 var(--size-normal);color:var(--colors-text);line-height:1.8em}.message-type-link-list ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:var(--size-normal)}.message-type-link-list ul>li{margin:0}.message-type-link-list-button{display:block;text-align:left;font-weight:300;color:var(--colors-primary);max-width:100%;text-overflow:ellipsis;overflow:hidden;background-color:transparent;cursor:pointer;font-size:inherit;border:none}.message-list{list-style:none;padding:0;margin:0}.message-list .message-list-item p{padding:0;margin:0}.conversation-input{display:flex;align-items:center;background-color:var(--colors-accent);border-top:var(--inputBorder)}.conversation-input.has-content{--send-button-color: var(--colors-primary)}.conversation-input input{flex:1;border:none;background-color:transparent;font-weight:300;font-size:var(--fonts-normal);line-height:1.2em;outline:none;padding:var(--size-medium);color:var(--colors-text)}.conversation-input input::placeholder{color:var(--colors-textLight);font-style:italic}.conversation-input button{flex:0 0 50px;align-self:stretch;background-color:transparent;display:flex;align-items:center;justify-content:center;border:none;color:var(--send-button-color)}conversation-content{flex:0 1 100%;overflow-y:auto;overflow-x:hidden;-ms-overflow-style:none;scrollbar-width:thin;scrollbar-color:transparent transparent;scrollbar-color:#7f7f7f transparent!important;scrollbar-width:thin!important;-ms-overflow-style:none!important}conversation-content::-webkit-scrollbar{width:3px!important;background-color:transparent;border-left:none}conversation-content::-webkit-scrollbar-thumb{background-color:#7f7f7f!important}conversation-content::-webkit-scrollbar-track{-webkit-box-shadow:none!important;background-color:transparent}conversation-content ::-webkit-scrollbar-thumb{background-color:#7f7f7f!important}conversation-input{flex:0 0 auto;min-height:50px;max-height:150px}
22
+ `;
23
+ var z = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, d = (i, e, r, o) => {
24
+ for (var t = o > 1 ? void 0 : o ? _(e, r) : e, s = i.length - 1, n; s >= 0; s--)
25
+ (n = i[s]) && (t = (o ? n(e, r, t) : n(t)) || t);
26
+ return o && t && z(e, r, t), t;
27
+ };
28
+ class l extends g(f) {
29
+ constructor() {
30
+ super(), this._messages = [], this._userLabel = "", this._inputPlaceholder = "Type your message";
31
+ }
32
+ onUserSubmit(e) {
33
+ this.dispatch("user-submit", e.detail);
34
+ }
35
+ onUserTyping(e) {
36
+ this.dispatch("user-typing", e.detail);
37
+ }
38
+ onActionClick(e) {
39
+ this.dispatch("action", e.detail);
40
+ }
41
+ dispatch(e, r) {
42
+ return h(this, null, function* () {
43
+ const o = this.requestInstance("container"), t = this.getDescriptor();
44
+ if (!o || !t)
45
+ return;
46
+ const s = yield v.getInstance(o);
47
+ if (!s)
48
+ return;
49
+ const n = new y(s).withId(t.id);
50
+ s.actions(n, t.type).dispatch(e, r);
51
+ });
52
+ }
53
+ getDescriptor() {
54
+ const e = new CustomEvent(
55
+ "request-descriptor",
56
+ {
57
+ detail: {},
58
+ bubbles: !0,
59
+ composed: !0,
60
+ cancelable: !0
61
+ }
62
+ );
63
+ return this.dispatchEvent(e), e.detail.descriptor || null;
64
+ }
65
+ render() {
66
+ return w`
67
+ <div class="wrapper">
68
+ <conversation-content
69
+ .messages=${this._messages}
70
+ .userLabel=${this._userLabel}
71
+ @action=${this.onActionClick}
72
+ ></conversation-content>
73
+ <conversation-input
74
+ @user-submit=${this.onUserSubmit}
75
+ @user-typing=${this.onUserTyping}
76
+ .placeholder=${this._inputPlaceholder}
77
+ >
78
+ </conversation-input>
79
+ </div>
80
+ `;
81
+ }
82
+ }
83
+ l.styles = x(k);
84
+ d([
85
+ m({ type: Array })
86
+ ], l.prototype, "_messages", 2);
87
+ d([
88
+ m({ type: String })
89
+ ], l.prototype, "_inputPlaceholder", 2);
90
+ d([
91
+ m({ type: String })
92
+ ], l.prototype, "_userLabel", 2);
93
+ d([
94
+ m({ type: String })
95
+ ], l.prototype, "_conversationControllerId", 2);
96
+ class j extends u(l) {
97
+ constructor() {
98
+ super(), this.connector = new b(this);
99
+ }
100
+ }
101
+ export {
102
+ j as default
103
+ };
104
+ //# sourceMappingURL=conversation-wrapper.f45db73f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-wrapper.f45db73f.js","sources":["../src/components/conversation/conversation.ts","../src/components/conversation/conversation-wrapper.ts"],"sourcesContent":["import { ComponentPlatform, ComponentQuery } from '@telia-ace/widget-core';\nimport { Requester } from '@telia-ace/widget-ui';\nimport { html, LitElement, unsafeCSS } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './conversation.scss?inline';\n\nimport './ui/conversation-content';\nimport './ui/conversation-input';\nimport './ui/conversation-message';\nimport './ui/message';\n\nexport default class Conversation extends Requester(LitElement) {\n static styles = unsafeCSS(styles);\n\n @property({ type: Array })\n declare _messages: any[];\n\n @property({ type: String })\n declare _inputPlaceholder: string;\n\n @property({ type: String })\n declare _userLabel: string;\n\n @property({ type: String })\n declare _conversationControllerId: string;\n\n constructor() {\n super();\n this._messages = [];\n this._userLabel = '';\n this._inputPlaceholder = 'Type your message';\n }\n\n onUserSubmit(event: CustomEvent<{ text: string }>) {\n this.dispatch('user-submit', event.detail);\n }\n\n onUserTyping(event: CustomEvent<{ length: number }>) {\n this.dispatch('user-typing', event.detail);\n }\n\n onActionClick(event: CustomEvent<{ action: any }>) {\n this.dispatch('action', event.detail);\n }\n\n async dispatch(type: string, data: any) {\n const container = this.requestInstance('container');\n const descriptor = this.getDescriptor();\n\n if (!container || !descriptor) {\n return;\n }\n const platform = await ComponentPlatform.getInstance(container);\n if (!platform) {\n return;\n }\n\n const component = new ComponentQuery(platform).withId(descriptor.id);\n const actions = platform.actions(component, descriptor.type /*|| uuid()*/);\n\n actions.dispatch(type, data);\n }\n\n getDescriptor() {\n const ev: CustomEvent<{ descriptor?: { [key: string]: any } }> = new CustomEvent(\n 'request-descriptor',\n {\n detail: {},\n bubbles: true,\n composed: true,\n cancelable: true,\n }\n );\n this.dispatchEvent(ev);\n return ev.detail.descriptor || null;\n }\n\n render() {\n return html`\n <div class=\"wrapper\">\n <conversation-content\n .messages=${this._messages}\n .userLabel=${this._userLabel}\n @action=${this.onActionClick}\n ></conversation-content>\n <conversation-input\n @user-submit=${this.onUserSubmit}\n @user-typing=${this.onUserTyping}\n .placeholder=${this._inputPlaceholder}\n >\n </conversation-input>\n </div>\n `;\n }\n}\n","import { NodeConnector, WidgetComponentMixin } from '@telia-ace/widget-ui';\nimport Conversation from './conversation';\n\nexport default class ConversationWrapper extends WidgetComponentMixin(Conversation) {\n connector = new NodeConnector(this);\n\n constructor() {\n super();\n }\n}\n"],"names":["Conversation","Requester","LitElement","event","type","data","__async","container","descriptor","platform","ComponentPlatform","component","ComponentQuery","ev","html","unsafeCSS","styles","__decorateClass","property","ConversationWrapper","WidgetComponentMixin","NodeConnector"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAWqB,MAAAA,UAAqBC,EAAUC,CAAU,EAAE;AAAA,EAe5D,cAAc;AACJ,aACN,KAAK,YAAY,IACjB,KAAK,aAAa,IAClB,KAAK,oBAAoB;AAAA,EAC7B;AAAA,EAEA,aAAaC,GAAsC;AAC1C,SAAA,SAAS,eAAeA,EAAM,MAAM;AAAA,EAC7C;AAAA,EAEA,aAAaA,GAAwC;AAC5C,SAAA,SAAS,eAAeA,EAAM,MAAM;AAAA,EAC7C;AAAA,EAEA,cAAcA,GAAqC;AAC1C,SAAA,SAAS,UAAUA,EAAM,MAAM;AAAA,EACxC;AAAA,EAEM,SAASC,GAAcC,GAAW;AAAA,WAAAC,EAAA;AAC9B,YAAAC,IAAY,KAAK,gBAAgB,WAAW,GAC5CC,IAAa,KAAK;AAEpB,UAAA,CAACD,KAAa,CAACC;AACf;AAEJ,YAAMC,IAAW,MAAMC,EAAkB,YAAYH,CAAS;AAC9D,UAAI,CAACE;AACD;AAGJ,YAAME,IAAY,IAAIC,EAAeH,CAAQ,EAAE,OAAOD,EAAW,EAAE;AAG3D,MAFQC,EAAS,QAAQE,GAAWH,EAAW,IAAkB,EAEjE,SAASJ,GAAMC,CAAI;AAAA,IAC/B;AAAA;AAAA,EAEA,gBAAgB;AACZ,UAAMQ,IAA2D,IAAI;AAAA,MACjE;AAAA,MACA;AAAA,QACI,QAAQ,CAAC;AAAA,QACT,SAAS;AAAA,QACT,UAAU;AAAA,QACV,YAAY;AAAA,MAChB;AAAA,IAAA;AAEJ,gBAAK,cAAcA,CAAE,GACdA,EAAG,OAAO,cAAc;AAAA,EACnC;AAAA,EAEA,SAAS;AACE,WAAAC;AAAA;AAAA;AAAA,gCAGiB,KAAK;AAAA,iCACJ,KAAK;AAAA,8BACR,KAAK;AAAA;AAAA;AAAA,mCAGA,KAAK;AAAA,mCACL,KAAK;AAAA,mCACL,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAKpC;AACJ;AAnFqBd,EACV,SAASe,EAAUC,CAAM;AAGxBC,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,OAAO;AAAA,GAHRlB,EAIT,WAAA,aAAA,CAAA;AAGAiB,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,QAAQ;AAAA,GANTlB,EAOT,WAAA,qBAAA,CAAA;AAGAiB,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,QAAQ;AAAA,GATTlB,EAUT,WAAA,cAAA,CAAA;AAGAiB,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,QAAQ;AAAA,GAZTlB,EAaT,WAAA,6BAAA,CAAA;ACrBS,MAAAmB,UAA4BC,EAAqBpB,CAAY,EAAE;AAAA,EAGhF,cAAc;AACJ,aAHE,KAAA,YAAA,IAAIqB,EAAc,IAAI;AAAA,EAIlC;AACJ;"}
package/dist/index.js CHANGED
@@ -755,7 +755,7 @@ const de = (r, e) => r.reduce((t, s, i) => {
755
755
  ]).then(([e, t]) => Y(
756
756
  r,
757
757
  "conversation",
758
- import("./conversation-wrapper.5c87b527.js"),
758
+ import("./conversation-wrapper.f45db73f.js"),
759
759
  (s) => u(void 0, null, function* () {
760
760
  const { rehydrate: i = !1 } = s.properties(), a = t.getRouteData().params.id || s.node.name || "component", o = yield e.createController(a, { rehydrate: i }), c = e.registerController(o, s), d = 3 * 60 * 1e3, l = (v) => {
761
761
  const { providers: h = [] } = v;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-conversation",
3
- "version": "1.0.34-experimental.17",
3
+ "version": "1.0.34-experimental.18",
4
4
  "description": "ACE Widget Conversation Platform",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -21,19 +21,20 @@
21
21
  },
22
22
  "sideEffects": false,
23
23
  "dependencies": {
24
- "@telia-ace/widget-core": "1.0.21-experimental.17",
25
- "@telia-ace/widget-forms": "1.0.28-experimental.17",
26
- "@telia-ace/widget-plugins": "1.0.22-experimental.17",
27
- "@telia-ace/widget-routing": "1.0.22-experimental.17",
28
- "@telia-ace/widget-services": "1.0.21-experimental.17",
29
- "@telia-ace/widget-ui": "1.0.28-experimental.17",
30
- "@telia-ace/widget-utilities": "1.0.10-experimental.17",
24
+ "@open-wc/lit-helpers": "^0.5.1",
25
+ "@telia-ace/widget-core": "1.0.21-experimental.18",
26
+ "@telia-ace/widget-forms": "1.0.28-experimental.18",
27
+ "@telia-ace/widget-plugins": "1.0.22-experimental.18",
28
+ "@telia-ace/widget-routing": "1.0.22-experimental.18",
29
+ "@telia-ace/widget-services": "1.0.21-experimental.18",
30
+ "@telia-ace/widget-ui": "1.0.28-experimental.18",
31
+ "@telia-ace/widget-utilities": "1.0.10-experimental.18",
31
32
  "@webprovisions/platform": "^1.1.2"
32
33
  },
33
34
  "devDependencies": {
34
35
  "@emotion/react": "^11.10.5",
35
36
  "@emotion/styled": "^11.10.5",
36
- "@telia-ace/widget-developer-tools": "1.0.16-experimental.17",
37
+ "@telia-ace/widget-developer-tools": "1.0.16-experimental.18",
37
38
  "@types/react": "^18.0.26",
38
39
  "lit": "^2.6.1",
39
40
  "react": "^18.2.0",
@@ -1,47 +0,0 @@
1
- import { WidgetComponentMixin as c, NodeConnector as m } from "@telia-ace/widget-ui";
2
- import { LitElement as f, html as v, css as d } from "lit";
3
- import { property as a } from "lit/decorators.js";
4
- var _ = Object.defineProperty, h = Object.getOwnPropertyDescriptor, l = (r, t, n, o) => {
5
- for (var e = o > 1 ? void 0 : o ? h(t, n) : t, p = r.length - 1, i; p >= 0; p--)
6
- (i = r[p]) && (e = (o ? i(t, n, e) : i(e)) || e);
7
- return o && e && _(t, n, e), e;
8
- };
9
- class s extends f {
10
- constructor() {
11
- super(), this._messages = [];
12
- }
13
- render() {
14
- return console.log("hej", this._messages), v`
15
- <div class="wrapper">
16
- <conversation-content .messages=${this._messages} />
17
- </div>
18
- `;
19
- }
20
- }
21
- s.styles = d`
22
- .wrapper {
23
- position: absolute;
24
- right: 0;
25
- left: 0;
26
- bottom: 0;
27
- top: 0;
28
- overflow: hidden;
29
- display: flex;
30
- flex-direction: column;
31
- }
32
- `;
33
- l([
34
- a({ type: Array })
35
- ], s.prototype, "_messages", 2);
36
- l([
37
- a({ type: String })
38
- ], s.prototype, "_conversationControllerId", 2);
39
- class w extends c(s) {
40
- constructor() {
41
- super(), this.connector = new m(this);
42
- }
43
- }
44
- export {
45
- w as default
46
- };
47
- //# sourceMappingURL=conversation-wrapper.5c87b527.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversation-wrapper.5c87b527.js","sources":["../src/components/conversation/conversation.ts","../src/components/conversation/conversation-wrapper.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport './ui/conversation-content';\nimport './ui/conversation-input';\nimport './ui/conversation-message';\nimport './ui/message';\n\nexport default class Conversation extends LitElement {\n static styles = css`\n .wrapper {\n position: absolute;\n right: 0;\n left: 0;\n bottom: 0;\n top: 0;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n `;\n\n @property({ type: Array })\n declare _messages: any[];\n\n @property({ type: String })\n declare _conversationControllerId: string;\n\n constructor() {\n super();\n this._messages = [];\n }\n\n render() {\n console.log('hej', this._messages);\n return html`\n <div class=\"wrapper\">\n <conversation-content .messages=${this._messages} />\n </div>\n `;\n }\n}\n","import { NodeConnector, WidgetComponentMixin } from '@telia-ace/widget-ui';\nimport Conversation from './conversation';\n\nexport default class ConversationWrapper extends WidgetComponentMixin(Conversation) {\n connector = new NodeConnector(this);\n\n constructor() {\n super();\n }\n}\n"],"names":["Conversation","LitElement","html","css","__decorateClass","property","ConversationWrapper","WidgetComponentMixin","NodeConnector"],"mappings":";;;;;;;;AAOA,MAAqBA,UAAqBC,EAAW;AAAA,EAoBjD,cAAc;AACJ,aACN,KAAK,YAAY;EACrB;AAAA,EAEA,SAAS;AACG,mBAAA,IAAI,OAAO,KAAK,SAAS,GAC1BC;AAAA;AAAA,kDAEmC,KAAK;AAAA;AAAA;AAAA,EAGnD;AACJ;AAjCqBF,EACV,SAASG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcRC,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,OAAO;AAAA,GAdRL,EAeT,WAAA,aAAA,CAAA;AAGAI,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,QAAQ;AAAA,GAjBTL,EAkBT,WAAA,6BAAA,CAAA;ACtBS,MAAAM,UAA4BC,EAAqBP,CAAY,EAAE;AAAA,EAGhF,cAAc;AACJ,aAHE,KAAA,YAAA,IAAIQ,EAAc,IAAI;AAAA,EAIlC;AACJ;"}