@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.
Files changed (33) hide show
  1. package/bundles/hivegpt-hiveai-angular.umd.js +41 -11
  2. package/bundles/hivegpt-hiveai-angular.umd.js.map +1 -1
  3. package/bundles/hivegpt-hiveai-angular.umd.min.js +1 -1
  4. package/bundles/hivegpt-hiveai-angular.umd.min.js.map +1 -1
  5. package/environments/environment.d.ts.map +1 -1
  6. package/esm2015/environments/environment.js +1 -1
  7. package/esm2015/hivegpt-hiveai-angular.js +1 -1
  8. package/esm2015/lib/components/NotificationSocket.js +1 -1
  9. package/esm2015/lib/components/chat-drawer/chat-drawer.component.js +42 -12
  10. package/esm2015/lib/components/chatbot/chatbot.component.js +1 -1
  11. package/esm2015/lib/components/conversation.service.js +1 -1
  12. package/esm2015/lib/components/socket-service.service.js +1 -1
  13. package/esm2015/lib/components/video-player/video-player.component.js +1 -1
  14. package/esm2015/lib/hivegpt.module.js +1 -1
  15. package/esm2015/lib/models/video.js +1 -1
  16. package/esm2015/lib/pipes/safe-html.pipe.js +1 -1
  17. package/esm2015/lib/utils/utils.js +1 -1
  18. package/esm2015/public-api.js +1 -1
  19. package/fesm2015/hivegpt-hiveai-angular.js +41 -11
  20. package/fesm2015/hivegpt-hiveai-angular.js.map +1 -1
  21. package/hivegpt-hiveai-angular.d.ts.map +1 -1
  22. package/lib/components/NotificationSocket.d.ts.map +1 -1
  23. package/lib/components/chat-drawer/chat-drawer.component.d.ts.map +1 -1
  24. package/lib/components/chatbot/chatbot.component.d.ts.map +1 -1
  25. package/lib/components/conversation.service.d.ts.map +1 -1
  26. package/lib/components/socket-service.service.d.ts.map +1 -1
  27. package/lib/components/video-player/video-player.component.d.ts.map +1 -1
  28. package/lib/hivegpt.module.d.ts.map +1 -1
  29. package/lib/models/video.d.ts.map +1 -1
  30. package/lib/pipes/safe-html.pipe.d.ts.map +1 -1
  31. package/lib/utils/utils.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. 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
- console.log('contentToCopy');
1475
- console.log(contentToCopy);
1476
- navigator.clipboard.writeText(contentToCopy).then(function () {
1477
- // Indicate that the message was copied
1478
- _this.chatLog[index].copied = true;
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
- // Reset the copied state after a delay
1481
- setTimeout(function () {
1482
- _this.chatLog[index].copied = false;
1483
- _this.cdr.detectChanges();
1484
- }, 2000); // Reset after 2 seconds
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;