urasoft-live-support 1.1.21 → 1.1.23
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/core/ChatWidget.d.ts.map +1 -1
- package/dist/index.esm.js +23 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -1
- package/dist/styles.css +50 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4399,6 +4399,19 @@ class ChatWidget {
|
|
|
4399
4399
|
}
|
|
4400
4400
|
const wasTyping = this.state.isAgentTyping;
|
|
4401
4401
|
this.state.isAgentTyping = true;
|
|
4402
|
+
// Widget kapalıysa buton üzerinde typing göster
|
|
4403
|
+
if (!this.state.isOpen) {
|
|
4404
|
+
const toggleButton = document.getElementById('chat-toggle-button');
|
|
4405
|
+
if (toggleButton && !wasTyping) {
|
|
4406
|
+
toggleButton.classList.add('chat-button-typing');
|
|
4407
|
+
toggleButton.setAttribute('data-original-icon', toggleButton.innerHTML);
|
|
4408
|
+
toggleButton.innerHTML = `
|
|
4409
|
+
<div class="chat-button-typing-dots">
|
|
4410
|
+
<span></span><span></span><span></span>
|
|
4411
|
+
</div>
|
|
4412
|
+
`;
|
|
4413
|
+
}
|
|
4414
|
+
}
|
|
4402
4415
|
// DOM'u güncelle (tam render yerine)
|
|
4403
4416
|
if (!wasTyping) {
|
|
4404
4417
|
const messagesContainer = document.getElementById('chat-messages');
|
|
@@ -4429,6 +4442,16 @@ class ChatWidget {
|
|
|
4429
4442
|
this.typingDisplayTimer = null;
|
|
4430
4443
|
}
|
|
4431
4444
|
this.state.isAgentTyping = false;
|
|
4445
|
+
// Buton üzerindeki typing göstergesini kaldır
|
|
4446
|
+
const toggleButton = document.getElementById('chat-toggle-button');
|
|
4447
|
+
if (toggleButton) {
|
|
4448
|
+
toggleButton.classList.remove('chat-button-typing');
|
|
4449
|
+
const originalIcon = toggleButton.getAttribute('data-original-icon');
|
|
4450
|
+
if (originalIcon) {
|
|
4451
|
+
toggleButton.innerHTML = originalIcon;
|
|
4452
|
+
toggleButton.removeAttribute('data-original-icon');
|
|
4453
|
+
}
|
|
4454
|
+
}
|
|
4432
4455
|
// DOM'dan typing indicator'ı kaldır
|
|
4433
4456
|
const typingMessage = document.getElementById('chat-typing-message');
|
|
4434
4457
|
if (typingMessage) {
|