Mentions légales du service

Skip to content
Snippets Groups Projects
Commit e647d5ce authored by VIAUD Nathan's avatar VIAUD Nathan
Browse files

Add repeat input action type

parent 63634805
Branches
No related tags found
1 merge request!47Draft: Resolve "Adding undo/redo"
import { GraphEdge } from '@vue-flow/core';
import { Form } from './form.interface';
export interface UndoRedoAction {
type: 'nodeMoved' | 'nodeAdded' | 'nodeRemoved' | 'nodeUpdated' | 'edgeAdded' | 'edgeUpdated' | 'edgeRemoved' | 'formUpdated';
type: 'nodeMoved' | 'nodeAdded' | 'nodeRemoved' | 'nodeUpdated' | 'edgeAdded' | 'edgeUpdated' | 'edgeRemoved' | 'formUpdated' | 'formRepeatUpdated';
}
export interface NodeMovedAction extends UndoRedoAction {
......@@ -40,4 +41,32 @@ export interface FormUpdatedAction extends UndoRedoAction {
formValueId: string;
oldValue: string;
newValue: string;
}
\ No newline at end of file
}
export interface FormRepeatUpdatedAction {
type: 'formRepeatUpdated';
nodeId: string;
elementId: string;
formValueId: string;
repeatId: string;
updateType: 'change' | 'add' | 'remove' | 'move';
}
export interface FormRepeatChangeAction extends FormRepeatUpdatedAction {
updateType: 'change';
oldValue: string;
newValue: string;
index: number;
}
export interface FormRepeatMutateAction extends FormRepeatUpdatedAction {
updateType: 'add' | 'remove';
value: string;
index: number;
}
export interface FormRepeatMoveAction extends FormRepeatUpdatedAction {
updateType: 'move';
oldIndex: number;
newIndex: number;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment