@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.
- package/dist/{ShopScreen-ZRlRj9cR.cjs → ShopScreen-3Z-9TKeI.cjs} +6 -5
- package/dist/{ShopScreen-ZRlRj9cR.cjs.map → ShopScreen-3Z-9TKeI.cjs.map} +1 -1
- package/dist/{ShopScreen-24JSOKXO.cjs → ShopScreen-Bit0Fdgr.cjs} +1 -1
- package/dist/{ShopScreen-CwqPyDTV.mjs → ShopScreen-DdIlnLcB.mjs} +6 -5
- package/dist/{ShopScreen-CwqPyDTV.mjs.map → ShopScreen-DdIlnLcB.mjs.map} +1 -1
- package/dist/index.cjs +29 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +30 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
|
@@ -35,6 +35,6 @@ require("./ToDoWidget-DZUvDwnJ.cjs");
|
|
|
35
35
|
require("./VideoWidget-BmVIIfvM.cjs");
|
|
36
36
|
require("./ScreenHeaderContext-DpVOhFzT.cjs");
|
|
37
37
|
require("./SearchSort-CyeeUmwC.cjs");
|
|
38
|
-
const require_ShopScreen = require("./ShopScreen-
|
|
38
|
+
const require_ShopScreen = require("./ShopScreen-3Z-9TKeI.cjs");
|
|
39
39
|
exports.ShopScreen = require_ShopScreen.ShopScreen;
|
|
40
40
|
exports.shopScreenPropertySchema = require_ShopScreen.shopScreenPropertySchema;
|
|
@@ -1280,7 +1280,7 @@ function ShopApp({ companyLogoUrl, renderImage, productId: controlledProductId,
|
|
|
1280
1280
|
const SCRIPT_ID = "fluid-cdn-script";
|
|
1281
1281
|
const LEAD_CAPTURE_ID = "fluid-lead-capture-suppress";
|
|
1282
1282
|
const SCRIPT_SRC = "https://assets.fluid.app/scripts/fluid-sdk/latest/web-widgets/index.js";
|
|
1283
|
-
function CartScript({ subdomain, authJwt }) {
|
|
1283
|
+
function CartScript({ subdomain, authJwt, bffMode }) {
|
|
1284
1284
|
const authJwtRef = useRef(authJwt);
|
|
1285
1285
|
authJwtRef.current = authJwt;
|
|
1286
1286
|
useEffect(() => {
|
|
@@ -1292,7 +1292,8 @@ function CartScript({ subdomain, authJwt }) {
|
|
|
1292
1292
|
script.type = "module";
|
|
1293
1293
|
script.crossOrigin = "anonymous";
|
|
1294
1294
|
script.dataset.fluidShop = subdomain;
|
|
1295
|
-
if (
|
|
1295
|
+
if (bffMode) script.dataset.bffMode = "true";
|
|
1296
|
+
else if (authJwtRef.current) script.dataset.authJwt = authJwtRef.current;
|
|
1296
1297
|
document.head.appendChild(script);
|
|
1297
1298
|
const leadCapture = document.createElement("fluid-lead-capture-widget");
|
|
1298
1299
|
leadCapture.id = LEAD_CAPTURE_ID;
|
|
@@ -1304,7 +1305,7 @@ function CartScript({ subdomain, authJwt }) {
|
|
|
1304
1305
|
const existingLeadCapture = document.getElementById(LEAD_CAPTURE_ID);
|
|
1305
1306
|
if (existingLeadCapture) existingLeadCapture.remove();
|
|
1306
1307
|
};
|
|
1307
|
-
}, [subdomain]);
|
|
1308
|
+
}, [subdomain, bffMode]);
|
|
1308
1309
|
return null;
|
|
1309
1310
|
}
|
|
1310
1311
|
//#endregion
|
|
@@ -1473,7 +1474,7 @@ function ShopScreen({ background, textColor, accentColor, padding, borderRadius,
|
|
|
1473
1474
|
children: /* @__PURE__ */ jsx(ShopContainer, {
|
|
1474
1475
|
cartScript: subdomain ? /* @__PURE__ */ jsx(CartScript, {
|
|
1475
1476
|
subdomain,
|
|
1476
|
-
|
|
1477
|
+
bffMode: true
|
|
1477
1478
|
}) : null,
|
|
1478
1479
|
cartWidget: /* @__PURE__ */ jsx(CartWidget, {}),
|
|
1479
1480
|
children: /* @__PURE__ */ jsx(PortalProductsCoreProvider, {
|
|
@@ -1500,4 +1501,4 @@ const shopScreenPropertySchema = {
|
|
|
1500
1501
|
//#endregion
|
|
1501
1502
|
export { ShopScreen_exports as n, shopScreenPropertySchema as r, ShopScreen as t };
|
|
1502
1503
|
|
|
1503
|
-
//# sourceMappingURL=ShopScreen-
|
|
1504
|
+
//# sourceMappingURL=ShopScreen-DdIlnLcB.mjs.map
|