@gengage/assistant-fe 0.3.37 → 0.3.39
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/assistant-fe.css +1 -1
- package/dist/chat/catalog.d.ts +2 -0
- package/dist/chat/components/ChatDrawer.d.ts +7 -2
- package/dist/chat/components/ConsultingStylePicker.d.ts +8 -0
- package/dist/chat/features/beauty-consulting/consulting-grid.d.ts +10 -7
- package/dist/chat/index.d.ts +33 -3
- package/dist/{chat-BJu5cvMq.js → chat-BdYYhBg0.js} +2374 -2188
- package/dist/chat.iife.js +21 -21
- package/dist/chat.js +1 -1
- package/dist/common/ga-datalayer.d.ts +29 -1
- package/dist/common/native-webview.d.ts +1 -1
- package/dist/common/types.d.ts +13 -1
- package/dist/{common-DxR7wUEx.js → common-DmixzWHZ.js} +2 -2
- package/dist/common.js +44 -44
- package/dist/{connection-warning-nm_yulO-.js → connection-warning-n88bjkqL.js} +5 -5
- package/dist/index.js +38 -38
- package/dist/{ga-datalayer-BUM5z5Pq.js → locale-MM0U5eeR.js} +361 -304
- package/dist/{native-webview-BFWh8f-u.js → native-webview-DkvOte_j.js} +132 -127
- package/dist/native.iife.js +23 -23
- package/dist/native.js +1 -1
- package/dist/{qna-6_XrdLG_.js → qna-DrlYm1d8.js} +15 -15
- package/dist/qna.iife.js +7 -7
- package/dist/qna.js +1 -1
- package/dist/{schemas-ZYhTx11k.js → schemas-DnAo0x7A.js} +491 -470
- package/dist/{simbut--wBhTxId.js → simbut-Cb5RfaAp.js} +17 -17
- package/dist/simbut.css +1 -1
- package/dist/simbut.iife.js +3 -3
- package/dist/simbut.js +1 -1
- package/dist/simrel/components/GroupTabs.d.ts +5 -0
- package/dist/simrel/index.d.ts +1 -0
- package/dist/simrel/types.d.ts +5 -0
- package/dist/simrel-BjNqBbmw.js +736 -0
- package/dist/simrel.iife.js +17 -17
- package/dist/simrel.js +1 -1
- package/package.json +1 -1
- package/dist/simrel-jN_YPfC7.js +0 -710
package/dist/native.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as H, b as O, c as _, d as U, l as j, n as M, o as A, p as
|
|
2
|
-
import {
|
|
3
|
-
import { n as et } from "./connection-warning-
|
|
1
|
+
import { S as H, b as O, c as _, d as U, l as j, n as M, o as A, p as D, r as F, t as P, u as W, w as z } from "./schemas-DnAo0x7A.js";
|
|
2
|
+
import { A as $, R as G, _ as E, a as J, et as V, it as Y, n as Z, nt as K, t as C, tt as X, z as tt } from "./locale-MM0U5eeR.js";
|
|
3
|
+
import { n as et } from "./connection-warning-n88bjkqL.js";
|
|
4
4
|
async function nt(t, n, e) {
|
|
5
5
|
const o = U("launcher_action", n), i = {
|
|
6
6
|
uiSpecs: [],
|
|
@@ -14,7 +14,7 @@ async function nt(t, n, e) {
|
|
|
14
14
|
const s = await fetch(o, a);
|
|
15
15
|
if (!s.ok) throw new Error(`HTTP ${s.status}: ${s.statusText}`);
|
|
16
16
|
const r = { onEvent: (l) => {
|
|
17
|
-
const c =
|
|
17
|
+
const c = D(l);
|
|
18
18
|
if (c && (c.type === "ui_spec" && i.uiSpecs.push(c.spec), c.type === "ui_spec" && c.spec.elements)) {
|
|
19
19
|
for (const d of Object.values(c.spec.elements)) if (d.type === "ActionButton" && d.props?.action) {
|
|
20
20
|
const m = d.props.action;
|
|
@@ -196,7 +196,7 @@ function it() {
|
|
|
196
196
|
return { ...x };
|
|
197
197
|
}
|
|
198
198
|
function at(t, n, e = x, o = B) {
|
|
199
|
-
return
|
|
199
|
+
return z({
|
|
200
200
|
spec: t,
|
|
201
201
|
context: n,
|
|
202
202
|
registry: e,
|
|
@@ -399,7 +399,7 @@ var yt = A({
|
|
|
399
399
|
]).optional()
|
|
400
400
|
}), bt = A({
|
|
401
401
|
orientation: P(["horizontal", "vertical"]).optional(),
|
|
402
|
-
wrap:
|
|
402
|
+
wrap: F().optional()
|
|
403
403
|
}), _t = A({
|
|
404
404
|
placeholder: j([_(), M(_())]).optional(),
|
|
405
405
|
ctaLabel: _().optional()
|
|
@@ -420,14 +420,14 @@ var yt = A({
|
|
|
420
420
|
schema: vt,
|
|
421
421
|
description: "A heading displayed above the QNA button group."
|
|
422
422
|
}
|
|
423
|
-
} }, At = class extends
|
|
423
|
+
} }, At = class extends Z {
|
|
424
424
|
constructor(...t) {
|
|
425
425
|
super(...t), this._abortController = null, this._debounceTimer = null, this._contentEl = null, this._i18n = N, this._actionHandler = this._handleAction.bind(this), this._openChatHandler = this._handleOpenChat.bind(this);
|
|
426
426
|
}
|
|
427
427
|
async onInit(t) {
|
|
428
428
|
this._i18n = this._resolveI18n(t), this._contentEl = document.createElement("div"), this._contentEl.className = "gengage-qna-container", this._contentEl.dataset.gengagePart = "qna-container", this._contentEl.lang = C(t.locale), this.root.appendChild(this._contentEl);
|
|
429
429
|
const n = t.pageContext?.sku;
|
|
430
|
-
n && (this._lastSku = n, await this._fetchAndRender(n)),
|
|
430
|
+
n && (this._lastSku = n, await this._fetchAndRender(n)), $("qna");
|
|
431
431
|
}
|
|
432
432
|
onUpdate(t) {
|
|
433
433
|
const n = t.sku;
|
|
@@ -468,7 +468,7 @@ var yt = A({
|
|
|
468
468
|
source: "qna",
|
|
469
469
|
locale: this.config.locale
|
|
470
470
|
});
|
|
471
|
-
this.track(
|
|
471
|
+
this.track(K(this.analyticsContext(), {
|
|
472
472
|
endpoint: "launcher_action",
|
|
473
473
|
request_id: o,
|
|
474
474
|
widget: "qna"
|
|
@@ -483,12 +483,12 @@ var yt = A({
|
|
|
483
483
|
}, r = this.config.pageContext?.pageType;
|
|
484
484
|
r !== void 0 && (s.page_type = r);
|
|
485
485
|
const l = await nt(s, e, this._abortController.signal);
|
|
486
|
-
if (this.track(
|
|
486
|
+
if (this.track(V(this.analyticsContext(), {
|
|
487
487
|
request_id: o,
|
|
488
488
|
latency_ms: Date.now() - i,
|
|
489
489
|
chunk_count: l.actions.length,
|
|
490
490
|
widget: "qna"
|
|
491
|
-
})), this.track(
|
|
491
|
+
})), this.track(Y(this.analyticsContext(), {
|
|
492
492
|
message_count: l.actions.length,
|
|
493
493
|
history_ref: o,
|
|
494
494
|
redaction_level: "none",
|
|
@@ -519,14 +519,14 @@ var yt = A({
|
|
|
519
519
|
const v = this._renderUISpec(f, p);
|
|
520
520
|
c.appendChild(v);
|
|
521
521
|
}
|
|
522
|
-
u.length > 0 &&
|
|
522
|
+
u.length > 0 && G("qna"), this._specIncludesType(u, "TextInput") || this._insertStandaloneInputBeforePills(c, p, g);
|
|
523
523
|
} catch (s) {
|
|
524
524
|
if (s instanceof DOMException && s.name === "AbortError") return;
|
|
525
525
|
if (E("gengage:global:error", {
|
|
526
526
|
source: "qna",
|
|
527
527
|
code: "FETCH_ERROR",
|
|
528
|
-
message:
|
|
529
|
-
}), this.track(
|
|
528
|
+
message: J(this.config.locale, s)
|
|
529
|
+
}), this.track(X(this.analyticsContext(), {
|
|
530
530
|
request_id: o,
|
|
531
531
|
error_code: "FETCH_ERROR",
|
|
532
532
|
error_message: s instanceof Error ? s.message : String(s),
|
|
@@ -636,7 +636,7 @@ var yt = A({
|
|
|
636
636
|
(e ?? this._contentEl).appendChild(i);
|
|
637
637
|
}
|
|
638
638
|
_handleAction(t) {
|
|
639
|
-
this._showTransitionIndicator(),
|
|
639
|
+
this._showTransitionIndicator(), tt(t.title, t.type), this.config.onActionSelected?.(t), setTimeout(() => E("gengage:qna:action", t), 350);
|
|
640
640
|
}
|
|
641
641
|
_handleOpenChat() {
|
|
642
642
|
this._showTransitionIndicator(), this.config.onOpenChat?.(), setTimeout(() => E("gengage:qna:open-chat", {}), 350);
|