@fluid-app/portal-sdk 0.1.138 → 0.1.140

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.
@@ -1281,7 +1281,7 @@ function ShopApp({ companyLogoUrl, renderImage, productId: controlledProductId,
1281
1281
  const SCRIPT_ID = "fluid-cdn-script";
1282
1282
  const LEAD_CAPTURE_ID = "fluid-lead-capture-suppress";
1283
1283
  const SCRIPT_SRC = "https://assets.fluid.app/scripts/fluid-sdk/latest/web-widgets/index.js";
1284
- function CartScript({ subdomain, authJwt }) {
1284
+ function CartScript({ subdomain, authJwt, bffMode }) {
1285
1285
  const authJwtRef = (0, react.useRef)(authJwt);
1286
1286
  authJwtRef.current = authJwt;
1287
1287
  (0, react.useEffect)(() => {
@@ -1293,7 +1293,8 @@ function CartScript({ subdomain, authJwt }) {
1293
1293
  script.type = "module";
1294
1294
  script.crossOrigin = "anonymous";
1295
1295
  script.dataset.fluidShop = subdomain;
1296
- if (authJwtRef.current) script.dataset.authJwt = authJwtRef.current;
1296
+ if (bffMode) script.dataset.bffMode = "true";
1297
+ else if (authJwtRef.current) script.dataset.authJwt = authJwtRef.current;
1297
1298
  document.head.appendChild(script);
1298
1299
  const leadCapture = document.createElement("fluid-lead-capture-widget");
1299
1300
  leadCapture.id = LEAD_CAPTURE_ID;
@@ -1305,7 +1306,7 @@ function CartScript({ subdomain, authJwt }) {
1305
1306
  const existingLeadCapture = document.getElementById(LEAD_CAPTURE_ID);
1306
1307
  if (existingLeadCapture) existingLeadCapture.remove();
1307
1308
  };
1308
- }, [subdomain]);
1309
+ }, [subdomain, bffMode]);
1309
1310
  return null;
1310
1311
  }
1311
1312
  //#endregion
@@ -1470,7 +1471,7 @@ function ShopScreen({ background, textColor, accentColor, padding, borderRadius,
1470
1471
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShopContainer, {
1471
1472
  cartScript: subdomain ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CartScript, {
1472
1473
  subdomain,
1473
- authJwt: void 0
1474
+ bffMode: true
1474
1475
  }) : null,
1475
1476
  cartWidget: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CartWidget, {}),
1476
1477
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PortalProductsCoreProvider, {
@@ -1508,4 +1509,4 @@ Object.defineProperty(exports, "shopScreenPropertySchema", {
1508
1509
  }
1509
1510
  });
1510
1511
 
1511
- //# sourceMappingURL=ShopScreen-ZRlRj9cR.cjs.map
1512
+ //# sourceMappingURL=ShopScreen-3Z-9TKeI.cjs.map