@wallavi/widget 1.3.2 → 1.3.4
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.js +13 -1
- package/dist/index.mjs +13 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -757,6 +757,18 @@ function BubbleWidget({
|
|
|
757
757
|
const [resolvedAutoOpen, setResolvedAutoOpen] = react.useState(autoOpenProp);
|
|
758
758
|
const [resolvedKeyboardShortcut, setResolvedKeyboardShortcut] = react.useState(keyboardShortcutProp);
|
|
759
759
|
const [resolvedPosition, setResolvedPosition] = react.useState(positionProp ?? "bottom-right");
|
|
760
|
+
react.useEffect(() => {
|
|
761
|
+
if (autoOpenProp) setResolvedAutoOpen(true);
|
|
762
|
+
}, [autoOpenProp]);
|
|
763
|
+
react.useEffect(() => {
|
|
764
|
+
if (keyboardShortcutProp) setResolvedKeyboardShortcut(true);
|
|
765
|
+
}, [keyboardShortcutProp]);
|
|
766
|
+
react.useEffect(() => {
|
|
767
|
+
if (bubbleIconUrlProp) setResolvedBubbleIcon(bubbleIconUrlProp);
|
|
768
|
+
}, [bubbleIconUrlProp]);
|
|
769
|
+
react.useEffect(() => {
|
|
770
|
+
if (positionProp) setResolvedPosition(positionProp);
|
|
771
|
+
}, [positionProp]);
|
|
760
772
|
react.useEffect(() => {
|
|
761
773
|
if (!autoConfig) return;
|
|
762
774
|
fetch(`${WALLAVI_API}/api/public/widget/${chatProps.agentId}`).then((r) => r.json()).then((body) => {
|
|
@@ -848,7 +860,7 @@ function BubbleWidget({
|
|
|
848
860
|
{
|
|
849
861
|
ref: panelRef,
|
|
850
862
|
"aria-hidden": !open,
|
|
851
|
-
style: { display: open ? "block" : "none", position: "relative" },
|
|
863
|
+
style: { display: open ? "block" : "none", position: "relative", zIndex: 1 },
|
|
852
864
|
children: [
|
|
853
865
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
854
866
|
"div",
|
package/dist/index.mjs
CHANGED
|
@@ -731,6 +731,18 @@ function BubbleWidget({
|
|
|
731
731
|
const [resolvedAutoOpen, setResolvedAutoOpen] = useState(autoOpenProp);
|
|
732
732
|
const [resolvedKeyboardShortcut, setResolvedKeyboardShortcut] = useState(keyboardShortcutProp);
|
|
733
733
|
const [resolvedPosition, setResolvedPosition] = useState(positionProp ?? "bottom-right");
|
|
734
|
+
useEffect(() => {
|
|
735
|
+
if (autoOpenProp) setResolvedAutoOpen(true);
|
|
736
|
+
}, [autoOpenProp]);
|
|
737
|
+
useEffect(() => {
|
|
738
|
+
if (keyboardShortcutProp) setResolvedKeyboardShortcut(true);
|
|
739
|
+
}, [keyboardShortcutProp]);
|
|
740
|
+
useEffect(() => {
|
|
741
|
+
if (bubbleIconUrlProp) setResolvedBubbleIcon(bubbleIconUrlProp);
|
|
742
|
+
}, [bubbleIconUrlProp]);
|
|
743
|
+
useEffect(() => {
|
|
744
|
+
if (positionProp) setResolvedPosition(positionProp);
|
|
745
|
+
}, [positionProp]);
|
|
734
746
|
useEffect(() => {
|
|
735
747
|
if (!autoConfig) return;
|
|
736
748
|
fetch(`${WALLAVI_API}/api/public/widget/${chatProps.agentId}`).then((r) => r.json()).then((body) => {
|
|
@@ -822,7 +834,7 @@ function BubbleWidget({
|
|
|
822
834
|
{
|
|
823
835
|
ref: panelRef,
|
|
824
836
|
"aria-hidden": !open,
|
|
825
|
-
style: { display: open ? "block" : "none", position: "relative" },
|
|
837
|
+
style: { display: open ? "block" : "none", position: "relative", zIndex: 1 },
|
|
826
838
|
children: [
|
|
827
839
|
/* @__PURE__ */ jsx(
|
|
828
840
|
"div",
|