@cognigy/webchat 3.35.0 → 3.36.0

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/OSS_LICENSES.txt CHANGED
@@ -1,4 +1,4 @@
1
- Created on 15-12-2025 at 16:57:36
1
+ Created on 05-01-2026 at 10:10:12
2
2
 
3
3
  {
4
4
  "@babel/code-frame@7.27.1": {
@@ -157,7 +157,7 @@ Created on 15-12-2025 at 16:57:36
157
157
  "licenseFile": "node_modules/@cognigy/chat-components/node_modules/@braintree/sanitize-url/LICENSE",
158
158
  "copyright": "Copyright (c) 2017 Braintree"
159
159
  },
160
- "@cognigy/chat-components@0.65.0": {
160
+ "@cognigy/chat-components@0.66.0": {
161
161
  "licenses": "MIT*",
162
162
  "licenseFile": "node_modules/@cognigy/chat-components/LICENSE",
163
163
  "copyright": "Copyright (c) 2024 Cognigy GmbH"
@@ -169,7 +169,7 @@ Created on 15-12-2025 at 16:57:36
169
169
  "licenseFile": "node_modules/@cognigy/socket-client/LICENSE",
170
170
  "copyright": "Copyright (c) 2019 Cognigy GmbH"
171
171
  },
172
- "@cognigy/webchat@3.35.0": {
172
+ "@cognigy/webchat@3.36.0": {
173
173
  "licenses": "MIT*",
174
174
  "publisher": "Cognigy GmbH",
175
175
  "email": "info@cognigy.com",
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * webchat.esm.js v3.35.0
3
- * https://github.com/Cognigy/Webchat/tree/v3.35.0
4
- * https://github.com/Cognigy/Webchat/tree/v3.35.0/OSS_LICENSES.txt
2
+ * webchat.esm.js v3.36.0
3
+ * https://github.com/Cognigy/Webchat/tree/v3.36.0
4
+ * https://github.com/Cognigy/Webchat/tree/v3.36.0/OSS_LICENSES.txt
5
5
  */
6
6
  import * as __WEBPACK_EXTERNAL_MODULE_react_dom_7dac9eee__ from "react-dom";
7
7
  import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
@@ -30946,7 +30946,7 @@ const colorsMapping = {
30946
30946
  primary: "var(--cc-primary-color)",
30947
30947
  secondary: "var(--cc-secondary-color)"
30948
30948
  };
30949
- const Typography = props2 => {
30949
+ const Typography = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((props2, ref) => {
30950
30950
  const {
30951
30951
  variant = "body-regular",
30952
30952
  children,
@@ -30957,11 +30957,13 @@ const Typography = props2 => {
30957
30957
  dangerouslySetInnerHTML,
30958
30958
  id,
30959
30959
  "aria-hidden": ariaHidden,
30960
+ tabIndex,
30960
30961
  ...restProps
30961
30962
  } = props2;
30962
30963
  const Component = component ?? variantsMapping[variant];
30963
30964
  const typographyColor = colorsMapping[color2] ?? color2;
30964
- return /* @__PURE__ */jsxRuntimeExports.jsx(Component, {
30965
+ const componentProps = {
30966
+ ref,
30965
30967
  className: classnames$1(classes$f[variant], className, color2),
30966
30968
  style: {
30967
30969
  color: typographyColor,
@@ -30971,9 +30973,13 @@ const Typography = props2 => {
30971
30973
  dangerouslySetInnerHTML,
30972
30974
  id,
30973
30975
  "aria-hidden": ariaHidden,
30976
+ tabIndex
30977
+ };
30978
+ return /* @__PURE__ */jsxRuntimeExports.jsx(Component, {
30979
+ ...componentProps,
30974
30980
  children
30975
30981
  });
30976
- };
30982
+ });
30977
30983
  const Button = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((props2, ref) => {
30978
30984
  const {
30979
30985
  size,
@@ -35906,6 +35912,12 @@ const classes$9 = {
35906
35912
  listItemButtonWrapper,
35907
35913
  mainButtonWrapper
35908
35914
  };
35915
+ const srOnly = "_srOnly_14hnz_1";
35916
+ const divider = "_divider_14hnz_13";
35917
+ const mainClasses = {
35918
+ srOnly,
35919
+ divider
35920
+ };
35909
35921
  const ListItem = props2 => {
35910
35922
  const {
35911
35923
  action,
@@ -35919,7 +35931,9 @@ const ListItem = props2 => {
35919
35931
  isHeaderElement,
35920
35932
  headingLevel,
35921
35933
  id,
35922
- onSetScreenReaderLabel
35934
+ onSetScreenReaderLabel,
35935
+ dividerBefore,
35936
+ dividerAfter
35923
35937
  } = props2;
35924
35938
  const {
35925
35939
  title,
@@ -36000,7 +36014,9 @@ const ListItem = props2 => {
36000
36014
  },
36001
36015
  "data-testid": isHeaderElement ? "header-image" : "list-item",
36002
36016
  id,
36003
- children: [/* @__PURE__ */jsxRuntimeExports.jsx("div", {
36017
+ children: [!isHeaderElement && dividerBefore && /* @__PURE__ */jsxRuntimeExports.jsx("div", {
36018
+ className: mainClasses.divider
36019
+ }), /* @__PURE__ */jsxRuntimeExports.jsx("div", {
36004
36020
  className: contentClasses,
36005
36021
  onClick: handleClick,
36006
36022
  onKeyDown: handleKeyDown,
@@ -36041,15 +36057,11 @@ const ListItem = props2 => {
36041
36057
  containerClassName: classes$9.listItemButtonWrapper,
36042
36058
  config: config2,
36043
36059
  onEmitAnalytics
36060
+ }), !isHeaderElement && dividerAfter && /* @__PURE__ */jsxRuntimeExports.jsx("div", {
36061
+ className: mainClasses.divider
36044
36062
  })]
36045
36063
  });
36046
36064
  };
36047
- const srOnly = "_srOnly_14hnz_1";
36048
- const divider = "_divider_14hnz_13";
36049
- const mainClasses = {
36050
- srOnly,
36051
- divider
36052
- };
36053
36065
  const List = () => {
36054
36066
  const {
36055
36067
  message: message2,
@@ -36113,19 +36125,17 @@ const List = () => {
36113
36125
  }), /* @__PURE__ */jsxRuntimeExports.jsx("ul", {
36114
36126
  "aria-labelledby": headerElement ? `listHeader-header-${listTemplateId}` : void 0,
36115
36127
  className: classes$9.list,
36116
- children: regularElements && regularElements.map((element2, index2) => /* @__PURE__ */jsxRuntimeExports.jsxs(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
36117
- children: [index2 > 0 && /* @__PURE__ */jsxRuntimeExports.jsx("div", {
36118
- className: mainClasses.divider
36119
- }), /* @__PURE__ */jsxRuntimeExports.jsx(ListItem, {
36128
+ children: regularElements && regularElements.map((element2, index2) => /* @__PURE__ */jsxRuntimeExports.jsx(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
36129
+ children: /* @__PURE__ */jsxRuntimeExports.jsx(ListItem, {
36120
36130
  element: element2,
36121
36131
  headingLevel: headerElement ? "h5" : "h4",
36122
36132
  id: `${listTemplateId}-${index2}`,
36123
36133
  onSetScreenReaderLabel: text2 => {
36124
36134
  handleListItemLiveRegionLabel(index2 + 1, text2);
36125
- }
36126
- }), button2 && index2 === regularElements.length - 1 && /* @__PURE__ */jsxRuntimeExports.jsx("div", {
36127
- className: mainClasses.divider
36128
- })]
36135
+ },
36136
+ dividerBefore: index2 > 0,
36137
+ dividerAfter: Boolean(button2 && index2 === regularElements.length - 1)
36138
+ })
36129
36139
  }, index2))
36130
36140
  }), button2 && /* @__PURE__ */jsxRuntimeExports.jsx(PrimaryButton, {
36131
36141
  isActionButton: true,
@@ -61352,7 +61362,7 @@ const TextWithButtons = props2 => {
61352
61362
  dataMessageId,
61353
61363
  action: modifiedAction,
61354
61364
  buttonClassName: classnames$1(classes$5.button, `webchat-${classType}-template-button`),
61355
- containerClassName: classnames$1(classes$5.buttons, isQuickReplies && "webchat-quick-reply-template-replies-container"),
61365
+ containerClassName: classnames$1(classes$5.buttons, `webchat-${classType}-template-replies-container`),
61356
61366
  containerStyle,
61357
61367
  payload: buttons2,
61358
61368
  showUrlIcon: true,
@@ -88256,34 +88266,11 @@ const PrivacyNotice = props => {
88256
88266
  urlText,
88257
88267
  url
88258
88268
  } = privacyNotice;
88259
- const privacyNoticeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
88260
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
88261
- if (!isHomeScreenEnabled) {
88262
- if (privacyNoticeRef.current) {
88263
- privacyNoticeRef.current.focus();
88264
- }
88265
- return;
88266
- }
88267
- // If the home screen is enabled, delay focusing the privacy notice message
88268
- // to allow any home screen transition animations to complete before moving focus.
88269
- const timeoutId = setTimeout(() => {
88270
- if (privacyNoticeRef.current) {
88271
- privacyNoticeRef.current.focus();
88272
- }
88273
- }, 200);
88274
- return () => {
88275
- if (timeoutId) {
88276
- clearTimeout(timeoutId);
88277
- }
88278
- };
88279
- }, [isHomeScreenEnabled]);
88280
88269
  const sanitizedText = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => (0,_webchat_helper_sanitize__WEBPACK_IMPORTED_MODULE_6__/* .sanitizeHTML */ .p9)(text), [text]);
88281
88270
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(PrivacyNoticeRoot, {
88282
88271
  className: "webchat-privacy-notice-root"
88283
88272
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(PrivacyMessage, {
88284
- className: "webchat-privacy-notice-message",
88285
- tabIndex: -1,
88286
- ref: privacyNoticeRef
88273
+ className: "webchat-privacy-notice-message"
88287
88274
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_cognigy_chat_components__WEBPACK_IMPORTED_MODULE_2__/* .Typography */ .o5, {
88288
88275
  variant: "body-regular",
88289
88276
  style: {
@@ -91765,8 +91752,6 @@ function factoryLabel(effects, ok, nok, type, markerType, stringType) {
91765
91752
  /* harmony import */ var _PrimaryButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50335);
91766
91753
  /* harmony import */ var _branding_Branding__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24018);
91767
91754
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21013);
91768
- /* harmony import */ var _utils_find_focusable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41098);
91769
-
91770
91755
 
91771
91756
 
91772
91757
 
@@ -91839,17 +91824,6 @@ const PrevConversationsList = props => {
91839
91824
  // result: the last updated conversation goes on top
91840
91825
  const sortedConversations = (0,_helpers__WEBPACK_IMPORTED_MODULE_5__/* .sortConversationsByFreshness */ .N_)(conversations);
91841
91826
  const sessions = Object.keys(sortedConversations);
91842
- const conversationsRootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
91843
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
91844
- if (!conversationsRootRef.current) return;
91845
- const {
91846
- firstFocusable
91847
- } = (0,_utils_find_focusable__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)(conversationsRootRef.current);
91848
- // Set timeout to ensure that the focus is set after the animation
91849
- setTimeout(() => {
91850
- firstFocusable?.focus();
91851
- }, 450);
91852
- }, []);
91853
91827
  const handleStartButtonClick = () => {
91854
91828
  // we initialize a new session
91855
91829
  onSwitchSession();
@@ -91862,8 +91836,7 @@ const PrevConversationsList = props => {
91862
91836
  onSetShowPrevConversations(false);
91863
91837
  }, []);
91864
91838
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(ConversationsListRoot, {
91865
- className: "webchat-prev-conversations-root",
91866
- ref: conversationsRootRef
91839
+ className: "webchat-prev-conversations-root"
91867
91840
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(ConversationsList, {
91868
91841
  className: "webchat-prev-conversations-content"
91869
91842
  }, sessions.length > 0 && sessions.map((session, i) => {
@@ -107483,6 +107456,7 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
107483
107456
  const isChatOptionsButtonVisible = config.settings.chatOptions.enabled && showChatScreen;
107484
107457
  const hideBackButton = showChatScreen && !isHomeScreenEnabled;
107485
107458
  const showDeleteAllConversationButton = !!((config.settings.privacyNotice.enabled && this.props.hasAcceptedTerms || !config.settings.privacyNotice.enabled) && config.settings.homeScreen.previousConversations.enableDeleteAllConversations && showPrevConversations && Object.keys(this.props.prevConversations).length);
107459
+ const autoFocusScreenTitle = !showChatScreen && !showHomeScreen;
107486
107460
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(RegularLayoutRoot, null, !isXAppOverlayOpen && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .A, {
107487
107461
  in: !!(!showEnabledHomeScreen || showInformationMessage),
107488
107462
  timeout: 500,
@@ -107511,6 +107485,7 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
107511
107485
  chatToggleButtonRef: this.chatToggleButtonRef,
107512
107486
  hideBackButton: hideBackButton,
107513
107487
  showChatScreen: showChatScreen,
107488
+ autoFocusScreenTitle: autoFocusScreenTitle,
107514
107489
  deleteIconColor: config.settings.customColors?.deleteAllConversationIconColor
107515
107490
  })), !isSecondaryView && isHomeScreenEnabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .A, {
107516
107491
  in: !showHomeScreen,
@@ -116679,10 +116654,8 @@ function tokenizeTitleBefore(effects, ok, nok) {
116679
116654
  /* harmony import */ var _RatingWidget__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(87024);
116680
116655
  /* harmony import */ var _PostbackButtons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(99685);
116681
116656
  /* harmony import */ var _ChatOptionsFooter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(97130);
116682
- /* harmony import */ var _utils_find_focusable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(41098);
116683
- /* harmony import */ var _TTSOption__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(29687);
116684
- /* harmony import */ var _DeleteConversation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(84995);
116685
-
116657
+ /* harmony import */ var _TTSOption__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(29687);
116658
+ /* harmony import */ var _DeleteConversation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(84995);
116686
116659
 
116687
116660
 
116688
116661
 
@@ -116716,6 +116689,10 @@ const Divider = _emotion_styled__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A
116716
116689
  width: "100%",
116717
116690
  backgroundColor: theme.black80
116718
116691
  }));
116692
+ /**
116693
+ * This component renders both the Chat Options screen and the Rating screen.
116694
+ * On the rating screen (opened as a result of a request rating node), only the rating widget is displayed.
116695
+ */
116719
116696
  const ChatOptions = props => {
116720
116697
  const {
116721
116698
  config,
@@ -116736,19 +116713,8 @@ const ChatOptions = props => {
116736
116713
  const {
116737
116714
  chatOptions
116738
116715
  } = settings;
116739
- const chatOptionsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
116740
116716
  const ratingEnabled = chatOptions.rating.enabled;
116741
116717
  const showRating = ratingEnabled === "always" || ratingEnabled === "once" && !hasGivenRating || showOnlyRating;
116742
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
116743
- if (chatOptionsRef?.current) {
116744
- const {
116745
- firstFocusable
116746
- } = (0,_utils_find_focusable__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)(chatOptionsRef?.current);
116747
- if (firstFocusable) {
116748
- firstFocusable.focus();
116749
- }
116750
- }
116751
- }, []);
116752
116718
  const ttsEnabled = (0,react_redux__WEBPACK_IMPORTED_MODULE_2__/* .useSelector */ .d4)(state => state.ui.ttsActive);
116753
116719
  const dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_2__/* .useDispatch */ .wA)();
116754
116720
  const handleToggleTTS = () => {
@@ -116756,15 +116722,27 @@ const ChatOptions = props => {
116756
116722
  };
116757
116723
  const showDeleteConversation = !!chatOptions.enableDeleteConversation;
116758
116724
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(ChatOptionsRoot, {
116759
- className: "webchat-chat-options-root",
116760
- ref: chatOptionsRef
116725
+ className: "webchat-chat-options-root"
116761
116726
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(ChatOptionsContainer, {
116762
116727
  className: "webchat-chat-options-container"
116763
- }, !showOnlyRating && config.settings.chatOptions.quickReplyOptions.enabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_PostbackButtons__WEBPACK_IMPORTED_MODULE_5__/* .PostbackButtons */ .h, {
116728
+ }, showOnlyRating ?
116729
+ /*#__PURE__*/
116730
+ // Rating Screen
116731
+ react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_RatingWidget__WEBPACK_IMPORTED_MODULE_4__/* .RatingWidget */ .K, {
116732
+ ratingTitleText: ratingTitleText,
116733
+ ratingCommentText: ratingCommentText,
116734
+ onSendRating: onSendRating,
116735
+ showRatingStatus: showOnlyRating,
116736
+ ratingEventBannerText: ratingEventBannerText,
116737
+ buttonText: ratingSubmitButtonText
116738
+ }) :
116739
+ /*#__PURE__*/
116740
+ // Chat Options Screen
116741
+ react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, config.settings.chatOptions.quickReplyOptions.enabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_PostbackButtons__WEBPACK_IMPORTED_MODULE_5__/* .PostbackButtons */ .h, {
116764
116742
  config: config,
116765
116743
  onSendActionButtonMessage: onSendActionButtonMessage,
116766
116744
  onEmitAnalytics: onEmitAnalytics
116767
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(DividerWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(Divider, null))), config.settings.chatOptions.showTTSToggle && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_TTSOption__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A, {
116745
+ }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(DividerWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(Divider, null))), config.settings.chatOptions.showTTSToggle && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_TTSOption__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, {
116768
116746
  onToggle: handleToggleTTS,
116769
116747
  config: config
116770
116748
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(DividerWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(Divider, null))), showRating && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_RatingWidget__WEBPACK_IMPORTED_MODULE_4__/* .RatingWidget */ .K, {
@@ -116774,10 +116752,10 @@ const ChatOptions = props => {
116774
116752
  showRatingStatus: showOnlyRating,
116775
116753
  ratingEventBannerText: ratingEventBannerText,
116776
116754
  buttonText: ratingSubmitButtonText
116777
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(DividerWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(Divider, null))), showDeleteConversation && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_DeleteConversation__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A, {
116755
+ }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(DividerWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(Divider, null))), showDeleteConversation && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_DeleteConversation__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A, {
116778
116756
  onDeleteModalStateChange: onDeleteModalStateChange,
116779
116757
  config: config
116780
- })), chatOptions.footer.enabled && chatOptions.footer.items[0] && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_ChatOptionsFooter__WEBPACK_IMPORTED_MODULE_6__/* .ChatOptionsFooter */ .u, {
116758
+ }))), chatOptions.footer.enabled && chatOptions.footer.items[0] && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_ChatOptionsFooter__WEBPACK_IMPORTED_MODULE_6__/* .ChatOptionsFooter */ .u, {
116781
116759
  settings: config.settings
116782
116760
  }));
116783
116761
  };
@@ -121652,6 +121630,14 @@ const Logo = _emotion_styled__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.im
121652
121630
  height: 28,
121653
121631
  marginInline: 8
121654
121632
  }));
121633
+ const HeaderText = (0,_emotion_styled__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(_cognigy_chat_components__WEBPACK_IMPORTED_MODULE_9__/* .Typography */ .o5)(({
121634
+ theme
121635
+ }) => ({
121636
+ "&:focus-visible": {
121637
+ outline: `2px solid ${(0,_style__WEBPACK_IMPORTED_MODULE_11__/* .getAccessiblePrimaryVariant */ .oe)(theme.primaryColor, theme.backgroundWebchat)}`,
121638
+ outlineOffset: 2
121639
+ }
121640
+ }));
121655
121641
  const Header = props => {
121656
121642
  const {
121657
121643
  logoUrl,
@@ -121666,11 +121652,13 @@ const Header = props => {
121666
121652
  isChatOptionsButtonVisible,
121667
121653
  hideBackButton,
121668
121654
  showChatScreen,
121655
+ autoFocusScreenTitle,
121669
121656
  onDeleteAllConversations,
121670
121657
  ...rest
121671
121658
  } = props;
121672
121659
  const ariaLabels = (0,_webchat_helper_useSelector__WEBPACK_IMPORTED_MODULE_13__/* .useSelector */ .d)(state => state.config.settings.customTranslations?.ariaLabels);
121673
121660
  const settings = (0,_webchat_helper_useSelector__WEBPACK_IMPORTED_MODULE_13__/* .useSelector */ .d)(state => state.config.settings);
121661
+ const headerTextRef = react__WEBPACK_IMPORTED_MODULE_0__["default"].useRef(null);
121674
121662
  const handleCloseClick = () => {
121675
121663
  onClose?.();
121676
121664
  // Restore focus to chat toggle button
@@ -121679,6 +121667,15 @@ const Header = props => {
121679
121667
  const handleMenuClick = () => {
121680
121668
  onSetShowChatOptionsScreen?.(true);
121681
121669
  };
121670
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
121671
+ if (autoFocusScreenTitle) {
121672
+ const timeoutId = setTimeout(() => {
121673
+ const headerTitle = headerTextRef.current;
121674
+ headerTitle?.focus();
121675
+ }, 200);
121676
+ return () => clearTimeout(timeoutId);
121677
+ }
121678
+ }, [autoFocusScreenTitle]);
121682
121679
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(HeaderBar, _extends({}, rest, {
121683
121680
  className: "webchat-header-bar"
121684
121681
  }), onGoBack && !hideBackButton && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(BackButtonWrapper, {
@@ -121701,11 +121698,13 @@ const Header = props => {
121701
121698
  title: "Cognigy.AI Logo",
121702
121699
  role: "img",
121703
121700
  className: classnames__WEBPACK_IMPORTED_MODULE_8___default()("webchat-header-cognigy-logo")
121704
- })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_cognigy_chat_components__WEBPACK_IMPORTED_MODULE_9__/* .Typography */ .o5, {
121701
+ })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(HeaderText, {
121702
+ ref: headerTextRef,
121705
121703
  variant: "h2-semibold",
121706
121704
  id: "webchatHeaderTitle",
121707
121705
  className: "webchat-header-title",
121708
- margin: 0
121706
+ margin: 0,
121707
+ tabIndex: -1
121709
121708
  }, title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(HeaderIconsWrapper, null, rest.isDeleteAllConversationsButtonVisible && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(HeaderIconButton, {
121710
121709
  "data-header-delete-all-conversations-button": true,
121711
121710
  onClick: onDeleteAllConversations,