@uniformdev/context 19.128.1-alpha.12 → 19.128.1-alpha.14

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
@@ -614,7 +614,7 @@ function personalizeVariations({
614
614
  take = 1,
615
615
  onLogMessage
616
616
  }) {
617
- var _a, _b, _c, _d;
617
+ var _a, _b, _c, _d, _e;
618
618
  onLogMessage == null ? void 0 : onLogMessage(["info", 300, "GROUP", { name, take }]);
619
619
  try {
620
620
  const control = (_a = context.storage.data.controlGroup) != null ? _a : false;
@@ -672,7 +672,7 @@ function personalizeVariations({
672
672
  personalized = variant.id === variantToAdd.id;
673
673
  results.push({
674
674
  ...variantToAdd,
675
- control: isControl
675
+ control: isControl || !((_e = variantToAdd.pz) == null ? void 0 : _e.crit.length)
676
676
  });
677
677
  }
678
678
  }
@@ -1150,8 +1150,8 @@ function applyCommandsToData(commands, state, inControlGroup) {
1150
1150
  index: command.data.index,
1151
1151
  control: command.data.control
1152
1152
  });
1153
- } else if (existingDef.control !== command.data.control) {
1154
- existingDef.control = command.data.control;
1153
+ } else {
1154
+ console.warn("Overwriting existing control group definition is not allowed");
1155
1155
  }
1156
1156
  break;
1157
1157
  default:
package/dist/index.js CHANGED
@@ -684,7 +684,7 @@ function personalizeVariations({
684
684
  take = 1,
685
685
  onLogMessage
686
686
  }) {
687
- var _a, _b, _c, _d;
687
+ var _a, _b, _c, _d, _e;
688
688
  onLogMessage == null ? void 0 : onLogMessage(["info", 300, "GROUP", { name, take }]);
689
689
  try {
690
690
  const control = (_a = context.storage.data.controlGroup) != null ? _a : false;
@@ -742,7 +742,7 @@ function personalizeVariations({
742
742
  personalized = variant.id === variantToAdd.id;
743
743
  results.push({
744
744
  ...variantToAdd,
745
- control: isControl
745
+ control: isControl || !((_e = variantToAdd.pz) == null ? void 0 : _e.crit.length)
746
746
  });
747
747
  }
748
748
  }
@@ -1220,8 +1220,8 @@ function applyCommandsToData(commands, state, inControlGroup) {
1220
1220
  index: command.data.index,
1221
1221
  control: command.data.control
1222
1222
  });
1223
- } else if (existingDef.control !== command.data.control) {
1224
- existingDef.control = command.data.control;
1223
+ } else {
1224
+ console.warn("Overwriting existing control group definition is not allowed");
1225
1225
  }
1226
1226
  break;
1227
1227
  default:
package/dist/index.mjs CHANGED
@@ -614,7 +614,7 @@ function personalizeVariations({
614
614
  take = 1,
615
615
  onLogMessage
616
616
  }) {
617
- var _a, _b, _c, _d;
617
+ var _a, _b, _c, _d, _e;
618
618
  onLogMessage == null ? void 0 : onLogMessage(["info", 300, "GROUP", { name, take }]);
619
619
  try {
620
620
  const control = (_a = context.storage.data.controlGroup) != null ? _a : false;
@@ -672,7 +672,7 @@ function personalizeVariations({
672
672
  personalized = variant.id === variantToAdd.id;
673
673
  results.push({
674
674
  ...variantToAdd,
675
- control: isControl
675
+ control: isControl || !((_e = variantToAdd.pz) == null ? void 0 : _e.crit.length)
676
676
  });
677
677
  }
678
678
  }
@@ -1150,8 +1150,8 @@ function applyCommandsToData(commands, state, inControlGroup) {
1150
1150
  index: command.data.index,
1151
1151
  control: command.data.control
1152
1152
  });
1153
- } else if (existingDef.control !== command.data.control) {
1154
- existingDef.control = command.data.control;
1153
+ } else {
1154
+ console.warn("Overwriting existing control group definition is not allowed");
1155
1155
  }
1156
1156
  break;
1157
1157
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context",
3
- "version": "19.128.1-alpha.12+257ca411a1",
3
+ "version": "19.128.1-alpha.14+df246de41f",
4
4
  "description": "Uniform Context core package",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "257ca411a1416b6486147689285a1642546967a0"
69
+ "gitHead": "df246de41f138d17532eef32342bfb8855be9cc7"
70
70
  }