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/pb-ui.js CHANGED
@@ -1275,7 +1275,7 @@
1275
1275
  fakeUserId
1276
1276
  ]);
1277
1277
  const getEventParamsByJson = React.useCallback((_a) => {
1278
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
1278
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
1279
1279
  var { json, product = [], rec, contentType = 'post', position, eventName } = _a, props = __rest(_a, ["json", "product", "rec", "contentType", "position", "eventName"]);
1280
1280
  const jsonParams = lodash.cloneDeep(json);
1281
1281
  const urlParams = new URLSearchParams(window.location.search);
@@ -1292,17 +1292,17 @@
1292
1292
  // funnel_type
1293
1293
  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,
1294
1294
  // content_category
1295
- 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) => ({
1295
+ 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) => ({
1296
1296
  id: item === null || item === void 0 ? void 0 : item.itemId,
1297
- item_price: item === null || item === void 0 ? void 0 : item.price
1298
- }))) !== 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,
1297
+ value: item === null || item === void 0 ? void 0 : item.price
1298
+ }))) !== 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,
1299
1299
  // prompt
1300
1300
  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);
1301
- if (!((_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.url) &&
1302
- !((_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) &&
1301
+ if (!((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.url) &&
1302
+ !((_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) &&
1303
1303
  (rec === null || rec === void 0 ? void 0 : rec.product) &&
1304
1304
  Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) &&
1305
- ((_r = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _r === void 0 ? void 0 : _r.length) > 0) {
1305
+ ((_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _t === void 0 ? void 0 : _t.length) > 0) {
1306
1306
  const product = rec === null || rec === void 0 ? void 0 : rec.product;
1307
1307
  const productCustomData = {
1308
1308
  content_ids: [product === null || product === void 0 ? void 0 : product.itemId],
@@ -1311,10 +1311,10 @@
1311
1311
  contents: [
1312
1312
  {
1313
1313
  id: product === null || product === void 0 ? void 0 : product.itemId,
1314
- item_price: product === null || product === void 0 ? void 0 : product.price
1314
+ value: product === null || product === void 0 ? void 0 : product.price
1315
1315
  }
1316
1316
  ],
1317
- image_urls: (_s = product.homePage) !== null && _s !== void 0 ? _s : []
1317
+ image_urls: (_u = product.homePage) !== null && _u !== void 0 ? _u : []
1318
1318
  };
1319
1319
  customData = Object.assign(Object.assign({}, customData), productCustomData);
1320
1320
  }