4.0.0 (2024-09-15)
- remove deprecated
createDataType
anddisplayObjectSize
- migrate to MUI v6
3.5.0 (2024-08-26)
- add
data-key-toggle-*
class name for customization (c1e605a) - add utils
getPathValue
(194ac43) - hide colon when key is empty (c1ce6ed)
- passing
path
toEditor
for better customizability (f03ab10) - support
displayComma
for showing comma (2c85bdb)
3.4.1 (2024-04-06)
3.4.0 (2024-02-15)
- expose dataTypes, themes and utils in browser build (922065f)
3.3.2 (2024-02-09)
3.3.1 (2024-01-24)
3.3.0 (2024-01-16)
3.2.3 (2023-11-04)
- should handle key and path of nested grouped array with nestedIndex (6efeac6)
3.2.2 (2023-10-09)
- fix publishing script and add provenance statements (f644caf)
3.2.0 (2023-10-09)
- improve built-in editor with autoFocus and better keyboard control (1a757e8)
- super long string can be partially selected without collapsing (c2282dd)
3.1.1 (2023-06-20)
- trigger release (35760ac)
3.1.0 (2023-06-20)
- support default inspect state with
defaultInspectControl
(7982300)
3.0.0 (2023-04-25)
For the detail and migration guide, check out the Migrating from v2 to v3
This major focus on providing the ability to customize and extend data types. We also moved MUI to peerdependency to reflect the correct dependency relationship.
Starting from v3, dependencies from Material-UI
are no longer included in the package's dependencies.
Run this to install all the necessary dependencies.
npm install @mui/material @emotion/react @emotion/styled
This package was set to support ES5
by default, but it's no longer the case.
Since V3, as this package is using Material-UI
, we have adjusted the browser compatibility to match the Material-UI's one.
serialize
and deserialize
have been added to datatype to support editing feature on any data type.
As the result, createDataType
has been renamed to defineDataType
and the signature has been changed to accept an object instead of a long list of arguments. For more information, please refer to Defining data types.
- createDataType(
- (value) => typeof value === 'string' && value.startsWith('https://i.imgur.com'),
- (props) => <Image height={50} width={50} src={props.value} alt={props.value} />
- )
+ defineDataType({
+ is: (value) => typeof value === 'string' && value.startsWith('https://i.imgur.com'),
+ Component: (props) => <Image height={50} width={50} src={props.value} alt={props.value} />
+ })
displayObjectSize
has been renamed to displaySize
to describe the prop's purpose more accurately.
<JsonViewer
- displayObjectSize={true}
+ displaySize={true}
value={value}
/>
Now you can provide a function to customize this behavior by returning a boolean based on the value and path.
<JsonViewer
displaySize={(path, value) => {
if (Array.isArray(value)) return false
if (value instanceof Map) return true
return true
}}
value={value}
/>
For more information, check Extend Built-in Data Types.
- dropping
createDataType
and change the signature of EditorComponent to only accept string - expose
defineEasyType
for easier customization (d727adb) - expose built-in type (ed64769)
- rename
displayObjectSize
todisplaySize
(2e5739c)
- fix editing on any datatype (69a359f)
- improve deprecation message (5e73886)
- move emotion to peer dependency (5616257)
- move mui to peerDependencies (9c45b90)
- remove
@emotion/*
from jsx importSource (658fddb) - type matching should not early return when value is object (0c9ef70)
- bump to 3.0.0 (0eb2e02)
2.17.2 (2023-04-20)
- use swc in the right way (4b437fb)
2.17.1 (2023-04-20)
- disable
externalHelpers
(aaa31a5)
2.17.0 (2023-04-19)
- expose copy function to
onCopy
callback (5e4c7f3)
2.16.2 (2023-04-02)
NaN
should not trigger highlightUpdates (f09b769)
2.16.1 (2023-03-28)
2.16.0 (2023-03-27)
- highlight changed (b9490fe)
- hucky hooks are not executable at unix (1e5169a)
2.15.0 (2023-03-21)
- expose class
json-viewer-theme-*
for style customization (3ea2805) - support passing
sx
props to customize the style (e10fe1d)
- copying on circular JSON/Array throws error (edfe2f3)
- eliminate eslint warning (e598660)
- improve copy on BigInt / Map / Set (7c46e07)
2.14.1 (2023-03-07)
2.14.0 (2023-02-23)
2.13.1 (2023-01-26)
2.13.0 (2023-01-14)
- add vite as dev dependency (#148) (b85bbf9)
- inline icons from
@mui/icons-material
(#147) (84a5d06) - ui: remove left margin in key-value separator (#153) (4d6a858)
2.12.5 (2023-01-11)
- move eslint related deps to devDependencies (#142) (7e2705d)
- remove
workspaces
inpackage.json
before release (#143) (e3723c1)
2.12.4 (2023-01-01)
2.12.3 (2022-12-26)
- remove export default (9c8fda6)
2.12.2 (2022-12-24)
- set target as
ES5
(d8384db)
2.12.1 (2022-12-24)
- exports default (da50b6f)
2.12.0 (2022-12-05)
- collapse all empty iterables and disable expanding them (#123) (105b002)
- invert logic for showing dots (#122) (0e7292d)
2.11.2 (2022-11-28)
2.11.1 (2022-11-09)
2.11.0 (2022-11-07)
2.10.0 (2022-10-17)
2.9.1 (2022-10-10)
- remove scripts when publishing (45d9cf9)
2.9.0 (2022-10-06)
2.8.1 (2022-10-04)
2.8.0 (2022-10-02)
2.7.4 (2022-10-02)
2.7.3 (2022-09-24)
- add compare function in baseCellType Editor (53bb796)
2.7.2 (2022-09-24)
- disable ssr in function inspect (8a303f2)
2.7.1 (2022-09-23)
- browser field cause vite build fail (#85) (3dd6842)
- example: image url match (19fd4eb)
- throw error if change 'proto' (209788e)
2.7.0 (2022-09-23)
2.6.0 (2022-09-23)
2.5.3 (2022-09-22)
2.5.2 (2022-09-22)
2.5.1 (2022-09-22)
2.5.0 (2022-09-22)
- add helper function
createDataType
(#60) (8c626cf) - backport support for
props.displayDataTypes
(#63) (fa10c9e)
2.4.1 (2022-09-22)
2.4.0 (2022-09-22)
- example: add netlify badge (60d1cc7)
2.3.1 (2022-09-22)
2.3.0 (2022-09-21)
2.2.4 (2022-09-21)
- ignore error when key of Map is an object (4af9609)
2.2.3 (2022-09-21)
- basic example (9dd10cd)
2.2.2 (2022-09-21)
2.2.1 (2022-09-21)
- fix install step (9153091)
2.2.0 (2022-09-20)
- add license in package.json (3c35865)
2.1.0 (2022-09-20)
- support base16 on
props.theme
(1c7e127)
2.0.0 (2022-09-20)
- remove
react-lifecycles-compat
- component ObjectKeyModal (#6)
- add example for
valueTypes
(9daf70c) - backport support for v1 (ff729a6)
- check cycle reference (#22) (b55a08b), closes #20
- finish basic view of next component (c9f6d32)
- init JsonViewerStore (2673a2d)
- init next JsonViewer component (cdb20f2)
- next component (#18) (d354967)
- next: implement basic indent and json parse (6335512)
- next: use TreeView (b9fd642)
- show copy success (#26) (a7d513a)
- support
groupArraysAfterLength
(#21) (6568d91) - support
props.editable
(d3fb54e) - support
props.enableClipboard
(e41102c) - support
props.maxDisplayLength
(#30) (498efe2) - support dark and light theme (5fb3139)
- support inspect
Map
andSet
(#31) (06c886c) - support inspect cache (95f80c7)
- support plugin system (fdf9962)
- update example for
onEdit
(0dd8a93) - update example for stackblitz (688a934)
- use
copy-to-clipboard
(61cf64e)
- border color and expand icon (d11316a)
- bugs (c966281)
- disable ObjectKeyModal when inactive (45b7132)
- example (117a166)
- ignore circular dependency (bd275f5)
- next: indent width (dfafd4b)
- remove ``.stackblitzrc` (d208e71)
- remove export default (339640b)
- replace
Object.hasOwn
(7cdc134) - ssr on date value (15037d1)
- state on nested array (#28) (661151a)
- string on parseInput (f9da340)
- support indent width (#32) (4f8b32f)
- type (2c85ef3)
- type requirement in example (9e34a81)
- fix release-please ci (dc5b28f)
1.24.4 (2022-08-23)
- rename
class
intoclassName
(2a2cfe3)
1.24.3 (2022-08-23)
- ignore postinstall when publish (21c5148)