@telia-ace/widget-conversation 1.0.34-experimental.15 → 1.0.34-experimental.16
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/components/conversation/conversation-wrapper.d.ts +8 -0
- package/dist/components/conversation/conversation.d.ts +12 -6
- package/dist/components/conversation/plugin.d.ts +2 -3
- package/dist/components/conversation/ui/conversation-content.d.ts +19 -0
- package/dist/components/conversation/ui/conversation-input.d.ts +9 -0
- package/dist/components/conversation/ui/conversation-message.d.ts +11 -0
- package/dist/components/conversation/ui/message.d.ts +9 -5
- package/dist/conversation-wrapper.5c87b527.js +47 -0
- package/dist/conversation-wrapper.5c87b527.js.map +1 -0
- package/dist/index.js +49 -49
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +13 -10
- package/dist/conversation.dc33621d.js +0 -1189
- package/dist/conversation.dc33621d.js.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NodeConnector } from '@telia-ace/widget-ui';
|
|
2
|
+
import Conversation from './conversation';
|
|
3
|
+
declare const ConversationWrapper_base: import("@telia-ace/widget-ui").WidgetComponentConstructor<import("@telia-ace/widget-ui/dist/mixins/widget-component").WidgetComponentInterface> & typeof Conversation;
|
|
4
|
+
export default class ConversationWrapper extends ConversationWrapper_base {
|
|
5
|
+
connector: NodeConnector;
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export default Conversation
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import './ui/conversation-content';
|
|
3
|
+
import './ui/conversation-input';
|
|
4
|
+
import './ui/conversation-message';
|
|
5
|
+
import './ui/message';
|
|
6
|
+
export default class Conversation extends LitElement {
|
|
7
|
+
static styles: import("lit").CSSResult;
|
|
8
|
+
_messages: any[];
|
|
9
|
+
_conversationControllerId: string;
|
|
10
|
+
constructor();
|
|
11
|
+
render(): import("lit").TemplateResult<1>;
|
|
12
|
+
}
|
|
@@ -3,11 +3,11 @@ import { ConversationMessage, ConversationMessageType } from '../../conversation
|
|
|
3
3
|
import { ConversationMessageContent, ConversationMessageSender } from '../../types';
|
|
4
4
|
export type BundledConversationMessage = {
|
|
5
5
|
timestamp: number;
|
|
6
|
-
content: [
|
|
6
|
+
content: BundledMessageContent[];
|
|
7
7
|
sender: ConversationMessageSender;
|
|
8
8
|
type: ConversationMessageType;
|
|
9
9
|
};
|
|
10
|
-
type BundledMessageContent = {
|
|
10
|
+
export type BundledMessageContent = {
|
|
11
11
|
key: string;
|
|
12
12
|
} & ConversationMessageContent;
|
|
13
13
|
export type ConversationContent = {
|
|
@@ -42,4 +42,3 @@ export type ConversationComponentProperties = {
|
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
export declare const ConversationComponent: (container: Container) => Promise<void>;
|
|
45
|
-
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
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[];
|
|
5
|
+
messages: any[];
|
|
6
|
+
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
|
+
render(): import("lit").TemplateResult<1>;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class ConversationInput extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
constructor();
|
|
5
|
+
onSubmit(e: any): void;
|
|
6
|
+
onChange(e: any): void;
|
|
7
|
+
private get inputEl();
|
|
8
|
+
render(): import("lit").TemplateResult<1>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
|
2
|
+
import { BundledConversationMessage } from '../plugin';
|
|
3
|
+
export declare class ConversationMessage extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
sender: BundledConversationMessage['sender'] | null;
|
|
6
|
+
content: BundledConversationMessage['content'];
|
|
7
|
+
timestamp: number;
|
|
8
|
+
constructor();
|
|
9
|
+
renderTimestamp(name: string, timestamp: number): import("lit").TemplateResult<1> | typeof nothing;
|
|
10
|
+
render(): import("lit").TemplateResult<1> | typeof nothing;
|
|
11
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { ItemPayload } from '../../../types';
|
|
3
|
+
import { BundledMessageContent } from '../plugin';
|
|
4
|
+
export declare class Message extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
|
+
content: BundledMessageContent;
|
|
7
|
+
renderItem(item: ItemPayload): import("lit").TemplateResult<1>;
|
|
8
|
+
render(): import("lit").TemplateResult<1>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;"}
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var K = Object.defineProperty, F = Object.defineProperties;
|
|
2
|
+
var j = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var S = Object.getOwnPropertySymbols;
|
|
4
4
|
var _ = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var O = (r, e, t) => e in r ?
|
|
5
|
+
var O = (r, e, t) => e in r ? K(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, p = (r, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
7
|
_.call(e, t) && O(r, t, e[t]);
|
|
8
8
|
if (S)
|
|
9
9
|
for (var t of S(e))
|
|
10
10
|
B.call(e, t) && O(r, t, e[t]);
|
|
11
11
|
return r;
|
|
12
|
-
}, g = (r, e) =>
|
|
12
|
+
}, g = (r, e) => F(r, j(e));
|
|
13
13
|
var M = (r, e) => {
|
|
14
14
|
var t = {};
|
|
15
15
|
for (var s in r)
|
|
@@ -36,12 +36,12 @@ var u = (r, e, t) => new Promise((s, i) => {
|
|
|
36
36
|
o((t = t.apply(r, e)).next());
|
|
37
37
|
});
|
|
38
38
|
import { ComponentPlatform as Q } from "@telia-ace/widget-core";
|
|
39
|
-
import { createStorageWriter as x, StorageCategory as W, readStorage as y, StorageMedium as b, StorageScope as
|
|
40
|
-
import { uuid as L, lock as
|
|
41
|
-
import { FormBuilder as
|
|
39
|
+
import { createStorageWriter as x, StorageCategory as W, readStorage as y, StorageMedium as b, StorageScope as G } from "@telia-ace/widget-services";
|
|
40
|
+
import { uuid as L, lock as J } from "@telia-ace/widget-utilities";
|
|
41
|
+
import { FormBuilder as V } from "@telia-ace/widget-forms";
|
|
42
42
|
import { closeAllModals as $ } from "@telia-ace/widget-plugins";
|
|
43
|
-
import { createReactComponent as
|
|
44
|
-
import { lazy as
|
|
43
|
+
import { createWebComponent as Y, createReactComponent as X } from "@telia-ace/widget-ui";
|
|
44
|
+
import { lazy as Z } from "react";
|
|
45
45
|
class I {
|
|
46
46
|
constructor(e, t) {
|
|
47
47
|
this.provider = e, this.print = (s, i) => {
|
|
@@ -138,8 +138,8 @@ class N {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
const
|
|
142
|
-
class
|
|
141
|
+
const U = (r) => `conversation-${r}`;
|
|
142
|
+
class ee {
|
|
143
143
|
constructor() {
|
|
144
144
|
this._locking = Promise.resolve(), this._locks = 0;
|
|
145
145
|
}
|
|
@@ -156,9 +156,9 @@ class Z {
|
|
|
156
156
|
return this._locking = this._locking.then(() => t), s;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
class
|
|
159
|
+
class te {
|
|
160
160
|
constructor(e, t, s) {
|
|
161
|
-
this.container = e, this.conversation = t, this.enabled = s, this.locker = new
|
|
161
|
+
this.container = e, this.conversation = t, this.enabled = s, this.locker = new ee(), this.initialStoredAgents = [], this.sessionStorageKey = U(t.id), t.onStarted(() => u(this, null, function* () {
|
|
162
162
|
if (t.messages.length > 0)
|
|
163
163
|
return;
|
|
164
164
|
const { agents: i } = yield this.read(), n = [];
|
|
@@ -271,8 +271,8 @@ class ee {
|
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
const
|
|
275
|
-
class
|
|
274
|
+
const se = te;
|
|
275
|
+
class re {
|
|
276
276
|
constructor(e) {
|
|
277
277
|
this.controller = e, this.print = (t, s) => {
|
|
278
278
|
const i = R(t, s);
|
|
@@ -304,7 +304,7 @@ const E = (r, e, t) => u(void 0, null, function* () {
|
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
|
-
class
|
|
307
|
+
class ie {
|
|
308
308
|
constructor(e) {
|
|
309
309
|
this.writer = e;
|
|
310
310
|
}
|
|
@@ -334,7 +334,7 @@ const R = (r, e) => {
|
|
|
334
334
|
actions: r.actions,
|
|
335
335
|
title: r.title
|
|
336
336
|
}, r.key && (s = r.key), r.timestamp && (i = r.timestamp), typeof r.form == "function") {
|
|
337
|
-
const n =
|
|
337
|
+
const n = V.create(s);
|
|
338
338
|
r.form(n);
|
|
339
339
|
const a = n.get();
|
|
340
340
|
t.form = a;
|
|
@@ -349,9 +349,9 @@ const R = (r, e) => {
|
|
|
349
349
|
if (s > -1)
|
|
350
350
|
return r.splice(s, 1);
|
|
351
351
|
};
|
|
352
|
-
class
|
|
352
|
+
class ne {
|
|
353
353
|
constructor(e, t, s) {
|
|
354
|
-
this.container = e, this.id = t, this.formHandlers = {}, this.user = new
|
|
354
|
+
this.container = e, this.id = t, this.formHandlers = {}, this.user = new re(this), this.providers = [], this.active = !1, this.queuedProviders = [], this.registeredProviders = [], this.loaders = 0, this.componentMounted = !1, this.messages = [], this.typingActors = [], this.print = (n) => {
|
|
355
355
|
const a = R(n);
|
|
356
356
|
return this.createEntry(
|
|
357
357
|
a.key,
|
|
@@ -362,7 +362,7 @@ class ie {
|
|
|
362
362
|
);
|
|
363
363
|
};
|
|
364
364
|
const i = e.get("$widget");
|
|
365
|
-
this.events = i.events.createChild(this), this.store = new
|
|
365
|
+
this.events = i.events.createChild(this), this.store = new se(e, this, s.rehydrate);
|
|
366
366
|
}
|
|
367
367
|
setInitialStorage(e) {
|
|
368
368
|
this.store.setInitialData(e);
|
|
@@ -444,7 +444,7 @@ class ie {
|
|
|
444
444
|
timestamp: n || n === null ? n : Date.now()
|
|
445
445
|
};
|
|
446
446
|
this.messages.push(a), a.type === "agent" && z(this.typingActors, i);
|
|
447
|
-
const o = new
|
|
447
|
+
const o = new ie((c) => {
|
|
448
448
|
if (c !== null) {
|
|
449
449
|
const d = c, { timestamp: l = void 0 } = d, m = M(d, ["timestamp"]);
|
|
450
450
|
a.content = m, l && (a.timestamp = l);
|
|
@@ -489,13 +489,13 @@ class ie {
|
|
|
489
489
|
this.formHandlers[e] = g(p({}, this.formHandlers[e]), { validate: t });
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
-
const
|
|
492
|
+
const oe = (r, e) => {
|
|
493
493
|
const t = r.split("_contact");
|
|
494
494
|
return e.widgets.get(t[0]);
|
|
495
495
|
}, T = (r) => {
|
|
496
|
-
const e = r.get("$widget"), { name: t, implementation: s } = r.get("$widget"), i = t.indexOf("_contact") > -1 ?
|
|
496
|
+
const e = r.get("$widget"), { name: t, implementation: s } = r.get("$widget"), i = t.indexOf("_contact") > -1 ? oe(t, s) : e, { data: n } = r.get("$settings"), { trigger: a } = i.container.get("$settings"), o = `${t.replace("_contact-method", "").replace("_contact", "")}_contact-method`, c = s.widgets.get(o);
|
|
497
497
|
return c && !a ? { chatWidget: c, mainWidget: i, data: n } : { mainWidget: i, data: n };
|
|
498
|
-
},
|
|
498
|
+
}, ae = (r) => {
|
|
499
499
|
const { chatWidget: e } = T(r);
|
|
500
500
|
return !!e;
|
|
501
501
|
}, H = (r, e, t) => {
|
|
@@ -543,12 +543,12 @@ const ne = (r, e) => {
|
|
|
543
543
|
W.Necessary,
|
|
544
544
|
{
|
|
545
545
|
medium: b.Local,
|
|
546
|
-
scope:
|
|
546
|
+
scope: G.Implementation
|
|
547
547
|
}
|
|
548
548
|
).then((a) => a(n.name)), n.container.getAsync("conversation").then((a) => {
|
|
549
549
|
a.setConversationEndedBehavior(A.Deactivate);
|
|
550
550
|
}).then(() => $(r)).then(() => !1))) : (s.container.getAsync("conversation").then((a) => a.navigateToConversationIfActive(e.id).then(() => a.setConversationEndedBehavior(A.Navigate))), !n);
|
|
551
|
-
},
|
|
551
|
+
}, ce = (r, e, t = "conversation") => {
|
|
552
552
|
const { mainWidget: s, chatWidget: i } = T(r);
|
|
553
553
|
return i ? i.container.getAsync("router").then((n) => {
|
|
554
554
|
n.navigate(t, { id: e.id });
|
|
@@ -603,7 +603,7 @@ class P {
|
|
|
603
603
|
this.subscriptions.push(e);
|
|
604
604
|
}
|
|
605
605
|
static getInstance(e, t = "conversation") {
|
|
606
|
-
return
|
|
606
|
+
return J(e)(() => e.getAsync(t).then((s) => {
|
|
607
607
|
let i = s;
|
|
608
608
|
return i || Q.getInstance(e).then((n) => (i = new P(e, n), i.initialize(), e.registerAsync(t, () => i), i));
|
|
609
609
|
}));
|
|
@@ -629,12 +629,12 @@ class P {
|
|
|
629
629
|
}
|
|
630
630
|
createController(e, t) {
|
|
631
631
|
return u(this, null, function* () {
|
|
632
|
-
const s =
|
|
632
|
+
const s = U(e), { agents: i } = (yield y(
|
|
633
633
|
this.container,
|
|
634
634
|
s
|
|
635
635
|
)) || { agents: [] }, n = this.controllers.findIndex((o) => o.conversation.id === e);
|
|
636
636
|
let a;
|
|
637
|
-
return n > -1 ? a = this.controllers[n].conversation : a = new
|
|
637
|
+
return n > -1 ? a = this.controllers[n].conversation : a = new ne(this.container, e, t), a.setInitialStorage({ agents: i || [] }), a;
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
640
|
registerProvider(e, t) {
|
|
@@ -719,7 +719,7 @@ class P {
|
|
|
719
719
|
}
|
|
720
720
|
static handleContactMethodClick(e, t, s, i) {
|
|
721
721
|
return u(this, null, function* () {
|
|
722
|
-
if (
|
|
722
|
+
if (ae(t)) {
|
|
723
723
|
e.preventDefault();
|
|
724
724
|
let n = document.getElementById("humany-dynamic-anchor");
|
|
725
725
|
n || (n = document.createElement("a"), n.setAttribute("href", "#"), n.id = "humany-dynamic-anchor", document.body.appendChild(n)), H(t, s, n);
|
|
@@ -734,11 +734,11 @@ class P {
|
|
|
734
734
|
e,
|
|
735
735
|
t.body.form.meta.conversation.id,
|
|
736
736
|
t.clientName
|
|
737
|
-
) :
|
|
737
|
+
) : ce(e, t);
|
|
738
738
|
});
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
|
-
const
|
|
741
|
+
const de = (r, e) => r.reduce((t, s, i) => {
|
|
742
742
|
var a, o;
|
|
743
743
|
const n = g(p({}, s), {
|
|
744
744
|
content: [g(p({}, s.content), { key: s.key })]
|
|
@@ -749,13 +749,13 @@ const ce = (r, e) => r.reduce((t, s, i) => {
|
|
|
749
749
|
return c.timestamp = s.timestamp, c.content.push(g(p({}, s.content), { key: s.key })), t;
|
|
750
750
|
}
|
|
751
751
|
return t.push(n), t;
|
|
752
|
-
}, []),
|
|
752
|
+
}, []), be = (r) => Promise.all([
|
|
753
753
|
P.getInstance(r),
|
|
754
754
|
r.getAsync("router")
|
|
755
|
-
]).then(([e, t]) =>
|
|
755
|
+
]).then(([e, t]) => Y(
|
|
756
756
|
r,
|
|
757
757
|
"conversation",
|
|
758
|
-
import("./conversation.
|
|
758
|
+
import("./conversation-wrapper.5c87b527.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;
|
|
@@ -770,7 +770,7 @@ const ce = (r, e) => r.reduce((t, s, i) => {
|
|
|
770
770
|
s.writeProperties({
|
|
771
771
|
loading: h,
|
|
772
772
|
typingActors: f,
|
|
773
|
-
messages:
|
|
773
|
+
messages: de(k, d)
|
|
774
774
|
});
|
|
775
775
|
};
|
|
776
776
|
m(o.getMessageStream()), c && (s.writeProperties({ conversationControllerId: o.id }), s.actions.create("user-submit", (v, h) => {
|
|
@@ -805,23 +805,23 @@ const ce = (r, e) => r.reduce((t, s, i) => {
|
|
|
805
805
|
overlay: { conversation: !1, secondary: !1 }
|
|
806
806
|
});
|
|
807
807
|
}));
|
|
808
|
-
const
|
|
808
|
+
const q = o.events.subscribe(
|
|
809
809
|
"conversation:updated",
|
|
810
810
|
(v, h) => {
|
|
811
811
|
m(h);
|
|
812
812
|
}
|
|
813
813
|
);
|
|
814
814
|
return () => {
|
|
815
|
-
o.setComponentMountedState(!1),
|
|
815
|
+
o.setComponentMountedState(!1), q(), o.active || m({ messages: [], typingActors: [], loading: !1 });
|
|
816
816
|
};
|
|
817
817
|
}),
|
|
818
818
|
{ reuseController: !0 }
|
|
819
|
-
)),
|
|
819
|
+
)), we = (r) => Promise.all([
|
|
820
820
|
Q.getInstance(r),
|
|
821
821
|
P.getInstance(r),
|
|
822
822
|
r.getAsync("router")
|
|
823
823
|
]).then(
|
|
824
|
-
([e, t, s]) =>
|
|
824
|
+
([e, t, s]) => X(
|
|
825
825
|
r,
|
|
826
826
|
"conversation-return-button",
|
|
827
827
|
import("./return-button.fb63a16e.js"),
|
|
@@ -835,24 +835,24 @@ const ce = (r, e) => r.reduce((t, s, i) => {
|
|
|
835
835
|
}
|
|
836
836
|
)
|
|
837
837
|
);
|
|
838
|
-
var
|
|
839
|
-
const
|
|
838
|
+
var he = /* @__PURE__ */ ((r) => (r.LinkList = "link-list", r.Separator = "separator", r.ButtonList = "button-list", r.Text = "text", r.HTML = "html", r.VideoRequest = "video-request", r))(he || {});
|
|
839
|
+
const Pe = (r, e, t) => r.getAsync("componentResolver").then((s) => u(void 0, null, function* () {
|
|
840
840
|
(yield P.getInstance(r)).addSubscription(
|
|
841
841
|
s.registerComponent(
|
|
842
842
|
e,
|
|
843
|
-
|
|
843
|
+
Z(() => t)
|
|
844
844
|
)
|
|
845
845
|
);
|
|
846
846
|
}));
|
|
847
847
|
export {
|
|
848
|
-
|
|
849
|
-
|
|
848
|
+
be as ConversationComponent,
|
|
849
|
+
ne as ConversationController,
|
|
850
850
|
A as ConversationEndedBehavior,
|
|
851
|
-
|
|
852
|
-
|
|
851
|
+
ie as ConversationEntry,
|
|
852
|
+
he as ConversationMessageListItemType,
|
|
853
853
|
C as ConversationMessageType,
|
|
854
854
|
P as ConversationPlatform,
|
|
855
|
-
|
|
856
|
-
|
|
855
|
+
we as ConversationReturnButtonComponent,
|
|
856
|
+
Pe as registerCustomMessageComponent
|
|
857
857
|
};
|
|
858
858
|
//# sourceMappingURL=index.js.map
|