Skip to content

Releases: rjsf-team/react-jsonschema-form

5.5.1

05 Apr 18:44
Compare
Choose a tag to compare

@rjsf/core

  • Updated Form to include the top disabled property in the ui:submitButtonOptions so the submit button will be disabled when the whole form is disabled. Fixes #3264.

@rjsf/utils

  • Added protections against infinite recursion of $refs for the toIdSchema(), toPathSchema() and getDefaultFormState() functions, fixing #3560
  • Updated getDefaultFormState() to handle object-based additionalProperties with defaults using formData in addition to values contained in a default object, fixing #2593
  • Updated internal helper withExactlyOneSubschema() inside of retrieveSchema() to use the isValid() function rather than validateFormData() 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 the Form from the incorrect disable spelling
  • Formatted the entire monorepo which included 6 unformatted files outside of playground
  • Removed react-app-polyfill package from playgound. This ends IE11 support
  • Fix a handful of broken docs links, fixing #3553

5.5.0

31 Mar 15:02
Compare
Choose a tag to compare

One new feature

  • Passing the errorSchema to the ObjectFieldTemplate

@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 for required once a value has been specified, fixing #3504
  • Updated ObjectField to pass the errorSchema to the ObjectFieldTemplate to allow custom templates access to the errors
  • Centralized snapshot tests from each theme into core, adding snapshots tests for core 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 on ObjectFieldTemplateProps

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 add errorSchema to the props for ObjectFieldTemplate

5.4.0

24 Mar 20:05
Compare
Choose a tag to compare

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 when displayLabel is true (including globally), fixing #3231
  • Updated CheckboxWidget to show the description using the DescriptionFieldTemplate, fixing #2791
  • Updated CheckboxesWidget and SelectWidget to show the label using the TitleFieldTemplate, fixing #2134

@rjsf/bootstrap-4

  • Updated ObjectFieldTemplate to hide the titles and descriptions when displayLabel is true (including globally), fixing #3231
  • Updated CheckboxWidget to show the description using the DescriptionFieldTemplate, fixing #2791
  • Updated RangeWidget to fix the label hiding bug using labelValue()

@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 when displayLabel is true (including globally), fixing #3231
  • Updated CheckboxesWidget, CheckboxWidget, RadioWidget and SelectWidget to hide labels when hideLabel is true using the new labelValue() helper (including globally)
  • Updated CheckboxWidget to show the description using the DescriptionFieldTemplate, fixing #2791

@rjsf/core

  • Updated FileWidget to show a preview of images and a download link for non-images when the filePreview options is set to true in the UiSchema
  • Updated ArrayField, BooleanField, MultiSelectField and StringField to pass label (read from uiSchema.title || schema.title || name) and hideLabel down to all of the Widgets they render, fixing #827, #2636, #2399 and #3531
  • Updated ObjectField, ObjectFieldTemplate, ArrayFieldDescriptionTemplate, ArrayFieldTitleTemplate and CheckboxWidget to hide the titles and descriptions when hideLabel is true using the new labelValue() helper (including globally), fixing #3231
  • Updated CheckboxWidget to use the labelValue() function for hiding labels

@rjsf/fluent-ui

  • Updated FieldTemplate and ObjectFieldTemplate to hide the titles and descriptions when displayLabel is true (including globally), fixing #3231
  • Updated BaseInputTemplate, CheckboxesWidget, CheckboxWidget, ColorWidget, DateWidget, RadioWidget, RangeWidget, SelectWidget and UpDownWidget to hide labels when hideLabel is true using the new labelValue() helper (including globally)
    • Also extracted a new FluentLabel component out of CheckboxesWidget, ColorWidget, RangeWidget and UpDownWidget
  • Updated CheckboxWidget to show the description using the DescriptionFieldTemplate, 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 when displayLabel is true (including globally), fixing #3231
  • Updated BaseInputTemplate, CheckboxesWidget, CheckboxWidget, RadioWidget, RangeWidget and SelectWidget to hide labels when hideLabel is true using the new labelValue() helper (including globally)
  • Updated CheckboxWidget to show the description using the DescriptionFieldTemplate, 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 when displayLabel is true (including globally), fixing #3231
  • Updated BaseInputTemplate, CheckboxesWidget, CheckboxWidget, RadioWidget, RangeWidget and SelectWidget to hide labels when hideLabel is true using the new labelValue() helper (including globally)
  • Updated CheckboxWidget to show the description using the DescriptionFieldTemplate, fixing #2791

@rjsf/semantic-ui

  • Updated ObjectFieldTemplate to hide the titles and descriptions when displayLabel is true (including globally), fixing #3231
  • Updated BaseInputTemplate, CheckboxesWidget, CheckboxWidget, SelectWidget and TextareaWidget to hide labels when hideLabel is true using the new labelValue() helper (including globally)
  • Updated CheckboxWidget to show the description using the DescriptionFieldTemplate, fixing #2791

@rjsf/utils

  • Updated the UiSchema to support the optional filePreview?: boolean option and to add a new TranslatableString.PreviewLabel to the enums
  • Updated the WidgetProps to add an optional hideLabel?: boolean field to better support hiding labels
  • Added a new labelValue() helper function to better support hiding labels

@rjsf/validator-ajv8

  • Improve toErrorList() and unwrapErrorHandler() by ensuring objects before recursing

Dev / docs / playground

  • Added a new AntD Customization documentation with references to it in the form-props and uiSchema documentation
  • Updated the uiSchema documentation to add the filePreview option
  • Updated the widgets documentation to add the new, optional hideLabel prop
  • Updated the utility-functions documentation to add the new labelValue() function

5.3.1

19 Mar 21:47
Compare
Choose a tag to compare

@rjsf/core

  • Updated AltDateWidget to remove an infinite loop caused by two conflicting effects by merging them with additional checking of original value against the current value, fixing #3516

@rjsf/utils

  • Updated the documentation of getTestValidator() and the schema.test.ts file to help developers

@rjsf/validator-ajv6

  • Updated the documentation of getTestValidator() and the schema.test.ts file to help developers

@rjsf/validator-ajv8

  • Updated the documentation of getTestValidator() and the schema.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 a Vite playground, fixing #3478
    • Also fixed the package.json files to remove npm start in the subdirectories and change the root one to describe the new process
  • Updated the semantic-ui/uiSchema documentation to switch the default for horizontalButtons to be true per changes made in 5.3.0

5.3.0

17 Mar 04:44
Compare
Choose a tag to compare

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 for Programmatically 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 in ObjectField
  • Added support for the handling of the global UiSchema options in Form, ArrayField, ObjectField and SchemaField

@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 a time 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 a time 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 the time to TimeWidget mapping
  • Added a new TranslatableString enums CopyButton and InvalidObjectField that localizes the information extracted from ObjectField as markdown
  • Updated the ArrayFieldTemplateItemType to add support for copying array items
  • Refactored UIOptionsBaseType to extract the addable, orderable, removable, label and duplicateKeySuffixSeparator into a new GlobalUISchemaOptions type that adds copyable
    • Extended UIOptionsBaseType from GlobalUISchemaOptions
    • In UiSchema added a new optional ui:globalOptions prop of type GlobalUISchemaOptions and a new UI_GLOBAL_OPTIONS_KEY constant
    • Added a new optional prop globalUiOptions object of type GlobalUISchemaOptions in Registry as well as CopyButton in ButtonTemplates
  • Updated getUiOptions() and getDisplayLabel() (and its SchemaUtilsType counterpart) to take an optional GlobalUISchemaOptions parameter that is used to include global options into the returned uiOptions

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 new TimeWidget.
  • Updated the custom-widgets-fields and widgets documentation to mention the new TimeWidget and its support for the time format.
  • Updated the documentation for custom-templates, internals, uiSchema, utility-functions and arrays for the new copy array feature as well as the global UI Schema options support
  • Updated the arrays example to add examples for the new copyable feature

5.2.1

08 Mar 17:23
Compare
Choose a tag to compare

@rjsf/antd

  • Updated BaseInputTemplate to favor the special onChangeOverride provided by the core FileWidget
  • Removed explicit import of React, switching imports to explicit ones after fixing linting rules to not require React for JSX

@rjsf/bootstrap-4

  • Updated BaseInputTemplate to favor the special onChangeOverride provided by the core FileWidget, deleting the theme's FileWidget, fixing #2095
  • Removed explicit import of React, switching imports to explicit ones after fixing linting rules to not require React for JSX

@rjsf/chakra-ui

  • Updated BaseInputTemplate to favor the special onChangeOverride provided by the core FileWidget
  • Removed explicit import of React, switching imports to explicit ones after fixing linting rules to not require React for JSX

@rjsf/core

  • Ensure that name is consistently passed to all Widgets through the field components, fixing #1763
  • Updated the FileWidget to render the input using the BaseInputTemplate passing a special onChangeOverride 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 require React for JSX

@rjsf/fluent-ui

  • Updated BaseInputTemplate to favor the special onChangeOverride provided by the core FileWidget
  • Removed explicit import of React, switching imports to explicit ones after fixing linting rules to not require React for JSX

@rjsf/material-ui

  • Updated BaseInputTemplate to favor the special onChangeOverride provided by the core FileWidget and to support automatically shrinking the label for the date, datetime-local and file types
    • Removed the DateWidget and DateTimeWidget since they were only created to provide the label shrinking property
  • Removed explicit import of React, switching imports to explicit ones after fixing linting rules to not require React for JSX

@rjsf/mui

  • Updated BaseInputTemplate to favor the special onChangeOverride provided by the core FileWidget and to support automatically shrinking the label for the date, datetime-local and file types
    • Removed the DateWidget and DateTimeWidget since they were only created to provide the label shrinking property
  • Removed explicit import of React, switching imports to explicit ones after fixing linting rules to not require React for JSX

@rjsf/semantic-ui

  • Updated BaseInputTemplate to favor the special onChangeOverride provided by the core FileWidget
  • Removed explicit import of React, switching imports to explicit ones after fixing linting rules to not require React for JSX

@rjsf/utils

  • Added the name prop to the WidgetProps type, fixing #1763
  • Fixed dataURItoBlob() to handle the exception thrown by atob() when it is passed a malformed URL, returning an blob that indicates the error in the type 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, extending WidgetProps to add onChangeOverride optional prop
  • Removed explicit import of React, switching imports to explicit ones after fixing linting rules to not require React for JSX

Dev / docs / playground

  • Updated the custom-widgets-fields documentation to ensure the new WidgetProps name prop is documented
  • Added Algolia DocSearch to the documentation site

5.2.0

04 Mar 20:02
Compare
Choose a tag to compare

New feature: Support for the localization of React's internal strings. See the documentation

@rjsf/antd

  • Updated ErrorList, IconButtons, WrapIfAdditionalTemplate and AltDateWidget to use the new translateString() function to support localization

@rjsf/bootstrap-4

  • Updated AddButton, ErrorList, IconButtons and WrapIfAdditionalTemplate to use the new translateString() function to support localization

@rjsf/chakra-ui

  • Updated AddButton, ErrorList, IconButtons, WrapIfAdditionalTemplate and AltDateWidget to use the new translateString() function to support localization

@rjsf/core

  • Updated ArrayField, BooleanField, MultiSchemaField, ObjectField, SchemaField, AddButton, IconButtons, ErrorList, WrapIfAdditionalTemplate and AltDateWidget and FileWidget to use the new translateString() function to support localization
    • Also updated Form to take a new optional translateString prop and getDefaultRegistry() to set translateString to englishStringTranslator()

@rjsf/fluent-ui

  • Updated AddButton, ColorWidget, ErrorList, IconButtons and UpDownWidget to use the new translateString() function to support localization

@rjsf/material-ui

  • Updated AddButton, ErrorList, IconButtons and WrapIfAdditionalTemplate to use the new translateString() function to support localization

@rjsf/mui

  • Updated AddButton, ErrorList, IconButtons and WrapIfAdditionalTemplate to use the new translateString() function to support localization

@rjsf/semantic-ui

  • Updated AddButton, ErrorList, IconButtons and WrapIfAdditionalTemplate to use the new translateString() function to support localization

Dev / docs / playground

  • Updated the utility-functions documentation for the enums and englishStringTranslator() & replaceStringParameters() functions
  • Updated the form-props documentation for the new, optional translateString prop on Form

5.1.0

06 Feb 20:10
Compare
Choose a tag to compare

@rjsf/bootstrap-4

  • Updated the AltDateTimeWidget in @rjsf/core to add className="list-inline-item" to the LI tags

@rjsf/chakra-ui

  • Fixed the SelectWidget to allow the proper display of the selected value, fixing #3422

@rjsf/core

  • Fixed Form to remove passing excludeObjectChildren to getDefaultFormState(), 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

Dev / docs / playground

  • Updated the playground to add a control for focusOnFirstError and the form-props documentation for it as well

5.0.2

03 Feb 19:21
Compare
Choose a tag to compare

Full Changelog: v5.0.1...v5.0.2

5.0.1

31 Jan 02:26
Compare
Choose a tag to compare
  • Updated the peerDependencies in all packages to remove the -beta.x tags from the @rjsf/xxxx packages