Skip to content

Releases: rjsf-team/react-jsonschema-form

5.8.1

06 Jun 21:15
Compare
Choose a tag to compare

Dev / docs / playground

  • Updated peer dependencies in all packages to ^5.8.x

5.8.0

06 Jun 00:34
Compare
Choose a tag to compare

New feature

  • Optional support for Markdown in descriptions

@rjsf/bootstrap-4

  • Updated FieldTemplate Component to display description from SchemaField and make it consistent for all the available themes

@rjsf/chakra-ui

  • Updated FieldTemplate Component to display description from SchemaField and make it consistent for all the available themes

@rjsf/core

  • Updated SchemaField to be able to render markdown in the description field
  • Updated MultiSchemaField.getMatchingOption to use option index from getClosestMatchingOption, fixing #3693 and
    #3705

@rjsf/fluent-ui

  • Updated FieldTemplate Component to display description from SchemaField and make it consistent for all the available themes

@rjsf/material-ui

  • Updated FieldTemplate Component to display description from SchemaField and make it consistent for all the available themes

@rjsf/mui

  • Updated FieldTemplate Component to display description from SchemaField and make it consistent for all the available themes

@rjsf/semantic-ui

  • Updated FieldTemplate Component to display description from SchemaField and make it consistent for all the available themes

@rjsf/utils

  • Updated getClosestMatchingOption to return selected option if all options score the same, fixing #3693 and #3705
  • Updated resolveCondition to default formData as empty object when evaluating if expression, fixing #3706
  • Updated retrieveSchemaInternal to return failed merged allOf sub schemas for expandAllBranches flag, fixing #3689
  • Updated hashForSchema to sort schema fields in consistent order before stringify to prevent different hash ids for the same schema
  • Updated enumOptionsSelectValue to allow picking falsy enumOptions, fixing #3716

@rjsf/validator-ajv8

  • Updated AJV8PrecompiledValidator.rawValidation() to use resolve root schema when comparing input schema, fixing #3708

Dev / docs / playground

  • Updated sample data and documentation about the markdown in RJSFSchema description
  • Fixed broken playground examples (#3696)
  • Added experimental_defaultFormStateBehavior.emptyObjectFields control to Playground
  • Fixed bug where subthemes would not appear in Playground

5.7.3

25 May 18:01
Compare
Choose a tag to compare

@rjsf/utils

  • Updated getClosestMatchingOption JUNK_OPTION schema with a well known $id
  • Updated schemaParser to resolve array items field, fixing #3689

@rjsf/validator-ajv8

  • Updated AJV8PrecompiledValidator.isValid() to return false for junk schema option, fixing #3677

5.7.2

16 May 06:55
Compare
Choose a tag to compare

@rjsf/validator-ajv8

  • Removed the importing of internal ajv types by simplifying the CompiledValidateFunction type to avoid a bunch of Typescript errors encountered by users of the package

5.7.1

16 May 00:01
Compare
Choose a tag to compare

@rjsf/core

  • Added protection against a null field in the focusOnError method in Form

@rjsf/validator-ajv8

  • Updated the build for all but the cjs development version, to not export the compileSchemaValidators() function to avoid "Module not found: Can't resolve 'fs' error" issues, fixing #3668

Dev / docs / playground

  • Updated the validation documentation to add a note with a web-resource to help folks work around the "Module not found: Can't resolve 'fs' error" issue for development environments
  • Updated all of the package-lock.json files to bump peer-dependencies to 5.7.x, fixing #3669

5.7.0

13 May 07:38
Compare
Choose a tag to compare

3 new features

  • Added experimental_defaultFormStateBehavior prop to Form to support alternate default form state behaviors
  • Added support for precompiled schemas in validator-ajv8
  • Added support for additionalProperties to fluent-ui theme while upgrading support to version 8 (backwards compatible with 7)

@rjsf/antd

  • Fix #3608 by ensuring the root field is always wrapped in Form.Item
  • Fix #3594 by removing the duplicate title for SelectWidget and description for CheckboxWidget

@rjsf/core

  • Updated the MultiSchemaField to use the new getDiscriminatorFieldFromSchema() API
  • Added new experimental_defaultFormStateBehavior prop to Form
    • to specify alternate behavior when dealing with the rendering of array fields where minItems is set but field is not required (fixes #3363) (#3602)
    • to handle setting object defaults based on the value of emptyObjectFields supporting required fields only and skipping defaults entirely, fixing #2980
  • Fixed regression #3650 in FileWidget to again support adding multiple files to arrays

@rjsf/fluent-ui

  • Added support for additionalProperties to fluent-ui theme, fixing #2777.
  • Upgraded to 8.x version of @fluentui/react maintaining backwards compatibility to version 7, fixing #3463

@rjsf/utils

  • Added two new APIs getDiscriminatorFieldFromSchema() (a refactor of code from MultiSchemaField) and hashForSchema()
    • Updated getDefaultFormState() and toPathSchema() to use getDiscriminatorFieldFromSchema() to provide a discriminator field to getClosestMatchingOption() calls.
  • Refactored the retrieveSchema() internal API functions to support implementing an internal schemaParser() API for use in precompiling schemas, in support of #3543
  • Fixed toPathSchema() to handle properties in an object along with anyOf/oneOf, fixing #3628 and #1628
  • Refactored optional parameters for computeDefaults() into destructured props object to reduce clutter when only specifying later of the optional argument, fixing #3602
  • Fixed computeDefaults() to handle $ref in an object along with anyOf/oneOf, fixing #3633

@rjsf/validator-ajv8

  • Added two new APIs compileSchemaValidators() and createPrecompiledValidator() implemented to support using precompiled validators build with AJV 8, fixing #3543

Dev / docs / playground

  • Added documentation to custom-templates describing how to extend the BaseInputTemplate
  • Added minItems behavior for array field live setting, fixing #3602
  • Upgraded playground to 8.x version of @fluentui/react, fixing #3463
  • Added documentation to validation describing the new precompiled validators feature
  • Added new validator-ajv8.md documentation to the api-reference directory as well as putting it into the sidebar.js

5.6.2

19 Apr 01:02
Compare
Choose a tag to compare

Dev / docs / playground

  • Fixed issues with post-versioning that caused the 5.6.1 branch to not be publishable

5.6.1

17 Apr 22:40
Compare
Choose a tag to compare

This version failed to publish

  • Updated minor and patch dependencies to latest while fixing peer dependencies

Dev / docs / playground

  • Updated the contributing documentation to improve the Releasing section to include a new npm run post-versioning step
    • Implemented a new bump-peer-deps.js script to help implement the new scripts included in the post-versioning step

5.6.0

13 Apr 18:46
Compare
Choose a tag to compare

New features

  • New utility functions in @rjsf/utils used by the validators and core

@rjsf/antd

  • Treat multiple as a boolean rather than comparing against undefined in the SelectWidget, fixing #3595

@rjsf/core

  • Switched Form to use the new validatorDataMerge() and toErrorList() functions instead of the now deprecated schemaUtils.mergeValidatorData() and schemaUtils.getValidator().toErrorList()
  • Added option to provide a callback function to focusOnFirstError (3590)
  • Updated MultiSchemaField to handle the OpenAPI discriminator extension on anyOf/oneOf fields by passing it into getClosestMatchingOption() if it exists, fixing #3512
  • Updated SchemaField function to use getSchemaType rather than schema.type to set the proper class name.

@rjsf/utils

  • Refactored the createErrorHandler(), toErrorList(), toErrorSchema() and unwrapErrorHandler() functions from the @rjsf/validator-ajv6 and @rjsf/validator-ajv8 implementations since they were identical
    • As a result, the mergeValidationData() function was deprecated in favor of the new validationDataMerge() function that uses the refactored toErrorList() function
    • Refactored the ROOT_SCHEMA_PREFIX constant as well
  • Updated ValidatorType and SchemaUtilsType to deprecate the toErrorList() and mergeValidationData() functions, respectively
  • Updated the getClosestMatchingOption() and getFirstMatchingOption() to pass the new discriminatorField to the getMatchingOption() function
  • Updated getMatchingOption() to use discriminatorField when it is present in the options object properties to drill into the object to detect if that one field is valid
  • Updated SchemaUtilsType and the associated forward functions in createSchemaUtils to add the new discriminatorField?: string optional parameter
  • Updated toIdSchema() function to use getSchemaType(schema) === 'object' rather than schema.type === 'object' to get the proper pathing for ids, fixing #2044

@rjsf/validator-ajv6

  • Removed the refactored functions and constant from the AJV6Validator in favor of using the new functions and constant from @rjsf/utils

@rjsf/validator-ajv8

  • Removed the refactored functions and constant from the AJV8Validator in favor of using the new functions and constant from @rjsf/utils

Dev / docs / playground

  • Updated the utility-functions documentation to describe the new refactored functions as well as deprecating the mergeValidationData() function
  • Updated the playground to properly restore liveSettings from shared links and added a switch for noHtml5Validation in the live settings rather than having it set to true always
    • Also added a new Blank example to help users easily paste their code

5.5.2

05 Apr 22:28
Compare
Choose a tag to compare

@rjsf/material-ui

  • Switched to using TextField for the WrapIfAdditionalTemplate label key input to match the @rjsf/mui fix

@rjsf/mui

  • Switched to using TextField for the WrapIfAdditionalTemplate label key input, fixing #3578

Dev / docs / playground

  • Updated the templates passed into the main Form to not include undefined values, fixing #3576 and #3579