@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.
- package/ConfigureColumnsPopup/ConfigureColumnsPopup.d.ts +3 -3
- package/ConfigureColumnsPopup/ConfigureColumnsPopup.js +5 -5
- package/SelectionPopup/SelectionPopup.d.ts +4 -4
- package/SelectionPopup/SelectionPopup.js +4 -3
- package/SelectionPopup/SelectionPopup.spec.js +2 -2
- package/cjs/ConfigureColumnsPopup/ConfigureColumnsPopup.d.ts +3 -3
- package/cjs/ConfigureColumnsPopup/ConfigureColumnsPopup.js +5 -5
- package/cjs/SelectionPopup/SelectionPopup.d.ts +4 -4
- package/cjs/SelectionPopup/SelectionPopup.js +4 -3
- package/cjs/SelectionPopup/SelectionPopup.spec.js +2 -2
- package/cjs/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.js +22 -6
- package/cjs/features/workflow/ChangeRequestEditor/helpers/addedAttributes.js +5 -2
- package/cjs/features/workflow/ChangeRequestEditor/helpers/changesList.js +29 -13
- package/cjs/features/workflow/ChangeRequestEditor/helpers/changesList.test-data.d.ts +41 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/changesList.test-data.js +161 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/changesList.test.js +52 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/helpers.d.ts +1 -1
- package/cjs/features/workflow/ChangeRequestEditor/helpers/helpers.js +2 -4
- package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.d.ts +2 -1
- package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +37 -3
- package/cjs/features/workflow/WorkflowTaskCard/components/DataChangeRequestTaskCard/DataChangeRequestTaskCard.js +2 -2
- package/cjs/features/workflow/contexts/AddedAttributesContext/index.d.ts +1 -0
- package/cjs/features/workflow/contexts/AddedAttributesContext/index.js +8 -3
- package/cjs/features/workflow/contexts/ChangeRequestEditorContext/index.d.ts +1 -0
- package/cjs/features/workflow/contexts/ChangeRequestEditorContext/index.js +8 -2
- package/cjs/features/workflow/helpers/attributes.js +5 -4
- package/cjs/features/workflow/helpers/attributes.test.js +55 -0
- package/cjs/features/workflow/helpers/common.d.ts +2 -1
- package/cjs/features/workflow/helpers/common.js +5 -1
- package/cjs/features/workflow/helpers/dcr.js +2 -1
- package/cjs/features/workflow/helpers/dcr.test.js +47 -0
- package/cjs/features/workflow/helpers/merge.js +1 -1
- package/cjs/features/workflow/helpers/merge.test.js +34 -0
- package/cjs/features/workflow/helpers/metadata.test-data.js +9 -0
- package/cjs/features/workflow/helpers/validation.js +3 -2
- package/cjs/features/workflow/helpers/validation.test-data.d.ts +1 -0
- package/cjs/features/workflow/helpers/validation.test-data.js +34 -1
- package/cjs/features/workflow/helpers/validation.test.js +10 -0
- package/cjs/features/workflow/hooks/useChangeRequest.d.ts +1 -0
- package/cjs/features/workflow/hooks/useChangeRequest.js +8 -5
- package/cjs/features/workflow/hooks/useChangeRequest.test.js +11 -5
- package/cjs/features/workflow/hooks/useWorkflowActions.d.ts +2 -1
- package/cjs/features/workflow/hooks/useWorkflowActions.js +8 -3
- package/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.js +23 -7
- package/features/workflow/ChangeRequestEditor/helpers/addedAttributes.js +5 -2
- package/features/workflow/ChangeRequestEditor/helpers/changesList.js +29 -13
- package/features/workflow/ChangeRequestEditor/helpers/changesList.test-data.d.ts +41 -0
- package/features/workflow/ChangeRequestEditor/helpers/changesList.test-data.js +153 -0
- package/features/workflow/ChangeRequestEditor/helpers/changesList.test.js +52 -0
- package/features/workflow/ChangeRequestEditor/helpers/helpers.d.ts +1 -1
- package/features/workflow/ChangeRequestEditor/helpers/helpers.js +1 -3
- package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.d.ts +2 -1
- package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +14 -3
- package/features/workflow/WorkflowTaskCard/components/DataChangeRequestTaskCard/DataChangeRequestTaskCard.js +2 -2
- package/features/workflow/contexts/AddedAttributesContext/index.d.ts +1 -0
- package/features/workflow/contexts/AddedAttributesContext/index.js +8 -3
- package/features/workflow/contexts/ChangeRequestEditorContext/index.d.ts +1 -0
- package/features/workflow/contexts/ChangeRequestEditorContext/index.js +8 -2
- package/features/workflow/helpers/attributes.js +5 -4
- package/features/workflow/helpers/attributes.test.js +55 -0
- package/features/workflow/helpers/common.d.ts +2 -1
- package/features/workflow/helpers/common.js +3 -0
- package/features/workflow/helpers/dcr.js +2 -1
- package/features/workflow/helpers/dcr.test.js +47 -0
- package/features/workflow/helpers/merge.js +2 -2
- package/features/workflow/helpers/merge.test.js +34 -0
- package/features/workflow/helpers/metadata.test-data.js +9 -0
- package/features/workflow/helpers/validation.js +3 -2
- package/features/workflow/helpers/validation.test-data.d.ts +1 -0
- package/features/workflow/helpers/validation.test-data.js +32 -0
- package/features/workflow/helpers/validation.test.js +11 -1
- package/features/workflow/hooks/useChangeRequest.d.ts +1 -0
- package/features/workflow/hooks/useChangeRequest.js +8 -5
- package/features/workflow/hooks/useChangeRequest.test.js +11 -5
- package/features/workflow/hooks/useWorkflowActions.d.ts +2 -1
- package/features/workflow/hooks/useWorkflowActions.js +8 -3
- 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(
|
|
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) {
|