@form-engine-ts/mui 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
@@ -15,13 +15,22 @@ import { MuiFormBuilder } from "@form-engine-ts/mui";
15
15
  size: "small",
16
16
  variant: "outlined",
17
17
  dense: true,
18
+ inputFullWidth: true,
19
+ buttonFullWidth: false,
20
+ fieldEditorOptions: { description: "hidden" },
18
21
  getLocaleLabel: (locale) => localeNames[locale] ?? locale,
19
22
  buttonVariants: { primary: "contained", secondary: "outlined", danger: "outlined" }
20
23
  }}
21
24
  layoutOptions={{
22
25
  sectionOrder: ["basicSettings", "completionMessage", "questions", "addQuestion", "localization"]
23
26
  }}
24
- localizationOptions={{ collapsible: true, defaultExpanded: "when-configured" }}
27
+ localizationOptions={{
28
+ collapsible: true,
29
+ defaultExpanded: "when-configured",
30
+ showSummary: true,
31
+ emptyStateMessage: "No translation locales have been added yet.",
32
+ defaultLocaleControl: "readOnly"
33
+ }}
25
34
  muiSlotProps={{ card: { sx: { p: 2 } }, accordion: { elevation: 0 } }}
26
35
  />;
27
36
  ```
@@ -38,8 +47,21 @@ All MUI builder slots use the `FormBuilder` translator for labels, actions, tool
38
47
  `getLocaleLabel` for application-specific locale names. The localization UI excludes `schema.defaultLocale` from its
39
48
  translation tabs and follows `allowedLocales` and `maxLocales` from the builder policy.
40
49
 
41
- `MuiAdapterOptions` defaults to `size: "medium"`, `variant: "outlined"`, `buttonVariant: "contained"`, and
42
- `fullWidth: true`. Set `dense` to reduce section, editor, option, and toolbar spacing. `buttonVariants` can override the
43
- MUI variant for `primary`, `secondary`, and `danger` actions independently. `layoutOptions`, `localizationOptions`, and
44
- `muiSlotProps` are also accepted in `muiOptions` for low-level factories such as `createMuiBuilderSlots`; the dedicated
45
- `MuiFormBuilder` props take precedence.
50
+ Manual edits from the form, field, and option translation controls use the React builder's `setManualTranslation`
51
+ action. Consequently, `createManualTranslationMetadata` receives the same source text and existing metadata for the MUI
52
+ slots as it does for the standard builder.
53
+
54
+ `MuiAdapterOptions` defaults to `size: "medium"`, `variant: "outlined"`, `buttonVariant: "contained"`,
55
+ `inputFullWidth: true`, and `buttonFullWidth: false`. The legacy `fullWidth` option remains the fallback for both new
56
+ width options. `fieldEditorOptions.description` and `localizationOptions.defaultLocaleControl` independently make those
57
+ controls editable, read-only, or hidden. Set `dense` to reduce section, editor, option, and toolbar spacing.
58
+ `buttonVariants` can override the MUI variant for `primary`, `secondary`, and `danger` actions independently.
59
+ `localizationOptions.showSummary` adds a locale summary badge to the localization heading, and
60
+ `localizationOptions.emptyStateMessage` customizes the guidance shown before a translation locale is added. The
61
+ `defaultExpanded` option also accepts `"always"`.
62
+ `layoutOptions`, `localizationOptions`, and `muiSlotProps` are also accepted in `muiOptions` for low-level factories such
63
+ as `createMuiBuilderSlots`; the dedicated `MuiFormBuilder` props take precedence.
64
+
65
+ `MuiFormBuilder` supplies options through `MuiFormBuilderContext` to module-stable adapter and slot component types.
66
+ Controlled schema updates therefore preserve input focus and uncontrolled MUI state such as an open localization
67
+ accordion even when the parent passes inline option objects.