Releases: CarstenWickner/react-jsonschema-inspector
Releases · CarstenWickner/react-jsonschema-inspector
v5.0.0 – Custom Search Input Rendering
Added
- allow for custom rendering of the search input field via a new
renderSearchInput
prop
Changed
- Updating a number of dev dependencies including TypeScript (resulting in slight changes in type definitions)
- BREAKING CHANGE: Dropping support for JSON Schema Draft 4 (mainly ignoring
"id"
properties in favour of"$id"
)
Fixed
- Handling of
allOf
containing multipleoneOf
and/oranyOf
entries
Breadcrumbs style fix
Fixed
- Add vertical spacing for breadcrumbs wrapping over multiple lines
Also fixed the Storybook setup to apply same browser compatibility settings as the component itself.
Compatibility with IE11
Changed
- Compatibility: replace
<button>
tags for items in columns with focusable<div>
tags - Compatibility: replace css
clip-path
usage for nested-item indicator with css shape from borders - Compatibility: replace css
clip-path
usage for leading breadcrumbs icon with css shape from borders - Compatibility: replace css
clip-path
usage for breadcrumbs items with css shape from borders
Further support for draft 2019-09 and $ref in general
Added
- Draft 2019-09: basic support for
$recursiveRef
as an alias for$ref
(not yet covering advanced use cases) - Derive base URI from
$id
when looking-up sub-schemas via their$ref
Fixed
- Exported type definitions should include the main
<Inspector>
component and its props - Include type definition for Draft 2019-09 for expected props
- Borders of "Details" block should not be shown if there is no selection and no
renderEmptyDetails
prop was provided - Borders of "Details" block should not be shown if there is no selection and
renderEmptyDetails
returns no content to be shown - Borders of "Details" block should not be shown if there is a selection and
renderSelectionDetails
returns no content to be shown
Support Draft 2019-09 and improved single schema display
Added
- Draft 2019-09: support
$defs
as alternative todefinitions
keyword - Draft 2019-09: include other keywords alongside
$ref
- Draft 2019-09: support
$anchor
keyword as$ref
target - Draft 2019-09: explicitly document unsupported keywords
- introduce
hideSingleRootItem
prop for displaying only a single schema's properties
Header Customisation
Added
- allow for addition of tool-bar items in the header besides the search input via
renderHeaderToolBar
prop
Fixed
- height of breadcrumb items should not grow with custom trailing content
Bundle Size Reduction
Fixed
- ignore non-
string
values when searching byfields
Removed
- run-time proptype validation for JSON Schemas (now only at compile-time through TypeScript)
- proptype validations for internal (i.e. not exported) components
TypeScript
Changed
- introduce TypeScript
- changed expected parameters for
breadcrumbs.renderItem
prop to a single object with named attributes - changed expected parameters for
breadcrumbs.renderTrailingContent
prop to a single object with named attributes
Also:
- introduced "Prettier"
- changed the Storybook to MDX format with additional explanations for each story
ES Module + CommonJS + external dependencies
Changed
- declare all dependencies as external to allow tree-shaking by consumers
Fixed
- declaration of ES module in package.json
- provide CommonJS output as fall-back
ES Module
Changed
- use rollup instead of webpack for generating bundle
- provide ES module instead of CommonJS bundle
- reduced bundle size