Skip to content

Releases: CarstenWickner/react-jsonschema-inspector

Breadcrumbs Customisation

04 Oct 22:08
Compare
Choose a tag to compare

Added

  • allow for custom rendering of breadcrumbs item via breadcrumbs.renderItem function
  • allow for rendering additional content in breadcrumbs via breadcrumbs.renderTrailingContent function

Fixed

  • fix uncoloured gap on selected item that does not have nested items (introduced in 2.2.0)

Search by Property Name, Style Fixes & Storybook Docs

22 Sep 21:02
Compare
Choose a tag to compare

Added

  • enabling search by matching property name, via new searchOptions.byPropertyName prop
  • providing column object and column index as additional parameter to breadcrumbs.skipSeparator function (i.e. same input as for breadcrumbs.mutateName)
  • providing optionIndexes as additional parameter to renderItemContent prop function

Changed

  • enabling new searchOptions.byPropertyName prop in default searchOptions
  • style-fix: let long item names break over multiple lines within a column
  • style-fix: disable the "outline" on column and colview (they were only shown in some browsers)
  • style-fix: make nested-item indicator white (instead of grey) on currently selected (blue) item

Additionally: the Storybook contents have been migrated to the new Storybook Docs and were extended by some additional stories for the various (complex) props being offered.

Simplified `anyOf`/`oneOf` support

01 May 21:20
a28a825
Compare
Choose a tag to compare

Added

  • exporting helper function getFieldValueArrayFromSchemaGroup()
  • exporting helper function getCommonFieldValuesFromSchemaGroup()
  • exporting helper function getMaximumFieldValueFromSchemaGroup()
  • exporting helper function getMinimumFieldValueFromSchemaGroup()

Changed

  • not including anyOf or oneOf in <Inspector> prop parserConfig no longer hides the respective schema parts (always including everything)

Removed

  • "type" property in <Inspector> prop parserConfig.anyOf/parserConfig.oneOf (i.e. always "asAdditionalColumn" behaviour from now on)
  • undocumented export of helper function getFieldValueFromSchemaGroup(), one of the four new helper functions should be used instead

Adjustment of default Details Form

24 Apr 22:40
Compare
Choose a tag to compare

Now respecting the validation logic behind allOf by not simply listing all values for the same field, but rather semantically combining/merging them, e.g.

  • for "type" only show those values that are consistently mentioned in all schema parts (only "type" is not mentioned at all)
  • for "minimum"/"minLength"/"minItems" only show the highest value if there are multiple different values
  • for "maximum"/"maxLength"/"maxItems" only show the lowest value if there are multiple different values
  • combine "const" and "enum" depending on the number of provided values (also consolidating them as for "type")

Major rewrite to fully support anyOf and oneOf

11 Apr 22:30
7e64a0b
Compare
Choose a tag to compare
  • A number of additional configuration options have been added
  • anyOf and oneOf parts of a schema can now be handled properly (i.e. are not being ignored anymore)
  • Ability to define how an array's items are being accessed (also treating them as separate items in breadcrumbs)
  • Full internationalisation possible through various props.
  • The main Inspector component is now being exposed as named (and not default) export.

Reduced Package Size

18 Mar 20:48
Compare
Choose a tag to compare

.npmignore was not defined correctly and resulted in a much bigger npm package than necessary (e.g. including tests).

Extended customising options for breadcrumbs

09 Mar 22:37
Compare
Choose a tag to compare
  • Allow to mutate the name of a selected item when including it in breadcrumbs (e.g. to sanitise it).
  • Allow skipping a breadcrumb (e.g. omitting the root schema selection)
  • Include breadcrumbs as array parameter in onSelect callback.

Adding Search Support

08 Mar 19:31
9af4196
Compare
Choose a tag to compare
  • Offering free-text search input above inspector
  • Configuration can be done by providing a simple search function.
  • Configuration can be done via names of fields to search in, e.g. ["title", "description"].
  • Avoiding endless loops in case of circular references.
  • Automatically consider sub-schemas.
  • Automatically consider $ref-erences.
  • Use lodash.debounce to avoid performance issues when constantly filtering complex schemas.