@hivegpt/hiveai-angular 0.0.232 → 0.0.234
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/bundles/hivegpt-hiveai-angular.umd.js +41 -11
- package/bundles/hivegpt-hiveai-angular.umd.js.map +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js.map +1 -1
- package/environments/environment.d.ts.map +1 -1
- package/esm2015/environments/environment.js +1 -1
- package/esm2015/hivegpt-hiveai-angular.js +1 -1
- package/esm2015/lib/components/NotificationSocket.js +1 -1
- package/esm2015/lib/components/chat-drawer/chat-drawer.component.js +42 -12
- package/esm2015/lib/components/chatbot/chatbot.component.js +1 -1
- package/esm2015/lib/components/conversation.service.js +1 -1
- package/esm2015/lib/components/socket-service.service.js +1 -1
- package/esm2015/lib/components/video-player/video-player.component.js +1 -1
- package/esm2015/lib/hivegpt.module.js +1 -1
- package/esm2015/lib/models/video.js +1 -1
- package/esm2015/lib/pipes/safe-html.pipe.js +1 -1
- package/esm2015/lib/utils/utils.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/hivegpt-hiveai-angular.js +41 -11
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -1
- package/hivegpt-hiveai-angular.d.ts.map +1 -1
- package/lib/components/NotificationSocket.d.ts.map +1 -1
- package/lib/components/chat-drawer/chat-drawer.component.d.ts.map +1 -1
- package/lib/components/chatbot/chatbot.component.d.ts.map +1 -1
- package/lib/components/conversation.service.d.ts.map +1 -1
- package/lib/components/socket-service.service.d.ts.map +1 -1
- package/lib/components/video-player/video-player.component.d.ts.map +1 -1
- package/lib/hivegpt.module.d.ts.map +1 -1
- package/lib/models/video.d.ts.map +1 -1
- package/lib/pipes/safe-html.pipe.d.ts.map +1 -1
- package/lib/utils/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts.map +1 -1
|
@@ -1467,22 +1467,52 @@
|
|
|
1467
1467
|
if (this.chatLog[idx].liked)
|
|
1468
1468
|
this.chatLog[idx].liked = !this.chatLog[idx].liked;
|
|
1469
1469
|
};
|
|
1470
|
+
// handleCopyClick(index: any) {
|
|
1471
|
+
// // Copy the message to the clipboard
|
|
1472
|
+
// const contentToCopy = this.chatLog[index].message;
|
|
1473
|
+
// console.log('contentToCopy');
|
|
1474
|
+
// console.log(contentToCopy);
|
|
1475
|
+
// navigator.clipboard.writeText(contentToCopy).then(() => {
|
|
1476
|
+
// // Indicate that the message was copied
|
|
1477
|
+
// this.chatLog[index].copied = true;
|
|
1478
|
+
// this.cdr.detectChanges();
|
|
1479
|
+
// // Reset the copied state after a delay
|
|
1480
|
+
// setTimeout(() => {
|
|
1481
|
+
// this.chatLog[index].copied = false;
|
|
1482
|
+
// this.cdr.detectChanges();
|
|
1483
|
+
// }, 2000); // Reset after 2 seconds
|
|
1484
|
+
// });
|
|
1485
|
+
// }
|
|
1470
1486
|
ChatDrawerComponent.prototype.handleCopyClick = function (index) {
|
|
1471
1487
|
var _this = this;
|
|
1472
1488
|
// Copy the message to the clipboard
|
|
1473
1489
|
var contentToCopy = this.chatLog[index].message;
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1490
|
+
var textArea = document.createElement('textarea');
|
|
1491
|
+
textArea.style.position = 'fixed';
|
|
1492
|
+
textArea.style.opacity = '0';
|
|
1493
|
+
textArea.value = contentToCopy;
|
|
1494
|
+
// Append the textarea to the body
|
|
1495
|
+
document.body.appendChild(textArea);
|
|
1496
|
+
// Select the content and copy it to the clipboard
|
|
1497
|
+
textArea.select();
|
|
1498
|
+
document.execCommand('copy');
|
|
1499
|
+
this.chatLog[index].copied = true;
|
|
1500
|
+
this.cdr.detectChanges();
|
|
1501
|
+
// Reset the copied state after a delay
|
|
1502
|
+
setTimeout(function () {
|
|
1503
|
+
_this.chatLog[index].copied = false;
|
|
1479
1504
|
_this.cdr.detectChanges();
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1505
|
+
}, 2000); // Reset after 2 seconds
|
|
1506
|
+
// navigator.clipboard.writeText(contentToCopy).then(() => {
|
|
1507
|
+
// // Indicate that the message was copied
|
|
1508
|
+
// this.chatLog[index].copied = true;
|
|
1509
|
+
// this.cdr.detectChanges();
|
|
1510
|
+
// // Reset the copied state after a delay
|
|
1511
|
+
// setTimeout(() => {
|
|
1512
|
+
// this.chatLog[index].copied = false;
|
|
1513
|
+
// this.cdr.detectChanges();
|
|
1514
|
+
// }, 2000); // Reset after 2 seconds
|
|
1515
|
+
// });
|
|
1486
1516
|
};
|
|
1487
1517
|
ChatDrawerComponent.prototype.scrollToBottom = function () {
|
|
1488
1518
|
var _this = this;
|