@form-engine-ts/react 2.9.4 → 2.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -81,6 +81,11 @@ relevant feature state, while localization slots receive policy and translation-
81
81
  editors remain unchanged. A slot collection can set `sectionOrder` to arrange `basicSettings`, `completionMessage`,
82
82
  `questions`, `addQuestion`, and `localization` as independent authoring sections.
83
83
 
84
+ Slot actions include `setManualTranslation(locale, target, property, text)`. It resolves the target's source text and
85
+ existing translation metadata, invokes `createManualTranslationMetadata`, and then stores the translated text and
86
+ generated metadata together. Custom field, page, option, and localization slots should use this action for user-edited
87
+ translations; `setLocaleTranslation` remains available for callers that already provide explicit metadata.
88
+
84
89
  Input primitives receive design-system-friendly `name`, `label`, `required`, `error`, and `helperText` props in addition
85
90
  to their normalized string-value callbacks. The `translationActions` slot also receives `translationError`, the latest
86
91
  `translationReport`, and `onClearTranslationError`, allowing a custom MUI action surface to represent the complete
@@ -114,8 +119,8 @@ own labels. Builder action icons can be supplied with `renderIcon`, which resolv
114
119
  renderHeader: ({ title }) => <MyHeader>{title}</MyHeader>,
115
120
  renderPageHeader: ({ page }) => <MyPageHeader page={page} />,
116
121
  renderField: (props) => <MyField {...props} />,
117
- renderSubmitButton: ({ isSubmitting, onSubmit }) => (
118
- <MyButton disabled={isSubmitting} onClick={onSubmit}>Save</MyButton>
122
+ renderSubmitButton: ({ isSubmitting, disabled, onSubmit }) => (
123
+ <MyButton loading={isSubmitting} disabled={disabled} onClick={onSubmit}>Save</MyButton>
119
124
  ),
120
125
  renderSubmitError: ({ error, onRetry }) => <MyError error={error} onRetry={onRetry} />
121
126
  }}
@@ -124,7 +129,11 @@ own labels. Builder action icons can be supplied with `renderIcon`, which resolv
124
129
 
125
130
  Validation runs before `beforeSubmit`. A `"cancel"` result does not call `onSubmit` and preserves values and drafts.
126
131
  Header, page-header, field, navigation, submit, validation-summary, completion, and submit-error slots can replace the
127
- default UI. The localized `completionMessage` is displayed after a successful submission.
132
+ default UI. The localized `completionMessage` is displayed after a successful submission. Set
133
+ `successRenderMode="replace"` to remove the questions, navigation, and submit button after success and focus the
134
+ completion status region; the default `"append"` mode preserves the existing form UI. `hideFormOnSuccess` is retained
135
+ as a deprecated alias for `successRenderMode="replace"`. The submit-button slot receives `submitStatus` and `disabled`
136
+ in addition to `isSubmitting` and `onSubmit`.
128
137
 
129
138
  Pass ordered `submissionGuards` to allow, block, or require confirmation before `onSubmit`. Confirmation receives all
130
139
  guard findings through `renderSubmissionConfirmation`. A `receiptStore` prevents accidental repeat submissions and can
@@ -143,3 +152,11 @@ preserved. Pass an SSR-safe `createLocalStorageSubmissionAttemptStore()` as `att
143
152
  before submission. Renderer injects it as `attemptId` and `submissionId`, retains it after a failed request, promotes it
144
153
  to the receipt after success, and then clears the attempt. Custom receipt stores may omit `getBatch`; the hook falls back
145
154
  to concurrent `get` calls.
155
+
156
+ After success, completion rendering receives a snapshot of `answers`, `schema`, the optional response, and
157
+ `submittedItems`. Each summary item includes the field title, raw value, formatted display value, visibility, and field
158
+ metadata. Use `renderSubmittedValues` for a typed summary slot; hidden fields are omitted by default and can be included
159
+ with `showHiddenFieldsInSummary`. Server validation can be returned by throwing `FormSubmissionError` with `fieldErrors`
160
+ and `formError`; field messages are mapped back to the form and the first invalid control is focused. Use
161
+ `submissionConfirmationRenderMode="replace"` or `"dialog"` for alternate confirmation presentations, and
162
+ `fieldsClassName` or `renderFields` to control the fields wrapper.