@uiw/react-json-view 2.0.0-alpha.4 → 2.0.0-alpha.40
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 +279 -39
- package/basic.d.ts +4 -0
- package/cjs/Container.d.ts +2 -0
- package/cjs/Container.js +15 -6
- package/cjs/arrow/TriangleArrow.js +1 -1
- package/cjs/comps/Copied.d.ts +3 -4
- package/cjs/comps/Copied.js +61 -18
- package/cjs/comps/KeyValues.d.ts +2 -4
- package/cjs/comps/KeyValues.js +73 -28
- package/cjs/comps/NestedClose.d.ts +2 -2
- package/cjs/comps/NestedClose.js +42 -12
- package/cjs/comps/NestedOpen.d.ts +2 -3
- package/cjs/comps/NestedOpen.js +42 -20
- package/cjs/comps/Value.d.ts +2 -2
- package/cjs/comps/Value.js +5 -7
- package/cjs/comps/useIdCompat.d.ts +1 -0
- package/cjs/comps/useIdCompat.js +14 -0
- package/cjs/editor/KeyName.d.ts +2 -0
- package/cjs/editor/KeyName.js +82 -0
- package/cjs/editor/index.d.ts +18 -0
- package/cjs/editor/index.js +44 -0
- package/cjs/editor/store.d.ts +27 -0
- package/cjs/editor/store.js +23 -0
- package/cjs/index.d.ts +26 -4
- package/cjs/index.js +17 -7
- package/cjs/section/Copied.d.ts +4 -1
- package/cjs/section/Copied.js +1 -2
- package/cjs/section/CountInfo.d.ts +1 -2
- package/cjs/section/CountInfo.js +3 -5
- package/cjs/section/CountInfoExtra.d.ts +1 -2
- package/cjs/section/CountInfoExtra.js +2 -4
- package/cjs/section/Ellipsis.d.ts +0 -1
- package/cjs/section/Ellipsis.js +4 -5
- package/cjs/section/KeyName.d.ts +7 -6
- package/cjs/section/KeyName.js +8 -6
- package/cjs/section/Row.d.ts +13 -0
- package/cjs/section/Row.js +51 -0
- package/cjs/store/Expands.js +2 -4
- package/cjs/store/Section.d.ts +12 -6
- package/cjs/store/Section.js +6 -4
- package/cjs/store/ShowTools.js +2 -4
- package/cjs/store/Symbols.d.ts +10 -3
- package/cjs/store/Symbols.js +2 -4
- package/cjs/store/Types.d.ts +30 -25
- package/cjs/store/Types.js +8 -8
- package/cjs/store.d.ts +12 -6
- 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/cjs/symbol/index.d.ts +12 -17
- package/cjs/symbol/index.js +75 -30
- package/cjs/theme/basic.d.ts +2 -2
- package/cjs/theme/basic.js +4 -3
- package/cjs/theme/dark.d.ts +2 -2
- package/cjs/theme/dark.js +2 -3
- package/cjs/theme/github.dark.d.ts +2 -2
- package/cjs/theme/github.dark.js +2 -3
- package/cjs/theme/github.light.d.ts +2 -2
- package/cjs/theme/github.light.js +2 -3
- package/cjs/theme/gruvbox.d.ts +2 -2
- package/cjs/theme/gruvbox.js +2 -3
- package/cjs/theme/light.d.ts +2 -2
- package/cjs/theme/light.js +2 -3
- package/cjs/theme/monokai.d.ts +2 -2
- package/cjs/theme/monokai.js +2 -3
- package/cjs/theme/nord.d.ts +2 -2
- package/cjs/theme/nord.js +2 -3
- package/cjs/theme/vscode.d.ts +2 -2
- 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/cjs/types/index.d.ts +5 -2
- package/cjs/types/index.js +174 -166
- package/cjs/utils/useHighlight.d.ts +0 -1
- package/cjs/utils/useRender.d.ts +1 -1
- package/dark.d.ts +2 -1
- package/editor.d.ts +22 -20
- package/esm/Container.d.ts +2 -0
- package/esm/Container.js +21 -11
- package/esm/arrow/TriangleArrow.js +1 -1
- package/esm/comps/Copied.d.ts +3 -4
- package/esm/comps/Copied.js +61 -19
- package/esm/comps/KeyValues.d.ts +2 -4
- package/esm/comps/KeyValues.js +71 -27
- package/esm/comps/NestedClose.d.ts +2 -2
- package/esm/comps/NestedClose.js +40 -11
- package/esm/comps/NestedOpen.d.ts +2 -3
- package/esm/comps/NestedOpen.js +47 -26
- package/esm/comps/Value.d.ts +2 -2
- package/esm/comps/Value.js +3 -3
- package/esm/comps/useIdCompat.d.ts +1 -0
- package/esm/comps/useIdCompat.js +8 -0
- package/esm/editor/KeyName.d.ts +2 -0
- package/esm/editor/KeyName.js +77 -0
- package/esm/editor/index.d.ts +18 -0
- package/esm/editor/index.js +33 -0
- package/esm/editor/store.d.ts +27 -0
- package/esm/editor/store.js +13 -0
- package/esm/index.d.ts +26 -4
- package/esm/index.js +50 -41
- package/esm/section/Copied.d.ts +4 -1
- package/esm/section/Copied.js +2 -2
- package/esm/section/CountInfo.d.ts +1 -2
- package/esm/section/CountInfo.js +4 -4
- package/esm/section/CountInfoExtra.d.ts +1 -2
- package/esm/section/CountInfoExtra.js +2 -2
- package/esm/section/Ellipsis.d.ts +0 -1
- package/esm/section/Ellipsis.js +3 -3
- package/esm/section/KeyName.d.ts +7 -6
- package/esm/section/KeyName.js +8 -4
- package/esm/section/Row.d.ts +13 -0
- package/esm/section/Row.js +47 -0
- package/esm/store/Section.d.ts +12 -6
- package/esm/store/Section.js +4 -0
- package/esm/store/Symbols.d.ts +10 -3
- package/esm/store/Symbols.js +1 -1
- package/esm/store/Types.d.ts +30 -25
- package/esm/store/Types.js +6 -4
- package/esm/store.d.ts +12 -6
- package/esm/store.js +5 -5
- package/esm/symbol/Arrow.d.ts +1 -1
- package/esm/symbol/Arrow.js +2 -2
- package/esm/symbol/BraceLeft.d.ts +1 -1
- package/esm/symbol/BraceLeft.js +2 -2
- package/esm/symbol/BraceRight.d.ts +1 -1
- package/esm/symbol/BraceRight.js +2 -2
- package/esm/symbol/BracketsLeft.d.ts +1 -1
- package/esm/symbol/BracketsLeft.js +2 -2
- package/esm/symbol/BracketsRight.d.ts +1 -1
- package/esm/symbol/BracketsRight.js +2 -2
- package/esm/symbol/Colon.d.ts +1 -1
- package/esm/symbol/Colon.js +2 -2
- package/esm/symbol/Quote.d.ts +1 -1
- package/esm/symbol/Quote.js +2 -2
- package/esm/symbol/ValueQuote.d.ts +1 -1
- package/esm/symbol/ValueQuote.js +2 -2
- package/esm/symbol/index.d.ts +12 -17
- package/esm/symbol/index.js +78 -25
- package/esm/theme/basic.d.ts +2 -2
- package/esm/theme/basic.js +2 -0
- package/esm/theme/dark.d.ts +2 -2
- package/esm/theme/github.dark.d.ts +2 -2
- package/esm/theme/github.light.d.ts +2 -2
- package/esm/theme/gruvbox.d.ts +2 -2
- package/esm/theme/light.d.ts +2 -2
- package/esm/theme/monokai.d.ts +2 -2
- package/esm/theme/nord.d.ts +2 -2
- package/esm/theme/vscode.d.ts +2 -2
- package/esm/types/Bigint.d.ts +1 -1
- package/esm/types/Bigint.js +2 -2
- package/esm/types/Date.d.ts +1 -1
- package/esm/types/Date.js +2 -2
- package/esm/types/False.d.ts +1 -1
- package/esm/types/False.js +2 -2
- package/esm/types/Float.d.ts +1 -1
- package/esm/types/Float.js +2 -2
- package/esm/types/Int.d.ts +1 -1
- package/esm/types/Int.js +2 -2
- package/esm/types/Map.d.ts +1 -1
- package/esm/types/Map.js +2 -2
- package/esm/types/Nan.d.ts +1 -1
- package/esm/types/Nan.js +2 -2
- package/esm/types/Null.d.ts +1 -1
- package/esm/types/Null.js +2 -2
- package/esm/types/Set.d.ts +1 -1
- package/esm/types/Set.js +2 -2
- package/esm/types/String.d.ts +1 -1
- package/esm/types/String.js +2 -2
- package/esm/types/True.d.ts +1 -1
- package/esm/types/True.js +2 -2
- package/esm/types/Undefined.d.ts +1 -1
- package/esm/types/Undefined.js +2 -2
- package/esm/types/Url.d.ts +1 -1
- package/esm/types/Url.js +2 -2
- package/esm/types/index.d.ts +5 -2
- package/esm/types/index.js +148 -131
- package/esm/utils/useHighlight.d.ts +0 -1
- package/esm/utils/useRender.d.ts +1 -1
- package/esm/utils/useRender.js +3 -3
- package/githubDark.d.ts +4 -0
- package/githubLight.d.ts +4 -0
- package/gruvbox.d.ts +4 -0
- package/light.d.ts +2 -1
- package/monokai.d.ts +4 -0
- package/nord.d.ts +4 -0
- package/package.json +11 -5
- package/triangle-arrow.d.ts +2 -2
- package/triangle-solid-arrow.d.ts +2 -2
- package/vscode.d.ts +4 -0
package/esm/comps/NestedOpen.js
CHANGED
|
@@ -1,34 +1,44 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import { KayName } from
|
|
3
|
-
import { useExpandsStore, useExpandsDispatch } from
|
|
4
|
-
import { useStore } from
|
|
5
|
-
import { Copied } from
|
|
6
|
-
import { CountInfoExtraComps } from
|
|
7
|
-
import { CountInfoComp } from
|
|
8
|
-
import { Arrow, BracketsOpen, BracketsClose } from
|
|
9
|
-
import { EllipsisComp } from
|
|
10
|
-
import { SetComp, MapComp } from
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { KayName } from "./KeyValues.js";
|
|
3
|
+
import { useExpandsStore, useExpandsDispatch } from "../store/Expands.js";
|
|
4
|
+
import { useStore } from "../store.js";
|
|
5
|
+
import { Copied } from "./Copied.js";
|
|
6
|
+
import { CountInfoExtraComps } from "../section/CountInfoExtra.js";
|
|
7
|
+
import { CountInfoComp } from "../section/CountInfo.js";
|
|
8
|
+
import { Arrow, BracketsOpen, BracketsClose } from "../symbol/index.js";
|
|
9
|
+
import { EllipsisComp } from "../section/Ellipsis.js";
|
|
10
|
+
import { SetComp, MapComp } from "../types/index.js";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
export var NestedOpen = props => {
|
|
14
13
|
var _expands$expandKey;
|
|
15
14
|
var {
|
|
16
15
|
keyName,
|
|
17
16
|
expandKey,
|
|
17
|
+
keys = [],
|
|
18
18
|
initialValue,
|
|
19
19
|
value,
|
|
20
|
+
parentValue,
|
|
20
21
|
level
|
|
21
22
|
} = props;
|
|
22
23
|
var expands = useExpandsStore();
|
|
23
24
|
var dispatchExpands = useExpandsDispatch();
|
|
24
25
|
var {
|
|
25
26
|
onExpand,
|
|
26
|
-
collapsed
|
|
27
|
+
collapsed,
|
|
28
|
+
shouldExpandNodeInitially
|
|
27
29
|
} = useStore();
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
|
|
30
|
+
var defaultExpanded = typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;
|
|
31
|
+
var isExpanded = (_expands$expandKey = expands[expandKey]) != null ? _expands$expandKey : shouldExpandNodeInitially ? false : defaultExpanded;
|
|
32
|
+
var shouldExpand = shouldExpandNodeInitially && shouldExpandNodeInitially(!isExpanded, {
|
|
33
|
+
value,
|
|
34
|
+
keys,
|
|
35
|
+
level,
|
|
36
|
+
keyName,
|
|
37
|
+
parentValue
|
|
38
|
+
});
|
|
39
|
+
if (expands[expandKey] === undefined && shouldExpandNodeInitially) {
|
|
40
|
+
isExpanded = !shouldExpand;
|
|
41
|
+
}
|
|
32
42
|
var click = () => {
|
|
33
43
|
var opt = {
|
|
34
44
|
expand: !isExpanded,
|
|
@@ -50,6 +60,9 @@ export var NestedOpen = props => {
|
|
|
50
60
|
transition: 'all 0.3s'
|
|
51
61
|
};
|
|
52
62
|
var len = Object.keys(value).length;
|
|
63
|
+
var isObject = typeof value === 'object';
|
|
64
|
+
var isArray = Array.isArray(value);
|
|
65
|
+
var isMySet = value instanceof Set;
|
|
53
66
|
var showArrow = len !== 0 && (isArray || isMySet || isObject);
|
|
54
67
|
var reset = {
|
|
55
68
|
style
|
|
@@ -57,26 +70,32 @@ export var NestedOpen = props => {
|
|
|
57
70
|
if (showArrow) {
|
|
58
71
|
reset.onClick = click;
|
|
59
72
|
}
|
|
73
|
+
var compProps = {
|
|
74
|
+
keyName,
|
|
75
|
+
value,
|
|
76
|
+
keys,
|
|
77
|
+
parentValue
|
|
78
|
+
};
|
|
60
79
|
return /*#__PURE__*/_jsxs("span", _extends({}, reset, {
|
|
61
|
-
children: [showArrow && /*#__PURE__*/_jsx(Arrow, {
|
|
80
|
+
children: [showArrow && /*#__PURE__*/_jsx(Arrow, _extends({
|
|
62
81
|
style: arrowStyle,
|
|
63
82
|
expandKey: expandKey
|
|
64
|
-
}), (keyName || typeof keyName === 'number') && /*#__PURE__*/_jsx(KayName, {
|
|
83
|
+
}, compProps)), (keyName || typeof keyName === 'number') && /*#__PURE__*/_jsx(KayName, _extends({}, compProps)), /*#__PURE__*/_jsx(SetComp, {
|
|
84
|
+
value: initialValue,
|
|
65
85
|
keyName: keyName
|
|
66
|
-
}), /*#__PURE__*/_jsx(SetComp, {
|
|
67
|
-
value: initialValue
|
|
68
86
|
}), /*#__PURE__*/_jsx(MapComp, {
|
|
69
|
-
value: initialValue
|
|
70
|
-
|
|
87
|
+
value: initialValue,
|
|
88
|
+
keyName: keyName
|
|
89
|
+
}), /*#__PURE__*/_jsx(BracketsOpen, _extends({
|
|
71
90
|
isBrackets: isArray || isMySet
|
|
72
|
-
}), /*#__PURE__*/_jsx(EllipsisComp, {
|
|
91
|
+
}, compProps)), /*#__PURE__*/_jsx(EllipsisComp, {
|
|
73
92
|
keyName: keyName,
|
|
74
93
|
value: value,
|
|
75
94
|
isExpanded: isExpanded
|
|
76
|
-
}), /*#__PURE__*/_jsx(BracketsClose, {
|
|
95
|
+
}), /*#__PURE__*/_jsx(BracketsClose, _extends({
|
|
77
96
|
isVisiable: isExpanded || !showArrow,
|
|
78
97
|
isBrackets: isArray || isMySet
|
|
79
|
-
}), /*#__PURE__*/_jsx(CountInfoComp, {
|
|
98
|
+
}, compProps)), /*#__PURE__*/_jsx(CountInfoComp, {
|
|
80
99
|
value: value,
|
|
81
100
|
keyName: keyName
|
|
82
101
|
}), /*#__PURE__*/_jsx(CountInfoExtraComps, {
|
|
@@ -85,7 +104,9 @@ export var NestedOpen = props => {
|
|
|
85
104
|
}), /*#__PURE__*/_jsx(Copied, {
|
|
86
105
|
keyName: keyName,
|
|
87
106
|
value: value,
|
|
88
|
-
expandKey: expandKey
|
|
107
|
+
expandKey: expandKey,
|
|
108
|
+
parentValue: parentValue,
|
|
109
|
+
keys: keys
|
|
89
110
|
})]
|
|
90
111
|
}));
|
|
91
112
|
};
|
package/esm/comps/Value.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const isFloat: (n: number) => boolean;
|
|
2
2
|
interface ValueProps {
|
|
3
|
-
value
|
|
3
|
+
value: unknown;
|
|
4
4
|
keyName: string | number;
|
|
5
|
-
|
|
5
|
+
keys?: (string | number)[];
|
|
6
6
|
}
|
|
7
7
|
export declare const Value: {
|
|
8
8
|
(props: ValueProps): import("react/jsx-runtime").JSX.Element | null;
|
package/esm/comps/Value.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import { TypeString, TypeTrue, TypeNull, TypeFalse, TypeFloat, TypeBigint, TypeInt, TypeDate, TypeUndefined, TypeNan, TypeUrl } from
|
|
2
|
+
import { TypeString, TypeTrue, TypeNull, TypeFalse, TypeFloat, TypeBigint, TypeInt, TypeDate, TypeUndefined, TypeNan, TypeUrl } from "../types/index.js";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
export var isFloat = n => Number(n) === n && n % 1 !== 0 || isNaN(n);
|
|
5
5
|
export var Value = props => {
|
|
6
6
|
var {
|
|
7
7
|
value,
|
|
8
8
|
keyName,
|
|
9
|
-
|
|
9
|
+
keys
|
|
10
10
|
} = props;
|
|
11
11
|
var reset = {
|
|
12
12
|
keyName,
|
|
13
|
-
|
|
13
|
+
keys
|
|
14
14
|
};
|
|
15
15
|
if (value instanceof URL) {
|
|
16
16
|
return /*#__PURE__*/_jsx(TypeUrl, _extends({}, reset, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIdCompat(): string;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["children"],
|
|
4
|
+
_excluded2 = ["value", "parentValue", "keyName"];
|
|
5
|
+
import { useRef, useState } from 'react';
|
|
6
|
+
import { useStore } from "./store.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export var KeyNameRender = (_ref, _ref2) => {
|
|
9
|
+
var {
|
|
10
|
+
children
|
|
11
|
+
} = _ref,
|
|
12
|
+
reset = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
13
|
+
var {
|
|
14
|
+
value,
|
|
15
|
+
parentValue,
|
|
16
|
+
keyName
|
|
17
|
+
} = _ref2;
|
|
18
|
+
if (typeof children === 'number') {
|
|
19
|
+
return /*#__PURE__*/_jsx("span", _extends({}, reset, {
|
|
20
|
+
children: children
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
return /*#__PURE__*/_jsx(Child, _extends({}, reset, {
|
|
24
|
+
value: value,
|
|
25
|
+
parentValue: parentValue,
|
|
26
|
+
keyName: keyName,
|
|
27
|
+
children: children
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
var Child = props => {
|
|
31
|
+
var {
|
|
32
|
+
value,
|
|
33
|
+
keyName
|
|
34
|
+
} = props,
|
|
35
|
+
reset = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
36
|
+
var $dom = useRef(null);
|
|
37
|
+
var [currentValue, setCurrentValue] = useState(props.children);
|
|
38
|
+
var {
|
|
39
|
+
onEdit
|
|
40
|
+
} = useStore();
|
|
41
|
+
var onKeyDown = evn => {
|
|
42
|
+
if (evn.key === 'Enter') {
|
|
43
|
+
var _$dom$current;
|
|
44
|
+
(_$dom$current = $dom.current) == null || _$dom$current.setAttribute('contentEditable', 'false');
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var onClick = evn => {
|
|
48
|
+
var _$dom$current2, _$dom$current3;
|
|
49
|
+
evn.stopPropagation();
|
|
50
|
+
(_$dom$current2 = $dom.current) == null || _$dom$current2.setAttribute('contentEditable', 'true');
|
|
51
|
+
(_$dom$current3 = $dom.current) == null || _$dom$current3.focus();
|
|
52
|
+
};
|
|
53
|
+
var onBlur = evn => {
|
|
54
|
+
var _$dom$current4;
|
|
55
|
+
(_$dom$current4 = $dom.current) == null || _$dom$current4.setAttribute('contentEditable', 'false');
|
|
56
|
+
var callback = onEdit && onEdit({
|
|
57
|
+
value: evn.target.textContent,
|
|
58
|
+
oldValue: value,
|
|
59
|
+
keyName
|
|
60
|
+
});
|
|
61
|
+
if (callback) {
|
|
62
|
+
setCurrentValue(evn.target.textContent);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
var spanProps = _extends({}, reset, {
|
|
66
|
+
onKeyDown,
|
|
67
|
+
onClick,
|
|
68
|
+
onBlur,
|
|
69
|
+
spellCheck: false,
|
|
70
|
+
contentEditable: 'false',
|
|
71
|
+
suppressContentEditableWarning: true,
|
|
72
|
+
children: currentValue
|
|
73
|
+
});
|
|
74
|
+
return /*#__PURE__*/_jsx("span", _extends({}, spanProps, {
|
|
75
|
+
ref: $dom
|
|
76
|
+
}));
|
|
77
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type JsonViewProps } from '../';
|
|
2
|
+
export interface JsonViewEditorProps<T extends object> extends Omit<JsonViewProps<T>, 'shortenTextAfterLength'> {
|
|
3
|
+
/**
|
|
4
|
+
* When a callback function is passed in, edit functionality is enabled. The callback is invoked before edits are completed.
|
|
5
|
+
* @returns {boolean} Returning false from onEdit will prevent the change from being made.
|
|
6
|
+
*/
|
|
7
|
+
onEdit?: (option: {
|
|
8
|
+
value: unknown;
|
|
9
|
+
oldValue: unknown;
|
|
10
|
+
keyName?: string | number;
|
|
11
|
+
parentName?: string | number;
|
|
12
|
+
type?: 'value' | 'key';
|
|
13
|
+
}) => boolean;
|
|
14
|
+
/** Whether enable edit feature. @default true */
|
|
15
|
+
editable?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const JsonViewEditor: import("react").ForwardRefExoticComponent<Omit<JsonViewEditorProps<object>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export default JsonViewEditor;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["children", "onEdit", "editable"];
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import JsonView from "../index.js";
|
|
6
|
+
import { KeyNameRender } from "./KeyName.js";
|
|
7
|
+
import { Context, Dispatch, useStoreReducer } from "./store.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
var JsonViewEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
10
|
+
var {
|
|
11
|
+
children,
|
|
12
|
+
onEdit,
|
|
13
|
+
editable = true
|
|
14
|
+
} = props,
|
|
15
|
+
reset = _objectWithoutPropertiesLoose(props, _excluded);
|
|
16
|
+
var [state, dispatch] = useStoreReducer({
|
|
17
|
+
onEdit
|
|
18
|
+
});
|
|
19
|
+
return /*#__PURE__*/_jsx(Context.Provider, {
|
|
20
|
+
value: state,
|
|
21
|
+
children: /*#__PURE__*/_jsx(Dispatch.Provider, {
|
|
22
|
+
value: dispatch,
|
|
23
|
+
children: /*#__PURE__*/_jsxs(JsonView, _extends({}, reset, {
|
|
24
|
+
shortenTextAfterLength: 0,
|
|
25
|
+
ref: ref,
|
|
26
|
+
children: [editable && /*#__PURE__*/_jsx(JsonView.KeyName, {
|
|
27
|
+
render: KeyNameRender
|
|
28
|
+
}), children]
|
|
29
|
+
}))
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
export default JsonViewEditor;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type InitialState = {
|
|
2
|
+
/**
|
|
3
|
+
* When a callback function is passed in, edit functionality is enabled. The callback is invoked before edits are completed.
|
|
4
|
+
* @returns {boolean} Returning false from onEdit will prevent the change from being made.
|
|
5
|
+
*/
|
|
6
|
+
onEdit?: (option: {
|
|
7
|
+
value: unknown;
|
|
8
|
+
oldValue: unknown;
|
|
9
|
+
keyName?: string | number;
|
|
10
|
+
parentName?: string | number;
|
|
11
|
+
type?: 'value' | 'key';
|
|
12
|
+
}) => boolean;
|
|
13
|
+
};
|
|
14
|
+
type Dispatch = React.Dispatch<InitialState>;
|
|
15
|
+
export declare const Context: import("react").Context<InitialState>;
|
|
16
|
+
export declare const Dispatch: import("react").Context<Dispatch>;
|
|
17
|
+
export declare const useStore: () => InitialState;
|
|
18
|
+
export declare function useStoreReducer(initialState: InitialState): [{
|
|
19
|
+
onEdit?: (option: {
|
|
20
|
+
value: unknown;
|
|
21
|
+
oldValue: unknown;
|
|
22
|
+
keyName?: string | number;
|
|
23
|
+
parentName?: string | number;
|
|
24
|
+
type?: "value" | "key";
|
|
25
|
+
}) => boolean;
|
|
26
|
+
}, import("react").Dispatch<InitialState>];
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import { createContext, useContext, useReducer } from 'react';
|
|
3
|
+
var initialState = {};
|
|
4
|
+
export var Context = /*#__PURE__*/createContext(initialState);
|
|
5
|
+
var reducer = (state, action) => _extends({}, state, action);
|
|
6
|
+
export var Dispatch = /*#__PURE__*/createContext(() => {});
|
|
7
|
+
Dispatch.displayName = 'JVR.Editor.Dispatch';
|
|
8
|
+
export var useStore = () => {
|
|
9
|
+
return useContext(Context);
|
|
10
|
+
};
|
|
11
|
+
export function useStoreReducer(initialState) {
|
|
12
|
+
return useReducer(reducer, initialState);
|
|
13
|
+
}
|
package/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { BraceLeft } from './symbol/BraceLeft';
|
|
3
2
|
import { BraceRight } from './symbol/BraceRight';
|
|
4
3
|
import { BracketsLeft } from './symbol/BracketsLeft';
|
|
@@ -25,12 +24,20 @@ import { CountInfo } from './section/CountInfo';
|
|
|
25
24
|
import { CountInfoExtra } from './section/CountInfoExtra';
|
|
26
25
|
import { Ellipsis } from './section/Ellipsis';
|
|
27
26
|
import { KeyName } from './section/KeyName';
|
|
27
|
+
import { Row } from './section/Row';
|
|
28
28
|
export * from './store';
|
|
29
29
|
export * from './store/Expands';
|
|
30
30
|
export * from './store/ShowTools';
|
|
31
31
|
export * from './store/Symbols';
|
|
32
32
|
export * from './store/Types';
|
|
33
|
-
export * from './symbol';
|
|
33
|
+
export * from './symbol/';
|
|
34
|
+
export type ShouldExpandNodeInitially<T extends object> = (isExpanded: boolean, props: {
|
|
35
|
+
keyName?: string | number;
|
|
36
|
+
value?: T;
|
|
37
|
+
parentValue?: T;
|
|
38
|
+
keys: (number | string)[];
|
|
39
|
+
level: number;
|
|
40
|
+
}) => boolean;
|
|
34
41
|
export interface JsonViewProps<T extends object> extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
35
42
|
/** This property contains your input JSON */
|
|
36
43
|
value?: T;
|
|
@@ -46,12 +53,24 @@ export interface JsonViewProps<T extends object> extends React.DetailedHTMLProps
|
|
|
46
53
|
displayDataTypes?: boolean;
|
|
47
54
|
/** The user can copy objects and arrays to clipboard by clicking on the clipboard icon. @default true */
|
|
48
55
|
enableClipboard?: boolean;
|
|
49
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* When set to true, all nodes will be collapsed by default. Use an integer value to collapse at a specific depth. @default false
|
|
58
|
+
* collapsed takes precedence over shouldExpandNodeInitially.
|
|
59
|
+
* @see {@link shouldExpandNodeInitially} for more details on how the initial expansion works.
|
|
60
|
+
*/
|
|
50
61
|
collapsed?: boolean | number;
|
|
62
|
+
/**
|
|
63
|
+
* Determines whether the node should be expanded on the first render, or you can use collapsed to control the level of expansion (by default, the root is expanded).
|
|
64
|
+
* If both collapsed and shouldExpandNodeInitially are set, the value of collapsed takes precedence.
|
|
65
|
+
* @see {@link collapsed} for more details on how this works.
|
|
66
|
+
*/
|
|
67
|
+
shouldExpandNodeInitially?: ShouldExpandNodeInitially<T>;
|
|
51
68
|
/** Whether to highlight updates. @default true */
|
|
52
69
|
highlightUpdates?: boolean;
|
|
53
|
-
/** Shorten long JSON strings, Set to `0` to disable this feature @default
|
|
70
|
+
/** Shorten long JSON strings, Set to `0` to disable this feature @default 30 */
|
|
54
71
|
shortenTextAfterLength?: number;
|
|
72
|
+
/** When the text exceeds the length, `...` will be displayed. Currently, this `...` can be customized. @default "..." */
|
|
73
|
+
stringEllipsis?: number;
|
|
55
74
|
/** Callback function for when a treeNode is expanded or collapsed */
|
|
56
75
|
onExpand?: (props: {
|
|
57
76
|
expand: boolean;
|
|
@@ -61,6 +80,8 @@ export interface JsonViewProps<T extends object> extends React.DetailedHTMLProps
|
|
|
61
80
|
}) => void;
|
|
62
81
|
/** Fires event when you copy */
|
|
63
82
|
onCopied?: (text: string, value?: T) => void;
|
|
83
|
+
/** Transform the text before copying to clipboard */
|
|
84
|
+
beforeCopy?: (copyText: string, keyName?: string | number, value?: T, parentValue?: T, expandKey?: string, keys?: (number | string)[]) => string;
|
|
64
85
|
}
|
|
65
86
|
type JsonViewComponent = React.FC<React.PropsWithRef<JsonViewProps<object>>> & {
|
|
66
87
|
Bigint: typeof Bigint;
|
|
@@ -89,6 +110,7 @@ type JsonViewComponent = React.FC<React.PropsWithRef<JsonViewProps<object>>> & {
|
|
|
89
110
|
CountInfo: typeof CountInfo;
|
|
90
111
|
CountInfoExtra: typeof CountInfoExtra;
|
|
91
112
|
KeyName: typeof KeyName;
|
|
113
|
+
Row: typeof Row;
|
|
92
114
|
};
|
|
93
115
|
declare const JsonView: JsonViewComponent;
|
|
94
116
|
export default JsonView;
|
package/esm/index.js
CHANGED
|
@@ -1,58 +1,62 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["className", "style", "value", "children", "collapsed", "indentWidth", "displayObjectSize", "shortenTextAfterLength", "highlightUpdates", "enableClipboard", "displayDataTypes", "objectSortKeys", "onExpand"];
|
|
3
|
+
var _excluded = ["className", "style", "value", "children", "collapsed", "shouldExpandNodeInitially", "indentWidth", "displayObjectSize", "shortenTextAfterLength", "stringEllipsis", "highlightUpdates", "enableClipboard", "displayDataTypes", "objectSortKeys", "onExpand", "onCopied", "beforeCopy"];
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
|
-
import { Provider } from
|
|
6
|
-
import { Container } from
|
|
7
|
-
import { BraceLeft } from
|
|
8
|
-
import { BraceRight } from
|
|
9
|
-
import { BracketsLeft } from
|
|
10
|
-
import { BracketsRight } from
|
|
11
|
-
import { Arrow } from
|
|
12
|
-
import { Colon } from
|
|
13
|
-
import { Quote } from
|
|
14
|
-
import { ValueQuote } from
|
|
15
|
-
import { Bigint } from
|
|
16
|
-
import { Date } from
|
|
17
|
-
import { False } from
|
|
18
|
-
import { Float } from
|
|
19
|
-
import { Int } from
|
|
20
|
-
import { Map } from
|
|
21
|
-
import { Nan } from
|
|
22
|
-
import { Null } from
|
|
23
|
-
import { Set } from
|
|
24
|
-
import { StringText } from
|
|
25
|
-
import { True } from
|
|
26
|
-
import { Undefined } from
|
|
27
|
-
import { Url } from
|
|
28
|
-
import { Copied } from
|
|
29
|
-
import { CountInfo } from
|
|
30
|
-
import { CountInfoExtra } from
|
|
31
|
-
import { Ellipsis } from
|
|
32
|
-
import { KeyName } from
|
|
33
|
-
import {
|
|
34
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
37
|
-
export * from
|
|
38
|
-
export * from
|
|
39
|
-
export * from
|
|
40
|
-
export * from
|
|
5
|
+
import { Provider } from "./store.js";
|
|
6
|
+
import { Container } from "./Container.js";
|
|
7
|
+
import { BraceLeft } from "./symbol/BraceLeft.js";
|
|
8
|
+
import { BraceRight } from "./symbol/BraceRight.js";
|
|
9
|
+
import { BracketsLeft } from "./symbol/BracketsLeft.js";
|
|
10
|
+
import { BracketsRight } from "./symbol/BracketsRight.js";
|
|
11
|
+
import { Arrow } from "./symbol/Arrow.js";
|
|
12
|
+
import { Colon } from "./symbol/Colon.js";
|
|
13
|
+
import { Quote } from "./symbol/Quote.js";
|
|
14
|
+
import { ValueQuote } from "./symbol/ValueQuote.js";
|
|
15
|
+
import { Bigint } from "./types/Bigint.js";
|
|
16
|
+
import { Date } from "./types/Date.js";
|
|
17
|
+
import { False } from "./types/False.js";
|
|
18
|
+
import { Float } from "./types/Float.js";
|
|
19
|
+
import { Int } from "./types/Int.js";
|
|
20
|
+
import { Map } from "./types/Map.js";
|
|
21
|
+
import { Nan } from "./types/Nan.js";
|
|
22
|
+
import { Null } from "./types/Null.js";
|
|
23
|
+
import { Set } from "./types/Set.js";
|
|
24
|
+
import { StringText } from "./types/String.js";
|
|
25
|
+
import { True } from "./types/True.js";
|
|
26
|
+
import { Undefined } from "./types/Undefined.js";
|
|
27
|
+
import { Url } from "./types/Url.js";
|
|
28
|
+
import { Copied } from "./section/Copied.js";
|
|
29
|
+
import { CountInfo } from "./section/CountInfo.js";
|
|
30
|
+
import { CountInfoExtra } from "./section/CountInfoExtra.js";
|
|
31
|
+
import { Ellipsis } from "./section/Ellipsis.js";
|
|
32
|
+
import { KeyName } from "./section/KeyName.js";
|
|
33
|
+
import { Row } from "./section/Row.js";
|
|
34
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
|
+
export * from "./store.js";
|
|
36
|
+
export * from "./store/Expands.js";
|
|
37
|
+
export * from "./store/ShowTools.js";
|
|
38
|
+
export * from "./store/Symbols.js";
|
|
39
|
+
export * from "./store/Types.js";
|
|
40
|
+
export * from "./symbol/index.js";
|
|
41
41
|
var JsonView = /*#__PURE__*/forwardRef((props, ref) => {
|
|
42
42
|
var {
|
|
43
43
|
className = '',
|
|
44
44
|
style,
|
|
45
45
|
value,
|
|
46
46
|
children,
|
|
47
|
-
collapsed,
|
|
47
|
+
collapsed = false,
|
|
48
|
+
shouldExpandNodeInitially,
|
|
48
49
|
indentWidth = 15,
|
|
49
50
|
displayObjectSize = true,
|
|
50
|
-
shortenTextAfterLength =
|
|
51
|
+
shortenTextAfterLength = 30,
|
|
52
|
+
stringEllipsis,
|
|
51
53
|
highlightUpdates = true,
|
|
52
54
|
enableClipboard = true,
|
|
53
55
|
displayDataTypes = true,
|
|
54
56
|
objectSortKeys = false,
|
|
55
|
-
onExpand
|
|
57
|
+
onExpand,
|
|
58
|
+
onCopied,
|
|
59
|
+
beforeCopy
|
|
56
60
|
} = props,
|
|
57
61
|
elmProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
58
62
|
var defaultStyle = _extends({
|
|
@@ -68,12 +72,16 @@ var JsonView = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
68
72
|
value,
|
|
69
73
|
objectSortKeys,
|
|
70
74
|
indentWidth,
|
|
75
|
+
shouldExpandNodeInitially: collapsed === false ? shouldExpandNodeInitially : undefined,
|
|
71
76
|
displayObjectSize,
|
|
72
77
|
collapsed,
|
|
73
78
|
enableClipboard,
|
|
74
79
|
shortenTextAfterLength,
|
|
80
|
+
stringEllipsis,
|
|
75
81
|
highlightUpdates,
|
|
76
|
-
|
|
82
|
+
onCopied,
|
|
83
|
+
onExpand,
|
|
84
|
+
beforeCopy
|
|
77
85
|
},
|
|
78
86
|
initialTypes: {
|
|
79
87
|
displayDataTypes
|
|
@@ -113,5 +121,6 @@ JsonView.Copied = Copied;
|
|
|
113
121
|
JsonView.CountInfo = CountInfo;
|
|
114
122
|
JsonView.CountInfoExtra = CountInfoExtra;
|
|
115
123
|
JsonView.KeyName = KeyName;
|
|
124
|
+
JsonView.Row = Row;
|
|
116
125
|
JsonView.displayName = 'JVR.JsonView';
|
|
117
126
|
export default JsonView;
|
package/esm/section/Copied.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type TagType } from '../store/Types';
|
|
2
2
|
import { type SectionElement } from '../store/Section';
|
|
3
|
+
export type CopiedSectionElement<T extends TagType = 'svg'> = SectionElement<T> & {
|
|
4
|
+
beforeCopy?: (copyText: string, keyName?: string | number, value?: object, parentValue?: object, expandKey?: string, keys?: (number | string)[]) => string;
|
|
5
|
+
};
|
|
3
6
|
export declare const Copied: {
|
|
4
|
-
(props:
|
|
7
|
+
<K extends TagType = "svg">(props: CopiedSectionElement<K>): null;
|
|
5
8
|
displayName: string;
|
|
6
9
|
};
|
package/esm/section/Copied.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useSectionStore } from
|
|
2
|
-
import { useSectionRender } from
|
|
1
|
+
import { useSectionStore } from "../store/Section.js";
|
|
2
|
+
import { useSectionRender } from "../utils/useRender.js";
|
|
3
3
|
export var Copied = props => {
|
|
4
4
|
var {
|
|
5
5
|
Copied: Comp = {}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type TagType } from '../store/Types';
|
|
3
2
|
import { type SectionElement, type SectionElementProps } from '../store/Section';
|
|
4
3
|
export declare const CountInfo: {
|
|
@@ -10,6 +9,6 @@ export interface CountInfoCompProps<T extends object> {
|
|
|
10
9
|
keyName: string | number;
|
|
11
10
|
}
|
|
12
11
|
export declare const CountInfoComp: {
|
|
13
|
-
<T extends object>(props: SectionElementProps<
|
|
12
|
+
<K extends TagType, T extends object>(props: SectionElementProps<K> & CountInfoCompProps<T> & React.HTMLAttributes<HTMLElement>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
14
13
|
displayName: string;
|
|
15
14
|
};
|
package/esm/section/CountInfo.js
CHANGED
|
@@ -2,9 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
var _excluded = ["value", "keyName"],
|
|
4
4
|
_excluded2 = ["as", "render"];
|
|
5
|
-
import { useSectionStore } from
|
|
6
|
-
import { useSectionRender } from
|
|
7
|
-
import { useStore } from
|
|
5
|
+
import { useSectionStore } from "../store/Section.js";
|
|
6
|
+
import { useSectionRender } from "../utils/useRender.js";
|
|
7
|
+
import { useStore } from "../store.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export var CountInfo = props => {
|
|
10
10
|
var {
|
|
@@ -36,7 +36,7 @@ export var CountInfoComp = props => {
|
|
|
36
36
|
reset.style = _extends({}, reset.style, props.style);
|
|
37
37
|
var len = Object.keys(value).length;
|
|
38
38
|
if (!reset.children) {
|
|
39
|
-
reset.children = len + "
|
|
39
|
+
reset.children = len + " item" + (len === 1 ? '' : 's');
|
|
40
40
|
}
|
|
41
41
|
var elmProps = _extends({}, reset, other);
|
|
42
42
|
var isRender = render && typeof render === 'function';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type TagType } from '../store/Types';
|
|
3
2
|
import { type SectionElement, type SectionElementProps } from '../store/Section';
|
|
4
3
|
export declare const CountInfoExtra: {
|
|
@@ -10,6 +9,6 @@ export interface CountInfoExtraCompsProps<T extends object> {
|
|
|
10
9
|
keyName: string | number;
|
|
11
10
|
}
|
|
12
11
|
export declare const CountInfoExtraComps: {
|
|
13
|
-
<T extends object>(props: SectionElementProps<
|
|
12
|
+
<T extends object, K extends TagType>(props: SectionElementProps<K> & CountInfoExtraCompsProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
14
13
|
displayName: string;
|
|
15
14
|
};
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
var _excluded = ["value", "keyName"],
|
|
4
4
|
_excluded2 = ["as", "render"];
|
|
5
|
-
import { useSectionStore } from
|
|
6
|
-
import { useSectionRender } from
|
|
5
|
+
import { useSectionStore } from "../store/Section.js";
|
|
6
|
+
import { useSectionRender } from "../utils/useRender.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
export var CountInfoExtra = props => {
|
|
9
9
|
var {
|