embeddedaichatux 1.1.0 → 1.2.1

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 (2) hide show
  1. package/EmbeddedChat.js +2 -11
  2. package/package.json +1 -1
package/EmbeddedChat.js CHANGED
@@ -11,7 +11,7 @@ class EmbeddedChat {
11
11
  this.previewParam = this.isPreview ? "?isPreview=true" : "";
12
12
  this.serverUrl = this.options.serverUrl || 'https://embedgpt.chat/';
13
13
  this.positionStyle = this.containerDiv.dataset.position === 'in-place' ? 'width:100%; height:600px' : 'position: fixed; right: 0; bottom: 0; width: 300px; height: 600px; z-index: 100000';
14
- this.mode = this.options.mode || 'Chat'; // default to 'Chat' if mode isn't provided
14
+ this.mode = options.mode || 'Chat'; // default to 'chat' if mode isn't provided
15
15
  if (this.mode === 'ContactForm') {
16
16
  // Adjust position style for contact form if mode is 'ContactForm'
17
17
  this.positionStyle = 'width:100%; height:600px';
@@ -71,16 +71,7 @@ init() {
71
71
  });
72
72
  }
73
73
 
74
- showChat() {
75
- if (this.iframe) {
76
- this.iframe.style.display = "block";
77
- this.minimizedIframe.style.display = "none";
78
- }
79
- if (this.minimizedIframe) {
80
- this.minimizedIframe.style.display = "block";
81
- this.iframe.style.display = "none";
82
- }
83
- }
74
+
84
75
 
85
76
  createChatContainer() {
86
77
  const chatContainer = document.createElement('div');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "embeddedaichatux",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "A lightweight and customizable embedded AI chat UI component that seamlessly integrates into web applications, offering minimized and expanded views, with iframe-based content rendering.",
5
5
  "main": "EmbeddedChat.js",
6
6
  "scripts": {