@form-engine-ts/react 6.0.0 → 6.2.0
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 +10 -3
- package/dist/index.cjs +297 -67
- package/dist/index.d.cts +202 -116
- package/dist/index.d.ts +202 -116
- package/dist/index.js +285 -50
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -89,9 +89,16 @@ underscore-separated values such as `EN_us` are accepted as compatibility input.
|
|
|
89
89
|
Use `isAddLocaleAllowed` to disable locale controls before submission. Removing a locale also clears its
|
|
90
90
|
localized values and metadata; the default locale remains protected.
|
|
91
91
|
|
|
92
|
-
`useTranslationWorkspace`
|
|
93
|
-
`
|
|
94
|
-
|
|
92
|
+
`useTranslationWorkspace` accepts either a synchronous or asynchronous translation adapter, forwards an optional
|
|
93
|
+
`AbortSignal`, and exposes `cancelTranslation`, progress, and typed partial-failure/cancellation errors. It can notify
|
|
94
|
+
`onTranslationStart`, `onTranslationSuccess`, `onTranslationReport`, `onTranslationError`, and `onTranslationChange`
|
|
95
|
+
with typed lifecycle payloads. The MUI workspace accepts a `confirmRemoveLocale` slot for an async confirmation UI;
|
|
96
|
+
its `onConfirm` callback completes the locale removal.
|
|
97
|
+
|
|
98
|
+
`useTranslationComparison` provides a focused, controlled comparison model for form, page, field, and option text.
|
|
99
|
+
Its items expose source text, target text, status, canonical metadata, and path-based `updateTranslation`,
|
|
100
|
+
`translateSingle`, and `translateAll` actions. Comparison row slots receive locale labels, read-only state, field type,
|
|
101
|
+
question and option indexes, plus async single-translation actions.
|
|
95
102
|
|
|
96
103
|
Wrap a builder or renderer in `FormEngineI18nProvider` to supply a UI locale and typed Core translator independently
|
|
97
104
|
from the schema's `defaultLocale` and `supportedLocales`:
|