lr-chatbot 0.36.0 → 0.38.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/index.js +7 -7
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -23292,18 +23292,18 @@ var d4 = Object.defineProperty, h4 = Object.getOwnPropertyDescriptor, ya = (t, r
|
|
|
23292
23292
|
};
|
|
23293
23293
|
let In = class extends fe {
|
|
23294
23294
|
constructor() {
|
|
23295
|
-
super(...arguments), this._isDragging = !1, this._chatbotMinimizedElement = document.createElement("div"), this.
|
|
23296
|
-
this._isDragging = !0, this._lastX = t.touches[0].clientX, this._lastY = t.touches[0].clientY;
|
|
23295
|
+
super(...arguments), this._isDragging = !1, this._chatbotMinimizedElement = document.createElement("div"), this._isClickEventRemoved = !1, this._isEventDraggableSet = !1, this._lastX = 0, this._lastY = 0, this._isMobileDevice = ko(), this.handleTouchStart = (t) => {
|
|
23296
|
+
t.stopPropagation(), this._isDragging = !0, this._lastX = t.touches[0].clientX, this._lastY = t.touches[0].clientY;
|
|
23297
23297
|
}, this.handleTouchMove = (t) => {
|
|
23298
|
-
if (!this._isDragging) return;
|
|
23298
|
+
if (t.stopPropagation(), t.preventDefault(), !this._isDragging) return;
|
|
23299
23299
|
const r = t.touches[0].clientX - this._lastX, e = t.touches[0].clientY - this._lastY, n = parseInt(
|
|
23300
23300
|
window.getComputedStyle(this._chatbotMinimizedElement).getPropertyValue("left")
|
|
23301
23301
|
), i = parseInt(
|
|
23302
23302
|
window.getComputedStyle(this._chatbotMinimizedElement).getPropertyValue("top")
|
|
23303
23303
|
);
|
|
23304
23304
|
this._chatbotMinimizedElement.style.bottom = "", this._chatbotMinimizedElement.style.position = "absolute", this._chatbotMinimizedElement.style.cursor = "grabbing", this._chatbotMinimizedElement.style.left = `${n + r}px`, this._chatbotMinimizedElement.style.top = `${i + e}px`, this._lastX = t.touches[0].clientX, this._lastY = t.touches[0].clientY, this._isClickEventRemoved || (this._isClickEventRemoved = !0);
|
|
23305
|
-
}, this.handleTouchEnd = () => {
|
|
23306
|
-
this._isDragging && (this._isDragging = !1, this._chatbotMinimizedElement.style.position = "fixed", this._chatbotMinimizedElement.style.cursor = "grab");
|
|
23305
|
+
}, this.handleTouchEnd = (t) => {
|
|
23306
|
+
t.stopPropagation(), this._isDragging && (this._isDragging = !1, this._chatbotMinimizedElement.style.position = "fixed", this._chatbotMinimizedElement.style.cursor = "grab");
|
|
23307
23307
|
}, this.setElement = async () => {
|
|
23308
23308
|
const t = document.querySelector("#chatbot"), r = t == null ? void 0 : t.shadowRoot, e = r == null ? void 0 : r.querySelector("#chat-minimizerd-wrapper"), n = e == null ? void 0 : e.shadowRoot, i = n == null ? void 0 : n.querySelector("#chat-minimized.isDraggable");
|
|
23309
23309
|
i instanceof HTMLElement ? this._chatbotMinimizedElement = i : console.warn("Chatbot minimized element not found in shadow DOM");
|
|
@@ -23313,7 +23313,7 @@ let In = class extends fe {
|
|
|
23313
23313
|
this._chatbotMinimizedElement && (this._chatbotMinimizedElement.removeEventListener("touchstart", this.handleTouchStart), this._chatbotMinimizedElement.removeEventListener("touchmove", this.handleTouchMove), this._chatbotMinimizedElement.removeEventListener("touchend", this.handleTouchEnd), this._isEventDraggableSet = !1);
|
|
23314
23314
|
}, this.handleClick = () => {
|
|
23315
23315
|
var t;
|
|
23316
|
-
this._isClickEventRemoved || (this._isMobileDevice && this.removeMobileEventListener(), (t = this.open) == null || t.call(this));
|
|
23316
|
+
console.log("Chatbot minimized element clicked, _isClickEventRemoved : ", !this._isClickEventRemoved), this._isClickEventRemoved || (this._isMobileDevice && this.removeMobileEventListener(), (t = this.open) == null || t.call(this));
|
|
23317
23317
|
};
|
|
23318
23318
|
}
|
|
23319
23319
|
disconnectedCallback() {
|
|
@@ -23410,7 +23410,7 @@ let It = class extends fe {
|
|
|
23410
23410
|
Jn(this, pi, t);
|
|
23411
23411
|
}
|
|
23412
23412
|
getVersion() {
|
|
23413
|
-
return "LR Chatbot - v0.
|
|
23413
|
+
return "LR Chatbot - v0.38.0";
|
|
23414
23414
|
}
|
|
23415
23415
|
async connectedCallback() {
|
|
23416
23416
|
super.connectedCallback(), this._conversationHistoryTask.run();
|