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 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: (_j = product === null || product === void 0 ? void 0 : product.map((item) => ({
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
- item_price: item === null || item === void 0 ? void 0 : item.price
1305
- }))) !== null && _j !== void 0 ? _j : [], image_urls: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) !== null && _l !== void 0 ? _l : [], video_urls: (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.url,
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 (!((_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.url) &&
1309
- !((_q = (_p = rec === null || rec === void 0 ? void 0 : rec.video) === null || _p === void 0 ? void 0 : _p.imgUrls) === null || _q === void 0 ? void 0 : _q.length) &&
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
- ((_r = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _r === void 0 ? void 0 : _r.length) > 0) {
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
- item_price: product === null || product === void 0 ? void 0 : product.price
1321
+ value: product === null || product === void 0 ? void 0 : product.price
1322
1322
  }
1323
1323
  ],
1324
- image_urls: (_s = product.homePage) !== null && _s !== void 0 ? _s : []
1324
+ image_urls: (_u = product.homePage) !== null && _u !== void 0 ? _u : []
1325
1325
  };
1326
1326
  customData = Object.assign(Object.assign({}, customData), productCustomData);
1327
1327
  }