pb-sxp-ui 1.15.32 → 1.15.33

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.
@@ -49,6 +49,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
49
49
  const [playbookType, setPlaybookType] = useState();
50
50
  const [chatlabsId, setChatlabsId] = useState();
51
51
  const finalPageData = useMemo(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
52
+ const pixelPvStatusRef = useRef(false);
52
53
  const isShowConsent = useMemo(() => {
53
54
  var _a, _b, _c, _d;
54
55
  return (((((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent) &&
@@ -397,6 +398,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
397
398
  }
398
399
  }
399
400
  if (eventName === 'PageView' && (pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) === 'PageView') {
401
+ if (!pixelPvStatusRef.current) {
402
+ pixelPvStatusRef.current = true;
403
+ return;
404
+ }
400
405
  const currentUrl = window.location.href;
401
406
  const newUrl = updateQueryStringParameter(currentUrl, 'timestamp', Date.now());
402
407
  history.pushState({ path: newUrl }, '', newUrl);
@@ -52,6 +52,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
52
52
  const [playbookType, setPlaybookType] = (0, react_1.useState)();
53
53
  const [chatlabsId, setChatlabsId] = (0, react_1.useState)();
54
54
  const finalPageData = (0, react_1.useMemo)(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
55
+ const pixelPvStatusRef = (0, react_1.useRef)(false);
55
56
  const isShowConsent = (0, react_1.useMemo)(() => {
56
57
  var _a, _b, _c, _d;
57
58
  return (((((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent) &&
@@ -400,6 +401,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
400
401
  }
401
402
  }
402
403
  if (eventName === 'PageView' && (pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) === 'PageView') {
404
+ if (!pixelPvStatusRef.current) {
405
+ pixelPvStatusRef.current = true;
406
+ return;
407
+ }
403
408
  const currentUrl = window.location.href;
404
409
  const newUrl = updateQueryStringParameter(currentUrl, 'timestamp', Date.now());
405
410
  history.pushState({ path: newUrl }, '', newUrl);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.15.32",
3
+ "version": "1.15.33",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",