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