pb-sxp-ui 1.15.35 → 1.15.37

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.
@@ -52,6 +52,8 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
52
52
  contain: 'content',
53
53
  visibility: 'hidden',
54
54
  position: 'absolute',
55
+ top: 0,
56
+ bottom: 0,
55
57
  opacity: 0,
56
58
  clipPath: 'inset(100%)',
57
59
  transform: 'translateX(-9999px)'
@@ -357,6 +357,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
357
357
  if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
358
358
  return;
359
359
  }
360
+ let isPushState = false;
360
361
  const pixelEventParamsJson = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.pixel) === null || _a === void 0 ? void 0 : _a[eventName];
361
362
  if ((pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.fbq) === 'function') {
362
363
  function updateQueryStringParameter(uri, key, value) {
@@ -377,24 +378,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
377
378
  const currentUrl = window.location.href;
378
379
  const newUrl = updateQueryStringParameter(currentUrl, 'timestamp', Date.now());
379
380
  history.pushState({ path: newUrl }, '', newUrl);
381
+ isPushState = true;
380
382
  }
381
383
  }
382
384
  else {
383
385
  const body = getEventParamsByJson(pixelEventParamsJson);
384
386
  window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
385
- if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
386
- window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
387
- }
388
387
  }
389
388
  }
390
- else if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
391
- window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
392
- }
393
- const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
394
- if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
395
- typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
396
- typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
397
- (_d = window === null || window === void 0 ? void 0 : window.ttq) === null || _d === void 0 ? void 0 : _d.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
389
+ if (!isPushState) {
390
+ if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
391
+ window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
392
+ }
393
+ const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
394
+ if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
395
+ typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
396
+ typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
397
+ (_d = window === null || window === void 0 ? void 0 : window.ttq) === null || _d === void 0 ? void 0 : _d.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
398
+ }
398
399
  }
399
400
  const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
400
401
  if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
@@ -54,6 +54,8 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
54
54
  contain: 'content',
55
55
  visibility: 'hidden',
56
56
  position: 'absolute',
57
+ top: 0,
58
+ bottom: 0,
57
59
  opacity: 0,
58
60
  clipPath: 'inset(100%)',
59
61
  transform: 'translateX(-9999px)'
@@ -360,6 +360,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
360
360
  if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
361
361
  return;
362
362
  }
363
+ let isPushState = false;
363
364
  const pixelEventParamsJson = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.pixel) === null || _a === void 0 ? void 0 : _a[eventName];
364
365
  if ((pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.fbq) === 'function') {
365
366
  function updateQueryStringParameter(uri, key, value) {
@@ -380,24 +381,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
380
381
  const currentUrl = window.location.href;
381
382
  const newUrl = updateQueryStringParameter(currentUrl, 'timestamp', Date.now());
382
383
  history.pushState({ path: newUrl }, '', newUrl);
384
+ isPushState = true;
383
385
  }
384
386
  }
385
387
  else {
386
388
  const body = getEventParamsByJson(pixelEventParamsJson);
387
389
  window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
388
- if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
389
- window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
390
- }
391
390
  }
392
391
  }
393
- else if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
394
- window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
395
- }
396
- const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
397
- if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
398
- typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
399
- typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
400
- (_d = window === null || window === void 0 ? void 0 : window.ttq) === null || _d === void 0 ? void 0 : _d.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
392
+ if (!isPushState) {
393
+ if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
394
+ window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
395
+ }
396
+ const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
397
+ if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
398
+ typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
399
+ typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
400
+ (_d = window === null || window === void 0 ? void 0 : window.ttq) === null || _d === void 0 ? void 0 : _d.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
401
+ }
401
402
  }
402
403
  const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
403
404
  if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.15.35",
3
+ "version": "1.15.37",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",