@reltio/components 1.4.2201 → 1.4.2203

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 (73) hide show
  1. package/cjs/features/activity-log/RecordUpdates/RecordUpdates.d.ts +1 -0
  2. package/cjs/features/activity-log/RecordUpdates/RecordUpdates.js +2 -3
  3. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.d.ts +1 -1
  4. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.js +13 -9
  5. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.module.css.js +9 -0
  6. package/cjs/features/activity-log/types.d.ts +5 -0
  7. package/cjs/features/activity-log/types.js +7 -1
  8. package/cjs/features/workflow/ChangeRequestEditor/ChangeRequestEditor.js +36 -3
  9. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.d.ts +1 -3
  10. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.js +15 -6
  11. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditor.d.ts +4 -3
  12. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditor.js +2 -28
  13. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditorFactory.d.ts +4 -3
  14. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditorFactory.js +11 -3
  15. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.d.ts +2 -3
  16. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.js +5 -5
  17. package/cjs/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.d.ts +2 -2
  18. package/cjs/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.js +2 -28
  19. package/cjs/features/workflow/ChangeRequestEditor/context/index.d.ts +20 -0
  20. package/cjs/features/workflow/ChangeRequestEditor/context/index.js +76 -0
  21. package/cjs/features/workflow/ChangeRequestEditor/helpers/helper.test.d.ts +1 -0
  22. package/cjs/features/workflow/ChangeRequestEditor/helpers/helper.test.js +237 -0
  23. package/cjs/features/workflow/ChangeRequestEditor/helpers/helpers.d.ts +4 -0
  24. package/cjs/features/workflow/ChangeRequestEditor/helpers/helpers.js +105 -0
  25. package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +3 -1
  26. package/cjs/features/workflow/helpers/attributes.js +14 -3
  27. package/cjs/features/workflow/helpers/attributes.test.js +29 -7
  28. package/cjs/features/workflow/helpers/merge.d.ts +3 -2
  29. package/cjs/features/workflow/helpers/merge.js +62 -18
  30. package/cjs/features/workflow/helpers/merge.test.js +56 -2
  31. package/cjs/features/workflow/hooks/useChangesList.d.ts +2 -2
  32. package/cjs/features/workflow/types.d.ts +4 -3
  33. package/features/activity-log/RecordUpdates/RecordUpdates.d.ts +1 -0
  34. package/features/activity-log/RecordUpdates/RecordUpdates.js +2 -3
  35. package/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.d.ts +1 -1
  36. package/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.js +14 -10
  37. package/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.module.css.js +9 -0
  38. package/features/activity-log/types.d.ts +5 -0
  39. package/features/activity-log/types.js +6 -0
  40. package/features/workflow/ChangeRequestEditor/ChangeRequestEditor.js +13 -3
  41. package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.d.ts +1 -3
  42. package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.js +15 -6
  43. package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditor.d.ts +4 -3
  44. package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditor.js +2 -5
  45. package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditorFactory.d.ts +4 -3
  46. package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/DCRValueEditorFactory.js +13 -5
  47. package/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.d.ts +2 -3
  48. package/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.js +6 -6
  49. package/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.d.ts +2 -2
  50. package/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.js +2 -5
  51. package/features/workflow/ChangeRequestEditor/context/index.d.ts +20 -0
  52. package/features/workflow/ChangeRequestEditor/context/index.js +49 -0
  53. package/features/workflow/ChangeRequestEditor/helpers/helper.test.d.ts +1 -0
  54. package/features/workflow/ChangeRequestEditor/helpers/helper.test.js +235 -0
  55. package/features/workflow/ChangeRequestEditor/helpers/helpers.d.ts +4 -0
  56. package/features/workflow/ChangeRequestEditor/helpers/helpers.js +100 -0
  57. package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +3 -1
  58. package/features/workflow/helpers/attributes.js +14 -3
  59. package/features/workflow/helpers/attributes.test.js +29 -7
  60. package/features/workflow/helpers/merge.d.ts +3 -2
  61. package/features/workflow/helpers/merge.js +60 -17
  62. package/features/workflow/helpers/merge.test.js +56 -2
  63. package/features/workflow/hooks/useChangesList.d.ts +2 -2
  64. package/features/workflow/types.d.ts +4 -3
  65. package/package.json +2 -2
  66. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/styles.d.ts +0 -1
  67. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/styles.js +0 -36
  68. package/cjs/features/workflow/ChangeRequestEditor/helpers.d.ts +0 -3
  69. package/cjs/features/workflow/ChangeRequestEditor/helpers.js +0 -16
  70. package/features/activity-log/RecordUpdates/components/DeltaField/styles.d.ts +0 -1
  71. package/features/activity-log/RecordUpdates/components/DeltaField/styles.js +0 -33
  72. package/features/workflow/ChangeRequestEditor/helpers.d.ts +0 -3
  73. package/features/workflow/ChangeRequestEditor/helpers.js +0 -12
@@ -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(newValue);
28
- var isExistOldValue = isExistedValue(oldValue);
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: { value: parseValue(oldValue[0]) },
34
- newValue: { value: parseValue(newValue[0]) }
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: { value: parseValue(newValue[0]) }
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: { value: parseValue(oldValue[0]) }
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 diffNewValue = difference(newValue, oldValue);
58
- var diffOldValue = difference(oldValue, newValue);
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 = ((_a = change.refObjectURI) === null || _a === void 0 ? void 0 : _a.indexOf(id)) >= 0 && change.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: { value: roles.map(getRoleLabel(metadata)).join(', ') }
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: { value: tags.join(', ') }
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: { value: startDate }
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: { value: endDate }
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 { DCRChanges, GroupedObjectsInfo } from '@reltio/mdm-sdk';
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, ChangeValue, DCRAttributeValue, DCROperationTypes, DCRRelationInfo, TRelationType } from '@reltio/mdm-sdk';
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.2201",
3
+ "version": "1.4.2203",
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.2004",
14
+ "@reltio/mdm-sdk": "^1.4.2006",
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 +0,0 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"arrow" | "chip">;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useStyles = void 0;
4
- var styles_1 = require("@mui/styles");
5
- exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
6
- arrow: {
7
- margin: '0 8px',
8
- fontSize: 12,
9
- color: theme.palette.text.primary
10
- },
11
- chip: {
12
- height: 20,
13
- width: 53,
14
- fontSize: 10,
15
- fontWeight: 500,
16
- lineHeight: '16px',
17
- marginLeft: 9,
18
- flexShrink: 0,
19
- textTransform: 'capitalize',
20
- '& span': {
21
- padding: 0
22
- },
23
- '&.edited': {
24
- color: '#6973C2',
25
- borderColor: '#6973C2'
26
- },
27
- '&.added': {
28
- color: '#75C378',
29
- borderColor: '#75C378'
30
- },
31
- '&.deleted': {
32
- color: '#F97061',
33
- borderColor: '#F97061'
34
- }
35
- }
36
- }); });
@@ -1,3 +0,0 @@
1
- import { GroupedObjectsInfo } from '@reltio/mdm-sdk';
2
- import { Diff } from '../types';
3
- export declare const isEditableChange: (change: Diff, entityInfo: GroupedObjectsInfo["entity"]) => boolean;
@@ -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 +0,0 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"arrow" | "chip">;
@@ -1,33 +0,0 @@
1
- import { makeStyles } from '@mui/styles';
2
- export var useStyles = makeStyles(function (theme) { return ({
3
- arrow: {
4
- margin: '0 8px',
5
- fontSize: 12,
6
- color: theme.palette.text.primary
7
- },
8
- chip: {
9
- height: 20,
10
- width: 53,
11
- fontSize: 10,
12
- fontWeight: 500,
13
- lineHeight: '16px',
14
- marginLeft: 9,
15
- flexShrink: 0,
16
- textTransform: 'capitalize',
17
- '& span': {
18
- padding: 0
19
- },
20
- '&.edited': {
21
- color: '#6973C2',
22
- borderColor: '#6973C2'
23
- },
24
- '&.added': {
25
- color: '#75C378',
26
- borderColor: '#75C378'
27
- },
28
- '&.deleted': {
29
- color: '#F97061',
30
- borderColor: '#F97061'
31
- }
32
- }
33
- }); });
@@ -1,3 +0,0 @@
1
- import { GroupedObjectsInfo } from '@reltio/mdm-sdk';
2
- import { Diff } from '../types';
3
- export declare const isEditableChange: (change: Diff, entityInfo: GroupedObjectsInfo["entity"]) => boolean;
@@ -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
- };