@reltio/components 1.4.2202 → 1.4.2204

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 (121) hide show
  1. package/RolesInput/RolesInput.d.ts +2 -1
  2. package/RolesInput/RolesInput.js +2 -2
  3. package/TagsInput/TagsInput.d.ts +2 -1
  4. package/TagsInput/TagsInput.js +2 -2
  5. package/cjs/RolesInput/RolesInput.d.ts +2 -1
  6. package/cjs/RolesInput/RolesInput.js +2 -2
  7. package/cjs/TagsInput/TagsInput.d.ts +2 -1
  8. package/cjs/TagsInput/TagsInput.js +2 -2
  9. package/cjs/features/activity-log/RecordUpdates/RecordUpdates.d.ts +1 -0
  10. package/cjs/features/activity-log/RecordUpdates/RecordUpdates.js +2 -3
  11. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.d.ts +1 -1
  12. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.js +13 -9
  13. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.module.css.js +9 -0
  14. package/cjs/features/activity-log/types.d.ts +5 -0
  15. package/cjs/features/activity-log/types.js +7 -1
  16. package/cjs/features/workflow/ChangeRequestEditor/ChangeRequestEditor.js +2 -1
  17. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.d.ts +4 -1
  18. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.js +28 -18
  19. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.module.css.js +2 -2
  20. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemOldValue.js +1 -1
  21. package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → ChangeItemLabel}/ChangeItemLabel.js +2 -2
  22. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemLabel/ChangeItemLabel.module.css.js +9 -0
  23. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemLabel/index.d.ts +1 -0
  24. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemLabel/index.js +5 -0
  25. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.d.ts +3 -3
  26. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.js +20 -8
  27. package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.module.css.js +2 -2
  28. package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → DCRValueEditor}/DCRValueEditor.d.ts +2 -1
  29. package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → DCRValueEditor}/DCRValueEditor.js +6 -5
  30. package/cjs/features/workflow/ChangeRequestEditor/components/DCRValueEditor/DCRValueEditor.module.css.js +9 -0
  31. package/cjs/features/workflow/ChangeRequestEditor/components/DCRValueEditor/index.d.ts +1 -0
  32. package/cjs/features/workflow/ChangeRequestEditor/components/DCRValueEditor/index.js +5 -0
  33. package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → DCRValueEditorFactory}/DCRValueEditorFactory.d.ts +2 -1
  34. package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → DCRValueEditorFactory}/DCRValueEditorFactory.js +4 -4
  35. package/cjs/features/workflow/ChangeRequestEditor/components/DCRValueEditorFactory/index.d.ts +1 -0
  36. package/cjs/features/workflow/ChangeRequestEditor/components/DCRValueEditorFactory/index.js +5 -0
  37. package/cjs/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.js +4 -1
  38. package/cjs/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.module.css.js +2 -2
  39. package/cjs/features/workflow/ChangeRequestEditor/components/StatusChips/StatusChips.d.ts +7 -0
  40. package/cjs/features/workflow/ChangeRequestEditor/components/StatusChips/StatusChips.js +21 -0
  41. package/cjs/features/workflow/ChangeRequestEditor/components/StatusChips/StatusChips.module.css.js +9 -0
  42. package/cjs/features/workflow/ChangeRequestEditor/components/StatusChips/index.d.ts +1 -0
  43. package/cjs/features/workflow/ChangeRequestEditor/components/StatusChips/index.js +5 -0
  44. package/cjs/features/workflow/ChangeRequestEditor/context/index.d.ts +4 -1
  45. package/cjs/features/workflow/ChangeRequestEditor/context/index.js +30 -4
  46. package/cjs/features/workflow/ChangeRequestEditor/helpers/helpers.d.ts +2 -1
  47. package/cjs/features/workflow/ChangeRequestEditor/helpers/helpers.js +5 -1
  48. package/cjs/features/workflow/ChangeRequestEditor/hooks/useChangeRequestEditor.d.ts +16 -0
  49. package/cjs/features/workflow/ChangeRequestEditor/hooks/useChangeRequestEditor.js +42 -0
  50. package/cjs/features/workflow/OperationChip/OperationChip.js +1 -1
  51. package/cjs/features/workflow/OperationChip/OperationChip.module.css.js +2 -2
  52. package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +1 -1
  53. package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.module.css.js +1 -1
  54. package/cjs/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.module.css.js +1 -1
  55. package/cjs/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.module.css.js +1 -1
  56. package/cjs/features/workflow/helpers/attributes.js +6 -4
  57. package/cjs/features/workflow/helpers/common.d.ts +1 -1
  58. package/cjs/features/workflow/helpers/common.js +3 -3
  59. package/cjs/features/workflow/helpers/common.test.js +4 -4
  60. package/cjs/features/workflow/helpers/merge.js +3 -1
  61. package/cjs/features/workflow/helpers/merge.test.js +79 -0
  62. package/features/activity-log/RecordUpdates/RecordUpdates.d.ts +1 -0
  63. package/features/activity-log/RecordUpdates/RecordUpdates.js +2 -3
  64. package/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.d.ts +1 -1
  65. package/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.js +14 -10
  66. package/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.module.css.js +9 -0
  67. package/features/activity-log/types.d.ts +5 -0
  68. package/features/activity-log/types.js +6 -0
  69. package/features/workflow/ChangeRequestEditor/ChangeRequestEditor.js +2 -1
  70. package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.d.ts +4 -1
  71. package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.js +28 -18
  72. package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.module.css.js +2 -2
  73. package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemOldValue.js +1 -1
  74. package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → ChangeItemLabel}/ChangeItemLabel.js +1 -1
  75. package/features/workflow/ChangeRequestEditor/components/ChangeItemLabel/ChangeItemLabel.module.css.js +9 -0
  76. package/features/workflow/ChangeRequestEditor/components/ChangeItemLabel/index.d.ts +1 -0
  77. package/features/workflow/ChangeRequestEditor/components/ChangeItemLabel/index.js +1 -0
  78. package/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.d.ts +3 -3
  79. package/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.js +20 -8
  80. package/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.module.css.js +2 -2
  81. package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → DCRValueEditor}/DCRValueEditor.d.ts +2 -1
  82. package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → DCRValueEditor}/DCRValueEditor.js +5 -4
  83. package/features/workflow/ChangeRequestEditor/components/DCRValueEditor/DCRValueEditor.module.css.js +9 -0
  84. package/features/workflow/ChangeRequestEditor/components/DCRValueEditor/index.d.ts +1 -0
  85. package/features/workflow/ChangeRequestEditor/components/DCRValueEditor/index.js +1 -0
  86. package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → DCRValueEditorFactory}/DCRValueEditorFactory.d.ts +2 -1
  87. package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → DCRValueEditorFactory}/DCRValueEditorFactory.js +4 -4
  88. package/features/workflow/ChangeRequestEditor/components/DCRValueEditorFactory/index.d.ts +1 -0
  89. package/features/workflow/ChangeRequestEditor/components/DCRValueEditorFactory/index.js +1 -0
  90. package/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.js +4 -1
  91. package/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.module.css.js +2 -2
  92. package/features/workflow/ChangeRequestEditor/components/StatusChips/StatusChips.d.ts +7 -0
  93. package/features/workflow/ChangeRequestEditor/components/StatusChips/StatusChips.js +14 -0
  94. package/features/workflow/ChangeRequestEditor/components/StatusChips/StatusChips.module.css.js +9 -0
  95. package/features/workflow/ChangeRequestEditor/components/StatusChips/index.d.ts +1 -0
  96. package/features/workflow/ChangeRequestEditor/components/StatusChips/index.js +1 -0
  97. package/features/workflow/ChangeRequestEditor/context/index.d.ts +4 -1
  98. package/features/workflow/ChangeRequestEditor/context/index.js +30 -4
  99. package/features/workflow/ChangeRequestEditor/helpers/helpers.d.ts +2 -1
  100. package/features/workflow/ChangeRequestEditor/helpers/helpers.js +4 -1
  101. package/features/workflow/ChangeRequestEditor/hooks/useChangeRequestEditor.d.ts +16 -0
  102. package/features/workflow/ChangeRequestEditor/hooks/useChangeRequestEditor.js +38 -0
  103. package/features/workflow/OperationChip/OperationChip.js +1 -1
  104. package/features/workflow/OperationChip/OperationChip.module.css.js +2 -2
  105. package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +2 -2
  106. package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.module.css.js +1 -1
  107. package/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.module.css.js +1 -1
  108. package/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.module.css.js +1 -1
  109. package/features/workflow/helpers/attributes.js +6 -4
  110. package/features/workflow/helpers/common.d.ts +1 -1
  111. package/features/workflow/helpers/common.js +3 -3
  112. package/features/workflow/helpers/common.test.js +4 -4
  113. package/features/workflow/helpers/merge.js +4 -2
  114. package/features/workflow/helpers/merge.test.js +79 -0
  115. package/package.json +2 -2
  116. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/styles.d.ts +0 -1
  117. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/styles.js +0 -36
  118. package/features/activity-log/RecordUpdates/components/DeltaField/styles.d.ts +0 -1
  119. package/features/activity-log/RecordUpdates/components/DeltaField/styles.js +0 -33
  120. /package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → ChangeItemLabel}/ChangeItemLabel.d.ts +0 -0
  121. /package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → ChangeItemLabel}/ChangeItemLabel.d.ts +0 -0
@@ -3,7 +3,7 @@ import Dialog from '@mui/material/Dialog';
3
3
  import DialogTitle from '@mui/material/DialogTitle';
4
4
  import DialogContent from '@mui/material/DialogContent';
5
5
  import Typography from '@mui/material/Typography';
6
- import { SmallIconButton } from '../../../SmallIconButton';
6
+ import { SmallIconButtonWithTooltip } from '../../../SmallIconButton';
7
7
  import CloseIcon from '@mui/icons-material/Close';
8
8
  import i18n from 'ui-i18n';
9
9
  import { useWorkflowCheckPermission } from '../hooks/useWorkflowCheckPermission';
@@ -35,7 +35,7 @@ export var ReviewDCRDialog = function (_a) {
35
35
  React.createElement("div", { className: styles.titleContent },
36
36
  React.createElement(Typography, { variant: "h6", className: styles.titleText }, i18n.text('Review DCR')),
37
37
  React.createElement(WorkflowActionButtons, { workflowActions: workflowActions, actionRequestIsInProgress: actionRequestIsInProgress, preferredAction: task.preferredAction })),
38
- React.createElement(SmallIconButton, { onClick: onClose, className: styles.closeButton, "aria-label": "close", icon: CloseIcon })),
38
+ React.createElement(SmallIconButtonWithTooltip, { tooltipTitle: i18n.text('Close'), "aria-label": i18n.text('Close'), icon: CloseIcon, onClick: onClose, className: styles.closeButton, size: "L" })),
39
39
  React.createElement(DialogContent, { classes: { root: styles.content } },
40
40
  React.createElement("div", { className: styles.leftSection },
41
41
  React.createElement(ProfileBand, { entity: entity, className: styles.profileBandRoot, classes: { profileBand: styles.profileBand } }),
@@ -3,7 +3,7 @@ if (typeof document !== 'undefined') {
3
3
  const head = document.head || document.getElementsByTagName('head')[0]
4
4
  const style = document.createElement('style');
5
5
  style.type = 'text/css'
6
- style.innerHTML = `.ReviewDCRDialog-dialogTitle--xCXtj{align-items:center;border-bottom:1px solid #e0e0e0;display:flex;justify-content:space-between;padding:12px 16px 8px}.ReviewDCRDialog-titleContent--Hh2KH{align-items:center;display:flex;flex:1;justify-content:space-between;position:relative}.ReviewDCRDialog-titleText--ME8s4{flex:1;margin:0;padding-left:48px}.ReviewDCRDialog-closeButton--YMAEf{color:#666;left:15px;position:absolute}.ReviewDCRDialog-closeButton--YMAEf:hover{background-color:var(--mui-palette-action-hover);color:var(--mui-palette-text-primary)}.ReviewDCRDialog-content--qvUva{display:flex;min-height:400px;padding:0!important;width:100%}.ReviewDCRDialog-leftSection--5MELW{border-right:1px solid #e0e0e0;display:flex;flex-direction:column;padding:0 16px;width:100%}.ReviewDCRDialog-profileBand--7r6Xy{margin-left:-16px}.ReviewDCRDialog-profileBandRoot--G7p1m{box-shadow:none;margin-bottom:0}.ReviewDCRDialog-editableSection--v-D7a{border:1px solid #d9d9d9;border-radius:0 0 8px 8px;margin-bottom:16px;padding:8px 16px 14px}.ReviewDCRDialog-editableGrid--auc-d{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));margin-bottom:12px}.ReviewDCRDialog-editableItem--isGwv{display:flex;flex-direction:column}.ReviewDCRDialog-priorityField--LQ1n3{min-width:200px}.ReviewDCRDialog-changesSection--qj2OK{flex-grow:1;margin-bottom:16px;position:relative}.ReviewDCRDialog-commentsRootContainer--g2f7m{margin:10px 0 16px 10px;min-width:323px;width:323px}.ReviewDCRDialog-commentsContainer--OApOx{flex-grow:1;max-height:100%}`;
6
+ style.innerHTML = `.ReviewDCRDialog-dialogTitle--xCXtj{align-items:center;border-bottom:1px solid #e0e0e0;display:flex;justify-content:space-between;padding:12px 16px 8px}.ReviewDCRDialog-titleContent--Hh2KH{align-items:center;display:flex;flex:1;height:37px;justify-content:space-between;position:relative}.ReviewDCRDialog-titleText--ME8s4{flex:1;margin:0;padding-left:48px}.ReviewDCRDialog-closeButton--YMAEf{color:#666;left:15px;position:absolute}.ReviewDCRDialog-closeButton--YMAEf:hover{background-color:var(--mui-palette-action-hover);color:var(--mui-palette-text-primary)}.ReviewDCRDialog-content--qvUva{display:flex;min-height:400px;padding:0!important;width:100%}.ReviewDCRDialog-leftSection--5MELW{border-right:1px solid #e0e0e0;display:flex;flex-direction:column;padding:0 16px;width:100%}.ReviewDCRDialog-profileBand--7r6Xy{margin-left:-16px}.ReviewDCRDialog-profileBandRoot--G7p1m{box-shadow:none;margin-bottom:0}.ReviewDCRDialog-editableSection--v-D7a{border:1px solid #d9d9d9;border-radius:0 0 8px 8px;margin-bottom:16px;padding:8px 16px 14px}.ReviewDCRDialog-editableGrid--auc-d{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));margin-bottom:12px}.ReviewDCRDialog-editableItem--isGwv{display:flex;flex-direction:column}.ReviewDCRDialog-priorityField--LQ1n3{min-width:200px}.ReviewDCRDialog-changesSection--qj2OK{flex-grow:1;margin-bottom:16px;position:relative}.ReviewDCRDialog-commentsRootContainer--g2f7m{margin:10px 0 16px 10px;min-width:323px;width:323px}.ReviewDCRDialog-commentsContainer--OApOx{flex-grow:1;max-height:100%}`;
7
7
  head.appendChild(style);
8
8
  }
9
9
  export default styles;
@@ -3,7 +3,7 @@ if (typeof document !== 'undefined') {
3
3
  const head = document.head || document.getElementsByTagName('head')[0]
4
4
  const style = document.createElement('style');
5
5
  style.type = 'text/css'
6
- style.innerHTML = `.DCRChangesSummary-changesSummary--31gR-{align-items:center;display:flex;gap:22px}.DCRChangesSummary-changeItem---XfYP{align-items:center;display:flex;flex-direction:column;gap:4px;position:relative}.DCRChangesSummary-changeItem---XfYP:not(:last-child):after{background-color:#d9d9d9;bottom:2px;content:"";height:20px;position:absolute;right:-12px;top:2px;width:1px}.DCRChangesSummary-changeNumber--vZxc4{font-size:16px;font-weight:500;line-height:1}.DCRChangesSummary-changeLabel--tDXS6{color:var(--mui-palette-text-primary);font-size:13px;text-transform:capitalize}.DCRChangesSummary-edited--KFivZ{color:#eb9d08}.DCRChangesSummary-added--KGdGw{color:#599e0e}.DCRChangesSummary-deleted--TWgS5{color:#eb5757}.DCRChangesSummary-ignored--Q2Q8R{color:var(--mui-palette-primary-light)}`;
6
+ style.innerHTML = `.DCRChangesSummary-changesSummary--31gR-{align-items:center;display:flex;gap:22px}.DCRChangesSummary-changeItem---XfYP{align-items:center;display:flex;flex-direction:column;gap:4px;position:relative}.DCRChangesSummary-changeItem---XfYP:not(:last-child):after{background-color:#d9d9d9;bottom:2px;content:"";height:20px;position:absolute;right:-12px;top:2px;width:1px}.DCRChangesSummary-changeNumber--vZxc4{font-size:16px;font-weight:500;line-height:1}.DCRChangesSummary-changeLabel--tDXS6{color:var(--mui-palette-text-primary);font-size:13px}.DCRChangesSummary-changeLabel--tDXS6:first-letter{text-transform:uppercase}.DCRChangesSummary-edited--KFivZ{color:#eb9d08}.DCRChangesSummary-added--KGdGw{color:#599e0e}.DCRChangesSummary-deleted--TWgS5{color:#eb5757}.DCRChangesSummary-ignored--Q2Q8R{color:var(--mui-palette-primary-light)}`;
7
7
  head.appendChild(style);
8
8
  }
9
9
  export default styles;
@@ -3,7 +3,7 @@ if (typeof document !== 'undefined') {
3
3
  const head = document.head || document.getElementsByTagName('head')[0]
4
4
  const style = document.createElement('style');
5
5
  style.type = 'text/css'
6
- style.innerHTML = `.DCRSummaryInfo-requestSummary--FUaA0{align-items:flex-start;background-color:rgba(0,0,0,.03);border-radius:8px;display:flex;justify-content:space-between;padding:16px 8px 12px}.DCRSummaryInfo-summaryLeft--Y79jA{align-items:flex-start;display:flex;gap:16px}.DCRSummaryInfo-summaryIcon--VlZsg{padding-top:4px}.DCRSummaryInfo-summaryContent--BdPl7{display:flex;flex-direction:column;gap:3px}.DCRSummaryInfo-summaryTitle--77exU{font-size:16px;font-weight:500;margin:0}.DCRSummaryInfo-summaryDetails--u5ije{display:flex;flex-wrap:wrap;font-size:12px;gap:8px}.DCRSummaryInfo-summaryItem--DbTdR{color:var(--mui-palette-text-primary);font-size:13px;margin:0}.DCRSummaryInfo-summaryItemName--l7hYO{color:var(--mui-palette-text-secondary)}.DCRSummaryInfo-summaryItemDate--EQpJ0{margin-left:-4px}.DCRSummaryInfo-summaryRight--9pEaH{align-items:center;display:flex;padding:3px 9px}`;
6
+ style.innerHTML = `.DCRSummaryInfo-requestSummary--FUaA0{align-items:flex-start;background-color:rgba(0,0,0,.03);border-radius:8px 8px 0 0;display:flex;justify-content:space-between;padding:16px 8px 12px}.DCRSummaryInfo-summaryLeft--Y79jA{align-items:flex-start;display:flex;gap:16px}.DCRSummaryInfo-summaryIcon--VlZsg{padding-top:4px}.DCRSummaryInfo-summaryContent--BdPl7{display:flex;flex-direction:column;gap:3px}.DCRSummaryInfo-summaryTitle--77exU{font-size:16px;font-weight:500;margin:0}.DCRSummaryInfo-summaryDetails--u5ije{display:flex;flex-wrap:wrap;font-size:12px;gap:8px}.DCRSummaryInfo-summaryItem--DbTdR{color:var(--mui-palette-text-primary);font-size:13px;margin:0}.DCRSummaryInfo-summaryItemName--l7hYO{color:var(--mui-palette-text-secondary)}.DCRSummaryInfo-summaryItemDate--EQpJ0{margin-left:-4px}.DCRSummaryInfo-summaryRight--9pEaH{align-items:center;display:flex;padding:3px 9px}`;
7
7
  head.appendChild(style);
8
8
  }
9
9
  export default styles;
@@ -89,13 +89,15 @@ var getReferenceAttributeChange = function (metadata, attributeType, attributeVa
89
89
  ];
90
90
  };
91
91
  var getDiffParameters = function (_a) {
92
- var newValue = _a.newValue, oldValue = _a.oldValue, type = _a.type;
93
- return type === DCRTypes.UPDATE_ATTRIBUTE ? { type: type, newValue: newValue, oldValue: oldValue } : { type: type, newValue: oldValue || newValue };
92
+ var newValue = _a.newValue, oldValue = _a.oldValue, type = _a.type, newPinOrIgnoreValue = _a.newPinOrIgnoreValue;
93
+ return type === DCRTypes.UPDATE_ATTRIBUTE
94
+ ? { type: type, newValue: newValue, oldValue: oldValue, newPinOrIgnoreValue: newPinOrIgnoreValue }
95
+ : { type: type, newValue: oldValue || newValue, newPinOrIgnoreValue: newPinOrIgnoreValue };
94
96
  };
95
97
  var getSimpleAttributeChange = function (attributeType, attributeValue, level, isReferenceSubAttribute) {
96
98
  if (isReferenceSubAttribute === void 0) { isReferenceSubAttribute = false; }
97
- var _a = getDiffParameters(attributeValue), newValue = _a.newValue, oldValue = _a.oldValue, type = _a.type;
98
- var operation = getOperationType(type, oldValue);
99
+ var _a = getDiffParameters(attributeValue), newValue = _a.newValue, oldValue = _a.oldValue, type = _a.type, newPinOrIgnoreValue = _a.newPinOrIgnoreValue;
100
+ var operation = getOperationType(type, newPinOrIgnoreValue);
99
101
  var label = (attributeType === null || attributeType === void 0 ? void 0 : attributeType.label) || (attributeType === null || attributeType === void 0 ? void 0 : attributeType.name);
100
102
  return {
101
103
  attributeType: attributeType,
@@ -1,5 +1,5 @@
1
1
  import { AttributeType, DCRAttributeValue, DCRObjectsInfo, DCROperationTypes, DCRValue, Metadata, WorkflowDefinition, WorkflowTaskData } from '@reltio/mdm-sdk';
2
- export declare const getOperationType: (type: string, oldValue?: DCRAttributeValue) => DCROperationTypes;
2
+ export declare const getOperationType: (type: string, newPinOrIgnoreValue?: boolean) => DCROperationTypes;
3
3
  export declare const getOperationLabel: (operation: DCROperationTypes) => string;
4
4
  export declare const getAttributeDescription: (attrType: AttributeType, value: DCRAttributeValue, currentEntityUri: string, objectsInfo?: DCRObjectsInfo) => {
5
5
  objectUri: string;
@@ -1,7 +1,7 @@
1
1
  import { allPass, always, equals, evolve, filter, has, identity, isNil, length, nth, pipe, prop, propEq, split, startsWith, unless, when } from 'ramda';
2
2
  import i18n from 'ui-i18n';
3
3
  import { DataTypes, DCROperationTypes, DCRTypes, EntityAttrTypes, getAttrDataTypeDefinition, getRoleLabel, isUrl } from '@reltio/mdm-sdk';
4
- export var getOperationType = function (type, oldValue) {
4
+ export var getOperationType = function (type, newPinOrIgnoreValue) {
5
5
  switch (type) {
6
6
  case DCRTypes.CREATE_RELATIONSHIP:
7
7
  case DCRTypes.INSERT_ATTRIBUTE:
@@ -14,9 +14,9 @@ export var getOperationType = function (type, oldValue) {
14
14
  case DCRTypes.DELETE_RELATIONSHIP:
15
15
  return DCROperationTypes.DELETED;
16
16
  case DCRTypes.PIN_ATTRIBUTE:
17
- return (oldValue === null || oldValue === void 0 ? void 0 : oldValue.pin) ? DCROperationTypes.PIN_DELETED : DCROperationTypes.PINNED;
17
+ return newPinOrIgnoreValue ? DCROperationTypes.PINNED : DCROperationTypes.PIN_DELETED;
18
18
  case DCRTypes.IGNORE_ATTRIBUTE:
19
- return (oldValue === null || oldValue === void 0 ? void 0 : oldValue.ignored) ? DCROperationTypes.IGNORE_DELETED : DCROperationTypes.IGNORED;
19
+ return newPinOrIgnoreValue ? DCROperationTypes.IGNORED : DCROperationTypes.IGNORE_DELETED;
20
20
  }
21
21
  };
22
22
  export var getOperationLabel = function (operation) {
@@ -9,10 +9,10 @@ describe('common helpers', function () {
9
9
  expect(getOperationType(DCRTypes.UPDATE_ATTRIBUTE)).toBe(DCROperationTypes.EDITED);
10
10
  expect(getOperationType(DCRTypes.DELETE_ATTRIBUTE)).toBe(DCROperationTypes.DELETED);
11
11
  expect(getOperationType(DCRTypes.DELETE_RELATIONSHIP)).toBe(DCROperationTypes.DELETED);
12
- expect(getOperationType(DCRTypes.PIN_ATTRIBUTE, { pin: true })).toBe(DCROperationTypes.PIN_DELETED);
13
- expect(getOperationType(DCRTypes.PIN_ATTRIBUTE, { pin: false })).toBe(DCROperationTypes.PINNED);
14
- expect(getOperationType(DCRTypes.IGNORE_ATTRIBUTE, { ignored: true })).toBe(DCROperationTypes.IGNORE_DELETED);
15
- expect(getOperationType(DCRTypes.IGNORE_ATTRIBUTE, { ignored: false })).toBe(DCROperationTypes.IGNORED);
12
+ expect(getOperationType(DCRTypes.PIN_ATTRIBUTE, true)).toBe(DCROperationTypes.PINNED);
13
+ expect(getOperationType(DCRTypes.PIN_ATTRIBUTE, false)).toBe(DCROperationTypes.PIN_DELETED);
14
+ expect(getOperationType(DCRTypes.IGNORE_ATTRIBUTE, true)).toBe(DCROperationTypes.IGNORED);
15
+ expect(getOperationType(DCRTypes.IGNORE_ATTRIBUTE, false)).toBe(DCROperationTypes.IGNORE_DELETED);
16
16
  });
17
17
  it('getOperationLabel behaviour', function () {
18
18
  expect(getOperationLabel(DCROperationTypes.ADDED)).toBe('added');
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { concat, curry, difference, flatten, isNil, omit, path, pick, pipe, propEq, propOr, reduce } from 'ramda';
12
+ import { both, concat, curry, difference, flatten, isNil, omit, path, pathEq, pick, pipe, propEq, propOr, reduce } from 'ramda';
13
13
  import { DCRTypes, EntityAttrTypes, generateTempUri, getRoleLabel, isEmptyValue } from '@reltio/mdm-sdk';
14
14
  import { getEntityChanges, getRelationChanges } from './attributes';
15
15
  var ATTRIBUTE_DELIMITER = '/';
@@ -108,7 +108,9 @@ var prepareAttribute = function (container, change) {
108
108
  for (var i = 0; i < pathArray.length - 1; i = i + 2) {
109
109
  var key = pathArray[i];
110
110
  var id = pathArray[i + 1];
111
- var currentValue = (holder[key] || []).find(propEq('id', id));
111
+ var currentValue = i === pathArray.length - 2
112
+ ? (holder[key] || []).find(both(propEq('id', id), pathEq(['value', 'type'], change === null || change === void 0 ? void 0 : change.type)))
113
+ : (holder[key] || []).find(propEq('id', id));
112
114
  if (!isNil(currentValue)) {
113
115
  var newLineIds = extractLineIds(change.newValue);
114
116
  var oldLineIds = extractLineIds(change.oldValue);
@@ -155,6 +155,85 @@ describe('mergeChanges tests', function () {
155
155
  ];
156
156
  expect(mergeChanges(metadata, changes, objectInfo, [])).toMatchObject([mergedChanges, []]);
157
157
  });
158
+ it('should not merge changes with the same paths, but different types', function () {
159
+ var _a;
160
+ var changes = (_a = {},
161
+ _a[entityUri] = [
162
+ {
163
+ attributePath: 'Identifiers/2BNyTheu/Type/2BNyU2yC',
164
+ attributeType: 'configuration/entityTypes/HCA/attributes/Identifiers/attributes/Type',
165
+ id: '58dpOzAR',
166
+ newPinOrIgnoreValue: false,
167
+ oldValue: {
168
+ value: 'ValueOld'
169
+ },
170
+ newValue: {
171
+ value: 'ValueNew'
172
+ },
173
+ type: DCRTypes.UPDATE_ATTRIBUTE
174
+ },
175
+ {
176
+ attributePath: 'Identifiers/2BNyTheu/Type/2BNyU2yC',
177
+ attributeType: 'configuration/entityTypes/HCA/attributes/Identifiers/attributes/Type',
178
+ id: '58dpP3Qh',
179
+ newPinOrIgnoreValue: true,
180
+ oldValue: {
181
+ value: 'ValueOld'
182
+ },
183
+ newValue: {
184
+ value: 'ValueOld'
185
+ },
186
+ type: DCRTypes.IGNORE_ATTRIBUTE
187
+ }
188
+ ],
189
+ _a);
190
+ var mergedChanges = [
191
+ {
192
+ level: 0,
193
+ label: 'Customer Identity',
194
+ attributeType: metadata.entityTypes[0].attributes[3],
195
+ attributeValue: {
196
+ id: '2BNyTheu',
197
+ value: {
198
+ Type: [
199
+ {
200
+ id: '2BNyU2yC',
201
+ value: changes[entityUri][0]
202
+ },
203
+ {
204
+ id: '2BNyU2yC',
205
+ value: changes[entityUri][1]
206
+ }
207
+ ]
208
+ }
209
+ }
210
+ },
211
+ {
212
+ attributeType: metadata.entityTypes[0].attributes[3].attributes[0],
213
+ newValue: {
214
+ value: 'ValueNew'
215
+ },
216
+ oldValue: {
217
+ value: 'ValueOld'
218
+ },
219
+ operation: 'edited',
220
+ label: 'Identity Type',
221
+ level: 1,
222
+ isReferenceSubAttribute: false
223
+ },
224
+ {
225
+ attributeType: metadata.entityTypes[0].attributes[3].attributes[0],
226
+ newValue: {
227
+ value: 'ValueOld'
228
+ },
229
+ operation: 'ignored',
230
+ label: 'Identity Type',
231
+ level: 1,
232
+ isReferenceSubAttribute: false
233
+ }
234
+ ];
235
+ expect(mergeChanges(metadata, changes, objectInfo, [])).toMatchObject([mergedChanges, []]);
236
+ });
158
237
  it('should merge special attributes', function () {
159
238
  var _a;
160
239
  var changes = (_a = {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.2202",
3
+ "version": "1.4.2204",
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.2005",
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 +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
- }); });