@alan-ai/alan-sdk-web 1.8.78 → 1.8.80
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/AlanButton.d.ts +1 -0
- package/dist/AlanButtonOptions.d.ts +6 -1
- package/dist/alan_lib.js +22 -12
- package/dist/alan_lib.min.js +1 -1
- package/package.json +1 -1
package/dist/AlanButton.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface AlanButtonOptions {
|
|
2
2
|
key: string;
|
|
3
|
-
rootEl?: HTMLElement;
|
|
3
|
+
rootEl?: HTMLElement | undefined;
|
|
4
4
|
right?: number | string;
|
|
5
5
|
bottom?: number | string;
|
|
6
6
|
left?: number | string;
|
|
@@ -11,8 +11,13 @@ export interface AlanButtonOptions {
|
|
|
11
11
|
showOverlayOnMicPermissionPrompt?: boolean;
|
|
12
12
|
zIndex?: number;
|
|
13
13
|
host?: string;
|
|
14
|
+
mode?: 'inlined' | undefined;
|
|
14
15
|
onCommand?: (commandData: object) => void;
|
|
15
16
|
onEvent?: (event: object) => void;
|
|
16
17
|
onButtonState?: (state: string) => void;
|
|
17
18
|
onConnectionStatus?: (status: string) => void;
|
|
19
|
+
textChat: {
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
onMinimize?: () => void;
|
|
22
|
+
}
|
|
18
23
|
}
|
package/dist/alan_lib.js
CHANGED
|
@@ -97301,6 +97301,7 @@
|
|
|
97301
97301
|
position: static;
|
|
97302
97302
|
height: 100%!important;
|
|
97303
97303
|
max-height: 100%!important;
|
|
97304
|
+
min-height: initial!important;
|
|
97304
97305
|
width: 100%!important;
|
|
97305
97306
|
max-width: 100%!important;
|
|
97306
97307
|
top:0!important;
|
|
@@ -100629,7 +100630,7 @@ code.hljs {
|
|
|
100629
100630
|
// alan_btn/alan_btn.ts
|
|
100630
100631
|
var CryptoJS = __toESM(require_crypto_js());
|
|
100631
100632
|
(function(ns) {
|
|
100632
|
-
uiState.lib.version = "alan-version.1.8.
|
|
100633
|
+
uiState.lib.version = "alan-version.1.8.80".replace("alan-version.", "");
|
|
100633
100634
|
if (window.alanBtn) {
|
|
100634
100635
|
console.warn("Alan: the Alan Button source code has already added (v." + uiState.lib.version + ")");
|
|
100635
100636
|
}
|
|
@@ -100811,6 +100812,9 @@ code.hljs {
|
|
|
100811
100812
|
exitFullScreenModeForTextChat();
|
|
100812
100813
|
}
|
|
100813
100814
|
},
|
|
100815
|
+
open: () => {
|
|
100816
|
+
showTextChat();
|
|
100817
|
+
},
|
|
100814
100818
|
close: () => {
|
|
100815
100819
|
closeTextChat();
|
|
100816
100820
|
},
|
|
@@ -103759,16 +103763,14 @@ ${LEARN_MORE_LABEL}
|
|
|
103759
103763
|
expandCollapseChatBtnImg.addEventListener("click", expandCollapseTextChat);
|
|
103760
103764
|
addNeedClassesToExpandCollapseBtn(expandCollapseChatBtnImg);
|
|
103761
103765
|
}
|
|
103762
|
-
if (
|
|
103763
|
-
|
|
103764
|
-
|
|
103765
|
-
|
|
103766
|
-
minimizeChatBtnImg.addEventListener("click", minimizeTextChat);
|
|
103767
|
-
}
|
|
103768
|
-
closeChatBtnImg = createDivWithSvg(getCloseChatIcon(uiState.textChat.options), { class: "alan-btn__close-chat-btn", id: "alan-btn-chat-close-btn" });
|
|
103769
|
-
rightHeaderIconsHolder.appendChild(closeChatBtnImg);
|
|
103770
|
-
closeChatBtnImg.addEventListener("click", closeTextChat);
|
|
103766
|
+
if (uiState.textChat.options?.popup?.minimizeMode?.enabled === true) {
|
|
103767
|
+
minimizeChatBtnImg = createDivWithSvg(getMinimizeChatIcon(uiState.textChat.options), { class: "alan-btn__minimize-chat-btn", id: "alan-btn-chat-minimize-btn" });
|
|
103768
|
+
rightHeaderIconsHolder.appendChild(minimizeChatBtnImg);
|
|
103769
|
+
minimizeChatBtnImg.addEventListener("click", minimizeTextChat);
|
|
103771
103770
|
}
|
|
103771
|
+
closeChatBtnImg = createDivWithSvg(getCloseChatIcon(uiState.textChat.options), { class: "alan-btn__close-chat-btn", id: "alan-btn-chat-close-btn" });
|
|
103772
|
+
rightHeaderIconsHolder.appendChild(closeChatBtnImg);
|
|
103773
|
+
closeChatBtnImg.addEventListener("click", closeTextChat);
|
|
103772
103774
|
headerInnerDiv.appendChild(leftHeaderIconsHolder);
|
|
103773
103775
|
headerInnerDiv.appendChild(headerTille);
|
|
103774
103776
|
headerInnerDiv.appendChild(rightHeaderIconsHolder);
|
|
@@ -103951,7 +103953,11 @@ ${LEARN_MORE_LABEL}
|
|
|
103951
103953
|
if (options.onEvent) {
|
|
103952
103954
|
options.onEvent({ name: "textChatClosed" });
|
|
103953
103955
|
}
|
|
103954
|
-
|
|
103956
|
+
if (options?.textChat?.onClose) {
|
|
103957
|
+
options?.textChat?.onClose();
|
|
103958
|
+
} else {
|
|
103959
|
+
hideTextChat();
|
|
103960
|
+
}
|
|
103955
103961
|
if (uiState.textChat.options?.popup?.clearChatOnClose === true) {
|
|
103956
103962
|
onClearTextChatBtnClick();
|
|
103957
103963
|
}
|
|
@@ -103960,7 +103966,11 @@ ${LEARN_MORE_LABEL}
|
|
|
103960
103966
|
if (options.onEvent) {
|
|
103961
103967
|
options.onEvent({ name: "textChatMinimized" });
|
|
103962
103968
|
}
|
|
103963
|
-
|
|
103969
|
+
if (options?.textChat?.onMinimize) {
|
|
103970
|
+
options?.textChat?.onMinimize();
|
|
103971
|
+
} else {
|
|
103972
|
+
hideTextChat();
|
|
103973
|
+
}
|
|
103964
103974
|
}
|
|
103965
103975
|
function expandCollapseChatSidePanel() {
|
|
103966
103976
|
toogleChatSidePanel(chatHolderDiv);
|