@ninetailed/experience.js-plugin-preview 4.0.0-beta.5 → 4.0.0-beta.6

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.
Files changed (3) hide show
  1. package/index.cjs +7 -0
  2. package/index.js +7 -0
  3. package/package.json +7 -7
package/index.cjs CHANGED
@@ -3186,6 +3186,13 @@ class NinetailedPreviewPlugin extends experience_jsPluginAnalytics.NinetailedPlu
3186
3186
  console.log(`You cannot activate an unkown audience (id: ${id}).`);
3187
3187
  return;
3188
3188
  }
3189
+ // When a audience is activated, they should show their natural state
3190
+ this.experiences.filter(experience => {
3191
+ var _b;
3192
+ return ((_b = experience.audience) === null || _b === void 0 ? void 0 : _b.id) === id;
3193
+ }).forEach(experience => {
3194
+ this.resetExperience(experience.id);
3195
+ });
3189
3196
  this.audienceOverwrites = Object.assign(Object.assign({}, this.audienceOverwrites), {
3190
3197
  [id]: true
3191
3198
  });
package/index.js CHANGED
@@ -3164,6 +3164,13 @@ class NinetailedPreviewPlugin extends NinetailedPlugin {
3164
3164
  console.log(`You cannot activate an unkown audience (id: ${id}).`);
3165
3165
  return;
3166
3166
  }
3167
+ // When a audience is activated, they should show their natural state
3168
+ this.experiences.filter(experience => {
3169
+ var _b;
3170
+ return ((_b = experience.audience) === null || _b === void 0 ? void 0 : _b.id) === id;
3171
+ }).forEach(experience => {
3172
+ this.resetExperience(experience.id);
3173
+ });
3167
3174
  this.audienceOverwrites = Object.assign(Object.assign({}, this.audienceOverwrites), {
3168
3175
  [id]: true
3169
3176
  });
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@ninetailed/experience.js-plugin-preview",
3
- "version": "4.0.0-beta.5",
3
+ "version": "4.0.0-beta.6",
4
4
  "module": "./index.js",
5
5
  "main": "./index.cjs",
6
6
  "type": "module",
7
7
  "types": "./index.d.ts",
8
8
  "dependencies": {
9
- "@ninetailed/experience.js-shared": "4.0.0-beta.5",
10
- "@ninetailed/experience.js": "4.0.0-beta.5",
11
- "@ninetailed/experience.js-plugin-analytics": "4.0.0-beta.5",
12
- "@ninetailed/experience.js-utils": "4.0.0-beta.4",
13
- "@ninetailed/experience.js-react": "4.0.0-beta.5",
14
- "@ninetailed/experience.js-preview-bridge": "4.0.0-beta.5",
9
+ "@ninetailed/experience.js-shared": "4.0.0-beta.6",
10
+ "@ninetailed/experience.js": "4.0.0-beta.6",
11
+ "@ninetailed/experience.js-plugin-analytics": "4.0.0-beta.6",
12
+ "@ninetailed/experience.js-utils": "4.0.0-beta.5",
13
+ "@ninetailed/experience.js-react": "4.0.0-beta.6",
14
+ "@ninetailed/experience.js-preview-bridge": "4.0.0-beta.6",
15
15
  "react": "18.2.0",
16
16
  "uuid": "9.0.0"
17
17
  },