pb-sxp-ui 1.20.9 → 1.20.11
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/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +5 -5
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +5 -5
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +9 -9
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +5 -5
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/context/SxpDataSourceProvider.js +9 -9
- package/lib/core/context/SxpDataSourceProvider.js +9 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1260,7 +1260,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1260
1260
|
fakeUserId
|
|
1261
1261
|
]);
|
|
1262
1262
|
const getEventParamsByJson = useCallback((_a) => {
|
|
1263
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
1263
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
1264
1264
|
var { json, product = [], rec, contentType = 'post', position, eventName } = _a, props = __rest(_a, ["json", "product", "rec", "contentType", "position", "eventName"]);
|
|
1265
1265
|
const jsonParams = cloneDeep(json);
|
|
1266
1266
|
const urlParams = new URLSearchParams(window.location.search);
|
|
@@ -1277,17 +1277,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1277
1277
|
// funnel_type
|
|
1278
1278
|
content_ids: [(_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.itemId, ...((_f = product === null || product === void 0 ? void 0 : product.map((item) => item === null || item === void 0 ? void 0 : item.itemId)) !== null && _f !== void 0 ? _f : [])], content_type: contentType, content_name: (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.title, total_posts: rtcList === null || rtcList === void 0 ? void 0 : rtcList.length, position,
|
|
1279
1279
|
// content_category
|
|
1280
|
-
currency: (_h = product === null || product === void 0 ? void 0 : product[0]) === null || _h === void 0 ? void 0 : _h.currency, contents: (
|
|
1280
|
+
currency: (_k = (_j = (_h = product === null || product === void 0 ? void 0 : product[0]) === null || _h === void 0 ? void 0 : _h.currency) === null || _j === void 0 ? void 0 : _j.split('-')) === null || _k === void 0 ? void 0 : _k[0], contents: (_l = product === null || product === void 0 ? void 0 : product.map((item) => ({
|
|
1281
1281
|
id: item === null || item === void 0 ? void 0 : item.itemId,
|
|
1282
|
-
|
|
1283
|
-
}))) !== null &&
|
|
1282
|
+
value: item === null || item === void 0 ? void 0 : item.price
|
|
1283
|
+
}))) !== null && _l !== void 0 ? _l : [], image_urls: (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.imgUrls) !== null && _o !== void 0 ? _o : [], video_urls: (_p = rec === null || rec === void 0 ? void 0 : rec.video) === null || _p === void 0 ? void 0 : _p.url,
|
|
1284
1284
|
// prompt
|
|
1285
1285
|
headline: getUrlParamByKey('headline'), scene: getUrlParamByKey('scene'), campaign_id: getUrlParamByKey('campaign_id'), ad_id: getUrlParamByKey('ad_id'), utm_source: getUrlParamByKey('utm_source'), utm_medium: getUrlParamByKey('utm_medium'), utm_campaign: getUrlParamByKey('utm_campaign'), utm_content: getUrlParamByKey('utm_content') }, props);
|
|
1286
|
-
if (!((
|
|
1287
|
-
!((
|
|
1286
|
+
if (!((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.url) &&
|
|
1287
|
+
!((_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.imgUrls) === null || _s === void 0 ? void 0 : _s.length) &&
|
|
1288
1288
|
(rec === null || rec === void 0 ? void 0 : rec.product) &&
|
|
1289
1289
|
Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) &&
|
|
1290
|
-
((
|
|
1290
|
+
((_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _t === void 0 ? void 0 : _t.length) > 0) {
|
|
1291
1291
|
const product = rec === null || rec === void 0 ? void 0 : rec.product;
|
|
1292
1292
|
const productCustomData = {
|
|
1293
1293
|
content_ids: [product === null || product === void 0 ? void 0 : product.itemId],
|
|
@@ -1296,10 +1296,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1296
1296
|
contents: [
|
|
1297
1297
|
{
|
|
1298
1298
|
id: product === null || product === void 0 ? void 0 : product.itemId,
|
|
1299
|
-
|
|
1299
|
+
value: product === null || product === void 0 ? void 0 : product.price
|
|
1300
1300
|
}
|
|
1301
1301
|
],
|
|
1302
|
-
image_urls: (
|
|
1302
|
+
image_urls: (_u = product.homePage) !== null && _u !== void 0 ? _u : []
|
|
1303
1303
|
};
|
|
1304
1304
|
customData = Object.assign(Object.assign({}, customData), productCustomData);
|
|
1305
1305
|
}
|