MongocampVersionConflict
The merge dialog of a version conflict (server 2.3, a versioned declared collection): someone saved the document while it was being edited. Presentational — the parent computes the merge and saves. MongocampCollectionData opens it on a 409 of an edit.
<MongocampVersionConflict
v-model:open="open"
:stored="current"
:merged="applyChanges(current, rebase.changes)"
:conflicts="rebase.conflicts"
:saving="saving"
:error="error"
@apply="saveAgain"
@discard="reload"
/>| Prop | Description |
|---|---|
stored | The document as it is stored now (the 409's current; canonical when the write asked extendedJson: 'canonical', as MongocampCollectionData does) |
merged | The stored document with the user's changes applied — what Apply will store |
conflicts | Paths both sides changed; applying keeps the user's value there |
saving | Apply is running: buttons disabled, the dialog cannot be dismissed |
error | A failure of the last apply, shown in the dialog |
v-model:open | Open state; Keep editing closes only this dialog |
Emits apply and discard. The body is a summary (the overlapping fields, or "your changes do not touch what they changed") and a MongocampDocumentCompare of stored and merged, only differences by default.
Pure part: utils/versionConflict.ts — rebaseChanges(original, mine, current, declaration) → { changes, conflicts, theirs } (server-owned fields are never a conflict; an Extended JSON form difference such as { $numberInt: '1' } vs 1 is no change) and applyChanges(document, changes).
Root class mongocamp-version-conflict (on the dialog content).