@ninetailed/experience.js-plugin-preview 4.0.0-beta.3 → 4.0.0-beta.4
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 -4
- package/index.js +7 -4
- package/lib/plugin/NinetailedPreviewPlugin.d.ts +1 -1
- package/package.json +7 -7
package/index.cjs
CHANGED
|
@@ -3205,7 +3205,10 @@ class NinetailedPreviewPlugin extends experience_jsPluginAnalytics.NinetailedPlu
|
|
|
3205
3205
|
var _b;
|
|
3206
3206
|
return ((_b = experience.audience) === null || _b === void 0 ? void 0 : _b.id) === id;
|
|
3207
3207
|
}).forEach(experience => {
|
|
3208
|
-
this.
|
|
3208
|
+
this.setExperienceVariant({
|
|
3209
|
+
experienceId: experience.id,
|
|
3210
|
+
variantIndex: 0
|
|
3211
|
+
});
|
|
3209
3212
|
});
|
|
3210
3213
|
}
|
|
3211
3214
|
resetAudience(id) {
|
|
@@ -3220,7 +3223,7 @@ class NinetailedPreviewPlugin extends experience_jsPluginAnalytics.NinetailedPlu
|
|
|
3220
3223
|
this.audienceOverwrites = audienceOverwrites;
|
|
3221
3224
|
this.onChange();
|
|
3222
3225
|
}
|
|
3223
|
-
|
|
3226
|
+
setExperienceVariant({
|
|
3224
3227
|
experienceId,
|
|
3225
3228
|
variantIndex
|
|
3226
3229
|
}) {
|
|
@@ -3274,7 +3277,7 @@ class NinetailedPreviewPlugin extends experience_jsPluginAnalytics.NinetailedPlu
|
|
|
3274
3277
|
apiAudiences: ((_b = this.profile) === null || _b === void 0 ? void 0 : _b.audiences) || [],
|
|
3275
3278
|
audienceOverwrites: this.audienceOverwrites,
|
|
3276
3279
|
activeAudiences: this.activeAudiences,
|
|
3277
|
-
setExperienceVariant: this.
|
|
3280
|
+
setExperienceVariant: this.setExperienceVariant.bind(this),
|
|
3278
3281
|
resetExperience: this.resetExperience.bind(this),
|
|
3279
3282
|
experienceVariantIndexes: Object.assign(Object.assign({}, this.experienceVariantIndexes), this.experienceVariantIndexOverwrites),
|
|
3280
3283
|
experienceVariantIndexOverwrites: this.experienceVariantIndexOverwrites,
|
|
@@ -3292,7 +3295,7 @@ class NinetailedPreviewPlugin extends experience_jsPluginAnalytics.NinetailedPlu
|
|
|
3292
3295
|
deactivateAudience: this.deactivateAudience.bind(this),
|
|
3293
3296
|
resetAudience: this.resetAudience.bind(this),
|
|
3294
3297
|
activeAudiences: this.activeAudiences,
|
|
3295
|
-
setExperienceVariant: this.
|
|
3298
|
+
setExperienceVariant: this.setExperienceVariant.bind(this),
|
|
3296
3299
|
resetExperience: this.resetExperience.bind(this),
|
|
3297
3300
|
experienceVariantIndexes: Object.assign(Object.assign({}, this.experienceVariantIndexes), this.experienceVariantIndexOverwrites)
|
|
3298
3301
|
};
|
package/index.js
CHANGED
|
@@ -3183,7 +3183,10 @@ class NinetailedPreviewPlugin extends NinetailedPlugin {
|
|
|
3183
3183
|
var _b;
|
|
3184
3184
|
return ((_b = experience.audience) === null || _b === void 0 ? void 0 : _b.id) === id;
|
|
3185
3185
|
}).forEach(experience => {
|
|
3186
|
-
this.
|
|
3186
|
+
this.setExperienceVariant({
|
|
3187
|
+
experienceId: experience.id,
|
|
3188
|
+
variantIndex: 0
|
|
3189
|
+
});
|
|
3187
3190
|
});
|
|
3188
3191
|
}
|
|
3189
3192
|
resetAudience(id) {
|
|
@@ -3198,7 +3201,7 @@ class NinetailedPreviewPlugin extends NinetailedPlugin {
|
|
|
3198
3201
|
this.audienceOverwrites = audienceOverwrites;
|
|
3199
3202
|
this.onChange();
|
|
3200
3203
|
}
|
|
3201
|
-
|
|
3204
|
+
setExperienceVariant({
|
|
3202
3205
|
experienceId,
|
|
3203
3206
|
variantIndex
|
|
3204
3207
|
}) {
|
|
@@ -3252,7 +3255,7 @@ class NinetailedPreviewPlugin extends NinetailedPlugin {
|
|
|
3252
3255
|
apiAudiences: ((_b = this.profile) === null || _b === void 0 ? void 0 : _b.audiences) || [],
|
|
3253
3256
|
audienceOverwrites: this.audienceOverwrites,
|
|
3254
3257
|
activeAudiences: this.activeAudiences,
|
|
3255
|
-
setExperienceVariant: this.
|
|
3258
|
+
setExperienceVariant: this.setExperienceVariant.bind(this),
|
|
3256
3259
|
resetExperience: this.resetExperience.bind(this),
|
|
3257
3260
|
experienceVariantIndexes: Object.assign(Object.assign({}, this.experienceVariantIndexes), this.experienceVariantIndexOverwrites),
|
|
3258
3261
|
experienceVariantIndexOverwrites: this.experienceVariantIndexOverwrites,
|
|
@@ -3270,7 +3273,7 @@ class NinetailedPreviewPlugin extends NinetailedPlugin {
|
|
|
3270
3273
|
deactivateAudience: this.deactivateAudience.bind(this),
|
|
3271
3274
|
resetAudience: this.resetAudience.bind(this),
|
|
3272
3275
|
activeAudiences: this.activeAudiences,
|
|
3273
|
-
setExperienceVariant: this.
|
|
3276
|
+
setExperienceVariant: this.setExperienceVariant.bind(this),
|
|
3274
3277
|
resetExperience: this.resetExperience.bind(this),
|
|
3275
3278
|
experienceVariantIndexes: Object.assign(Object.assign({}, this.experienceVariantIndexes), this.experienceVariantIndexOverwrites)
|
|
3276
3279
|
};
|
|
@@ -40,7 +40,7 @@ export declare class NinetailedPreviewPlugin extends NinetailedPlugin {
|
|
|
40
40
|
activateAudience(id: string): void;
|
|
41
41
|
deactivateAudience(id: string): void;
|
|
42
42
|
resetAudience(id: string): void;
|
|
43
|
-
|
|
43
|
+
setExperienceVariant({ experienceId, variantIndex, }: {
|
|
44
44
|
experienceId: string;
|
|
45
45
|
variantIndex: number;
|
|
46
46
|
}): void;
|
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.4",
|
|
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.4",
|
|
10
|
+
"@ninetailed/experience.js": "4.0.0-beta.4",
|
|
11
|
+
"@ninetailed/experience.js-plugin-analytics": "4.0.0-beta.4",
|
|
12
|
+
"@ninetailed/experience.js-utils": "4.0.0-beta.3",
|
|
13
|
+
"@ninetailed/experience.js-react": "4.0.0-beta.4",
|
|
14
|
+
"@ninetailed/experience.js-preview-bridge": "4.0.0-beta.4",
|
|
15
15
|
"react": "18.2.0",
|
|
16
16
|
"uuid": "9.0.0"
|
|
17
17
|
},
|