Releases: rjsf-team/react-jsonschema-form
Releases · rjsf-team/react-jsonschema-form
5.7.1
@rjsf/core
- Added protection against a null
field
in thefocusOnError
method inForm
@rjsf/validator-ajv8
- Updated the build for all but the
cjs
development version, to not export thecompileSchemaValidators()
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 to5.7.x
, fixing #3669
5.7.0
3 new features
- Added
experimental_defaultFormStateBehavior
prop toForm
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 forCheckboxWidget
@rjsf/core
- Updated the
MultiSchemaField
to use the newgetDiscriminatorFieldFromSchema()
API - Added new
experimental_defaultFormStateBehavior
prop toForm
- 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 fromMultiSchemaField
) andhashForSchema()
- Updated
getDefaultFormState()
andtoPathSchema()
to usegetDiscriminatorFieldFromSchema()
to provide a discriminator field togetClosestMatchingOption()
calls.
- Updated
- Refactored the
retrieveSchema()
internal API functions to support implementing an internalschemaParser()
API for use in precompiling schemas, in support of #3543 - Fixed
toPathSchema()
to handleproperties
in an object along withanyOf
/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 withanyOf
/oneOf
, fixing #3633
@rjsf/validator-ajv8
- Added two new APIs
compileSchemaValidators()
andcreatePrecompiledValidator()
implemented to support using precompiled validators build with AJV 8, fixing #3543
Dev / docs / playground
- Added documentation to
custom-templates
describing how to extend theBaseInputTemplate
- 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 theapi-reference
directory as well as putting it into thesidebar.js
5.6.2
Dev / docs / playground
- Fixed issues with
post-versioning
that caused the 5.6.1 branch to not be publishable
5.6.1
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 theReleasing
section to include a newnpm run post-versioning
step- Implemented a new
bump-peer-deps.js
script to help implement the new scripts included in thepost-versioning
step
- Implemented a new
5.6.0
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 theSelectWidget
, fixing #3595
@rjsf/core
- Switched
Form
to use the newvalidatorDataMerge()
andtoErrorList()
functions instead of the now deprecatedschemaUtils.mergeValidatorData()
andschemaUtils.getValidator().toErrorList()
- Added option to provide a callback function to
focusOnFirstError
(3590) - Updated
MultiSchemaField
to handle the OpenAPIdiscriminator
extension onanyOf/oneOf
fields by passing it intogetClosestMatchingOption()
if it exists, fixing #3512 - Updated
SchemaField
function to usegetSchemaType
rather thanschema.type
to set the proper class name.
@rjsf/utils
- Refactored the
createErrorHandler()
,toErrorList()
,toErrorSchema()
andunwrapErrorHandler()
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 newvalidationDataMerge()
function that uses the refactoredtoErrorList()
function - Refactored the
ROOT_SCHEMA_PREFIX
constant as well
- As a result, the
- Updated
ValidatorType
andSchemaUtilsType
to deprecate thetoErrorList()
andmergeValidationData()
functions, respectively - Updated the
getClosestMatchingOption()
andgetFirstMatchingOption()
to pass the newdiscriminatorField
to thegetMatchingOption()
function - Updated
getMatchingOption()
to usediscriminatorField
when it is present in theoptions
object properties to drill into the object to detect if that one field is valid - Updated
SchemaUtilsType
and the associated forward functions increateSchemaUtils
to add the newdiscriminatorField?: string
optional parameter - Updated
toIdSchema()
function to usegetSchemaType(schema) === 'object'
rather thanschema.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 themergeValidationData()
function - Updated the
playground
to properly restoreliveSettings
from shared links and added a switch fornoHtml5Validation
in the live settings rather than having it set totrue
always- Also added a new
Blank
example to help users easily paste their code
- Also added a new
5.5.2
@rjsf/material-ui
- Switched to using
TextField
for theWrapIfAdditionalTemplate
label key input to match the@rjsf/mui
fix
@rjsf/mui
- Switched to using
TextField
for theWrapIfAdditionalTemplate
label key input, fixing #3578
Dev / docs / playground
5.5.1
@rjsf/core
- Updated
Form
to include the topdisabled
property in theui:submitButtonOptions
so the submit button will be disabled when the whole form is disabled. Fixes #3264.
@rjsf/utils
- Added protections against infinite recursion of
$ref
s for thetoIdSchema()
,toPathSchema()
andgetDefaultFormState()
functions, fixing #3560 - Updated
getDefaultFormState()
to handle object-basedadditionalProperties
with defaults usingformData
in addition to values contained in adefault
object, fixing #2593 - Updated internal helper
withExactlyOneSubschema()
inside ofretrieveSchema()
to use theisValid()
function rather thanvalidateFormData()
when determining the one-of branch
Dev / docs / playground
- Refactored some parts of
playground
to make it cleaner- This includes fixing the spelling of the
disabled
flag being passed into theForm
from the incorrectdisable
spelling
- This includes fixing the spelling of the
- Formatted the entire monorepo which included 6 unformatted files outside of
playground
- Removed
react-app-polyfill
package fromplaygound
. This ends IE11 support - Fix a handful of broken docs links, fixing #3553
5.5.0
One new feature
- Passing the
errorSchema
to theObjectFieldTemplate
@rjsf/antd
- Updated tests to use centralized snapshots from
core
@rjsf/bootstrap-4
- Updated tests to use centralized snapshots from
core
@rjsf/chakra-ui
- Updated tests to use centralized snapshots from
core
@rjsf/core
- Updated
FileWidget
to pass false forrequired
once a value has been specified, fixing #3504 - Updated
ObjectField
to pass theerrorSchema
to theObjectFieldTemplate
to allow custom templates access to the errors - Centralized snapshot tests from each theme into
core
, adding snapshots tests forcore
as well
@rjsf/fluent-ui
- Updated tests to use centralized snapshots from
core
@rjsf/material-ui
- Updated tests to use centralized snapshots from
core
@rjsf/mui
- Updated tests to use centralized snapshots from
core
@rjsf/semantic-ui
- Updated tests to use centralized snapshots from
core
@rjsf/utils
- Added
errorSchema
as an optional prop onObjectFieldTemplateProps
Dev / docs / playground
- Converted the
playground
to use Typescript, including some refactoring of code to make that job easier - Updated the
custom-templates
documentation to adderrorSchema
to the props forObjectFieldTemplate
5.4.0
Two new features
- File Preview
- AntD Tooltip descriptions
- Other bug fixes
@rjsf/antd
- Added the ability to use a tooltip for a description
- Updated
ObjectFieldTemplate
to hide the titles and descriptions whendisplayLabel
is true (including globally), fixing #3231 - Updated
CheckboxWidget
to show thedescription
using theDescriptionFieldTemplate
, fixing #2791 - Updated
CheckboxesWidget
andSelectWidget
to show thelabel
using theTitleFieldTemplate
, fixing #2134
@rjsf/bootstrap-4
- Updated
ObjectFieldTemplate
to hide the titles and descriptions whendisplayLabel
is true (including globally), fixing #3231 - Updated
CheckboxWidget
to show thedescription
using theDescriptionFieldTemplate
, fixing #2791 - Updated
RangeWidget
to fix the label hiding bug usinglabelValue()
@rjsf/chakra-ui
- Fix: MUI radio widget initializes as uncontrolled when schema has no default value, fixing #3511
- Updated
ObjectFieldTemplate
to hide the titles and descriptions whendisplayLabel
is true (including globally), fixing #3231 - Updated
CheckboxesWidget
,CheckboxWidget
,RadioWidget
andSelectWidget
to hide labels whenhideLabel
is true using the newlabelValue()
helper (including globally) - Updated
CheckboxWidget
to show thedescription
using theDescriptionFieldTemplate
, fixing #2791
@rjsf/core
- Updated
FileWidget
to show a preview of images and a download link for non-images when thefilePreview
options is set to true in theUiSchema
- Updated
ArrayField
,BooleanField
,MultiSelectField
andStringField
to passlabel
(read fromuiSchema.title
||schema.title
||name
) andhideLabel
down to all of theWidgets
they render, fixing #827, #2636, #2399 and #3531 - Updated
ObjectField
,ObjectFieldTemplate
,ArrayFieldDescriptionTemplate
,ArrayFieldTitleTemplate
andCheckboxWidget
to hide the titles and descriptions whenhideLabel
is true using the newlabelValue()
helper (including globally), fixing #3231 - Updated
CheckboxWidget
to use thelabelValue()
function for hiding labels
@rjsf/fluent-ui
- Updated
FieldTemplate
andObjectFieldTemplate
to hide the titles and descriptions whendisplayLabel
is true (including globally), fixing #3231 - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,ColorWidget
,DateWidget
,RadioWidget
,RangeWidget
,SelectWidget
andUpDownWidget
to hide labels whenhideLabel
is true using the newlabelValue()
helper (including globally)- Also extracted a new
FluentLabel
component out ofCheckboxesWidget
,ColorWidget
,RangeWidget
andUpDownWidget
- Also extracted a new
- Updated
CheckboxWidget
to show thedescription
using theDescriptionFieldTemplate
, fixing #2791
@rjsf/material-ui
- Fix: MUI radio widget initializes as uncontrolled when schema has no default value, fixing #3511
- Updated
ObjectFieldTemplate
to hide the titles and descriptions whendisplayLabel
is true (including globally), fixing #3231 - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,RadioWidget
,RangeWidget
andSelectWidget
to hide labels whenhideLabel
is true using the newlabelValue()
helper (including globally) - Updated
CheckboxWidget
to show thedescription
using theDescriptionFieldTemplate
, fixing #2791
@rjsf/mui
- Fix: MUI radio widget initializes as uncontrolled when schema has no default value, fixing #3511
- Updated
ObjectFieldTemplate
to hide the titles and descriptions whendisplayLabel
is true (including globally), fixing #3231 - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,RadioWidget
,RangeWidget
andSelectWidget
to hide labels whenhideLabel
is true using the newlabelValue()
helper (including globally) - Updated
CheckboxWidget
to show thedescription
using theDescriptionFieldTemplate
, fixing #2791
@rjsf/semantic-ui
- Updated
ObjectFieldTemplate
to hide the titles and descriptions whendisplayLabel
is true (including globally), fixing #3231 - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,SelectWidget
andTextareaWidget
to hide labels whenhideLabel
is true using the newlabelValue()
helper (including globally) - Updated
CheckboxWidget
to show thedescription
using theDescriptionFieldTemplate
, fixing #2791
@rjsf/utils
- Updated the
UiSchema
to support the optionalfilePreview?: boolean
option and to add a newTranslatableString.PreviewLabel
to theenums
- Updated the
WidgetProps
to add an optionalhideLabel?: boolean
field to better support hiding labels - Added a new
labelValue()
helper function to better support hiding labels
@rjsf/validator-ajv8
- Improve
toErrorList()
andunwrapErrorHandler()
by ensuring objects before recursing
Dev / docs / playground
- Added a new
AntD Customization
documentation with references to it in theform-props
anduiSchema
documentation - Updated the
uiSchema
documentation to add thefilePreview
option - Updated the
widgets
documentation to add the new, optionalhideLabel
prop - Updated the
utility-functions
documentation to add the newlabelValue()
function
5.3.1
@rjsf/core
- Updated
AltDateWidget
to remove an infinite loop caused by two conflicting effects by merging them with additional checking of originalvalue
against the current value, fixing #3516
@rjsf/utils
- Updated the documentation of
getTestValidator()
and theschema.test.ts
file to help developers
@rjsf/validator-ajv6
- Updated the documentation of
getTestValidator()
and theschema.test.ts
file to help developers
@rjsf/validator-ajv8
- Updated the documentation of
getTestValidator()
and theschema.test.ts
file to help developers
Dev / docs / playground
- Updated the
internals
documentation to use a React ref in the example, fixing #3520 - Updated the
contributing
documentation to describe the new development process needed for aVite
playground, fixing #3478- Also fixed the
package.json
files to removenpm start
in the subdirectories and change the root one to describe the new process
- Also fixed the
- Updated the
semantic-ui/uiSchema
documentation to switch the default forhorizontalButtons
to be true per changes made in5.3.0