feat(sdk): add global seq numbering and visibleWhen for SDK flow navigation
Fix interleaved step ordering by introducing global sequence numbers (100-4700) instead of package-relative order. Add conditional visibility (visibleWhen) for optional steps like Import and DSFA. Fix TOM/workflow prerequisite bugs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -99,6 +99,9 @@ const initialState: SDKState = {
|
||||
dsrConfig: null,
|
||||
escalationWorkflows: [],
|
||||
|
||||
// IACE (Industrial AI Compliance Engine)
|
||||
iaceProjects: [],
|
||||
|
||||
// Security
|
||||
sbom: null,
|
||||
securityIssues: [],
|
||||
@@ -705,26 +708,26 @@ export function SDKProvider({
|
||||
)
|
||||
|
||||
const goToNextStep = useCallback(() => {
|
||||
const nextStep = getNextStep(state.currentStep)
|
||||
const nextStep = getNextStep(state.currentStep, state)
|
||||
if (nextStep) {
|
||||
goToStep(nextStep.id)
|
||||
}
|
||||
}, [state.currentStep, goToStep])
|
||||
}, [state, goToStep])
|
||||
|
||||
const goToPreviousStep = useCallback(() => {
|
||||
const prevStep = getPreviousStep(state.currentStep)
|
||||
const prevStep = getPreviousStep(state.currentStep, state)
|
||||
if (prevStep) {
|
||||
goToStep(prevStep.id)
|
||||
}
|
||||
}, [state.currentStep, goToStep])
|
||||
}, [state, goToStep])
|
||||
|
||||
const canGoNext = useMemo(() => {
|
||||
return getNextStep(state.currentStep) !== undefined
|
||||
}, [state.currentStep])
|
||||
return getNextStep(state.currentStep, state) !== undefined
|
||||
}, [state])
|
||||
|
||||
const canGoPrevious = useMemo(() => {
|
||||
return getPreviousStep(state.currentStep) !== undefined
|
||||
}, [state.currentStep])
|
||||
return getPreviousStep(state.currentStep, state) !== undefined
|
||||
}, [state])
|
||||
|
||||
// Progress
|
||||
const completionPercentage = useMemo(() => getCompletionPercentage(state), [state])
|
||||
|
||||
Reference in New Issue
Block a user