@reltio/components 1.4.2253 → 1.4.2254

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 (77) hide show
  1. package/ConfigureColumnsPopup/ConfigureColumnsPopup.d.ts +3 -3
  2. package/ConfigureColumnsPopup/ConfigureColumnsPopup.js +5 -5
  3. package/SelectionPopup/SelectionPopup.d.ts +4 -4
  4. package/SelectionPopup/SelectionPopup.js +4 -3
  5. package/SelectionPopup/SelectionPopup.spec.js +2 -2
  6. package/cjs/ConfigureColumnsPopup/ConfigureColumnsPopup.d.ts +3 -3
  7. package/cjs/ConfigureColumnsPopup/ConfigureColumnsPopup.js +5 -5
  8. package/cjs/SelectionPopup/SelectionPopup.d.ts +4 -4
  9. package/cjs/SelectionPopup/SelectionPopup.js +4 -3
  10. package/cjs/SelectionPopup/SelectionPopup.spec.js +2 -2
  11. package/cjs/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.js +22 -6
  12. package/cjs/features/workflow/ChangeRequestEditor/helpers/addedAttributes.js +5 -2
  13. package/cjs/features/workflow/ChangeRequestEditor/helpers/changesList.js +29 -13
  14. package/cjs/features/workflow/ChangeRequestEditor/helpers/changesList.test-data.d.ts +41 -0
  15. package/cjs/features/workflow/ChangeRequestEditor/helpers/changesList.test-data.js +161 -0
  16. package/cjs/features/workflow/ChangeRequestEditor/helpers/changesList.test.js +52 -0
  17. package/cjs/features/workflow/ChangeRequestEditor/helpers/helpers.d.ts +1 -1
  18. package/cjs/features/workflow/ChangeRequestEditor/helpers/helpers.js +2 -4
  19. package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.d.ts +2 -1
  20. package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +37 -3
  21. package/cjs/features/workflow/WorkflowTaskCard/components/DataChangeRequestTaskCard/DataChangeRequestTaskCard.js +2 -2
  22. package/cjs/features/workflow/contexts/AddedAttributesContext/index.d.ts +1 -0
  23. package/cjs/features/workflow/contexts/AddedAttributesContext/index.js +8 -3
  24. package/cjs/features/workflow/contexts/ChangeRequestEditorContext/index.d.ts +1 -0
  25. package/cjs/features/workflow/contexts/ChangeRequestEditorContext/index.js +8 -2
  26. package/cjs/features/workflow/helpers/attributes.js +5 -4
  27. package/cjs/features/workflow/helpers/attributes.test.js +55 -0
  28. package/cjs/features/workflow/helpers/common.d.ts +2 -1
  29. package/cjs/features/workflow/helpers/common.js +5 -1
  30. package/cjs/features/workflow/helpers/dcr.js +2 -1
  31. package/cjs/features/workflow/helpers/dcr.test.js +47 -0
  32. package/cjs/features/workflow/helpers/merge.js +1 -1
  33. package/cjs/features/workflow/helpers/merge.test.js +34 -0
  34. package/cjs/features/workflow/helpers/metadata.test-data.js +9 -0
  35. package/cjs/features/workflow/helpers/validation.js +3 -2
  36. package/cjs/features/workflow/helpers/validation.test-data.d.ts +1 -0
  37. package/cjs/features/workflow/helpers/validation.test-data.js +34 -1
  38. package/cjs/features/workflow/helpers/validation.test.js +10 -0
  39. package/cjs/features/workflow/hooks/useChangeRequest.d.ts +1 -0
  40. package/cjs/features/workflow/hooks/useChangeRequest.js +8 -5
  41. package/cjs/features/workflow/hooks/useChangeRequest.test.js +11 -5
  42. package/cjs/features/workflow/hooks/useWorkflowActions.d.ts +2 -1
  43. package/cjs/features/workflow/hooks/useWorkflowActions.js +8 -3
  44. package/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.js +23 -7
  45. package/features/workflow/ChangeRequestEditor/helpers/addedAttributes.js +5 -2
  46. package/features/workflow/ChangeRequestEditor/helpers/changesList.js +29 -13
  47. package/features/workflow/ChangeRequestEditor/helpers/changesList.test-data.d.ts +41 -0
  48. package/features/workflow/ChangeRequestEditor/helpers/changesList.test-data.js +153 -0
  49. package/features/workflow/ChangeRequestEditor/helpers/changesList.test.js +52 -0
  50. package/features/workflow/ChangeRequestEditor/helpers/helpers.d.ts +1 -1
  51. package/features/workflow/ChangeRequestEditor/helpers/helpers.js +1 -3
  52. package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.d.ts +2 -1
  53. package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +14 -3
  54. package/features/workflow/WorkflowTaskCard/components/DataChangeRequestTaskCard/DataChangeRequestTaskCard.js +2 -2
  55. package/features/workflow/contexts/AddedAttributesContext/index.d.ts +1 -0
  56. package/features/workflow/contexts/AddedAttributesContext/index.js +8 -3
  57. package/features/workflow/contexts/ChangeRequestEditorContext/index.d.ts +1 -0
  58. package/features/workflow/contexts/ChangeRequestEditorContext/index.js +8 -2
  59. package/features/workflow/helpers/attributes.js +5 -4
  60. package/features/workflow/helpers/attributes.test.js +55 -0
  61. package/features/workflow/helpers/common.d.ts +2 -1
  62. package/features/workflow/helpers/common.js +3 -0
  63. package/features/workflow/helpers/dcr.js +2 -1
  64. package/features/workflow/helpers/dcr.test.js +47 -0
  65. package/features/workflow/helpers/merge.js +2 -2
  66. package/features/workflow/helpers/merge.test.js +34 -0
  67. package/features/workflow/helpers/metadata.test-data.js +9 -0
  68. package/features/workflow/helpers/validation.js +3 -2
  69. package/features/workflow/helpers/validation.test-data.d.ts +1 -0
  70. package/features/workflow/helpers/validation.test-data.js +32 -0
  71. package/features/workflow/helpers/validation.test.js +11 -1
  72. package/features/workflow/hooks/useChangeRequest.d.ts +1 -0
  73. package/features/workflow/hooks/useChangeRequest.js +8 -5
  74. package/features/workflow/hooks/useChangeRequest.test.js +11 -5
  75. package/features/workflow/hooks/useWorkflowActions.d.ts +2 -1
  76. package/features/workflow/hooks/useWorkflowActions.js +8 -3
  77. package/package.json +1 -1
@@ -43,7 +43,7 @@ import { useMdmTenant, useMdmUsername, useMdmWorkflowEnvironmentUrl, useMdmWorkf
43
43
  import { useCommentDialog } from '../../../contexts/CommentDialogContext';
44
44
  import { showDefaultErrorMessage } from '../../../helpers/errors';
45
45
  export var useWorkflowActions = function (_a) {
46
- var task = _a.task, onActionSuccess = _a.onActionSuccess, beforeAction = _a.beforeAction;
46
+ var task = _a.task, onActionSuccess = _a.onActionSuccess, onError = _a.onError, beforeAction = _a.beforeAction;
47
47
  var _b = task !== null && task !== void 0 ? task : {}, possibleActions = _b.possibleActions, assignee = _b.assignee, taskId = _b.taskId, isOpen = _b.isOpen;
48
48
  var workflowTasks = useContext(WorkflowTasksContext);
49
49
  var workflowPath = useMdmWorkflowPath();
@@ -82,6 +82,7 @@ export var useWorkflowActions = function (_a) {
82
82
  if (!outcome.proceed) {
83
83
  if (outcome.error) {
84
84
  showDefaultErrorMessage(outcome.error);
85
+ onError === null || onError === void 0 ? void 0 : onError();
85
86
  }
86
87
  setActionRequestIsInProgress(false);
87
88
  return [2 /*return*/];
@@ -90,6 +91,7 @@ export var useWorkflowActions = function (_a) {
90
91
  case 5:
91
92
  error_1 = _a.sent();
92
93
  showDefaultErrorMessage(error_1);
94
+ onError === null || onError === void 0 ? void 0 : onError();
93
95
  setActionRequestIsInProgress(false);
94
96
  return [2 /*return*/];
95
97
  case 6:
@@ -104,7 +106,10 @@ export var useWorkflowActions = function (_a) {
104
106
  .then(function () {
105
107
  handleActionSuccess === null || handleActionSuccess === void 0 ? void 0 : handleActionSuccess(action);
106
108
  })
107
- .catch(showWorkflowError)
109
+ .catch(function (error) {
110
+ showWorkflowError(error);
111
+ onError === null || onError === void 0 ? void 0 : onError();
112
+ })
108
113
  .finally(function () {
109
114
  setActionRequestIsInProgress(false);
110
115
  });
@@ -113,7 +118,7 @@ export var useWorkflowActions = function (_a) {
113
118
  }
114
119
  });
115
120
  }); };
116
- }, [workflowPath, taskId, environment, tenant, handleActionSuccess, showCommentDialog, beforeAction]);
121
+ }, [workflowPath, taskId, environment, tenant, handleActionSuccess, showCommentDialog, beforeAction, onError]);
117
122
  var actions = useMemo(function () {
118
123
  return username === assignee && isOpenTask(isOpen)
119
124
  ? (possibleActions || []).map(function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.2253",
3
+ "version": "1.4.2254",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./index.js",