feat(#4): Add comparison for versions, refactor version restoring

This commit is contained in:
2025-11-09 08:17:10 +01:00
parent 81f9f89d94
commit ef440d2970
10 changed files with 473 additions and 45 deletions

View File

@@ -0,0 +1,31 @@
export interface FormDiff {
elementsAdded: ElementChange[]
elementsRemoved: ElementChange[]
elementsModified: ElementModification[]
}
export interface ElementChange {
sectionTitle: string
title: string | undefined
type: string
position: number
}
export interface ElementModification {
sectionTitle: string
position: number
optionsAdded: OptionChange[]
optionsRemoved: OptionChange[]
optionsModified: OptionModification[]
}
export interface OptionChange {
value: string
label: string
}
export interface OptionModification {
value: string
labelChanged: { from: string; to: string }
}