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
|
@@ -595,7 +595,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
595
595
|
fakeUserId
|
|
596
596
|
]);
|
|
597
597
|
const getEventParamsByJson = useCallback((_a) => {
|
|
598
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
598
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
599
599
|
var { json, product = [], rec, contentType = 'post', position, eventName } = _a, props = __rest(_a, ["json", "product", "rec", "contentType", "position", "eventName"]);
|
|
600
600
|
const jsonParams = cloneDeep(json);
|
|
601
601
|
const urlParams = new URLSearchParams(window.location.search);
|
|
@@ -608,15 +608,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
608
608
|
fbp: getCookie('_fbp') ? `${getCookie('_fbp')}` : '',
|
|
609
609
|
time: Math.floor(Date.now() / 1000)
|
|
610
610
|
};
|
|
611
|
-
let customData = Object.assign({ 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, currency: (_h = product === null || product === void 0 ? void 0 : product[0]) === null || _h === void 0 ? void 0 : _h.currency, contents: (
|
|
611
|
+
let customData = Object.assign({ 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, 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) => ({
|
|
612
612
|
id: item === null || item === void 0 ? void 0 : item.itemId,
|
|
613
|
-
|
|
614
|
-
}))) !== null &&
|
|
615
|
-
if (!((
|
|
616
|
-
!((
|
|
613
|
+
value: item === null || item === void 0 ? void 0 : item.price
|
|
614
|
+
}))) !== 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, 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);
|
|
615
|
+
if (!((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.url) &&
|
|
616
|
+
!((_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) &&
|
|
617
617
|
(rec === null || rec === void 0 ? void 0 : rec.product) &&
|
|
618
618
|
Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) &&
|
|
619
|
-
((
|
|
619
|
+
((_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _t === void 0 ? void 0 : _t.length) > 0) {
|
|
620
620
|
const product = rec === null || rec === void 0 ? void 0 : rec.product;
|
|
621
621
|
const productCustomData = {
|
|
622
622
|
content_ids: [product === null || product === void 0 ? void 0 : product.itemId],
|
|
@@ -625,10 +625,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
625
625
|
contents: [
|
|
626
626
|
{
|
|
627
627
|
id: product === null || product === void 0 ? void 0 : product.itemId,
|
|
628
|
-
|
|
628
|
+
value: product === null || product === void 0 ? void 0 : product.price
|
|
629
629
|
}
|
|
630
630
|
],
|
|
631
|
-
image_urls: (
|
|
631
|
+
image_urls: (_u = product.homePage) !== null && _u !== void 0 ? _u : []
|
|
632
632
|
};
|
|
633
633
|
customData = Object.assign(Object.assign({}, customData), productCustomData);
|
|
634
634
|
}
|
|
@@ -598,7 +598,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
598
598
|
fakeUserId
|
|
599
599
|
]);
|
|
600
600
|
const getEventParamsByJson = (0, react_1.useCallback)((_a) => {
|
|
601
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
601
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
602
602
|
var { json, product = [], rec, contentType = 'post', position, eventName } = _a, props = tslib_1.__rest(_a, ["json", "product", "rec", "contentType", "position", "eventName"]);
|
|
603
603
|
const jsonParams = (0, lodash_1.cloneDeep)(json);
|
|
604
604
|
const urlParams = new URLSearchParams(window.location.search);
|
|
@@ -611,15 +611,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
611
611
|
fbp: (0, tool_1.getCookie)('_fbp') ? `${(0, tool_1.getCookie)('_fbp')}` : '',
|
|
612
612
|
time: Math.floor(Date.now() / 1000)
|
|
613
613
|
};
|
|
614
|
-
let customData = Object.assign({ 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, currency: (_h = product === null || product === void 0 ? void 0 : product[0]) === null || _h === void 0 ? void 0 : _h.currency, contents: (
|
|
614
|
+
let customData = Object.assign({ 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, 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) => ({
|
|
615
615
|
id: item === null || item === void 0 ? void 0 : item.itemId,
|
|
616
|
-
|
|
617
|
-
}))) !== null &&
|
|
618
|
-
if (!((
|
|
619
|
-
!((
|
|
616
|
+
value: item === null || item === void 0 ? void 0 : item.price
|
|
617
|
+
}))) !== 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, headline: (0, tool_1.getUrlParamByKey)('headline'), scene: (0, tool_1.getUrlParamByKey)('scene'), campaign_id: (0, tool_1.getUrlParamByKey)('campaign_id'), ad_id: (0, tool_1.getUrlParamByKey)('ad_id'), utm_source: (0, tool_1.getUrlParamByKey)('utm_source'), utm_medium: (0, tool_1.getUrlParamByKey)('utm_medium'), utm_campaign: (0, tool_1.getUrlParamByKey)('utm_campaign'), utm_content: (0, tool_1.getUrlParamByKey)('utm_content') }, props);
|
|
618
|
+
if (!((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.url) &&
|
|
619
|
+
!((_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) &&
|
|
620
620
|
(rec === null || rec === void 0 ? void 0 : rec.product) &&
|
|
621
621
|
Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) &&
|
|
622
|
-
((
|
|
622
|
+
((_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _t === void 0 ? void 0 : _t.length) > 0) {
|
|
623
623
|
const product = rec === null || rec === void 0 ? void 0 : rec.product;
|
|
624
624
|
const productCustomData = {
|
|
625
625
|
content_ids: [product === null || product === void 0 ? void 0 : product.itemId],
|
|
@@ -628,10 +628,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
628
628
|
contents: [
|
|
629
629
|
{
|
|
630
630
|
id: product === null || product === void 0 ? void 0 : product.itemId,
|
|
631
|
-
|
|
631
|
+
value: product === null || product === void 0 ? void 0 : product.price
|
|
632
632
|
}
|
|
633
633
|
],
|
|
634
|
-
image_urls: (
|
|
634
|
+
image_urls: (_u = product.homePage) !== null && _u !== void 0 ? _u : []
|
|
635
635
|
};
|
|
636
636
|
customData = Object.assign(Object.assign({}, customData), productCustomData);
|
|
637
637
|
}
|