pb-sxp-ui 1.16.24-alpha.1 → 1.16.24-alpha.2

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.
@@ -293,19 +293,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
293
293
  originalOpen.apply(this, arguments);
294
294
  };
295
295
  XMLHttpRequest.prototype.send = function (body) {
296
+ var _a;
296
297
  if (this._url && typeof this._url === 'string' && this._url.includes('https://i.giesswein.com/nb-collector')) {
297
298
  if (body && typeof body === 'string') {
298
299
  try {
299
300
  const payload = JSON.parse(body);
300
301
  if (payload && Array.isArray(payload.data)) {
301
- payload.data.forEach((item) => {
302
- if (item && item.e) {
303
- bffCollectEvent({
304
- eventName: item.e,
305
- eventSource: 'Northbeam Pixel'
306
- });
307
- }
308
- });
302
+ const item = payload.data[((_a = payload.data) === null || _a === void 0 ? void 0 : _a.length) - 1];
303
+ if (item && item.e) {
304
+ bffCollectEvent({
305
+ eventName: item.e,
306
+ eventSource: 'Northbeam Pixel'
307
+ });
308
+ }
309
309
  }
310
310
  }
311
311
  catch (e) {
@@ -595,7 +595,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
595
595
  window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, getEventParamsByJson(snapchatPixelEventParamsJson, product));
596
596
  }
597
597
  if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.Northbeam) === 'object' && typeof ((_f = window === null || window === void 0 ? void 0 : window.Northbeam) === null || _f === void 0 ? void 0 : _f.trackPageView) === 'function') {
598
- console.log('-----------------trackPageView触发了------------------');
599
598
  (_g = window === null || window === void 0 ? void 0 : window.Northbeam) === null || _g === void 0 ? void 0 : _g.trackPageView();
600
599
  }
601
600
  const converApiEventParamsJson = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _h === void 0 ? void 0 : _h[eventName];
@@ -296,19 +296,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
296
296
  originalOpen.apply(this, arguments);
297
297
  };
298
298
  XMLHttpRequest.prototype.send = function (body) {
299
+ var _a;
299
300
  if (this._url && typeof this._url === 'string' && this._url.includes('https://i.giesswein.com/nb-collector')) {
300
301
  if (body && typeof body === 'string') {
301
302
  try {
302
303
  const payload = JSON.parse(body);
303
304
  if (payload && Array.isArray(payload.data)) {
304
- payload.data.forEach((item) => {
305
- if (item && item.e) {
306
- bffCollectEvent({
307
- eventName: item.e,
308
- eventSource: 'Northbeam Pixel'
309
- });
310
- }
311
- });
305
+ const item = payload.data[((_a = payload.data) === null || _a === void 0 ? void 0 : _a.length) - 1];
306
+ if (item && item.e) {
307
+ bffCollectEvent({
308
+ eventName: item.e,
309
+ eventSource: 'Northbeam Pixel'
310
+ });
311
+ }
312
312
  }
313
313
  }
314
314
  catch (e) {
@@ -598,7 +598,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
598
598
  window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, getEventParamsByJson(snapchatPixelEventParamsJson, product));
599
599
  }
600
600
  if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.Northbeam) === 'object' && typeof ((_f = window === null || window === void 0 ? void 0 : window.Northbeam) === null || _f === void 0 ? void 0 : _f.trackPageView) === 'function') {
601
- console.log('-----------------trackPageView触发了------------------');
602
601
  (_g = window === null || window === void 0 ? void 0 : window.Northbeam) === null || _g === void 0 ? void 0 : _g.trackPageView();
603
602
  }
604
603
  const converApiEventParamsJson = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _h === void 0 ? void 0 : _h[eventName];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.16.24-alpha.1",
3
+ "version": "1.16.24-alpha.2",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",