Skip to content

Commit

Permalink
Add minor fixes for chart's sizes in responses
Browse files Browse the repository at this point in the history
  • Loading branch information
annmirosh committed Nov 4, 2024
1 parent bef953f commit 6e6f84c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
20 changes: 14 additions & 6 deletions dist/alan_lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -93511,13 +93511,21 @@ code.hljs {
width = width;
const iframeEls = document.querySelectorAll("#" + iframeId);
iframeEls.forEach((iframeEl) => {
if (withSvg) {
const responseWrapper = iframeEl.closest(".alan-btn__chat-response, .chat-bubble_message");
if (responseWrapper) {
const responseWrapper = iframeEl.closest(".alan-btn__chat-response, .chat-bubble_message");
if (responseWrapper) {
if (withSvg) {
responseWrapper.classList.add("with-svg");
} else {
if (height < 650) {
iframeEl.style.width = width + "px";
} else {
if (responseWrapper.clientWidth <= width) {
iframeEl.style.width = width + "px";
} else {
iframeEl.style.width = "100%";
}
}
}
} else {
iframeEl.style.width = width + "px";
}
iframeEl.style.height = (+height > maxIFrameHeight ? maxIFrameHeight : height) + "px";
});
Expand Down Expand Up @@ -93786,7 +93794,7 @@ code.hljs {
// alan_btn/alan_btn.ts
var import_lodash2 = __toESM(require_lodash());
(function(ns) {
uiState.lib.version = "alan-version.1.8.68".replace("alan-version.", "");
uiState.lib.version = "alan-version.1.8.69".replace("alan-version.", "");
if (window.alanBtn) {
console.warn("Alan: the Alan Button source code has already added (v." + uiState.lib.version + ")");
}
Expand Down
2 changes: 1 addition & 1 deletion dist/alan_lib.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alan-ai/alan-sdk-web",
"version": "1.8.68",
"version": "1.8.69",
"description": "Alan Web SDK: a lightweight JavaScript library for adding a voice experience to your website or web application",
"keywords": [
"alan sdk web",
Expand Down

0 comments on commit 6e6f84c

Please sign in to comment.