@active-reach/web-sdk 1.34.0 → 1.34.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviews.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/reviews.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C;iFACiF;AACjF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAuKD,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,aAAa,EAClB,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,kBAAkB,GACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"reviews.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/reviews.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C;iFACiF;AACjF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAuKD,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,aAAa,EAClB,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,kBAAkB,GACxB,OAAO,CA4RT;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAgCxF"}
|
package/dist/index.js
CHANGED
|
@@ -5170,12 +5170,13 @@ function renderReviewsInline(ctx, target, creds) {
|
|
|
5170
5170
|
if (typeof document === "undefined" || !(creds == null ? void 0 : creds.apiHost) || !(creds == null ? void 0 : creds.writeKey)) return false;
|
|
5171
5171
|
ensureInAppFont();
|
|
5172
5172
|
const ic = ctx.campaign.interactive_config || {};
|
|
5173
|
+
const cfg = target.closest("[data-aegis-slot]") ?? target;
|
|
5173
5174
|
const accent = ctx.sanitizeColor(
|
|
5174
|
-
|
|
5175
|
+
cfg.getAttribute("data-accent") || ctx.campaign.background_color || "#4169e1"
|
|
5175
5176
|
);
|
|
5176
|
-
const rawBrand = (
|
|
5177
|
+
const rawBrand = (cfg.getAttribute("data-brand-name") || String(ic.brand_name || "")).trim();
|
|
5177
5178
|
const brand = (rawBrand.split(/\s[|·–-]\s/)[0] || "").trim() || "The store";
|
|
5178
|
-
const productId =
|
|
5179
|
+
const productId = cfg.getAttribute("data-product-id") || ctx.campaign.product_id || null;
|
|
5179
5180
|
const state = { sort: "recent", withPhotos: false };
|
|
5180
5181
|
target.innerHTML = "";
|
|
5181
5182
|
target.appendChild(el("div", `font-family:${IN_APP_FONT_STACK};font-size:13px;color:#9ca3af;padding:10px 0;`, "Loading reviews…"));
|
|
@@ -14235,17 +14236,23 @@ const _AegisMessageRuntime = class _AegisMessageRuntime {
|
|
|
14235
14236
|
constructor(config) {
|
|
14236
14237
|
var _a;
|
|
14237
14238
|
this.initialized = false;
|
|
14238
|
-
|
|
14239
|
-
|
|
14239
|
+
{
|
|
14240
|
+
const v = "1.34.1";
|
|
14240
14241
|
try {
|
|
14241
|
-
|
|
14242
|
-
console.info(
|
|
14243
|
-
`%c[Aegis SDK]%c v${v} loaded`,
|
|
14244
|
-
"color:#fff;background:#7c3aed;padding:1px 6px;border-radius:4px;font-weight:700",
|
|
14245
|
-
"color:#7c3aed;font-weight:600"
|
|
14246
|
-
);
|
|
14242
|
+
globalThis.__AEGIS_SDK_VERSION__ = v;
|
|
14247
14243
|
} catch {
|
|
14248
14244
|
}
|
|
14245
|
+
if (!_AegisMessageRuntime._bannerPrinted) {
|
|
14246
|
+
_AegisMessageRuntime._bannerPrinted = true;
|
|
14247
|
+
try {
|
|
14248
|
+
console.log(
|
|
14249
|
+
`%c[Aegis SDK]%c v${v} loaded`,
|
|
14250
|
+
"color:#fff;background:#7c3aed;padding:1px 6px;border-radius:4px;font-weight:700",
|
|
14251
|
+
"color:#7c3aed;font-weight:600"
|
|
14252
|
+
);
|
|
14253
|
+
} catch {
|
|
14254
|
+
}
|
|
14255
|
+
}
|
|
14249
14256
|
}
|
|
14250
14257
|
const triggerEngine = config.triggerEngine ?? new TriggerEngine();
|
|
14251
14258
|
const ownsTriggerEngine = !config.triggerEngine;
|