@ninetailed/experience.js 7.7.4-beta.0 → 7.8.0-beta.2
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.js
CHANGED
|
@@ -527,7 +527,7 @@ const makeExperienceSelectMiddleware = ({
|
|
|
527
527
|
const middlewareFunctions = pluginsWithMiddleware.map(plugin => plugin.getExperienceSelectionMiddleware({
|
|
528
528
|
experiences,
|
|
529
529
|
baseline
|
|
530
|
-
}))
|
|
530
|
+
}));
|
|
531
531
|
return experience_jsShared.pipe(...middlewareFunctions);
|
|
532
532
|
};
|
|
533
533
|
const middleware = prepareMiddleware();
|
|
@@ -958,7 +958,10 @@ class Ninetailed {
|
|
|
958
958
|
})));
|
|
959
959
|
return;
|
|
960
960
|
}
|
|
961
|
-
const
|
|
961
|
+
const experienceWithStickyFromExperienceApi = Object.assign(Object.assign({}, experience), {
|
|
962
|
+
sticky: selectedExperience.sticky
|
|
963
|
+
});
|
|
964
|
+
const baselineVariants = experience_jsShared.selectBaselineWithVariants(experienceWithStickyFromExperienceApi, baseline);
|
|
962
965
|
if (!baselineVariants) {
|
|
963
966
|
setSelectedVariant(overrideResult(Object.assign(Object.assign({}, emptyReturn), {
|
|
964
967
|
loading: false,
|
|
@@ -983,7 +986,7 @@ class Ninetailed {
|
|
|
983
986
|
status: 'success',
|
|
984
987
|
loading: false,
|
|
985
988
|
error: null,
|
|
986
|
-
experience,
|
|
989
|
+
experience: experienceWithStickyFromExperienceApi,
|
|
987
990
|
variant,
|
|
988
991
|
variantIndex: selectedExperience.variantIndex,
|
|
989
992
|
audience: experience.audience ? experience.audience : null,
|
package/index.esm.js
CHANGED
|
@@ -491,7 +491,7 @@ const makeExperienceSelectMiddleware = ({
|
|
|
491
491
|
const middlewareFunctions = pluginsWithMiddleware.map(plugin => plugin.getExperienceSelectionMiddleware({
|
|
492
492
|
experiences,
|
|
493
493
|
baseline
|
|
494
|
-
}))
|
|
494
|
+
}));
|
|
495
495
|
return pipe(...middlewareFunctions);
|
|
496
496
|
};
|
|
497
497
|
const middleware = prepareMiddleware();
|
|
@@ -940,7 +940,10 @@ class Ninetailed {
|
|
|
940
940
|
})));
|
|
941
941
|
return;
|
|
942
942
|
}
|
|
943
|
-
const
|
|
943
|
+
const experienceWithStickyFromExperienceApi = Object.assign({}, experience, {
|
|
944
|
+
sticky: selectedExperience.sticky
|
|
945
|
+
});
|
|
946
|
+
const baselineVariants = selectBaselineWithVariants(experienceWithStickyFromExperienceApi, baseline);
|
|
944
947
|
if (!baselineVariants) {
|
|
945
948
|
setSelectedVariant(overrideResult(Object.assign({}, emptyReturn, {
|
|
946
949
|
loading: false,
|
|
@@ -965,7 +968,7 @@ class Ninetailed {
|
|
|
965
968
|
status: 'success',
|
|
966
969
|
loading: false,
|
|
967
970
|
error: null,
|
|
968
|
-
experience,
|
|
971
|
+
experience: experienceWithStickyFromExperienceApi,
|
|
969
972
|
variant,
|
|
970
973
|
variantIndex: selectedExperience.variantIndex,
|
|
971
974
|
audience: experience.audience ? experience.audience : null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ninetailed/experience.js",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.0-beta.2",
|
|
4
4
|
"description": "Ninetailed SDK for javascript",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"directory": "packages/sdks/javascript"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@ninetailed/experience.js-plugin-analytics": "7.
|
|
13
|
-
"@ninetailed/experience.js-shared": "7.
|
|
12
|
+
"@ninetailed/experience.js-plugin-analytics": "7.8.0-beta.2",
|
|
13
|
+
"@ninetailed/experience.js-shared": "7.8.0-beta.2",
|
|
14
14
|
"analytics": "0.8.1",
|
|
15
15
|
"uuid": "9.0.0"
|
|
16
16
|
},
|
|
@@ -9,7 +9,7 @@ type BuildExperienceSelectionMiddlewareArg<TVariant extends Reference> = {
|
|
|
9
9
|
experiences: ExperienceConfiguration<TVariant>[];
|
|
10
10
|
baseline: Reference;
|
|
11
11
|
};
|
|
12
|
-
export type BuildExperienceSelectionMiddleware<TBaseline extends Reference, TVariant extends Reference> = (arg: BuildExperienceSelectionMiddlewareArg<TVariant>) => ExperienceSelectionMiddleware<TBaseline, TVariant
|
|
12
|
+
export type BuildExperienceSelectionMiddleware<TBaseline extends Reference, TVariant extends Reference> = (arg: BuildExperienceSelectionMiddlewareArg<TVariant>) => ExperienceSelectionMiddleware<TBaseline, TVariant>;
|
|
13
13
|
export interface HasExperienceSelectionMiddleware<TBaseline extends Reference, TVariant extends Reference> {
|
|
14
14
|
getExperienceSelectionMiddleware: BuildExperienceSelectionMiddleware<TBaseline, TVariant>;
|
|
15
15
|
}
|