@gengage/assistant-fe 0.4.18 → 0.4.20

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.
Files changed (42) hide show
  1. package/dist/api-paths-CReMDZWg.js +1250 -0
  2. package/dist/chat/components/ChoicePrompter.d.ts +2 -2
  3. package/dist/chat/runtime.d.ts +7 -0
  4. package/dist/chat/types.d.ts +65 -0
  5. package/dist/chat-runtime.js +1 -1
  6. package/dist/chat.iife.js +43 -43
  7. package/dist/chat.js +1 -1
  8. package/dist/common/find-similar-payload.d.ts +3 -0
  9. package/dist/common/index.d.ts +1 -0
  10. package/dist/common/overlay.d.ts +4 -2
  11. package/dist/common/sdk-version.d.ts +3 -0
  12. package/dist/{common-Bxy1FrAk.js → common-BM2ZsSLI.js} +3 -3
  13. package/dist/common.js +79 -77
  14. package/dist/{connection-warning-C7ehvQxx.js → connection-warning-C_4e7ahZ.js} +1 -1
  15. package/dist/{fastIntent-CINRmM8r.js → fastIntent-DMNzXOSI.js} +1 -1
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.js +75 -73
  18. package/dist/{native-webview-BsRcv49q.js → native-webview-Bbcvvi_5.js} +1 -1
  19. package/dist/native.iife.js +21 -21
  20. package/dist/native.js +1 -1
  21. package/dist/{overlay-CfnBuj7M.js → overlay-O4nlUrzw.js} +1 -1
  22. package/dist/overlay.js +1 -1
  23. package/dist/qna-runtime.js +1 -1
  24. package/dist/qna.iife.js +22 -22
  25. package/dist/qna.js +1 -1
  26. package/dist/{runtime-B0hDHRlN.js → runtime-C51WykbJ.js} +13 -13
  27. package/dist/{runtime-CAUALvac.js → runtime-DBh8899B.js} +2185 -2091
  28. package/dist/{runtime-CLcYqzoA.js → runtime-bbMljGVG.js} +17 -17
  29. package/dist/simbut/index.d.ts +1 -1
  30. package/dist/simbut/types.d.ts +7 -7
  31. package/dist/{simbut-3kqLW3SM.js → simbut-CO1rLVM9.js} +19 -22
  32. package/dist/simbut.iife.js +9 -9
  33. package/dist/simbut.js +1 -1
  34. package/dist/simrel/components/GroupTabs.d.ts +1 -1
  35. package/dist/simrel/types.d.ts +3 -3
  36. package/dist/simrel-runtime.js +1 -1
  37. package/dist/{simrel-fQg2EIB8.js → simrel-zCDlCrqG.js} +1 -1
  38. package/dist/simrel.iife.js +7 -7
  39. package/dist/simrel.js +2 -2
  40. package/dist/{widget-base-bdJaGJYi.js → widget-base-Cf9ofZhh.js} +91 -83
  41. package/package.json +2 -1
  42. package/dist/api-paths-BX3Lea3A.js +0 -1213
package/dist/qna.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a, i as r, n as t, r as n, t as o } from "./runtime-B0hDHRlN.js";
1
+ import { a, i as r, n as t, r as n, t as o } from "./runtime-C51WykbJ.js";
2
2
  import { t as p } from "./qna-BNvttR6s.js";
3
3
  export {
4
4
  o as GengageQNA,
@@ -1,10 +1,10 @@
1
- import { f as Q, m as N, r as H, t as O, u as U } from "./api-paths-BX3Lea3A.js";
2
- import { S as j, b as M, i as D, t as F, w as W, x as z } from "./widget-base-bdJaGJYi.js";
1
+ import { d as Q, h as N, p as H, r as O, t as U } from "./api-paths-CReMDZWg.js";
2
+ import { C as j, E as M, S as D, o as F, t as W, w as z } from "./widget-base-Cf9ofZhh.js";
3
3
  import { A as $, D as G, E as J, a as E, v as V } from "./context-DGz5F81j.js";
4
4
  import { t as T } from "./locale-CfqNifrU.js";
5
- import { n as Y } from "./connection-warning-C7ehvQxx.js";
5
+ import { n as Y } from "./connection-warning-C_4e7ahZ.js";
6
6
  async function Z(e, t, n) {
7
- const o = O("launcher_action", t), i = {
7
+ const o = U("launcher_action", t), i = {
8
8
  uiSpecs: [],
9
9
  actions: []
10
10
  }, a = {
@@ -16,7 +16,7 @@ async function Z(e, t, n) {
16
16
  const l = await fetch(o, a);
17
17
  if (!l.ok) throw new Error(`HTTP ${l.status}: ${l.statusText}`);
18
18
  const r = { onEvent: (c) => {
19
- const s = H(c);
19
+ const s = O(c);
20
20
  if (s && (s.type === "ui_spec" && i.uiSpecs.push(s.spec), s.type === "ui_spec" && s.spec.elements)) {
21
21
  for (const d of Object.values(s.spec.elements)) if (d.type === "ActionButton" && d.props?.action) {
22
22
  const b = d.props.action;
@@ -24,7 +24,7 @@ async function Z(e, t, n) {
24
24
  }
25
25
  }
26
26
  } };
27
- return n !== void 0 && (r.signal = n), await U(l, r), i;
27
+ return n !== void 0 && (r.signal = n), await Q(l, r), i;
28
28
  }
29
29
  function C(e) {
30
30
  const t = document.createElement("div");
@@ -387,7 +387,7 @@ function ct(e) {
387
387
  function dt(e) {
388
388
  return ct(e) === "en" ? lt : R;
389
389
  }
390
- var ut = class extends F {
390
+ var ut = class extends W {
391
391
  constructor(...e) {
392
392
  super(...e), this._abortController = null, this._debounceTimer = null, this._contentEl = null, this._i18n = R, this._actionHandler = this._handleAction.bind(this), this._openChatHandler = this._handleOpenChat.bind(this);
393
393
  }
@@ -440,7 +440,7 @@ var ut = class extends F {
440
440
  source: "qna",
441
441
  locale: this.config.locale
442
442
  });
443
- this.track(j(this.analyticsContext(), {
443
+ this.track(z(this.analyticsContext(), {
444
444
  endpoint: "launcher_action",
445
445
  request_id: o,
446
446
  widget: "qna"
@@ -457,12 +457,12 @@ var ut = class extends F {
457
457
  const c = this.config.pageContext?.pageType;
458
458
  c !== void 0 && (r.page_type = c);
459
459
  const s = await Z(r, n, this._abortController.signal);
460
- if (this.track(M(this.analyticsContext(), {
460
+ if (this.track(D(this.analyticsContext(), {
461
461
  request_id: o,
462
462
  latency_ms: Date.now() - i,
463
463
  chunk_count: s.actions.length,
464
464
  widget: "qna"
465
- })), this.track(W(this.analyticsContext(), {
465
+ })), this.track(M(this.analyticsContext(), {
466
466
  message_count: s.actions.length,
467
467
  history_ref: o,
468
468
  redaction_level: "none",
@@ -499,8 +499,8 @@ var ut = class extends F {
499
499
  if (E("gengage:global:error", {
500
500
  source: "qna",
501
501
  code: "FETCH_ERROR",
502
- message: D(this.config.locale, l)
503
- }), this.track(z(this.analyticsContext(), {
502
+ message: F(this.config.locale, l)
503
+ }), this.track(j(this.analyticsContext(), {
504
504
  request_id: o,
505
505
  error_code: "FETCH_ERROR",
506
506
  error_message: l instanceof Error ? l.message : String(l),
@@ -562,7 +562,7 @@ var ut = class extends F {
562
562
  return r.children.length === 0 ? null : r;
563
563
  }
564
564
  _resolveUISpecRegistry() {
565
- return Q(X(), this.config.renderer?.registry);
565
+ return H(X(), this.config.renderer?.registry);
566
566
  }
567
567
  _renderUISpec(e, t) {
568
568
  const n = this._resolveUISpecRegistry(), o = this.config.renderer?.unknownRenderer ?? P, i = (l, r) => tt(l, r, n, o), a = this.config.renderer?.renderUISpec;