@deepfrog/pangents-widget 2.1.6 → 2.2.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/dist/Widget.d.ts +2 -1
- package/dist/components/WidgetBubble.d.ts +2 -1
- package/dist/components/WidgetPopup.d.ts +2 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/{widget-embed-9DdEqVMP.cjs.js → widget-embed-BPoilyw_.cjs.js} +3 -3
- package/dist/widget-embed-BPoilyw_.cjs.js.map +1 -0
- package/dist/{widget-embed-LzSoeVtX.es.js → widget-embed-CtD27t5y.es.js} +21 -8
- package/dist/widget-embed-CtD27t5y.es.js.map +1 -0
- package/dist/widget-embed.cjs.js +1 -1
- package/dist/widget-embed.es.js +1 -1
- package/dist/widget.js +19 -6
- package/package.json +2 -2
- package/dist/widget-embed-9DdEqVMP.cjs.js.map +0 -1
- package/dist/widget-embed-LzSoeVtX.es.js.map +0 -1
package/dist/widget-embed.cjs.js
CHANGED
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
}
|
|
7
7
|
} catch (error) {}
|
|
8
8
|
})();
|
|
9
|
-
"use strict";require("react/jsx-runtime"),require("react");const e=require("./widget-embed-
|
|
9
|
+
"use strict";require("react/jsx-runtime"),require("react");const e=require("./widget-embed-BPoilyw_.cjs.js");module.exports=e.Chatbot;
|
|
10
10
|
//# sourceMappingURL=widget-embed.cjs.js.map
|
package/dist/widget-embed.es.js
CHANGED
package/dist/widget.js
CHANGED
|
@@ -24723,7 +24723,7 @@ const useEmailLeadsStore = create()(
|
|
|
24723
24723
|
}
|
|
24724
24724
|
}))
|
|
24725
24725
|
);
|
|
24726
|
-
function WidgetBubble({ position = "bottom-right", margin }) {
|
|
24726
|
+
function WidgetBubble({ position = "bottom-right", margin, zIndex }) {
|
|
24727
24727
|
const { openWidget, theme, isOpen, isAuthenticated } = useChatContext();
|
|
24728
24728
|
const { hasNewLeads, newLeadsCount, startPolling, stopPolling, clearNewLeadsNotification } = useEmailLeadsStore();
|
|
24729
24729
|
reactExports.useEffect(() => {
|
|
@@ -24752,7 +24752,7 @@ function WidgetBubble({ position = "bottom-right", margin }) {
|
|
|
24752
24752
|
return "fixed bottom-6 right-6 z-50";
|
|
24753
24753
|
}
|
|
24754
24754
|
};
|
|
24755
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: getPositionClasses(), style: { margin: margin || void 0 }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
|
|
24755
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: getPositionClasses(), style: { margin: margin || void 0, zIndex: zIndex || void 0 }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
|
|
24756
24756
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
24757
24757
|
Button,
|
|
24758
24758
|
{
|
|
@@ -36260,7 +36260,7 @@ function WidgetContent() {
|
|
|
36260
36260
|
/* @__PURE__ */ jsxRuntimeExports.jsx(PoweredByFooter, {})
|
|
36261
36261
|
] });
|
|
36262
36262
|
}
|
|
36263
|
-
function WidgetPopup({ position = "bottom-right" }) {
|
|
36263
|
+
function WidgetPopup({ position = "bottom-right", zIndex }) {
|
|
36264
36264
|
const { isOpen, theme, closeWidget, isAuthenticated } = useChatContext();
|
|
36265
36265
|
const isLeftPosition = position === "bottom-left" || position === "top-left";
|
|
36266
36266
|
const containerRef = reactExports.useRef(null);
|
|
@@ -36384,6 +36384,7 @@ function WidgetPopup({ position = "bottom-right" }) {
|
|
|
36384
36384
|
motion.div,
|
|
36385
36385
|
{
|
|
36386
36386
|
className: "fixed inset-0 z-50",
|
|
36387
|
+
style: { zIndex: zIndex ?? 50 },
|
|
36387
36388
|
initial: { opacity: 0 },
|
|
36388
36389
|
animate: { opacity: 1 },
|
|
36389
36390
|
exit: { opacity: 0 },
|
|
@@ -36553,10 +36554,22 @@ function WidgetPopup({ position = "bottom-right" }) {
|
|
|
36553
36554
|
}
|
|
36554
36555
|
) });
|
|
36555
36556
|
}
|
|
36556
|
-
function Widget({ theme, className, position, margin, pangentsApiKey, tenantId, email }) {
|
|
36557
|
+
function Widget({ theme, className, position, margin, pangentsApiKey, tenantId, email, zIndex }) {
|
|
36558
|
+
reactExports.useEffect(() => {
|
|
36559
|
+
try {
|
|
36560
|
+
const css = window.__PANGENTS_WIDGET_CSS;
|
|
36561
|
+
if (css && !document.getElementById("pangents-widget-styles")) {
|
|
36562
|
+
const style = document.createElement("style");
|
|
36563
|
+
style.id = "pangents-widget-styles";
|
|
36564
|
+
style.textContent = css;
|
|
36565
|
+
document.head.appendChild(style);
|
|
36566
|
+
}
|
|
36567
|
+
} catch {
|
|
36568
|
+
}
|
|
36569
|
+
}, []);
|
|
36557
36570
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: className ? `pg-widget-root ${className}` : "pg-widget-root", children: /* @__PURE__ */ jsxRuntimeExports.jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ChatProvider, { initialTheme: theme, apiKey: pangentsApiKey, tenantId, email, children: [
|
|
36558
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(WidgetBubble, { position, margin }),
|
|
36559
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(WidgetPopup, { position })
|
|
36571
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(WidgetBubble, { position, margin, zIndex }),
|
|
36572
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(WidgetPopup, { position, zIndex })
|
|
36560
36573
|
] }) }) });
|
|
36561
36574
|
}
|
|
36562
36575
|
class ChatbotWidget {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepfrog/pangents-widget",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"description": "Pangents AI - Embeddable AI widget for web applications",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.cjs.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"README.md",
|
|
25
25
|
"LICENSE"
|
|
26
26
|
],
|
|
27
|
-
"sideEffects":
|
|
27
|
+
"sideEffects": true,
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
30
|
"url": "git+https://github.com/deepfrog/pangents-widget.git"
|