You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
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.