@aikaara/chat-sdk 1.1.13 → 1.1.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/{MountTenant-nZwDA9He.cjs → MountTenant-CBNuUhDN.cjs} +3 -3
- package/dist/{MountTenant-C0fdT-1H.mjs → MountTenant-CvzatZXg.mjs} +16 -4
- package/dist/cdn/aikaara-chat.iife.js +33 -33
- package/dist/headless.cjs +1 -1
- package/dist/headless.d.ts +10 -0
- package/dist/headless.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.mjs +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +10 -0
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
|
@@ -12518,7 +12518,7 @@ class Gh {
|
|
|
12518
12518
|
this.client = new hh(e, {
|
|
12519
12519
|
uploadAdapter: r?.uploadAdapter,
|
|
12520
12520
|
historyAdapter: r?.historyAdapter
|
|
12521
|
-
}), this.isEmbed = e.display === "embed", this.bubble = t.querySelector("aikaara-chat-bubble"), this.panel = t.querySelector(".aikaara-panel"), this.header = t.querySelector("aikaara-chat-header"), this.messageList = t.querySelector("aikaara-message-list"), this.input = t.querySelector("aikaara-chat-input"), this.errorBanner = t.querySelector("aikaara-error-banner"), e.welcomeMessage && this.messageList.setWelcomeMessage(e.welcomeMessage), e.showTimestamps !== void 0 && this.messageList.setShowTimestamps(e.showTimestamps), (e.linkHandlers || e.getLinkBearer) && this.messageList.setLinkConfig(e.linkHandlers ?? [], e.getLinkBearer), this.wireEvents();
|
|
12521
|
+
}), this.isEmbed = e.display === "embed", this.bubble = t.querySelector("aikaara-chat-bubble"), this.panel = t.querySelector(".aikaara-panel"), this.header = t.querySelector("aikaara-chat-header"), this.messageList = t.querySelector("aikaara-message-list"), this.input = t.querySelector("aikaara-chat-input"), this.errorBanner = t.querySelector("aikaara-error-banner"), e.welcomeMessage && this.messageList.setWelcomeMessage(e.welcomeMessage), e.showTimestamps !== void 0 && this.messageList.setShowTimestamps(e.showTimestamps), (e.linkHandlers || e.getLinkBearer) && this.messageList.setLinkConfig(e.linkHandlers ?? [], e.getLinkBearer), e.chatActions !== void 0 && this.header.setActions(e.chatActions), this.wireEvents();
|
|
12522
12522
|
}
|
|
12523
12523
|
async connect() {
|
|
12524
12524
|
try {
|
|
@@ -12736,6 +12736,7 @@ class Kh extends HTMLElement {
|
|
|
12736
12736
|
timestampFormat: this._config.timestampFormat,
|
|
12737
12737
|
input: this._config.input,
|
|
12738
12738
|
templateLayout: this._config.templateLayout,
|
|
12739
|
+
chatActions: this._config.chatActions,
|
|
12739
12740
|
showBubble: this._config.showBubble ?? !0,
|
|
12740
12741
|
display: (this.getAttribute("display") || this._config.display) ?? "popup",
|
|
12741
12742
|
offset: this._config.offset || ql,
|
|
@@ -13590,8 +13591,7 @@ class sd extends HTMLElement {
|
|
|
13590
13591
|
this.scrollToBottom();
|
|
13591
13592
|
}
|
|
13592
13593
|
// Returns a map of consumed bot-message-id → submitted form field values.
|
|
13593
|
-
// Empty object value means consumed but no field values could be extracted
|
|
13594
|
-
// (implicit consumption or quick-reply button without structured postback).
|
|
13594
|
+
// Empty object value means consumed but no field values could be extracted.
|
|
13595
13595
|
computeConsumedIds(e) {
|
|
13596
13596
|
const t = /* @__PURE__ */ new Map();
|
|
13597
13597
|
let r = -1;
|
|
@@ -13604,7 +13604,18 @@ class sd extends HTMLElement {
|
|
|
13604
13604
|
const n = e[i];
|
|
13605
13605
|
if (n.role === "user") {
|
|
13606
13606
|
const o = n.metadata?.attributes?.action;
|
|
13607
|
-
|
|
13607
|
+
if (o) {
|
|
13608
|
+
const s = ad(o);
|
|
13609
|
+
if (o.message_id && t.set(o.message_id, s), Object.keys(s).length > 0)
|
|
13610
|
+
for (let a = i - 1; a >= 0; a--) {
|
|
13611
|
+
const c = e[a];
|
|
13612
|
+
if (c.role !== "user" && c.template?.contentType) {
|
|
13613
|
+
const u = c.externalId ?? c.id, h = t.get(u);
|
|
13614
|
+
(!h || Object.keys(h).length === 0) && t.set(u, s);
|
|
13615
|
+
break;
|
|
13616
|
+
}
|
|
13617
|
+
}
|
|
13618
|
+
}
|
|
13608
13619
|
}
|
|
13609
13620
|
if (n.role !== "user" && n.template?.contentType && i < r) {
|
|
13610
13621
|
const o = n.externalId ?? n.id;
|
|
@@ -16665,6 +16676,7 @@ async function lf(l) {
|
|
|
16665
16676
|
timestampFormat: e.timestampFormat,
|
|
16666
16677
|
input: e.input,
|
|
16667
16678
|
templateLayout: e.templateLayout,
|
|
16679
|
+
chatActions: e.chatActions,
|
|
16668
16680
|
tiledesk: p,
|
|
16669
16681
|
tiledeskIdentity: {
|
|
16670
16682
|
userId: n,
|