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.cjs
CHANGED
|
@@ -1282,7 +1282,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1282
1282
|
fakeUserId
|
|
1283
1283
|
]);
|
|
1284
1284
|
const getEventParamsByJson = React.useCallback((_a) => {
|
|
1285
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
1285
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
1286
1286
|
var { json, product = [], rec, contentType = 'post', position, eventName } = _a, props = __rest(_a, ["json", "product", "rec", "contentType", "position", "eventName"]);
|
|
1287
1287
|
const jsonParams = lodash.cloneDeep(json);
|
|
1288
1288
|
const urlParams = new URLSearchParams(window.location.search);
|
|
@@ -1299,17 +1299,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1299
1299
|
// funnel_type
|
|
1300
1300
|
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,
|
|
1301
1301
|
// content_category
|
|
1302
|
-
currency: (_h = product === null || product === void 0 ? void 0 : product[0]) === null || _h === void 0 ? void 0 : _h.currency, contents: (
|
|
1302
|
+
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) => ({
|
|
1303
1303
|
id: item === null || item === void 0 ? void 0 : item.itemId,
|
|
1304
|
-
|
|
1305
|
-
}))) !== null &&
|
|
1304
|
+
value: item === null || item === void 0 ? void 0 : item.price
|
|
1305
|
+
}))) !== 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,
|
|
1306
1306
|
// prompt
|
|
1307
1307
|
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);
|
|
1308
|
-
if (!((
|
|
1309
|
-
!((
|
|
1308
|
+
if (!((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.url) &&
|
|
1309
|
+
!((_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) &&
|
|
1310
1310
|
(rec === null || rec === void 0 ? void 0 : rec.product) &&
|
|
1311
1311
|
Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) &&
|
|
1312
|
-
((
|
|
1312
|
+
((_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _t === void 0 ? void 0 : _t.length) > 0) {
|
|
1313
1313
|
const product = rec === null || rec === void 0 ? void 0 : rec.product;
|
|
1314
1314
|
const productCustomData = {
|
|
1315
1315
|
content_ids: [product === null || product === void 0 ? void 0 : product.itemId],
|
|
@@ -1318,10 +1318,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1318
1318
|
contents: [
|
|
1319
1319
|
{
|
|
1320
1320
|
id: product === null || product === void 0 ? void 0 : product.itemId,
|
|
1321
|
-
|
|
1321
|
+
value: product === null || product === void 0 ? void 0 : product.price
|
|
1322
1322
|
}
|
|
1323
1323
|
],
|
|
1324
|
-
image_urls: (
|
|
1324
|
+
image_urls: (_u = product.homePage) !== null && _u !== void 0 ? _u : []
|
|
1325
1325
|
};
|
|
1326
1326
|
customData = Object.assign(Object.assign({}, customData), productCustomData);
|
|
1327
1327
|
}
|