@ninetailed/experience.js-plugin-preview 4.0.0-beta.7 → 4.0.0-beta.9
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/index.cjs +7 -5
- package/index.js +7 -5
- package/package.json +7 -7
package/index.cjs
CHANGED
|
@@ -3186,6 +3186,10 @@ class NinetailedPreviewPlugin extends experience_jsPluginAnalytics.NinetailedPlu
|
|
|
3186
3186
|
console.log(`You cannot activate an unkown audience (id: ${id}).`);
|
|
3187
3187
|
return;
|
|
3188
3188
|
}
|
|
3189
|
+
this.audienceOverwrites = Object.assign(Object.assign({}, this.audienceOverwrites), {
|
|
3190
|
+
[id]: true
|
|
3191
|
+
});
|
|
3192
|
+
this.onChange();
|
|
3189
3193
|
// When a audience is activated, they should show their natural state
|
|
3190
3194
|
this.experiences.filter(experience => {
|
|
3191
3195
|
var _b;
|
|
@@ -3193,10 +3197,6 @@ class NinetailedPreviewPlugin extends experience_jsPluginAnalytics.NinetailedPlu
|
|
|
3193
3197
|
}).forEach(experience => {
|
|
3194
3198
|
this.resetExperience(experience.id);
|
|
3195
3199
|
});
|
|
3196
|
-
this.audienceOverwrites = Object.assign(Object.assign({}, this.audienceOverwrites), {
|
|
3197
|
-
[id]: true
|
|
3198
|
-
});
|
|
3199
|
-
this.onChange();
|
|
3200
3200
|
}
|
|
3201
3201
|
deactivateAudience(id) {
|
|
3202
3202
|
if (!this.isKnownAudience(id)) {
|
|
@@ -3335,7 +3335,9 @@ class NinetailedPreviewPlugin extends experience_jsPluginAnalytics.NinetailedPlu
|
|
|
3335
3335
|
const matchedExperiences = eligibleExperiences.filter(experience => experience_js.isExperienceMatch({
|
|
3336
3336
|
experience,
|
|
3337
3337
|
activeExperiments,
|
|
3338
|
-
profile
|
|
3338
|
+
profile: Object.assign(Object.assign({}, profile), {
|
|
3339
|
+
audiences: this.activeAudiences
|
|
3340
|
+
})
|
|
3339
3341
|
}));
|
|
3340
3342
|
return matchedExperiences.reduce((acc, experience) => {
|
|
3341
3343
|
const distribution = experience_js.selectDistribution({
|
package/index.js
CHANGED
|
@@ -3164,6 +3164,10 @@ class NinetailedPreviewPlugin extends NinetailedPlugin {
|
|
|
3164
3164
|
console.log(`You cannot activate an unkown audience (id: ${id}).`);
|
|
3165
3165
|
return;
|
|
3166
3166
|
}
|
|
3167
|
+
this.audienceOverwrites = Object.assign(Object.assign({}, this.audienceOverwrites), {
|
|
3168
|
+
[id]: true
|
|
3169
|
+
});
|
|
3170
|
+
this.onChange();
|
|
3167
3171
|
// When a audience is activated, they should show their natural state
|
|
3168
3172
|
this.experiences.filter(experience => {
|
|
3169
3173
|
var _b;
|
|
@@ -3171,10 +3175,6 @@ class NinetailedPreviewPlugin extends NinetailedPlugin {
|
|
|
3171
3175
|
}).forEach(experience => {
|
|
3172
3176
|
this.resetExperience(experience.id);
|
|
3173
3177
|
});
|
|
3174
|
-
this.audienceOverwrites = Object.assign(Object.assign({}, this.audienceOverwrites), {
|
|
3175
|
-
[id]: true
|
|
3176
|
-
});
|
|
3177
|
-
this.onChange();
|
|
3178
3178
|
}
|
|
3179
3179
|
deactivateAudience(id) {
|
|
3180
3180
|
if (!this.isKnownAudience(id)) {
|
|
@@ -3313,7 +3313,9 @@ class NinetailedPreviewPlugin extends NinetailedPlugin {
|
|
|
3313
3313
|
const matchedExperiences = eligibleExperiences.filter(experience => isExperienceMatch({
|
|
3314
3314
|
experience,
|
|
3315
3315
|
activeExperiments,
|
|
3316
|
-
profile
|
|
3316
|
+
profile: Object.assign(Object.assign({}, profile), {
|
|
3317
|
+
audiences: this.activeAudiences
|
|
3318
|
+
})
|
|
3317
3319
|
}));
|
|
3318
3320
|
return matchedExperiences.reduce((acc, experience) => {
|
|
3319
3321
|
const distribution = selectDistribution({
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ninetailed/experience.js-plugin-preview",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.9",
|
|
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.
|
|
10
|
-
"@ninetailed/experience.js": "4.0.0-beta.
|
|
11
|
-
"@ninetailed/experience.js-plugin-analytics": "4.0.0-beta.
|
|
12
|
-
"@ninetailed/experience.js-utils": "4.0.0-beta.
|
|
13
|
-
"@ninetailed/experience.js-react": "4.0.0-beta.
|
|
14
|
-
"@ninetailed/experience.js-preview-bridge": "4.0.0-beta.
|
|
9
|
+
"@ninetailed/experience.js-shared": "4.0.0-beta.9",
|
|
10
|
+
"@ninetailed/experience.js": "4.0.0-beta.9",
|
|
11
|
+
"@ninetailed/experience.js-plugin-analytics": "4.0.0-beta.9",
|
|
12
|
+
"@ninetailed/experience.js-utils": "4.0.0-beta.8",
|
|
13
|
+
"@ninetailed/experience.js-react": "4.0.0-beta.9",
|
|
14
|
+
"@ninetailed/experience.js-preview-bridge": "4.0.0-beta.9",
|
|
15
15
|
"react": "18.2.0",
|
|
16
16
|
"uuid": "9.0.0"
|
|
17
17
|
},
|