@reltio/components 1.4.2190 → 1.4.2191
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/ProfileBand/ProfileBand.d.ts +5 -4
- package/ProfileBand/ProfileBand.js +4 -5
- package/ProfileBand/ProfileBand.module.css.js +9 -0
- package/cjs/ProfileBand/ProfileBand.d.ts +5 -4
- package/cjs/ProfileBand/ProfileBand.js +14 -15
- package/cjs/ProfileBand/ProfileBand.module.css.js +9 -0
- package/cjs/contexts/MdmModuleContext/context.d.ts +2 -0
- package/cjs/contexts/MdmModuleContext/hooks.d.ts +1 -0
- package/cjs/contexts/MdmModuleContext/hooks.js +3 -1
- package/cjs/contexts/MdmModuleContext/index.d.ts +1 -1
- package/cjs/contexts/MdmModuleContext/index.js +2 -1
- package/cjs/features/history/HistoryRow/styles.d.ts +1 -1
- package/cjs/features/workflow/ChangeRequestEditor/ChangeRequestEditor.d.ts +8 -0
- package/cjs/features/workflow/ChangeRequestEditor/ChangeRequestEditor.js +18 -0
- package/cjs/features/workflow/ChangeRequestEditor/ChangeRequestEditor.module.css.js +9 -0
- package/cjs/features/workflow/ChangeRequestEditor/index.d.ts +1 -0
- package/cjs/features/workflow/ChangeRequestEditor/index.js +5 -0
- package/cjs/features/workflow/ReviewDCRButton/ReviewDCRButton.d.ts +6 -0
- package/cjs/features/workflow/ReviewDCRButton/ReviewDCRButton.js +19 -0
- package/cjs/features/workflow/ReviewDCRButton/ReviewDCRButton.module.css.js +9 -0
- package/cjs/features/workflow/ReviewDCRButton/index.d.ts +1 -0
- package/cjs/features/workflow/ReviewDCRButton/index.js +5 -0
- package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.d.ts +11 -0
- package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +63 -0
- package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.module.css.js +9 -0
- package/cjs/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.d.ts +8 -0
- package/cjs/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.js +73 -0
- package/cjs/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.module.css.js +9 -0
- package/cjs/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/index.d.ts +1 -0
- package/cjs/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/index.js +5 -0
- package/cjs/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.d.ts +9 -0
- package/cjs/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.js +40 -0
- package/cjs/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.module.css.js +9 -0
- package/cjs/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.d.ts +3 -0
- package/cjs/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.js +19 -0
- package/cjs/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.test.d.ts +1 -0
- package/cjs/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.test.js +124 -0
- package/cjs/features/workflow/ReviewDCRDialog/helpers/index.d.ts +1 -0
- package/cjs/features/workflow/ReviewDCRDialog/helpers/index.js +5 -0
- package/cjs/features/workflow/ReviewDCRDialog/index.d.ts +1 -0
- package/cjs/features/workflow/ReviewDCRDialog/index.js +5 -0
- package/cjs/features/workflow/WorkflowActionButtons/WorkflowActionButtons.d.ts +12 -0
- package/cjs/features/workflow/WorkflowActionButtons/WorkflowActionButtons.js +57 -0
- package/cjs/features/workflow/WorkflowActionButtons/index.d.ts +1 -0
- package/cjs/features/workflow/WorkflowActionButtons/index.js +5 -0
- package/cjs/features/workflow/WorkflowComments/WorkflowComments.d.ts +7 -1
- package/cjs/features/workflow/WorkflowComments/WorkflowComments.js +15 -31
- package/cjs/features/workflow/WorkflowComments/WorkflowComments.module.css.js +9 -0
- package/cjs/features/workflow/WorkflowTaskCard/components/DataChangeRequestTaskCard/DataChangeRequestTaskCard.js +46 -6
- package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.d.ts +2 -1
- package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.js +30 -29
- package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.module.css.js +9 -0
- package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.spec.js +20 -2
- package/cjs/features/workflow/index.d.ts +2 -0
- package/cjs/features/workflow/index.js +5 -1
- package/cjs/icons/RequestSummary.d.ts +3 -0
- package/cjs/icons/RequestSummary.js +24 -0
- package/cjs/icons/ReviewDCR.d.ts +3 -0
- package/cjs/icons/ReviewDCR.js +22 -0
- package/contexts/MdmModuleContext/context.d.ts +2 -0
- package/contexts/MdmModuleContext/hooks.d.ts +1 -0
- package/contexts/MdmModuleContext/hooks.js +1 -0
- package/contexts/MdmModuleContext/index.d.ts +1 -1
- package/contexts/MdmModuleContext/index.js +1 -1
- package/features/history/HistoryRow/styles.d.ts +1 -1
- package/features/workflow/ChangeRequestEditor/ChangeRequestEditor.d.ts +8 -0
- package/features/workflow/ChangeRequestEditor/ChangeRequestEditor.js +11 -0
- package/features/workflow/ChangeRequestEditor/ChangeRequestEditor.module.css.js +9 -0
- package/features/workflow/ChangeRequestEditor/index.d.ts +1 -0
- package/features/workflow/ChangeRequestEditor/index.js +1 -0
- package/features/workflow/ReviewDCRButton/ReviewDCRButton.d.ts +6 -0
- package/features/workflow/ReviewDCRButton/ReviewDCRButton.js +12 -0
- package/features/workflow/ReviewDCRButton/ReviewDCRButton.module.css.js +9 -0
- package/features/workflow/ReviewDCRButton/index.d.ts +1 -0
- package/features/workflow/ReviewDCRButton/index.js +1 -0
- package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.d.ts +11 -0
- package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +56 -0
- package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.module.css.js +9 -0
- package/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.d.ts +8 -0
- package/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.js +43 -0
- package/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.module.css.js +9 -0
- package/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/index.d.ts +1 -0
- package/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/index.js +1 -0
- package/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.d.ts +9 -0
- package/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.js +33 -0
- package/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.module.css.js +9 -0
- package/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.d.ts +3 -0
- package/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.js +15 -0
- package/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.test.d.ts +1 -0
- package/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.test.js +122 -0
- package/features/workflow/ReviewDCRDialog/helpers/index.d.ts +1 -0
- package/features/workflow/ReviewDCRDialog/helpers/index.js +1 -0
- package/features/workflow/ReviewDCRDialog/index.d.ts +1 -0
- package/features/workflow/ReviewDCRDialog/index.js +1 -0
- package/features/workflow/WorkflowActionButtons/WorkflowActionButtons.d.ts +12 -0
- package/features/workflow/WorkflowActionButtons/WorkflowActionButtons.js +27 -0
- package/features/workflow/WorkflowActionButtons/index.d.ts +1 -0
- package/features/workflow/WorkflowActionButtons/index.js +1 -0
- package/features/workflow/WorkflowComments/WorkflowComments.d.ts +7 -1
- package/features/workflow/WorkflowComments/WorkflowComments.js +13 -29
- package/features/workflow/WorkflowComments/WorkflowComments.module.css.js +9 -0
- package/features/workflow/WorkflowTaskCard/components/DataChangeRequestTaskCard/DataChangeRequestTaskCard.js +23 -6
- package/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.d.ts +2 -1
- package/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.js +8 -7
- package/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.module.css.js +9 -0
- package/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.spec.js +20 -2
- package/features/workflow/index.d.ts +2 -0
- package/features/workflow/index.js +2 -0
- package/icons/RequestSummary.d.ts +3 -0
- package/icons/RequestSummary.js +19 -0
- package/icons/ReviewDCR.d.ts +3 -0
- package/icons/ReviewDCR.js +17 -0
- package/package.json +2 -2
- package/ProfileBand/styles.d.ts +0 -1
- package/ProfileBand/styles.js +0 -87
- package/cjs/ProfileBand/styles.d.ts +0 -1
- package/cjs/ProfileBand/styles.js +0 -90
- package/cjs/features/workflow/WorkflowComments/styles.d.ts +0 -1
- package/cjs/features/workflow/WorkflowComments/styles.js +0 -42
- package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/styles.d.ts +0 -3
- package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/styles.js +0 -113
- package/features/workflow/WorkflowComments/styles.d.ts +0 -1
- package/features/workflow/WorkflowComments/styles.js +0 -39
- package/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/styles.d.ts +0 -3
- package/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/styles.js +0 -110
|
@@ -5,6 +5,8 @@ export { AssigneeSelector } from './AssigneeSelector';
|
|
|
5
5
|
export { ReassignButton } from './ReassignButton';
|
|
6
6
|
export { WorkflowComments } from './WorkflowComments';
|
|
7
7
|
export { TaskActionButtons } from './TaskActionButtons';
|
|
8
|
+
export { ReviewDCRButton } from './ReviewDCRButton';
|
|
9
|
+
export { ReviewDCRDialog } from './ReviewDCRDialog';
|
|
8
10
|
export { useWorkflowAssignee } from './hooks/useWorkflowAssignee';
|
|
9
11
|
export { useWorkflowComments } from './hooks/useWorkflowComments';
|
|
10
12
|
export { useWorkflowActions } from './hooks/useWorkflowActions';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findWorkflowDefinitionByType = exports.useWorkflowDefaultActionSuccessHandler = exports.useWorkflowTasks = exports.useWorkflowCheckPermission = exports.useWorkflowActions = exports.useWorkflowComments = exports.useWorkflowAssignee = exports.TaskActionButtons = exports.WorkflowComments = exports.ReassignButton = exports.AssigneeSelector = exports.TaskActions = exports.AddWorkflowButton = exports.WorkflowTaskCard = void 0;
|
|
3
|
+
exports.findWorkflowDefinitionByType = exports.useWorkflowDefaultActionSuccessHandler = exports.useWorkflowTasks = exports.useWorkflowCheckPermission = exports.useWorkflowActions = exports.useWorkflowComments = exports.useWorkflowAssignee = exports.ReviewDCRDialog = exports.ReviewDCRButton = exports.TaskActionButtons = exports.WorkflowComments = exports.ReassignButton = exports.AssigneeSelector = exports.TaskActions = exports.AddWorkflowButton = exports.WorkflowTaskCard = void 0;
|
|
4
4
|
// components
|
|
5
5
|
var WorkflowTaskCard_1 = require("./WorkflowTaskCard");
|
|
6
6
|
Object.defineProperty(exports, "WorkflowTaskCard", { enumerable: true, get: function () { return WorkflowTaskCard_1.WorkflowTaskCard; } });
|
|
@@ -16,6 +16,10 @@ var WorkflowComments_1 = require("./WorkflowComments");
|
|
|
16
16
|
Object.defineProperty(exports, "WorkflowComments", { enumerable: true, get: function () { return WorkflowComments_1.WorkflowComments; } });
|
|
17
17
|
var TaskActionButtons_1 = require("./TaskActionButtons");
|
|
18
18
|
Object.defineProperty(exports, "TaskActionButtons", { enumerable: true, get: function () { return TaskActionButtons_1.TaskActionButtons; } });
|
|
19
|
+
var ReviewDCRButton_1 = require("./ReviewDCRButton");
|
|
20
|
+
Object.defineProperty(exports, "ReviewDCRButton", { enumerable: true, get: function () { return ReviewDCRButton_1.ReviewDCRButton; } });
|
|
21
|
+
var ReviewDCRDialog_1 = require("./ReviewDCRDialog");
|
|
22
|
+
Object.defineProperty(exports, "ReviewDCRDialog", { enumerable: true, get: function () { return ReviewDCRDialog_1.ReviewDCRDialog; } });
|
|
19
23
|
// hooks
|
|
20
24
|
var useWorkflowAssignee_1 = require("./hooks/useWorkflowAssignee");
|
|
21
25
|
Object.defineProperty(exports, "useWorkflowAssignee", { enumerable: true, get: function () { return useWorkflowAssignee_1.useWorkflowAssignee; } });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var SvgRequestSummary = function (props) {
|
|
19
|
+
return (react_1.default.createElement("svg", __assign({ width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-reltio-id": "SvgRequestSummary" }, props),
|
|
20
|
+
react_1.default.createElement("ellipse", { cx: "15.972", cy: "16", rx: "15.972", ry: "16", fill: "#1D4E99" }),
|
|
21
|
+
react_1.default.createElement("path", { opacity: "0.54", d: "M24.4771 14.7002C23.972 14.3772 23.4183 14.1244 22.8286 13.9561V8.42871H8.50342V19.415H14.8589C14.8411 19.6077 14.8316 19.8027 14.8315 20C14.8315 20.3358 14.8581 20.6657 14.9087 20.9873H6.84521V6.85742H24.4771V14.7002ZM11.8091 17.8428H10.1519V16.2803H11.8091V17.8428ZM16.0483 16.2803C15.7 16.7547 15.4168 17.2799 15.2114 17.8428H13.4575V16.2803H16.0483ZM11.8091 14.708H10.1519V13.1357H11.8091V14.708ZM21.1714 13.7158C21.1496 13.7156 21.1278 13.7148 21.106 13.7148C19.8597 13.7148 18.6995 14.0804 17.7231 14.708H13.4575V13.1357H21.1714V13.7158ZM11.8091 11.5645H10.1519V10.001H11.8091V11.5645ZM21.1714 11.5645H13.4575V10.001H21.1714V11.5645Z", fill: "white" }),
|
|
22
|
+
react_1.default.createElement("path", { opacity: "0.87", d: "M21.106 14.8574C22.2479 14.8575 23.3031 15.2315 24.1558 15.8633L23.2349 16.7861C22.6252 16.3801 21.8929 16.1426 21.106 16.1426C18.9797 16.1428 17.2565 17.87 17.2563 20C17.2563 22.1301 18.9796 23.8572 21.106 23.8574C23.0435 23.8572 24.6461 22.4229 24.9155 20.5566L26.189 19.2822C26.2217 19.5168 26.2407 19.7564 26.2407 20C26.2407 22.8402 23.9412 25.1424 21.106 25.1426C18.2708 25.1423 15.9722 22.8402 15.9722 20C15.9723 17.16 18.2709 14.8577 21.106 14.8574ZM26.7075 17.208L21.2622 22.6631L20.354 21.7539V21.7529L18.5396 19.9355L19.4468 19.0264L21.2612 20.8438L25.7993 16.2988L26.7075 17.208Z", fill: "white" })));
|
|
23
|
+
};
|
|
24
|
+
exports.default = SvgRequestSummary;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var SvgReviewDCR = function (props) {
|
|
19
|
+
return (react_1.default.createElement("svg", __assign({ width: "16", height: "15", viewBox: "0 0 16 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
20
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.5 9H5.51415C5.53356 8.74392 5.57268 8.49341 5.63 8.25H2.5V6.75H6.26449C6.43659 6.48075 6.63444 6.2296 6.85458 6H2.5V4.5H10V4.51415C10.1238 4.50477 10.2488 4.5 10.375 4.5C11.0397 4.5 11.673 4.63248 12.25 4.87252V1.5C12.25 0.675 11.575 0 10.75 0H1.75C0.925 0 0.25 0.675 0.25 1.5V11.25C0.25 12.075 0.925 12.75 1.75 12.75H6.85373C6.26293 12.1331 5.8327 11.3608 5.63001 10.5H2.5V9ZM10 3.75H2.5V2.25H10V3.75ZM13.225 11.1675L15.565 13.5L14.5 14.565L12.16 12.225C11.6425 12.555 11.0275 12.75 10.3675 12.75C8.5075 12.75 7 11.2425 7 9.375C7 7.5075 8.5075 6 10.375 6C12.2425 6 13.75 7.5075 13.75 9.375C13.75 10.035 13.555 10.6425 13.225 11.1675ZM10.375 11.25C11.41 11.25 12.25 10.41 12.25 9.375C12.25 8.34 11.41 7.5 10.375 7.5C9.34 7.5 8.5 8.34 8.5 9.375C8.5 10.41 9.34 11.25 10.375 11.25Z", fill: "#0072CE" })));
|
|
21
|
+
};
|
|
22
|
+
exports.default = SvgReviewDCR;
|
|
@@ -56,6 +56,7 @@ export type MdmModuleValuesContextProps = Partial<{
|
|
|
56
56
|
uiConfigLayout: Layout;
|
|
57
57
|
uiConfigProfile: Profile;
|
|
58
58
|
showMasking: boolean;
|
|
59
|
+
reviewDCREnabled: boolean;
|
|
59
60
|
}>;
|
|
60
61
|
export type MdmModuleActionsContextProps = Partial<{
|
|
61
62
|
openSearch: (payload: SearchState) => void;
|
|
@@ -260,6 +261,7 @@ export declare const MdmModuleValuesContext: import("@fluentui/react-context-sel
|
|
|
260
261
|
uiConfigLayout: Layout;
|
|
261
262
|
uiConfigProfile: Profile;
|
|
262
263
|
showMasking: boolean;
|
|
264
|
+
reviewDCREnabled: boolean;
|
|
263
265
|
}>>;
|
|
264
266
|
export declare const MdmModuleListenersContext: import("@fluentui/react-context-selector").Context<Partial<{
|
|
265
267
|
expandInvalidRelatonsListener: (callback: () => void) => (action: any) => void;
|
|
@@ -151,3 +151,4 @@ export declare const useMdmListener: <T extends keyof MdmModuleListenersContextP
|
|
|
151
151
|
export declare const useMdmHiddenAttributes: () => Record<string, string[]>;
|
|
152
152
|
export declare const useMdmControlAttributes: () => string[];
|
|
153
153
|
export declare const useMdmShowMasking: () => boolean;
|
|
154
|
+
export declare const useMdmReviewDCREnabled: () => boolean;
|
|
@@ -160,3 +160,4 @@ export var useMdmControlAttributes = function () {
|
|
|
160
160
|
return useMdmModuleValuesContext(function (context) { return context.controlAttributes || emptyControlAttributes; });
|
|
161
161
|
};
|
|
162
162
|
export var useMdmShowMasking = function () { return useMdmModuleValuesContext(function (context) { return context.showMasking; }); };
|
|
163
|
+
export var useMdmReviewDCREnabled = function () { return useMdmModuleValuesContext(function (context) { return context.reviewDCREnabled; }); };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { MdmModuleProvider } from './provider';
|
|
2
|
-
export { useMdmAutoCloseInterval, useMdmUiError, useMdmWorkflowEnvironmentUrl, useMdmExportPath, useMdmAbsoluteImagePath, useMdmUiPath, useMdmDtssPath, useMdmServicesPath, useMdmWorkflowPath, useMdmImageServicePath, useMdmReltioPath, useMdmApiPath, useMdmCollaborationPath, useMdmImageAttributesFieldsOrder, useMdmShowEntityId, useMdmPivotingAttributes, useMdmDateMask, useMdmDateTimeMask, useMdmAttributesPresentation, useMdmMaxValuesInResponse, useMdmAttributesSortingStrategy, useMdmLookupAutocomplete, useMdmModifiedEntities, useMdmEntity, useMdmEntityUri, useMdmEntityWithDiff, useMdmEntityUriWithDataTenant, useMdmMode, useMdmIsViewMode, useMdmIsEditableMode, useMdmHistoryDiff, useMdmHistoryMode, useMdmHistorySlice, useMdmHistoryEvent, useMdmProfileLastLoadedTime, useMdmLookups, useMdmDependentLookups, useMdmMetadata, useMdmUser, useMdmUsername, useMdmUserRoles, useMdmTenantObject, useMdmTenant, useMdmTenantName, useMdmEnvironment, useMdmDataTenants, useMdmSearchNavigationData, useMdmSearchProviderData, useMdmIsCollaborationEnabled, useMdmIsWorkflowEnabled, useMdmProfileErrors, useMdmRelationsDrafts, useMdmModifiedEntityDefaultProfilePic, useMdmModifiedEntity, useMdmInitialConnectionTempEntity, useMdmInitialConnection, useMdmDependentLookupEditorState, useMdmActiveErrorsForAttributesPager, useMdmDependentLookupsStructureNode, useMdmAllRelationsToAddAndEdit, useMdmDependentLookupEditorContext, useMdmGlobalSearchRequestOptions, useMdmAuthoringItemsByEntityType, useMdmAction, useMdmListener, useMdmIsSourcesScreenEnabled, useMdmHiddenAttributes, useMdmControlAttributes, useMdmShowMasking } from './hooks';
|
|
2
|
+
export { useMdmAutoCloseInterval, useMdmUiError, useMdmWorkflowEnvironmentUrl, useMdmExportPath, useMdmAbsoluteImagePath, useMdmUiPath, useMdmDtssPath, useMdmServicesPath, useMdmWorkflowPath, useMdmImageServicePath, useMdmReltioPath, useMdmApiPath, useMdmCollaborationPath, useMdmImageAttributesFieldsOrder, useMdmShowEntityId, useMdmPivotingAttributes, useMdmDateMask, useMdmDateTimeMask, useMdmAttributesPresentation, useMdmMaxValuesInResponse, useMdmAttributesSortingStrategy, useMdmLookupAutocomplete, useMdmModifiedEntities, useMdmEntity, useMdmEntityUri, useMdmEntityWithDiff, useMdmEntityUriWithDataTenant, useMdmMode, useMdmIsViewMode, useMdmIsEditableMode, useMdmHistoryDiff, useMdmHistoryMode, useMdmHistorySlice, useMdmHistoryEvent, useMdmProfileLastLoadedTime, useMdmLookups, useMdmDependentLookups, useMdmMetadata, useMdmUser, useMdmUsername, useMdmUserRoles, useMdmTenantObject, useMdmTenant, useMdmTenantName, useMdmEnvironment, useMdmDataTenants, useMdmSearchNavigationData, useMdmSearchProviderData, useMdmIsCollaborationEnabled, useMdmIsWorkflowEnabled, useMdmProfileErrors, useMdmRelationsDrafts, useMdmModifiedEntityDefaultProfilePic, useMdmModifiedEntity, useMdmInitialConnectionTempEntity, useMdmInitialConnection, useMdmDependentLookupEditorState, useMdmActiveErrorsForAttributesPager, useMdmDependentLookupsStructureNode, useMdmAllRelationsToAddAndEdit, useMdmDependentLookupEditorContext, useMdmGlobalSearchRequestOptions, useMdmAuthoringItemsByEntityType, useMdmAction, useMdmListener, useMdmIsSourcesScreenEnabled, useMdmHiddenAttributes, useMdmControlAttributes, useMdmShowMasking, useMdmReviewDCREnabled } from './hooks';
|
|
3
3
|
export type { MdmModuleActionsContextProps, MdmModuleValuesContextProps, MdmModuleListenersContextProps } from './context';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { MdmModuleProvider } from './provider';
|
|
2
|
-
export { useMdmAutoCloseInterval, useMdmUiError, useMdmWorkflowEnvironmentUrl, useMdmExportPath, useMdmAbsoluteImagePath, useMdmUiPath, useMdmDtssPath, useMdmServicesPath, useMdmWorkflowPath, useMdmImageServicePath, useMdmReltioPath, useMdmApiPath, useMdmCollaborationPath, useMdmImageAttributesFieldsOrder, useMdmShowEntityId, useMdmPivotingAttributes, useMdmDateMask, useMdmDateTimeMask, useMdmAttributesPresentation, useMdmMaxValuesInResponse, useMdmAttributesSortingStrategy, useMdmLookupAutocomplete, useMdmModifiedEntities, useMdmEntity, useMdmEntityUri, useMdmEntityWithDiff, useMdmEntityUriWithDataTenant, useMdmMode, useMdmIsViewMode, useMdmIsEditableMode, useMdmHistoryDiff, useMdmHistoryMode, useMdmHistorySlice, useMdmHistoryEvent, useMdmProfileLastLoadedTime, useMdmLookups, useMdmDependentLookups, useMdmMetadata, useMdmUser, useMdmUsername, useMdmUserRoles, useMdmTenantObject, useMdmTenant, useMdmTenantName, useMdmEnvironment, useMdmDataTenants, useMdmSearchNavigationData, useMdmSearchProviderData, useMdmIsCollaborationEnabled, useMdmIsWorkflowEnabled, useMdmProfileErrors, useMdmRelationsDrafts, useMdmModifiedEntityDefaultProfilePic, useMdmModifiedEntity, useMdmInitialConnectionTempEntity, useMdmInitialConnection, useMdmDependentLookupEditorState, useMdmActiveErrorsForAttributesPager, useMdmDependentLookupsStructureNode, useMdmAllRelationsToAddAndEdit, useMdmDependentLookupEditorContext, useMdmGlobalSearchRequestOptions, useMdmAuthoringItemsByEntityType, useMdmAction, useMdmListener, useMdmIsSourcesScreenEnabled, useMdmHiddenAttributes, useMdmControlAttributes, useMdmShowMasking } from './hooks';
|
|
2
|
+
export { useMdmAutoCloseInterval, useMdmUiError, useMdmWorkflowEnvironmentUrl, useMdmExportPath, useMdmAbsoluteImagePath, useMdmUiPath, useMdmDtssPath, useMdmServicesPath, useMdmWorkflowPath, useMdmImageServicePath, useMdmReltioPath, useMdmApiPath, useMdmCollaborationPath, useMdmImageAttributesFieldsOrder, useMdmShowEntityId, useMdmPivotingAttributes, useMdmDateMask, useMdmDateTimeMask, useMdmAttributesPresentation, useMdmMaxValuesInResponse, useMdmAttributesSortingStrategy, useMdmLookupAutocomplete, useMdmModifiedEntities, useMdmEntity, useMdmEntityUri, useMdmEntityWithDiff, useMdmEntityUriWithDataTenant, useMdmMode, useMdmIsViewMode, useMdmIsEditableMode, useMdmHistoryDiff, useMdmHistoryMode, useMdmHistorySlice, useMdmHistoryEvent, useMdmProfileLastLoadedTime, useMdmLookups, useMdmDependentLookups, useMdmMetadata, useMdmUser, useMdmUsername, useMdmUserRoles, useMdmTenantObject, useMdmTenant, useMdmTenantName, useMdmEnvironment, useMdmDataTenants, useMdmSearchNavigationData, useMdmSearchProviderData, useMdmIsCollaborationEnabled, useMdmIsWorkflowEnabled, useMdmProfileErrors, useMdmRelationsDrafts, useMdmModifiedEntityDefaultProfilePic, useMdmModifiedEntity, useMdmInitialConnectionTempEntity, useMdmInitialConnection, useMdmDependentLookupEditorState, useMdmActiveErrorsForAttributesPager, useMdmDependentLookupsStructureNode, useMdmAllRelationsToAddAndEdit, useMdmDependentLookupEditorContext, useMdmGlobalSearchRequestOptions, useMdmAuthoringItemsByEntityType, useMdmAction, useMdmListener, useMdmIsSourcesScreenEnabled, useMdmHiddenAttributes, useMdmControlAttributes, useMdmShowMasking, useMdmReviewDCREnabled } from './hooks';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type Type = {
|
|
2
2
|
color?: string;
|
|
3
3
|
};
|
|
4
|
-
export declare const useStyles: (props: Type) => import("@mui/styles").ClassNameMap<"title" | "date" | "selected" | "user" | "
|
|
4
|
+
export declare const useStyles: (props: Type) => import("@mui/styles").ClassNameMap<"title" | "date" | "selected" | "user" | "historyRow" | "rowHeader" | "badge">;
|
|
5
5
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChangeRequest, WorkflowTaskData } from '@reltio/mdm-sdk';
|
|
3
|
+
type Props = {
|
|
4
|
+
dcr: ChangeRequest;
|
|
5
|
+
task: WorkflowTaskData;
|
|
6
|
+
};
|
|
7
|
+
export declare const ChangeRequestEditor: ({ dcr, task: _task }: Props) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import i18n from 'ui-i18n';
|
|
3
|
+
import styles from './ChangeRequestEditor.module.css';
|
|
4
|
+
export var ChangeRequestEditor = function (_a) {
|
|
5
|
+
var dcr = _a.dcr, _task = _a.task;
|
|
6
|
+
var dcrLoaded = !!dcr;
|
|
7
|
+
if (!dcrLoaded) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return React.createElement("div", { className: styles.container }, i18n.text('DCR changes'));
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const styles = {"container":"ChangeRequestEditor-container--pOvfN"};
|
|
2
|
+
if (typeof document !== 'undefined') {
|
|
3
|
+
const head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
+
const style = document.createElement('style');
|
|
5
|
+
style.type = 'text/css'
|
|
6
|
+
style.innerHTML = `.ChangeRequestEditor-container--pOvfN{border:1px solid rgba(0,0,0,.03);border-radius:8px;padding:16px}`;
|
|
7
|
+
head.appendChild(style);
|
|
8
|
+
}
|
|
9
|
+
export default styles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChangeRequestEditor } from './ChangeRequestEditor';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChangeRequestEditor } from './ChangeRequestEditor';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import Button from '@mui/material/Button';
|
|
4
|
+
import i18n from 'ui-i18n';
|
|
5
|
+
import SvgReviewDCR from '../../../icons/ReviewDCR';
|
|
6
|
+
import styles from './ReviewDCRButton.module.css';
|
|
7
|
+
export var ReviewDCRButton = function (_a) {
|
|
8
|
+
var onClick = _a.onClick;
|
|
9
|
+
return (React.createElement(Button, { onClick: onClick, color: "primary", className: classnames(styles.button), "data-reltio-id": "review-dcr-button" },
|
|
10
|
+
React.createElement(SvgReviewDCR, { className: styles.icon }),
|
|
11
|
+
i18n.text('Review DCR')));
|
|
12
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const styles = {"button":"ReviewDCRButton-button--LIwmx","icon":"ReviewDCRButton-icon--b1gNO"};
|
|
2
|
+
if (typeof document !== 'undefined') {
|
|
3
|
+
const head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
+
const style = document.createElement('style');
|
|
5
|
+
style.type = 'text/css'
|
|
6
|
+
style.innerHTML = `.ReviewDCRButton-button--LIwmx{min-width:100px}.ReviewDCRButton-icon--b1gNO{margin-right:8px}`;
|
|
7
|
+
head.appendChild(style);
|
|
8
|
+
}
|
|
9
|
+
export default styles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ReviewDCRButton } from './ReviewDCRButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ReviewDCRButton } from './ReviewDCRButton';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChangeRequest, GroupedObjectsInfo, WorkflowTaskData } from '@reltio/mdm-sdk';
|
|
3
|
+
type Props = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
dcr: ChangeRequest;
|
|
7
|
+
task: WorkflowTaskData;
|
|
8
|
+
groupedObjects: GroupedObjectsInfo[];
|
|
9
|
+
};
|
|
10
|
+
export declare const ReviewDCRDialog: ({ open, onClose, dcr, task, groupedObjects }: Props) => React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Dialog from '@mui/material/Dialog';
|
|
3
|
+
import DialogTitle from '@mui/material/DialogTitle';
|
|
4
|
+
import DialogContent from '@mui/material/DialogContent';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
6
|
+
import { SmallIconButton } from '../../../SmallIconButton';
|
|
7
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
8
|
+
import i18n from 'ui-i18n';
|
|
9
|
+
import { useWorkflowCheckPermission } from '../hooks/useWorkflowCheckPermission';
|
|
10
|
+
import { useWorkflowActions } from '../hooks/useWorkflowActions';
|
|
11
|
+
import { useMdmEntity } from '../../../contexts/MdmModuleContext';
|
|
12
|
+
import { ProfileBand } from '../../../ProfileBand';
|
|
13
|
+
import { DueDateField } from '../DueDateField';
|
|
14
|
+
import { PrioritySelector } from '../PrioritySelector';
|
|
15
|
+
import { AssigneeSelector } from '../AssigneeSelector';
|
|
16
|
+
import { WorkflowComments } from '../WorkflowComments';
|
|
17
|
+
import { WorkflowActionButtons } from '../WorkflowActionButtons';
|
|
18
|
+
import { DCRSummaryInfo } from './components/DCRSummaryInfo/DCRSummaryInfo';
|
|
19
|
+
import { ChangeRequestEditor } from '../ChangeRequestEditor';
|
|
20
|
+
import styles from './ReviewDCRDialog.module.css';
|
|
21
|
+
export var ReviewDCRDialog = function (_a) {
|
|
22
|
+
var open = _a.open, onClose = _a.onClose, dcr = _a.dcr, task = _a.task, groupedObjects = _a.groupedObjects;
|
|
23
|
+
var entity = useMdmEntity();
|
|
24
|
+
var checkWorkflowPermission = useWorkflowCheckPermission();
|
|
25
|
+
var canViewComments = checkWorkflowPermission('VIEW_PROCESS_INSTANCE_COMMENTS');
|
|
26
|
+
var _b = useWorkflowActions({
|
|
27
|
+
taskId: task.taskId,
|
|
28
|
+
possibleActions: task.possibleActions,
|
|
29
|
+
assignee: task.assignee,
|
|
30
|
+
isOpen: task.isOpen
|
|
31
|
+
}), workflowActions = _b.actions, actionRequestIsInProgress = _b.actionRequestIsInProgress;
|
|
32
|
+
return (React.createElement(Dialog, { open: open, onClose: onClose, fullScreen: true },
|
|
33
|
+
React.createElement(DialogTitle, { className: styles.dialogTitle },
|
|
34
|
+
React.createElement("div", { className: styles.titleContent },
|
|
35
|
+
React.createElement(Typography, { variant: "h6", className: styles.titleText }, i18n.text('Review DCR')),
|
|
36
|
+
React.createElement(WorkflowActionButtons, { workflowActions: workflowActions, actionRequestIsInProgress: actionRequestIsInProgress, preferredAction: task.preferredAction })),
|
|
37
|
+
React.createElement(SmallIconButton, { onClick: onClose, className: styles.closeButton, "aria-label": "close", icon: CloseIcon })),
|
|
38
|
+
React.createElement(DialogContent, { classes: { root: styles.content } },
|
|
39
|
+
React.createElement("div", { className: styles.leftSection },
|
|
40
|
+
React.createElement(ProfileBand, { entity: entity, className: styles.profileBandRoot, classes: { profileBand: styles.profileBand } }),
|
|
41
|
+
React.createElement(DCRSummaryInfo, { dcr: dcr, task: task, groupedObjects: groupedObjects }),
|
|
42
|
+
React.createElement("div", { className: styles.editableSection },
|
|
43
|
+
React.createElement("div", { className: styles.editableGrid },
|
|
44
|
+
React.createElement("div", { className: styles.editableItem },
|
|
45
|
+
React.createElement(DueDateField, { taskId: task.taskId, dueDate: task.dueDate, isTaskOpen: task.isOpen })),
|
|
46
|
+
React.createElement("div", { className: styles.editableItem },
|
|
47
|
+
React.createElement(PrioritySelector, { taskId: task.taskId, priority: task.priority || 50, isTaskOpen: task.isOpen, className: styles.priorityField })),
|
|
48
|
+
React.createElement("div", { className: styles.editableItem },
|
|
49
|
+
React.createElement(AssigneeSelector, { taskId: task.taskId, assignee: task.assignee, isTaskOpen: task.isOpen })))),
|
|
50
|
+
React.createElement("div", { className: styles.changesSection },
|
|
51
|
+
React.createElement(ChangeRequestEditor, { dcr: dcr, task: task }))),
|
|
52
|
+
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
|
+
container: styles.commentsRootContainer,
|
|
54
|
+
commentsContainer: styles.commentsContainer
|
|
55
|
+
} })))));
|
|
56
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const styles = {"dialogTitle":"ReviewDCRDialog-dialogTitle--xCXtj","titleContent":"ReviewDCRDialog-titleContent--Hh2KH","titleText":"ReviewDCRDialog-titleText--ME8s4","closeButton":"ReviewDCRDialog-closeButton--YMAEf","content":"ReviewDCRDialog-content--qvUva","leftSection":"ReviewDCRDialog-leftSection--5MELW","profileBand":"ReviewDCRDialog-profileBand--7r6Xy","profileBandRoot":"ReviewDCRDialog-profileBandRoot--G7p1m","editableSection":"ReviewDCRDialog-editableSection--v-D7a","editableGrid":"ReviewDCRDialog-editableGrid--auc-d","editableItem":"ReviewDCRDialog-editableItem--isGwv","priorityField":"ReviewDCRDialog-priorityField--LQ1n3","changesSection":"ReviewDCRDialog-changesSection--qj2OK","commentsRootContainer":"ReviewDCRDialog-commentsRootContainer--g2f7m","commentsContainer":"ReviewDCRDialog-commentsContainer--OApOx"};
|
|
2
|
+
if (typeof document !== 'undefined') {
|
|
3
|
+
const head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
+
const style = document.createElement('style');
|
|
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:rgba(0,0,0,.04);color:#333}.ReviewDCRDialog-content--qvUva{display:flex;min-height:400px;padding:0!important;width:100%}.ReviewDCRDialog-leftSection--5MELW{border-right:1px solid #e0e0e0;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:32px;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{margin-bottom:24px}.ReviewDCRDialog-commentsRootContainer--g2f7m{margin:10px 0 16px 10px;min-width:323px;width:323px}.ReviewDCRDialog-commentsContainer--OApOx{flex-grow:1;max-height:100%}`;
|
|
7
|
+
head.appendChild(style);
|
|
8
|
+
}
|
|
9
|
+
export default styles;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DCRChanges, GroupedObjectsInfo } from '@reltio/mdm-sdk';
|
|
3
|
+
type Props = {
|
|
4
|
+
changes?: DCRChanges;
|
|
5
|
+
groupedObjects: GroupedObjectsInfo[];
|
|
6
|
+
};
|
|
7
|
+
export declare const DCRChangesSummary: ({ changes, groupedObjects }: Props) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import Skeleton from '@mui/material/Skeleton';
|
|
4
|
+
import i18n from 'ui-i18n';
|
|
5
|
+
import { DCROperationTypes } from '@reltio/mdm-sdk';
|
|
6
|
+
import { useMdmMetadata } from '../../../../../contexts/MdmModuleContext';
|
|
7
|
+
import { calculateDCRChanges } from '../../helpers';
|
|
8
|
+
import styles from './DCRChangesSummary.module.css';
|
|
9
|
+
var getOperationLabel = function (operation) {
|
|
10
|
+
var _a;
|
|
11
|
+
var labels = (_a = {},
|
|
12
|
+
_a[DCROperationTypes.ADDED] = i18n.text('Added'),
|
|
13
|
+
_a[DCROperationTypes.EDITED] = i18n.text('Edited'),
|
|
14
|
+
_a[DCROperationTypes.DELETED] = i18n.text('Deleted'),
|
|
15
|
+
_a[DCROperationTypes.PINNED] = i18n.text('Pinned'),
|
|
16
|
+
_a[DCROperationTypes.PIN_DELETED] = i18n.text('Pin deleted'),
|
|
17
|
+
_a[DCROperationTypes.IGNORED] = i18n.text('Ignored'),
|
|
18
|
+
_a[DCROperationTypes.IGNORE_DELETED] = i18n.text('Ignore deleted'),
|
|
19
|
+
_a);
|
|
20
|
+
return labels[operation] || operation || '';
|
|
21
|
+
};
|
|
22
|
+
var ChangeItem = function (_a) {
|
|
23
|
+
var count = _a.count, operation = _a.operation;
|
|
24
|
+
return count > 0 && (React.createElement("div", { className: styles.changeItem },
|
|
25
|
+
React.createElement("div", { className: classnames(styles.changeNumber, styles[operation]) }, count),
|
|
26
|
+
React.createElement("div", { className: styles.changeLabel }, getOperationLabel(operation))));
|
|
27
|
+
};
|
|
28
|
+
var LoadingSkeleton = function () { return (React.createElement(React.Fragment, null, Array.from({ length: 4 }).map(function (_, index) { return (React.createElement("div", { key: "summary-changes-skeleton-".concat(index), className: styles.changeItem },
|
|
29
|
+
React.createElement(Skeleton, { variant: "text", width: 24, height: 16, className: styles.changeNumber }),
|
|
30
|
+
React.createElement(Skeleton, { variant: "text", width: 60, height: 13, className: styles.changeLabel }))); }))); };
|
|
31
|
+
export var DCRChangesSummary = function (_a) {
|
|
32
|
+
var changes = _a.changes, groupedObjects = _a.groupedObjects;
|
|
33
|
+
var metadata = useMdmMetadata();
|
|
34
|
+
var dcrChanges = useMemo(function () { return (changes ? calculateDCRChanges(metadata, changes, groupedObjects) : null); }, [metadata, changes, groupedObjects]);
|
|
35
|
+
var changesLoaded = !!dcrChanges;
|
|
36
|
+
return (React.createElement("div", { className: styles.changesSummary, "data-reltio-id": "dcr-changes-summary" },
|
|
37
|
+
!changesLoaded && React.createElement(LoadingSkeleton, null),
|
|
38
|
+
changesLoaded &&
|
|
39
|
+
Object.entries(dcrChanges).map(function (_a) {
|
|
40
|
+
var operation = _a[0], count = _a[1];
|
|
41
|
+
return (React.createElement(ChangeItem, { key: operation, count: count, operation: operation }));
|
|
42
|
+
})));
|
|
43
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const styles = {"changesSummary":"DCRChangesSummary-changesSummary--31gR-","changeItem":"DCRChangesSummary-changeItem---XfYP","changeNumber":"DCRChangesSummary-changeNumber--vZxc4","changeLabel":"DCRChangesSummary-changeLabel--tDXS6","edited":"DCRChangesSummary-edited--KFivZ","added":"DCRChangesSummary-added--KGdGw","deleted":"DCRChangesSummary-deleted--TWgS5","ignored":"DCRChangesSummary-ignored--Q2Q8R"};
|
|
2
|
+
if (typeof document !== 'undefined') {
|
|
3
|
+
const head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
+
const style = document.createElement('style');
|
|
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}.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
|
+
head.appendChild(style);
|
|
8
|
+
}
|
|
9
|
+
export default styles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DCRChangesSummary } from './DCRChangesSummary';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DCRChangesSummary } from './DCRChangesSummary';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChangeRequest, GroupedObjectsInfo, WorkflowTaskData } from '@reltio/mdm-sdk';
|
|
3
|
+
type Props = {
|
|
4
|
+
dcr: ChangeRequest;
|
|
5
|
+
task: WorkflowTaskData;
|
|
6
|
+
groupedObjects: GroupedObjectsInfo[];
|
|
7
|
+
};
|
|
8
|
+
export declare const DCRSummaryInfo: ({ dcr, task, groupedObjects }: Props) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import Typography from '@mui/material/Typography';
|
|
4
|
+
import i18n from 'ui-i18n';
|
|
5
|
+
import SvgRequestSummary from '../../../../../icons/RequestSummary';
|
|
6
|
+
import { DCRChangesSummary } from '../DCRChangesSummary';
|
|
7
|
+
import { getDCRId } from '../../../helpers/common';
|
|
8
|
+
import styles from './DCRSummaryInfo.module.css';
|
|
9
|
+
export var DCRSummaryInfo = function (_a) {
|
|
10
|
+
var dcr = _a.dcr, task = _a.task, groupedObjects = _a.groupedObjects;
|
|
11
|
+
var dcrId = getDCRId(task.objectURIs);
|
|
12
|
+
return (React.createElement("div", { className: styles.requestSummary },
|
|
13
|
+
React.createElement("div", { className: styles.summaryLeft },
|
|
14
|
+
React.createElement("div", { className: styles.summaryIcon },
|
|
15
|
+
React.createElement(SvgRequestSummary, null)),
|
|
16
|
+
React.createElement("div", { className: styles.summaryContent },
|
|
17
|
+
React.createElement(Typography, { variant: "h6", className: styles.summaryTitle }, i18n.text('Request Summary')),
|
|
18
|
+
React.createElement("div", { className: styles.summaryDetails },
|
|
19
|
+
React.createElement("div", { className: styles.summaryItem },
|
|
20
|
+
React.createElement("span", { className: styles.summaryItemName }, "".concat(i18n.text('DCR ID'), ": ")),
|
|
21
|
+
dcrId),
|
|
22
|
+
React.createElement("div", { className: styles.summaryItem },
|
|
23
|
+
React.createElement("span", { className: styles.summaryItemName }, "".concat(i18n.text('Created by'), ": ")),
|
|
24
|
+
task.createdBy),
|
|
25
|
+
React.createElement("div", { className: classnames(styles.summaryItem, styles.summaryItemDate) },
|
|
26
|
+
React.createElement("span", { className: styles.summaryItemName }, "".concat(i18n.text('on'), " ")),
|
|
27
|
+
i18n.date(task.createTime, 'L')),
|
|
28
|
+
React.createElement("div", { className: styles.summaryItem },
|
|
29
|
+
React.createElement("span", { className: styles.summaryItemName }, "".concat(i18n.text('Step'), ": ")),
|
|
30
|
+
task.displayName)))),
|
|
31
|
+
React.createElement("div", { className: styles.summaryRight },
|
|
32
|
+
React.createElement(DCRChangesSummary, { changes: dcr === null || dcr === void 0 ? void 0 : dcr.changes, groupedObjects: groupedObjects }))));
|
|
33
|
+
};
|
package/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.module.css.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const styles = {"requestSummary":"DCRSummaryInfo-requestSummary--FUaA0","summaryLeft":"DCRSummaryInfo-summaryLeft--Y79jA","summaryIcon":"DCRSummaryInfo-summaryIcon--VlZsg","summaryContent":"DCRSummaryInfo-summaryContent--BdPl7","summaryTitle":"DCRSummaryInfo-summaryTitle--77exU","summaryDetails":"DCRSummaryInfo-summaryDetails--u5ije","summaryItem":"DCRSummaryInfo-summaryItem--DbTdR","summaryItemName":"DCRSummaryInfo-summaryItemName--l7hYO","summaryItemDate":"DCRSummaryInfo-summaryItemDate--EQpJ0","summaryRight":"DCRSummaryInfo-summaryRight--9pEaH"};
|
|
2
|
+
if (typeof document !== 'undefined') {
|
|
3
|
+
const head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
+
const style = document.createElement('style');
|
|
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}`;
|
|
7
|
+
head.appendChild(style);
|
|
8
|
+
}
|
|
9
|
+
export default styles;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DCROperationTypes, DCRChanges, GroupedObjectsInfo, Metadata } from '@reltio/mdm-sdk';
|
|
2
|
+
export type DCRChangeCounts = Partial<Record<DCROperationTypes, number>>;
|
|
3
|
+
export declare const calculateDCRChanges: (metadata: Metadata, changes: DCRChanges, groupedObjects: GroupedObjectsInfo[]) => DCRChangeCounts;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { mergeChanges } from '../../AttributesChanges/helpers/merge';
|
|
2
|
+
export var calculateDCRChanges = function (metadata, changes, groupedObjects) {
|
|
3
|
+
var mergedChanges = groupedObjects.reduce(function (mergedChanges, object) {
|
|
4
|
+
var _a = mergeChanges(metadata, changes, object.entity, object.relations), mergedEntityChanges = _a[0], mergedRelationsChanges = _a[1];
|
|
5
|
+
return mergedChanges.concat(mergedEntityChanges).concat(mergedRelationsChanges);
|
|
6
|
+
}, []);
|
|
7
|
+
var changesCounts = mergedChanges.reduce(function (changesCounts, _a) {
|
|
8
|
+
var operation = _a.operation;
|
|
9
|
+
if (operation) {
|
|
10
|
+
changesCounts[operation] = (changesCounts[operation] || 0) + 1;
|
|
11
|
+
}
|
|
12
|
+
return changesCounts;
|
|
13
|
+
}, {});
|
|
14
|
+
return changesCounts;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { calculateDCRChanges } from './calculateDCRChanges';
|
|
2
|
+
import { DCRTypes } from '@reltio/mdm-sdk';
|
|
3
|
+
describe('calculateDCRChanges', function () {
|
|
4
|
+
var metadata = {
|
|
5
|
+
entityTypes: [
|
|
6
|
+
{
|
|
7
|
+
uri: 'configuration/entityTypes/HCP',
|
|
8
|
+
label: 'HCP',
|
|
9
|
+
attributes: [
|
|
10
|
+
{
|
|
11
|
+
label: 'Name',
|
|
12
|
+
name: 'Name',
|
|
13
|
+
type: 'String',
|
|
14
|
+
uri: 'configuration/entityTypes/HCP/attributes/Name'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: 'City',
|
|
18
|
+
name: 'City',
|
|
19
|
+
type: 'String',
|
|
20
|
+
uri: 'configuration/entityTypes/HCP/attributes/City'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: 'Tags',
|
|
24
|
+
name: 'Tags',
|
|
25
|
+
type: 'String',
|
|
26
|
+
uri: 'configuration/entityTypes/HCP/attributes/Tags'
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
};
|
|
32
|
+
var groupedObjects = [
|
|
33
|
+
{
|
|
34
|
+
entity: {
|
|
35
|
+
uri: 'entities/123',
|
|
36
|
+
label: 'Entity 123',
|
|
37
|
+
type: 'configuration/entityTypes/HCP',
|
|
38
|
+
isExist: true,
|
|
39
|
+
secondaryLabel: 'Test Secondary Label'
|
|
40
|
+
},
|
|
41
|
+
relations: []
|
|
42
|
+
}
|
|
43
|
+
];
|
|
44
|
+
it('should count "added" changes correctly', function () {
|
|
45
|
+
var changes = {
|
|
46
|
+
'entities/123': [
|
|
47
|
+
{
|
|
48
|
+
id: 'change1',
|
|
49
|
+
type: DCRTypes.UPDATE_TAGS,
|
|
50
|
+
oldValue: ['tag1', 'tag2'],
|
|
51
|
+
newValue: ['tag1', 'tag2', 'tag3']
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: 'change2',
|
|
55
|
+
type: DCRTypes.UPDATE_ROLES,
|
|
56
|
+
oldValue: ['role1'],
|
|
57
|
+
newValue: ['role1', 'role2']
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'change3',
|
|
61
|
+
attributePath: 'Name',
|
|
62
|
+
type: DCRTypes.INSERT_ATTRIBUTE,
|
|
63
|
+
objectType: 'configuration/entityTypes/HCP',
|
|
64
|
+
newValue: {
|
|
65
|
+
value: {
|
|
66
|
+
Name: [{ value: 'John' }]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
};
|
|
72
|
+
var result = calculateDCRChanges(metadata, changes, groupedObjects);
|
|
73
|
+
expect(result).toEqual({
|
|
74
|
+
added: 3
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
it('should count multiple change types correctly', function () {
|
|
78
|
+
var changes = {
|
|
79
|
+
'entities/123': [
|
|
80
|
+
{
|
|
81
|
+
id: 'change1',
|
|
82
|
+
type: DCRTypes.UPDATE_TAGS,
|
|
83
|
+
oldValue: ['tag1'],
|
|
84
|
+
newValue: ['tag1', 'tag2', 'tag3']
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: 'change2',
|
|
88
|
+
type: DCRTypes.UPDATE_ROLES,
|
|
89
|
+
oldValue: ['role1', 'role2'],
|
|
90
|
+
newValue: ['role1']
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 'change3',
|
|
94
|
+
attributePath: 'City',
|
|
95
|
+
type: DCRTypes.INSERT_ATTRIBUTE,
|
|
96
|
+
objectType: 'configuration/entityTypes/HCP',
|
|
97
|
+
newValue: { value: { City: [{ value: 'New York' }] } }
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'change4',
|
|
101
|
+
attributePath: 'Name/21vmKank',
|
|
102
|
+
attributeType: 'configuration/entityTypes/HCP/attributes/Name',
|
|
103
|
+
type: DCRTypes.UPDATE_ATTRIBUTE,
|
|
104
|
+
objectType: 'configuration/entityTypes/HCP',
|
|
105
|
+
oldValue: { value: 'John' },
|
|
106
|
+
newValue: { value: 'Mike' }
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
};
|
|
110
|
+
var result = calculateDCRChanges(metadata, changes, groupedObjects);
|
|
111
|
+
expect(result).toEqual({
|
|
112
|
+
added: 2,
|
|
113
|
+
deleted: 1,
|
|
114
|
+
edited: 1
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
it('should handle empty changes', function () {
|
|
118
|
+
var changes = {};
|
|
119
|
+
var result = calculateDCRChanges(metadata, changes, groupedObjects);
|
|
120
|
+
expect(result).toEqual({});
|
|
121
|
+
});
|
|
122
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { calculateDCRChanges, type DCRChangeCounts } from './calculateDCRChanges';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { calculateDCRChanges } from './calculateDCRChanges';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ReviewDCRDialog } from './ReviewDCRDialog';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ReviewDCRDialog } from './ReviewDCRDialog';
|