Delete the entity via onDelete. No-op when no id or onDelete handler.
After the graph syncs (entity loads/updates), populate the edit buffer only when the user has not started editing. This preserves in-flight edits across background revalidations.
Called when the host is disconnected from the component tree. For custom
element hosts, this corresponds to the disconnectedCallback() lifecycle,
which is called the host or an ancestor component is disconnected from the
document.
Initialize the edit buffer from the current entity (called after first load completes). No-op if the user already started editing.
Trigger a fresh fetch regardless of staleness (pull-to-refresh, post-save).
Discard the edit buffer and repopulate from the current graph entity.
Persist editBuffer via onSave. Sets isSaving during the call.
On success: clears isDirty / saveError. On failure: sets saveError.
Does NOT write to the graph itself — that is the responsibility of onSave.
Bulk-update the edit buffer (e.g. from a form reset or template apply).
Update the entity id and re-subscribe. Call this when the element's
attribute changes (e.g. from attributeChangedCallback).
Lit 3 ReactiveController for entity create/edit/delete forms.
Provides:
editBuffer— isolated local copy of the entity while editingisDirty— true wheneditBufferdiffers from the graph entityisSaving— true whilesave()is in flightsaveError— string from the last failed savesetField(key, value)— update one field in the buffersave()— callonSave(editBuffer)then sync graph on successreset()— discard buffer and re-sync from graphdeleteEntity()— callonDelete(id)