@uiw/react-json-view 2.0.0-alpha.1 → 2.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +145 -36
- package/cjs/Container.js +4 -8
- package/cjs/comps/Copied.js +15 -13
- package/cjs/comps/KeyValues.js +30 -22
- package/cjs/comps/NestedClose.js +3 -4
- package/cjs/comps/NestedOpen.js +18 -16
- package/cjs/comps/Value.js +14 -16
- package/cjs/editor/KeyName.d.ts +2 -0
- package/cjs/editor/KeyName.js +82 -0
- package/cjs/editor/index.d.ts +19 -0
- package/cjs/editor/index.js +44 -0
- package/cjs/editor/store.d.ts +28 -0
- package/cjs/editor/store.js +23 -0
- package/cjs/index.d.ts +5 -3
- package/cjs/index.js +9 -8
- package/cjs/section/Copied.d.ts +1 -1
- package/cjs/section/Copied.js +1 -2
- package/cjs/section/CountInfo.d.ts +10 -1
- package/cjs/section/CountInfo.js +42 -4
- package/cjs/section/CountInfoExtra.d.ts +10 -1
- package/cjs/section/CountInfoExtra.js +32 -4
- package/cjs/section/Ellipsis.d.ts +10 -0
- package/cjs/section/Ellipsis.js +30 -4
- package/cjs/section/KeyName.d.ts +8 -0
- package/cjs/section/KeyName.js +38 -4
- package/cjs/section/Row.d.ts +16 -0
- package/cjs/section/Row.js +50 -0
- package/cjs/store/Expands.js +2 -4
- package/cjs/store/Section.d.ts +5 -2
- package/cjs/store/Section.js +6 -4
- package/cjs/store/ShowTools.js +2 -4
- package/cjs/store/Symbols.d.ts +2 -2
- package/cjs/store/Symbols.js +3 -4
- package/cjs/store/Types.d.ts +28 -24
- package/cjs/store/Types.js +8 -8
- package/cjs/store.d.ts +7 -4
- package/cjs/store.js +5 -10
- package/cjs/symbol/Arrow.d.ts +1 -1
- package/cjs/symbol/Arrow.js +1 -2
- package/cjs/symbol/BraceLeft.d.ts +1 -1
- package/cjs/symbol/BraceLeft.js +1 -2
- package/cjs/symbol/BraceRight.d.ts +1 -1
- package/cjs/symbol/BraceRight.js +1 -2
- package/cjs/symbol/BracketsLeft.d.ts +1 -1
- package/cjs/symbol/BracketsLeft.js +1 -2
- package/cjs/symbol/BracketsRight.d.ts +1 -1
- package/cjs/symbol/BracketsRight.js +1 -2
- package/cjs/symbol/Colon.d.ts +1 -1
- package/cjs/symbol/Colon.js +1 -2
- package/cjs/symbol/Quote.d.ts +1 -1
- package/cjs/symbol/Quote.js +1 -2
- package/cjs/symbol/ValueQuote.d.ts +1 -1
- package/cjs/symbol/ValueQuote.js +1 -2
- package/{esm/comps/ReRender/Symbols.d.ts → cjs/symbol/index.d.ts} +4 -6
- package/cjs/{comps/ReRender/Symbols.js → symbol/index.js} +32 -33
- package/cjs/theme/basic.js +2 -3
- package/cjs/theme/dark.js +2 -3
- package/cjs/theme/github.dark.js +2 -3
- package/cjs/theme/github.light.js +2 -3
- package/cjs/theme/gruvbox.js +2 -3
- package/cjs/theme/light.js +2 -3
- package/cjs/theme/monokai.js +2 -3
- package/cjs/theme/nord.js +2 -3
- package/cjs/theme/vscode.js +2 -3
- package/cjs/types/Bigint.d.ts +1 -1
- package/cjs/types/Bigint.js +1 -2
- package/cjs/types/Date.d.ts +1 -1
- package/cjs/types/Date.js +1 -2
- package/cjs/types/False.d.ts +1 -1
- package/cjs/types/False.js +1 -2
- package/cjs/types/Float.d.ts +1 -1
- package/cjs/types/Float.js +1 -2
- package/cjs/types/Int.d.ts +1 -1
- package/cjs/types/Int.js +1 -2
- package/cjs/types/Map.d.ts +1 -1
- package/cjs/types/Map.js +1 -2
- package/cjs/types/Nan.d.ts +1 -1
- package/cjs/types/Nan.js +1 -2
- package/cjs/types/Null.d.ts +1 -1
- package/cjs/types/Null.js +1 -2
- package/cjs/types/Set.d.ts +1 -1
- package/cjs/types/Set.js +1 -2
- package/cjs/types/String.d.ts +1 -1
- package/cjs/types/String.js +1 -2
- package/cjs/types/True.d.ts +1 -1
- package/cjs/types/True.js +1 -2
- package/cjs/types/Undefined.d.ts +1 -1
- package/cjs/types/Undefined.js +1 -2
- package/cjs/types/Url.d.ts +1 -1
- package/cjs/types/Url.js +1 -2
- package/{esm/comps/ReRender/Types.d.ts → cjs/types/index.d.ts} +8 -13
- package/cjs/{comps/ReRender/Types.js → types/index.js} +103 -121
- package/cjs/utils/useHighlight.js +0 -1
- package/cjs/utils/useRender.d.ts +1 -1
- package/editor.d.ts +22 -20
- package/esm/Container.js +4 -5
- package/esm/comps/Copied.js +14 -11
- package/esm/comps/KeyValues.js +20 -11
- package/esm/comps/NestedClose.js +1 -1
- package/esm/comps/NestedOpen.js +12 -9
- package/esm/comps/Value.js +1 -1
- package/esm/editor/KeyName.d.ts +2 -0
- package/esm/editor/KeyName.js +77 -0
- package/esm/editor/index.d.ts +19 -0
- package/esm/editor/index.js +34 -0
- package/esm/editor/store.d.ts +28 -0
- package/esm/editor/store.js +13 -0
- package/esm/index.d.ts +5 -3
- package/esm/index.js +5 -3
- package/esm/section/Copied.d.ts +1 -1
- package/esm/section/CountInfo.d.ts +10 -1
- package/esm/section/CountInfo.js +43 -1
- package/esm/section/CountInfoExtra.d.ts +10 -1
- package/esm/section/CountInfoExtra.js +32 -1
- package/esm/section/Ellipsis.d.ts +10 -0
- package/esm/section/Ellipsis.js +31 -1
- package/esm/section/KeyName.d.ts +8 -0
- package/esm/section/KeyName.js +39 -1
- package/esm/section/Row.d.ts +16 -0
- package/esm/section/Row.js +45 -0
- package/esm/store/Section.d.ts +5 -2
- package/esm/store/Section.js +4 -0
- package/esm/store/Symbols.d.ts +2 -2
- package/esm/store/Symbols.js +1 -0
- package/esm/store/Types.d.ts +28 -24
- package/esm/store/Types.js +6 -4
- package/esm/store.d.ts +7 -4
- package/esm/symbol/Arrow.d.ts +1 -1
- package/esm/symbol/BraceLeft.d.ts +1 -1
- package/esm/symbol/BraceRight.d.ts +1 -1
- package/esm/symbol/BracketsLeft.d.ts +1 -1
- package/esm/symbol/BracketsRight.d.ts +1 -1
- package/esm/symbol/Colon.d.ts +1 -1
- package/esm/symbol/Quote.d.ts +1 -1
- package/esm/symbol/ValueQuote.d.ts +1 -1
- package/{cjs/comps/ReRender/Symbols.d.ts → esm/symbol/index.d.ts} +4 -6
- package/esm/{comps/ReRender/Symbols.js → symbol/index.js} +26 -24
- package/esm/types/Bigint.d.ts +1 -1
- package/esm/types/Date.d.ts +1 -1
- package/esm/types/False.d.ts +1 -1
- package/esm/types/Float.d.ts +1 -1
- package/esm/types/Int.d.ts +1 -1
- package/esm/types/Map.d.ts +1 -1
- package/esm/types/Nan.d.ts +1 -1
- package/esm/types/Null.d.ts +1 -1
- package/esm/types/Set.d.ts +1 -1
- package/esm/types/String.d.ts +1 -1
- package/esm/types/True.d.ts +1 -1
- package/esm/types/Undefined.d.ts +1 -1
- package/esm/types/Url.d.ts +1 -1
- package/{cjs/comps/ReRender/Types.d.ts → esm/types/index.d.ts} +8 -13
- package/esm/{comps/ReRender/Types.js → types/index.js} +84 -94
- package/esm/utils/useHighlight.js +0 -1
- package/esm/utils/useRender.d.ts +1 -1
- package/package.json +3 -4
- package/cjs/comps/CountInfo.d.ts +0 -19
- package/cjs/comps/CountInfo.js +0 -72
- package/cjs/comps/Ellipsis.d.ts +0 -10
- package/cjs/comps/Ellipsis.js +0 -35
- package/cjs/comps/Key.d.ts +0 -7
- package/cjs/comps/Key.js +0 -39
- package/cjs/type.d.ts +0 -50
- package/cjs/type.js +0 -57
- package/esm/comps/CountInfo.d.ts +0 -19
- package/esm/comps/CountInfo.js +0 -70
- package/esm/comps/Ellipsis.d.ts +0 -10
- package/esm/comps/Ellipsis.js +0 -31
- package/esm/comps/Key.d.ts +0 -7
- package/esm/comps/Key.js +0 -35
- package/esm/type.d.ts +0 -50
- package/esm/type.js +0 -50
package/README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
react-json-view
|
|
2
2
|
===
|
|
3
3
|
|
|
4
|
+
[](https://jaywcjlove.github.io/#/sponsor)
|
|
4
5
|
[](https://github.com/uiwjs/react-json-view/actions/workflows/ci.yml)
|
|
5
6
|
[](https://www.npmjs.com/package/@uiw/react-json-view)
|
|
6
7
|
[](https://www.npmjs.com/package/@uiw/react-json-view)
|
|
7
8
|
[](https://github.com/facebook/react/releases)
|
|
8
9
|
[](https://uiwjs.github.io/react-json-view/lcov-report/)
|
|
9
10
|
|
|
10
|
-
A React component for displaying and editing javascript arrays and JSON objects.
|
|
11
|
+
A React component for displaying and editing javascript arrays and JSON objects. Preview of [**v1 documentation**](https://raw.githack.com/uiwjs/react-json-view/v1-docs/index.html) is available [here](https://raw.githack.com/uiwjs/react-json-view/v1-docs/index.html).
|
|
11
12
|
|
|
12
13
|
<!--rehype:ignore:start-->
|
|
13
14
|
<a href="https://uiwjs.github.io/react-json-view/" target="_blank">
|
|
@@ -26,11 +27,12 @@ A React component for displaying and editing javascript arrays and JSON objects.
|
|
|
26
27
|
✏️ Support editing and adding features
|
|
27
28
|
♻️ Whether to highlight updates.
|
|
28
29
|
|
|
29
|
-
The new version [**v2**](https://
|
|
30
|
+
The new version [**v2**](https://uiwjs.github.io/react-json-view/) has redesigned the API to make the code more maintainable and introduced a simpler and more flexible component customization rendering API. Each component can now have custom rendering, and the new API resembles React more closely. Preview [v2 documentation](https://uiwjs.github.io/react-json-view/) and [examples](https://uiwjs.github.io/react-json-view/).
|
|
30
31
|
|
|
31
32
|
- [x] Complete all features of displaying JSON in v1.
|
|
32
33
|
- [ ] Add editing functionality to v2.
|
|
33
|
-
- [
|
|
34
|
+
- [x] Add test cases to v2.
|
|
35
|
+
|
|
34
36
|
|
|
35
37
|
## Quick Start
|
|
36
38
|
|
|
@@ -323,13 +325,13 @@ export default function Demo() {
|
|
|
323
325
|
}}
|
|
324
326
|
>
|
|
325
327
|
<JsonView.String
|
|
326
|
-
render={({ children, ...reset }, { type }) => {
|
|
327
|
-
const isImg = /^https?.*\.(jpg|png)$/i.test(
|
|
328
|
+
render={({ children, ...reset }, { type, value, keyName }) => {
|
|
329
|
+
const isImg = /^https?.*\.(jpg|png)$/i.test(value)
|
|
328
330
|
if (type === 'type' && isImg) {
|
|
329
331
|
return <span />
|
|
330
332
|
}
|
|
331
333
|
if (type === 'value' && isImg) {
|
|
332
|
-
return <img {...reset} height="26" src={
|
|
334
|
+
return <img {...reset} height="26" src={value} />
|
|
333
335
|
}
|
|
334
336
|
}}
|
|
335
337
|
/>
|
|
@@ -361,7 +363,7 @@ export default function Demo() {
|
|
|
361
363
|
}
|
|
362
364
|
```
|
|
363
365
|
|
|
364
|
-
Supports certain partial customizations such as: `<Copied />`, `<CountInfo />`, `<CountInfoExtra />`, `<Ellipsis />`, `<KeyName />`
|
|
366
|
+
Supports certain partial customizations such as: `<Copied />`, `<CountInfo />`, `<CountInfoExtra />`, `<Ellipsis />`, `<KeyName />`, `<Row />`
|
|
365
367
|
|
|
366
368
|
```tsx mdx:preview
|
|
367
369
|
import React, { Fragment } from 'react';
|
|
@@ -414,6 +416,59 @@ export default function Demo() {
|
|
|
414
416
|
}
|
|
415
417
|
```
|
|
416
418
|
|
|
419
|
+
More in-depth customization ([#19](https://github.com/uiwjs/react-json-view/issues/19))
|
|
420
|
+
|
|
421
|
+
```tsx mdx:preview
|
|
422
|
+
import React from 'react';
|
|
423
|
+
import JsonView from '@uiw/react-json-view';
|
|
424
|
+
|
|
425
|
+
const object = {
|
|
426
|
+
_id: "ObjectId('13212hakjdhajksd')",
|
|
427
|
+
uid: "test1",
|
|
428
|
+
attival_time: new Date('Tue Sep 13 2022 14:07:44 GMT-0500 (Central Daylight Time)'),
|
|
429
|
+
__v: 0
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export default function Demo() {
|
|
433
|
+
return (
|
|
434
|
+
<JsonView
|
|
435
|
+
value={object}
|
|
436
|
+
// keyName="root"
|
|
437
|
+
displayObjectSize={false}
|
|
438
|
+
style={{
|
|
439
|
+
'--w-rjv-background-color': '#ffffff',
|
|
440
|
+
}}
|
|
441
|
+
>
|
|
442
|
+
<JsonView.Quote render={() => <span />}/>
|
|
443
|
+
<JsonView.String
|
|
444
|
+
render={({ children, ...reset }, { type, value, keyName }) => {
|
|
445
|
+
if (type === 'type') {
|
|
446
|
+
return <span />
|
|
447
|
+
}
|
|
448
|
+
if (type === 'value' && /ObjectId\(['"](.*?)['"]\)/.test(value)) {
|
|
449
|
+
return <span {...reset}>{children}</span>
|
|
450
|
+
}
|
|
451
|
+
}}
|
|
452
|
+
/>
|
|
453
|
+
<JsonView.Date
|
|
454
|
+
render={({ children, ...reset }, { type, value, keyName }) => {
|
|
455
|
+
if (type === 'type') {
|
|
456
|
+
return <span />
|
|
457
|
+
}
|
|
458
|
+
}}
|
|
459
|
+
/>
|
|
460
|
+
<JsonView.Int
|
|
461
|
+
render={({ children, ...reset }, { type, value, keyName }) => {
|
|
462
|
+
if (type === 'type') {
|
|
463
|
+
return <span />
|
|
464
|
+
}
|
|
465
|
+
}}
|
|
466
|
+
/>
|
|
467
|
+
</JsonView>
|
|
468
|
+
)
|
|
469
|
+
}
|
|
470
|
+
```
|
|
471
|
+
|
|
417
472
|
Inspector
|
|
418
473
|
|
|
419
474
|
```tsx mdx:preview
|
|
@@ -525,6 +580,52 @@ Passing **as="tagName"** will automatically infer the type.
|
|
|
525
580
|
/>
|
|
526
581
|
```
|
|
527
582
|
|
|
583
|
+
Add a click event on the data row
|
|
584
|
+
|
|
585
|
+
```tsx mdx:preview
|
|
586
|
+
import React from 'react';
|
|
587
|
+
import JsonView from '@uiw/react-json-view';
|
|
588
|
+
|
|
589
|
+
export default function Demo() {
|
|
590
|
+
return (
|
|
591
|
+
<JsonView
|
|
592
|
+
style={{
|
|
593
|
+
'--w-rjv-background-color': '#ffffff',
|
|
594
|
+
}}
|
|
595
|
+
value={{
|
|
596
|
+
name: 'John',
|
|
597
|
+
age: 30,
|
|
598
|
+
hobbies: ['reading', 'coding', 'swimming'],
|
|
599
|
+
address: {
|
|
600
|
+
street: '123 Main St',
|
|
601
|
+
city: 'New York',
|
|
602
|
+
country: {
|
|
603
|
+
name: 'Main ',
|
|
604
|
+
codex: '123'
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}}
|
|
608
|
+
>
|
|
609
|
+
<JsonView.Row
|
|
610
|
+
as="div"
|
|
611
|
+
render={(props, { keyName, value, parentValue }) => {
|
|
612
|
+
return (
|
|
613
|
+
<div
|
|
614
|
+
{...props}
|
|
615
|
+
onClick={() => {
|
|
616
|
+
console.log("keyName", keyName)
|
|
617
|
+
console.log("value", value)
|
|
618
|
+
console.log("parentValue", parentValue)
|
|
619
|
+
}}
|
|
620
|
+
/>
|
|
621
|
+
)
|
|
622
|
+
}}
|
|
623
|
+
/>
|
|
624
|
+
</JsonView>
|
|
625
|
+
)
|
|
626
|
+
}
|
|
627
|
+
```
|
|
628
|
+
|
|
528
629
|
## Highlight Updates
|
|
529
630
|
|
|
530
631
|
```tsx mdx:preview
|
|
@@ -670,7 +771,7 @@ export default function Demo() {
|
|
|
670
771
|
|
|
671
772
|
## Props
|
|
672
773
|
|
|
673
|
-
Migrate from
|
|
774
|
+
Migrate from JSON View v1 to v2. The new v2 version has removed the ~~`quotes`~~ and ~~`components`~~ props.
|
|
674
775
|
|
|
675
776
|
```diff
|
|
676
777
|
export interface JsonViewProps<T extends object> extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
@@ -686,7 +787,7 @@ export interface JsonViewProps<T extends object> extends React.DetailedHTMLProps
|
|
|
686
787
|
/** Define the root node name. @default undefined */
|
|
687
788
|
keyName?: string | number;
|
|
688
789
|
/** Whether sort keys through `String.prototype.localeCompare()` @default false */
|
|
689
|
-
objectSortKeys?: boolean | ((
|
|
790
|
+
objectSortKeys?: boolean | ((keyA: string, keyB: string, valueA: T, valueB: T) => number);
|
|
690
791
|
/** Set the indent-width for nested objects @default 15 */
|
|
691
792
|
indentWidth?: number;
|
|
692
793
|
/** When set to `true`, `objects` and `arrays` are labeled with size @default true */
|
|
@@ -695,8 +796,12 @@ export interface JsonViewProps<T extends object> extends React.DetailedHTMLProps
|
|
|
695
796
|
displayDataTypes?: boolean;
|
|
696
797
|
/** The user can copy objects and arrays to clipboard by clicking on the clipboard icon. @default true */
|
|
697
798
|
enableClipboard?: boolean;
|
|
799
|
+
/** When set to true, all nodes will be collapsed by default. Use an integer value to collapse at a particular depth. @default false */
|
|
800
|
+
collapsed?: boolean | number;
|
|
698
801
|
/** Whether to highlight updates. @default true */
|
|
699
802
|
highlightUpdates?: boolean;
|
|
803
|
+
/** Shorten long JSON strings, Set to `0` to disable this feature @default 30 */
|
|
804
|
+
shortenTextAfterLength?: number;
|
|
700
805
|
/** Callback function for when a treeNode is expanded or collapsed */
|
|
701
806
|
onExpand?: (props: {
|
|
702
807
|
expand: boolean;
|
|
@@ -716,9 +821,9 @@ import { BracketsLeft } from './symbol/BracketsLeft';
|
|
|
716
821
|
import { BracketsRight } from './symbol/BracketsRight';
|
|
717
822
|
import { Arrow } from './symbol/Arrow';
|
|
718
823
|
import { Colon } from './symbol/Colon';
|
|
719
|
-
import { Ellipsis } from './symbol/Ellipsis';
|
|
720
824
|
import { Quote } from './symbol/Quote';
|
|
721
825
|
import { ValueQuote } from './symbol/ValueQuote';
|
|
826
|
+
|
|
722
827
|
import { Bigint } from './types/Bigint';
|
|
723
828
|
import { Date } from './types/Date';
|
|
724
829
|
import { False } from './types/False';
|
|
@@ -732,15 +837,24 @@ import { StringText } from './types/String';
|
|
|
732
837
|
import { True } from './types/True';
|
|
733
838
|
import { Undefined } from './types/Undefined';
|
|
734
839
|
import { Url } from './types/Url';
|
|
840
|
+
|
|
735
841
|
import { Copied } from './section/Copied';
|
|
736
842
|
import { CountInfo } from './section/CountInfo';
|
|
737
843
|
import { CountInfoExtra } from './section/CountInfoExtra';
|
|
844
|
+
import { Ellipsis } from './section/Ellipsis';
|
|
738
845
|
import { KeyName } from './section/KeyName';
|
|
739
|
-
import {
|
|
740
|
-
import { type CopiedOption } from "./comps/Copied";
|
|
741
|
-
import { type NestedOpenProps } from "./comps/NestedOpen";
|
|
846
|
+
import { Row } from './section/Row';
|
|
742
847
|
|
|
743
848
|
type JsonViewComponent = React.FC<React.PropsWithRef<JsonViewProps<object>>> & {
|
|
849
|
+
BraceLeft: typeof BraceLeft;
|
|
850
|
+
BraceRight: typeof BraceRight;
|
|
851
|
+
BracketsLeft: typeof BracketsLeft;
|
|
852
|
+
BracketsRight: typeof BracketsRight;
|
|
853
|
+
Arrow: typeof Arrow;
|
|
854
|
+
Colon: typeof Colon;
|
|
855
|
+
Quote: typeof Quote;
|
|
856
|
+
ValueQuote: typeof ValueQuote;
|
|
857
|
+
|
|
744
858
|
Bigint: typeof Bigint;
|
|
745
859
|
Date: typeof Date;
|
|
746
860
|
False: typeof False;
|
|
@@ -754,19 +868,13 @@ type JsonViewComponent = React.FC<React.PropsWithRef<JsonViewProps<object>>> & {
|
|
|
754
868
|
True: typeof True;
|
|
755
869
|
Undefined: typeof Undefined;
|
|
756
870
|
Url: typeof Url;
|
|
757
|
-
|
|
758
|
-
BraceRight: typeof BraceRight;
|
|
759
|
-
BracketsLeft: typeof BracketsLeft;
|
|
760
|
-
BracketsRight: typeof BracketsRight;
|
|
761
|
-
Colon: typeof Colon;
|
|
762
|
-
Ellipsis: typeof Ellipsis;
|
|
763
|
-
Quote: typeof Quote;
|
|
764
|
-
ValueQuote: typeof ValueQuote;
|
|
765
|
-
Arrow: typeof Arrow;
|
|
871
|
+
|
|
766
872
|
Copied: typeof Copied;
|
|
767
873
|
CountInfo: typeof CountInfo;
|
|
768
874
|
CountInfoExtra: typeof CountInfoExtra;
|
|
875
|
+
Ellipsis: typeof Ellipsis;
|
|
769
876
|
KeyName: typeof KeyName;
|
|
877
|
+
Row: typeof Row;
|
|
770
878
|
};
|
|
771
879
|
declare const JsonView: JsonViewComponent;
|
|
772
880
|
export default JsonView;
|
|
@@ -776,19 +884,20 @@ export default JsonView;
|
|
|
776
884
|
|
|
777
885
|
Here is the size benchmark (using [bundlephobia.com](https://bundlephobia.com)) against similar React libraries (found by [`npmjs.com/search`](https://www.npmjs.com/search?q=react%20json&ranking=popularity)):
|
|
778
886
|
|
|
779
|
-
| Library | Bundle size (gzip) | Deps | Last commit | Download | Editable |
|
|
780
|
-
| ------- | ------- | ------- | ------- | ------- | ------- |
|
|
781
|
-
|
|
|
782
|
-
| react-json-view-lite | [](https://bundlephobia.com/result?p=react-json-view-lite) [](https://bundlephobia.com/result?p=react-json-view-lite) | [](https://bundlephobia.com/result?p=react-json-view-lite) | [](https://github.com/AnyRoad/react-json-view-lite/commits) | [](https://www.npmjs.com/package/react-json-view-lite) | ❌ |
|
|
783
|
-
| react-json-pretty | [](https://bundlephobia.com/result?p=react-json-pretty) [](https://bundlephobia.com/result?p=react-json-pretty) | [](https://bundlephobia.com/result?p=react-json-pretty) | [](https://github.com/chenckang/react-json-pretty/commits) | [](https://www.npmjs.com/package/react-json-pretty) | ❌ |
|
|
784
|
-
| react-json-inspector | [](https://bundlephobia.com/result?p=react-json-inspector) [](https://bundlephobia.com/result?p=react-json-inspector) | [](https://bundlephobia.com/result?p=react-json-inspector) | [](https://github.com/Lapple/react-json-inspector/commits) | [](https://www.npmjs.com/package/react-json-inspector) | ❌ |
|
|
785
|
-
| react-json-tree | [](https://bundlephobia.com/result?p=react-json-tree) [](https://bundlephobia.com/result?p=react-json-tree) | [](https://bundlephobia.com/result?p=react-json-tree) | [](https://github.com/reduxjs/redux-devtools/commits) | [](https://www.npmjs.com/package/react-json-tree) | ❌ |
|
|
786
|
-
| ~~react-json-view~~ | [](https://bundlephobia.com/result?p=react-json-view) [](https://bundlephobia.com/result?p=react-json-view) | [](https://bundlephobia.com/result?p=react-json-view) | [](https://github.com/mac-s-g/react-json-view/commits) | [](https://www.npmjs.com/package/react-json-view) | ✅ |
|
|
787
|
-
|
|
|
788
|
-
| react-
|
|
789
|
-
|
|
|
790
|
-
|
|
|
791
|
-
|
|
|
887
|
+
| Library | Bundle size (gzip) | Deps | Last commit | Download | Editable | Demo |
|
|
888
|
+
| ------- | ------- | ------- | ------- | ------- | ------- | ------- |
|
|
889
|
+
| **[@uiw/react-json-view](https://github.com/uiwjs/react-json-view)** | [](https://bundlephobia.com/result?p=@uiw/react-json-view) [](https://bundlephobia.com/result?p=@uiw/react-json-view) | [](https://bundlephobia.com/result?p=@uiw/react-json-view) | [](https://github.com/uiwjs/react-json-view/commits) | [](https://www.npmjs.com/package/@uiw/react-json-view) | ✅ | [demo](https://uiwjs.github.io/react-json-view/) |
|
|
890
|
+
| [react-json-view-lite](https://github.com/anyroad/react-json-view-lite) | [](https://bundlephobia.com/result?p=react-json-view-lite) [](https://bundlephobia.com/result?p=react-json-view-lite) | [](https://bundlephobia.com/result?p=react-json-view-lite) | [](https://github.com/AnyRoad/react-json-view-lite/commits) | [](https://www.npmjs.com/package/react-json-view-lite) | ❌ | [demo](https://anyroad.github.io/react-json-view-lite/) |
|
|
891
|
+
| [react-json-pretty](https://github.com/chenckang/react-json-pretty) | [](https://bundlephobia.com/result?p=react-json-pretty) [](https://bundlephobia.com/result?p=react-json-pretty) | [](https://bundlephobia.com/result?p=react-json-pretty) | [](https://github.com/chenckang/react-json-pretty/commits) | [](https://www.npmjs.com/package/react-json-pretty) | ❌ | - |
|
|
892
|
+
| [~~react-json-inspector~~](https://github.com/Lapple/react-json-inspector) | [](https://bundlephobia.com/result?p=react-json-inspector) [](https://bundlephobia.com/result?p=react-json-inspector) | [](https://bundlephobia.com/result?p=react-json-inspector) | [](https://github.com/Lapple/react-json-inspector/commits) | [](https://www.npmjs.com/package/react-json-inspector) | ❌ | [demo](https://lapple.github.io/react-json-inspector/)
|
|
893
|
+
| [react-json-tree](https://github.com/reduxjs/redux-devtools/tree/main/packages/react-json-tree) | [](https://bundlephobia.com/result?p=react-json-tree) [](https://bundlephobia.com/result?p=react-json-tree) | [](https://bundlephobia.com/result?p=react-json-tree) | [](https://github.com/reduxjs/redux-devtools/commits) | [](https://www.npmjs.com/package/react-json-tree) | ❌ |
|
|
894
|
+
| ~~[react-json-view](https://github.com/mac-s-g/react-json-view)~~ | [](https://bundlephobia.com/result?p=react-json-view) [](https://bundlephobia.com/result?p=react-json-view) | [](https://bundlephobia.com/result?p=react-json-view) | [](https://github.com/mac-s-g/react-json-view/commits) | [](https://www.npmjs.com/package/react-json-view) | ✅ | [demo](https://mac-s-g.github.io/react-json-view/demo/dist/) |
|
|
895
|
+
| [react-inspector](https://github.com/storybookjs/react-inspector) | [](https://bundlephobia.com/result?p=react-inspector) [](https://bundlephobia.com/result?p=react-inspector) | [](https://bundlephobia.com/result?p=react-inspector) | [](https://github.com/storybookjs/react-inspector/commits) | [](https://www.npmjs.com/package/react-inspector) | ❌ | [demo](https://react-inspector.netlify.app/) |
|
|
896
|
+
| [react-domify](https://github.com/JedWatson/react-domify) | [](https://bundlephobia.com/result?p=react-domify) [](https://bundlephobia.com/result?p=react-domify) | [](https://bundlephobia.com/result?p=react-domify) | [](https://github.com/JedWatson/react-domify/commits) | [](https://www.npmjs.com/package/react-domify) | ❌ | [demo](https://jedwatson.github.io/react-domify/) |
|
|
897
|
+
| [react18-json-view](https://github.com/YYsuni/react18-json-view) | [](https://bundlephobia.com/result?p=react18-json-view) [](https://bundlephobia.com/result?p=react18-json-view) | [](https://bundlephobia.com/result?p=react18-json-view) | [](https://github.com/YYsuni/react18-json-view/commits) | [](https://www.npmjs.com/package/react18-json-view) | ❌ | [demo](https://jv.yysuni.com/) |
|
|
898
|
+
| [@textea/json-viewer](https://github.com/TexteaInc/json-viewer) | [](https://bundlephobia.com/result?p=@textea/json-viewer) [](https://bundlephobia.com/result?p=@textea/json-viewer) | [](https://bundlephobia.com/result?p=@textea/json-viewer) | [](https://github.com/TexteaInc/json-viewer/commits) | [](https://www.npmjs.com/package/@textea/json-viewer) | ✅ | [demo](https://stackblitz.com/edit/textea-json-viewer-v3-b4wgxq) |
|
|
899
|
+
| [react-editable-json-tree](https://github.com/oxyno-zeta/react-editable-json-tree) | [](https://bundlephobia.com/result?p=react-editable-json-tree) [](https://bundlephobia.com/result?p=react-editable-json-tree) | [](https://bundlephobia.com/result?p=react-editable-json-tree) | [](https://github.com/TexteaInc/json-viewer/commits) | [](https://www.npmjs.com/package/react-editable-json-tree) | ✅ | [demo](https://oxyno-zeta.github.io/react-editable-json-tree/) |
|
|
900
|
+
| [react-json-view](https://github.com/HuolalaTech/react-json-view) | [](https://bundlephobia.com/result?p=@huolala-tech/react-json-view) [](https://bundlephobia.com/result?p=@huolala-tech/react-json-view) | [](https://bundlephobia.com/result?p=@huolala-tech/react-json-view) | [](https://github.com/HuolalaTech/react-json-view/commits) | [](https://www.npmjs.com/package/@huolala-tech/react-json-view) | ❌ | [demo](https://huolalatech.github.io/react-json-view/) |
|
|
792
901
|
|
|
793
902
|
## Development
|
|
794
903
|
|
|
@@ -819,7 +928,7 @@ As always, thanks to our amazing contributors!
|
|
|
819
928
|
<img src="https://uiwjs.github.io/react-json-view/CONTRIBUTORS.svg" />
|
|
820
929
|
</a>
|
|
821
930
|
|
|
822
|
-
Made with [
|
|
931
|
+
Made with [contributors](https://github.com/jaywcjlove/github-action-contributors).
|
|
823
932
|
|
|
824
933
|
## License
|
|
825
934
|
|
package/cjs/Container.js
CHANGED
|
@@ -16,7 +16,7 @@ var _KeyValues = require("./comps/KeyValues");
|
|
|
16
16
|
var _ShowTools = require("./store/ShowTools");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
18
|
var _excluded = ["className", "children", "parentValue", "keyid", "level", "value", "initialValue", "keyName"];
|
|
19
|
-
var Container = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
19
|
+
var Container = exports.Container = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
20
20
|
var _props$className = props.className,
|
|
21
21
|
className = _props$className === void 0 ? '' : _props$className,
|
|
22
22
|
children = props.children,
|
|
@@ -28,13 +28,9 @@ var Container = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
28
28
|
initialValue = props.initialValue,
|
|
29
29
|
keyName = props.keyName,
|
|
30
30
|
elmProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
31
|
-
var $ref = (0, _react.useRef)(null);
|
|
32
31
|
var dispatch = (0, _ShowTools.useShowToolsDispatch)();
|
|
33
|
-
(0, _react.useImperativeHandle)(ref, function () {
|
|
34
|
-
return $ref.current;
|
|
35
|
-
}, [$ref]);
|
|
36
32
|
var subkeyid = (0, _react.useId)();
|
|
37
|
-
var defaultClassNames =
|
|
33
|
+
var defaultClassNames = [className, 'w-rjv-inner'].filter(Boolean).join(' ');
|
|
38
34
|
var reset = {
|
|
39
35
|
onMouseEnter: function onMouseEnter() {
|
|
40
36
|
return dispatch((0, _defineProperty2["default"])({}, subkeyid, true));
|
|
@@ -44,7 +40,8 @@ var Container = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
44
40
|
}
|
|
45
41
|
};
|
|
46
42
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2["default"])((0, _objectSpread2["default"])((0, _objectSpread2["default"])({
|
|
47
|
-
className: defaultClassNames
|
|
43
|
+
className: defaultClassNames,
|
|
44
|
+
ref: ref
|
|
48
45
|
}, elmProps), reset), {}, {
|
|
49
46
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_NestedOpen.NestedOpen, {
|
|
50
47
|
expandKey: subkeyid,
|
|
@@ -63,5 +60,4 @@ var Container = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
63
60
|
})]
|
|
64
61
|
}));
|
|
65
62
|
});
|
|
66
|
-
exports.Container = Container;
|
|
67
63
|
Container.displayName = 'JVR.Container';
|
package/cjs/comps/Copied.js
CHANGED
|
@@ -15,7 +15,7 @@ var _Section = require("../store/Section");
|
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
var _excluded = ["keyName", "value", "expandKey"],
|
|
17
17
|
_excluded2 = ["as", "render"];
|
|
18
|
-
var Copied = function Copied(props) {
|
|
18
|
+
var Copied = exports.Copied = function Copied(props) {
|
|
19
19
|
var keyName = props.keyName,
|
|
20
20
|
value = props.value,
|
|
21
21
|
expandKey = props.expandKey,
|
|
@@ -35,18 +35,21 @@ var Copied = function Copied(props) {
|
|
|
35
35
|
if (enableClipboard === false || !isShowTools) return null;
|
|
36
36
|
var click = function click(event) {
|
|
37
37
|
event.stopPropagation();
|
|
38
|
-
var copyText =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (
|
|
46
|
-
|
|
38
|
+
var copyText = '';
|
|
39
|
+
if (typeof value === 'number' && value === Infinity) {
|
|
40
|
+
copyText = 'Infinity';
|
|
41
|
+
} else if (typeof value === 'number' && isNaN(value)) {
|
|
42
|
+
copyText = 'NaN';
|
|
43
|
+
} else if (typeof value === 'bigint') {
|
|
44
|
+
copyText = value + 'n';
|
|
45
|
+
} else if (value instanceof Date) {
|
|
46
|
+
copyText = value.toLocaleString();
|
|
47
|
+
} else {
|
|
48
|
+
copyText = JSON.stringify(value, null, 2);
|
|
49
|
+
}
|
|
50
|
+
onCopied && onCopied(copyText, value);
|
|
51
|
+
setCopied(true);
|
|
47
52
|
navigator.clipboard.writeText(copyText).then(function () {
|
|
48
|
-
onCopied && onCopied(copyText, value);
|
|
49
|
-
setCopied(true);
|
|
50
53
|
var timer = setTimeout(function () {
|
|
51
54
|
setCopied(false);
|
|
52
55
|
clearTimeout(timer);
|
|
@@ -86,5 +89,4 @@ var Copied = function Copied(props) {
|
|
|
86
89
|
})
|
|
87
90
|
}));
|
|
88
91
|
};
|
|
89
|
-
exports.Copied = Copied;
|
|
90
92
|
Copied.displayName = 'JVR.Copied';
|
package/cjs/comps/KeyValues.js
CHANGED
|
@@ -14,12 +14,13 @@ var _store = require("../store");
|
|
|
14
14
|
var _Expands = require("../store/Expands");
|
|
15
15
|
var _ShowTools = require("../store/ShowTools");
|
|
16
16
|
var _Value = require("./Value");
|
|
17
|
-
var
|
|
17
|
+
var _KeyName = require("../section/KeyName");
|
|
18
|
+
var _Row = require("../section/Row");
|
|
18
19
|
var _Container = require("../Container");
|
|
19
|
-
var
|
|
20
|
+
var _symbol = require("../symbol");
|
|
20
21
|
var _useHighlight = require("../utils/useHighlight");
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
var KeyValues = function KeyValues(props) {
|
|
23
|
+
var KeyValues = exports.KeyValues = function KeyValues(props) {
|
|
23
24
|
var _expands$expandKey;
|
|
24
25
|
var value = props.value,
|
|
25
26
|
_props$expandKey = props.expandKey,
|
|
@@ -47,11 +48,13 @@ var KeyValues = function KeyValues(props) {
|
|
|
47
48
|
b = _ref4[0];
|
|
48
49
|
return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b) : 0;
|
|
49
50
|
}) : entries.sort(function (_ref5, _ref6) {
|
|
50
|
-
var _ref7 = (0, _slicedToArray2["default"])(_ref5,
|
|
51
|
-
a = _ref7[0]
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
var _ref7 = (0, _slicedToArray2["default"])(_ref5, 2),
|
|
52
|
+
a = _ref7[0],
|
|
53
|
+
valA = _ref7[1];
|
|
54
|
+
var _ref8 = (0, _slicedToArray2["default"])(_ref6, 2),
|
|
55
|
+
b = _ref8[0],
|
|
56
|
+
valB = _ref8[1];
|
|
57
|
+
return typeof a === 'string' && typeof b === 'string' ? objectSortKeys(a, b, valA, valB) : 0;
|
|
55
58
|
});
|
|
56
59
|
}
|
|
57
60
|
var style = {
|
|
@@ -75,10 +78,10 @@ var KeyValues = function KeyValues(props) {
|
|
|
75
78
|
})
|
|
76
79
|
});
|
|
77
80
|
};
|
|
78
|
-
exports.KeyValues = KeyValues;
|
|
79
81
|
KeyValues.displayName = 'JVR.KeyValues';
|
|
80
|
-
var KayName = function KayName(props) {
|
|
82
|
+
var KayName = exports.KayName = function KayName(props) {
|
|
81
83
|
var keyName = props.keyName,
|
|
84
|
+
parentValue = props.parentValue,
|
|
82
85
|
value = props.value;
|
|
83
86
|
var _useStore2 = (0, _store.useStore)(),
|
|
84
87
|
highlightUpdates = _useStore2.highlightUpdates;
|
|
@@ -92,21 +95,23 @@ var KayName = function KayName(props) {
|
|
|
92
95
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
93
96
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
94
97
|
ref: highlightContainer,
|
|
95
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
96
|
-
isNumber: isNumber
|
|
97
|
-
|
|
98
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Quote, {
|
|
99
|
+
isNumber: isNumber,
|
|
100
|
+
"data-placement": "left"
|
|
101
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyName.KeyNameComp, {
|
|
98
102
|
keyName: keyName,
|
|
99
103
|
value: value,
|
|
104
|
+
parentValue: parentValue,
|
|
100
105
|
children: keyName
|
|
101
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
102
|
-
isNumber: isNumber
|
|
106
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Quote, {
|
|
107
|
+
isNumber: isNumber,
|
|
108
|
+
"data-placement": "right"
|
|
103
109
|
})]
|
|
104
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
110
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Colon, {})]
|
|
105
111
|
});
|
|
106
112
|
};
|
|
107
|
-
exports.KayName = KayName;
|
|
108
113
|
KayName.displayName = 'JVR.KayName';
|
|
109
|
-
var KeyValuesItem = function KeyValuesItem(props) {
|
|
114
|
+
var KeyValuesItem = exports.KeyValuesItem = function KeyValuesItem(props) {
|
|
110
115
|
var keyName = props.keyName,
|
|
111
116
|
value = props.value,
|
|
112
117
|
parentValue = props.parentValue,
|
|
@@ -139,12 +144,16 @@ var KeyValuesItem = function KeyValuesItem(props) {
|
|
|
139
144
|
return dispatch((0, _defineProperty2["default"])({}, subkeyid, false));
|
|
140
145
|
}
|
|
141
146
|
};
|
|
142
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
143
|
-
className: "w-rjv-line"
|
|
147
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Row.RowComp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
|
|
148
|
+
className: "w-rjv-line",
|
|
149
|
+
value: value,
|
|
150
|
+
keyName: keyName,
|
|
151
|
+
parentValue: parentValue
|
|
144
152
|
}, reset), {}, {
|
|
145
153
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(KayName, {
|
|
146
154
|
keyName: keyName,
|
|
147
|
-
value: value
|
|
155
|
+
value: value,
|
|
156
|
+
parentValue: parentValue
|
|
148
157
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Value.Value, {
|
|
149
158
|
keyName: keyName,
|
|
150
159
|
value: value,
|
|
@@ -152,5 +161,4 @@ var KeyValuesItem = function KeyValuesItem(props) {
|
|
|
152
161
|
})]
|
|
153
162
|
}));
|
|
154
163
|
};
|
|
155
|
-
exports.KeyValuesItem = KeyValuesItem;
|
|
156
164
|
KeyValuesItem.displayName = 'JVR.KeyValuesItem';
|
package/cjs/comps/NestedClose.js
CHANGED
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.NestedClose = void 0;
|
|
7
7
|
var _store = require("../store");
|
|
8
8
|
var _Expands = require("../store/Expands");
|
|
9
|
-
var
|
|
9
|
+
var _symbol = require("../symbol");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
var NestedClose = function NestedClose(props) {
|
|
11
|
+
var NestedClose = exports.NestedClose = function NestedClose(props) {
|
|
12
12
|
var _expands$expandKey;
|
|
13
13
|
var value = props.value,
|
|
14
14
|
expandKey = props.expandKey,
|
|
@@ -28,11 +28,10 @@ var NestedClose = function NestedClose(props) {
|
|
|
28
28
|
};
|
|
29
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
30
30
|
style: style,
|
|
31
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
31
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsClose, {
|
|
32
32
|
isBrackets: isArray || isMySet,
|
|
33
33
|
isVisiable: true
|
|
34
34
|
})
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
exports.NestedClose = NestedClose;
|
|
38
37
|
NestedClose.displayName = 'JVR.NestedClose';
|
package/cjs/comps/NestedOpen.js
CHANGED
|
@@ -12,12 +12,13 @@ var _KeyValues = require("./KeyValues");
|
|
|
12
12
|
var _Expands = require("../store/Expands");
|
|
13
13
|
var _store = require("../store");
|
|
14
14
|
var _Copied = require("./Copied");
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
15
|
+
var _CountInfoExtra = require("../section/CountInfoExtra");
|
|
16
|
+
var _CountInfo = require("../section/CountInfo");
|
|
17
|
+
var _symbol = require("../symbol");
|
|
18
|
+
var _Ellipsis = require("../section/Ellipsis");
|
|
19
|
+
var _types = require("../types");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
var NestedOpen = function NestedOpen(props) {
|
|
21
|
+
var NestedOpen = exports.NestedOpen = function NestedOpen(props) {
|
|
21
22
|
var _expands$expandKey;
|
|
22
23
|
var keyName = props.keyName,
|
|
23
24
|
expandKey = props.expandKey,
|
|
@@ -60,28 +61,30 @@ var NestedOpen = function NestedOpen(props) {
|
|
|
60
61
|
reset.onClick = click;
|
|
61
62
|
}
|
|
62
63
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
63
|
-
children: [showArrow && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
64
|
+
children: [showArrow && /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Arrow, {
|
|
64
65
|
style: arrowStyle,
|
|
65
66
|
expandKey: expandKey
|
|
66
67
|
}), (keyName || typeof keyName === 'number') && /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyValues.KayName, {
|
|
67
68
|
keyName: keyName
|
|
68
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.SetComp, {
|
|
70
|
+
value: initialValue,
|
|
71
|
+
keyName: keyName
|
|
72
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.MapComp, {
|
|
73
|
+
value: initialValue,
|
|
74
|
+
keyName: keyName
|
|
75
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsOpen, {
|
|
73
76
|
isBrackets: isArray || isMySet
|
|
74
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ellipsis.
|
|
77
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ellipsis.EllipsisComp, {
|
|
75
78
|
keyName: keyName,
|
|
76
79
|
value: value,
|
|
77
80
|
isExpanded: isExpanded
|
|
78
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
81
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsClose, {
|
|
79
82
|
isVisiable: isExpanded || !showArrow,
|
|
80
83
|
isBrackets: isArray || isMySet
|
|
81
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CountInfo.
|
|
84
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CountInfo.CountInfoComp, {
|
|
82
85
|
value: value,
|
|
83
86
|
keyName: keyName
|
|
84
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
87
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CountInfoExtra.CountInfoExtraComps, {
|
|
85
88
|
value: value,
|
|
86
89
|
keyName: keyName
|
|
87
90
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, {
|
|
@@ -91,5 +94,4 @@ var NestedOpen = function NestedOpen(props) {
|
|
|
91
94
|
})]
|
|
92
95
|
}));
|
|
93
96
|
};
|
|
94
|
-
exports.NestedOpen = NestedOpen;
|
|
95
97
|
NestedOpen.displayName = 'JVR.NestedOpen';
|