Payload of the change event; flows OUT for API submission/reconcile.
- Package
@sheetwrite/core
- Source
packages/core/src/types/transaction.ts#L160
Members 5
transaction Operations that actually committed after policy and bounds filtering.
transaction: Transactioninterface Transaction {
patches: DocumentOp[];
epoch?: number;
}interface Transaction {
patches: DocumentOp[];
epoch?: number;
}interface Transaction {
patches: DocumentOp[];
epoch?: number;
}Low-level Store transaction. epoch provides optional optimistic concurrency at the storage boundary. Calling Store.applyTransaction bypasses Grid read-only checks and Grid undo/redo history. Host-driven edits should use Grid.applyTransaction.API reference →;
changes Cell-level before/after effects; empty for commits that only change metadata.
changes: CellChangeinterface CellChange {
addr: CellAddress;
oldValue: CellValue;
newValue: CellValue;
oldStyle?: CellStyle;
newStyle?: CellStyle;
}interface CellChange {
addr: CellAddress;
oldValue: CellValue;
newValue: CellValue;
oldStyle?: CellStyle;
newStyle?: CellStyle;
}interface CellChange {
addr: CellAddress;
oldValue: CellValue;
newValue: CellValue;
oldStyle?: CellStyle;
newStyle?: CellStyle;
}One committed cell edit, carrying enough to roll back.API reference →[];
commitReason What produced this commit — see CommitReason.
commitReason: CommitReasontype CommitReason =
| "edit-blur"
| "edit-enter"
| "edit-tab"
| "edit-programmatic"
| "paste"
| "cut"
| "clear"
| "fill"
| "structure"
| "style"
| "replace"
| "undo"
| "redo"
| "api";type CommitReason =
| "edit-blur"
| "edit-enter"
| "edit-tab"
| "edit-programmatic"
| "paste"
| "cut"
| "clear"
| "fill"
| "structure"
| "style"
| "replace"
| "undo"
| "redo"
| "api";type CommitReason =
| "edit-blur"
| "edit-enter"
| "edit-tab"
| "edit-programmatic"
| "paste"
| "cut"
| "clear"
| "fill"
| "structure"
| "style"
| "replace"
| "undo"
| "redo"
| "api";The gesture/operation that produced a committed transaction. Consumers switching on reasons MUST keep a default branch — the union grows with new mutation features.API reference →;
source Remote input is observable but never belongs in outgoing local persistence.
source: OperationSourcetype OperationSource = "local" | "remote";type OperationSource = "local" | "remote";type OperationSource =
"local" | "remote";Whether a committed change originated locally or from remote host input.API reference →;
epoch Store epoch after the commit; emitted store and grid changes include it.
Declaration
View full TypeScript declaration
export interface ChangeEvent {
transaction: Transactioninterface Transaction {
patches: DocumentOp[];
epoch?: number;
}interface Transaction {
patches: DocumentOp[];
epoch?: number;
}interface Transaction {
patches: DocumentOp[];
epoch?: number;
}Low-level Store transaction. epoch provides optional optimistic concurrency at the storage boundary. Calling Store.applyTransaction bypasses Grid read-only checks and Grid undo/redo history. Host-driven edits should use Grid.applyTransaction.API reference →; changes: CellChangeinterface CellChange {
addr: CellAddress;
oldValue: CellValue;
newValue: CellValue;
oldStyle?: CellStyle;
newStyle?: CellStyle;
}interface CellChange {
addr: CellAddress;
oldValue: CellValue;
newValue: CellValue;
oldStyle?: CellStyle;
newStyle?: CellStyle;
}interface CellChange {
addr: CellAddress;
oldValue: CellValue;
newValue: CellValue;
oldStyle?: CellStyle;
newStyle?: CellStyle;
}One committed cell edit, carrying enough to roll back.API reference →[]; commitReason: CommitReasontype CommitReason =
| "edit-blur"
| "edit-enter"
| "edit-tab"
| "edit-programmatic"
| "paste"
| "cut"
| "clear"
| "fill"
| "structure"
| "style"
| "replace"
| "undo"
| "redo"
| "api";type CommitReason =
| "edit-blur"
| "edit-enter"
| "edit-tab"
| "edit-programmatic"
| "paste"
| "cut"
| "clear"
| "fill"
| "structure"
| "style"
| "replace"
| "undo"
| "redo"
| "api";type CommitReason =
| "edit-blur"
| "edit-enter"
| "edit-tab"
| "edit-programmatic"
| "paste"
| "cut"
| "clear"
| "fill"
| "structure"
| "style"
| "replace"
| "undo"
| "redo"
| "api";The gesture/operation that produced a committed transaction. Consumers switching on reasons MUST keep a default branch — the union grows with new mutation features.API reference →; source: OperationSourcetype OperationSource = "local" | "remote";type OperationSource = "local" | "remote";type OperationSource =
"local" | "remote";Whether a committed change originated locally or from remote host input.API reference →;