@xapp/chat-widget 1.94.1 → 1.94.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/dist/index.css +1 -1
- package/dist/index.es.js +9 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/xapp-chat-widget.css +1 -1
- package/dist/xapp-chat-widget.js +1 -1
- package/dist/xapp-chat-widget.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4593,7 +4593,9 @@ function convertFromListDisplay(list) {
|
|
|
4593
4593
|
token: item.token,
|
|
4594
4594
|
url: item.url,
|
|
4595
4595
|
hideUrl: item.hideUrl,
|
|
4596
|
-
|
|
4596
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4597
|
+
// Prefer stentor-models image.url; fall back to server's flat imageUrl
|
|
4598
|
+
imageUrl: ((_a = item.image) === null || _a === void 0 ? void 0 : _a.url) || item.imageUrl,
|
|
4597
4599
|
imageActionUrl: (_b = item.image) === null || _b === void 0 ? void 0 : _b.imageActionUrl
|
|
4598
4600
|
};
|
|
4599
4601
|
// TODO: Remove any when the buttons are defined on the list (ListButton - title + openUrlAction)
|
|
@@ -4639,13 +4641,17 @@ function convertToListDisplay(list) {
|
|
|
4639
4641
|
};
|
|
4640
4642
|
}
|
|
4641
4643
|
function convertFromCardDisplay(card) {
|
|
4644
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4645
|
+
var cardAny = card;
|
|
4642
4646
|
return {
|
|
4643
4647
|
content: card.content,
|
|
4644
|
-
|
|
4648
|
+
// Prefer stentor-models smallImageUrl; fall back to server's flat imageUrl
|
|
4649
|
+
imageUrl: card.smallImageUrl || cardAny.imageUrl,
|
|
4645
4650
|
title: card.title,
|
|
4646
4651
|
imageActionUrl: card === null || card === void 0 ? void 0 : card.imageActionUrl,
|
|
4647
4652
|
buttons: card.buttons ? card.buttons.map(function (button) { return ({
|
|
4648
|
-
|
|
4653
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4654
|
+
actionUrl: button.openUrlAction || button.url,
|
|
4649
4655
|
label: button.title
|
|
4650
4656
|
}); }) : undefined
|
|
4651
4657
|
};
|