@uniformdev/insights 20.42.2-alpha.6 → 20.43.0

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.esm.js CHANGED
@@ -428,7 +428,7 @@ var createInsightsCore = (options) => {
428
428
  const {
429
429
  endpoint,
430
430
  storage: customStorage,
431
- batchConfig,
431
+ batchConfig = DEFAULT_BATCH_CONFIG,
432
432
  sessionDurationSeconds = 30 * 60,
433
433
  getVisitorId = generateVisitorId,
434
434
  getSessionId = generateSessionId
@@ -633,21 +633,14 @@ var createInsightsPlugin = (options) => {
633
633
  eventQueue.push(eventFn);
634
634
  }
635
635
  };
636
- const previousScores = {};
637
- const handleScoreUpdates = (updatedScores, compositionData) => {
636
+ const handleSegmentUpdates = (updatedScores, compositionData) => {
638
637
  if (!contextInstance) {
639
638
  return;
640
639
  }
641
640
  Object.entries(updatedScores).forEach(([scoreKey, value]) => {
642
- var _a, _b;
643
- if (previousScores[scoreKey] === value) {
644
- return;
645
- }
646
641
  const aggregateDimension = contextInstance.manifest.getAggregateDimensionByKey(scoreKey);
647
- const signalDimension = (_b = (_a = contextInstance.manifest.data.project.pz) == null ? void 0 : _a.sig) == null ? void 0 : _b[scoreKey];
648
- if (aggregateDimension || signalDimension) {
642
+ if (aggregateDimension) {
649
643
  insights.segmentUpdated(scoreKey, value, compositionData);
650
- previousScores[scoreKey] = value;
651
644
  }
652
645
  });
653
646
  };
@@ -736,7 +729,7 @@ var createInsightsPlugin = (options) => {
736
729
  }
737
730
  if (recalculatedScores) {
738
731
  queueEvent(() => {
739
- handleScoreUpdates(recalculatedScores, compositionMetadata);
732
+ handleSegmentUpdates(recalculatedScores, compositionMetadata);
740
733
  });
741
734
  }
742
735
  },
package/dist/index.js CHANGED
@@ -464,7 +464,7 @@ var createInsightsCore = (options) => {
464
464
  const {
465
465
  endpoint,
466
466
  storage: customStorage,
467
- batchConfig,
467
+ batchConfig = DEFAULT_BATCH_CONFIG,
468
468
  sessionDurationSeconds = 30 * 60,
469
469
  getVisitorId = generateVisitorId,
470
470
  getSessionId = generateSessionId
@@ -669,21 +669,14 @@ var createInsightsPlugin = (options) => {
669
669
  eventQueue.push(eventFn);
670
670
  }
671
671
  };
672
- const previousScores = {};
673
- const handleScoreUpdates = (updatedScores, compositionData) => {
672
+ const handleSegmentUpdates = (updatedScores, compositionData) => {
674
673
  if (!contextInstance) {
675
674
  return;
676
675
  }
677
676
  Object.entries(updatedScores).forEach(([scoreKey, value]) => {
678
- var _a, _b;
679
- if (previousScores[scoreKey] === value) {
680
- return;
681
- }
682
677
  const aggregateDimension = contextInstance.manifest.getAggregateDimensionByKey(scoreKey);
683
- const signalDimension = (_b = (_a = contextInstance.manifest.data.project.pz) == null ? void 0 : _a.sig) == null ? void 0 : _b[scoreKey];
684
- if (aggregateDimension || signalDimension) {
678
+ if (aggregateDimension) {
685
679
  insights.segmentUpdated(scoreKey, value, compositionData);
686
- previousScores[scoreKey] = value;
687
680
  }
688
681
  });
689
682
  };
@@ -772,7 +765,7 @@ var createInsightsPlugin = (options) => {
772
765
  }
773
766
  if (recalculatedScores) {
774
767
  queueEvent(() => {
775
- handleScoreUpdates(recalculatedScores, compositionMetadata);
768
+ handleSegmentUpdates(recalculatedScores, compositionMetadata);
776
769
  });
777
770
  }
778
771
  },
package/dist/index.mjs CHANGED
@@ -428,7 +428,7 @@ var createInsightsCore = (options) => {
428
428
  const {
429
429
  endpoint,
430
430
  storage: customStorage,
431
- batchConfig,
431
+ batchConfig = DEFAULT_BATCH_CONFIG,
432
432
  sessionDurationSeconds = 30 * 60,
433
433
  getVisitorId = generateVisitorId,
434
434
  getSessionId = generateSessionId
@@ -633,21 +633,14 @@ var createInsightsPlugin = (options) => {
633
633
  eventQueue.push(eventFn);
634
634
  }
635
635
  };
636
- const previousScores = {};
637
- const handleScoreUpdates = (updatedScores, compositionData) => {
636
+ const handleSegmentUpdates = (updatedScores, compositionData) => {
638
637
  if (!contextInstance) {
639
638
  return;
640
639
  }
641
640
  Object.entries(updatedScores).forEach(([scoreKey, value]) => {
642
- var _a, _b;
643
- if (previousScores[scoreKey] === value) {
644
- return;
645
- }
646
641
  const aggregateDimension = contextInstance.manifest.getAggregateDimensionByKey(scoreKey);
647
- const signalDimension = (_b = (_a = contextInstance.manifest.data.project.pz) == null ? void 0 : _a.sig) == null ? void 0 : _b[scoreKey];
648
- if (aggregateDimension || signalDimension) {
642
+ if (aggregateDimension) {
649
643
  insights.segmentUpdated(scoreKey, value, compositionData);
650
- previousScores[scoreKey] = value;
651
644
  }
652
645
  });
653
646
  };
@@ -736,7 +729,7 @@ var createInsightsPlugin = (options) => {
736
729
  }
737
730
  if (recalculatedScores) {
738
731
  queueEvent(() => {
739
- handleScoreUpdates(recalculatedScores, compositionMetadata);
732
+ handleSegmentUpdates(recalculatedScores, compositionMetadata);
740
733
  });
741
734
  }
742
735
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/insights",
3
- "version": "20.42.2-alpha.6+f523a72c7e",
3
+ "version": "20.43.0",
4
4
  "description": "Uniform Context Insights package",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -50,7 +50,7 @@
50
50
  "vitest": "3.2.4"
51
51
  },
52
52
  "dependencies": {
53
- "@uniformdev/context": "20.42.2-alpha.6+f523a72c7e",
53
+ "@uniformdev/context": "20.43.0",
54
54
  "p-limit": "3.1.0"
55
55
  },
56
56
  "files": [
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "f523a72c7e64beca747f2146e1dfe62573a2e1a5"
62
+ "gitHead": "9a8037f9cd28afa60861e7de0fb8f6153482194f"
63
63
  }