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:
Benjamin Boenisch
2026-02-25 22:26:40 +01:00
parent 16e3c251cc
commit 3efa391de5
4 changed files with 272 additions and 207 deletions

View File

@@ -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])