File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed
packages/tdb-documents-ui/diff/src Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export const Output = () => {
2727 useEffect ( ( ) => {
2828 async function getDiffs ( tdbClient ) {
2929 //console.log("doc", doc)
30- let result_patch = await tdbClient . getJSONDiff ( oldData [ "MarkDown " ] , changedData [ "MarkDown " ] )
30+ let result_patch = await tdbClient . getJSONDiff ( oldData [ "Person " ] , changedData [ "Person " ] )
3131 setDiff ( result_patch )
3232 }
3333 if ( tdbClient ) {
@@ -256,6 +256,10 @@ export const Output = () => {
256256 "@type" : "Random"
257257 } ,
258258 "@type" : "Class" ,
259+ "likes" : {
260+ "@class" : "Animal" ,
261+ "@type" : "List"
262+ } ,
259263 /*"favorite_subject": {
260264 "@class ": [
261265 {
@@ -269,7 +273,6 @@ export const Output = () => {
269273 ],
270274 "@type": "Set"
271275 },
272- "likes": "Animal",
273276 "name": {
274277 "@class ": "xsd:string",
275278 "@type": "Optional"
@@ -360,10 +363,10 @@ export const Output = () => {
360363
361364 return < div className = "w-100" >
362365 < DiffViewer
363- oldValue = { oldData [ "MarkDown " ] }
364- newValue = { changedData [ "MarkDown " ] }
366+ oldValue = { oldData [ "Person " ] }
367+ newValue = { changedData [ "Person " ] }
365368 frame = { testFrames }
366- type = { "MarkDown " }
369+ type = { "Person " }
367370 onTraverse = { handleTraverse }
368371 diffPatch = { diff } />
369372 </ div >
Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ export const oldData = {
5858 "Person" : {
5959 "@id" : "Person/6230f55d381076aa7f94b6b01a7a7ae1692ef40c44e233a52c1c280b5d339839" ,
6060 "@type" : "Person" ,
61+ "likes" : [
62+ "A" ,
63+ "B"
64+ ]
6165 /*"favorite_subject": [{
6266 "@type ": "Zoology",
6367 "Zoology_notes": "some notes 1",
@@ -89,7 +93,7 @@ export const oldData = {
8993 }*/
9094 /*}
9195 }
92- },*/
96+ },
9397 "manYAddress": [
9498 {
9599 "@type ": "Address",
@@ -226,6 +230,12 @@ export const changedData = {
226230 "Person" : {
227231 "@id" : "Person/6230f55d381076aa7f94b6b01a7a7ae1692ef40c44e233a52c1c280b5d339839" ,
228232 "@type" : "Person" ,
233+ "likes" : [
234+ "A" ,
235+ "B" ,
236+ "C" ,
237+ "D"
238+ ]
229239 /*"favorite_subject": [{
230240 "@type ": "Zoology",
231241 "Zoology_notes": "some notes",
@@ -257,7 +267,7 @@ export const changedData = {
257267 }*/
258268 /*}
259269 }
260- },*/
270+ },
261271 "manYAddress": [
262272 {
263273 "@type ": "Address",
You can’t perform that action at this time.
0 commit comments