@founderhq/journeys 0.3.66 → 0.3.67
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.cjs +7 -6
- package/dist/index.js +7 -6
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -753,7 +753,8 @@ function JourneyProvider({
|
|
|
753
753
|
const currentStep = config.steps[currentStepIndex];
|
|
754
754
|
const routing = currentStep.routing;
|
|
755
755
|
if (routing) {
|
|
756
|
-
|
|
756
|
+
const conditions = Array.isArray(routing.conditions) ? routing.conditions : [];
|
|
757
|
+
for (const rule of conditions) {
|
|
757
758
|
if (evaluateRoutingRule(rule, currentAnswers)) {
|
|
758
759
|
const idx = config.steps.findIndex((s) => s.id === rule.goTo);
|
|
759
760
|
if (idx >= 0) return idx;
|
|
@@ -7944,13 +7945,13 @@ function MotionAnimatedBlock({
|
|
|
7944
7945
|
const exitMotion = exitPreset && exitPreset !== "none" ? EXIT_PRESETS[exitPreset] : void 0;
|
|
7945
7946
|
const rawExitDuration = (_b = exitAnim == null ? void 0 : exitAnim.duration) != null ? _b : DEFAULT_EXIT_DURATION_S;
|
|
7946
7947
|
const rawExitDelay = (_c = exitAnim == null ? void 0 : exitAnim.delay) != null ? _c : 0;
|
|
7947
|
-
const exitDuration = rawExitDuration
|
|
7948
|
-
const exitDelay = rawExitDelay
|
|
7948
|
+
const exitDuration = rawExitDuration;
|
|
7949
|
+
const exitDelay = rawExitDelay;
|
|
7949
7950
|
const motionConfig = preset !== "none" ? PRESETS[preset] : null;
|
|
7950
7951
|
const rawDuration = (_d = anim == null ? void 0 : anim.duration) != null ? _d : DEFAULT_DURATION_S;
|
|
7951
7952
|
const rawDelay = (_e = anim == null ? void 0 : anim.delay) != null ? _e : visibleIndex * DEFAULT_STAGGER_S;
|
|
7952
|
-
const duration = rawDuration
|
|
7953
|
-
const delay = rawDelay
|
|
7953
|
+
const duration = rawDuration;
|
|
7954
|
+
const delay = rawDelay;
|
|
7954
7955
|
const delayMs = delay * 1e3;
|
|
7955
7956
|
const [delayedIn, setDelayedIn] = React.useState(delayMs === 0);
|
|
7956
7957
|
React.useEffect(() => {
|
|
@@ -7959,7 +7960,7 @@ function MotionAnimatedBlock({
|
|
|
7959
7960
|
return () => clearTimeout(id);
|
|
7960
7961
|
}, [delayMs]);
|
|
7961
7962
|
const rawAutoHide = exitAnim == null ? void 0 : exitAnim.autoHideAfter;
|
|
7962
|
-
const autoHideS = rawAutoHide != null && rawAutoHide > 0 ? rawAutoHide
|
|
7963
|
+
const autoHideS = rawAutoHide != null && rawAutoHide > 0 ? rawAutoHide : null;
|
|
7963
7964
|
const [autoHidden, setAutoHidden] = React.useState(false);
|
|
7964
7965
|
React.useEffect(() => {
|
|
7965
7966
|
if (autoHideS == null) return;
|
package/dist/index.js
CHANGED
|
@@ -728,7 +728,8 @@ function JourneyProvider({
|
|
|
728
728
|
const currentStep = config.steps[currentStepIndex];
|
|
729
729
|
const routing = currentStep.routing;
|
|
730
730
|
if (routing) {
|
|
731
|
-
|
|
731
|
+
const conditions = Array.isArray(routing.conditions) ? routing.conditions : [];
|
|
732
|
+
for (const rule of conditions) {
|
|
732
733
|
if (evaluateRoutingRule(rule, currentAnswers)) {
|
|
733
734
|
const idx = config.steps.findIndex((s) => s.id === rule.goTo);
|
|
734
735
|
if (idx >= 0) return idx;
|
|
@@ -7919,13 +7920,13 @@ function MotionAnimatedBlock({
|
|
|
7919
7920
|
const exitMotion = exitPreset && exitPreset !== "none" ? EXIT_PRESETS[exitPreset] : void 0;
|
|
7920
7921
|
const rawExitDuration = (_b = exitAnim == null ? void 0 : exitAnim.duration) != null ? _b : DEFAULT_EXIT_DURATION_S;
|
|
7921
7922
|
const rawExitDelay = (_c = exitAnim == null ? void 0 : exitAnim.delay) != null ? _c : 0;
|
|
7922
|
-
const exitDuration = rawExitDuration
|
|
7923
|
-
const exitDelay = rawExitDelay
|
|
7923
|
+
const exitDuration = rawExitDuration;
|
|
7924
|
+
const exitDelay = rawExitDelay;
|
|
7924
7925
|
const motionConfig = preset !== "none" ? PRESETS[preset] : null;
|
|
7925
7926
|
const rawDuration = (_d = anim == null ? void 0 : anim.duration) != null ? _d : DEFAULT_DURATION_S;
|
|
7926
7927
|
const rawDelay = (_e = anim == null ? void 0 : anim.delay) != null ? _e : visibleIndex * DEFAULT_STAGGER_S;
|
|
7927
|
-
const duration = rawDuration
|
|
7928
|
-
const delay = rawDelay
|
|
7928
|
+
const duration = rawDuration;
|
|
7929
|
+
const delay = rawDelay;
|
|
7929
7930
|
const delayMs = delay * 1e3;
|
|
7930
7931
|
const [delayedIn, setDelayedIn] = useState(delayMs === 0);
|
|
7931
7932
|
useEffect(() => {
|
|
@@ -7934,7 +7935,7 @@ function MotionAnimatedBlock({
|
|
|
7934
7935
|
return () => clearTimeout(id);
|
|
7935
7936
|
}, [delayMs]);
|
|
7936
7937
|
const rawAutoHide = exitAnim == null ? void 0 : exitAnim.autoHideAfter;
|
|
7937
|
-
const autoHideS = rawAutoHide != null && rawAutoHide > 0 ? rawAutoHide
|
|
7938
|
+
const autoHideS = rawAutoHide != null && rawAutoHide > 0 ? rawAutoHide : null;
|
|
7938
7939
|
const [autoHidden, setAutoHidden] = useState(false);
|
|
7939
7940
|
useEffect(() => {
|
|
7940
7941
|
if (autoHideS == null) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@founderhq/journeys",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.67",
|
|
4
4
|
"description": "Config-driven interactive journey/questionnaire engine for React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
],
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/ayushnasa/
|
|
30
|
+
"url": "git+https://github.com/ayushnasa/founderhq.git",
|
|
31
31
|
"directory": "packages/journeys"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|