Skip to content

Commit

Permalink
feat: type component render adds keyName return param. 49de404
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 16, 2023
1 parent b2d0416 commit 9dbc5e1
Show file tree
Hide file tree
Showing 70 changed files with 137 additions and 104 deletions.
6 changes: 3 additions & 3 deletions asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"files": {
"main.css": "/static/css/main.020a7543.css",
"main.js": "/static/js/main.61de93b7.js",
"main.js": "/static/js/main.45dd2da1.js",
"refractor-prismjs-vendor.0abbb2f3.js": "/static/js/refractor-prismjs-vendor.0abbb2f3.086bbe5c.js",
"react-vendor.js": "/static/js/react-vendor.c7475ed3.js",
"refractor-prismjs-vendor.3665b250.js": "/static/js/refractor-prismjs-vendor.3665b250.f12b46a8.js",
"refractor-prismjs-vendor.a81a7d65.js": "/static/js/refractor-prismjs-vendor.a81a7d65.de08a6f1.js",
"index.html": "/index.html",
"main.020a7543.css.map": "/static/css/main.020a7543.css.map",
"main.61de93b7.js.map": "/static/js/main.61de93b7.js.map",
"main.45dd2da1.js.map": "/static/js/main.45dd2da1.js.map",
"refractor-prismjs-vendor.0abbb2f3.086bbe5c.js.map": "/static/js/refractor-prismjs-vendor.0abbb2f3.086bbe5c.js.map",
"react-vendor.c7475ed3.js.map": "/static/js/react-vendor.c7475ed3.js.map",
"refractor-prismjs-vendor.3665b250.f12b46a8.js.map": "/static/js/refractor-prismjs-vendor.3665b250.f12b46a8.js.map",
Expand All @@ -20,6 +20,6 @@
"static/js/refractor-prismjs-vendor.0abbb2f3.086bbe5c.js",
"static/js/react-vendor.c7475ed3.js",
"static/css/main.020a7543.css",
"static/js/main.61de93b7.js"
"static/js/main.45dd2da1.js"
]
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="keywords" content="react,react-component,array-viewer,base-16,component,interactive,interactive-json,json,json-component,json-display,json-tree,json-view,json-viewer,json-inspector,json-tree,react,react-component,react-json,theme,tree,tree-view,treeview,jaywcjlove"><meta name="description" content="A React component for displaying and editing javascript arrays and JSON objects."><link rel="shortcut icon" href="/favicon.ico"><title>react-json-view</title><script defer="defer" src="./static/js/refractor-prismjs-vendor.3665b250.f12b46a8.js"></script><script defer="defer" src="./static/js/refractor-prismjs-vendor.a81a7d65.de08a6f1.js"></script><script defer="defer" src="./static/js/refractor-prismjs-vendor.0abbb2f3.086bbe5c.js"></script><script defer="defer" src="./static/js/react-vendor.c7475ed3.js"></script><script defer="defer" src="./static/js/main.61de93b7.js"></script><link href="./static/css/main.020a7543.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="keywords" content="react,react-component,array-viewer,base-16,component,interactive,interactive-json,json,json-component,json-display,json-tree,json-view,json-viewer,json-inspector,json-tree,react,react-component,react-json,theme,tree,tree-view,treeview,jaywcjlove"><meta name="description" content="A React component for displaying and editing javascript arrays and JSON objects."><link rel="shortcut icon" href="/favicon.ico"><title>react-json-view</title><script defer="defer" src="./static/js/refractor-prismjs-vendor.3665b250.f12b46a8.js"></script><script defer="defer" src="./static/js/refractor-prismjs-vendor.a81a7d65.de08a6f1.js"></script><script defer="defer" src="./static/js/refractor-prismjs-vendor.0abbb2f3.086bbe5c.js"></script><script defer="defer" src="./static/js/react-vendor.c7475ed3.js"></script><script defer="defer" src="./static/js/main.45dd2da1.js"></script><link href="./static/css/main.020a7543.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
2 changes: 1 addition & 1 deletion lcov-report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ <h1>All files</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/Container.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> Contain
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/arrow/TriangleArrow.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/arrow</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/arrow/TriangleSolidArrow.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/arrow</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/arrow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h1><a href="../../index.html">All files</a> src/arrow</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/comps/Copied.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/comps/KeyValues.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/comps/NestedClose.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
6 changes: 3 additions & 3 deletions lcov-report/src/comps/NestedOpen.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
&lt;span {...reset}&gt;
{showArrow &amp;&amp; &lt;Arrow style={arrowStyle} expandKey={expandKey} /&gt;}
{(keyName || typeof keyName === 'number') &amp;&amp; &lt;KayName keyName={keyName} /&gt;}
&lt;SetComp value={initialValue} /&gt;
&lt;MapComp value={initialValue} /&gt;
&lt;SetComp value={initialValue} keyName={keyName!} /&gt;
&lt;MapComp value={initialValue} keyName={keyName!} /&gt;
&lt;BracketsOpen isBrackets={isArray || isMySet} /&gt;
&lt;EllipsisComp keyName={keyName!} value={value} isExpanded={isExpanded} /&gt;
&lt;BracketsClose isVisiable={isExpanded || !showArrow} isBrackets={isArray || isMySet} /&gt;
Expand All @@ -247,7 +247,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/comps/Value.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/comps/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ <h1><a href="../../index.html">All files</a> src/comps</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ <h1><a href="../index.html">All files</a> src</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/index.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> index.t
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/section/Copied.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/section<
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/section/CountInfo.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/section<
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/section/CountInfoExtra.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/section<
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/section/Ellipsis.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/section<
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/section/KeyName.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/section<
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/section/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ <h1><a href="../../index.html">All files</a> src/section</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/store.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> store.t
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/store/Expands.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/store</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/store/Section.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/store</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/store/ShowTools.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/store</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/store/Symbols.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/store</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
15 changes: 12 additions & 3 deletions lcov-report/src/store/Types.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,13 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/store</a
<a name='L185'></a><a href='#L185'>185</a>
<a name='L186'></a><a href='#L186'>186</a>
<a name='L187'></a><a href='#L187'>187</a>
<a name='L188'></a><a href='#L188'>188</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<a name='L188'></a><a href='#L188'>188</a>
<a name='L189'></a><a href='#L189'>189</a>
<a name='L190'></a><a href='#L190'>190</a>
<a name='L191'></a><a href='#L191'>191</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -443,7 +449,10 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/store</a
&nbsp;
type TypesElementProps&lt;T extends TagType = 'span'&gt; = {
as?: T;
render?: (props: TypesElement&lt;T&gt;, result: { type: 'type' | 'value'; value?: unknown }) =&gt; React.ReactNode;
render?: (
props: TypesElement&lt;T&gt;,
result: { type: 'type' | 'value'; value?: unknown; keyName: string | number },
) =&gt; React.ReactNode;
'data-type'?: string;
};
&nbsp;
Expand Down Expand Up @@ -631,7 +640,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/store</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/store/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ <h1><a href="../../index.html">All files</a> src/store</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/symbol/Arrow.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/symbol</
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/symbol/BraceLeft.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/symbol</
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-21T08:08:19.403Z
at 2023-10-16T16:59:48.479Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
Loading

0 comments on commit 9dbc5e1

Please sign in to comment.