embeddedaichatux 1.0.0 → 1.0.3
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/AIChat.npm.csproj +8 -7
- package/EmbeddedChat.js +15 -2
- package/bin/Debug/net7.0/AIChat.npm.deps.json +23 -0
- package/bin/Debug/net7.0/AIChat.npm.dll +0 -0
- package/bin/Debug/net7.0/AIChat.npm.exe +0 -0
- package/bin/Debug/net7.0/AIChat.npm.pdb +0 -0
- package/bin/Debug/net7.0/AIChat.npm.runtimeconfig.json +19 -0
- package/bin/Debug/net7.0/AIChat.npm.staticwebassets.runtime.json +1 -0
- package/bin/Debug/net7.0/appsettings.Development.json +9 -0
- package/bin/Debug/net7.0/appsettings.json +9 -0
- package/bin/Debug/net7.0/package.json +11 -0
- package/obj/Debug/net7.0/AIChat.npm.GeneratedMSBuildEditorConfig.editorconfig +0 -28
- package/obj/Debug/net7.0/AIChat.npm.MvcApplicationPartsAssemblyInfo.cache +0 -0
- package/obj/Debug/net7.0/AIChat.npm.csproj.CoreCompileInputs.cache +1 -0
- package/obj/Debug/net7.0/AIChat.npm.csproj.FileListAbsolute.txt +27 -0
- package/obj/Debug/net7.0/AIChat.npm.dll +0 -0
- package/obj/Debug/net7.0/AIChat.npm.genruntimeconfig.cache +1 -0
- package/obj/Debug/net7.0/AIChat.npm.pdb +0 -0
- package/obj/Debug/net7.0/apphost.exe +0 -0
- package/obj/Debug/net7.0/project.razor.vs.json +1 -1
- package/obj/Debug/net7.0/ref/AIChat.npm.dll +0 -0
- package/obj/Debug/net7.0/refint/AIChat.npm.dll +0 -0
- package/obj/Debug/net7.0/staticwebassets/msbuild.build.AIChat.npm.props +3 -0
- package/obj/Debug/net7.0/staticwebassets/msbuild.buildMultiTargeting.AIChat.npm.props +3 -0
- package/obj/Debug/net7.0/staticwebassets/msbuild.buildTransitive.AIChat.npm.props +3 -0
- package/obj/Debug/net7.0/staticwebassets.build.json +19 -0
- package/obj/Debug/net7.0/staticwebassets.development.json +1 -0
- package/obj/Release/net7.0/.NETCoreApp,Version=v7.0.AssemblyAttributes.cs +4 -0
- package/obj/Release/net7.0/AIChat.npm.AssemblyInfo.cs +23 -0
- package/obj/Release/net7.0/AIChat.npm.AssemblyInfoInputs.cache +1 -0
- package/obj/Release/net7.0/AIChat.npm.GeneratedMSBuildEditorConfig.editorconfig +17 -0
- package/obj/Release/net7.0/AIChat.npm.GlobalUsings.g.cs +17 -0
- package/obj/Release/net7.0/AIChat.npm.assets.cache +0 -0
- package/package.json +1 -1
- package/Pages/Error.cshtml +0 -26
- package/Pages/Error.cshtml.cs +0 -27
- package/Pages/Index.cshtml +0 -10
- package/Pages/Index.cshtml.cs +0 -20
- package/Pages/Privacy.cshtml +0 -8
- package/Pages/Privacy.cshtml.cs +0 -19
- package/Pages/Shared/_Layout.cshtml +0 -51
- package/Pages/Shared/_Layout.cshtml.css +0 -48
- package/Pages/Shared/_ValidationScriptsPartial.cshtml +0 -2
- package/Pages/_ViewImports.cshtml +0 -3
- package/Pages/_ViewStart.cshtml +0 -3
- package/wwwroot/css/site.css +0 -22
- package/wwwroot/favicon.ico +0 -0
- package/wwwroot/js/site.js +0 -4
- package/wwwroot/lib/bootstrap/LICENSE +0 -22
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css +0 -4997
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css +0 -7
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css +0 -4996
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css +0 -7
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css +0 -427
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css +0 -8
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css +0 -424
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css +0 -8
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css +0 -4866
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css +0 -7
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css +0 -4857
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css +0 -7
- package/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap.css +0 -11221
- package/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css +0 -7
- package/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css +0 -11197
- package/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css +0 -7
- package/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map +0 -1
- package/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js +0 -6780
- package/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map +0 -1
- package/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js +0 -7
- package/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map +0 -1
- package/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js +0 -4977
- package/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map +0 -1
- package/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js +0 -7
- package/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map +0 -1
- package/wwwroot/lib/bootstrap/dist/js/bootstrap.js +0 -5026
- package/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map +0 -1
- package/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js +0 -7
- package/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map +0 -1
- package/wwwroot/lib/jquery/LICENSE.txt +0 -21
- package/wwwroot/lib/jquery/dist/jquery.js +0 -10881
- package/wwwroot/lib/jquery/dist/jquery.min.js +0 -2
- package/wwwroot/lib/jquery/dist/jquery.min.map +0 -1
- package/wwwroot/lib/jquery-validation/LICENSE.md +0 -22
- package/wwwroot/lib/jquery-validation/dist/additional-methods.js +0 -1158
- package/wwwroot/lib/jquery-validation/dist/additional-methods.min.js +0 -4
- package/wwwroot/lib/jquery-validation/dist/jquery.validate.js +0 -1601
- package/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js +0 -4
- package/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt +0 -23
- package/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js +0 -435
- package/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js +0 -8
package/AIChat.npm.csproj
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
1
|
+
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
2
2
|
|
|
3
3
|
<PropertyGroup>
|
|
4
4
|
<TargetFramework>net7.0</TargetFramework>
|
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
7
7
|
</PropertyGroup>
|
|
8
8
|
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
|
|
9
|
+
<Target Name="CopyCommonWebFiles" BeforeTargets="Build">
|
|
10
|
+
<ItemGroup>
|
|
11
|
+
<_CommonWebJsFiles Include="..\AIChat.Web\wwwroot\js\EmbeddedChat.js" />
|
|
12
|
+
</ItemGroup>
|
|
13
|
+
|
|
14
|
+
<Copy SourceFiles="@(_CommonWebJsFiles)" DestinationFolder="$(MSBuildProjectDirectory)" SkipUnchangedFiles="true" />
|
|
15
|
+
</Target>
|
|
12
16
|
|
|
13
|
-
<ItemGroup>
|
|
14
|
-
<Content Include="EmbeddedChat.js" />
|
|
15
|
-
</ItemGroup>
|
|
16
17
|
|
|
17
18
|
</Project>
|
package/EmbeddedChat.js
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
// embeddedChat.js
|
|
1
|
+
// embeddedChat.js
|
|
2
2
|
class EmbeddedChat {
|
|
3
3
|
constructor(containerDiv, chatId, options) {
|
|
4
|
+
if (!containerDiv) {
|
|
5
|
+
containerDiv = this.createChatContainer();
|
|
6
|
+
}
|
|
4
7
|
this.containerDiv = containerDiv;
|
|
5
8
|
this.chatId = chatId;
|
|
6
9
|
this.options = options || {};
|
|
7
10
|
this.avatarImage = this.options.avatarImage || '/img/avatar.jpg';
|
|
8
11
|
this.isPreview = this.options.isPreview || false;
|
|
9
12
|
this.previewParam = this.isPreview ? "?isPreview=true" : "";
|
|
13
|
+
this.serverUrl = this.options.serverUrl || 'https://embedgpt.chat';
|
|
14
|
+
this.positionStyle = this.containerDiv.dataset.position === 'in-place' ? 'width:100%; height:600px' : 'position: fixed; right: 0; bottom: 0; width: 300px; height: 600px';
|
|
10
15
|
this.init();
|
|
11
16
|
}
|
|
12
17
|
|
|
13
18
|
init() {
|
|
14
19
|
const iframeHtml = `
|
|
15
|
-
<iframe id="embedded-chat" style="display: none;
|
|
20
|
+
<iframe id="embedded-chat" style="${this.positionStyle}; display: none; border:none; overflow:hidden;" frameborder="0" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" src="${this.serverUrl}/ChatUX/${this.chatId}${this.previewParam}"></iframe>
|
|
16
21
|
<div id="embedded-chat-minimized" class="container" style="display: none;; color:#43636e;width:100%; position: fixed; right: 0; bottom: 0; width: 300px; height: 50px; padding-top: 10px;padding-left: 100px;">
|
|
17
22
|
<img title="Chat" src="${this.avatarImage}" style="height:40px; border-radius: 50%;" />
|
|
18
23
|
<button id="embedded-chat-now" class="btn btn-primary">Chat Now</button>
|
|
@@ -39,6 +44,14 @@ class EmbeddedChat {
|
|
|
39
44
|
}
|
|
40
45
|
});
|
|
41
46
|
}
|
|
47
|
+
|
|
48
|
+
createChatContainer() {
|
|
49
|
+
const chatContainer = document.createElement('div');
|
|
50
|
+
chatContainer.className = 'embedded-chat-container';
|
|
51
|
+
chatContainer.style.position = 'relative';
|
|
52
|
+
document.body.appendChild(chatContainer);
|
|
53
|
+
return chatContainer;
|
|
54
|
+
}
|
|
42
55
|
}
|
|
43
56
|
|
|
44
57
|
export function initEmbeddedChat(containerDiv, chatId, options) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runtimeTarget": {
|
|
3
|
+
"name": ".NETCoreApp,Version=v7.0",
|
|
4
|
+
"signature": ""
|
|
5
|
+
},
|
|
6
|
+
"compilationOptions": {},
|
|
7
|
+
"targets": {
|
|
8
|
+
".NETCoreApp,Version=v7.0": {
|
|
9
|
+
"AIChat.npm/1.0.0": {
|
|
10
|
+
"runtime": {
|
|
11
|
+
"AIChat.npm.dll": {}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"libraries": {
|
|
17
|
+
"AIChat.npm/1.0.0": {
|
|
18
|
+
"type": "project",
|
|
19
|
+
"serviceable": false,
|
|
20
|
+
"sha512": ""
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runtimeOptions": {
|
|
3
|
+
"tfm": "net7.0",
|
|
4
|
+
"frameworks": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Microsoft.NETCore.App",
|
|
7
|
+
"version": "7.0.0"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "Microsoft.AspNetCore.App",
|
|
11
|
+
"version": "7.0.0"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"configProperties": {
|
|
15
|
+
"System.GC.Server": true,
|
|
16
|
+
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ContentRoots":["C:\\Git\\AIChat\\AIChat.npm\\wwwroot\\"],"Root":{"Children":null,"Asset":null,"Patterns":[{"ContentRootIndex":0,"Pattern":"**","Depth":0}]}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "embeddedaichatux",
|
|
3
|
+
"version": "1.0.2",
|
|
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
|
+
"main": "EmbeddedChat.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"author": "EmbedGPT.chat, LLC",
|
|
10
|
+
"license": "MIT"
|
|
11
|
+
}
|
|
@@ -15,31 +15,3 @@ build_property.SupportLocalizedComponentNames =
|
|
|
15
15
|
build_property.GenerateRazorMetadataSourceChecksumAttributes =
|
|
16
16
|
build_property.MSBuildProjectDirectory = C:\Git\AIChat\AIChat.npm
|
|
17
17
|
build_property._RazorSourceGeneratorDebug =
|
|
18
|
-
|
|
19
|
-
[C:/Git/AIChat/AIChat.npm/Pages/Error.cshtml]
|
|
20
|
-
build_metadata.AdditionalFiles.TargetPath = UGFnZXNcRXJyb3IuY3NodG1s
|
|
21
|
-
build_metadata.AdditionalFiles.CssScope =
|
|
22
|
-
|
|
23
|
-
[C:/Git/AIChat/AIChat.npm/Pages/Index.cshtml]
|
|
24
|
-
build_metadata.AdditionalFiles.TargetPath = UGFnZXNcSW5kZXguY3NodG1s
|
|
25
|
-
build_metadata.AdditionalFiles.CssScope =
|
|
26
|
-
|
|
27
|
-
[C:/Git/AIChat/AIChat.npm/Pages/Privacy.cshtml]
|
|
28
|
-
build_metadata.AdditionalFiles.TargetPath = UGFnZXNcUHJpdmFjeS5jc2h0bWw=
|
|
29
|
-
build_metadata.AdditionalFiles.CssScope =
|
|
30
|
-
|
|
31
|
-
[C:/Git/AIChat/AIChat.npm/Pages/Shared/_ValidationScriptsPartial.cshtml]
|
|
32
|
-
build_metadata.AdditionalFiles.TargetPath = UGFnZXNcU2hhcmVkXF9WYWxpZGF0aW9uU2NyaXB0c1BhcnRpYWwuY3NodG1s
|
|
33
|
-
build_metadata.AdditionalFiles.CssScope =
|
|
34
|
-
|
|
35
|
-
[C:/Git/AIChat/AIChat.npm/Pages/_ViewImports.cshtml]
|
|
36
|
-
build_metadata.AdditionalFiles.TargetPath = UGFnZXNcX1ZpZXdJbXBvcnRzLmNzaHRtbA==
|
|
37
|
-
build_metadata.AdditionalFiles.CssScope =
|
|
38
|
-
|
|
39
|
-
[C:/Git/AIChat/AIChat.npm/Pages/_ViewStart.cshtml]
|
|
40
|
-
build_metadata.AdditionalFiles.TargetPath = UGFnZXNcX1ZpZXdTdGFydC5jc2h0bWw=
|
|
41
|
-
build_metadata.AdditionalFiles.CssScope =
|
|
42
|
-
|
|
43
|
-
[C:/Git/AIChat/AIChat.npm/Pages/Shared/_Layout.cshtml]
|
|
44
|
-
build_metadata.AdditionalFiles.TargetPath = UGFnZXNcU2hhcmVkXF9MYXlvdXQuY3NodG1s
|
|
45
|
-
build_metadata.AdditionalFiles.CssScope = b-awln15mgxz
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2a2fbdc06e3060ecc072244ebc14fc81cb280367
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
C:\Git\AIChat\AIChat.npm\bin\Debug\net7.0\appsettings.Development.json
|
|
2
|
+
C:\Git\AIChat\AIChat.npm\bin\Debug\net7.0\appsettings.json
|
|
3
|
+
C:\Git\AIChat\AIChat.npm\bin\Debug\net7.0\package.json
|
|
4
|
+
C:\Git\AIChat\AIChat.npm\bin\Debug\net7.0\AIChat.npm.staticwebassets.runtime.json
|
|
5
|
+
C:\Git\AIChat\AIChat.npm\bin\Debug\net7.0\AIChat.npm.exe
|
|
6
|
+
C:\Git\AIChat\AIChat.npm\bin\Debug\net7.0\AIChat.npm.deps.json
|
|
7
|
+
C:\Git\AIChat\AIChat.npm\bin\Debug\net7.0\AIChat.npm.runtimeconfig.json
|
|
8
|
+
C:\Git\AIChat\AIChat.npm\bin\Debug\net7.0\AIChat.npm.dll
|
|
9
|
+
C:\Git\AIChat\AIChat.npm\bin\Debug\net7.0\AIChat.npm.pdb
|
|
10
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\AIChat.npm.GeneratedMSBuildEditorConfig.editorconfig
|
|
11
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\AIChat.npm.AssemblyInfoInputs.cache
|
|
12
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\AIChat.npm.AssemblyInfo.cs
|
|
13
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\AIChat.npm.csproj.CoreCompileInputs.cache
|
|
14
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\AIChat.npm.MvcApplicationPartsAssemblyInfo.cache
|
|
15
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\staticwebassets\msbuild.AIChat.npm.Microsoft.AspNetCore.StaticWebAssets.props
|
|
16
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\staticwebassets\msbuild.build.AIChat.npm.props
|
|
17
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\staticwebassets\msbuild.buildMultiTargeting.AIChat.npm.props
|
|
18
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\staticwebassets\msbuild.buildTransitive.AIChat.npm.props
|
|
19
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\staticwebassets.pack.json
|
|
20
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\staticwebassets.build.json
|
|
21
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\staticwebassets.development.json
|
|
22
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\scopedcss\bundle\AIChat.npm.styles.css
|
|
23
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\AIChat.npm.dll
|
|
24
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\refint\AIChat.npm.dll
|
|
25
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\AIChat.npm.pdb
|
|
26
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\AIChat.npm.genruntimeconfig.cache
|
|
27
|
+
C:\Git\AIChat\AIChat.npm\obj\Debug\net7.0\ref\AIChat.npm.dll
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
217eab89b7f2a33f574c6a7af7227b8396c4f9d7
|
|
Binary file
|
|
Binary file
|