@cognigy/webchat 3.47.0 → 3.48.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 +3 -3
- package/dist/webchat.esm.js +104 -74
- package/dist/webchat.js +6 -6
- package/package.json +2 -2
package/OSS_LICENSES.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Created on
|
|
1
|
+
Created on 27-07-2026 at 12:11:28
|
|
2
2
|
|
|
3
3
|
{
|
|
4
4
|
"@babel/code-frame@7.29.0": {
|
|
@@ -157,7 +157,7 @@ Created on 13-07-2026 at 07:51:23
|
|
|
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.
|
|
160
|
+
"@cognigy/chat-components@0.78.0": {
|
|
161
161
|
"licenses": "MIT*",
|
|
162
162
|
"repository": "https://github.com/Cognigy/chat-components",
|
|
163
163
|
"licenseFile": "node_modules/@cognigy/chat-components/LICENSE",
|
|
@@ -170,7 +170,7 @@ Created on 13-07-2026 at 07:51:23
|
|
|
170
170
|
"licenseFile": "node_modules/@cognigy/socket-client/LICENSE",
|
|
171
171
|
"copyright": "Copyright (c) 2019 Cognigy GmbH"
|
|
172
172
|
},
|
|
173
|
-
"@cognigy/webchat@3.
|
|
173
|
+
"@cognigy/webchat@3.48.0": {
|
|
174
174
|
"licenses": "MIT*",
|
|
175
175
|
"repository": "https://github.com/Cognigy/Webchat",
|
|
176
176
|
"publisher": "Cognigy GmbH",
|
package/dist/webchat.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* webchat.esm.js v3.
|
|
3
|
-
* https://github.com/Cognigy/Webchat/tree/v3.
|
|
4
|
-
* https://github.com/Cognigy/Webchat/tree/v3.
|
|
2
|
+
* webchat.esm.js v3.48.0
|
|
3
|
+
* https://github.com/Cognigy/Webchat/tree/v3.48.0
|
|
4
|
+
* https://github.com/Cognigy/Webchat/tree/v3.48.0/OSS_LICENSES.txt
|
|
5
5
|
*/
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE_react_dom_7dac9eee__ from "react-dom";
|
|
@@ -45281,6 +45281,7 @@ function setHasAcceptedTermsInStorage(browserStorage, userId) {
|
|
|
45281
45281
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
45282
45282
|
|
|
45283
45283
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45284
|
+
/* harmony export */ IH: () => (/* binding */ stripHtmlToInertText),
|
|
45284
45285
|
/* harmony export */ p9: () => (/* binding */ sanitizeHTML)
|
|
45285
45286
|
/* harmony export */ });
|
|
45286
45287
|
/* unused harmony exports allowedHtmlTags, allowedHtmlAttributes */
|
|
@@ -45302,6 +45303,15 @@ const sanitizeHTML = text => {
|
|
|
45302
45303
|
} : config;
|
|
45303
45304
|
return dompurify__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.sanitize(text, configToUse).toString();
|
|
45304
45305
|
};
|
|
45306
|
+
const stripHtmlToInertText = text => {
|
|
45307
|
+
// 1. strip tags: parse as HTML and keep only the text content
|
|
45308
|
+
const stripped = new DOMParser().parseFromString(text, "text/html").body.textContent || "";
|
|
45309
|
+
// 2. re-escape so <, >, & render as literal characters and can never
|
|
45310
|
+
// be reinterpreted as markup downstream (robust to nested encoding)
|
|
45311
|
+
const escaper = document.createElement("div");
|
|
45312
|
+
escaper.textContent = stripped;
|
|
45313
|
+
return escaper.innerHTML;
|
|
45314
|
+
};
|
|
45305
45315
|
|
|
45306
45316
|
/***/ },
|
|
45307
45317
|
|
|
@@ -46709,7 +46719,7 @@ const createMessageMiddleware = client => store => next => action => {
|
|
|
46709
46719
|
text = (0,_helper_sanitize__WEBPACK_IMPORTED_MODULE_3__/* .sanitizeHTML */ .p9)(text || "");
|
|
46710
46720
|
}
|
|
46711
46721
|
if (store.getState().config.settings.widgetSettings.disableHtmlInput) {
|
|
46712
|
-
text =
|
|
46722
|
+
text = (0,_helper_sanitize__WEBPACK_IMPORTED_MODULE_3__/* .stripHtmlToInertText */ .IH)(text || "");
|
|
46713
46723
|
}
|
|
46714
46724
|
|
|
46715
46725
|
// data is either a non-empty object or null
|
|
@@ -57654,19 +57664,19 @@ article ._wrapper_zhv80_1 ._list_zhv80_8 ._listItemRoot_zhv80_8 {
|
|
|
57654
57664
|
._mainButtonWrapper_zhv80_144 {
|
|
57655
57665
|
padding: 16px;
|
|
57656
57666
|
}
|
|
57657
|
-
.
|
|
57667
|
+
._slideItem_ldua9_1 {
|
|
57658
57668
|
position: relative;
|
|
57659
57669
|
width: 206px;
|
|
57660
57670
|
/* height: 150px; */
|
|
57661
57671
|
overflow: hidden;
|
|
57662
57672
|
}
|
|
57663
57673
|
|
|
57664
|
-
.
|
|
57674
|
+
._slideItem_ldua9_1 ._top_ldua9_8 {
|
|
57665
57675
|
position: relative;
|
|
57666
57676
|
border-radius: var(--cc-bubble-border-radius);
|
|
57667
57677
|
}
|
|
57668
57678
|
|
|
57669
|
-
.
|
|
57679
|
+
._slideItem_ldua9_1 ._bottom_ldua9_13 {
|
|
57670
57680
|
border-bottom-left-radius: var(--cc-bubble-border-radius);
|
|
57671
57681
|
border-bottom-right-radius: var(--cc-bubble-border-radius);
|
|
57672
57682
|
border: 1px solid var(--cc-black-80);
|
|
@@ -57677,7 +57687,7 @@ article ._wrapper_zhv80_1 ._list_zhv80_8 ._listItemRoot_zhv80_8 {
|
|
|
57677
57687
|
padding: 8px;
|
|
57678
57688
|
}
|
|
57679
57689
|
|
|
57680
|
-
.
|
|
57690
|
+
._slideItem_ldua9_1 ._top_ldua9_8 img {
|
|
57681
57691
|
aspect-ratio: 206/150;
|
|
57682
57692
|
object-fit: cover;
|
|
57683
57693
|
object-position: left;
|
|
@@ -57687,7 +57697,7 @@ article ._wrapper_zhv80_1 ._list_zhv80_8 ._listItemRoot_zhv80_8 {
|
|
|
57687
57697
|
outline: none;
|
|
57688
57698
|
}
|
|
57689
57699
|
|
|
57690
|
-
.
|
|
57700
|
+
._slideItem_ldua9_1 ._brokenImage_ldua9_34 {
|
|
57691
57701
|
aspect-ratio: 206/150;
|
|
57692
57702
|
width: 100%;
|
|
57693
57703
|
display: block;
|
|
@@ -57696,14 +57706,18 @@ article ._wrapper_zhv80_1 ._list_zhv80_8 ._listItemRoot_zhv80_8 {
|
|
|
57696
57706
|
background-color: var(--cc-black-80);
|
|
57697
57707
|
}
|
|
57698
57708
|
|
|
57699
|
-
.
|
|
57700
|
-
.
|
|
57701
|
-
.
|
|
57709
|
+
._slideItem_ldua9_1 ._hasExtraInfo_ldua9_43,
|
|
57710
|
+
._slideItem_ldua9_1 ._hasExtraInfo_ldua9_43 img,
|
|
57711
|
+
._slideItem_ldua9_1 ._brokenImage_ldua9_34 {
|
|
57702
57712
|
border-bottom-left-radius: 0px;
|
|
57703
57713
|
border-bottom-right-radius: 0px;
|
|
57704
57714
|
}
|
|
57705
57715
|
|
|
57706
|
-
|
|
57716
|
+
/*
|
|
57717
|
+
** Default (legacy) layout: the title overlays the bottom of the image.
|
|
57718
|
+
** Used when \`galleryCardTitleBelowImage\` is not enabled.
|
|
57719
|
+
*/
|
|
57720
|
+
._slideItem_ldua9_1 ._top_ldua9_8 h4 {
|
|
57707
57721
|
position: absolute;
|
|
57708
57722
|
margin: 0px;
|
|
57709
57723
|
margin-inline-start: 8px;
|
|
@@ -57711,12 +57725,17 @@ article ._wrapper_zhv80_1 ._list_zhv80_8 ._listItemRoot_zhv80_8 {
|
|
|
57711
57725
|
color: var(--cc-white);
|
|
57712
57726
|
}
|
|
57713
57727
|
|
|
57714
|
-
|
|
57728
|
+
/*
|
|
57729
|
+
** Opt-in layout (galleryCardTitleBelowImage): the title moves into the content
|
|
57730
|
+
** block beneath the image, so it shares the subtitle's flush margins/padding.
|
|
57731
|
+
*/
|
|
57732
|
+
._slideItem_ldua9_1 ._bottom_ldua9_13 p,
|
|
57733
|
+
._slideItem_ldua9_1 ._bottom_ldua9_13 h4 {
|
|
57715
57734
|
padding: 0px;
|
|
57716
57735
|
margin: 0px;
|
|
57717
57736
|
}
|
|
57718
57737
|
|
|
57719
|
-
.
|
|
57738
|
+
._slideItem_ldua9_1 ._bottom_ldua9_13 ._buttonListItem_ldua9_72 {
|
|
57720
57739
|
width: 100%;
|
|
57721
57740
|
}
|
|
57722
57741
|
|
|
@@ -57726,7 +57745,7 @@ article ._wrapper_zhv80_1 ._list_zhv80_8 ._listItemRoot_zhv80_8 {
|
|
|
57726
57745
|
** The idea is to integrate with modules CSS in order to increase the specificity
|
|
57727
57746
|
** and avoid conflicts on consumer apps
|
|
57728
57747
|
*/
|
|
57729
|
-
article .swiper.
|
|
57748
|
+
article .swiper._wrapper_ldua9_82 {
|
|
57730
57749
|
margin-left: -20px;
|
|
57731
57750
|
margin-right: -20px;
|
|
57732
57751
|
padding-left: 20px;
|
|
@@ -57740,7 +57759,7 @@ article .swiper._wrapper_1prat_73 {
|
|
|
57740
57759
|
z-index: 1;
|
|
57741
57760
|
display: block;
|
|
57742
57761
|
}
|
|
57743
|
-
article .swiper.
|
|
57762
|
+
article .swiper._wrapper_ldua9_82 .swiper-wrapper {
|
|
57744
57763
|
position: relative;
|
|
57745
57764
|
width: 100%;
|
|
57746
57765
|
/* height: 100%; */
|
|
@@ -57750,15 +57769,15 @@ article .swiper._wrapper_1prat_73 .swiper-wrapper {
|
|
|
57750
57769
|
transition-timing-function: initial;
|
|
57751
57770
|
box-sizing: content-box;
|
|
57752
57771
|
}
|
|
57753
|
-
article .swiper.
|
|
57754
|
-
article .swiper.
|
|
57755
|
-
article .swiper.
|
|
57772
|
+
article .swiper._wrapper_ldua9_82 .swiper-android .swiper-slide,
|
|
57773
|
+
article .swiper._wrapper_ldua9_82 .swiper-ios .swiper-slide,
|
|
57774
|
+
article .swiper._wrapper_ldua9_82 .swiper-wrapper {
|
|
57756
57775
|
transform: translate3d(0px, 0, 0);
|
|
57757
57776
|
}
|
|
57758
|
-
article .swiper.
|
|
57777
|
+
article .swiper._wrapper_ldua9_82 .swiper-horizontal {
|
|
57759
57778
|
touch-action: pan-y;
|
|
57760
57779
|
}
|
|
57761
|
-
article .swiper.
|
|
57780
|
+
article .swiper._wrapper_ldua9_82 .swiper-slide {
|
|
57762
57781
|
flex-shrink: 0;
|
|
57763
57782
|
width: 100%;
|
|
57764
57783
|
height: 100%;
|
|
@@ -57766,15 +57785,15 @@ article .swiper._wrapper_1prat_73 .swiper-slide {
|
|
|
57766
57785
|
transition-property: transform;
|
|
57767
57786
|
display: block;
|
|
57768
57787
|
}
|
|
57769
|
-
article .swiper.
|
|
57788
|
+
article .swiper._wrapper_ldua9_82 .swiper-slide-invisible-blank {
|
|
57770
57789
|
visibility: hidden;
|
|
57771
57790
|
}
|
|
57772
57791
|
|
|
57773
57792
|
/*
|
|
57774
57793
|
** SWIPER PAGINATION
|
|
57775
57794
|
*/
|
|
57776
|
-
article .swiper.
|
|
57777
|
-
article .swiper.
|
|
57795
|
+
article .swiper._wrapper_ldua9_82 .gallery-button-prev,
|
|
57796
|
+
article .swiper._wrapper_ldua9_82 .gallery-button-next {
|
|
57778
57797
|
position: absolute;
|
|
57779
57798
|
top: calc(150px / 2 - 8px);
|
|
57780
57799
|
z-index: 10;
|
|
@@ -57787,51 +57806,51 @@ article .swiper._wrapper_1prat_73 .gallery-button-next {
|
|
|
57787
57806
|
display: flex;
|
|
57788
57807
|
align-items: center;
|
|
57789
57808
|
}
|
|
57790
|
-
article .swiper.
|
|
57809
|
+
article .swiper._wrapper_ldua9_82 .gallery-button-prev {
|
|
57791
57810
|
left: 20px;
|
|
57792
57811
|
}
|
|
57793
|
-
article .swiper.
|
|
57812
|
+
article .swiper._wrapper_ldua9_82 .gallery-button-next {
|
|
57794
57813
|
right: 20px;
|
|
57795
57814
|
transform: rotate(180deg);
|
|
57796
57815
|
}
|
|
57797
|
-
article .swiper.
|
|
57816
|
+
article .swiper._wrapper_ldua9_82 .gallery-button-prev:dir(rtl) {
|
|
57798
57817
|
left: unset;
|
|
57799
57818
|
right: 20px;
|
|
57800
57819
|
transform: rotate(180deg);
|
|
57801
57820
|
}
|
|
57802
|
-
article .swiper.
|
|
57821
|
+
article .swiper._wrapper_ldua9_82 .gallery-button-next:dir(rtl) {
|
|
57803
57822
|
right: unset;
|
|
57804
57823
|
left: 20px;
|
|
57805
57824
|
transform: rotate(0deg);
|
|
57806
57825
|
}
|
|
57807
|
-
article .swiper.
|
|
57826
|
+
article .swiper._wrapper_ldua9_82 .swiper-button-disabled {
|
|
57808
57827
|
opacity: 0;
|
|
57809
57828
|
}
|
|
57810
57829
|
|
|
57811
57830
|
/*
|
|
57812
57831
|
** SWIPER NAVIGATION
|
|
57813
57832
|
*/
|
|
57814
|
-
article .swiper.
|
|
57833
|
+
article .swiper._wrapper_ldua9_82 .swiper-pagination {
|
|
57815
57834
|
position: absolute;
|
|
57816
57835
|
text-align: center;
|
|
57817
57836
|
transition: 300ms opacity;
|
|
57818
57837
|
transform: translate3d(0, 0, 0);
|
|
57819
57838
|
z-index: 10;
|
|
57820
57839
|
}
|
|
57821
|
-
article .swiper.
|
|
57840
|
+
article .swiper._wrapper_ldua9_82 .swiper-pagination.swiper-pagination-hidden {
|
|
57822
57841
|
opacity: 0;
|
|
57823
57842
|
}
|
|
57824
|
-
article .swiper.
|
|
57825
|
-
article .swiper.
|
|
57843
|
+
article .swiper._wrapper_ldua9_82 .swiper-pagination-disabled > .swiper-pagination,
|
|
57844
|
+
article .swiper._wrapper_ldua9_82 .swiper-pagination.swiper-pagination-disabled {
|
|
57826
57845
|
display: none !important;
|
|
57827
57846
|
}
|
|
57828
|
-
article .swiper.
|
|
57829
|
-
article .swiper.
|
|
57847
|
+
article .swiper._wrapper_ldua9_82 .swiper-horizontal > .swiper-pagination-bullets,
|
|
57848
|
+
article .swiper._wrapper_ldua9_82 .swiper-pagination-bullets.swiper-pagination-horizontal {
|
|
57830
57849
|
bottom: 4px;
|
|
57831
57850
|
left: 0;
|
|
57832
57851
|
width: 100%;
|
|
57833
57852
|
}
|
|
57834
|
-
article .swiper.
|
|
57853
|
+
article .swiper._wrapper_ldua9_82 .swiper-pagination-bullet {
|
|
57835
57854
|
width: 6px;
|
|
57836
57855
|
height: 6px;
|
|
57837
57856
|
display: inline-block;
|
|
@@ -57839,16 +57858,16 @@ article .swiper._wrapper_1prat_73 .swiper-pagination-bullet {
|
|
|
57839
57858
|
background: var(--cc-black-50);
|
|
57840
57859
|
opacity: 1;
|
|
57841
57860
|
}
|
|
57842
|
-
article .swiper.
|
|
57861
|
+
article .swiper._wrapper_ldua9_82 .swiper-pagination-bullet:focus {
|
|
57843
57862
|
background-color: var(--cc-primary-color-focus);
|
|
57844
57863
|
box-shadow: 0 0 0 4px var(--cc-primary-color-opacity-10);
|
|
57845
57864
|
outline: none;
|
|
57846
57865
|
}
|
|
57847
|
-
article .swiper.
|
|
57866
|
+
article .swiper._wrapper_ldua9_82 .swiper-pagination-bullet:focus-visible {
|
|
57848
57867
|
outline: 2px solid var(--cc-primary-color-focus);
|
|
57849
57868
|
outline-offset: 2px;
|
|
57850
57869
|
}
|
|
57851
|
-
article .swiper.
|
|
57870
|
+
article .swiper._wrapper_ldua9_82 button.swiper-pagination-bullet {
|
|
57852
57871
|
border: none;
|
|
57853
57872
|
margin: 0;
|
|
57854
57873
|
padding: 0;
|
|
@@ -57856,21 +57875,21 @@ article .swiper._wrapper_1prat_73 button.swiper-pagination-bullet {
|
|
|
57856
57875
|
-webkit-appearance: none;
|
|
57857
57876
|
appearance: none;
|
|
57858
57877
|
}
|
|
57859
|
-
article .swiper.
|
|
57878
|
+
article .swiper._wrapper_ldua9_82 .swiper-pagination-clickable .swiper-pagination-bullet {
|
|
57860
57879
|
cursor: pointer;
|
|
57861
57880
|
}
|
|
57862
|
-
article .swiper.
|
|
57881
|
+
article .swiper._wrapper_ldua9_82 .swiper-pagination-bullet:only-child {
|
|
57863
57882
|
display: none !important;
|
|
57864
57883
|
}
|
|
57865
|
-
article .swiper.
|
|
57884
|
+
article .swiper._wrapper_ldua9_82 .swiper-pagination-bullet-active {
|
|
57866
57885
|
opacity: 1;
|
|
57867
57886
|
background-color: black;
|
|
57868
57887
|
}
|
|
57869
57888
|
article
|
|
57870
|
-
.swiper.
|
|
57889
|
+
.swiper._wrapper_ldua9_82
|
|
57871
57890
|
.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet,
|
|
57872
57891
|
article
|
|
57873
|
-
.swiper.
|
|
57892
|
+
.swiper._wrapper_ldua9_82
|
|
57874
57893
|
.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
|
|
57875
57894
|
margin: 0 4px;
|
|
57876
57895
|
}
|
|
@@ -86006,7 +86025,10 @@ const ActionButton = props2 => {
|
|
|
86006
86025
|
const __html = config2?.settings?.layout?.disableHtmlContentSanitization ? buttonLabel : sanitizeHTMLWithConfig(buttonLabel, customAllowedHtmlTags);
|
|
86007
86026
|
const isPhoneNumber = button2.payload && (buttonType === "phone_number" || buttonType === "user_phone_number");
|
|
86008
86027
|
const isWebURL = "type" in button2 && button2.type === "web_url";
|
|
86028
|
+
const sanitizedButtonUrl = isWebURL ? distExports.sanitizeUrl(button2.url) : void 0;
|
|
86029
|
+
const webUrlHref = config2?.settings?.layout?.disableUrlButtonSanitization ? button2.url : sanitizedButtonUrl === "about:blank" ? "about:blank" : button2.url;
|
|
86009
86030
|
const isWebURLButtonTargetBlank = isWebURL && button2.target !== "_self";
|
|
86031
|
+
const opensInNewTab = config2?.settings?.layout?.disableUrlButtonSanitization ? isWebURL && button2.target === "_blank" : isWebURLButtonTargetBlank;
|
|
86010
86032
|
const opensInNewTabLabel = config2?.settings?.customTranslations?.ariaLabels?.opensInNewTab || "Opens in new tab";
|
|
86011
86033
|
const positionText = total > 1 ? interpolateString(config2?.settings?.customTranslations?.ariaLabels?.actionButtonPositionText ?? "{position} of {total}", {
|
|
86012
86034
|
position: position2.toString(),
|
|
@@ -86025,7 +86047,7 @@ const ActionButton = props2 => {
|
|
|
86025
86047
|
as PhoneNumberAnchor: children come in via the {...props} spread. */
|
|
86026
86048
|
isWebURL ? /* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", {
|
|
86027
86049
|
...props22,
|
|
86028
|
-
href:
|
|
86050
|
+
href: webUrlHref,
|
|
86029
86051
|
target: button2.target
|
|
86030
86052
|
}) : null);
|
|
86031
86053
|
const Button2 = props22 => /* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", {
|
|
@@ -86045,15 +86067,19 @@ const ActionButton = props2 => {
|
|
|
86045
86067
|
return;
|
|
86046
86068
|
}
|
|
86047
86069
|
if (isWebURL) {
|
|
86048
|
-
|
|
86070
|
+
if (config2?.settings?.layout?.disableUrlButtonSanitization) {
|
|
86071
|
+
if (disabled2) event.preventDefault();
|
|
86072
|
+
return;
|
|
86073
|
+
}
|
|
86074
|
+
event.preventDefault();
|
|
86075
|
+
if (disabled2) return;
|
|
86076
|
+
const url = sanitizedButtonUrl;
|
|
86049
86077
|
if (url === "about:blank") return;
|
|
86050
86078
|
window.open(url, isWebURLButtonTargetBlank ? "_blank" : "_self");
|
|
86079
|
+
return;
|
|
86051
86080
|
}
|
|
86052
86081
|
if (disabled2) return;
|
|
86053
86082
|
event.preventDefault();
|
|
86054
|
-
if (isWebURL) {
|
|
86055
|
-
return;
|
|
86056
|
-
}
|
|
86057
86083
|
if (buttonType === "openXApp") {
|
|
86058
86084
|
openXAppOverlay?.(button2.payload);
|
|
86059
86085
|
return;
|
|
@@ -86100,7 +86126,7 @@ const ActionButton = props2 => {
|
|
|
86100
86126
|
__html
|
|
86101
86127
|
},
|
|
86102
86128
|
className: !!buttonImage2 && classes$e.buttonLabelWithImage
|
|
86103
|
-
}), renderIcon(),
|
|
86129
|
+
}), renderIcon(), opensInNewTab && /* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
86104
86130
|
className: mainClasses.srOnly,
|
|
86105
86131
|
children: `, ${opensInNewTabLabel}`
|
|
86106
86132
|
})]
|
|
@@ -93288,13 +93314,13 @@ const List = () => {
|
|
|
93288
93314
|
})]
|
|
93289
93315
|
});
|
|
93290
93316
|
};
|
|
93291
|
-
const slideItem = "
|
|
93292
|
-
const top = "
|
|
93293
|
-
const bottom = "
|
|
93294
|
-
const brokenImage = "
|
|
93295
|
-
const hasExtraInfo = "
|
|
93296
|
-
const buttonListItem = "
|
|
93297
|
-
const wrapper$1 = "
|
|
93317
|
+
const slideItem = "_slideItem_ldua9_1";
|
|
93318
|
+
const top = "_top_ldua9_8";
|
|
93319
|
+
const bottom = "_bottom_ldua9_13";
|
|
93320
|
+
const brokenImage = "_brokenImage_ldua9_34";
|
|
93321
|
+
const hasExtraInfo = "_hasExtraInfo_ldua9_43";
|
|
93322
|
+
const buttonListItem = "_buttonListItem_ldua9_72";
|
|
93323
|
+
const wrapper$1 = "_wrapper_ldua9_82";
|
|
93298
93324
|
const classes$8 = {
|
|
93299
93325
|
slideItem,
|
|
93300
93326
|
top,
|
|
@@ -99089,12 +99115,15 @@ const GalleryItem = props2 => {
|
|
|
99089
99115
|
"data-message-id": dataMessageId
|
|
99090
99116
|
} = useMessageContext();
|
|
99091
99117
|
const hasExtraInfo2 = subtitle || buttons2 && buttons2?.length > 0;
|
|
99118
|
+
const titleBelowImage = !!config2?.settings?.layout?.galleryCardTitleBelowImage;
|
|
99092
99119
|
const [isImageBroken, setImageBroken] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
|
99093
99120
|
const {
|
|
99094
99121
|
processHTML
|
|
99095
99122
|
} = useSanitize();
|
|
99096
|
-
const titleHtml = processHTML(title);
|
|
99097
|
-
const subtitleHtml = processHTML(subtitle);
|
|
99123
|
+
const titleHtml = processHTML(title || "");
|
|
99124
|
+
const subtitleHtml = processHTML(subtitle || "");
|
|
99125
|
+
const hasTitle = !!titleHtml;
|
|
99126
|
+
const showContentBlock = titleBelowImage && hasTitle || hasExtraInfo2;
|
|
99098
99127
|
const titleId = useRandomId("webchatCarouselTemplateTitle");
|
|
99099
99128
|
const subtitleId = useRandomId("webchatCarouselTemplateSubtitle");
|
|
99100
99129
|
const shouldBeDisabled = messageParams?.isConversationEnded;
|
|
@@ -99111,19 +99140,20 @@ const GalleryItem = props2 => {
|
|
|
99111
99140
|
handleClick();
|
|
99112
99141
|
}
|
|
99113
99142
|
};
|
|
99143
|
+
const titleElement = /* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Typography, {
|
|
99144
|
+
variant: "body-semibold",
|
|
99145
|
+
component: "h4",
|
|
99146
|
+
dangerouslySetInnerHTML: {
|
|
99147
|
+
__html: titleHtml
|
|
99148
|
+
},
|
|
99149
|
+
className: "webchat-carousel-template-title",
|
|
99150
|
+
id: titleId
|
|
99151
|
+
});
|
|
99114
99152
|
return /* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
99115
99153
|
className: classnames$1("webchat-carousel-template-frame", classes$8.slideItem),
|
|
99116
99154
|
children: [/* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
99117
|
-
className: classnames$1(classes$8.top,
|
|
99118
|
-
children: [/* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
99119
|
-
variant: "body-semibold",
|
|
99120
|
-
component: "h4",
|
|
99121
|
-
dangerouslySetInnerHTML: {
|
|
99122
|
-
__html: titleHtml
|
|
99123
|
-
},
|
|
99124
|
-
className: "webchat-carousel-template-title",
|
|
99125
|
-
id: titleId
|
|
99126
|
-
}), isImageBroken ? /* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
99155
|
+
className: classnames$1(classes$8.top, showContentBlock && classes$8.hasExtraInfo),
|
|
99156
|
+
children: [!titleBelowImage && hasTitle && titleElement, isImageBroken ? /* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
99127
99157
|
className: classes$8.brokenImage
|
|
99128
99158
|
}) : /* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", {
|
|
99129
99159
|
src: image_url,
|
|
@@ -99131,16 +99161,16 @@ const GalleryItem = props2 => {
|
|
|
99131
99161
|
className: classes$8.slideImage,
|
|
99132
99162
|
onError: () => setImageBroken(true)
|
|
99133
99163
|
})]
|
|
99134
|
-
}),
|
|
99164
|
+
}), showContentBlock && /* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
99135
99165
|
className: classnames$1("webchat-carousel-template-content", classes$8.bottom),
|
|
99136
99166
|
onClick: handleClick,
|
|
99137
99167
|
onKeyDown: handleKeyDown,
|
|
99138
99168
|
role: default_action?.url ? "link" : void 0,
|
|
99139
99169
|
id: contentId,
|
|
99140
99170
|
"aria-describedby": default_action?.url && subtitle ? subtitleId : void 0,
|
|
99141
|
-
"aria-labelledby": default_action?.url &&
|
|
99171
|
+
"aria-labelledby": default_action?.url && hasTitle ? titleId : void 0,
|
|
99142
99172
|
"aria-label": default_action?.url ? `${titleHtml}. ${opensInNewTab}` : void 0,
|
|
99143
|
-
children: [subtitle && /* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Typography, {
|
|
99173
|
+
children: [titleBelowImage && hasTitle && titleElement, subtitle && /* @__PURE__ */(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Typography, {
|
|
99144
99174
|
variant: "body-regular",
|
|
99145
99175
|
dangerouslySetInnerHTML: {
|
|
99146
99176
|
__html: subtitleHtml
|
|
@@ -99155,7 +99185,7 @@ const GalleryItem = props2 => {
|
|
|
99155
99185
|
action: shouldBeDisabled ? void 0 : action,
|
|
99156
99186
|
config: config2,
|
|
99157
99187
|
onEmitAnalytics,
|
|
99158
|
-
templateTextId:
|
|
99188
|
+
templateTextId: hasTitle ? titleId : void 0
|
|
99159
99189
|
})]
|
|
99160
99190
|
})]
|
|
99161
99191
|
});
|