@uiw/react-json-view 2.0.0-alpha.3 → 2.0.0-alpha.31
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 +230 -38
- package/basic.d.ts +3 -0
- package/cjs/Container.d.ts +2 -0
- package/cjs/Container.js +13 -6
- package/cjs/arrow/TriangleArrow.js +1 -1
- package/cjs/comps/Copied.d.ts +2 -4
- package/cjs/comps/Copied.js +50 -17
- package/cjs/comps/KeyValues.d.ts +2 -4
- package/cjs/comps/KeyValues.js +62 -27
- package/cjs/comps/NestedClose.d.ts +1 -0
- package/cjs/comps/NestedClose.js +15 -5
- package/cjs/comps/NestedOpen.d.ts +2 -3
- package/cjs/comps/NestedOpen.js +34 -14
- package/cjs/comps/Value.d.ts +1 -2
- package/cjs/comps/Value.js +4 -8
- 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 +12 -3
- package/cjs/index.js +11 -4
- package/cjs/section/Copied.d.ts +1 -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 +29 -25
- package/cjs/store/Types.js +8 -8
- package/cjs/store.d.ts +9 -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/cjs/symbol/index.d.ts +11 -16
- package/cjs/symbol/index.js +75 -30
- package/cjs/theme/basic.d.ts +1 -2
- package/cjs/theme/basic.js +4 -3
- package/cjs/theme/dark.d.ts +1 -2
- package/cjs/theme/dark.js +2 -3
- package/cjs/theme/github.dark.d.ts +1 -2
- package/cjs/theme/github.dark.js +2 -3
- package/cjs/theme/github.light.d.ts +1 -2
- package/cjs/theme/github.light.js +2 -3
- package/cjs/theme/gruvbox.d.ts +1 -2
- package/cjs/theme/gruvbox.js +2 -3
- package/cjs/theme/light.d.ts +1 -2
- package/cjs/theme/light.js +2 -3
- package/cjs/theme/monokai.d.ts +1 -2
- package/cjs/theme/monokai.js +2 -3
- package/cjs/theme/nord.d.ts +1 -2
- package/cjs/theme/nord.js +2 -3
- package/cjs/theme/vscode.d.ts +1 -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 +3 -1
- package/cjs/types/index.js +102 -127
- package/cjs/utils/useHighlight.d.ts +0 -1
- package/cjs/utils/useRender.d.ts +1 -1
- package/editor.d.ts +22 -20
- package/esm/Container.d.ts +2 -0
- package/esm/Container.js +15 -7
- package/esm/arrow/TriangleArrow.js +1 -1
- package/esm/comps/Copied.d.ts +2 -4
- package/esm/comps/Copied.js +48 -16
- package/esm/comps/KeyValues.d.ts +2 -4
- package/esm/comps/KeyValues.js +53 -21
- package/esm/comps/NestedClose.d.ts +1 -0
- package/esm/comps/NestedClose.js +13 -3
- package/esm/comps/NestedOpen.d.ts +2 -3
- package/esm/comps/NestedOpen.js +33 -14
- package/esm/comps/Value.d.ts +1 -2
- package/esm/comps/Value.js +2 -4
- 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 +12 -3
- package/esm/index.js +12 -5
- package/esm/section/Copied.d.ts +1 -1
- package/esm/section/CountInfo.d.ts +1 -2
- package/esm/section/CountInfo.js +1 -1
- package/esm/section/CountInfoExtra.d.ts +1 -2
- package/esm/section/Ellipsis.d.ts +0 -1
- package/esm/section/Ellipsis.js +1 -1
- package/esm/section/KeyName.d.ts +7 -6
- package/esm/section/KeyName.js +6 -2
- 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/Types.d.ts +29 -25
- package/esm/store/Types.js +6 -4
- package/esm/store.d.ts +9 -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/esm/symbol/index.d.ts +11 -16
- package/esm/symbol/index.js +76 -23
- package/esm/theme/basic.d.ts +1 -2
- package/esm/theme/basic.js +2 -0
- package/esm/theme/dark.d.ts +1 -2
- package/esm/theme/github.dark.d.ts +1 -2
- package/esm/theme/github.light.d.ts +1 -2
- package/esm/theme/gruvbox.d.ts +1 -2
- package/esm/theme/light.d.ts +1 -2
- package/esm/theme/monokai.d.ts +1 -2
- package/esm/theme/nord.d.ts +1 -2
- package/esm/theme/vscode.d.ts +1 -2
- 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/esm/types/index.d.ts +3 -1
- package/esm/types/index.js +87 -103
- package/esm/utils/useHighlight.d.ts +0 -1
- package/esm/utils/useRender.d.ts +1 -1
- package/githubDark.d.ts +3 -0
- package/githubLight.d.ts +3 -0
- package/gruvbox.d.ts +3 -0
- package/monokai.d.ts +3 -0
- package/nord.d.ts +3 -0
- package/package.json +11 -5
- package/vscode.d.ts +3 -0
package/cjs/types/index.js
CHANGED
|
@@ -4,15 +4,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.TypeUrl = exports.TypeUndefined = exports.TypeTrue = exports.TypeString = exports.TypeNull = exports.TypeNan = exports.TypeInt = exports.TypeFloat = exports.TypeFalse = exports.TypeDate = exports.TypeBigint = exports.SetComp = exports.MapComp = void 0;
|
|
7
|
+
exports.bigIntToString = exports.TypeUrl = exports.TypeUndefined = exports.TypeTrue = exports.TypeString = exports.TypeNull = exports.TypeNan = exports.TypeInt = exports.TypeFloat = exports.TypeFalse = exports.TypeDate = exports.TypeBigint = exports.SetComp = exports.MapComp = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = require("react");
|
|
12
|
-
var _Types = require("../store/Types");
|
|
13
12
|
var _store = require("../store");
|
|
13
|
+
var _Types = require("../store/Types");
|
|
14
14
|
var _symbol = require("../symbol");
|
|
15
|
-
var _Copied = require("../comps/Copied");
|
|
16
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
16
|
var _excluded = ["as", "render"],
|
|
18
17
|
_excluded2 = ["as", "render"],
|
|
@@ -27,8 +26,21 @@ var _excluded = ["as", "render"],
|
|
|
27
26
|
_excluded11 = ["as", "render"],
|
|
28
27
|
_excluded12 = ["as", "render"],
|
|
29
28
|
_excluded13 = ["as", "render"];
|
|
30
|
-
var
|
|
31
|
-
|
|
29
|
+
var bigIntToString = exports.bigIntToString = function bigIntToString(bi) {
|
|
30
|
+
if (bi === undefined) {
|
|
31
|
+
return '0n';
|
|
32
|
+
} else if (typeof bi === 'string') {
|
|
33
|
+
try {
|
|
34
|
+
bi = BigInt(bi);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
return '0n';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return bi ? bi.toString() + 'n' : '0n';
|
|
40
|
+
};
|
|
41
|
+
var SetComp = exports.SetComp = function SetComp(_ref) {
|
|
42
|
+
var value = _ref.value,
|
|
43
|
+
keyName = _ref.keyName;
|
|
32
44
|
var _useTypesStore = (0, _Types.useTypesStore)(),
|
|
33
45
|
_useTypesStore$Set = _useTypesStore.Set,
|
|
34
46
|
Comp = _useTypesStore$Set === void 0 ? {} : _useTypesStore$Set,
|
|
@@ -41,16 +53,17 @@ var SetComp = function SetComp(_ref) {
|
|
|
41
53
|
var isRender = render && typeof render === 'function';
|
|
42
54
|
var type = isRender && render(reset, {
|
|
43
55
|
type: 'type',
|
|
44
|
-
value: value
|
|
56
|
+
value: value,
|
|
57
|
+
keyName: keyName
|
|
45
58
|
});
|
|
46
59
|
if (type) return type;
|
|
47
60
|
var Elm = as || 'span';
|
|
48
61
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2["default"])({}, reset));
|
|
49
62
|
};
|
|
50
|
-
exports.SetComp = SetComp;
|
|
51
63
|
SetComp.displayName = 'JVR.SetComp';
|
|
52
|
-
var MapComp = function MapComp(_ref2) {
|
|
53
|
-
var value = _ref2.value
|
|
64
|
+
var MapComp = exports.MapComp = function MapComp(_ref2) {
|
|
65
|
+
var value = _ref2.value,
|
|
66
|
+
keyName = _ref2.keyName;
|
|
54
67
|
var _useTypesStore2 = (0, _Types.useTypesStore)(),
|
|
55
68
|
_useTypesStore2$Map = _useTypesStore2.Map,
|
|
56
69
|
Comp = _useTypesStore2$Map === void 0 ? {} : _useTypesStore2$Map,
|
|
@@ -63,22 +76,21 @@ var MapComp = function MapComp(_ref2) {
|
|
|
63
76
|
var isRender = render && typeof render === 'function';
|
|
64
77
|
var type = isRender && render(reset, {
|
|
65
78
|
type: 'type',
|
|
66
|
-
value: value
|
|
79
|
+
value: value,
|
|
80
|
+
keyName: keyName
|
|
67
81
|
});
|
|
68
82
|
if (type) return type;
|
|
69
83
|
var Elm = as || 'span';
|
|
70
84
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2["default"])({}, reset));
|
|
71
85
|
};
|
|
72
|
-
exports.MapComp = MapComp;
|
|
73
86
|
MapComp.displayName = 'JVR.MapComp';
|
|
74
87
|
var defalutStyle = {
|
|
75
88
|
opacity: 0.75,
|
|
76
89
|
paddingRight: 4
|
|
77
90
|
};
|
|
78
|
-
var TypeString = function TypeString(_ref3) {
|
|
91
|
+
var TypeString = exports.TypeString = function TypeString(_ref3) {
|
|
79
92
|
var _ref3$children = _ref3.children,
|
|
80
93
|
children = _ref3$children === void 0 ? '' : _ref3$children,
|
|
81
|
-
expandKey = _ref3.expandKey,
|
|
82
94
|
keyName = _ref3.keyName;
|
|
83
95
|
var _useTypesStore3 = (0, _Types.useTypesStore)(),
|
|
84
96
|
_useTypesStore3$Str = _useTypesStore3.Str,
|
|
@@ -86,15 +98,20 @@ var TypeString = function TypeString(_ref3) {
|
|
|
86
98
|
displayDataTypes = _useTypesStore3.displayDataTypes;
|
|
87
99
|
var _useStore = (0, _store.useStore)(),
|
|
88
100
|
_useStore$shortenText = _useStore.shortenTextAfterLength,
|
|
89
|
-
length = _useStore$shortenText === void 0 ?
|
|
101
|
+
length = _useStore$shortenText === void 0 ? 30 : _useStore$shortenText,
|
|
102
|
+
_useStore$stringEllip = _useStore.stringEllipsis,
|
|
103
|
+
stringEllipsis = _useStore$stringEllip === void 0 ? '...' : _useStore$stringEllip;
|
|
90
104
|
var as = Str.as,
|
|
91
105
|
render = Str.render,
|
|
92
106
|
reset = (0, _objectWithoutProperties2["default"])(Str, _excluded3);
|
|
93
107
|
var childrenStr = children;
|
|
94
|
-
var _useState = (0, _react.useState)(length && childrenStr.length
|
|
108
|
+
var _useState = (0, _react.useState)(length && childrenStr.length > length),
|
|
95
109
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
96
110
|
shorten = _useState2[0],
|
|
97
111
|
setShorten = _useState2[1];
|
|
112
|
+
(0, _react.useEffect)(function () {
|
|
113
|
+
return setShorten(length && childrenStr.length > length);
|
|
114
|
+
}, [length]);
|
|
98
115
|
var Comp = as || 'span';
|
|
99
116
|
var style = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, defalutStyle), Str.style || {});
|
|
100
117
|
if (length > 0) {
|
|
@@ -107,41 +124,38 @@ var TypeString = function TypeString(_ref3) {
|
|
|
107
124
|
};
|
|
108
125
|
}
|
|
109
126
|
}
|
|
110
|
-
var text = shorten ? "".concat(childrenStr.slice(0, length)
|
|
127
|
+
var text = shorten ? "".concat(childrenStr.slice(0, length)).concat(stringEllipsis) : childrenStr;
|
|
111
128
|
var isRender = render && typeof render === 'function';
|
|
112
129
|
var type = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
113
130
|
style: style
|
|
114
131
|
}), {
|
|
115
132
|
type: 'type',
|
|
116
|
-
value: children
|
|
133
|
+
value: children,
|
|
134
|
+
keyName: keyName
|
|
117
135
|
});
|
|
136
|
+
var cls = shorten ? 'w-rjv-value w-rjv-value-short' : 'w-rjv-value';
|
|
118
137
|
var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
119
138
|
children: text,
|
|
120
|
-
className:
|
|
139
|
+
className: cls
|
|
121
140
|
}), {
|
|
122
141
|
type: 'value',
|
|
123
|
-
value: children
|
|
142
|
+
value: children,
|
|
143
|
+
keyName: keyName
|
|
124
144
|
});
|
|
125
145
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
126
146
|
children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
127
147
|
style: style
|
|
128
148
|
}))), child || /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
129
149
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
130
|
-
className:
|
|
150
|
+
className: cls,
|
|
131
151
|
children: text
|
|
132
152
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {})]
|
|
133
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, {
|
|
134
|
-
keyName: keyName,
|
|
135
|
-
value: children,
|
|
136
|
-
expandKey: expandKey
|
|
137
153
|
})]
|
|
138
154
|
});
|
|
139
155
|
};
|
|
140
|
-
exports.TypeString = TypeString;
|
|
141
156
|
TypeString.displayName = 'JVR.TypeString';
|
|
142
|
-
var TypeTrue = function TypeTrue(_ref4) {
|
|
157
|
+
var TypeTrue = exports.TypeTrue = function TypeTrue(_ref4) {
|
|
143
158
|
var children = _ref4.children,
|
|
144
|
-
expandKey = _ref4.expandKey,
|
|
145
159
|
keyName = _ref4.keyName;
|
|
146
160
|
var _useTypesStore4 = (0, _Types.useTypesStore)(),
|
|
147
161
|
_useTypesStore4$True = _useTypesStore4.True,
|
|
@@ -157,14 +171,16 @@ var TypeTrue = function TypeTrue(_ref4) {
|
|
|
157
171
|
style: style
|
|
158
172
|
}), {
|
|
159
173
|
type: 'type',
|
|
160
|
-
value: children
|
|
174
|
+
value: children,
|
|
175
|
+
keyName: keyName
|
|
161
176
|
});
|
|
162
177
|
var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
163
178
|
children: children,
|
|
164
179
|
className: 'w-rjv-value'
|
|
165
180
|
}), {
|
|
166
181
|
type: 'value',
|
|
167
|
-
value: children
|
|
182
|
+
value: children,
|
|
183
|
+
keyName: keyName
|
|
168
184
|
});
|
|
169
185
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
170
186
|
children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
@@ -172,18 +188,12 @@ var TypeTrue = function TypeTrue(_ref4) {
|
|
|
172
188
|
}))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
173
189
|
className: "w-rjv-value",
|
|
174
190
|
children: children === null || children === void 0 ? void 0 : children.toString()
|
|
175
|
-
}))
|
|
176
|
-
keyName: keyName,
|
|
177
|
-
value: children,
|
|
178
|
-
expandKey: expandKey
|
|
179
|
-
})]
|
|
191
|
+
}))]
|
|
180
192
|
});
|
|
181
193
|
};
|
|
182
|
-
exports.TypeTrue = TypeTrue;
|
|
183
194
|
TypeTrue.displayName = 'JVR.TypeTrue';
|
|
184
|
-
var TypeFalse = function TypeFalse(_ref5) {
|
|
195
|
+
var TypeFalse = exports.TypeFalse = function TypeFalse(_ref5) {
|
|
185
196
|
var children = _ref5.children,
|
|
186
|
-
expandKey = _ref5.expandKey,
|
|
187
197
|
keyName = _ref5.keyName;
|
|
188
198
|
var _useTypesStore5 = (0, _Types.useTypesStore)(),
|
|
189
199
|
_useTypesStore5$False = _useTypesStore5.False,
|
|
@@ -199,14 +209,16 @@ var TypeFalse = function TypeFalse(_ref5) {
|
|
|
199
209
|
style: style
|
|
200
210
|
}), {
|
|
201
211
|
type: 'type',
|
|
202
|
-
value: children
|
|
212
|
+
value: children,
|
|
213
|
+
keyName: keyName
|
|
203
214
|
});
|
|
204
215
|
var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
205
216
|
children: children,
|
|
206
217
|
className: 'w-rjv-value'
|
|
207
218
|
}), {
|
|
208
219
|
type: 'value',
|
|
209
|
-
value: children
|
|
220
|
+
value: children,
|
|
221
|
+
keyName: keyName
|
|
210
222
|
});
|
|
211
223
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
212
224
|
children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
@@ -214,18 +226,12 @@ var TypeFalse = function TypeFalse(_ref5) {
|
|
|
214
226
|
}))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
215
227
|
className: "w-rjv-value",
|
|
216
228
|
children: children === null || children === void 0 ? void 0 : children.toString()
|
|
217
|
-
}))
|
|
218
|
-
keyName: keyName,
|
|
219
|
-
value: children,
|
|
220
|
-
expandKey: expandKey
|
|
221
|
-
})]
|
|
229
|
+
}))]
|
|
222
230
|
});
|
|
223
231
|
};
|
|
224
|
-
exports.TypeFalse = TypeFalse;
|
|
225
232
|
TypeFalse.displayName = 'JVR.TypeFalse';
|
|
226
|
-
var TypeFloat = function TypeFloat(_ref6) {
|
|
233
|
+
var TypeFloat = exports.TypeFloat = function TypeFloat(_ref6) {
|
|
227
234
|
var children = _ref6.children,
|
|
228
|
-
expandKey = _ref6.expandKey,
|
|
229
235
|
keyName = _ref6.keyName;
|
|
230
236
|
var _useTypesStore6 = (0, _Types.useTypesStore)(),
|
|
231
237
|
_useTypesStore6$Float = _useTypesStore6.Float,
|
|
@@ -241,14 +247,16 @@ var TypeFloat = function TypeFloat(_ref6) {
|
|
|
241
247
|
style: style
|
|
242
248
|
}), {
|
|
243
249
|
type: 'type',
|
|
244
|
-
value: children
|
|
250
|
+
value: children,
|
|
251
|
+
keyName: keyName
|
|
245
252
|
});
|
|
246
253
|
var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
247
254
|
children: children,
|
|
248
255
|
className: 'w-rjv-value'
|
|
249
256
|
}), {
|
|
250
257
|
type: 'value',
|
|
251
|
-
value: children
|
|
258
|
+
value: children,
|
|
259
|
+
keyName: keyName
|
|
252
260
|
});
|
|
253
261
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
254
262
|
children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
@@ -256,18 +264,12 @@ var TypeFloat = function TypeFloat(_ref6) {
|
|
|
256
264
|
}))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
257
265
|
className: "w-rjv-value",
|
|
258
266
|
children: children === null || children === void 0 ? void 0 : children.toString()
|
|
259
|
-
}))
|
|
260
|
-
keyName: keyName,
|
|
261
|
-
value: children,
|
|
262
|
-
expandKey: expandKey
|
|
263
|
-
})]
|
|
267
|
+
}))]
|
|
264
268
|
});
|
|
265
269
|
};
|
|
266
|
-
exports.TypeFloat = TypeFloat;
|
|
267
270
|
TypeFloat.displayName = 'JVR.TypeFloat';
|
|
268
|
-
var TypeInt = function TypeInt(_ref7) {
|
|
271
|
+
var TypeInt = exports.TypeInt = function TypeInt(_ref7) {
|
|
269
272
|
var children = _ref7.children,
|
|
270
|
-
expandKey = _ref7.expandKey,
|
|
271
273
|
keyName = _ref7.keyName;
|
|
272
274
|
var _useTypesStore7 = (0, _Types.useTypesStore)(),
|
|
273
275
|
_useTypesStore7$Int = _useTypesStore7.Int,
|
|
@@ -283,14 +285,16 @@ var TypeInt = function TypeInt(_ref7) {
|
|
|
283
285
|
style: style
|
|
284
286
|
}), {
|
|
285
287
|
type: 'type',
|
|
286
|
-
value: children
|
|
288
|
+
value: children,
|
|
289
|
+
keyName: keyName
|
|
287
290
|
});
|
|
288
291
|
var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
289
292
|
children: children,
|
|
290
293
|
className: 'w-rjv-value'
|
|
291
294
|
}), {
|
|
292
295
|
type: 'value',
|
|
293
|
-
value: children
|
|
296
|
+
value: children,
|
|
297
|
+
keyName: keyName
|
|
294
298
|
});
|
|
295
299
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
296
300
|
children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
@@ -298,18 +302,12 @@ var TypeInt = function TypeInt(_ref7) {
|
|
|
298
302
|
}))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
299
303
|
className: "w-rjv-value",
|
|
300
304
|
children: children === null || children === void 0 ? void 0 : children.toString()
|
|
301
|
-
}))
|
|
302
|
-
keyName: keyName,
|
|
303
|
-
value: children,
|
|
304
|
-
expandKey: expandKey
|
|
305
|
-
})]
|
|
305
|
+
}))]
|
|
306
306
|
});
|
|
307
307
|
};
|
|
308
|
-
exports.TypeInt = TypeInt;
|
|
309
308
|
TypeInt.displayName = 'JVR.TypeInt';
|
|
310
|
-
var TypeBigint = function TypeBigint(_ref8) {
|
|
309
|
+
var TypeBigint = exports.TypeBigint = function TypeBigint(_ref8) {
|
|
311
310
|
var children = _ref8.children,
|
|
312
|
-
expandKey = _ref8.expandKey,
|
|
313
311
|
keyName = _ref8.keyName;
|
|
314
312
|
var _useTypesStore8 = (0, _Types.useTypesStore)(),
|
|
315
313
|
_useTypesStore8$Bigin = _useTypesStore8.Bigint,
|
|
@@ -325,33 +323,29 @@ var TypeBigint = function TypeBigint(_ref8) {
|
|
|
325
323
|
style: style
|
|
326
324
|
}), {
|
|
327
325
|
type: 'type',
|
|
328
|
-
value: children
|
|
326
|
+
value: children,
|
|
327
|
+
keyName: keyName
|
|
329
328
|
});
|
|
330
329
|
var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
331
330
|
children: children,
|
|
332
331
|
className: 'w-rjv-value'
|
|
333
332
|
}), {
|
|
334
333
|
type: 'value',
|
|
335
|
-
value: children
|
|
334
|
+
value: children,
|
|
335
|
+
keyName: keyName
|
|
336
336
|
});
|
|
337
337
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
338
338
|
children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
339
339
|
style: style
|
|
340
340
|
}))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
341
341
|
className: "w-rjv-value",
|
|
342
|
-
children: (children === null || children === void 0 ? void 0 : children.toString())
|
|
343
|
-
}))
|
|
344
|
-
keyName: keyName,
|
|
345
|
-
value: children,
|
|
346
|
-
expandKey: expandKey
|
|
347
|
-
})]
|
|
342
|
+
children: bigIntToString(children === null || children === void 0 ? void 0 : children.toString())
|
|
343
|
+
}))]
|
|
348
344
|
});
|
|
349
345
|
};
|
|
350
|
-
exports.TypeBigint = TypeBigint;
|
|
351
346
|
TypeBigint.displayName = 'JVR.TypeFloat';
|
|
352
|
-
var TypeUrl = function TypeUrl(_ref9) {
|
|
347
|
+
var TypeUrl = exports.TypeUrl = function TypeUrl(_ref9) {
|
|
353
348
|
var children = _ref9.children,
|
|
354
|
-
expandKey = _ref9.expandKey,
|
|
355
349
|
keyName = _ref9.keyName;
|
|
356
350
|
var _useTypesStore9 = (0, _Types.useTypesStore)(),
|
|
357
351
|
_useTypesStore9$Url = _useTypesStore9.Url,
|
|
@@ -367,14 +361,16 @@ var TypeUrl = function TypeUrl(_ref9) {
|
|
|
367
361
|
style: style
|
|
368
362
|
}), {
|
|
369
363
|
type: 'type',
|
|
370
|
-
value: children
|
|
364
|
+
value: children,
|
|
365
|
+
keyName: keyName
|
|
371
366
|
});
|
|
372
367
|
var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
373
368
|
children: children === null || children === void 0 ? void 0 : children.href,
|
|
374
369
|
className: 'w-rjv-value'
|
|
375
370
|
}), {
|
|
376
371
|
type: 'value',
|
|
377
|
-
value: children
|
|
372
|
+
value: children,
|
|
373
|
+
keyName: keyName
|
|
378
374
|
});
|
|
379
375
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
380
376
|
children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
@@ -385,18 +381,12 @@ var TypeUrl = function TypeUrl(_ref9) {
|
|
|
385
381
|
}, reset), {}, {
|
|
386
382
|
className: "w-rjv-value",
|
|
387
383
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {}), children === null || children === void 0 ? void 0 : children.href, /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {})]
|
|
388
|
-
}))
|
|
389
|
-
keyName: keyName,
|
|
390
|
-
value: children,
|
|
391
|
-
expandKey: expandKey
|
|
392
|
-
})]
|
|
384
|
+
}))]
|
|
393
385
|
});
|
|
394
386
|
};
|
|
395
|
-
exports.TypeUrl = TypeUrl;
|
|
396
387
|
TypeUrl.displayName = 'JVR.TypeUrl';
|
|
397
|
-
var TypeDate = function TypeDate(_ref10) {
|
|
388
|
+
var TypeDate = exports.TypeDate = function TypeDate(_ref10) {
|
|
398
389
|
var children = _ref10.children,
|
|
399
|
-
expandKey = _ref10.expandKey,
|
|
400
390
|
keyName = _ref10.keyName;
|
|
401
391
|
var _useTypesStore10 = (0, _Types.useTypesStore)(),
|
|
402
392
|
_useTypesStore10$Date = _useTypesStore10.Date,
|
|
@@ -412,15 +402,17 @@ var TypeDate = function TypeDate(_ref10) {
|
|
|
412
402
|
style: style
|
|
413
403
|
}), {
|
|
414
404
|
type: 'type',
|
|
415
|
-
value: children
|
|
405
|
+
value: children,
|
|
406
|
+
keyName: keyName
|
|
416
407
|
});
|
|
417
|
-
var childStr = children
|
|
408
|
+
var childStr = children instanceof Date ? children.toLocaleString() : children;
|
|
418
409
|
var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
419
410
|
children: childStr,
|
|
420
411
|
className: 'w-rjv-value'
|
|
421
412
|
}), {
|
|
422
413
|
type: 'value',
|
|
423
|
-
value: children
|
|
414
|
+
value: children,
|
|
415
|
+
keyName: keyName
|
|
424
416
|
});
|
|
425
417
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
426
418
|
children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
@@ -428,18 +420,12 @@ var TypeDate = function TypeDate(_ref10) {
|
|
|
428
420
|
}))), child || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
429
421
|
className: "w-rjv-value",
|
|
430
422
|
children: childStr
|
|
431
|
-
}))
|
|
432
|
-
keyName: keyName,
|
|
433
|
-
value: children,
|
|
434
|
-
expandKey: expandKey
|
|
435
|
-
})]
|
|
423
|
+
}))]
|
|
436
424
|
});
|
|
437
425
|
};
|
|
438
|
-
exports.TypeDate = TypeDate;
|
|
439
426
|
TypeDate.displayName = 'JVR.TypeDate';
|
|
440
|
-
var TypeUndefined = function TypeUndefined(_ref11) {
|
|
427
|
+
var TypeUndefined = exports.TypeUndefined = function TypeUndefined(_ref11) {
|
|
441
428
|
var children = _ref11.children,
|
|
442
|
-
expandKey = _ref11.expandKey,
|
|
443
429
|
keyName = _ref11.keyName;
|
|
444
430
|
var _useTypesStore11 = (0, _Types.useTypesStore)(),
|
|
445
431
|
_useTypesStore11$Unde = _useTypesStore11.Undefined,
|
|
@@ -455,30 +441,26 @@ var TypeUndefined = function TypeUndefined(_ref11) {
|
|
|
455
441
|
style: style
|
|
456
442
|
}), {
|
|
457
443
|
type: 'type',
|
|
458
|
-
value: children
|
|
444
|
+
value: children,
|
|
445
|
+
keyName: keyName
|
|
459
446
|
});
|
|
460
447
|
var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
461
448
|
children: children,
|
|
462
449
|
className: 'w-rjv-value'
|
|
463
450
|
}), {
|
|
464
451
|
type: 'value',
|
|
465
|
-
value: children
|
|
452
|
+
value: children,
|
|
453
|
+
keyName: keyName
|
|
466
454
|
});
|
|
467
455
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
468
456
|
children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
469
457
|
style: style
|
|
470
|
-
}))), child
|
|
471
|
-
keyName: keyName,
|
|
472
|
-
value: children,
|
|
473
|
-
expandKey: expandKey
|
|
474
|
-
})]
|
|
458
|
+
}))), child]
|
|
475
459
|
});
|
|
476
460
|
};
|
|
477
|
-
exports.TypeUndefined = TypeUndefined;
|
|
478
461
|
TypeUndefined.displayName = 'JVR.TypeUndefined';
|
|
479
|
-
var TypeNull = function TypeNull(_ref12) {
|
|
462
|
+
var TypeNull = exports.TypeNull = function TypeNull(_ref12) {
|
|
480
463
|
var children = _ref12.children,
|
|
481
|
-
expandKey = _ref12.expandKey,
|
|
482
464
|
keyName = _ref12.keyName;
|
|
483
465
|
var _useTypesStore12 = (0, _Types.useTypesStore)(),
|
|
484
466
|
_useTypesStore12$Null = _useTypesStore12.Null,
|
|
@@ -494,30 +476,26 @@ var TypeNull = function TypeNull(_ref12) {
|
|
|
494
476
|
style: style
|
|
495
477
|
}), {
|
|
496
478
|
type: 'type',
|
|
497
|
-
value: children
|
|
479
|
+
value: children,
|
|
480
|
+
keyName: keyName
|
|
498
481
|
});
|
|
499
482
|
var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
500
483
|
children: children,
|
|
501
484
|
className: 'w-rjv-value'
|
|
502
485
|
}), {
|
|
503
486
|
type: 'value',
|
|
504
|
-
value: children
|
|
487
|
+
value: children,
|
|
488
|
+
keyName: keyName
|
|
505
489
|
});
|
|
506
490
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
507
491
|
children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
508
492
|
style: style
|
|
509
|
-
}))), child
|
|
510
|
-
keyName: keyName,
|
|
511
|
-
value: children,
|
|
512
|
-
expandKey: expandKey
|
|
513
|
-
})]
|
|
493
|
+
}))), child]
|
|
514
494
|
});
|
|
515
495
|
};
|
|
516
|
-
exports.TypeNull = TypeNull;
|
|
517
496
|
TypeNull.displayName = 'JVR.TypeNull';
|
|
518
|
-
var TypeNan = function TypeNan(_ref13) {
|
|
497
|
+
var TypeNan = exports.TypeNan = function TypeNan(_ref13) {
|
|
519
498
|
var children = _ref13.children,
|
|
520
|
-
expandKey = _ref13.expandKey,
|
|
521
499
|
keyName = _ref13.keyName;
|
|
522
500
|
var _useTypesStore13 = (0, _Types.useTypesStore)(),
|
|
523
501
|
_useTypesStore13$Nan = _useTypesStore13.Nan,
|
|
@@ -533,24 +511,21 @@ var TypeNan = function TypeNan(_ref13) {
|
|
|
533
511
|
style: style
|
|
534
512
|
}), {
|
|
535
513
|
type: 'type',
|
|
536
|
-
value: children
|
|
514
|
+
value: children,
|
|
515
|
+
keyName: keyName
|
|
537
516
|
});
|
|
538
517
|
var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
539
518
|
children: children === null || children === void 0 ? void 0 : children.toString(),
|
|
540
519
|
className: 'w-rjv-value'
|
|
541
520
|
}), {
|
|
542
521
|
type: 'value',
|
|
543
|
-
value: children
|
|
522
|
+
value: children,
|
|
523
|
+
keyName: keyName
|
|
544
524
|
});
|
|
545
525
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
546
526
|
children: [displayDataTypes && (type || /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
547
527
|
style: style
|
|
548
|
-
}))), child
|
|
549
|
-
keyName: keyName,
|
|
550
|
-
value: children,
|
|
551
|
-
expandKey: expandKey
|
|
552
|
-
})]
|
|
528
|
+
}))), child]
|
|
553
529
|
});
|
|
554
530
|
};
|
|
555
|
-
exports.TypeNan = TypeNan;
|
|
556
531
|
TypeNan.displayName = 'JVR.TypeNan';
|
package/cjs/utils/useRender.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SymbolsElement } from '../store/Symbols';
|
|
2
2
|
import { type TagType, type TypesElement } from '../store/Types';
|
|
3
3
|
import { type SectionElement } from '../store/Section';
|
|
4
|
-
export declare function useSymbolsRender(currentProps: SymbolsElement<TagType>, props: SymbolsElement<
|
|
4
|
+
export declare function useSymbolsRender<K extends TagType>(currentProps: SymbolsElement<TagType>, props: SymbolsElement<K>, key: string): void;
|
|
5
5
|
export declare function useTypesRender<K extends TagType>(currentProps: TypesElement<TagType>, props: TypesElement<K>, key: string): void;
|
|
6
6
|
export declare function useSectionRender<K extends TagType>(currentProps: SectionElement<TagType>, props: SectionElement<K>, key: string): void;
|
package/editor.d.ts
CHANGED
|
@@ -2,35 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
declare module '@uiw/react-json-view/editor' {
|
|
4
4
|
import { JsonViewProps } from '@uiw/react-json-view';
|
|
5
|
-
import type { CountInfoExtraProps } from '@uiw/react-json-view/cjs/editor/countInfoExtra';
|
|
5
|
+
// import type { CountInfoExtraProps } from '@uiw/react-json-view/cjs/editor/countInfoExtra';
|
|
6
6
|
type Option = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
value: string;
|
|
8
|
+
prevValue: string;
|
|
9
|
+
keyName: string | number;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export interface JsonViewEditorProps<T extends object> extends JsonViewProps<T> {
|
|
13
13
|
/** Callback when value edit functionality */
|
|
14
14
|
onEdit?: (option: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
value: unknown;
|
|
16
|
+
oldValue: unknown;
|
|
17
|
+
keyName?: string | number;
|
|
18
|
+
parentName?: string | number;
|
|
19
|
+
type?: 'value' | 'key';
|
|
20
20
|
}) => void;
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
onAdd?: CountInfoExtraProps<T>['onAdd'];
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
onDelete?: CountInfoExtraProps<T>['onDelete'];
|
|
21
|
+
// /**
|
|
22
|
+
// * When a callback function is passed in, add functionality is enabled. The callback is invoked before additions are completed.
|
|
23
|
+
// * @returns {boolean} Returning false from onAdd will prevent the change from being made.
|
|
24
|
+
// */
|
|
25
|
+
// onAdd?: CountInfoExtraProps<T>['onAdd'];
|
|
26
|
+
// /**
|
|
27
|
+
// * When a callback function is passed in, delete functionality is enabled. The callback is invoked before deletions are completed.
|
|
28
|
+
// * @returns Returning false from onDelete will prevent the change from being made.
|
|
29
|
+
// */
|
|
30
|
+
// onDelete?: CountInfoExtraProps<T>['onDelete'];
|
|
31
31
|
/** Whether enable edit feature. @default true */
|
|
32
32
|
editable?: boolean;
|
|
33
33
|
}
|
|
34
|
-
const JsonViewEditor: import(
|
|
34
|
+
const JsonViewEditor: import('react').ForwardRefExoticComponent<
|
|
35
|
+
Omit<JsonViewEditorProps<object>, 'ref'> & import('react').RefAttributes<HTMLDivElement>
|
|
36
|
+
>;
|
|
35
37
|
export default JsonViewEditor;
|
|
36
38
|
}
|
package/esm/Container.d.ts
CHANGED
|
@@ -6,5 +6,7 @@ export interface ContainerProps<T extends object> extends React.HTMLAttributes<H
|
|
|
6
6
|
level?: number;
|
|
7
7
|
value?: T;
|
|
8
8
|
initialValue?: T;
|
|
9
|
+
/** Index of the parent `keyName` */
|
|
10
|
+
keys?: (string | number)[];
|
|
9
11
|
}
|
|
10
12
|
export declare const Container: React.ForwardRefExoticComponent<ContainerProps<object> & React.RefAttributes<HTMLDivElement>>;
|