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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as Handlebars, s as setItemListElement } from './ai12z-search-panel-
|
|
2
|
-
export { A as ai12z_bot, a as ai12z_cta, S as ai12z_search_panel } from './ai12z-search-panel-
|
|
1
|
+
import { H as Handlebars, s as setItemListElement } from './ai12z-search-panel-fe7c8f83.js';
|
|
2
|
+
export { A as ai12z_bot, a as ai12z_cta, S as ai12z_search_panel } from './ai12z-search-panel-fe7c8f83.js';
|
|
3
3
|
import { r as registerInstance, h, F as Fragment, c as createEvent, E as Env, g as getElement } from './index-9f7965fd.js';
|
|
4
4
|
import { a as SearchResult, S as SocketService } from './socket-service-a7dc24ef.js';
|
|
5
5
|
import { s as showdown } from './showdown-c0591a81.js';
|
|
@@ -5146,6 +5146,9 @@ const Ai12zBot = class {
|
|
|
5146
5146
|
const botData = { qCounter: this.questionCounter };
|
|
5147
5147
|
localStorage.setItem(`ai12z-bot-data`, JSON.stringify(botData));
|
|
5148
5148
|
}
|
|
5149
|
+
async openBot() {
|
|
5150
|
+
this.openChat();
|
|
5151
|
+
}
|
|
5149
5152
|
async action(type) {
|
|
5150
5153
|
// this.isChatOpen = !this.isChatOpen
|
|
5151
5154
|
if (type === "open") {
|
|
@@ -5173,6 +5176,14 @@ const Ai12zBot = class {
|
|
|
5173
5176
|
clearInterval(this.timer);
|
|
5174
5177
|
}
|
|
5175
5178
|
}
|
|
5179
|
+
openChat() {
|
|
5180
|
+
this.isOpened = true;
|
|
5181
|
+
this.isExpanded = false;
|
|
5182
|
+
this.isMinimized = false;
|
|
5183
|
+
this.isContent = false;
|
|
5184
|
+
this.open.emit("open");
|
|
5185
|
+
this.toggleTextarea();
|
|
5186
|
+
}
|
|
5176
5187
|
get mainObject() {
|
|
5177
5188
|
if (!window["ai12z"]) {
|
|
5178
5189
|
window["ai12z"] = {};
|
|
@@ -5345,10 +5356,11 @@ const Ai12zBot = class {
|
|
|
5345
5356
|
}
|
|
5346
5357
|
else {
|
|
5347
5358
|
const scriptDom = this.el.shadowRoot.querySelector(`script[type="text/javascript"]`);
|
|
5348
|
-
console.log("scriptDom", scriptDom)
|
|
5349
|
-
console.log("newScript", newScript)
|
|
5359
|
+
// console.log("scriptDom", scriptDom)
|
|
5360
|
+
// console.log("newScript", newScript)
|
|
5350
5361
|
if (scriptDom && !newScript.src) {
|
|
5351
|
-
|
|
5362
|
+
console.log("scriptDom", this.scriptArray);
|
|
5363
|
+
if (this.scriptArray.length > 0) {
|
|
5352
5364
|
this.scriptArray.forEach(script => {
|
|
5353
5365
|
if (!script.src && script.innerHTML !== newScript.innerHTML) {
|
|
5354
5366
|
this.el.shadowRoot.appendChild(newScript);
|
|
@@ -5356,11 +5368,15 @@ const Ai12zBot = class {
|
|
|
5356
5368
|
});
|
|
5357
5369
|
}
|
|
5358
5370
|
else {
|
|
5359
|
-
console.log("ele", this.el.shadowRoot)
|
|
5371
|
+
// console.log("ele", this.el.shadowRoot)
|
|
5360
5372
|
this.el.shadowRoot.appendChild(newScript);
|
|
5361
5373
|
}
|
|
5362
5374
|
// this.el.shadowRoot.appendChild(newScript)
|
|
5363
5375
|
}
|
|
5376
|
+
else {
|
|
5377
|
+
// console.log("scriptDom not found")
|
|
5378
|
+
this.el.shadowRoot.appendChild(newScript);
|
|
5379
|
+
}
|
|
5364
5380
|
}
|
|
5365
5381
|
});
|
|
5366
5382
|
// Step 4: Ensure Google Charts is loaded, then call the `drawGoogleChart` function
|
|
@@ -5984,11 +6000,7 @@ const Ai12zBot = class {
|
|
|
5984
6000
|
pointerEvents: this.isMinimized ? "auto" : "none",
|
|
5985
6001
|
transformOrigin: "50% 50% 0px",
|
|
5986
6002
|
} }, 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: () => {
|
|
5987
|
-
this.
|
|
5988
|
-
this.isExpanded = false;
|
|
5989
|
-
this.isMinimized = false;
|
|
5990
|
-
this.isContent = false;
|
|
5991
|
-
this.toggleTextarea();
|
|
6003
|
+
this.openChat();
|
|
5992
6004
|
} }, h("div", { class: "w-10 h-10 flex items-center justify-center bg-white rounded-full border relative" }, this.botSettings.botLaunchIcon && h("img", { src: this.botSettings.botLaunchIcon, alt: "bot icon", class: "w-8 h-8 rounded-lg" }), !this.botSettings.botLaunchIcon && (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "#2095ae" }, h("g", { "stroke-width": "0" }), h("g", { "stroke-linecap": "round", "stroke-linejoin": "round" }), h("g", null, " ", 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" }), " ")))), h("span", { class: "font-medium text-white" }, "Ask ", (_23 = this.botSettings) === null || _23 === void 0 ? void 0 :
|
|
5993
6005
|
_23.botName)))));
|
|
5994
6006
|
}
|
|
@@ -6581,4 +6593,4 @@ SearchPanel.style = Ai12zSearchPanelStyle0 + Ai12zSearchPanelStyle1;
|
|
|
6581
6593
|
|
|
6582
6594
|
export { Ai12zBot as A, Handlebars as H, SearchPanel as S, Ai12zCta as a, setItemListElement as s };
|
|
6583
6595
|
|
|
6584
|
-
//# sourceMappingURL=ai12z-search-panel-
|
|
6596
|
+
//# sourceMappingURL=ai12z-search-panel-fe7c8f83.js.map
|