@gengage/assistant-fe 0.4.21 → 0.5.0
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/README.md +1 -1
- package/dist/{api-paths-Bg6iwO5w.js → api-paths-y5nkfEBG.js} +1 -1
- package/dist/chat-runtime.js +1 -1
- package/dist/chat.iife.js +43 -43
- package/dist/chat.js +1 -1
- package/dist/common-BKPSOoIP.js +324 -0
- package/dist/common.js +64 -81
- package/dist/{connection-warning-BeD-B0Ec.js → connection-warning-DJiyLM46.js} +1 -1
- package/dist/{fastIntent-BeeDIwd2.js → fastIntent-1T2g9art.js} +2 -2
- package/dist/index.js +49 -52
- package/dist/{native-webview-Bbcvvi_5.js → native-webview-y3a9R9hH.js} +1 -1
- package/dist/native.iife.js +23 -23
- package/dist/native.js +1 -1
- package/dist/{overlay-O4nlUrzw.js → overlay-v3nvcGlE.js} +2 -5
- package/dist/overlay.js +2 -2
- package/dist/qna-runtime.js +1 -1
- package/dist/qna.iife.js +36 -36
- package/dist/qna.js +1 -1
- package/dist/{runtime-C8ZBidd2.js → runtime-BMNOS2Mq.js} +176 -196
- package/dist/runtime-DOS9yRRx.js +650 -0
- package/dist/{runtime-Ct1qOl8V.js → runtime-DsP6go8z.js} +2194 -2225
- package/dist/{simbut-BrAeZ6SH.js → simbut-BwxzoBcY.js} +7 -7
- package/dist/simbut.iife.js +12 -12
- package/dist/simbut.js +1 -1
- package/dist/{simrel-Cha5de6P.js → simrel-C07wZN8Q.js} +2 -2
- package/dist/simrel-runtime.js +1 -1
- package/dist/simrel.iife.js +35 -35
- package/dist/simrel.js +2 -2
- package/dist/widget-base-Dliq3QAf.js +362 -0
- package/package.json +1 -2
- package/dist/common-DDJSeQhg.js +0 -491
- package/dist/runtime-CRSFPLku.js +0 -688
- package/dist/widget-base-BtBl_PCR.js +0 -589
- /package/dist/{context-DGz5F81j.js → context-BBuSsXZ9.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { A as m, D as h, _ as u, j as f, v as p } from "./context-BBuSsXZ9.js";
|
|
2
|
+
import { t as b } from "./widget-base-Dliq3QAf.js";
|
|
3
3
|
import { t as y } from "./locale-CfqNifrU.js";
|
|
4
4
|
var g = { findSimilarLabel: "Benzerlerini Bul" }, _ = { findSimilarLabel: "Find Similar" };
|
|
5
5
|
function S(t, n) {
|
|
@@ -9,7 +9,7 @@ function d(t) {
|
|
|
9
9
|
const n = typeof t.sku == "string" && t.sku.length > 0 ? t.sku : void 0, i = typeof t.pageContext?.sku == "string" && t.pageContext.sku.length > 0 ? t.pageContext.sku : void 0;
|
|
10
10
|
return n ?? i;
|
|
11
11
|
}
|
|
12
|
-
var C = class extends
|
|
12
|
+
var C = class extends b {
|
|
13
13
|
constructor(...t) {
|
|
14
14
|
super(...t), this._button = null, this._inlineFrame = null, this._label = g.findSimilarLabel;
|
|
15
15
|
}
|
|
@@ -26,8 +26,8 @@ var C = class extends m {
|
|
|
26
26
|
l.stopPropagation();
|
|
27
27
|
const s = d(this.config);
|
|
28
28
|
if (!s) return;
|
|
29
|
-
const a = this.config.imageUrl, o = typeof a == "string" &&
|
|
30
|
-
if (
|
|
29
|
+
const a = this.config.imageUrl, o = typeof a == "string" && f(a) ? a : void 0;
|
|
30
|
+
if (h(this._label, "findSimilar"), u(s), this.config.onFindSimilar) {
|
|
31
31
|
this.config.onFindSimilar(o ? {
|
|
32
32
|
sku: s,
|
|
33
33
|
imageUrl: o
|
|
@@ -46,7 +46,7 @@ var C = class extends m {
|
|
|
46
46
|
const l = this._createInlineCard(t, i);
|
|
47
47
|
this._inlineFrame = l, this.root.appendChild(l);
|
|
48
48
|
} else this.root.appendChild(i);
|
|
49
|
-
c(),
|
|
49
|
+
c(), p("simbut");
|
|
50
50
|
}
|
|
51
51
|
_createInlineCard(t, n) {
|
|
52
52
|
const i = t.inlineCard, c = typeof i?.title == "string" ? i.title.trim() : "", l = typeof i?.description == "string" ? i.description.trim() : "", s = typeof i?.imageUrl == "string" ? i.imageUrl.trim() : "", a = document.createElement("section");
|
|
@@ -62,7 +62,7 @@ var C = class extends m {
|
|
|
62
62
|
}
|
|
63
63
|
o.children.length > 0 && a.appendChild(o);
|
|
64
64
|
const r = document.createElement("div");
|
|
65
|
-
if (r.className = "gengage-simbut-inline-action", r.dataset.gengagePart = "simbut-inline-action", r.appendChild(n), a.appendChild(r), s &&
|
|
65
|
+
if (r.className = "gengage-simbut-inline-action", r.dataset.gengagePart = "simbut-inline-action", r.appendChild(n), a.appendChild(r), s && m(s)) {
|
|
66
66
|
const e = document.createElement("img");
|
|
67
67
|
e.className = "gengage-simbut-inline-image", e.dataset.gengagePart = "simbut-inline-image", e.src = s, e.alt = typeof i?.imageAlt == "string" ? i.imageAlt : "", e.loading = "lazy", e.addEventListener("error", () => {
|
|
68
68
|
e.style.display = "none";
|
package/dist/simbut.iife.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
(function(m){Object.defineProperty(m,Symbol.toStringTag,{value:"Module"});
|
|
2
|
-
#${
|
|
1
|
+
(function(m){Object.defineProperty(m,Symbol.toStringTag,{value:"Module"});var y=["http:","https:"];function I(e){const t=e.trim();if(!t)return!1;if(t.startsWith("/")&&!t.startsWith("//"))return!0;try{return y.includes(new URL(t).protocol)}catch{return!1}}function L(e){if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{const t=new URL(e);return y.includes(t.protocol)}catch{return!1}}function T(){return typeof window<"u"&&Array.isArray(window.dataLayer)}function p(e,t){const i={event:e,...t};T()&&window.dataLayer.push(i)}function k(e){p("gengage-on-init",{gengage_widget:e})}function F(e,t){p("gengage-suggested-question",{gengage_question_title:e,gengage_action_type:t})}function R(e){p("gengage-find-similars",{gengage_sku:e})}function x(e,t){const i=n=>{t(n.detail)};return window.addEventListener(e,i),()=>window.removeEventListener(e,i)}function M(){const e=window.__gengageSessionId??sessionStorage.getItem("gengage_session_id")??null??crypto.randomUUID();return window.__gengageSessionId=e,sessionStorage.setItem("gengage_session_id",e),window.gengage||(window.gengage={}),window.gengage.sessionId=e,e}function N(e){return{sessionId:e?.sessionId??M(),...e}}var _={"--gengage-chat-offset":"20px","--gengage-chat-launcher-width":"56px","--gengage-chat-launcher-height":"56px","--gengage-chat-width":"400px","--gengage-chat-shell-radius":"1rem","--gengage-chat-header-height":"72px","--gengage-chat-conversation-width":"396px","--gengage-chat-panel-min-width":"320px","--gengage-chat-panel-max-width":"1200px","--gengage-chat-input-height":"48px","--gengage-qna-pill-radius":"999px","--gengage-qna-input-radius":"12px","--gengage-simrel-card-radius":"0.75rem","--radius-control":"12px","--radius-card":"16px","--radius-panel":"24px","--radius-pill":"999px","--surface-card-muted":"#f8fafc","--text-secondary":"#4b5563","--text-muted":"#6b7280","--border-default":"rgba(17, 24, 39, 0.10)"};function U(e){if(!e)return{..._};const t={..._,...e},i=e["--gengage-chat-launcher-size"];return i!==void 0&&(e["--gengage-chat-launcher-width"]===void 0&&(t["--gengage-chat-launcher-width"]=i),e["--gengage-chat-launcher-height"]===void 0&&(t["--gengage-chat-launcher-height"]=i)),t}var l={primaryColor:"#b7102a",primaryForeground:"#ffffff",backgroundColor:"#ffffff",foregroundColor:"#111827",borderRadius:"0.75rem",fontFamily:'"Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"14px",zIndex:"1000","--glov-chatbot-width":"420px","--glov-left-spacing":"260px","--chatbot-padding":"16px","--root-wrapper-background-color":"#f8f9fa","--root-wrapper-border-color":"#edeeef","--gengage-chat-width":"400px","--gengage-chat-shell-radius":"1rem","--gengage-chat-header-height":"72px","--gengage-chat-conversation-width":"396px","--gengage-chat-panel-min-width":"320px","--gengage-chat-panel-max-width":"1200px","--gengage-chat-input-height":"48px","--gengage-qna-pill-radius":"999px","--gengage-qna-input-radius":"0.75rem","--gengage-simrel-card-radius":"0.75rem","--client-primary":"#b7102a","--client-primary-hover":"color-mix(in srgb, #b7102a 88%, black 12%)","--client-primary-active":"color-mix(in srgb, #b7102a 78%, black 22%)","--client-primary-subtle":"color-mix(in srgb, #b7102a 12%, white)","--client-primary-soft":"color-mix(in srgb, #b7102a 20%, white)","--client-on-primary":"#ffffff","--client-focus-ring":"color-mix(in srgb, #b7102a 32%, transparent)","--surface-page":"#f6f7fb","--surface-shell":"#10131a","--surface-card":"#ffffff","--surface-card-muted":"#f8fafc","--surface-card-soft":"#f8fafc","--surface-elevated":"#ffffff","--surface-input":"#ffffff","--surface-overlay":"rgba(16, 19, 26, 0.52)","--text-primary":"#111827","--text-secondary":"#4b5563","--text-muted":"#6b7280","--text-inverse":"#f9fafb","--border-subtle":"rgba(17, 24, 39, 0.06)","--border-default":"rgba(17, 24, 39, 0.10)","--border-strong":"rgba(17, 24, 39, 0.18)","--shadow-1":"0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06)","--shadow-2":"0 4px 12px rgba(16, 24, 40, 0.08)","--shadow-3":"0 10px 24px rgba(16, 24, 40, 0.12)","--radius-control":"12px","--radius-card":"16px","--radius-panel":"24px","--radius-pill":"999px","--success":"#16a34a","--warning":"#d97706","--error":"#dc2626","--info":"#2563eb","--rating":"#f5b301","--ai-accent-start":"#0b24d6","--ai-accent-end":"#f768f2","--ai-accent-soft":"linear-gradient(135deg, rgba(11, 36, 214, 0.08), rgba(247, 104, 242, 0.08))"},d="gengage-global-toast-root",w="gengage-global-toast-style",b="gengage-global-toast-root--visible",$=4200,A=1500,B=15e3,D=["--gengage-font-family","--surface-card","--text-primary","--text-muted","--border-default","--radius-card","--shadow-3","--error","--ds-toast-error-bg","--ds-toast-error-border","--ds-toast-error-accent","--ds-toast-error-fg","--ds-toast-error-shadow"],v=!1,c=null;function O(){v||typeof window>"u"||typeof document>"u"||(v=!0,x("gengage:global:error",e=>{G(e)}))}function G(e){if(typeof document>"u")return;const t=e.message.trim();if(!t)return;z();const i=V();H(i),i.innerHTML="";const n=document.createElement("section");n.className="gengage-global-toast gengage-global-toast--error",n.setAttribute("role","status"),n.setAttribute("aria-live","polite");const r=document.createElement("div");r.className="gengage-global-toast-title",r.textContent=P(e.source);const s=document.createElement("div");s.className="gengage-global-toast-message",s.textContent=t,n.appendChild(r),n.appendChild(s),i.appendChild(n),i.classList.add(b),c&&(clearTimeout(c),c=null),e.sticky!==!0&&(c=setTimeout(()=>{W()},q(e.durationMs)))}function W(){if(typeof document>"u")return;const e=document.getElementById(d);e&&(e.classList.remove(b),e.innerHTML="",c&&(clearTimeout(c),c=null))}function P(e){switch(e){case"chat":return"Chat warning";case"qna":return"QnA warning";case"simrel":return"Widget warning";default:return"Connection warning"}}function V(){const e=document.getElementById(d);if(e instanceof HTMLElement)return e;const t=document.createElement("div");return t.id=d,t.className="gengage-global-toast-root",document.body.appendChild(t),t}function H(e){if(typeof document>"u"||typeof window>"u")return;const t=document.querySelector(".gengage-chat-root, .gengage-qna-container, .gengage-simrel-container, .gengage-simbut-root");if(!t)return;const i=window.getComputedStyle(t);for(const n of D){const r=i.getPropertyValue(n).trim();r?e.style.setProperty(n,r):e.style.removeProperty(n)}}function q(e){return typeof e!="number"||!Number.isFinite(e)?$:Math.min(B,Math.max(A,Math.round(e)))}function z(){if(document.getElementById(w))return;const e=document.createElement("style");e.id=w;const t=l["--surface-card"]??l.backgroundColor??"#ffffff",i=l["--text-primary"]??l.foregroundColor??"#111827",n=l["--border-default"]??"rgba(17, 24, 39, 0.10)",r=l["--error"]??"#dc2626",s=l["--shadow-3"]??"0 10px 24px rgba(16, 24, 40, 0.12)",o=l["--radius-card"]??"16px",g=l["--text-muted"]??"#6b7280";e.textContent=`
|
|
2
|
+
#${d} {
|
|
3
3
|
position: fixed;
|
|
4
4
|
top: 16px;
|
|
5
5
|
right: 16px;
|
|
6
6
|
z-index: 2147483646;
|
|
7
7
|
pointer-events: none;
|
|
8
8
|
}
|
|
9
|
-
#${
|
|
9
|
+
#${d}.${b} {
|
|
10
10
|
pointer-events: auto;
|
|
11
11
|
}
|
|
12
|
-
#${
|
|
12
|
+
#${d} .gengage-global-toast {
|
|
13
13
|
min-width: 260px;
|
|
14
14
|
max-width: min(92vw, 420px);
|
|
15
15
|
border-radius: var(--radius-card, ${o});
|
|
16
|
-
border: 1px solid var(--ds-toast-error-border, color-mix(in srgb, var(--error, ${
|
|
17
|
-
border-left: 4px solid var(--ds-toast-error-accent, var(--error, ${
|
|
18
|
-
background: var(--ds-toast-error-bg, color-mix(in srgb, var(--error, ${
|
|
19
|
-
color: var(--ds-toast-error-fg, color-mix(in srgb, var(--error, ${
|
|
16
|
+
border: 1px solid var(--ds-toast-error-border, color-mix(in srgb, var(--error, ${r}) 18%, var(--border-default, ${n})));
|
|
17
|
+
border-left: 4px solid var(--ds-toast-error-accent, var(--error, ${r}));
|
|
18
|
+
background: var(--ds-toast-error-bg, color-mix(in srgb, var(--error, ${r}) 5%, var(--surface-card, ${t})));
|
|
19
|
+
color: var(--ds-toast-error-fg, color-mix(in srgb, var(--error, ${r}) 22%, var(--text-primary, ${i})));
|
|
20
20
|
box-shadow: var(--ds-toast-error-shadow, var(--shadow-3, ${s}));
|
|
21
21
|
padding: 10px 12px;
|
|
22
|
-
font-family: var(--gengage-font-family, ${JSON.stringify(
|
|
22
|
+
font-family: var(--gengage-font-family, ${JSON.stringify(l.fontFamily??'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif')});
|
|
23
23
|
font-size: 13px;
|
|
24
24
|
line-height: 1.4;
|
|
25
25
|
animation: gengage-global-toast-in 180ms ease-out forwards;
|
|
26
26
|
}
|
|
27
|
-
#${
|
|
27
|
+
#${d} .gengage-global-toast-title {
|
|
28
28
|
margin: 0 0 4px;
|
|
29
29
|
font-size: 12px;
|
|
30
30
|
font-weight: 700;
|
|
31
31
|
color: var(--text-muted, ${g});
|
|
32
32
|
}
|
|
33
|
-
#${
|
|
33
|
+
#${d} .gengage-global-toast-message {
|
|
34
34
|
margin: 0;
|
|
35
35
|
font-weight: 500;
|
|
36
36
|
}
|
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
transform: translateY(0);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
`,document.head.appendChild(e)}var f=null;function
|
|
47
|
+
`,document.head.appendChild(e)}var f=null;function Y(){if(f!==null)return f;try{f=localStorage.getItem("gengage:debug")==="1"}catch{f=!1}return f}function S(e,t,i){if(!Y())return;const n=[`[gengage:${e}]`,t];i!==void 0&&n.push(i),console.debug(...n)}var j=("0.5.0".trim(),"0.5.0".trim()),J=("iife-build".trim(),"iife-build".trim());function K(){if(typeof window>"u")return;const e=window;e.__gengageSdkRuntimeInfoLogged||(e.__gengageSdkRuntimeInfoLogged=!0,console.info(`[gengage] @gengage/assistant-fe v${j} (${J})`))}var Q=class{constructor(){this.isVisible=!1,this.isInitialised=!1,this._handlers=new Map,this._cleanups=[],this._ownsRoot=!1,this._destroying=!1}async init(e){if(this.isInitialised){console.warn("[gengage] Widget already initialised. Call update() instead.");return}const t=U(e.theme);K(),this.config={...e,theme:t,session:N(e.session)},this.root=this._resolveMount(e.mountTarget),this._applyTheme(t),O();const i=x("gengage:context:update",n=>this.update(n));this._cleanups.push(i),S("lifecycle",`${this.constructor.name}.init`,{accountId:e.accountId,sku:e.pageContext?.sku});try{await this.onInit(this.config)}catch(n){throw this.destroy(),n}this._destroying||(this.isInitialised=!0,S("lifecycle",`${this.constructor.name} ready`),this.emit("ready"))}update(e){this.isInitialised&&(this.config.pageContext?this.config={...this.config,pageContext:{...this.config.pageContext,...e}}:e.pageType!==void 0&&(this.config={...this.config,pageContext:e}),this.onUpdate(e),this.emit("context-update",this.config.pageContext))}show(){this.isVisible||(this.isVisible=!0,this.root.style.display="",this.onShow(),this.emit("show"))}hide(){this.isVisible&&(this.isVisible=!1,this.root.style.display="none",this.onHide(),this.emit("hide"))}destroy(){this._destroying||(this._destroying=!0,this.emit("destroy"),this._cleanups.forEach(e=>e()),this._cleanups.length=0,this._handlers.clear(),this.onDestroy(),this._cleanupRoot(),this.isInitialised=!1)}_cleanupRoot(){this._ownsRoot?this.root.remove():this.root.innerHTML=""}on(e,t){return this._handlers.has(e)||this._handlers.set(e,new Set),this._handlers.get(e).add(t),()=>this._handlers.get(e)?.delete(t)}emit(e,...t){this._handlers.get(e)?.forEach(i=>i(...t))}addCleanup(e){this._cleanups.push(e)}_resolveMount(e){if(e instanceof HTMLElement)return e;if(typeof e=="string"){const i=document.querySelector(e);if(!i)throw new Error(`[gengage] Mount target not found: "${e}"`);return i}const t=document.createElement("div");return t.dataset.gengageWidget=this.constructor.name.toLowerCase(),document.body.insertBefore(t,document.body.firstChild),this._ownsRoot=!0,t}_applyTheme(e){if(e){for(const[t,i]of Object.entries(e))if(i!==void 0){const n=t.startsWith("--")?t:`--gengage-${X(t)}`;this.root.style.setProperty(n,i)}}}};function X(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function Z(e){const t=e?.trim();return t||"tr"}var C={findSimilarLabel:"Benzerlerini Bul"},ee={findSimilarLabel:"Find Similar"};function te(e,t){return t?.findSimilarLabel?t.findSimilarLabel:(e??"tr").toLowerCase().startsWith("en")?ee.findSimilarLabel:C.findSimilarLabel}function h(e){const t=typeof e.sku=="string"&&e.sku.length>0?e.sku:void 0,i=typeof e.pageContext?.sku=="string"&&e.pageContext.sku.length>0?e.pageContext.sku:void 0;return t??i}var E=class extends Q{constructor(...e){super(...e),this._button=null,this._inlineFrame=null,this._label=C.findSimilarLabel}async onInit(e){this._label=te(e.locale,e.i18n);const t=e.layout??"overlay";this.root.classList.add("gengage-simbut-root"),this.root.classList.toggle("gengage-simbut-root--overlay",t==="overlay"),this.root.classList.toggle("gengage-simbut-root--inline-card",t==="inline-card"),t==="overlay"&&window.getComputedStyle(this.root).position==="static"&&(this.root.style.position="relative");const i=document.createElement("button");i.type="button",i.className="gengage-chat-find-similar-pill",i.lang=Z(e.locale),i.textContent=this._label,this._button=i;const n=()=>{i.disabled=!(h(this.config)&&(this.config.onFindSimilar||this.config.chat))};if(i.addEventListener("click",r=>{r.stopPropagation();const s=h(this.config);if(!s)return;const o=this.config.imageUrl,g=typeof o=="string"&&L(o)?o:void 0;if(F(this._label,"findSimilar"),R(s),this.config.onFindSimilar){this.config.onFindSimilar(g?{sku:s,imageUrl:g}:{sku:s});return}const u=this.config.chat;if(!u)return;const a={title:this._label,type:"findSimilar",payload:{sku:s}};u.openWithAction(a,{sku:s})}),t==="inline-card"){const r=this._createInlineCard(e,i);this._inlineFrame=r,this.root.appendChild(r)}else this.root.appendChild(i);n(),k("simbut")}_createInlineCard(e,t){const i=e.inlineCard,n=typeof i?.title=="string"?i.title.trim():"",r=typeof i?.description=="string"?i.description.trim():"",s=typeof i?.imageUrl=="string"?i.imageUrl.trim():"",o=document.createElement("section");o.className="gengage-simbut-inline-card",o.dataset.gengagePart="simbut-inline-card";const g=document.createElement("div");if(g.className="gengage-simbut-inline-copy",g.dataset.gengagePart="simbut-inline-copy",n){const a=document.createElement("h4");a.className="gengage-simbut-inline-title",a.dataset.gengagePart="simbut-inline-title",a.textContent=n,g.appendChild(a)}if(r){const a=document.createElement("p");a.className="gengage-simbut-inline-description",a.dataset.gengagePart="simbut-inline-description",a.textContent=r,g.appendChild(a)}g.children.length>0&&o.appendChild(g);const u=document.createElement("div");if(u.className="gengage-simbut-inline-action",u.dataset.gengagePart="simbut-inline-action",u.appendChild(t),o.appendChild(u),s&&I(s)){const a=document.createElement("img");a.className="gengage-simbut-inline-image",a.dataset.gengagePart="simbut-inline-image",a.src=s,a.alt=typeof i?.imageAlt=="string"?i.imageAlt:"",a.loading="lazy",a.addEventListener("error",()=>{a.style.display="none"},{once:!0}),o.appendChild(a)}return o}onUpdate(e){if(!this._button)return;const t=!!h(this.config)&&(!!this.config.onFindSimilar||!!this.config.chat);this._button.disabled=!t}hide(){this.isVisible&&(this.isVisible=!1,this._inlineFrame&&(this._inlineFrame.style.display="none"),this._button&&(this._button.style.display="none"),this.onHide(),this.emit("hide"))}show(){this.isVisible||(this.isVisible=!0,this._inlineFrame&&(this._inlineFrame.style.display=""),this._button&&(this._button.style.display=""),this.onShow(),this.emit("show"))}_cleanupRoot(){}onShow(){}onHide(){}onDestroy(){this._inlineFrame?.remove(),this._inlineFrame=null,this._button?.remove(),this._button=null}setChat(e){if(this.config.chat=e,this._button){const t=!!h(this.config)&&(!!this.config.onFindSimilar||!!this.config.chat);this._button.disabled=!t}}};function ie(){return new E}m.GengageSimBut=E,m.createSimButWidget=ie})(this.Gengage=this.Gengage||{});
|
package/dist/simbut.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A, j as S } from "./context-
|
|
1
|
+
import { A, j as S } from "./context-BBuSsXZ9.js";
|
|
2
2
|
import { n as $, t as _ } from "./price-formatter-xI3g9Cd4.js";
|
|
3
3
|
import { a as C, c as f, n as q, o as h, t as k, u as H } from "./schemas-CLo8wCjs.js";
|
|
4
|
-
import { o as j } from "./runtime-
|
|
4
|
+
import { o as j } from "./runtime-DOS9yRRx.js";
|
|
5
5
|
var V = {
|
|
6
6
|
images: [
|
|
7
7
|
"images",
|
package/dist/simrel-runtime.js
CHANGED