@reltio/sources 1.4.1585 → 1.4.1586-mui5

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.
Files changed (94) hide show
  1. package/index.ts +1 -0
  2. package/package.json +38 -21
  3. package/public/bundle.js +205 -0
  4. package/public/bundle.js.LICENSE.txt +79 -0
  5. package/public/package.json +22 -0
  6. package/scripts/build/index.js +20 -0
  7. package/src/components/CrosswalkTreeView/CrosswalkTreeView.tsx +47 -0
  8. package/src/components/CrosswalkTreeView/__tests__/CrosswalkTreeView.spec.tsx +72 -0
  9. package/src/components/CrosswalkTreeView/__tests__/helpers.spec.ts +961 -0
  10. package/src/components/CrosswalkTreeView/helpers.ts +91 -0
  11. package/src/components/CrosswalkTreeView/styles.ts +10 -0
  12. package/src/components/EmptyState/EmptyState.tsx +20 -0
  13. package/src/components/EmptyState/__tests__/EmptyState.test.tsx +13 -0
  14. package/src/components/EmptyState/icons/EmptySources.svg +43 -0
  15. package/src/components/EmptyState/styles.ts +19 -0
  16. package/src/components/LegendTable/LegendTable.tsx +124 -0
  17. package/src/components/LegendTable/LegendTableRow/ContributorRow/ContributorRow.tsx +46 -0
  18. package/src/components/LegendTable/LegendTableRow/ContributorRow/__tests__/ContributorRow.test.tsx +103 -0
  19. package/src/components/LegendTable/LegendTableRow/ContributorRow/styles.ts +31 -0
  20. package/src/components/LegendTable/LegendTableRow/LegendTableRow.tsx +179 -0
  21. package/src/components/LegendTable/LegendTableRow/__tests__/LegendTableRow.test.tsx +371 -0
  22. package/src/components/LegendTable/LegendTableRow/styles.ts +31 -0
  23. package/src/components/LegendTable/__tests__/LegendTable.test.tsx +273 -0
  24. package/src/components/LegendTable/__tests__/helpers.test.ts +541 -0
  25. package/src/components/LegendTable/helpers.ts +64 -0
  26. package/src/components/LegendTable/styles.ts +17 -0
  27. package/src/components/LegendView/LegendView.tsx +201 -0
  28. package/src/components/LegendView/__tests__/LegendView.test.tsx +307 -0
  29. package/src/components/LegendView/styles.ts +51 -0
  30. package/src/components/RightSidePanel/RightSidePanel.tsx +25 -0
  31. package/src/components/RightSidePanel/__tests__/RightSidePanel.test.tsx +28 -0
  32. package/src/components/RightSidePanel/styles.ts +14 -0
  33. package/src/components/RulesestsSelector/RulesestsSelector.tsx +31 -0
  34. package/src/components/RulesestsSelector/RulesetOption/RulesetOption.tsx +25 -0
  35. package/src/components/RulesestsSelector/RulesetOption/__tests__/RulesetOption.test.tsx +25 -0
  36. package/src/components/RulesestsSelector/RulesetOption/styles.ts +27 -0
  37. package/src/components/RulesestsSelector/RulesetsMenuList/RulesetsMenuList.tsx +14 -0
  38. package/src/components/RulesestsSelector/__tests__/RulesetsSelector.test.tsx +91 -0
  39. package/src/components/RulesestsSelector/styles.ts +7 -0
  40. package/src/components/SankeyChart/Link.tsx +31 -0
  41. package/src/components/SankeyChart/MergeTooltip.tsx +37 -0
  42. package/src/components/SankeyChart/Node.tsx +137 -0
  43. package/src/components/SankeyChart/SankeyChart.tsx +103 -0
  44. package/src/components/SankeyChart/__tests__/Link.spec.tsx +127 -0
  45. package/src/components/SankeyChart/__tests__/MergeTooltip.spec.tsx +22 -0
  46. package/src/components/SankeyChart/__tests__/Node.spec.tsx +248 -0
  47. package/src/components/SankeyChart/__tests__/SankeyChart.spec.tsx +161 -0
  48. package/src/components/SankeyChart/__tests__/__snapshots__/SankeyChart.spec.tsx.snap +183 -0
  49. package/src/components/SankeyChart/sankey.ts +322 -0
  50. package/src/components/SankeyChart/styles.ts +41 -0
  51. package/src/components/SankeyChart/useSankey.tsx +44 -0
  52. package/src/components/SelectableTree/SelectableTree.tsx +46 -0
  53. package/src/components/SelectableTree/__tests__/SelectableTree.test.tsx +28 -0
  54. package/src/components/SelectableTree/__tests__/__snapshots__/SelectableTree.test.tsx.snap +59 -0
  55. package/src/components/SelectableTree/styles.ts +42 -0
  56. package/src/components/SourcesView/SourcesView.tsx +318 -0
  57. package/src/components/SourcesView/__tests__/IntegrationSourcesView.spec.tsx +199 -0
  58. package/src/components/SourcesView/__tests__/SourcesView.spec.tsx +903 -0
  59. package/src/components/SourcesView/__tests__/data/metadata.data.ts +27 -0
  60. package/src/components/SourcesView/__tests__/data/store.data.ts +65 -0
  61. package/src/components/SourcesView/icons/LegendIcon.svg +8 -0
  62. package/src/components/SourcesView/index.tsx +57 -0
  63. package/src/components/SourcesView/styles.ts +44 -0
  64. package/src/components/TreeActionSnackbar/TreeActionSnackbar.tsx +38 -0
  65. package/src/components/TreeActionSnackbar/__tests__/TreeActionSnackbar.test.tsx +38 -0
  66. package/src/components/TreeActionSnackbar/styles.ts +11 -0
  67. package/src/components/UnmergeDialog/UnmergeDialog.tsx +78 -0
  68. package/src/components/UnmergeDialog/__tests__/UnmergeDialog.test.tsx +124 -0
  69. package/src/components/UnmergeDialog/__tests__/testData.data.ts +271 -0
  70. package/src/components/UnmergeDialog/styles.ts +34 -0
  71. package/src/components/UnsubscribeDialog/UnsubscribeDialog.tsx +64 -0
  72. package/src/components/UnsubscribeDialog/__tests__/UnsubscribeDialog.test.tsx +59 -0
  73. package/src/components/UnsubscribeDialog/styles.ts +31 -0
  74. package/src/hooks/__tests__/useCrosswalkTree.specs.tsx +68 -0
  75. package/src/hooks/__tests__/useCrosswalkTreeActions.specs.ts +110 -0
  76. package/src/hooks/__tests__/useCrosswalksDisplay.specs.tsx +213 -0
  77. package/src/hooks/__tests__/useEntityWithSurvivorshipGroups.specs.ts +160 -0
  78. package/src/hooks/useCrosswalkTree.ts +38 -0
  79. package/src/hooks/useCrosswalkTreeActions.ts +83 -0
  80. package/src/hooks/useCrosswalksDisplay.ts +110 -0
  81. package/src/hooks/useEntityWithSurvivorshipGroups.tsx +51 -0
  82. package/src/icons/notMatch.svg +14 -0
  83. package/src/index.ts +1 -0
  84. package/src/services/errors.ts +11 -0
  85. package/src/types/LegendMode.ts +5 -0
  86. package/src/types/SankeyChartData.ts +31 -0
  87. package/src/types/SourcesSavedState.ts +3 -0
  88. package/src/types/UnmergeContributorEvent.ts +7 -0
  89. package/src/types/UnsubscribeContributorEvent.ts +6 -0
  90. package/src/types/index.ts +4 -0
  91. package/tsconfig.json +4 -0
  92. package/webpack.config.js +10 -0
  93. package/bundle.js +0 -2
  94. package/bundle.js.LICENSE.txt +0 -42
@@ -0,0 +1,961 @@
1
+ import {getSankeyData} from '../helpers';
2
+
3
+ describe('helpers tests', () => {
4
+ describe('getSankeyData', () => {
5
+ const entityLabel = 'entityLabel';
6
+
7
+ const rootDate = 1;
8
+ const rootMergeDate = 0;
9
+
10
+ let dateNowMock;
11
+ beforeEach(() => {
12
+ dateNowMock = jest.spyOn(Date, 'now').mockReturnValueOnce(rootMergeDate).mockReturnValueOnce(rootDate);
13
+ });
14
+ afterEach(() => {
15
+ dateNowMock.mockRestore();
16
+ });
17
+
18
+ it('should return correct data', () => {
19
+ const crosswalkTree = {
20
+ merges: [
21
+ {
22
+ time: 1619116318362,
23
+ mergeReason: 'Merge by hand',
24
+ mergeRules: '',
25
+ user: 'carina.alabanza@reltio.com',
26
+ losers: [
27
+ {
28
+ uri: 'entities/1u04ksx9',
29
+ crosswalks: [
30
+ {
31
+ uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
32
+ type: 'configuration/sources/Reltio',
33
+ ownerType: 'entity',
34
+ value: '1u04ksx9'
35
+ }
36
+ ]
37
+ }
38
+ ]
39
+ }
40
+ ],
41
+ uri: 'entities/1O8x1gO0',
42
+ crosswalks: [
43
+ {
44
+ uri: 'entities/1O8x1gO0/crosswalks/2gghyKRrU',
45
+ type: 'configuration/sources/Reltio',
46
+ ownerType: 'entity',
47
+ value: '1O8x1gO0'
48
+ }
49
+ ]
50
+ };
51
+ expect(getSankeyData(crosswalkTree, entityLabel)).toEqual({
52
+ links: [
53
+ {
54
+ crosswalk: {
55
+ ownerType: 'entity',
56
+ type: 'configuration/sources/Reltio',
57
+ uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
58
+ uuid: 2,
59
+ value: '1u04ksx9'
60
+ },
61
+ source: {
62
+ entity: {
63
+ crosswalks: [
64
+ {
65
+ ownerType: 'entity',
66
+ type: 'configuration/sources/Reltio',
67
+ uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
68
+ uuid: 2,
69
+ value: '1u04ksx9'
70
+ }
71
+ ],
72
+ uri: 'entities/1u04ksx9'
73
+ },
74
+ name: 'entities/1u04ksx9',
75
+ time: 1619116318362
76
+ },
77
+ target: {
78
+ entity: {
79
+ crosswalks: [
80
+ {
81
+ ownerType: 'entity',
82
+ type: 'configuration/sources/Reltio',
83
+ uri: 'entities/1O8x1gO0/crosswalks/2gghyKRrU',
84
+ uuid: 1,
85
+ value: '1O8x1gO0'
86
+ }
87
+ ],
88
+ merges: [
89
+ {
90
+ losers: [
91
+ {
92
+ crosswalks: [
93
+ {
94
+ ownerType: 'entity',
95
+ type: 'configuration/sources/Reltio',
96
+ uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
97
+ uuid: 2,
98
+ value: '1u04ksx9'
99
+ }
100
+ ],
101
+ uri: 'entities/1u04ksx9'
102
+ }
103
+ ],
104
+ mergeReason: 'Merge by hand',
105
+ mergeRules: '',
106
+ time: 1619116318362,
107
+ user: 'carina.alabanza@reltio.com'
108
+ }
109
+ ],
110
+ uri: 'entities/1O8x1gO0'
111
+ },
112
+ name: 'entities/1O8x1gO0',
113
+ time: rootMergeDate
114
+ },
115
+ value: 10
116
+ },
117
+ {
118
+ crosswalk: {
119
+ ownerType: 'entity',
120
+ type: 'configuration/sources/Reltio',
121
+ uri: 'entities/1O8x1gO0/crosswalks/2gghyKRrU',
122
+ uuid: 1,
123
+ value: '1O8x1gO0'
124
+ },
125
+ source: {
126
+ entity: {
127
+ crosswalks: [
128
+ {
129
+ ownerType: 'entity',
130
+ type: 'configuration/sources/Reltio',
131
+ uri: 'entities/1O8x1gO0/crosswalks/2gghyKRrU',
132
+ uuid: 1,
133
+ value: '1O8x1gO0'
134
+ }
135
+ ],
136
+ merges: [
137
+ {
138
+ losers: [
139
+ {
140
+ crosswalks: [
141
+ {
142
+ ownerType: 'entity',
143
+ type: 'configuration/sources/Reltio',
144
+ uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
145
+ uuid: 2,
146
+ value: '1u04ksx9'
147
+ }
148
+ ],
149
+ uri: 'entities/1u04ksx9'
150
+ }
151
+ ],
152
+ mergeReason: 'Merge by hand',
153
+ mergeRules: '',
154
+ time: 1619116318362,
155
+ user: 'carina.alabanza@reltio.com'
156
+ }
157
+ ],
158
+ uri: 'entities/1O8x1gO0'
159
+ },
160
+ name: 'entities/1O8x1gO0',
161
+ time: rootMergeDate
162
+ },
163
+ target: {
164
+ entity: {
165
+ crosswalks: [],
166
+ label: 'entityLabel',
167
+ merges: [
168
+ {
169
+ losers: [
170
+ {
171
+ crosswalks: [
172
+ {
173
+ ownerType: 'entity',
174
+ type: 'configuration/sources/Reltio',
175
+ uri: 'entities/1O8x1gO0/crosswalks/2gghyKRrU',
176
+ uuid: 1,
177
+ value: '1O8x1gO0'
178
+ }
179
+ ],
180
+ merges: [
181
+ {
182
+ losers: [
183
+ {
184
+ crosswalks: [
185
+ {
186
+ ownerType: 'entity',
187
+ type: 'configuration/sources/Reltio',
188
+ uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
189
+ uuid: 2,
190
+ value: '1u04ksx9'
191
+ }
192
+ ],
193
+ uri: 'entities/1u04ksx9'
194
+ }
195
+ ],
196
+ mergeReason: 'Merge by hand',
197
+ mergeRules: '',
198
+ time: 1619116318362,
199
+ user: 'carina.alabanza@reltio.com'
200
+ }
201
+ ],
202
+ uri: 'entities/1O8x1gO0'
203
+ }
204
+ ],
205
+ time: rootMergeDate
206
+ }
207
+ ],
208
+ uri: 'ROOT'
209
+ },
210
+ label: 'entityLabel',
211
+ name: 'ROOT',
212
+ time: rootDate
213
+ },
214
+ value: 10
215
+ },
216
+ {
217
+ crosswalk: {
218
+ ownerType: 'entity',
219
+ type: 'configuration/sources/Reltio',
220
+ uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
221
+ uuid: 2,
222
+ value: '1u04ksx9'
223
+ },
224
+ source: {
225
+ entity: {
226
+ crosswalks: [
227
+ {
228
+ ownerType: 'entity',
229
+ type: 'configuration/sources/Reltio',
230
+ uri: 'entities/1O8x1gO0/crosswalks/2gghyKRrU',
231
+ uuid: 1,
232
+ value: '1O8x1gO0'
233
+ }
234
+ ],
235
+ merges: [
236
+ {
237
+ losers: [
238
+ {
239
+ crosswalks: [
240
+ {
241
+ ownerType: 'entity',
242
+ type: 'configuration/sources/Reltio',
243
+ uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
244
+ uuid: 2,
245
+ value: '1u04ksx9'
246
+ }
247
+ ],
248
+ uri: 'entities/1u04ksx9'
249
+ }
250
+ ],
251
+ mergeReason: 'Merge by hand',
252
+ mergeRules: '',
253
+ time: 1619116318362,
254
+ user: 'carina.alabanza@reltio.com'
255
+ }
256
+ ],
257
+ uri: 'entities/1O8x1gO0'
258
+ },
259
+ name: 'entities/1O8x1gO0',
260
+ time: rootMergeDate
261
+ },
262
+ target: {
263
+ entity: {
264
+ crosswalks: [],
265
+ label: 'entityLabel',
266
+ merges: [
267
+ {
268
+ losers: [
269
+ {
270
+ crosswalks: [
271
+ {
272
+ ownerType: 'entity',
273
+ type: 'configuration/sources/Reltio',
274
+ uri: 'entities/1O8x1gO0/crosswalks/2gghyKRrU',
275
+ uuid: 1,
276
+ value: '1O8x1gO0'
277
+ }
278
+ ],
279
+ merges: [
280
+ {
281
+ losers: [
282
+ {
283
+ crosswalks: [
284
+ {
285
+ ownerType: 'entity',
286
+ type: 'configuration/sources/Reltio',
287
+ uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
288
+ uuid: 2,
289
+ value: '1u04ksx9'
290
+ }
291
+ ],
292
+ uri: 'entities/1u04ksx9'
293
+ }
294
+ ],
295
+ mergeReason: 'Merge by hand',
296
+ mergeRules: '',
297
+ time: 1619116318362,
298
+ user: 'carina.alabanza@reltio.com'
299
+ }
300
+ ],
301
+ uri: 'entities/1O8x1gO0'
302
+ }
303
+ ],
304
+ time: rootMergeDate
305
+ }
306
+ ],
307
+ uri: 'ROOT'
308
+ },
309
+ label: 'entityLabel',
310
+ name: 'ROOT',
311
+ time: rootDate
312
+ },
313
+ value: 10
314
+ }
315
+ ],
316
+ nodes: [
317
+ {
318
+ entity: {
319
+ crosswalks: [],
320
+ label: 'entityLabel',
321
+ merges: [
322
+ {
323
+ losers: [
324
+ {
325
+ crosswalks: [
326
+ {
327
+ ownerType: 'entity',
328
+ type: 'configuration/sources/Reltio',
329
+ uri: 'entities/1O8x1gO0/crosswalks/2gghyKRrU',
330
+ uuid: 1,
331
+ value: '1O8x1gO0'
332
+ }
333
+ ],
334
+ merges: [
335
+ {
336
+ losers: [
337
+ {
338
+ crosswalks: [
339
+ {
340
+ ownerType: 'entity',
341
+ type: 'configuration/sources/Reltio',
342
+ uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
343
+ uuid: 2,
344
+ value: '1u04ksx9'
345
+ }
346
+ ],
347
+ uri: 'entities/1u04ksx9'
348
+ }
349
+ ],
350
+ mergeReason: 'Merge by hand',
351
+ mergeRules: '',
352
+ time: 1619116318362,
353
+ user: 'carina.alabanza@reltio.com'
354
+ }
355
+ ],
356
+ uri: 'entities/1O8x1gO0'
357
+ }
358
+ ],
359
+ time: rootMergeDate
360
+ }
361
+ ],
362
+ uri: 'ROOT'
363
+ },
364
+ label: 'entityLabel',
365
+ name: 'ROOT',
366
+ time: rootDate
367
+ },
368
+ {
369
+ entity: {
370
+ crosswalks: [
371
+ {
372
+ ownerType: 'entity',
373
+ type: 'configuration/sources/Reltio',
374
+ uri: 'entities/1O8x1gO0/crosswalks/2gghyKRrU',
375
+ uuid: 1,
376
+ value: '1O8x1gO0'
377
+ }
378
+ ],
379
+ merges: [
380
+ {
381
+ losers: [
382
+ {
383
+ crosswalks: [
384
+ {
385
+ ownerType: 'entity',
386
+ type: 'configuration/sources/Reltio',
387
+ uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
388
+ uuid: 2,
389
+ value: '1u04ksx9'
390
+ }
391
+ ],
392
+ uri: 'entities/1u04ksx9'
393
+ }
394
+ ],
395
+ mergeReason: 'Merge by hand',
396
+ mergeRules: '',
397
+ time: 1619116318362,
398
+ user: 'carina.alabanza@reltio.com'
399
+ }
400
+ ],
401
+ uri: 'entities/1O8x1gO0'
402
+ },
403
+ name: 'entities/1O8x1gO0',
404
+ time: rootMergeDate
405
+ },
406
+ {
407
+ entity: {
408
+ crosswalks: [
409
+ {
410
+ ownerType: 'entity',
411
+ type: 'configuration/sources/Reltio',
412
+ uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
413
+ uuid: 2,
414
+ value: '1u04ksx9'
415
+ }
416
+ ],
417
+ uri: 'entities/1u04ksx9'
418
+ },
419
+ name: 'entities/1u04ksx9',
420
+ time: 1619116318362
421
+ }
422
+ ]
423
+ });
424
+ });
425
+
426
+ it('should filter out non displayed crosswalks correctly', () => {
427
+ const crosswalkTree = {
428
+ merges: [
429
+ {
430
+ time: 1638790859683,
431
+ losers: [
432
+ {
433
+ merges: [
434
+ {
435
+ time: 1638790857843,
436
+ losers: [
437
+ {
438
+ uri: 'entities/278VRT8x',
439
+ crosswalks: [
440
+ {
441
+ uri: 'entities/1cKFWZEn/crosswalks/3iMNfeU0F',
442
+ type: 'configuration/sources/LNKD',
443
+ ownerType: 'entity',
444
+ value: 'LNKD0.17859669092893482'
445
+ },
446
+ {
447
+ uri: 'entities/1cKFWZEn/crosswalks/3iMNfeYGV',
448
+ type: 'configuration/sources/OASIS',
449
+ ownerType: 'entity',
450
+ value: 'OASIS0.5836883528969377'
451
+ },
452
+ {
453
+ uri: 'entities/1cKFWZEn/crosswalks/3iMNfegn1',
454
+ type: 'configuration/sources/OASIS',
455
+ ownerType: 'entity',
456
+ value: 'entity-OASIS-add-0.5521405898188471'
457
+ }
458
+ ]
459
+ }
460
+ ]
461
+ }
462
+ ],
463
+ uri: 'entities/278VR7pf',
464
+ crosswalks: [
465
+ {
466
+ uri: 'entities/1cKFWZEn/crosswalks/3iMNfdS4N',
467
+ type: 'configuration/sources/MMS2',
468
+ ownerType: 'entity',
469
+ value: 'MMS20.8868510993600206'
470
+ },
471
+ {
472
+ uri: 'entities/1cKFWZEn/crosswalks/3iMNfdWKd',
473
+ type: 'configuration/sources/EIS3',
474
+ ownerType: 'entity',
475
+ value: 'EIS30.36069156382625667'
476
+ },
477
+ {
478
+ uri: 'entities/1cKFWZEn/crosswalks/3iMNfeHDT',
479
+ type: 'configuration/sources/OASIS',
480
+ ownerType: 'entity',
481
+ value: 'entity-OASIS-add-0.49935638662385673'
482
+ },
483
+ {
484
+ uri: 'entities/1cKFWZEn/crosswalks/5P9pAlgpD',
485
+ type: 'configuration/sources/OASIS',
486
+ ownerType: 'entity',
487
+ value: 'entity-OASIS-add-0.9661073005492441'
488
+ }
489
+ ]
490
+ }
491
+ ]
492
+ },
493
+ {
494
+ time: 1638790850856,
495
+ losers: [
496
+ {
497
+ uri: 'entities/1cKFWhlJ',
498
+ crosswalks: [
499
+ {
500
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq9AVF',
501
+ type: 'configuration/sources/WBITV',
502
+ ownerType: 'entity',
503
+ value: 'WBITV0.9259778297966543'
504
+ },
505
+ {
506
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq9ElV',
507
+ type: 'configuration/sources/IPM',
508
+ ownerType: 'entity',
509
+ value: 'IPM0.3432023575014225'
510
+ },
511
+ {
512
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq9VoX',
513
+ type: 'configuration/sources/OASIS',
514
+ ownerType: 'entity',
515
+ value: 'entity-OASIS-add-0.3355654046461769'
516
+ }
517
+ ]
518
+ }
519
+ ]
520
+ }
521
+ ],
522
+ uri: 'entities/1cKFWZEn',
523
+ crosswalks: [
524
+ {
525
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8cPB',
526
+ type: 'configuration/sources/GATOR',
527
+ ownerType: 'entity',
528
+ value: 'GATOR0.9166192530049697'
529
+ },
530
+ {
531
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8gfR',
532
+ type: 'configuration/sources/MSB',
533
+ ownerType: 'entity',
534
+ value: 'MSB0.03738339974066107'
535
+ },
536
+ {
537
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8xiT',
538
+ type: 'configuration/sources/OASIS',
539
+ ownerType: 'entity',
540
+ value: 'entity-OASIS-add-0.41368094010614664'
541
+ },
542
+ {
543
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq9ibJ',
544
+ type: 'configuration/sources/OASIS',
545
+ ownerType: 'entity',
546
+ value: 'entity-OASIS-add-0.37467660046010176'
547
+ },
548
+ {
549
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrqBR9l',
550
+ type: 'configuration/sources/OASIS',
551
+ ownerType: 'entity',
552
+ value: 'entity-OASIS-add-0.08152811655484826'
553
+ }
554
+ ]
555
+ };
556
+ const displayedCrosswalks = [
557
+ {
558
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8gfR',
559
+ type: 'configuration/sources/MSB',
560
+ value: 'MSB0.03738339974066107',
561
+ attributes: ['entities/1cKFWZEn/attributes/FirstName/4kcrq8Y8v']
562
+ },
563
+ {
564
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8cPB',
565
+ type: 'configuration/sources/GATOR',
566
+ value: 'GATOR0.9166192530049697',
567
+ attributes: ['entities/1cKFWZEn/attributes/FirstName/4kcrq8Y8v']
568
+ }
569
+ ];
570
+ expect(getSankeyData(crosswalkTree, entityLabel, displayedCrosswalks)).toEqual({
571
+ links: [
572
+ {
573
+ crosswalk: {
574
+ ownerType: 'entity',
575
+ type: 'configuration/sources/GATOR',
576
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8cPB',
577
+ uuid: 1,
578
+ value: 'GATOR0.9166192530049697'
579
+ },
580
+ source: {
581
+ entity: {
582
+ crosswalks: [
583
+ {
584
+ ownerType: 'entity',
585
+ type: 'configuration/sources/GATOR',
586
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8cPB',
587
+ uuid: 1,
588
+ value: 'GATOR0.9166192530049697'
589
+ },
590
+ {
591
+ ownerType: 'entity',
592
+ type: 'configuration/sources/MSB',
593
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8gfR',
594
+ uuid: 2,
595
+ value: 'MSB0.03738339974066107'
596
+ }
597
+ ],
598
+ merges: [
599
+ {
600
+ losers: [
601
+ {
602
+ crosswalks: [],
603
+ merges: [
604
+ {
605
+ losers: [
606
+ {
607
+ crosswalks: [],
608
+ uri: 'entities/278VRT8x'
609
+ }
610
+ ],
611
+ time: 1638790857843
612
+ }
613
+ ],
614
+ uri: 'entities/278VR7pf'
615
+ }
616
+ ],
617
+ time: 1638790859683
618
+ },
619
+ {
620
+ losers: [
621
+ {
622
+ crosswalks: [],
623
+ uri: 'entities/1cKFWhlJ'
624
+ }
625
+ ],
626
+ time: 1638790850856
627
+ }
628
+ ],
629
+ uri: 'entities/1cKFWZEn'
630
+ },
631
+ name: 'entities/1cKFWZEn',
632
+ time: rootMergeDate
633
+ },
634
+ target: {
635
+ entity: {
636
+ crosswalks: [],
637
+ label: 'entityLabel',
638
+ merges: [
639
+ {
640
+ losers: [
641
+ {
642
+ crosswalks: [
643
+ {
644
+ ownerType: 'entity',
645
+ type: 'configuration/sources/GATOR',
646
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8cPB',
647
+ uuid: 1,
648
+ value: 'GATOR0.9166192530049697'
649
+ },
650
+ {
651
+ ownerType: 'entity',
652
+ type: 'configuration/sources/MSB',
653
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8gfR',
654
+ uuid: 2,
655
+ value: 'MSB0.03738339974066107'
656
+ }
657
+ ],
658
+ merges: [
659
+ {
660
+ losers: [
661
+ {
662
+ crosswalks: [],
663
+ merges: [
664
+ {
665
+ losers: [
666
+ {
667
+ crosswalks: [],
668
+ uri: 'entities/278VRT8x'
669
+ }
670
+ ],
671
+ time: 1638790857843
672
+ }
673
+ ],
674
+ uri: 'entities/278VR7pf'
675
+ }
676
+ ],
677
+ time: 1638790859683
678
+ },
679
+ {
680
+ losers: [
681
+ {
682
+ crosswalks: [],
683
+ uri: 'entities/1cKFWhlJ'
684
+ }
685
+ ],
686
+ time: 1638790850856
687
+ }
688
+ ],
689
+ uri: 'entities/1cKFWZEn'
690
+ }
691
+ ],
692
+ time: rootMergeDate
693
+ }
694
+ ],
695
+ uri: 'ROOT'
696
+ },
697
+ label: 'entityLabel',
698
+ name: 'ROOT',
699
+ time: rootDate
700
+ },
701
+ value: 10
702
+ },
703
+ {
704
+ crosswalk: {
705
+ ownerType: 'entity',
706
+ type: 'configuration/sources/MSB',
707
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8gfR',
708
+ uuid: 2,
709
+ value: 'MSB0.03738339974066107'
710
+ },
711
+ source: {
712
+ entity: {
713
+ crosswalks: [
714
+ {
715
+ ownerType: 'entity',
716
+ type: 'configuration/sources/GATOR',
717
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8cPB',
718
+ uuid: 1,
719
+ value: 'GATOR0.9166192530049697'
720
+ },
721
+ {
722
+ ownerType: 'entity',
723
+ type: 'configuration/sources/MSB',
724
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8gfR',
725
+ uuid: 2,
726
+ value: 'MSB0.03738339974066107'
727
+ }
728
+ ],
729
+ merges: [
730
+ {
731
+ losers: [
732
+ {
733
+ crosswalks: [],
734
+ merges: [
735
+ {
736
+ losers: [
737
+ {
738
+ crosswalks: [],
739
+ uri: 'entities/278VRT8x'
740
+ }
741
+ ],
742
+ time: 1638790857843
743
+ }
744
+ ],
745
+ uri: 'entities/278VR7pf'
746
+ }
747
+ ],
748
+ time: 1638790859683
749
+ },
750
+ {
751
+ losers: [
752
+ {
753
+ crosswalks: [],
754
+ uri: 'entities/1cKFWhlJ'
755
+ }
756
+ ],
757
+ time: 1638790850856
758
+ }
759
+ ],
760
+ uri: 'entities/1cKFWZEn'
761
+ },
762
+ name: 'entities/1cKFWZEn',
763
+ time: rootMergeDate
764
+ },
765
+ target: {
766
+ entity: {
767
+ crosswalks: [],
768
+ label: 'entityLabel',
769
+ merges: [
770
+ {
771
+ losers: [
772
+ {
773
+ crosswalks: [
774
+ {
775
+ ownerType: 'entity',
776
+ type: 'configuration/sources/GATOR',
777
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8cPB',
778
+ uuid: 1,
779
+ value: 'GATOR0.9166192530049697'
780
+ },
781
+ {
782
+ ownerType: 'entity',
783
+ type: 'configuration/sources/MSB',
784
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8gfR',
785
+ uuid: 2,
786
+ value: 'MSB0.03738339974066107'
787
+ }
788
+ ],
789
+ merges: [
790
+ {
791
+ losers: [
792
+ {
793
+ crosswalks: [],
794
+ merges: [
795
+ {
796
+ losers: [
797
+ {
798
+ crosswalks: [],
799
+ uri: 'entities/278VRT8x'
800
+ }
801
+ ],
802
+ time: 1638790857843
803
+ }
804
+ ],
805
+ uri: 'entities/278VR7pf'
806
+ }
807
+ ],
808
+ time: 1638790859683
809
+ },
810
+ {
811
+ losers: [
812
+ {
813
+ crosswalks: [],
814
+ uri: 'entities/1cKFWhlJ'
815
+ }
816
+ ],
817
+ time: 1638790850856
818
+ }
819
+ ],
820
+ uri: 'entities/1cKFWZEn'
821
+ }
822
+ ],
823
+ time: rootMergeDate
824
+ }
825
+ ],
826
+ uri: 'ROOT'
827
+ },
828
+ label: 'entityLabel',
829
+ name: 'ROOT',
830
+ time: rootDate
831
+ },
832
+ value: 10
833
+ }
834
+ ],
835
+ nodes: [
836
+ {
837
+ entity: {
838
+ crosswalks: [],
839
+ label: 'entityLabel',
840
+ merges: [
841
+ {
842
+ losers: [
843
+ {
844
+ crosswalks: [
845
+ {
846
+ ownerType: 'entity',
847
+ type: 'configuration/sources/GATOR',
848
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8cPB',
849
+ uuid: 1,
850
+ value: 'GATOR0.9166192530049697'
851
+ },
852
+ {
853
+ ownerType: 'entity',
854
+ type: 'configuration/sources/MSB',
855
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8gfR',
856
+ uuid: 2,
857
+ value: 'MSB0.03738339974066107'
858
+ }
859
+ ],
860
+ merges: [
861
+ {
862
+ losers: [
863
+ {
864
+ crosswalks: [],
865
+ merges: [
866
+ {
867
+ losers: [
868
+ {
869
+ crosswalks: [],
870
+ uri: 'entities/278VRT8x'
871
+ }
872
+ ],
873
+ time: 1638790857843
874
+ }
875
+ ],
876
+ uri: 'entities/278VR7pf'
877
+ }
878
+ ],
879
+ time: 1638790859683
880
+ },
881
+ {
882
+ losers: [
883
+ {
884
+ crosswalks: [],
885
+ uri: 'entities/1cKFWhlJ'
886
+ }
887
+ ],
888
+ time: 1638790850856
889
+ }
890
+ ],
891
+ uri: 'entities/1cKFWZEn'
892
+ }
893
+ ],
894
+ time: rootMergeDate
895
+ }
896
+ ],
897
+ uri: 'ROOT'
898
+ },
899
+ label: 'entityLabel',
900
+ name: 'ROOT',
901
+ time: rootDate
902
+ },
903
+ {
904
+ entity: {
905
+ crosswalks: [
906
+ {
907
+ ownerType: 'entity',
908
+ type: 'configuration/sources/GATOR',
909
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8cPB',
910
+ uuid: 1,
911
+ value: 'GATOR0.9166192530049697'
912
+ },
913
+ {
914
+ ownerType: 'entity',
915
+ type: 'configuration/sources/MSB',
916
+ uri: 'entities/1cKFWZEn/crosswalks/4kcrq8gfR',
917
+ uuid: 2,
918
+ value: 'MSB0.03738339974066107'
919
+ }
920
+ ],
921
+ merges: [
922
+ {
923
+ losers: [
924
+ {
925
+ crosswalks: [],
926
+ merges: [
927
+ {
928
+ losers: [
929
+ {
930
+ crosswalks: [],
931
+ uri: 'entities/278VRT8x'
932
+ }
933
+ ],
934
+ time: 1638790857843
935
+ }
936
+ ],
937
+ uri: 'entities/278VR7pf'
938
+ }
939
+ ],
940
+ time: 1638790859683
941
+ },
942
+ {
943
+ losers: [
944
+ {
945
+ crosswalks: [],
946
+ uri: 'entities/1cKFWhlJ'
947
+ }
948
+ ],
949
+ time: 1638790850856
950
+ }
951
+ ],
952
+ uri: 'entities/1cKFWZEn'
953
+ },
954
+ name: 'entities/1cKFWZEn',
955
+ time: rootMergeDate
956
+ }
957
+ ]
958
+ });
959
+ });
960
+ });
961
+ });