ai12z 3.0.11 → 3.0.13
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/cjs/ai12z-bot_12.cjs.entry.js +1 -1
- package/dist/cjs/{ai12z-search-panel-6eae888f.js → ai12z-search-panel-5fa6b9fc.js} +22 -10
- package/dist/cjs/ai12z-search-panel-5fa6b9fc.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/library.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ai12z-bot/ai12z-bot.js +38 -9
- package/dist/collection/components/ai12z-bot/ai12z-bot.js.map +1 -1
- package/dist/esm/ai12z-bot_12.entry.js +2 -2
- package/dist/esm/{ai12z-search-panel-f28ffd09.js → ai12z-search-panel-fe7c8f83.js} +22 -10
- package/dist/esm/ai12z-search-panel-fe7c8f83.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/library.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/library/index.esm.js +1 -1
- package/dist/library/library.esm.js +1 -1
- package/dist/library/library.esm.js.map +1 -1
- package/dist/library/{p-37f9d283.js → p-0df5c0b4.js} +2 -2
- package/dist/library/p-0df5c0b4.js.map +1 -0
- package/dist/library/{p-8a19176f.entry.js → p-95e055ba.entry.js} +2 -2
- package/dist/types/components/ai12z-bot/ai12z-bot.d.ts +2 -0
- package/dist/types/components.d.ts +1 -0
- package/package.json +2 -2
- package/dist/cjs/ai12z-search-panel-6eae888f.js.map +0 -1
- package/dist/esm/ai12z-search-panel-f28ffd09.js.map +0 -1
- package/dist/library/p-37f9d283.js.map +0 -1
- /package/dist/library/{p-8a19176f.entry.js.map → p-95e055ba.entry.js.map} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const ai12zSearchPanel = require('./ai12z-search-panel-
|
|
5
|
+
const ai12zSearchPanel = require('./ai12z-search-panel-5fa6b9fc.js');
|
|
6
6
|
const index = require('./index-171f7ecf.js');
|
|
7
7
|
const socketService = require('./socket-service-fa78b351.js');
|
|
8
8
|
const showdown = require('./showdown-b9a60008.js');
|
|
@@ -5168,6 +5168,9 @@ const Ai12zBot = class {
|
|
|
5168
5168
|
const botData = { qCounter: this.questionCounter };
|
|
5169
5169
|
localStorage.setItem(`ai12z-bot-data`, JSON.stringify(botData));
|
|
5170
5170
|
}
|
|
5171
|
+
async openBot() {
|
|
5172
|
+
this.openChat();
|
|
5173
|
+
}
|
|
5171
5174
|
async action(type) {
|
|
5172
5175
|
// this.isChatOpen = !this.isChatOpen
|
|
5173
5176
|
if (type === "open") {
|
|
@@ -5195,6 +5198,14 @@ const Ai12zBot = class {
|
|
|
5195
5198
|
clearInterval(this.timer);
|
|
5196
5199
|
}
|
|
5197
5200
|
}
|
|
5201
|
+
openChat() {
|
|
5202
|
+
this.isOpened = true;
|
|
5203
|
+
this.isExpanded = false;
|
|
5204
|
+
this.isMinimized = false;
|
|
5205
|
+
this.isContent = false;
|
|
5206
|
+
this.open.emit("open");
|
|
5207
|
+
this.toggleTextarea();
|
|
5208
|
+
}
|
|
5198
5209
|
get mainObject() {
|
|
5199
5210
|
if (!window["ai12z"]) {
|
|
5200
5211
|
window["ai12z"] = {};
|
|
@@ -5367,10 +5378,11 @@ const Ai12zBot = class {
|
|
|
5367
5378
|
}
|
|
5368
5379
|
else {
|
|
5369
5380
|
const scriptDom = this.el.shadowRoot.querySelector(`script[type="text/javascript"]`);
|
|
5370
|
-
console.log("scriptDom", scriptDom)
|
|
5371
|
-
console.log("newScript", newScript)
|
|
5381
|
+
// console.log("scriptDom", scriptDom)
|
|
5382
|
+
// console.log("newScript", newScript)
|
|
5372
5383
|
if (scriptDom && !newScript.src) {
|
|
5373
|
-
|
|
5384
|
+
console.log("scriptDom", this.scriptArray);
|
|
5385
|
+
if (this.scriptArray.length > 0) {
|
|
5374
5386
|
this.scriptArray.forEach(script => {
|
|
5375
5387
|
if (!script.src && script.innerHTML !== newScript.innerHTML) {
|
|
5376
5388
|
this.el.shadowRoot.appendChild(newScript);
|
|
@@ -5378,11 +5390,15 @@ const Ai12zBot = class {
|
|
|
5378
5390
|
});
|
|
5379
5391
|
}
|
|
5380
5392
|
else {
|
|
5381
|
-
console.log("ele", this.el.shadowRoot)
|
|
5393
|
+
// console.log("ele", this.el.shadowRoot)
|
|
5382
5394
|
this.el.shadowRoot.appendChild(newScript);
|
|
5383
5395
|
}
|
|
5384
5396
|
// this.el.shadowRoot.appendChild(newScript)
|
|
5385
5397
|
}
|
|
5398
|
+
else {
|
|
5399
|
+
// console.log("scriptDom not found")
|
|
5400
|
+
this.el.shadowRoot.appendChild(newScript);
|
|
5401
|
+
}
|
|
5386
5402
|
}
|
|
5387
5403
|
});
|
|
5388
5404
|
// Step 4: Ensure Google Charts is loaded, then call the `drawGoogleChart` function
|
|
@@ -6006,11 +6022,7 @@ const Ai12zBot = class {
|
|
|
6006
6022
|
pointerEvents: this.isMinimized ? "auto" : "none",
|
|
6007
6023
|
transformOrigin: "50% 50% 0px",
|
|
6008
6024
|
} }, index.h("button", { class: "rounded-full flex cursor-pointer items-center pr-[14px] md:gap-x-3 focus:outline focus:outline-2 focus:outline-offset-2 focus:outline-blue-focused", tabindex: "0", onClick: () => {
|
|
6009
|
-
this.
|
|
6010
|
-
this.isExpanded = false;
|
|
6011
|
-
this.isMinimized = false;
|
|
6012
|
-
this.isContent = false;
|
|
6013
|
-
this.toggleTextarea();
|
|
6025
|
+
this.openChat();
|
|
6014
6026
|
} }, index.h("div", { class: "w-10 h-10 flex items-center justify-center bg-white rounded-full border relative" }, this.botSettings.botLaunchIcon && index.h("img", { src: this.botSettings.botLaunchIcon, alt: "bot icon", class: "w-8 h-8 rounded-lg" }), !this.botSettings.botLaunchIcon && (index.h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "#2095ae" }, index.h("g", { "stroke-width": "0" }), index.h("g", { "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("g", null, " ", index.h("path", { d: "M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z", stroke: "#2095ae", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), " ")))), index.h("span", { class: "font-medium text-white" }, "Ask ", (_23 = this.botSettings) === null || _23 === void 0 ? void 0 :
|
|
6015
6027
|
_23.botName)))));
|
|
6016
6028
|
}
|
|
@@ -6607,4 +6619,4 @@ exports.Handlebars = Handlebars;
|
|
|
6607
6619
|
exports.SearchPanel = SearchPanel;
|
|
6608
6620
|
exports.setItemListElement = setItemListElement;
|
|
6609
6621
|
|
|
6610
|
-
//# sourceMappingURL=ai12z-search-panel-
|
|
6622
|
+
//# sourceMappingURL=ai12z-search-panel-5fa6b9fc.js.map
|