@2uinc/frontend-component-xpert-chatbot 1.3.11-beta.8 → 1.3.11

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.
@@ -1,4 +1,4 @@
1
- import ue, { useState as pe, useEffect as ye, useCallback as at, useRef as Ae } from "react";
1
+ import ue, { useState as pe, useEffect as ye, useCallback as at, useRef as Fe } from "react";
2
2
  const tl = {
3
3
  xpertKey: "edx",
4
4
  chatApiEndpoint: "https://xpert-platform-services-api.prod.ai.2u.com/xpert/chat",
@@ -1666,7 +1666,7 @@ class Wi extends ue.Component {
1666
1666
  }, r, t._inline, t._ref);
1667
1667
  }
1668
1668
  }
1669
- const Oe = ue.forwardRef(function(t, n) {
1669
+ const Ae = ue.forwardRef(function(t, n) {
1670
1670
  const r = {
1671
1671
  ...t,
1672
1672
  _ref: n,
@@ -1730,7 +1730,7 @@ function Vn(e) {
1730
1730
  "aria-label": jr["popup.buttons.close"],
1731
1731
  type: "button",
1732
1732
  children: /* @__PURE__ */ D.jsx(
1733
- Oe,
1733
+ Ae,
1734
1734
  {
1735
1735
  style: {
1736
1736
  color: "#707070",
@@ -2038,7 +2038,7 @@ var Xi = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
2038
2038
  flatten: !0,
2039
2039
  getShadowRoot: n.getShadowRoot
2040
2040
  }) : r = Ji(t, n.includeContainer, Pt.bind(null, n)), r;
2041
- }, Pe = function(t, n) {
2041
+ }, Le = function(t, n) {
2042
2042
  if (n = n || {}, !t)
2043
2043
  throw new Error("No node provided");
2044
2044
  return _e.call(t, Ot) === !1 ? !1 : En(n, t);
@@ -2052,7 +2052,7 @@ const _a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2052
2052
  focusable: io,
2053
2053
  getTabIndex: Ce,
2054
2054
  isFocusable: Et,
2055
- isTabbable: Pe,
2055
+ isTabbable: Le,
2056
2056
  tabbable: ro
2057
2057
  }, Symbol.toStringTag, { value: "Module" }));
2058
2058
  /*!
@@ -2230,9 +2230,9 @@ var Ar = {
2230
2230
  }, m = function() {
2231
2231
  if (l.containerGroups = l.containers.map(function(M) {
2232
2232
  var N = ro(M, o.tabbableOptions), C = io(M, o.tabbableOptions), z = N.length > 0 ? N[0] : void 0, F = N.length > 0 ? N[N.length - 1] : void 0, Y = C.find(function(d) {
2233
- return Pe(d);
2233
+ return Le(d);
2234
2234
  }), V = C.slice().reverse().find(function(d) {
2235
- return Pe(d);
2235
+ return Le(d);
2236
2236
  }), X = !!N.find(function(d) {
2237
2237
  return Ce(d) > 0;
2238
2238
  });
@@ -2268,9 +2268,9 @@ var Ar = {
2268
2268
  nextTabbableNode: function(ne) {
2269
2269
  var le = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, h = N.indexOf(ne);
2270
2270
  return h < 0 ? le ? C.slice(C.indexOf(ne) + 1).find(function(re) {
2271
- return Pe(re);
2271
+ return Le(re);
2272
2272
  }) : C.slice(0, C.indexOf(ne)).reverse().find(function(re) {
2273
- return Pe(re);
2273
+ return Le(re);
2274
2274
  }) : N[h + (le ? 1 : -1)];
2275
2275
  }
2276
2276
  };
@@ -2312,7 +2312,7 @@ var Ar = {
2312
2312
  var se = W.firstTabbableNode;
2313
2313
  return N === se;
2314
2314
  });
2315
- if (d < 0 && (X.container === N || Et(N, o.tabbableOptions) && !Pe(N, o.tabbableOptions) && !X.nextTabbableNode(N, !1)) && (d = V), d >= 0) {
2315
+ if (d < 0 && (X.container === N || Et(N, o.tabbableOptions) && !Le(N, o.tabbableOptions) && !X.nextTabbableNode(N, !1)) && (d = V), d >= 0) {
2316
2316
  var ne = d === 0 ? l.tabbableGroups.length - 1 : d - 1, le = l.tabbableGroups[ne];
2317
2317
  Y = Ce(N) >= 0 ? le.lastTabbableNode : le.lastDomTabbableNode;
2318
2318
  } else
@@ -2322,7 +2322,7 @@ var Ar = {
2322
2322
  var se = W.lastTabbableNode;
2323
2323
  return N === se;
2324
2324
  });
2325
- if (h < 0 && (X.container === N || Et(N, o.tabbableOptions) && !Pe(N, o.tabbableOptions) && !X.nextTabbableNode(N)) && (h = V), h >= 0) {
2325
+ if (h < 0 && (X.container === N || Et(N, o.tabbableOptions) && !Le(N, o.tabbableOptions) && !X.nextTabbableNode(N)) && (h = V), h >= 0) {
2326
2326
  var re = h === l.tabbableGroups.length - 1 ? 0 : h + 1, te = l.tabbableGroups[re];
2327
2327
  Y = Ce(N) >= 0 ? te.firstTabbableNode : te.firstDomTabbableNode;
2328
2328
  } else
@@ -2847,7 +2847,7 @@ function Bt({
2847
2847
  isNormalSize: r,
2848
2848
  isMounted: i
2849
2849
  }) {
2850
- const o = pt(hu), l = Ae(null);
2850
+ const o = pt(hu), l = Fe(null);
2851
2851
  return du(l), /* @__PURE__ */ D.jsx(
2852
2852
  pu,
2853
2853
  {
@@ -2945,7 +2945,7 @@ function lo({ onClose: e, configurations: t }) {
2945
2945
  },
2946
2946
  onClick: e,
2947
2947
  children: /* @__PURE__ */ D.jsx(
2948
- Oe,
2948
+ Ae,
2949
2949
  {
2950
2950
  icon: "material-symbols:close",
2951
2951
  alt: "Close",
@@ -2967,37 +2967,40 @@ lo.propTypes = {
2967
2967
  function Qt({
2968
2968
  loading: e,
2969
2969
  inputRef: t,
2970
- userInput: n,
2971
- handleSend: r,
2972
- handleInput: i,
2973
- handleChange: o,
2974
- handleKeyDown: l,
2975
- containerStyle: a,
2976
- configurations: s
2970
+ hasError: n,
2971
+ userInput: r,
2972
+ handleSend: i,
2973
+ handleInput: o,
2974
+ handleChange: l,
2975
+ handleKeyDown: a,
2976
+ containerStyle: s,
2977
+ configurations: u
2977
2978
  }) {
2978
- return /* @__PURE__ */ D.jsxs("div", { className: "xpert-chatbot-popup__input--group", style: a, children: [
2979
+ return ye(() => {
2980
+ var c;
2981
+ (c = t == null ? void 0 : t.current) == null || c.focus();
2982
+ }, [e, n, t]), /* @__PURE__ */ D.jsxs("div", { className: "xpert-chatbot-popup__input--group", style: s, children: [
2979
2983
  /* @__PURE__ */ D.jsx(
2980
2984
  "textarea",
2981
2985
  {
2982
2986
  disabled: e,
2983
- value: n,
2987
+ value: r,
2984
2988
  ref: t,
2985
- onInput: i,
2986
- onChange: o,
2989
+ onInput: o,
2990
+ onChange: l,
2987
2991
  placeholder: "Write a message",
2988
2992
  cols: "5",
2989
2993
  rows: "1",
2990
2994
  maxLength: "150",
2991
- onKeyDown: l,
2995
+ onKeyDown: a,
2992
2996
  style: {
2993
- outlineColor: s.primaryColor,
2997
+ outlineColor: u.primaryColor,
2994
2998
  width: "100%",
2995
2999
  minHeight: "3.25rem",
2996
3000
  borderRadius: "1rem",
2997
3001
  padding: "12.5px 45px 12.5px 12.5px",
2998
3002
  fontFamily: "inherit",
2999
- fontSize: "1rem",
3000
- // required to avoid IOS mobile scaling when input is focused
3003
+ fontSize: ".9rem",
3001
3004
  fontWeight: "300",
3002
3005
  lineHeight: "1.56rem",
3003
3006
  boxSizing: "border-box",
@@ -3010,11 +3013,11 @@ function Qt({
3010
3013
  {
3011
3014
  disabled: e,
3012
3015
  className: "xpert-chatbot-popup__input--send-btn",
3013
- onClick: (u) => {
3014
- u.preventDefault(), r(n);
3016
+ onClick: (c) => {
3017
+ c.preventDefault(), i(r);
3015
3018
  },
3016
3019
  "aria-label": "Send message",
3017
- children: /* @__PURE__ */ D.jsx(Oe, { icon: "material-symbols:send", style: { fontSize: "1.75rem" } })
3020
+ children: /* @__PURE__ */ D.jsx(Ae, { icon: "material-symbols:send", style: { fontSize: "1.75rem" } })
3018
3021
  }
3019
3022
  )
3020
3023
  ] });
@@ -3022,6 +3025,7 @@ function Qt({
3022
3025
  Qt.propTypes = {
3023
3026
  loading: g.bool.isRequired,
3024
3027
  inputRef: g.shape({ current: g.instanceOf(Object) }).isRequired,
3028
+ hasError: g.bool.isRequired,
3025
3029
  handleSend: g.func.isRequired,
3026
3030
  userInput: g.string.isRequired,
3027
3031
  handleInput: g.func.isRequired,
@@ -3075,7 +3079,7 @@ function ao({
3075
3079
  className: "xpert-chatbot-popup__disclaimer--instruction",
3076
3080
  children: [
3077
3081
  /* @__PURE__ */ D.jsx("div", { className: "xpert-chatbot-popup__disclaimer__compass-icon", children: /* @__PURE__ */ D.jsx(
3078
- Oe,
3082
+ Ae,
3079
3083
  {
3080
3084
  icon: yu[c.icon],
3081
3085
  style: { fontSize: "1.75rem" }
@@ -3154,7 +3158,7 @@ ao.propTypes = {
3154
3158
  }).isRequired
3155
3159
  };
3156
3160
  function uo({ disableScroll: e }) {
3157
- const t = Ae(null);
3161
+ const t = Fe(null);
3158
3162
  return ye(() => {
3159
3163
  var n;
3160
3164
  e || (n = t.current) == null || n.scrollIntoView({
@@ -3179,7 +3183,7 @@ uo.propTypes = {
3179
3183
  disableScroll: g.bool
3180
3184
  };
3181
3185
  const so = () => {
3182
- const e = Ae(null);
3186
+ const e = Fe(null);
3183
3187
  return ye(() => {
3184
3188
  var t;
3185
3189
  (t = e.current) == null || t.scrollIntoView({
@@ -3203,7 +3207,7 @@ const so = () => {
3203
3207
  ref: e,
3204
3208
  children: [
3205
3209
  /* @__PURE__ */ D.jsx(
3206
- Oe,
3210
+ Ae,
3207
3211
  {
3208
3212
  icon: "material-symbols:thunderstorm",
3209
3213
  style: {
@@ -4056,7 +4060,7 @@ function Hu(e, t) {
4056
4060
  (t[n].add === "after" ? e : r).push(t[n]);
4057
4061
  ke(e, 0, 0, r);
4058
4062
  }
4059
- const qu = /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/, Ie = ze(/[A-Za-z]/), me = ze(/[\dA-Za-z]/), $u = ze(/[#-'*+\--9=?A-Z^-~]/);
4063
+ const qu = /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/, Ie = Oe(/[A-Za-z]/), me = Oe(/[\dA-Za-z]/), $u = Oe(/[#-'*+\--9=?A-Z^-~]/);
4060
4064
  function zn(e) {
4061
4065
  return (
4062
4066
  // Special whitespace codes (which have negative values), C0 and Control
@@ -4064,7 +4068,7 @@ function zn(e) {
4064
4068
  e !== null && (e < 32 || e === 127)
4065
4069
  );
4066
4070
  }
4067
- const Ln = ze(/\d/), Vu = ze(/[\dA-Fa-f]/), Wu = ze(/[!-/:-@[-`{-~]/);
4071
+ const Ln = Oe(/\d/), Vu = Oe(/[\dA-Fa-f]/), Wu = Oe(/[!-/:-@[-`{-~]/);
4068
4072
  function R(e) {
4069
4073
  return e !== null && e < -2;
4070
4074
  }
@@ -4074,8 +4078,8 @@ function de(e) {
4074
4078
  function Z(e) {
4075
4079
  return e === -2 || e === -1 || e === 32;
4076
4080
  }
4077
- const Zu = ze(qu), Gu = ze(/\s/);
4078
- function ze(e) {
4081
+ const Zu = Oe(qu), Gu = Oe(/\s/);
4082
+ function Oe(e) {
4079
4083
  return t;
4080
4084
  function t(n) {
4081
4085
  return n !== null && e.test(String.fromCharCode(n));
@@ -6247,7 +6251,7 @@ function Qc(e) {
6247
6251
  codeTextData: E,
6248
6252
  data: E,
6249
6253
  codeFlowValue: E,
6250
- definition: a(Le),
6254
+ definition: a(ze),
6251
6255
  definitionDestinationString: s,
6252
6256
  definitionLabelString: s,
6253
6257
  definitionTitleString: s,
@@ -6652,7 +6656,7 @@ function Qc(e) {
6652
6656
  value: ""
6653
6657
  };
6654
6658
  }
6655
- function Le() {
6659
+ function ze() {
6656
6660
  return {
6657
6661
  type: "definition",
6658
6662
  identifier: "",
@@ -8850,7 +8854,7 @@ function nf(e, t) {
8850
8854
  ).trim();
8851
8855
  }
8852
8856
  var lr = { exports: {} }, Mi = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, rf = /\n/g, of = /^\s*/, lf = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, af = /^:\s*/, uf = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, sf = /^[;\s]*/, cf = /^\s+|\s+$/g, pf = `
8853
- `, xi = "/", bi = "*", Fe = "", ff = "comment", df = "declaration", hf = function(e, t) {
8857
+ `, xi = "/", bi = "*", Pe = "", ff = "comment", df = "declaration", hf = function(e, t) {
8854
8858
  if (typeof e != "string")
8855
8859
  throw new TypeError("First argument must be a string");
8856
8860
  if (!e)
@@ -8899,9 +8903,9 @@ var lr = { exports: {} }, Mi = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, rf = /\n/g, of
8899
8903
  function p() {
8900
8904
  var T = o();
8901
8905
  if (!(xi != e.charAt(0) || bi != e.charAt(1))) {
8902
- for (var b = 2; Fe != e.charAt(b) && (bi != e.charAt(b) || xi != e.charAt(b + 1)); )
8906
+ for (var b = 2; Pe != e.charAt(b) && (bi != e.charAt(b) || xi != e.charAt(b + 1)); )
8903
8907
  ++b;
8904
- if (b += 2, Fe === e.charAt(b - 1))
8908
+ if (b += 2, Pe === e.charAt(b - 1))
8905
8909
  return a("End of comment missing");
8906
8910
  var S = e.slice(2, b - 2);
8907
8911
  return r += 2, i(S), e = e.slice(b), r += 2, T({
@@ -8917,8 +8921,8 @@ var lr = { exports: {} }, Mi = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, rf = /\n/g, of
8917
8921
  return a("property missing ':'");
8918
8922
  var S = s(uf), w = T({
8919
8923
  type: df,
8920
- property: wi(b[0].replace(Mi, Fe)),
8921
- value: S ? wi(S[0].replace(Mi, Fe)) : Fe
8924
+ property: wi(b[0].replace(Mi, Pe)),
8925
+ value: S ? wi(S[0].replace(Mi, Pe)) : Pe
8922
8926
  });
8923
8927
  return s(sf), w;
8924
8928
  }
@@ -8933,7 +8937,7 @@ var lr = { exports: {} }, Mi = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, rf = /\n/g, of
8933
8937
  return u(), f();
8934
8938
  };
8935
8939
  function wi(e) {
8936
- return e ? e.replace(cf, Fe) : Fe;
8940
+ return e ? e.replace(cf, Pe) : Pe;
8937
8941
  }
8938
8942
  var gf = hf;
8939
8943
  function $o(e, t) {
@@ -9170,7 +9174,7 @@ function Zo({ message: e, id: t, onFeedbackThumbSelection: n }) {
9170
9174
  onClick: () => n(t, "UP"),
9171
9175
  "aria-label": "I like this response",
9172
9176
  children: /* @__PURE__ */ D.jsx(
9173
- Oe,
9177
+ Ae,
9174
9178
  {
9175
9179
  className: "xpert-chatbot-popup__feedback--btn-up-icon",
9176
9180
  icon: e.feedbackThumbType === "UP" ? "material-symbols:thumb-up" : "material-symbols:thumb-up-outline"
@@ -9187,7 +9191,7 @@ function Zo({ message: e, id: t, onFeedbackThumbSelection: n }) {
9187
9191
  onClick: () => n(t, "DOWN"),
9188
9192
  "aria-label": "I do not like this response",
9189
9193
  children: /* @__PURE__ */ D.jsx(
9190
- Oe,
9194
+ Ae,
9191
9195
  {
9192
9196
  className: "xpert-chatbot-popup__feedback--btn-down-icon",
9193
9197
  icon: e.feedbackThumbType === "DOWN" ? "material-symbols:thumb-down" : "material-symbols:thumb-down-outline"
@@ -9354,7 +9358,7 @@ const Of = pr, tn = ({
9354
9358
  configurations: l
9355
9359
  }) => {
9356
9360
  var s;
9357
- const a = Ae(null);
9361
+ const a = Fe(null);
9358
9362
  return ye(() => {
9359
9363
  var u;
9360
9364
  (u = a.current) == null || u.scrollIntoView({
@@ -9518,11 +9522,7 @@ function Ko({
9518
9522
  onClose: r,
9519
9523
  isMounted: i
9520
9524
  }) {
9521
- const o = Ae(null);
9522
- return ye(() => {
9523
- var l;
9524
- (l = o == null ? void 0 : o.current) == null || l.focus();
9525
- }, []), /* @__PURE__ */ D.jsxs(D.Fragment, { children: [
9525
+ return /* @__PURE__ */ D.jsxs(D.Fragment, { children: [
9526
9526
  /* @__PURE__ */ D.jsx(
9527
9527
  "div",
9528
9528
  {
@@ -9548,7 +9548,6 @@ function Ko({
9548
9548
  /* @__PURE__ */ D.jsx(
9549
9549
  "button",
9550
9550
  {
9551
- ref: o,
9552
9551
  style: {
9553
9552
  backgroundColor: "transparent",
9554
9553
  border: "none",
@@ -9562,7 +9561,7 @@ function Ko({
9562
9561
  "aria-label": "Close Xpert dialog",
9563
9562
  type: "button",
9564
9563
  children: /* @__PURE__ */ D.jsx(
9565
- Oe,
9564
+ Ae,
9566
9565
  {
9567
9566
  icon: "material-symbols:close",
9568
9567
  alt: "Close",
@@ -9820,7 +9819,7 @@ function el({ xpertKey: e, submitEventExternal: t, configurations: n }) {
9820
9819
  proactiveMessage: f,
9821
9820
  disableDisclaimerPage: T,
9822
9821
  conversationHistory: b
9823
- } = i, S = pt(Qf), [, w] = pe(!1), [v, j] = pe(Yf), [B, _] = pe(!1), [y, A] = pe(!1), [U, Q] = pe(!1), [q, E] = pe(""), [M, N] = pe(!1), [C, z] = pe(!1), [F, Y] = pe(!0), [V, X] = pe(!1), [d, ne] = pe(!1), le = Ae(null), h = Ae(null), re = Ae(null), te = De.get(`${p}-test`) === "1", W = at(
9822
+ } = i, S = pt(Qf), [, w] = pe(!1), [v, j] = pe(Yf), [B, _] = pe(!1), [y, A] = pe(!1), [U, Q] = pe(!1), [q, E] = pe(""), [M, N] = pe(!1), [C, z] = pe(!1), [F, Y] = pe(!0), [V, X] = pe(!1), [d, ne] = pe(!1), le = Fe(null), h = Fe(null), re = Fe(null), te = De.get(`${p}-test`) === "1", W = at(
9824
9823
  ({ name: L, payload: x }) => {
9825
9824
  t ? t({ name: L, payload: x }) : re.current.track(
9826
9825
  // TODO: this is untestable - create a custom hook to get submit event function.
@@ -9953,10 +9952,10 @@ function el({ xpertKey: e, submitEventExternal: t, configurations: n }) {
9953
9952
  }
9954
9953
  });
9955
9954
  }, ht = (L) => {
9956
- L.key === "Enter" && q.trim() === "" || L.key === "Enter" && !L.shiftKey && (L.preventDefault(), Le(q), N(!0));
9955
+ L.key === "Enter" && q.trim() === "" || L.key === "Enter" && !L.shiftKey && (L.preventDefault(), ze(q), N(!0));
9957
9956
  }, nn = () => {
9958
- Le(q), N(!0);
9959
- }, Le = async (L) => {
9957
+ ze(q), N(!0);
9958
+ }, ze = async (L) => {
9960
9959
  try {
9961
9960
  if (L.trim().length === 0)
9962
9961
  return;
@@ -10100,7 +10099,7 @@ function el({ xpertKey: e, submitEventExternal: t, configurations: n }) {
10100
10099
  }, xt = (L) => {
10101
10100
  E(L.target.value);
10102
10101
  }, ln = (L) => {
10103
- L.key === "Enter" && q.trim() === "" || L.key === "Enter" && !L.shiftKey && (L.preventDefault(), Le(q));
10102
+ L.key === "Enter" && q.trim() === "" || L.key === "Enter" && !L.shiftKey && (L.preventDefault(), ze(q));
10104
10103
  }, an = (L, x = "") => {
10105
10104
  const I = v.map((O, $) => L === $ ? (W({
10106
10105
  name: `${s}.bi.xpert.chatbot.feedback.thumbs.${x.toLowerCase()}.clicked`,
@@ -10195,7 +10194,7 @@ function el({ xpertKey: e, submitEventExternal: t, configurations: n }) {
10195
10194
  loading: B,
10196
10195
  isNormalSize: S || F,
10197
10196
  onFeedbackThumbSelection: an,
10198
- onPromptClick: Le,
10197
+ onPromptClick: ze,
10199
10198
  showDisclaimerText: T,
10200
10199
  configurations: i
10201
10200
  }
@@ -10220,7 +10219,7 @@ function el({ xpertKey: e, submitEventExternal: t, configurations: n }) {
10220
10219
  inputRef: h,
10221
10220
  hasError: C,
10222
10221
  userInput: q,
10223
- handleSend: Le,
10222
+ handleSend: ze,
10224
10223
  handleInput: We,
10225
10224
  handleChange: xt,
10226
10225
  handleKeyDown: ln,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2uinc/frontend-component-xpert-chatbot",
3
- "version": "1.3.11-beta.8",
3
+ "version": "1.3.11",
4
4
  "homepage": "/app/plugins/xpert-chatbot/frontend/build/",
5
5
  "repository": {
6
6
  "type": "git",
@@ -73,6 +73,7 @@
73
73
  "eslint-plugin-react-refresh": "^0.4.3",
74
74
  "eslint-plugin-vitest-globals": "^1.4.0",
75
75
  "jsdom": "^22.1.0",
76
+ "msw": "^2.1.7",
76
77
  "prettier": "3.1.1",
77
78
  "prop-types": "^15.8.1",
78
79
  "react": "^17.0.2",
@@ -85,7 +86,6 @@
85
86
  "classnames": "^2.3.2",
86
87
  "focus-trap-react": "^10.2.1",
87
88
  "js-cookie": "^3.0.5",
88
- "msw": "^2.0.4",
89
89
  "react-markdown": "^8.0.7"
90
90
  },
91
91
  "release": {