Releases: rjsf-team/react-jsonschema-form
Releases · rjsf-team/react-jsonschema-form
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
5.2.0
New feature: Support for the localization of React's internal strings. See the documentation
@rjsf/antd
- Updated
ErrorList
,IconButton
s,WrapIfAdditionalTemplate
andAltDateWidget
to use the newtranslateString()
function to support localization
@rjsf/bootstrap-4
- Updated
AddButton
,ErrorList
,IconButton
s andWrapIfAdditionalTemplate
to use the newtranslateString()
function to support localization
@rjsf/chakra-ui
- Updated
AddButton
,ErrorList
,IconButton
s,WrapIfAdditionalTemplate
andAltDateWidget
to use the newtranslateString()
function to support localization
@rjsf/core
- Updated
ArrayField
,BooleanField
,MultiSchemaField
,ObjectField
,SchemaField
,AddButton
,IconButton
s,ErrorList
,WrapIfAdditionalTemplate
andAltDateWidget
andFileWidget
to use the newtranslateString()
function to support localization- Also updated
Form
to take a new optionaltranslateString
prop andgetDefaultRegistry()
to settranslateString
toenglishStringTranslator()
- Also updated
@rjsf/fluent-ui
- Updated
AddButton
,ColorWidget
,ErrorList
,IconButton
s andUpDownWidget
to use the newtranslateString()
function to support localization
@rjsf/material-ui
- Updated
AddButton
,ErrorList
,IconButton
s andWrapIfAdditionalTemplate
to use the newtranslateString()
function to support localization
@rjsf/mui
- Updated
AddButton
,ErrorList
,IconButton
s andWrapIfAdditionalTemplate
to use the newtranslateString()
function to support localization
@rjsf/semantic-ui
- Updated
AddButton
,ErrorList
,IconButton
s andWrapIfAdditionalTemplate
to use the newtranslateString()
function to support localization
Dev / docs / playground
- Updated the
utility-functions
documentation for theenums
andenglishStringTranslator()
&replaceStringParameters()
functions - Updated the
form-props
documentation for the new, optionaltranslateString
prop onForm
5.1.0
@rjsf/bootstrap-4
- Updated the
AltDateTimeWidget
in@rjsf/core
to addclassName="list-inline-item"
to theLI
tags
@rjsf/chakra-ui
- Fixed the
SelectWidget
to allow the proper display of the selected value, fixing #3422
@rjsf/core
- Fixed
Form
to remove passingexcludeObjectChildren
togetDefaultFormState()
, fixing #3424 and #675 - Added new feature prop
focusOnFirstError
, that if true, will cause the first field with an error to be focused on when a submit has errors
@rjsf/utils
- Updated
computeDefaults()
to fix additionalProperties defaults not being propagated, fixing #2593- Also made sure to properly deal with empty
anyOf
/oneOf
lists by simply returning undefined - Add support for adding an empty object when that object is marked as required in a schema
- Also made sure to properly deal with empty
Dev / docs / playground
- Updated the playground to add a control for
focusOnFirstError
and theform-props
documentation for it as well
5.0.2
- Fix: Update
FieldProps
to add missing props by @heath-freenome in #3423 - Use Docusaurus in favor of readthedocs.io by @nickgros in #3419
Full Changelog: v5.0.1...v5.0.2
5.0.1
- Updated the
peerDependencies
in all packages to remove the-beta.x
tags from the@rjsf/xxxx
packages
5.0.0
5.0.0 is released!
After 9 months of hard work by many contributor, the 5.0.0 release is officially out
BREAKING CHANGES WARNING
There are many breaking changes in this new major release.
Consult the 5.x migration guide for all the details
In addition to all of the changes made in the 5.0.0-beta.1
through 5.0.0-beta.20
pre-releases, the following additional changes have been made:
@rjsf/antd
- Updated
CheckboxesWidget
,RadioWidget
andSelectWidget
to use indexes as values to supportenumOptions
with object values, fixing #1494
@rjsf/bootstrap-4
- Updated
CheckboxesWidget
,RadioWidget
andSelectWidget
to use indexes as values to supportenumOptions
with object values, fixing #1494
@rjsf/chakra-ui
- Updated
CheckboxesWidget
,RadioWidget
andSelectWidget
to use indexes as values to supportenumOptions
with object values, fixing #1494
@rjsf/core
- Updated
CheckboxesWidget
,RadioWidget
andSelectWidget
to use indexes as values to supportenumOptions
with object values, fixing #1494
@rjsf/fluent-ui
- Updated
CheckboxesWidget
,RadioWidget
andSelectWidget
to use indexes as values to supportenumOptions
with object values, fixing #1494
@rjsf/material-ui
- Updated
CheckboxesWidget
,RadioWidget
andSelectWidget
to use indexes as values to supportenumOptions
with object values, fixing #1494
@rjsf/mui
- Updated
CheckboxesWidget
,RadioWidget
andSelectWidget
to use indexes as values to supportenumOptions
with object values, fixing #1494
@rjsf/semantic-ui
- Updated
CheckboxesWidget
,RadioWidget
andSelectWidget
to use indexes as values to supportenumOptions
with object values, fixing #1494
@rjsf/utils
- Added
enumOptionsIndexForValue()
,enumOptionsIsSelected()
,enumOptionsValueForIndex()
functions to support fixing #1494- Updated
enumOptionsDeselectValue()
,enumOptionsSelectValue()
andoptionId()
to use indexes instead of values - Deleted the
processSelectValue()
that was added in the beta and is no longer needed
- Updated
Dev / docs / playground
- Updated the
utility-functions
documentation for the new and updated methods mentioned above, as well as deleting the documentation forprocessSelectValue()
- Updated the playground to add a new
Enum Objects
example to highlight the use of indexes forenumOptions
- Updated
5.x migration guide
to document the change from values to indexes for theenumOptions
based controls.
5.0.0-beta.20
@rjsf/antd
- Fixed
schema.examples
to deduplicate whenschema.default
exists in the examples, fixing #3393
@rjsf/bootstrap-4
- Fixed
schema.examples
to deduplicate whenschema.default
exists in the examples, fixing #3393
@rjsf/chakra-ui
- Fixed
schema.examples
to deduplicate whenschema.default
exists in the examples, fixing #3393
@rjsf/core
- Updated
MultiSchemaField
to passundefined
as the value to the widget when theselectedOption
is -1, supportingSelectWidget
implementations that allow the user to clear the selected value of theanyOf
/oneOf
field. - Updated
Form
to support receiving an optionalref
prop. - Updated
Form
to restore providing empty root level objects, fixing #3391 - Fixed
schema.examples
to deduplicate whenschema.default
exists in the examples, fixing #3393
@rjsf/fluent-ui
- Fixed
schema.examples
to deduplicate whenschema.default
exists in the examples, fixing #3393
@rjsf/material-ui
- Fixed
schema.examples
to deduplicate whenschema.default
exists in the examples, fixing #3393
@rjsf/mui
- Fixed
schema.examples
to deduplicate whenschema.default
exists in the examples, fixing #3393
@rjsf/semantic-ui
- Fixed
schema.examples
to deduplicate whenschema.default
exists in the examples, fixing #3393
5.0.0-beta.19
@rjsf/core
- Updated
MultiSchemaField
to cache options with refs in state and to output better labels for options without them when a title is available in either theschema
oruiSchema
- Improved fix for #2691 to remove the breaking change caused by the original fix #2980 as follows:
- Added a new
ui:fieldReplacesAnyOrOneOf
flag to theuiSchema
that when true will allow users to opt-out of theanyOf
/oneOf
wrapping of a custom field
- Added a new
@rjsf/utils
- Updated
toPathSchema()
to handleoneOf
/anyOf
by picking the closest option and generating the path for it, fixing #2262 - Added new
uiSchema
only flagui:fieldReplacesAnyOrOneOf
that, if true allows the user to opt-out of theanyOf
/oneOf
wrapping of a custom field
Dev / docs / playground
- Updated the
uiSchema
documentation forui:fieldReplacesAnyOrOneOf
5.0.0-beta.18
@rjsf/core
- Updated
MultiSchemaField
to utilize the newgetClosestMatchingOption()
andsanitizeDataForNewSchema()
functions, fixing the following issues: - Updated
ObjectField
to deal withadditionalProperties
withoneOf
/anyOf
, fixing #2538 - Updated
Form
,MultiSchemaField
,ObjectField
andSchemaField
to properly support makingformData
optional, fixing #3305
@rjsf/material-ui
- Fix shrinking of
SelectWidget
label only if value is not empty, fixing #3369
@rjsf/mui
- Fix shrinking of
SelectWidget
label only if value is not empty, fixing #3369
@rjsf/utils
- Added new
getClosestMatchingOption()
,getFirstMatchingOption()
andsanitizeDataForNewSchema()
schema-based utility functions- Deprecated
getMatchingOption()
and updated all calls to it in other utility functions to usegetFirstMatchingOption()
- Deprecated
- Updated
stubExistingAdditionalProperties()
to deal withadditionalProperties
withoneOf
/anyOf
, fixing #2538 - Updated
getSchemaType()
to grab the type of the first element of aoneOf
/anyOf
, fixing #1654 - Updated all props or function parameters of the generic type
T
to allow for them to be optionally provided, fixing #3305- This was done in both the types file and the actual implementation code
@rjsf/validator-ajv6
- Updated places where
formData
was required as a function argument to make it optional, fixing #3305
@rjsf/validator-ajv8
- Updated places where
formData
was required as a function argument to make it optional, fixing #3305
Dev / docs / playground
- Updated the playground to
onFormDataEdited()
to only change the formData in the state if theJSON.stringify()
of the old and new values are different, partially fixing #3236 - Updated the playground
npm start
command to always use the--force
option to avoid issues where changes made to other packages weren't getting picked up due tovite
caching - Updated the documentation for
utility-functions
and the5.x upgrade guide
to add the new utility functions and to document the deprecation ofgetMatchingOption()
- Also updated
utility-functions
, making all optional parameters without a default (as denoted by the syntax[<parameter>]: <type>
) to add| undefined
onto the type to make it clear it supports passing in undefined as a value.
- Also updated