Releases: rjsf-team/react-jsonschema-form
Releases · rjsf-team/react-jsonschema-form
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
5.3.0
Three new features
- Array item copy
- Programmatic form reset
- TimeWidget
@rjsf/antd
- Added support to make a copy of an array item directly after the item selected to be copied (feature is off by default), fixing #1261 and #1712
- Fixed
package.json
to properly add required dependencies explicitly which were installed implicitly
@rjsf/bootstrap-4
- Added support to make a copy of an array item directly after the item selected to be copied (feature is off by default), fixing #1261 and #1712
@rjsf/chakra-ui
- Added support to make a copy of an array item directly after the item selected to be copied (feature is off by default), fixing #1261 and #1712
@rjsf/core
Reset
function added forProgrammatically Reset
action.Reset
function will reset form data and validation errors. Form data will set to default values.- Implemented a new
TimeWidget
that works for all themes - Added support to make a copy of an array item directly after the item selected to be copied (feature is off by default), fixing #1261 and #1712
- Also added the missing translation for the
InvalidObjectField
error inObjectField
- Added support for the handling of the global UiSchema options in
Form
,ArrayField
,ObjectField
andSchemaField
@rjsf/fluent-ui
- Fix
RadioWidget
's onChange return value. - Added support to make a copy of an array item directly after the item selected to be copied (feature is off by default), fixing #1261 and #1712
@rjsf/material-ui
- Updated
BaseInputTemplate
so that it shrinks atime
formatted input - Added support to make a copy of an array item directly after the item selected to be copied (feature is off by default), fixing #1261 and #1712
@rjsf/mui
- Updated
BaseInputTemplate
so that it shrinks atime
formatted input - Added support to make a copy of an array item directly after the item selected to be copied (feature is off by default), fixing #1261 and #1712
@rjsf/semantic-ui
- Added support to make a copy of an array item directly after the item selected to be copied (feature is off by default), fixing #1261 and #1712
@rjsf/utils
- Updated the widget matrix used by
getWidget()
to support thetime
toTimeWidget
mapping - Added a new
TranslatableString
enumsCopyButton
andInvalidObjectField
that localizes the information extracted fromObjectField
as markdown - Updated the
ArrayFieldTemplateItemType
to add support for copying array items - Refactored
UIOptionsBaseType
to extract theaddable
,orderable
,removable
,label
andduplicateKeySuffixSeparator
into a newGlobalUISchemaOptions
type that addscopyable
- Extended
UIOptionsBaseType
fromGlobalUISchemaOptions
- In
UiSchema
added a new optionalui:globalOptions
prop of typeGlobalUISchemaOptions
and a newUI_GLOBAL_OPTIONS_KEY
constant - Added a new optional prop
globalUiOptions
object of typeGlobalUISchemaOptions
inRegistry
as well asCopyButton
inButtonTemplates
- Extended
- Updated
getUiOptions()
andgetDisplayLabel()
(and itsSchemaUtilsType
counterpart) to take an optionalGlobalUISchemaOptions
parameter that is used to include global options into the returneduiOptions
Dev / docs / playground
- Updated the playground to add a
Programmatically Reset
button to clear states which are form data and validation errors. - Updated the
Date & time
example to show off the newTimeWidget
. - Updated the
custom-widgets-fields
andwidgets
documentation to mention the newTimeWidget
and its support for thetime
format. - Updated the documentation for
custom-templates
,internals
,uiSchema
,utility-functions
andarrays
for the new copy array feature as well as the global UI Schema options support - Updated the
arrays
example to add examples for the newcopyable
feature
5.2.1
@rjsf/antd
- Updated
BaseInputTemplate
to favor the specialonChangeOverride
provided by thecore
FileWidget
- Removed explicit import of
React
, switching imports to explicit ones after fixing linting rules to not requireReact
for JSX
@rjsf/bootstrap-4
- Updated
BaseInputTemplate
to favor the specialonChangeOverride
provided by thecore
FileWidget
, deleting the theme'sFileWidget
, fixing #2095 - Removed explicit import of
React
, switching imports to explicit ones after fixing linting rules to not requireReact
for JSX
@rjsf/chakra-ui
- Updated
BaseInputTemplate
to favor the specialonChangeOverride
provided by thecore
FileWidget
- Removed explicit import of
React
, switching imports to explicit ones after fixing linting rules to not requireReact
for JSX
@rjsf/core
- Ensure that
name
is consistently passed to allWidgets
through the field components, fixing #1763 - Updated the
FileWidget
to render the input using theBaseInputTemplate
passing a specialonChangeOverride
function to deal with the file events, fixing #2095 - Removed explicit import of
React
, switching imports to explicit ones after fixing linting rules to not requireReact
for JSX
@rjsf/fluent-ui
- Updated
BaseInputTemplate
to favor the specialonChangeOverride
provided by thecore
FileWidget
- Removed explicit import of
React
, switching imports to explicit ones after fixing linting rules to not requireReact
for JSX
@rjsf/material-ui
- Updated
BaseInputTemplate
to favor the specialonChangeOverride
provided by thecore
FileWidget
and to support automatically shrinking the label for thedate
,datetime-local
andfile
types- Removed the
DateWidget
andDateTimeWidget
since they were only created to provide the label shrinking property
- Removed the
- Removed explicit import of
React
, switching imports to explicit ones after fixing linting rules to not requireReact
for JSX
@rjsf/mui
- Updated
BaseInputTemplate
to favor the specialonChangeOverride
provided by thecore
FileWidget
and to support automatically shrinking the label for thedate
,datetime-local
andfile
types- Removed the
DateWidget
andDateTimeWidget
since they were only created to provide the label shrinking property
- Removed the
- Removed explicit import of
React
, switching imports to explicit ones after fixing linting rules to not requireReact
for JSX
@rjsf/semantic-ui
- Updated
BaseInputTemplate
to favor the specialonChangeOverride
provided by thecore
FileWidget
- Removed explicit import of
React
, switching imports to explicit ones after fixing linting rules to not requireReact
for JSX
@rjsf/utils
- Added the
name
prop to theWidgetProps
type, fixing #1763 - Fixed
dataURItoBlob()
to handle the exception thrown byatob()
when it is passed a malformed URL, returning anblob
that indicates the error in thetype
prop - Fixed
replaceStringParameters()
to improve the replaceable parameters logic so that it works properly when a parameter also contains a replaceable parameter identifier - Added new
BaseInputTemplateProps
type, extendingWidgetProps
to addonChangeOverride
optional prop - Removed explicit import of
React
, switching imports to explicit ones after fixing linting rules to not requireReact
for JSX
Dev / docs / playground
- Updated the
custom-widgets-fields
documentation to ensure the newWidgetProps
name
prop is documented - Added Algolia DocSearch to the documentation site