@reltio/components 1.4.2211 → 1.4.2213

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 (51) hide show
  1. package/AttributesErrorsPanel/AttributesErrorsPanel.d.ts +2 -1
  2. package/AttributesErrorsPanel/AttributesErrorsPanel.js +5 -5
  3. package/AttributesErrorsPanel/components/Error/AttributeErrorItem.d.ts +8 -0
  4. package/AttributesErrorsPanel/components/Error/{Error.js → AttributeErrorItem.js} +4 -4
  5. package/AttributesErrorsPanel/components/Error/{Error.test.js → AttributeErrorItem.test.js} +3 -3
  6. package/AttributesErrorsPanel/components/Error/index.d.ts +1 -1
  7. package/AttributesErrorsPanel/components/Error/index.js +1 -1
  8. package/AttributesErrorsPanel/components/ErrorsPanel/ErrorsPanel.d.ts +2 -1
  9. package/AttributesErrorsPanel/components/ErrorsPanel/ErrorsPanel.js +3 -2
  10. package/ReadOnlyAttributesPager/ReadOnlyAttributesPager.test.js +30 -11
  11. package/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.js +10 -2
  12. package/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.test.js +9 -2
  13. package/cjs/AttributesErrorsPanel/AttributesErrorsPanel.d.ts +2 -1
  14. package/cjs/AttributesErrorsPanel/AttributesErrorsPanel.js +4 -4
  15. package/cjs/AttributesErrorsPanel/components/Error/AttributeErrorItem.d.ts +8 -0
  16. package/cjs/AttributesErrorsPanel/components/Error/{Error.js → AttributeErrorItem.js} +5 -5
  17. package/cjs/AttributesErrorsPanel/components/Error/{Error.test.js → AttributeErrorItem.test.js} +3 -3
  18. package/cjs/AttributesErrorsPanel/components/Error/index.d.ts +1 -1
  19. package/cjs/AttributesErrorsPanel/components/Error/index.js +3 -3
  20. package/cjs/AttributesErrorsPanel/components/ErrorsPanel/ErrorsPanel.d.ts +2 -1
  21. package/cjs/AttributesErrorsPanel/components/ErrorsPanel/ErrorsPanel.js +3 -2
  22. package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.test.js +30 -11
  23. package/cjs/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.js +9 -1
  24. package/cjs/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.test.js +9 -2
  25. package/cjs/features/workflow/ReviewDCRDialog/DCRErrorsPanel/DCRErrorsPanel.js +1 -1
  26. package/cjs/features/workflow/helpers/attributes.test.js +22 -18
  27. package/cjs/features/workflow/helpers/merge.test.js +26 -20
  28. package/cjs/features/workflow/helpers/metadata.test-data.d.ts +1 -1
  29. package/cjs/features/workflow/helpers/metadata.test-data.js +149 -3
  30. package/cjs/features/workflow/helpers/validation.js +0 -1
  31. package/cjs/features/workflow/helpers/validation.test-data.d.ts +14 -0
  32. package/cjs/features/workflow/helpers/validation.test-data.js +508 -0
  33. package/cjs/features/workflow/helpers/validation.test.d.ts +1 -0
  34. package/cjs/features/workflow/helpers/validation.test.js +257 -0
  35. package/cjs/features/workflow/hooks/useDCRValidation.js +1 -1
  36. package/features/workflow/ReviewDCRDialog/DCRErrorsPanel/DCRErrorsPanel.js +1 -1
  37. package/features/workflow/helpers/attributes.test.js +5 -1
  38. package/features/workflow/helpers/merge.test.js +7 -1
  39. package/features/workflow/helpers/metadata.test-data.d.ts +1 -1
  40. package/features/workflow/helpers/metadata.test-data.js +147 -2
  41. package/features/workflow/helpers/validation.js +0 -1
  42. package/features/workflow/helpers/validation.test-data.d.ts +14 -0
  43. package/features/workflow/helpers/validation.test-data.js +498 -0
  44. package/features/workflow/helpers/validation.test.d.ts +1 -0
  45. package/features/workflow/helpers/validation.test.js +255 -0
  46. package/features/workflow/hooks/useDCRValidation.js +1 -1
  47. package/package.json +2 -2
  48. package/AttributesErrorsPanel/components/Error/Error.d.ts +0 -7
  49. package/cjs/AttributesErrorsPanel/components/Error/Error.d.ts +0 -7
  50. /package/AttributesErrorsPanel/components/Error/{Error.test.d.ts → AttributeErrorItem.test.d.ts} +0 -0
  51. /package/cjs/AttributesErrorsPanel/components/Error/{Error.test.d.ts → AttributeErrorItem.test.d.ts} +0 -0
@@ -0,0 +1,498 @@
1
+ import { DCRTypes } from '@reltio/mdm-sdk';
2
+ export var getChanges = function () { return ({
3
+ 'entities/entityUri1': [
4
+ {
5
+ id: '0IEmjjX',
6
+ type: DCRTypes.UPDATE_ATTRIBUTE,
7
+ createdTime: 1762297960487,
8
+ createdBy: 'ivan.kositsin',
9
+ objectType: 'configuration/entityTypes/HCP',
10
+ attributePath: 'NestedAttr/2BNyTheu/Int/2BNyTlvA',
11
+ oldValue: {
12
+ value: '1234'
13
+ },
14
+ newValue: {
15
+ value: '4321'
16
+ },
17
+ crosswalk: {
18
+ type: 'configuration/sources/Reltio',
19
+ value: 'entityUri1',
20
+ dataProvider: true
21
+ },
22
+ newPinOrIgnoreValue: false,
23
+ attributeType: 'configuration/entityTypes/HCP/attributes/NestedAttr/attributes/Int'
24
+ },
25
+ {
26
+ id: '0SBmZIW',
27
+ type: DCRTypes.UPDATE_ATTRIBUTE,
28
+ createdTime: 1761922840650,
29
+ createdBy: 'ivan.kositsin',
30
+ objectType: 'configuration/entityTypes/HCP',
31
+ attributePath: 'FirstName/2QHFlPPP',
32
+ oldValue: {
33
+ value: 'Oldfirstname'
34
+ },
35
+ newValue: {
36
+ value: 'Newfirstname'
37
+ },
38
+ crosswalk: {
39
+ type: 'configuration/sources/Reltio',
40
+ value: 'entityUri1',
41
+ dataProvider: true
42
+ },
43
+ newPinOrIgnoreValue: false,
44
+ attributeType: 'configuration/entityTypes/HCP/attributes/FirstName'
45
+ },
46
+ {
47
+ id: '0SBmdYm',
48
+ type: DCRTypes.DELETE_ATTRIBUTE,
49
+ createdTime: 1761922840650,
50
+ createdBy: 'ivan.kositsin',
51
+ objectType: 'configuration/entityTypes/HCP',
52
+ attributePath: 'Boolean/2DEYFcfk',
53
+ oldValue: {
54
+ value: 'false'
55
+ },
56
+ newValue: {
57
+ value: 'false'
58
+ },
59
+ crosswalk: {
60
+ type: 'configuration/sources/Reltio',
61
+ value: '0Q4Djk0',
62
+ dataProvider: true
63
+ },
64
+ newPinOrIgnoreValue: false,
65
+ attributeType: 'configuration/entityTypes/HCP/attributes/Boolean'
66
+ },
67
+ {
68
+ id: '0SBmhp2',
69
+ type: DCRTypes.DELETE_ATTRIBUTE,
70
+ createdTime: 1761922840650,
71
+ createdBy: 'ivan.kositsin',
72
+ objectType: 'configuration/entityTypes/HCP',
73
+ attributePath: 'Specialities/21aeo3RN',
74
+ oldValue: {
75
+ value: {
76
+ SpecialityStatus: [
77
+ {
78
+ value: 'ACTIVE'
79
+ }
80
+ ],
81
+ PrimarySpecialityInd: [
82
+ {
83
+ value: 'false'
84
+ }
85
+ ]
86
+ }
87
+ },
88
+ newValue: {
89
+ value: {
90
+ SpecialityStatus: [
91
+ {
92
+ value: 'ACTIVE'
93
+ }
94
+ ],
95
+ PrimarySpecialityInd: [
96
+ {
97
+ value: 'false'
98
+ }
99
+ ]
100
+ }
101
+ },
102
+ crosswalk: {
103
+ type: 'configuration/sources/Reltio',
104
+ value: '0Q4Djk0'
105
+ },
106
+ newPinOrIgnoreValue: false,
107
+ attributeType: 'configuration/entityTypes/HCP/attributes/Specialities'
108
+ },
109
+ {
110
+ id: '0SBn7Oa',
111
+ type: DCRTypes.INSERT_ATTRIBUTE,
112
+ createdTime: 1761922840650,
113
+ createdBy: 'ivan.kositsin',
114
+ objectType: 'configuration/entityTypes/HCP',
115
+ attributePath: 'Specialities',
116
+ newValue: {
117
+ value: {
118
+ RelLastUpdateNested: [
119
+ {
120
+ value: '2025-10-16T01:00:00.000+0000'
121
+ }
122
+ ],
123
+ PrimarySpecialityInd: [
124
+ {
125
+ value: 'true'
126
+ }
127
+ ]
128
+ }
129
+ },
130
+ crosswalk: {
131
+ type: 'configuration/sources/Reltio',
132
+ value: 'entityUri1'
133
+ },
134
+ newPinOrIgnoreValue: false,
135
+ attributeType: 'configuration/entityTypes/HCP/attributes/Specialities'
136
+ },
137
+ {
138
+ id: '0SBmubo',
139
+ refObjectURI: 'relations/0HfPK9G',
140
+ type: DCRTypes.INSERT_ATTRIBUTE,
141
+ createdTime: 1761922840650,
142
+ createdBy: 'ivan.kositsin',
143
+ objectType: 'configuration/entityTypes/HCP',
144
+ attributePath: 'InternalPostCode',
145
+ newValue: {
146
+ value: '2345'
147
+ },
148
+ crosswalk: {
149
+ type: 'configuration/sources/Reltio',
150
+ value: '0HfPK9G',
151
+ dataProvider: true
152
+ },
153
+ newPinOrIgnoreValue: false,
154
+ attributeType: 'configuration/relationTypes/HasAddress/attributes/InternalPostCode',
155
+ refAttributeType: 'configuration/entityTypes/HCP/attributes/Address/attributes/InternalPostCode'
156
+ },
157
+ {
158
+ id: '0SBmqLY',
159
+ refObjectURI: 'relations/0HfPK9G',
160
+ type: DCRTypes.DELETE_ATTRIBUTE,
161
+ createdTime: 1761922840650,
162
+ createdBy: 'ivan.kositsin',
163
+ objectType: 'configuration/entityTypes/HCP',
164
+ attributePath: 'InternalPostCode/2GMCNw4E',
165
+ oldValue: {
166
+ value: '345'
167
+ },
168
+ newValue: {
169
+ value: '345'
170
+ },
171
+ crosswalk: {
172
+ type: 'configuration/sources/Reltio',
173
+ value: '0HfPK9G',
174
+ dataProvider: true
175
+ },
176
+ newPinOrIgnoreValue: false,
177
+ attributeType: 'configuration/relationTypes/HasAddress/attributes/InternalPostCode',
178
+ refAttributeType: 'configuration/entityTypes/HCP/attributes/Address/attributes/InternalPostCode'
179
+ },
180
+ {
181
+ id: '0SBmys4',
182
+ type: DCRTypes.INSERT_ATTRIBUTE,
183
+ createdTime: 1761922840650,
184
+ createdBy: 'ivan.kositsin',
185
+ objectType: 'configuration/entityTypes/HCP',
186
+ attributePath: 'Boolean',
187
+ newValue: {
188
+ value: 'true'
189
+ },
190
+ crosswalk: {
191
+ type: 'configuration/sources/Reltio',
192
+ value: 'entityUri1',
193
+ dataProvider: true
194
+ },
195
+ newPinOrIgnoreValue: false,
196
+ attributeType: 'configuration/entityTypes/HCP/attributes/Boolean'
197
+ }
198
+ ],
199
+ 'relations/0pSTmm8': [
200
+ {
201
+ id: '0MCLpVw',
202
+ type: DCRTypes.CREATE_RELATIONSHIP,
203
+ createdTime: 1760522159435,
204
+ createdBy: 'ivan.kositsin',
205
+ objectType: 'configuration/relationTypes/HCPtoHCA',
206
+ newValue: {
207
+ uri: 'relations/0pSTmm8',
208
+ type: 'configuration/relationTypes/HCPtoHCA',
209
+ attributes: {
210
+ NestedAttr: [
211
+ {
212
+ value: {
213
+ SubAttr: [
214
+ {
215
+ value: 'SubAttrValue'
216
+ }
217
+ ]
218
+ }
219
+ }
220
+ ]
221
+ },
222
+ crosswalks: [
223
+ {
224
+ type: 'configuration/sources/Reltio',
225
+ value: '0pSTmm8',
226
+ dataProvider: true
227
+ }
228
+ ],
229
+ startObject: {
230
+ objectURI: 'entities/entityUri1'
231
+ },
232
+ endObject: {
233
+ objectURI: 'entities/1xSJGMU'
234
+ }
235
+ }
236
+ }
237
+ ],
238
+ 'entities/entityUri2': [
239
+ {
240
+ id: '0IEiwoe',
241
+ type: DCRTypes.CREATE_ENTITY,
242
+ createdTime: 1760522158678,
243
+ createdBy: 'ivan.kositsin',
244
+ objectType: 'configuration/entityTypes/HCO',
245
+ newValue: {
246
+ uri: 'entities/1P2V7EO',
247
+ type: 'configuration/entityTypes/HCO',
248
+ attributes: {
249
+ Name: [
250
+ {
251
+ value: 'test'
252
+ }
253
+ ],
254
+ ContactInfo: [
255
+ {
256
+ value: {
257
+ Email: [
258
+ {
259
+ value: 'test@example.com'
260
+ }
261
+ ]
262
+ }
263
+ }
264
+ ]
265
+ },
266
+ isFavorite: false,
267
+ crosswalks: [
268
+ {
269
+ type: 'configuration/sources/Reltio',
270
+ value: '1P2V7EO',
271
+ dataProvider: true
272
+ }
273
+ ],
274
+ analyticsAttributes: {}
275
+ }
276
+ }
277
+ ]
278
+ }); };
279
+ export var getEntitiesOrRelations = function () { return ({
280
+ 'entities/entityUri1': {
281
+ uri: 'entities/entityUri1',
282
+ type: 'configuration/entityTypes/HCP',
283
+ createdBy: 'ivan.kositsin',
284
+ createdTime: 1744023930390,
285
+ updatedBy: 'ivan.kositsin',
286
+ updatedTime: 1761826606973,
287
+ startDate: 1761001200000,
288
+ attributes: {
289
+ FirstName: [
290
+ {
291
+ type: 'configuration/entityTypes/HCP/attributes/FirstName',
292
+ ov: true,
293
+ value: 'someValue',
294
+ uri: 'entities/entityUri1/attributes/FirstName/2QHFlPPP'
295
+ }
296
+ ],
297
+ Boolean: [
298
+ {
299
+ type: 'configuration/entityTypes/HCP/attributes/Boolean',
300
+ ov: true,
301
+ value: 'false',
302
+ uri: 'entities/entityUri1/attributes/Boolean/2DEYFcfk'
303
+ }
304
+ ],
305
+ Specialities: [
306
+ {
307
+ label: '- Статус: ACTI - Индикатор: false',
308
+ value: {
309
+ SpecialityStatus: [
310
+ {
311
+ type: 'configuration/entityTypes/HCP/attributes/Specialities/attributes/SpecialityStatus',
312
+ ov: true,
313
+ value: 'ACTI',
314
+ uri: 'entities/entityUri1/attributes/Specialities/21aeo3RN/SpecialityStatus/21aeo7hd'
315
+ }
316
+ ],
317
+ PrimarySpecialityInd: [
318
+ {
319
+ type: 'configuration/entityTypes/HCP/attributes/Specialities/attributes/PrimarySpecialityInd',
320
+ ov: true,
321
+ value: 'false',
322
+ uri: 'entities/entityUri1/attributes/Specialities/21aeo3RN/PrimarySpecialityInd/21aeoBxt'
323
+ }
324
+ ]
325
+ },
326
+ ov: true,
327
+ uri: 'entities/entityUri1/attributes/Specialities/21aeo3RN'
328
+ }
329
+ ],
330
+ Prefix: [
331
+ {
332
+ type: 'configuration/entityTypes/HCP/attributes/Prefix',
333
+ ov: true,
334
+ value: 'a',
335
+ uri: 'entities/entityUri1/attributes/Prefix/21aeoGE9'
336
+ }
337
+ ],
338
+ NestedAttr: [
339
+ {
340
+ value: {
341
+ Int: [
342
+ {
343
+ type: 'configuration/entityTypes/HCP/attributes/NestedAttr/attributes/Int',
344
+ ov: true,
345
+ value: '42',
346
+ uri: 'entities/entityUri1/attributes/NestedAttr/2BNyTheu/Int/2BNyTlvA'
347
+ }
348
+ ]
349
+ },
350
+ ov: true,
351
+ uri: 'entities/entityUri1/attributes/NestedAttr/2BNyTheu'
352
+ }
353
+ ],
354
+ Address: [
355
+ {
356
+ label: 'Have a rest',
357
+ relationshipLabel: '',
358
+ value: {
359
+ InternalPostCode: [
360
+ {
361
+ type: 'configuration/relationTypes/HasAddress/attributes/InternalPostCode',
362
+ ov: true,
363
+ value: '222',
364
+ uri: 'entities/entityUri1/attributes/Address/0HfPK9G/InternalPostCode/2GMCNw4E'
365
+ }
366
+ ]
367
+ },
368
+ ov: true,
369
+ uri: 'entities/entityUri1/attributes/Address/0HfPK9G',
370
+ refEntity: {
371
+ type: 'configuration/entityTypes/Location',
372
+ crosswalks: [],
373
+ objectURI: 'entities/0DIuojy'
374
+ },
375
+ refRelation: {
376
+ type: 'configuration/relationTypes/HasAddress',
377
+ crosswalks: [
378
+ {
379
+ uri: 'entities/entityUri1/crosswalks/0HfPK9G.2GMCOPu2',
380
+ type: 'configuration/sources/Reltio',
381
+ value: '0HfPK9G',
382
+ createDate: '2025-09-30T16:05:35.290Z',
383
+ updateDate: '2025-09-30T16:05:35.290Z',
384
+ attributeURIs: [
385
+ 'entities/entityUri1/attributes/Address/0HfPK9G/InternalPostCode/2GMCNw4E',
386
+ 'entities/entityUri1/attributes/Address/0HfPK9G'
387
+ ]
388
+ }
389
+ ],
390
+ startRefPinned: false,
391
+ endRefPinned: false,
392
+ startRefIgnored: false,
393
+ endRefIgnored: false,
394
+ objectURI: 'relations/0HfPK9G'
395
+ }
396
+ }
397
+ ]
398
+ },
399
+ roles: [],
400
+ crosswalks: [],
401
+ analyticsAttributes: {},
402
+ tags: [],
403
+ label: '',
404
+ secondaryLabel: ''
405
+ },
406
+ 'relations/0HfPK9G': {
407
+ uri: 'relations/0HfPK9G',
408
+ type: 'configuration/relationTypes/HasAddress',
409
+ attributes: {
410
+ InternalPostCode: [
411
+ {
412
+ type: 'configuration/relationTypes/HasAddress/attributes/InternalPostCode',
413
+ ov: true,
414
+ value: '222',
415
+ uri: 'entities/entityUri1/attributes/Address/0HfPK9G/InternalPostCode/2GMCNw4E'
416
+ }
417
+ ]
418
+ }
419
+ }
420
+ }); };
421
+ export var getUserChanges = function () { return [
422
+ {
423
+ lineId: 'entityUri1/0SBmys4/newValue',
424
+ data: {
425
+ isRejected: true
426
+ }
427
+ },
428
+ {
429
+ lineId: 'entityUri1/0SBmZIW/newValue',
430
+ data: {
431
+ value: {
432
+ value: ''
433
+ }
434
+ }
435
+ },
436
+ {
437
+ lineId: 'entityUri1/0SBn7Oa/newValue/value/PrimarySpecialityInd/0',
438
+ data: {
439
+ isRejected: true
440
+ }
441
+ },
442
+ {
443
+ lineId: 'entityUri1/0SBmubo/newValue',
444
+ data: {
445
+ isRejected: true
446
+ }
447
+ }
448
+ ]; };
449
+ export var getUserChangesRejectSubnestedAttributes = function () { return [
450
+ {
451
+ lineId: 'entityUri1/0SBn7Oa/newValue/value/PrimarySpecialityInd/0',
452
+ data: {
453
+ isRejected: true
454
+ }
455
+ },
456
+ {
457
+ lineId: 'entityUri1/0SBn7Oa/newValue/value/RelLastUpdateNested/0',
458
+ data: {
459
+ isRejected: true
460
+ }
461
+ }
462
+ ]; };
463
+ export var getUserChangesRejectSubnestedRelationAttributes = function () { return [
464
+ {
465
+ lineId: '0pSTmm8/0MCLpVw/newValue/attributes/NestedAttr/0/value/SubAttr/0',
466
+ data: {
467
+ isRejected: true
468
+ }
469
+ }
470
+ ]; };
471
+ export var getUserChangesSubnestedEmpty = function () { return [
472
+ {
473
+ lineId: 'entityUri1/0IEmjjX/newValue',
474
+ data: {
475
+ value: {
476
+ value: ''
477
+ }
478
+ }
479
+ }
480
+ ]; };
481
+ export var getUserChangesNewEntity = function () { return [
482
+ {
483
+ lineId: 'entityUri2/0IEiwoe/newValue/attributes/Name/0',
484
+ data: {
485
+ value: {
486
+ value: ''
487
+ }
488
+ }
489
+ },
490
+ {
491
+ lineId: 'entityUri2/0IEiwoe/newValue/attributes/ContactInfo/0/value/Email/0',
492
+ data: {
493
+ value: {
494
+ value: ''
495
+ }
496
+ }
497
+ }
498
+ ]; };
@@ -0,0 +1 @@
1
+ export {};