react-json-form

JSON editing made easy using form inputs.

BSD-3-CLAUSE License

Downloads
105
Stars
94
Committers
1

Bot releases are hidden (Show)

react-json-form - Version 2.7.2

Published by bhch over 1 year ago

28 Mar, 2023

Bugfixes

  • #62: Fixed required properties validation in nested objects.
react-json-form - Version 2.7.1

Published by bhch over 1 year ago

24 Mar, 2023

Bugfixes

  • #59: Handle validation errors in array items oneOf/anyOf
  • #60: Fix playground crashing
react-json-form - Version 2.7.0

Published by bhch over 1 year ago

22 Mar, 2023

New features

  • #58 : Support for oneOf/allOf/anyOf at the top level
react-json-form - Version 2.6.0

Published by bhch over 1 year ago

19 Mar, 2023

New features

  • #56: Support for required properties for an object.

Bugfixes

  • #57
react-json-form - Version 2.5.0

Published by bhch over 1 year ago

11 Mar, 2023

New features

  • Support for oneOf, anyOf and allOf.
react-json-form - Version 2.4.0

Published by bhch almost 2 years ago

20 Nov, 2022

Bugfixes

  • #55: Allow dash/hyphen in schema object keys.

Breaking changes

  • Now, keys for nested items in errorMap must be joined using the section sign (ยง) . This is due to fixing #55.
react-json-form - Version 2.3.0

Published by bhch almost 2 years ago

31 Oct, 2022

New features

  • fileinput widget
    Now you can customise the input for file-url inputs using the widget keyword. If you don't want to display a modal, you can use widget: 'fileinput' to display a simple input field.
react-json-form - Version 2.2.0

Published by bhch about 2 years ago

06 Oct, 2022

New features

  • fileHandlerArgs
    New config variable called fileHandlerArgs has been added. It can be used to provide a key-value pair which will be sent to the fileHandler URL via the querystring. This is helpful in identifying the form instance on the server if you have one common file handler for all forms.

Changes

  • #52: File input's Clear button will not send the DELETE request. A dedicated Delete button may be implemented in the future.

Bugfixes

  • #49: (Browser API) FormInstance data was not updated when the data was initially synced by the form.
react-json-form - Version 2.1.0

Published by bhch about 2 years ago

13 Sep, 2022

This is a minor release, nevertheless brings some exciting new features and some bugfixes.

What's new

New features

  • Data validation
    APIs for data validation and displaying error messages under input fields.
  • Validation keywords
    Support for validation keywords such as: required, uniqueItems, minLength, maxLength, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf.
  • Autocomplete widget
    New autocomplete widget which can be used to load options from the server via AJAX.
  • File deletion
    A delete button has been added in Media Library thumbnails which will send a DELETE request to file handler endpoint. In addition to that, DELETE requests will automatically be sent to the server when Clear button is clicked or when exiting page without form submission.
  • Rename choices label keyword to title
    For consistency with JSON schema, choice label keyword has been renamed to title. However, the label keyword will still continue to work.
  • Time widget improvements
    Time widget's input spinner is now circular i.e. after reaching maximum value, it will go back to 0 (e.g. after 12 for hours, it will go to 0 if the hour is incremented and will go from 0 to 12 if decremented).
  • Range input widget
    Support for range input widget. Earlier range input was added using the format keyword, but as a range input also returns a number value (no need for a specialised format). Hence, it didn't make sense to use range as a format. So, now range inputs can be created using the widget keyword.
react-json-form - Version 2.0.2

Published by bhch about 2 years ago

30 Aug, 2022

Minor release. Previous release (v2.0.1) still didn't fix the following bugs.

Bugfixes

  • Fix #43: Multiselect widget only worked with string but failed with integer or other types. This fixes that issue.
react-json-form - Version 2.0.1

Published by bhch about 2 years ago

30 Aug, 2022

Minor release.

Bugfixes

  • Fix #43: Multiselect widget only worked with string but failed with integer or other types. This fixes that issue.
react-json-form - Version 2.0.0

Published by bhch about 2 years ago

14 Aug, 2022

This is a major release with lots of new features, plenty of bugfixes, significant internal rewrite and, therefore, some breaking changes.

What's new

New features

  • EditorState
    Now the form component and its state are separate. This will allow for the component to be used as a library in other Node projects.
  • Schema validation
    Schema will be validated for errors while new form component is created.
  • File uploads
    New keyword called handler has been added for file uploads. Use this to provide the URL endpoint where files will be uploaded to.
  • New APIs for browser component
    APIs for controlling the form component in the browser such as handling change events and dynamically updating the schema.
  • Exception reporter for browser component
    New exception reporter will now display schema errors in the browser. Currently, it's primitive but will evolve in future.
  • Docs, Live demos, Interactive playground
    https://bhch.github.io/react-json-form/.

Bugfixes

  • #32: Display help text under "Select file" button (of file-url field).
  • #33: If default value for integer type was 0, it was being overwritten by null.
  • #34: Make multiselect widget work on top level arrays.
  • #35: Boolean type will be null by default. Earlier, the default for boolean was false.
  • #36: Make select input respect falsy values.
  • #37: Add support for date-time (from the standard spec) as an alias for datetime.
  • #39: Respect minItems when creating or syncing arrays.

Breaking changes

Main Form component (src/form.js)

If you directly use the Form component (such as in Node projects), the following notes are for you.

  • Renamed Form component to ReactJSONForm.
  • Removed fileListEndpoint and fileUploadEndpoint props. Now use fileHandler prop instead.
  • The form component will requires two compulsory props: state (instance of EditorState) and onChange (a callback function for handling the changes).
  • Boolean type will be null by default. Earlier, the default for boolean was false.

Browser component (src/renderer.js)

If you use the component in the browser (and not in Node projects), the following notes are for you

  • Removed JsonForm function which was used for creating the form component in browsers. Instead use the new createForm function.
  • Removed uid config option.
  • Removed fileListEndpoint and fileUploadEndpoint config options. Use the new fileHandler option which serves the purpose of both.
react-json-form - Version 1.13.0

Published by bhch over 2 years ago

07 Jul, 2022

What's new

  • Ability to choose existing files from the server
    Now a modal will open for file uploads where user can choose already existing files on the server.
  • placeholder
    Support for placeholder text on inputs using the placeholder keyword.
  • enum
    enum keyword has been added as an alias to choices keyword.
react-json-form - Version 1.12.1

Published by bhch over 2 years ago

03 Jun, 2022

Bugfixes

  • Fixed a bug if array.items was a $ref, it wasn't rendering properly.
react-json-form - Version 1.12.0

Published by bhch over 2 years ago

01 Jun, 2022

What's new

  • Support for references and recursive nesting
    Added support for $ref and $def keywords for referencing other parts of schema.
  • additionalProperties keyword now accepts a schema
    Earlier, additionalProperties keyword was only a boolean and the new properties could only be of string type. Now you can provide a schema for the new properties through this keyword.

Bugfixes

  • #28: If an array has minItems set to 0 or undefined, then it will be kept empty initially. If the array has a default, it will use the default value instead of being blank. Earlier, an item was automatically added to the arrays which was not expected behaviour.
react-json-form - Version 1.11.1

Published by bhch over 2 years ago

11 May, 2022

What's new

Minor updates

  • #25: Read csrftoken value from form input if cookie is not available.
react-json-form - Version 1.11.0

Published by bhch over 2 years ago

22 Apr, 2022

What's new

New features

  • #24: Added support for help text for inputs using help_text or helpText keywords.

Bugfixes

  • #22: Fixed a bug when clearing a file, the file input still had a file attached and wasn't reset.
react-json-form - Version 1.10.0

Published by bhch over 2 years ago

11 Mar, 2022

What's new

New features

  • #21 : Ask for confirmation before clearing file inputs
react-json-form - Version 1.9.0

Published by bhch over 2 years ago

09 Feb, 2022

What's new

New features

  • #17: Support for multiple choices
  • #18: Support for default array value

Bugfixes

  • #19: Editing an extandable dict/object's key made the key disappear.
react-json-form - Version 1.8.1

Published by bhch over 2 years ago

06 Feb, 2022

What's new

Bugfixes

  • #16 : Datetime widgets inside an array weren't being moved
Package Rankings
Top 15.81% on Npmjs.org
Badges
Extracted from project README
npm badge
Related Projects