@reltio/components 1.4.2200 → 1.4.2202
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.
- package/ProfileResizablePanes/ProfileResizablePanes.js +1 -1
- package/ProfileResizablePanes/ProfileResizablePanes.spec.js +16 -2
- package/RequestedData/RequestedData.d.ts +12 -0
- package/RequestedData/RequestedData.js +26 -0
- package/RequestedData/RequestedData.module.css.js +9 -0
- package/RequestedData/index.d.ts +1 -0
- package/RequestedData/index.js +1 -0
- package/cjs/ProfileResizablePanes/ProfileResizablePanes.js +1 -1
- package/cjs/ProfileResizablePanes/ProfileResizablePanes.spec.js +16 -2
- package/cjs/RequestedData/RequestedData.d.ts +12 -0
- package/cjs/RequestedData/RequestedData.js +33 -0
- package/cjs/RequestedData/RequestedData.module.css.js +9 -0
- package/cjs/RequestedData/index.d.ts +1 -0
- package/cjs/RequestedData/index.js +5 -0
- package/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.js +5 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/InteractionActivity/InteractionActivity.d.ts +8 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/InteractionActivity/InteractionActivity.js +20 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/InteractionActivity/index.d.ts +1 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/InteractionActivity/index.js +5 -0
- package/cjs/features/activity-log/ActivityFilterEditor/helpers.test.js +3 -2
- package/cjs/features/activity-log/ActivityLog/helpers.js +1 -1
- package/cjs/features/activity-log/InteractionRecord/InteractionRecord.d.ts +7 -0
- package/cjs/features/activity-log/InteractionRecord/InteractionRecord.js +17 -0
- package/cjs/features/activity-log/InteractionRecord/index.d.ts +1 -0
- package/cjs/features/activity-log/InteractionRecord/index.js +5 -0
- package/cjs/features/activity-log/types.d.ts +3 -1
- package/cjs/features/activity-log/types.js +2 -0
- package/cjs/features/activity-log/utils/activities.js +2 -0
- package/cjs/features/history/types.d.ts +2 -0
- package/cjs/features/workflow/ChangeRequestEditor/ChangeRequestEditor.js +36 -3
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.d.ts +1 -3
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.js +15 -6
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditor.d.ts +4 -3
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditor.js +2 -28
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditorFactory.d.ts +4 -3
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditorFactory.js +11 -3
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.d.ts +2 -3
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.js +5 -5
- package/cjs/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.d.ts +2 -2
- package/cjs/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.js +2 -28
- package/cjs/features/workflow/ChangeRequestEditor/context/index.d.ts +20 -0
- package/cjs/features/workflow/ChangeRequestEditor/context/index.js +76 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/helper.test.d.ts +1 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/helper.test.js +237 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/helpers.d.ts +4 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/helpers.js +105 -0
- package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +3 -1
- package/cjs/features/workflow/helpers/attributes.js +14 -3
- package/cjs/features/workflow/helpers/attributes.test.js +29 -7
- package/cjs/features/workflow/helpers/merge.d.ts +3 -2
- package/cjs/features/workflow/helpers/merge.js +62 -18
- package/cjs/features/workflow/helpers/merge.test.js +56 -2
- package/cjs/features/workflow/hooks/useChangesList.d.ts +2 -2
- package/cjs/features/workflow/types.d.ts +4 -3
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +6 -4
- package/features/activity-log/ActivitiesFactory/ActivitiesFactory.js +5 -0
- package/features/activity-log/ActivitiesFactory/components/InteractionActivity/InteractionActivity.d.ts +8 -0
- package/features/activity-log/ActivitiesFactory/components/InteractionActivity/InteractionActivity.js +13 -0
- package/features/activity-log/ActivitiesFactory/components/InteractionActivity/index.d.ts +1 -0
- package/features/activity-log/ActivitiesFactory/components/InteractionActivity/index.js +1 -0
- package/features/activity-log/ActivityFilterEditor/helpers.test.js +3 -2
- package/features/activity-log/ActivityLog/helpers.js +1 -1
- package/features/activity-log/InteractionRecord/InteractionRecord.d.ts +7 -0
- package/features/activity-log/InteractionRecord/InteractionRecord.js +10 -0
- package/features/activity-log/InteractionRecord/index.d.ts +1 -0
- package/features/activity-log/InteractionRecord/index.js +1 -0
- package/features/activity-log/types.d.ts +3 -1
- package/features/activity-log/types.js +2 -0
- package/features/activity-log/utils/activities.js +2 -0
- package/features/history/types.d.ts +2 -0
- package/features/workflow/ChangeRequestEditor/ChangeRequestEditor.js +13 -3
- package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.d.ts +1 -3
- package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.js +15 -6
- package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditor.d.ts +4 -3
- package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditor.js +2 -5
- package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditorFactory.d.ts +4 -3
- package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditorFactory.js +13 -5
- package/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.d.ts +2 -3
- package/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.js +6 -6
- package/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.d.ts +2 -2
- package/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.js +2 -5
- package/features/workflow/ChangeRequestEditor/context/index.d.ts +20 -0
- package/features/workflow/ChangeRequestEditor/context/index.js +49 -0
- package/features/workflow/ChangeRequestEditor/helpers/helper.test.d.ts +1 -0
- package/features/workflow/ChangeRequestEditor/helpers/helper.test.js +235 -0
- package/features/workflow/ChangeRequestEditor/helpers/helpers.d.ts +4 -0
- package/features/workflow/ChangeRequestEditor/helpers/helpers.js +100 -0
- package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +3 -1
- package/features/workflow/helpers/attributes.js +14 -3
- package/features/workflow/helpers/attributes.test.js +29 -7
- package/features/workflow/helpers/merge.d.ts +3 -2
- package/features/workflow/helpers/merge.js +60 -17
- package/features/workflow/helpers/merge.test.js +56 -2
- package/features/workflow/hooks/useChangesList.d.ts +2 -2
- package/features/workflow/types.d.ts +4 -3
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +2 -2
- package/cjs/features/workflow/ChangeRequestEditor/helpers.d.ts +0 -3
- package/cjs/features/workflow/ChangeRequestEditor/helpers.js +0 -16
- package/features/workflow/ChangeRequestEditor/helpers.d.ts +0 -3
- package/features/workflow/ChangeRequestEditor/helpers.js +0 -12
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { clone, isNil } from 'ramda';
|
|
13
|
+
import { DCROperationTypes, DCRTypes, isRelationTypeUri } from '@reltio/mdm-sdk';
|
|
14
|
+
export var isEditableChange = function (change, entityInfo) {
|
|
15
|
+
var _a;
|
|
16
|
+
var currentAttributeTypeUri = (_a = change.attributeType) === null || _a === void 0 ? void 0 : _a.uri;
|
|
17
|
+
var isExistingReferenceEntityChange = entityInfo.isExist &&
|
|
18
|
+
currentAttributeTypeUri &&
|
|
19
|
+
change.isReferenceSubAttribute &&
|
|
20
|
+
change.operation === DCROperationTypes.ADDED &&
|
|
21
|
+
!isRelationTypeUri(currentAttributeTypeUri);
|
|
22
|
+
return !!currentAttributeTypeUri && !isExistingReferenceEntityChange && !isNil(change.newValue);
|
|
23
|
+
};
|
|
24
|
+
var isPrimitiveValue = function (value) {
|
|
25
|
+
return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';
|
|
26
|
+
};
|
|
27
|
+
var addLineIdRecursively = function (value, basePath) {
|
|
28
|
+
if (value == null)
|
|
29
|
+
return value;
|
|
30
|
+
if (Array.isArray(value)) {
|
|
31
|
+
return value.map(function (entry, index) {
|
|
32
|
+
if (entry && typeof entry === 'object') {
|
|
33
|
+
var entryPath = "".concat(basePath, "/").concat(index);
|
|
34
|
+
var newEntry = clone(entry);
|
|
35
|
+
newEntry.lineIds = [entryPath];
|
|
36
|
+
var v = newEntry.value;
|
|
37
|
+
if (typeof v === 'object' && v !== null) {
|
|
38
|
+
newEntry.value = addLineIdRecursively(v, "".concat(entryPath, "/value"));
|
|
39
|
+
}
|
|
40
|
+
return newEntry;
|
|
41
|
+
}
|
|
42
|
+
return entry;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
if (typeof value === 'object') {
|
|
46
|
+
var result = {};
|
|
47
|
+
for (var _i = 0, _a = Object.entries(value); _i < _a.length; _i++) {
|
|
48
|
+
var _b = _a[_i], key = _b[0], val = _b[1];
|
|
49
|
+
var childPath = "".concat(basePath, "/").concat(key);
|
|
50
|
+
result[key] = addLineIdRecursively(val, childPath);
|
|
51
|
+
}
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
54
|
+
return value;
|
|
55
|
+
};
|
|
56
|
+
var addLineIdToChangeValue = function (container, basePath, type) {
|
|
57
|
+
if (container == null)
|
|
58
|
+
return container;
|
|
59
|
+
if ([DCRTypes.CREATE_ENTITY, DCRTypes.CREATE_RELATIONSHIP].includes(type)) {
|
|
60
|
+
var attributes = void 0;
|
|
61
|
+
if ('attributes' in container && typeof container.attributes === 'object') {
|
|
62
|
+
attributes = addLineIdRecursively(container.attributes, "".concat(basePath, "/attributes"));
|
|
63
|
+
}
|
|
64
|
+
return __assign(__assign({}, container), { attributes: attributes, lineIds: [basePath] });
|
|
65
|
+
}
|
|
66
|
+
if (Array.isArray(container)) {
|
|
67
|
+
return { value: container, lineIds: [basePath] };
|
|
68
|
+
}
|
|
69
|
+
if (typeof container === 'object' && 'value' in container) {
|
|
70
|
+
var containerValue = container.value;
|
|
71
|
+
return __assign(__assign({}, container), { lineIds: [basePath], value: isPrimitiveValue(containerValue)
|
|
72
|
+
? containerValue
|
|
73
|
+
: addLineIdRecursively(containerValue, "".concat(basePath, "/value")) });
|
|
74
|
+
}
|
|
75
|
+
return container;
|
|
76
|
+
};
|
|
77
|
+
export var addLineIdToValue = function (data) {
|
|
78
|
+
var enrichedData = clone(data);
|
|
79
|
+
for (var entityOrRelationKey in enrichedData) {
|
|
80
|
+
var entityOrRelationId = entityOrRelationKey.split('/')[1];
|
|
81
|
+
var changeList = enrichedData[entityOrRelationKey];
|
|
82
|
+
if (!Array.isArray(changeList))
|
|
83
|
+
continue;
|
|
84
|
+
for (var _i = 0, changeList_1 = changeList; _i < changeList_1.length; _i++) {
|
|
85
|
+
var change = changeList_1[_i];
|
|
86
|
+
var changeId = change.id;
|
|
87
|
+
var type = change.type;
|
|
88
|
+
if (change.newValue != null) {
|
|
89
|
+
var root = "".concat(entityOrRelationId, "/").concat(changeId, "/newValue");
|
|
90
|
+
change.newValue = addLineIdToChangeValue(change.newValue, root, type);
|
|
91
|
+
}
|
|
92
|
+
if (change.oldValue != null) {
|
|
93
|
+
var root = "".concat(entityOrRelationId, "/").concat(changeId, "/oldValue");
|
|
94
|
+
change.oldValue = addLineIdToChangeValue(change.oldValue, root, type);
|
|
95
|
+
}
|
|
96
|
+
change.lineIds = ["".concat(entityOrRelationId, "/").concat(changeId)];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return enrichedData;
|
|
100
|
+
};
|
|
@@ -9,6 +9,7 @@ import i18n from 'ui-i18n';
|
|
|
9
9
|
import { useWorkflowCheckPermission } from '../hooks/useWorkflowCheckPermission';
|
|
10
10
|
import { useWorkflowActions } from '../hooks/useWorkflowActions';
|
|
11
11
|
import { useMdmEntity } from '../../../contexts/MdmModuleContext';
|
|
12
|
+
import { ChangeRequestEditorProvider } from '../ChangeRequestEditor/context';
|
|
12
13
|
import { ProfileBand } from '../../../ProfileBand';
|
|
13
14
|
import { DueDateField } from '../DueDateField';
|
|
14
15
|
import { PrioritySelector } from '../PrioritySelector';
|
|
@@ -48,7 +49,8 @@ export var ReviewDCRDialog = function (_a) {
|
|
|
48
49
|
React.createElement("div", { className: styles.editableItem },
|
|
49
50
|
React.createElement(AssigneeSelector, { taskId: task.taskId, assignee: task.assignee, isTaskOpen: task.isOpen })))),
|
|
50
51
|
React.createElement("div", { className: styles.changesSection },
|
|
51
|
-
React.createElement(
|
|
52
|
+
React.createElement(ChangeRequestEditorProvider, null,
|
|
53
|
+
React.createElement(ChangeRequestEditor, { dcr: dcr, task: task, groupedObjects: groupedObjects })))),
|
|
52
54
|
canViewComments && (React.createElement(WorkflowComments, { workflowActions: workflowActions, actionRequestIsInProgress: actionRequestIsInProgress, preferredAction: task.preferredAction, taskId: task.taskId, processInstanceComments: task.processInstanceComments, isTaskOpen: task.isOpen, showActionButtons: false, alwaysExpanded: true, classes: {
|
|
53
55
|
container: styles.commentsRootContainer,
|
|
54
56
|
commentsContainer: styles.commentsContainer
|
|
@@ -61,19 +61,30 @@ var dcrAttributesFactory = function (metadata, attributeType, attributeValue, le
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
+
var extractLineIds = function (attributeValue) {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
return typeof attributeValue.value === 'object' &&
|
|
67
|
+
'newValue' in attributeValue.value &&
|
|
68
|
+
'lineIds' in attributeValue.value.newValue &&
|
|
69
|
+
Array.isArray(attributeValue.value.newValue.lineIds)
|
|
70
|
+
? (_b = (_a = attributeValue === null || attributeValue === void 0 ? void 0 : attributeValue.value) === null || _a === void 0 ? void 0 : _a.newValue) === null || _b === void 0 ? void 0 : _b.lineIds
|
|
71
|
+
: attributeValue.lineIds;
|
|
72
|
+
};
|
|
64
73
|
var getNestedAttributeChange = function (metadata, attributeType, attributeValue, level) {
|
|
65
74
|
var attributeTypeList = getAttributeTypeSubAttributes({}, attributeType);
|
|
66
75
|
var label = getLabel((attributeType === null || attributeType === void 0 ? void 0 : attributeType.label) || (attributeType === null || attributeType === void 0 ? void 0 : attributeType.name));
|
|
76
|
+
var lineIds = extractLineIds(attributeValue);
|
|
67
77
|
return [
|
|
68
|
-
{ level: level, label: label, attributeType: attributeType, attributeValue: attributeValue },
|
|
78
|
+
{ level: level, label: label, attributeType: attributeType, attributeValue: attributeValue, lineIds: lineIds },
|
|
69
79
|
getAttributesList(metadata, attributeTypeList, attributeValue.value, level + 1)
|
|
70
80
|
];
|
|
71
81
|
};
|
|
72
82
|
var getReferenceAttributeChange = function (metadata, attributeType, attributeValue, level) {
|
|
73
83
|
var attributeTypeList = getAttributeTypeSubAttributes(metadata, attributeType);
|
|
74
84
|
var label = (attributeType === null || attributeType === void 0 ? void 0 : attributeType.label) || (attributeType === null || attributeType === void 0 ? void 0 : attributeType.name);
|
|
85
|
+
var lineIds = extractLineIds(attributeValue);
|
|
75
86
|
return [
|
|
76
|
-
{ level: level, label: label, attributeType: attributeType, attributeValue: attributeValue },
|
|
87
|
+
{ level: level, label: label, attributeType: attributeType, attributeValue: attributeValue, lineIds: lineIds },
|
|
77
88
|
getAttributesList(metadata, attributeTypeList, attributeValue.value, level + 1, true)
|
|
78
89
|
];
|
|
79
90
|
};
|
|
@@ -111,7 +122,7 @@ export var getRelationChanges = curry(function (metadata, relationInfo, changes,
|
|
|
111
122
|
var relationType = getRelationType(metadata, relationInfo.type);
|
|
112
123
|
var attrTypes = getRelationAttributesList(metadata, relationInfo.type);
|
|
113
124
|
return flatten([
|
|
114
|
-
__assign({ level: 1, label: propOr('', 'label', relationType), attributeType: null, relationType: relationType, attributeValue: __assign(__assign({}, relationInfo), changes) }, addRelationOperationIfNeeded(changes, changeType)),
|
|
125
|
+
__assign({ level: 1, label: propOr('', 'label', relationType), attributeType: null, relationType: relationType, attributeValue: __assign(__assign({}, relationInfo), changes), lineIds: changes === null || changes === void 0 ? void 0 : changes.lineIds }, addRelationOperationIfNeeded(changes, changeType)),
|
|
115
126
|
getAttributesList(metadata, attrTypes, changes, 2)
|
|
116
127
|
]);
|
|
117
128
|
});
|
|
@@ -30,8 +30,20 @@ describe('attributes helpers tests', function () {
|
|
|
30
30
|
attributeType: 'configuration/entityTypes/HCA/attributes/CountryCode',
|
|
31
31
|
id: '41cb3gGy',
|
|
32
32
|
newPinOrIgnoreValue: true,
|
|
33
|
-
newValue: {
|
|
34
|
-
|
|
33
|
+
newValue: {
|
|
34
|
+
value: 'Chile',
|
|
35
|
+
lookupCode: 'CL',
|
|
36
|
+
lookupRawValue: 'Chile',
|
|
37
|
+
pin: true,
|
|
38
|
+
lineIds: ['3AqlrpfGa/value/newValue']
|
|
39
|
+
},
|
|
40
|
+
oldValue: {
|
|
41
|
+
value: 'Chile',
|
|
42
|
+
lookupCode: 'CL',
|
|
43
|
+
lookupRawValue: 'Chile',
|
|
44
|
+
pin: true,
|
|
45
|
+
lineIds: ['3AqlrpfGa/value/oldValue']
|
|
46
|
+
},
|
|
35
47
|
type: DCRTypes.IGNORE_ATTRIBUTE
|
|
36
48
|
}
|
|
37
49
|
},
|
|
@@ -42,7 +54,12 @@ describe('attributes helpers tests', function () {
|
|
|
42
54
|
attributeType: 'configuration/entityTypes/HCA/attributes/CountryCode',
|
|
43
55
|
id: '41cb3c0i',
|
|
44
56
|
newPinOrIgnoreValue: false,
|
|
45
|
-
newValue: {
|
|
57
|
+
newValue: {
|
|
58
|
+
value: 'Bahamas',
|
|
59
|
+
lookupCode: 'BS',
|
|
60
|
+
lookupRawValue: 'BS',
|
|
61
|
+
lineIds: ['uri$$1643545710682']
|
|
62
|
+
},
|
|
46
63
|
type: DCRTypes.INSERT_ATTRIBUTE
|
|
47
64
|
}
|
|
48
65
|
}
|
|
@@ -74,7 +91,7 @@ describe('attributes helpers tests', function () {
|
|
|
74
91
|
attributeType: metadata.entityTypes[0].attributes[1],
|
|
75
92
|
label: 'Country Code',
|
|
76
93
|
level: 0,
|
|
77
|
-
newValue: changes.CountryCode[0].value.newValue,
|
|
94
|
+
newValue: __assign(__assign({}, changes.CountryCode[0].value.newValue), { lineIds: ['3AqlrpfGa/value/oldValue'] }),
|
|
78
95
|
operation: 'ignored',
|
|
79
96
|
isReferenceSubAttribute: false
|
|
80
97
|
},
|
|
@@ -114,7 +131,12 @@ describe('attributes helpers tests', function () {
|
|
|
114
131
|
};
|
|
115
132
|
var changes = {
|
|
116
133
|
TestAttribute: [{ value: { newValue: '123', type: DCRTypes.INSERT_ATTRIBUTE } }],
|
|
117
|
-
'activeness.startDate': [
|
|
134
|
+
'activeness.startDate': [
|
|
135
|
+
{
|
|
136
|
+
newValue: { value: 1644001200000, lineIds: ['relations/t58vHMD/activeness/startDate/newValue'] },
|
|
137
|
+
type: DCRTypes.INSERT_ATTRIBUTE
|
|
138
|
+
}
|
|
139
|
+
]
|
|
118
140
|
};
|
|
119
141
|
it('should not show operation for relation title', function () {
|
|
120
142
|
expect(getRelationChanges(metadata, relationInfo, changes, DCRTypes.INSERT_ATTRIBUTE)).toEqual([
|
|
@@ -129,7 +151,7 @@ describe('attributes helpers tests', function () {
|
|
|
129
151
|
attributeType: EntityAttrTypes.startDate,
|
|
130
152
|
label: EntityAttrTypes.startDate.label,
|
|
131
153
|
level: 2,
|
|
132
|
-
newValue: { value: 1644001200000 },
|
|
154
|
+
newValue: { value: 1644001200000, lineIds: ['relations/t58vHMD/activeness/startDate/newValue'] },
|
|
133
155
|
operation: DCROperationTypes.ADDED,
|
|
134
156
|
isReferenceSubAttribute: false
|
|
135
157
|
},
|
|
@@ -157,7 +179,7 @@ describe('attributes helpers tests', function () {
|
|
|
157
179
|
attributeType: EntityAttrTypes.startDate,
|
|
158
180
|
label: EntityAttrTypes.startDate.label,
|
|
159
181
|
level: 2,
|
|
160
|
-
newValue: { value: 1644001200000 },
|
|
182
|
+
newValue: { value: 1644001200000, lineIds: ['relations/t58vHMD/activeness/startDate/newValue'] },
|
|
161
183
|
operation: DCROperationTypes.ADDED,
|
|
162
184
|
isReferenceSubAttribute: false
|
|
163
185
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GroupedObjectsInfo, Metadata, EnrichedDCRChanges, EnrichedChangeValue, ChangeValue, DCRChanges } from '@reltio/mdm-sdk';
|
|
2
2
|
import { Diff } from '../types';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const extractLineIds: (value: ChangeValue | EnrichedChangeValue) => string[] | undefined;
|
|
4
|
+
export declare const mergeChanges: (metadata: Metadata, changes: EnrichedDCRChanges | DCRChanges, entityInfo: GroupedObjectsInfo["entity"], relationsInfo: GroupedObjectsInfo["relations"]) => [Diff[], Diff[]];
|
|
@@ -20,18 +20,29 @@ var SPECIAL_ATTRIBUTES_NAMES = [
|
|
|
20
20
|
EntityAttrTypes.startDate.name,
|
|
21
21
|
EntityAttrTypes.endDate.name
|
|
22
22
|
];
|
|
23
|
+
export var extractLineIds = function (value) {
|
|
24
|
+
return typeof value === 'object' && 'lineIds' in value ? value.lineIds : undefined;
|
|
25
|
+
};
|
|
23
26
|
var prepareStartOrEndDate = function (_a) {
|
|
24
27
|
var newValue = _a.newValue, oldValue = _a.oldValue;
|
|
28
|
+
var actualNewValue = newValue && 'value' in newValue ? newValue.value : newValue;
|
|
29
|
+
var actualOldValue = oldValue && 'value' in oldValue ? oldValue.value : oldValue;
|
|
25
30
|
var parseValue = function (value) { return (isNaN(value) || isEmptyValue(value) ? value : parseInt(value)); };
|
|
26
31
|
var isExistedValue = function (value) { return (value === null || value === void 0 ? void 0 : value.length) && !isEmptyValue(value) && !isEmptyValue(value[0]); };
|
|
27
|
-
var isExistNewValue = isExistedValue(
|
|
28
|
-
var isExistOldValue = isExistedValue(
|
|
32
|
+
var isExistNewValue = isExistedValue(actualNewValue);
|
|
33
|
+
var isExistOldValue = isExistedValue(actualOldValue);
|
|
29
34
|
if (isExistNewValue && isExistOldValue) {
|
|
30
35
|
return [
|
|
31
36
|
{
|
|
32
37
|
type: DCRTypes.UPDATE_ATTRIBUTE,
|
|
33
|
-
oldValue: {
|
|
34
|
-
|
|
38
|
+
oldValue: {
|
|
39
|
+
value: parseValue(actualOldValue[0]),
|
|
40
|
+
lineIds: extractLineIds(oldValue)
|
|
41
|
+
},
|
|
42
|
+
newValue: {
|
|
43
|
+
value: parseValue(actualNewValue[0]),
|
|
44
|
+
lineIds: extractLineIds(newValue)
|
|
45
|
+
}
|
|
35
46
|
}
|
|
36
47
|
];
|
|
37
48
|
}
|
|
@@ -39,7 +50,10 @@ var prepareStartOrEndDate = function (_a) {
|
|
|
39
50
|
return [
|
|
40
51
|
{
|
|
41
52
|
type: DCRTypes.INSERT_ATTRIBUTE,
|
|
42
|
-
newValue: {
|
|
53
|
+
newValue: {
|
|
54
|
+
value: parseValue(actualNewValue[0]),
|
|
55
|
+
lineIds: extractLineIds(newValue)
|
|
56
|
+
}
|
|
43
57
|
}
|
|
44
58
|
];
|
|
45
59
|
}
|
|
@@ -47,26 +61,31 @@ var prepareStartOrEndDate = function (_a) {
|
|
|
47
61
|
return [
|
|
48
62
|
{
|
|
49
63
|
type: DCRTypes.DELETE_ATTRIBUTE,
|
|
50
|
-
oldValue: {
|
|
64
|
+
oldValue: {
|
|
65
|
+
value: parseValue(actualOldValue[0]),
|
|
66
|
+
lineIds: extractLineIds(oldValue)
|
|
67
|
+
}
|
|
51
68
|
}
|
|
52
69
|
];
|
|
53
70
|
}
|
|
54
71
|
};
|
|
55
72
|
var prepareRolesOrTags = function (metadata, change) {
|
|
56
73
|
var _a = change.newValue, newValue = _a === void 0 ? [] : _a, _b = change.oldValue, oldValue = _b === void 0 ? [] : _b;
|
|
57
|
-
var
|
|
58
|
-
var
|
|
74
|
+
var preparedNewValue = 'value' in newValue ? newValue.value : newValue;
|
|
75
|
+
var preparedOldValue = 'value' in oldValue ? oldValue.value : oldValue;
|
|
76
|
+
var diffNewValue = difference(preparedNewValue, preparedOldValue);
|
|
77
|
+
var diffOldValue = difference(preparedOldValue, preparedNewValue);
|
|
59
78
|
var items = [];
|
|
60
79
|
if (diffNewValue.length) {
|
|
61
80
|
items.push({
|
|
62
81
|
type: DCRTypes.INSERT_ATTRIBUTE,
|
|
63
|
-
newValue: { value: diffNewValue }
|
|
82
|
+
newValue: { value: diffNewValue, lineIds: extractLineIds(newValue) }
|
|
64
83
|
});
|
|
65
84
|
}
|
|
66
85
|
if (diffOldValue.length) {
|
|
67
86
|
items.push({
|
|
68
87
|
type: DCRTypes.DELETE_ATTRIBUTE,
|
|
69
|
-
oldValue: { value: diffOldValue }
|
|
88
|
+
oldValue: { value: diffOldValue, lineIds: extractLineIds(oldValue) }
|
|
70
89
|
});
|
|
71
90
|
}
|
|
72
91
|
return items;
|
|
@@ -82,7 +101,7 @@ var getPath = function (change) {
|
|
|
82
101
|
return path;
|
|
83
102
|
};
|
|
84
103
|
var prepareAttribute = function (container, change) {
|
|
85
|
-
var _a;
|
|
104
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
86
105
|
var changePath = getPath(change);
|
|
87
106
|
var pathArray = changePath.split(ATTRIBUTE_DELIMITER);
|
|
88
107
|
var holder = container;
|
|
@@ -90,9 +109,20 @@ var prepareAttribute = function (container, change) {
|
|
|
90
109
|
var key = pathArray[i];
|
|
91
110
|
var id = pathArray[i + 1];
|
|
92
111
|
var currentValue = (holder[key] || []).find(propEq('id', id));
|
|
112
|
+
if (!isNil(currentValue)) {
|
|
113
|
+
var newLineIds = extractLineIds(change.newValue);
|
|
114
|
+
var oldLineIds = extractLineIds(change.oldValue);
|
|
115
|
+
var currentLineId = ((_b = (_a = currentValue.value) === null || _a === void 0 ? void 0 : _a.newValue) === null || _b === void 0 ? void 0 : _b.lineIds) || ((_d = (_c = currentValue.value) === null || _c === void 0 ? void 0 : _c.oldValue) === null || _d === void 0 ? void 0 : _d.lineIds);
|
|
116
|
+
if (((_f = (_e = currentValue.value) === null || _e === void 0 ? void 0 : _e.newValue) === null || _f === void 0 ? void 0 : _f.lineIds) && newLineIds) {
|
|
117
|
+
currentValue.value.newValue.lineIds = currentLineId.concat(newLineIds);
|
|
118
|
+
}
|
|
119
|
+
if (((_h = (_g = currentValue.value) === null || _g === void 0 ? void 0 : _g.oldValue) === null || _h === void 0 ? void 0 : _h.lineIds) && oldLineIds) {
|
|
120
|
+
currentValue.value.oldValue.lineIds = currentLineId.concat(oldLineIds);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
93
123
|
var newValue = pathArray.length === i + 2 ? change : {};
|
|
94
124
|
var value = currentValue ? currentValue : { id: id, value: newValue };
|
|
95
|
-
var refObjectURI = ((
|
|
125
|
+
var refObjectURI = ((_j = change.refObjectURI) === null || _j === void 0 ? void 0 : _j.indexOf(id)) >= 0 && change.refObjectURI;
|
|
96
126
|
if (refObjectURI) {
|
|
97
127
|
value.refObjectURI = refObjectURI;
|
|
98
128
|
}
|
|
@@ -104,7 +134,7 @@ var prepareAttribute = function (container, change) {
|
|
|
104
134
|
return container;
|
|
105
135
|
};
|
|
106
136
|
var createEntityOrRelation = function (metadata, value) {
|
|
107
|
-
var _a = value.attributes, attributes = _a === void 0 ? {} : _a, startDate = value.startDate, endDate = value.endDate;
|
|
137
|
+
var _a = value.attributes, attributes = _a === void 0 ? {} : _a, startDate = value.startDate, endDate = value.endDate, lineIds = value.lineIds;
|
|
108
138
|
var _b = value, roles = _b.roles, tags = _b.tags, defaultProfilePicValue = _b.defaultProfilePicValue;
|
|
109
139
|
var newObject = __assign({}, attributes);
|
|
110
140
|
if (defaultProfilePicValue) {
|
|
@@ -114,7 +144,10 @@ var createEntityOrRelation = function (metadata, value) {
|
|
|
114
144
|
newObject[EntityAttrTypes.roles.name] = [
|
|
115
145
|
{
|
|
116
146
|
type: DCRTypes.INSERT_ATTRIBUTE,
|
|
117
|
-
newValue: {
|
|
147
|
+
newValue: {
|
|
148
|
+
value: roles.map(getRoleLabel(metadata)).join(', '),
|
|
149
|
+
lineIds: lineIds && ["".concat(lineIds[0], "/").concat(EntityAttrTypes.roles.name)]
|
|
150
|
+
}
|
|
118
151
|
}
|
|
119
152
|
];
|
|
120
153
|
}
|
|
@@ -122,7 +155,10 @@ var createEntityOrRelation = function (metadata, value) {
|
|
|
122
155
|
newObject[EntityAttrTypes.tags.name] = [
|
|
123
156
|
{
|
|
124
157
|
type: DCRTypes.INSERT_ATTRIBUTE,
|
|
125
|
-
newValue: {
|
|
158
|
+
newValue: {
|
|
159
|
+
value: tags.join(', '),
|
|
160
|
+
lineIds: lineIds && ["".concat(lineIds[0], "/").concat(EntityAttrTypes.tags.name)]
|
|
161
|
+
}
|
|
126
162
|
}
|
|
127
163
|
];
|
|
128
164
|
}
|
|
@@ -130,7 +166,10 @@ var createEntityOrRelation = function (metadata, value) {
|
|
|
130
166
|
newObject[EntityAttrTypes.startDate.name] = [
|
|
131
167
|
{
|
|
132
168
|
type: DCRTypes.INSERT_ATTRIBUTE,
|
|
133
|
-
newValue: {
|
|
169
|
+
newValue: {
|
|
170
|
+
value: startDate,
|
|
171
|
+
lineIds: lineIds && ["".concat(lineIds[0], "/").concat(EntityAttrTypes.startDate.name)]
|
|
172
|
+
}
|
|
134
173
|
}
|
|
135
174
|
];
|
|
136
175
|
}
|
|
@@ -138,10 +177,14 @@ var createEntityOrRelation = function (metadata, value) {
|
|
|
138
177
|
newObject[EntityAttrTypes.endDate.name] = [
|
|
139
178
|
{
|
|
140
179
|
type: DCRTypes.INSERT_ATTRIBUTE,
|
|
141
|
-
newValue: {
|
|
180
|
+
newValue: {
|
|
181
|
+
value: endDate,
|
|
182
|
+
lineIds: lineIds && ["".concat(lineIds[0], "/").concat(EntityAttrTypes.endDate.name)]
|
|
183
|
+
}
|
|
142
184
|
}
|
|
143
185
|
];
|
|
144
186
|
}
|
|
187
|
+
newObject['lineIds'] = lineIds;
|
|
145
188
|
return newObject;
|
|
146
189
|
};
|
|
147
190
|
var mergeAttributesInChange = function (metadata, objectInfo, change, container) {
|
|
@@ -199,6 +199,7 @@ describe('mergeChanges tests', function () {
|
|
|
199
199
|
{
|
|
200
200
|
id: 'BpiR2Vqh',
|
|
201
201
|
type: DCRTypes.CREATE_RELATIONSHIP,
|
|
202
|
+
lineIds: ['relations/1EvCRmwC/BpiR2Vqh'],
|
|
202
203
|
newValue: {
|
|
203
204
|
uri: 'relations/1EvCRmwC',
|
|
204
205
|
type: 'configuration/relationTypes/Assistant',
|
|
@@ -208,7 +209,8 @@ describe('mergeChanges tests', function () {
|
|
|
208
209
|
endObject: {
|
|
209
210
|
objectURI: 'entities/1C2v7IRp'
|
|
210
211
|
},
|
|
211
|
-
startDate: 1643742000000
|
|
212
|
+
startDate: 1643742000000,
|
|
213
|
+
lineIds: ['relations/1EvCRmwC/BpiR2Vqh/newValue']
|
|
212
214
|
}
|
|
213
215
|
}
|
|
214
216
|
]
|
|
@@ -235,6 +237,7 @@ describe('mergeChanges tests', function () {
|
|
|
235
237
|
}
|
|
236
238
|
], _a)),
|
|
237
239
|
label: metadata.relationTypes[1].label,
|
|
240
|
+
lineIds: ['relations/1EvCRmwC/BpiR2Vqh/newValue'],
|
|
238
241
|
level: 1
|
|
239
242
|
},
|
|
240
243
|
{
|
|
@@ -242,11 +245,62 @@ describe('mergeChanges tests', function () {
|
|
|
242
245
|
label: 'Start date',
|
|
243
246
|
level: 2,
|
|
244
247
|
newValue: {
|
|
245
|
-
value: 1643742000000
|
|
248
|
+
value: 1643742000000,
|
|
249
|
+
lineIds: ["relations/1EvCRmwC/BpiR2Vqh/newValue/".concat(EntityAttrTypes.startDate.name)]
|
|
246
250
|
},
|
|
247
251
|
operation: DCROperationTypes.ADDED
|
|
248
252
|
}
|
|
249
253
|
];
|
|
250
254
|
expect(mergeChanges(metadata, changes, objectInfo, relationsInfo)).toMatchObject([[], mergedRelations]);
|
|
251
255
|
});
|
|
256
|
+
it('should merge lineIds when multiple changes have the same attributePath', function () {
|
|
257
|
+
var _a;
|
|
258
|
+
var _b, _c;
|
|
259
|
+
var changes = (_a = {},
|
|
260
|
+
_a[entityUri] = [
|
|
261
|
+
{
|
|
262
|
+
id: '0Kb5iws',
|
|
263
|
+
type: DCRTypes.UPDATE_ATTRIBUTE,
|
|
264
|
+
objectType: 'configuration/entityTypes/HCP',
|
|
265
|
+
attributePath: 'CountryCode/2DEYF4Zg',
|
|
266
|
+
oldValue: {
|
|
267
|
+
value: 'American Samoa',
|
|
268
|
+
lookupCode: 'ASM',
|
|
269
|
+
lookupRawValue: 'ASM',
|
|
270
|
+
lineIds: ['line-1']
|
|
271
|
+
},
|
|
272
|
+
newValue: {
|
|
273
|
+
value: 'Algeria',
|
|
274
|
+
lookupCode: 'DZA',
|
|
275
|
+
lookupRawValue: 'DZA',
|
|
276
|
+
lineIds: ['line-2']
|
|
277
|
+
},
|
|
278
|
+
newPinOrIgnoreValue: false,
|
|
279
|
+
attributeType: 'configuration/entityTypes/HCP/attributes/CountryCode'
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
id: '0Kb5nD8',
|
|
283
|
+
type: DCRTypes.UPDATE_ATTRIBUTE,
|
|
284
|
+
objectType: 'configuration/entityTypes/HCP',
|
|
285
|
+
attributePath: 'CountryCode/2DEYF4Zg',
|
|
286
|
+
oldValue: {
|
|
287
|
+
value: 'American Samoa',
|
|
288
|
+
lookupCode: 'ASM',
|
|
289
|
+
lookupRawValue: 'ASM',
|
|
290
|
+
lineIds: ['line-3']
|
|
291
|
+
},
|
|
292
|
+
newValue: {
|
|
293
|
+
value: 'Algeria',
|
|
294
|
+
lookupCode: 'DZA',
|
|
295
|
+
lookupRawValue: 'DZA',
|
|
296
|
+
lineIds: ['line-4']
|
|
297
|
+
},
|
|
298
|
+
newPinOrIgnoreValue: false,
|
|
299
|
+
attributeType: 'configuration/entityTypes/HCP/attributes/CountryCode'
|
|
300
|
+
}
|
|
301
|
+
],
|
|
302
|
+
_a);
|
|
303
|
+
var mergedChanges = mergeChanges(metadata, changes, objectInfo, [])[0];
|
|
304
|
+
expect((_c = (_b = mergedChanges[0]) === null || _b === void 0 ? void 0 : _b.newValue) === null || _c === void 0 ? void 0 : _c.lineIds).toEqual(['line-2', 'line-4']);
|
|
305
|
+
});
|
|
252
306
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EnrichedDCRChanges, GroupedObjectsInfo, DCRChanges } from '@reltio/mdm-sdk';
|
|
2
2
|
import { Diff, Title } from '../types';
|
|
3
3
|
type Props = {
|
|
4
|
-
changes: DCRChanges;
|
|
4
|
+
changes: EnrichedDCRChanges | DCRChanges;
|
|
5
5
|
entityInfo: GroupedObjectsInfo['entity'];
|
|
6
6
|
relationsInfo: GroupedObjectsInfo['relations'];
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AttributeType,
|
|
1
|
+
import { AttributeType, DCRAttributeValue, DCROperationTypes, DCRRelationInfo, EnrichedChangeValue, TRelationType, ChangeValue } from '@reltio/mdm-sdk';
|
|
2
2
|
export type TaskAction = {
|
|
3
3
|
text: string;
|
|
4
4
|
onClick: (comment: string) => void;
|
|
@@ -10,10 +10,11 @@ export type Diff = {
|
|
|
10
10
|
attributeType: AttributeType | null;
|
|
11
11
|
relationType?: TRelationType;
|
|
12
12
|
attributeValue?: DCRAttributeValue | RelationAttributeValue;
|
|
13
|
-
newValue?: ChangeValue;
|
|
14
|
-
oldValue?: ChangeValue;
|
|
13
|
+
newValue?: EnrichedChangeValue | ChangeValue;
|
|
14
|
+
oldValue?: EnrichedChangeValue | ChangeValue;
|
|
15
15
|
operation?: DCROperationTypes;
|
|
16
16
|
isReferenceSubAttribute?: boolean;
|
|
17
|
+
lineIds?: string[];
|
|
17
18
|
};
|
|
18
19
|
export type Title = {
|
|
19
20
|
label: string;
|
package/index.d.ts
CHANGED
|
@@ -195,6 +195,7 @@ export { QuickFiltersEntityTypeFacet } from './QuickFiltersEntityTypeFacet';
|
|
|
195
195
|
export { FacetGroupTitle } from './FacetGroupTitle';
|
|
196
196
|
export { FacetsSelector } from './FacetsSelector';
|
|
197
197
|
export { FacetContainer } from './FacetContainer';
|
|
198
|
+
export { RequestedData } from './RequestedData';
|
|
198
199
|
export { withTooltip } from './HOCs/withTooltip';
|
|
199
200
|
export { withAsyncMount } from './HOCs/withAsyncMount';
|
|
200
201
|
export { withDragHandle } from './HOCs/withDragHandle';
|
package/index.js
CHANGED
|
@@ -195,6 +195,7 @@ export { QuickFiltersEntityTypeFacet } from './QuickFiltersEntityTypeFacet';
|
|
|
195
195
|
export { FacetGroupTitle } from './FacetGroupTitle';
|
|
196
196
|
export { FacetsSelector } from './FacetsSelector';
|
|
197
197
|
export { FacetContainer } from './FacetContainer';
|
|
198
|
+
export { RequestedData } from './RequestedData';
|
|
198
199
|
// HOCs
|
|
199
200
|
export { withTooltip } from './HOCs/withTooltip';
|
|
200
201
|
export { withAsyncMount } from './HOCs/withAsyncMount';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2202",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
12
12
|
"@googlemaps/markerclusterer": "^2.5.3",
|
|
13
13
|
"@react-sigma/core": "3.4.0",
|
|
14
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
14
|
+
"@reltio/mdm-sdk": "^1.4.2005",
|
|
15
15
|
"@vis.gl/react-google-maps": "^1.3.0",
|
|
16
16
|
"d3-cloud": "^1.2.5",
|
|
17
17
|
"d3-geo": "^2.0.1",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEditableChange = void 0;
|
|
4
|
-
var ramda_1 = require("ramda");
|
|
5
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
6
|
-
var isEditableChange = function (change, entityInfo) {
|
|
7
|
-
var _a;
|
|
8
|
-
var currentAttributeTypeUri = (_a = change.attributeType) === null || _a === void 0 ? void 0 : _a.uri;
|
|
9
|
-
var isExistingReferenceEntityChange = entityInfo.isExist &&
|
|
10
|
-
currentAttributeTypeUri &&
|
|
11
|
-
change.isReferenceSubAttribute &&
|
|
12
|
-
change.operation === mdm_sdk_1.DCROperationTypes.ADDED &&
|
|
13
|
-
!(0, mdm_sdk_1.isRelationTypeUri)(currentAttributeTypeUri);
|
|
14
|
-
return !!currentAttributeTypeUri && !isExistingReferenceEntityChange && !(0, ramda_1.isNil)(change.newValue);
|
|
15
|
-
};
|
|
16
|
-
exports.isEditableChange = isEditableChange;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { isNil } from 'ramda';
|
|
2
|
-
import { DCROperationTypes, isRelationTypeUri } from '@reltio/mdm-sdk';
|
|
3
|
-
export var isEditableChange = function (change, entityInfo) {
|
|
4
|
-
var _a;
|
|
5
|
-
var currentAttributeTypeUri = (_a = change.attributeType) === null || _a === void 0 ? void 0 : _a.uri;
|
|
6
|
-
var isExistingReferenceEntityChange = entityInfo.isExist &&
|
|
7
|
-
currentAttributeTypeUri &&
|
|
8
|
-
change.isReferenceSubAttribute &&
|
|
9
|
-
change.operation === DCROperationTypes.ADDED &&
|
|
10
|
-
!isRelationTypeUri(currentAttributeTypeUri);
|
|
11
|
-
return !!currentAttributeTypeUri && !isExistingReferenceEntityChange && !isNil(change.newValue);
|
|
12
|
-
};
|