Skip to content

Release v4.26.0

Choose a tag to compare

@github-actions github-actions released this 07 Oct 04:35
a7eecb3

Added

  • SchemaEditor has a layout prop. 'table' is the existing drill-down table and stays the default; 'tree' shows nested properties inline and applies every edit through onChange, with readOnly for display.
  • Concept-typed properties (concepts, saved as x-concept), a required toggle (allowRequired) and a key toggle (allowKeyProperty, saved as x-key, one key per object). The required and key toggles work in both layouts.
  • Extension points for products that attach their own features to a schema: header, footer, isPropertyProtected, validatePropertyName, onPropertyRenamed and onPropertyRemoved in both layouts; and, in the tree layout, renderPropertyLeading, renderPropertyAccessory, renderPropertyDetails, renderPropertyTypeBadge, getPropertyRowState, selection through selectedPropertyId and onPropertyClick, and a controlled mode with a callback for every edit.
  • New optional SchemaEditorLabels entries for the added controls. Existing labels are unchanged.
  • The property model and the schema conversion helpers (jsonSchemaToProperties, propertiesToJsonSchema, setKeyProperty, setRequiredProperty and the rest) are exported from @cratis/components/SchemaEditor.
  • Documentation for choosing a layout and for the extension points: https://github.com/Cratis/Components/blob/main/Documentation/SchemaEditor/index.md