@stackflow/react
Advanced tools
Comparing version 1.3.0-canary.0 to 1.3.0-canary.1
@@ -27,3 +27,3 @@ "use strict"; | ||
return { | ||
pushStep(stepParams) { | ||
pushStep(stepParams, options) { | ||
var _a; | ||
@@ -33,6 +33,7 @@ const stepId = (0, import_activity.makeStepId)(); | ||
stepId, | ||
stepParams | ||
stepParams, | ||
targetActivityId: options == null ? void 0 : options.targetActivityId | ||
}); | ||
}, | ||
replaceStep(stepParams) { | ||
replaceStep(stepParams, options) { | ||
var _a; | ||
@@ -42,10 +43,13 @@ const stepId = (0, import_activity.makeStepId)(); | ||
stepId, | ||
stepParams | ||
stepParams, | ||
targetActivityId: options == null ? void 0 : options.targetActivityId | ||
}); | ||
}, | ||
popStep() { | ||
popStep(options) { | ||
var _a; | ||
(_a = getCoreActions()) == null ? void 0 : _a.stepPop({}); | ||
(_a = getCoreActions()) == null ? void 0 : _a.stepPop({ | ||
targetActivityId: options == null ? void 0 : options.targetActivityId | ||
}); | ||
} | ||
}; | ||
} |
import { makeStepId } from "../__internal__/activity"; | ||
function makeStepActions(getCoreActions) { | ||
return { | ||
pushStep(stepParams) { | ||
pushStep(stepParams, options) { | ||
var _a; | ||
@@ -9,6 +9,7 @@ const stepId = makeStepId(); | ||
stepId, | ||
stepParams | ||
stepParams, | ||
targetActivityId: options == null ? void 0 : options.targetActivityId | ||
}); | ||
}, | ||
replaceStep(stepParams) { | ||
replaceStep(stepParams, options) { | ||
var _a; | ||
@@ -18,8 +19,11 @@ const stepId = makeStepId(); | ||
stepId, | ||
stepParams | ||
stepParams, | ||
targetActivityId: options == null ? void 0 : options.targetActivityId | ||
}); | ||
}, | ||
popStep() { | ||
popStep(options) { | ||
var _a; | ||
(_a = getCoreActions()) == null ? void 0 : _a.stepPop({}); | ||
(_a = getCoreActions()) == null ? void 0 : _a.stepPop({ | ||
targetActivityId: options == null ? void 0 : options.targetActivityId | ||
}); | ||
} | ||
@@ -26,0 +30,0 @@ }; |
{ | ||
"name": "@stackflow/react", | ||
"version": "1.3.0-canary.0", | ||
"version": "1.3.0-canary.1", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -10,3 +10,8 @@ import type { ActivityBaseParams } from "@stackflow/config"; | ||
return { | ||
pushStep(stepParams) { | ||
pushStep( | ||
stepParams, | ||
options?: { | ||
targetActivityId?: string; | ||
}, | ||
) { | ||
const stepId = makeStepId(); | ||
@@ -17,5 +22,11 @@ | ||
stepParams, | ||
targetActivityId: options?.targetActivityId, | ||
}); | ||
}, | ||
replaceStep(stepParams) { | ||
replaceStep( | ||
stepParams, | ||
options?: { | ||
targetActivityId?: string; | ||
}, | ||
) { | ||
const stepId = makeStepId(); | ||
@@ -26,8 +37,13 @@ | ||
stepParams, | ||
targetActivityId: options?.targetActivityId, | ||
}); | ||
}, | ||
popStep() { | ||
getCoreActions()?.stepPop({}); | ||
popStep(options?: { | ||
targetActivityId?: string; | ||
}) { | ||
getCoreActions()?.stepPop({ | ||
targetActivityId: options?.targetActivityId, | ||
}); | ||
}, | ||
}; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
254716
5649