@cimulate/copilot-widget 1.30.2 → 1.30.3
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/CHANGELOG.md +4 -0
- package/dist/messaging.es.js +14 -8
- package/dist/messaging.umd.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
`@cimulate/copilot-widget` follows [Semantic Versioning](https://semver.org/). Each entry is a released `package.json` version (deployed on merge to `master`), newest first.
|
|
4
4
|
|
|
5
|
+
## 1.30.3 — 2026-08-21
|
|
6
|
+
|
|
7
|
+
- Re-focuses the messaging search input when the agent finishes streaming, so shoppers can keep typing without clicking back into the field. Does not steal focus on initial mount when idle.
|
|
8
|
+
|
|
5
9
|
## 1.30.2 — 2026-08-20
|
|
6
10
|
|
|
7
11
|
- CHANGELOG.md is now published with the npm package and visible on the npmjs.com package page, so customers can see release notes when deciding whether to bump `cc_cdnVersion`.
|
package/dist/messaging.es.js
CHANGED
|
@@ -27217,12 +27217,18 @@ const Eb = ({
|
|
|
27217
27217
|
componentType: n,
|
|
27218
27218
|
onSubmit: r
|
|
27219
27219
|
}) => {
|
|
27220
|
-
const { isConnected: s, sessionExpired: a } = ln(), { globalClassName: u, searchConfig: l, enableEscalationToAgent: d } = it(), f = B.useRef(null), p = t || !s && !a, m = (
|
|
27220
|
+
const { isConnected: s, sessionExpired: a } = ln(), { globalClassName: u, searchConfig: l, enableEscalationToAgent: d } = it(), f = B.useRef(null), p = t || !s && !a, m = B.useRef(t);
|
|
27221
|
+
B.useEffect(() => {
|
|
27221
27222
|
var w;
|
|
27222
|
-
|
|
27223
|
-
|
|
27224
|
-
|
|
27225
|
-
|
|
27223
|
+
const _ = m.current && !t;
|
|
27224
|
+
m.current = t, _ && !p && ((w = f.current) == null || w.focus({ preventScroll: !0 }));
|
|
27225
|
+
}, [t, p]);
|
|
27226
|
+
const S = (_) => {
|
|
27227
|
+
var A;
|
|
27228
|
+
_.preventDefault();
|
|
27229
|
+
const w = (((A = f.current) == null ? void 0 : A.value) || "").trim();
|
|
27230
|
+
w && (f.current.value = "", r(w));
|
|
27231
|
+
}, y = () => {
|
|
27226
27232
|
r("Can you connect me to a human?");
|
|
27227
27233
|
};
|
|
27228
27234
|
return /* @__PURE__ */ b.jsxs(
|
|
@@ -27245,7 +27251,7 @@ const Eb = ({
|
|
|
27245
27251
|
`${k}-search-bar`
|
|
27246
27252
|
),
|
|
27247
27253
|
name: `${k}-search-form`,
|
|
27248
|
-
onSubmit:
|
|
27254
|
+
onSubmit: S,
|
|
27249
27255
|
children: [
|
|
27250
27256
|
/* @__PURE__ */ b.jsx(
|
|
27251
27257
|
"input",
|
|
@@ -27280,7 +27286,7 @@ const Eb = ({
|
|
|
27280
27286
|
ariaLabel: "Connect to a human agent",
|
|
27281
27287
|
title: "Connect to a human agent",
|
|
27282
27288
|
disabled: p,
|
|
27283
|
-
onClick:
|
|
27289
|
+
onClick: y,
|
|
27284
27290
|
icon: /* @__PURE__ */ b.jsx(WO, {})
|
|
27285
27291
|
}
|
|
27286
27292
|
)
|
|
@@ -35651,7 +35657,7 @@ const Zc = ({ code: e, globalClassName: t }) => /* @__PURE__ */ b.jsxs("span", {
|
|
|
35651
35657
|
globalClassName: n,
|
|
35652
35658
|
openLinksInNewTab: r
|
|
35653
35659
|
}) => {
|
|
35654
|
-
const { sendMessage: s, loading: a, cartUpdating: u } = ln(), [l, d] = B.useState(!
|
|
35660
|
+
const { sendMessage: s, loading: a, cartUpdating: u } = ln(), [l, d] = B.useState(!1), [f, p] = B.useState(""), [m, S] = B.useState(null), y = a || u, {
|
|
35655
35661
|
items: _ = [],
|
|
35656
35662
|
currencyCode: w = "USD",
|
|
35657
35663
|
subtotal: A,
|