Add interactive questionnaire editor and typed save payloads
This commit is contained in:
@@ -175,7 +175,16 @@ Continue/Submit operations. Submission failures are displayed for retry.
|
||||
Without an `onSave` handler the renderer operates in memory, emits `Changed`
|
||||
events, and does not advance a server revision. With a handler it emits `Saved`
|
||||
after success or `Blocked` on failure. Events contain transport-independent
|
||||
`data` (changes, resume position, revision, trigger), not HTTP requests.
|
||||
`data`, not HTTP requests. Requests and events have a `kind`: `changes` requests
|
||||
carry `changes` without a resume position; `focus` requests carry `resume`
|
||||
without answer changes. Both include `revision` and `trigger`. A save that
|
||||
updates answers and position sends two serialized requests, using the revision
|
||||
acknowledged by the first request for the second. The demo displays them in
|
||||
separate Changes and Focus lists.
|
||||
Each answer in `changes` and in the resume editor's `answers` uses a typed
|
||||
entry, for example `"dateOfBirth": { "type": "date", "value": "1992-03-04" }`.
|
||||
Cleared answers retain their field type with `value: null`. `parseResumeDraft`
|
||||
validates typed entries and also accepts older drafts containing plain values.
|
||||
`SaveResponse` contains only the confirmed revision.
|
||||
|
||||
The built-in file input requires `onUpload(questionId, files)` for nonempty
|
||||
|
||||
Reference in New Issue
Block a user