@reltio/components 1.4.1720 → 1.4.1722
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/cjs/components/AttributesErrorsPanel/ErrorsPanel/Error.js +7 -1
- package/cjs/components/AttributesErrorsPanel/ErrorsPanel/ErrorsPanel.js +1 -2
- package/cjs/components/AttributesErrorsPanel/styles.d.ts +1 -1
- package/cjs/components/AttributesErrorsPanel/styles.js +27 -11
- package/cjs/components/AttributesErrorsPanel/useCachedErrors.d.ts +2 -1
- package/cjs/components/AttributesErrorsPanel/useCachedErrors.js +11 -4
- package/cjs/components/workflow/hooks/useWorkflowAssignee.js +3 -1
- package/cjs/icons/ReadOnlyError.d.ts +3 -0
- package/cjs/icons/ReadOnlyError.js +22 -0
- package/cjs/icons/index.d.ts +4 -3
- package/cjs/icons/index.js +10 -8
- package/esm/components/AttributesErrorsPanel/ErrorsPanel/Error.js +7 -1
- package/esm/components/AttributesErrorsPanel/ErrorsPanel/ErrorsPanel.js +1 -2
- package/esm/components/AttributesErrorsPanel/styles.d.ts +1 -1
- package/esm/components/AttributesErrorsPanel/styles.js +27 -11
- package/esm/components/AttributesErrorsPanel/useCachedErrors.d.ts +2 -1
- package/esm/components/AttributesErrorsPanel/useCachedErrors.js +12 -5
- package/esm/components/workflow/hooks/useWorkflowAssignee.js +3 -1
- package/esm/icons/ReadOnlyError.d.ts +3 -0
- package/esm/icons/ReadOnlyError.js +17 -0
- package/esm/icons/index.d.ts +4 -3
- package/esm/icons/index.js +4 -3
- package/package.json +2 -2
|
@@ -29,10 +29,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.Error = void 0;
|
|
30
30
|
var react_1 = __importStar(require("react"));
|
|
31
31
|
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
32
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
33
|
+
var Tooltip_1 = __importDefault(require("@mui/material/Tooltip"));
|
|
32
34
|
var Hyperlink_1 = __importDefault(require("../../../icons/Hyperlink"));
|
|
33
35
|
var SmallIconButton_1 = require("../../SmallIconButton");
|
|
34
36
|
var contexts_1 = require("../../../contexts");
|
|
35
37
|
var helpers_1 = require("./helpers");
|
|
38
|
+
var icons_1 = require("../../../icons");
|
|
36
39
|
var styles_1 = __importDefault(require("../styles"));
|
|
37
40
|
exports.Error = (0, react_1.memo)(function (_a) {
|
|
38
41
|
var error = _a.error;
|
|
@@ -44,7 +47,10 @@ exports.Error = (0, react_1.memo)(function (_a) {
|
|
|
44
47
|
var displayedAttributeTypesPath = (0, helpers_1.getDisplayedAttributeTypesPath)(error);
|
|
45
48
|
var highlightError = (0, react_1.useContext)(contexts_1.ScrollToElementContext).highlightError;
|
|
46
49
|
var showLink = error.uri || (error.parentUri && error.attributeTypeUri);
|
|
47
|
-
return (react_1.default.createElement("
|
|
50
|
+
return (react_1.default.createElement("div", { className: styles.errorListItem },
|
|
51
|
+
react_1.default.createElement("div", { className: styles.listItemMarker }, error.type === mdm_sdk_1.ErrorType.rdmIssueInReference ? (react_1.default.createElement(Tooltip_1.default, { title: ui_i18n_1.default.text('This error is visible only in view mode') },
|
|
52
|
+
react_1.default.createElement("span", null,
|
|
53
|
+
react_1.default.createElement(icons_1.ReadOnlyError, { className: styles.errorIcon })))) : (react_1.default.createElement("div", { className: styles.discIcon }))),
|
|
48
54
|
react_1.default.createElement("div", { className: styles.errorWrapper },
|
|
49
55
|
displayedAttributeTypesPath && (react_1.default.createElement("span", { className: styles.attributeTypesPath }, displayedAttributeTypesPath)),
|
|
50
56
|
react_1.default.createElement("span", { className: styles.errorTitle },
|
|
@@ -48,8 +48,7 @@ exports.ErrorsPanel = (0, react_1.memo)(function (_a) {
|
|
|
48
48
|
}, expandIcon: react_1.default.createElement(ExpandMore_1.default, null) },
|
|
49
49
|
icon,
|
|
50
50
|
react_1.default.createElement(Typography_1.default, { className: styles.accordionSummaryHeading }, title)),
|
|
51
|
-
react_1.default.createElement(AccordionDetails_1.default, { className: (0, classnames_1.default)(styles.accordionDetails, accordionDetailsClassName) },
|
|
52
|
-
react_1.default.createElement("ul", null, items.map(function (error, i) { return (react_1.default.createElement(ErrorComponent, { key: i, error: error })); })))));
|
|
51
|
+
react_1.default.createElement(AccordionDetails_1.default, { className: (0, classnames_1.default)(styles.accordionDetails, accordionDetailsClassName) }, items.map(function (error, i) { return (react_1.default.createElement(ErrorComponent, { key: i, error: error })); }))));
|
|
53
52
|
}))) : null;
|
|
54
53
|
});
|
|
55
54
|
exports.ErrorsPanel.displayName = 'ErrorsPanel';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"icon" | "parents" | "errorWrapper" | "accordion" | "accordionExpanded" | "accordionSummary" | "accordionSummaryHeading" | "accordionSummaryExpanded" | "accordionSummaryContent" | "accordionDetails" | "errorTitle" | "attributeTypesPath" | "goToIcon" | "errorsAccordion" | "errorsAccordionDetails" | "warningsAccordion" | "warningsAccordionDetails" | "errorIcon" | "warningIcon">;
|
|
1
|
+
declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"icon" | "parents" | "errorWrapper" | "accordion" | "accordionExpanded" | "accordionSummary" | "accordionSummaryHeading" | "accordionSummaryExpanded" | "accordionSummaryContent" | "accordionDetails" | "errorTitle" | "attributeTypesPath" | "goToIcon" | "errorsAccordion" | "errorsAccordionDetails" | "warningsAccordion" | "warningsAccordionDetails" | "errorIcon" | "warningIcon" | "errorListItem" | "listItemMarker" | "discIcon">;
|
|
2
2
|
export default useStyles;
|
|
@@ -43,24 +43,19 @@ var useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
43
43
|
accordionDetails: {
|
|
44
44
|
maxHeight: '21vh',
|
|
45
45
|
overflow: 'auto',
|
|
46
|
-
paddingTop:
|
|
47
|
-
paddingBottom:
|
|
48
|
-
'& ul': {
|
|
49
|
-
paddingLeft: '23px',
|
|
50
|
-
marginTop: '3px'
|
|
51
|
-
},
|
|
52
|
-
'& li': {
|
|
53
|
-
paddingLeft: '9px',
|
|
54
|
-
paddingBottom: '8px'
|
|
55
|
-
}
|
|
46
|
+
paddingTop: '3px',
|
|
47
|
+
paddingBottom: '8px'
|
|
56
48
|
},
|
|
57
49
|
parents: {
|
|
58
50
|
color: theme.palette.text.primary
|
|
59
51
|
},
|
|
60
52
|
errorWrapper: {
|
|
53
|
+
flex: 1,
|
|
61
54
|
lineHeight: '18px',
|
|
62
55
|
display: 'flex',
|
|
63
|
-
flexDirection: 'column'
|
|
56
|
+
flexDirection: 'column',
|
|
57
|
+
paddingLeft: '8px',
|
|
58
|
+
paddingBottom: '8px'
|
|
64
59
|
},
|
|
65
60
|
errorTitle: {
|
|
66
61
|
display: 'flex',
|
|
@@ -94,6 +89,27 @@ var useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
94
89
|
},
|
|
95
90
|
warningIcon: {
|
|
96
91
|
fill: '#F9A825'
|
|
92
|
+
},
|
|
93
|
+
errorListItem: {
|
|
94
|
+
display: 'flex',
|
|
95
|
+
alignItems: 'flex-start',
|
|
96
|
+
'& svg': {
|
|
97
|
+
fill: 'currentColor'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
listItemMarker: {
|
|
101
|
+
flexShrink: 0,
|
|
102
|
+
width: '24px',
|
|
103
|
+
marginTop: '3px',
|
|
104
|
+
display: 'flex',
|
|
105
|
+
justifyContent: 'center'
|
|
106
|
+
},
|
|
107
|
+
discIcon: {
|
|
108
|
+
height: '4px',
|
|
109
|
+
width: '4px',
|
|
110
|
+
backgroundColor: 'currentColor',
|
|
111
|
+
borderRadius: '50%',
|
|
112
|
+
marginTop: '4px'
|
|
97
113
|
}
|
|
98
114
|
}); });
|
|
99
115
|
exports.default = useStyles;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { AttributeError } from '@reltio/mdm-sdk';
|
|
2
|
+
export declare const useCachedErrors: (allErrors: AttributeError[]) => AttributeError[];
|
|
@@ -2,13 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useCachedErrors = void 0;
|
|
4
4
|
var react_1 = require("react");
|
|
5
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
6
|
+
var contexts_1 = require("../../contexts");
|
|
5
7
|
var helpers_1 = require("./ErrorsPanel/helpers");
|
|
6
8
|
var useCachedErrors = function (allErrors) {
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
+
var mode = (0, contexts_1.useMdmMode)();
|
|
10
|
+
var filteredErrors = (0, react_1.useMemo)(function () { return ((0, mdm_sdk_1.isViewMode)(mode) ? allErrors : allErrors.filter(function (_a) {
|
|
11
|
+
var type = _a.type;
|
|
12
|
+
return type !== mdm_sdk_1.ErrorType.rdmIssueInReference;
|
|
13
|
+
})); }, [mode, allErrors]);
|
|
14
|
+
var cacheForFilteredErrors = (0, react_1.useRef)(filteredErrors);
|
|
15
|
+
var areEqualErrors = (0, helpers_1.areErrorsEqual)(filteredErrors, cacheForFilteredErrors.current);
|
|
9
16
|
if (!areEqualErrors) {
|
|
10
|
-
|
|
17
|
+
cacheForFilteredErrors.current = filteredErrors;
|
|
11
18
|
}
|
|
12
|
-
return
|
|
19
|
+
return cacheForFilteredErrors.current;
|
|
13
20
|
};
|
|
14
21
|
exports.useCachedErrors = useCachedErrors;
|
|
@@ -31,7 +31,9 @@ var useWorkflowAssignee = function (_a) {
|
|
|
31
31
|
}, [assignee]);
|
|
32
32
|
var getAssignees = (0, react_1.useCallback)(function (text) {
|
|
33
33
|
if (workflowPath && canUpdateTask && taskId) {
|
|
34
|
-
var filterOutRest_1 = (0, ramda_1.filter)(function (item) {
|
|
34
|
+
var filterOutRest_1 = (0, ramda_1.filter)(function (item) {
|
|
35
|
+
return item.value.toLowerCase().includes(text === null || text === void 0 ? void 0 : text.toLowerCase());
|
|
36
|
+
});
|
|
35
37
|
if (assignees) {
|
|
36
38
|
return Promise.resolve(filterOutRest_1(assignees));
|
|
37
39
|
}
|
|
@@ -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 SvgReadOnlyError = function (props) {
|
|
19
|
+
return (react_1.default.createElement("svg", __assign({ width: 12, height: 12, viewBox: "0 0 12 12", fill: "#DD2C00", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
20
|
+
react_1.default.createElement("path", { d: "M6 11.848a1.15 1.15 0 01-.445-.088 1.309 1.309 0 01-.386-.248L.487 6.832a1.31 1.31 0 01-.247-.387 1.207 1.207 0 010-.897c.058-.146.14-.272.247-.38L5.17.489c.116-.117.245-.202.386-.256a1.303 1.303 0 01.897 0 .953.953 0 01.38.256l4.68 4.68a.954.954 0 01.256.38 1.303 1.303 0 010 .897c-.054.14-.139.27-.256.386l-4.68 4.681a1.205 1.205 0 01-.831.335zm0-1.167L10.681 6 6 1.319 1.319 6 6 10.681zm-.583-4.098h1.166v-3.5H5.417v3.5zM6 8.333a.564.564 0 00.416-.167.564.564 0 00.167-.416.564.564 0 00-.167-.416A.564.564 0 006 7.167a.564.564 0 00-.416.167.564.564 0 00-.167.416c0 .165.056.304.167.416.112.111.25.167.416.167z" })));
|
|
21
|
+
};
|
|
22
|
+
exports.default = SvgReadOnlyError;
|
package/cjs/icons/index.d.ts
CHANGED
|
@@ -24,9 +24,9 @@ export { default as Ignored } from './Ignored';
|
|
|
24
24
|
export { default as IgnoredOutlined } from './IgnoredOutlined';
|
|
25
25
|
export { default as LogIn } from './LogIn';
|
|
26
26
|
export { default as LogOut } from './LogOut';
|
|
27
|
-
export { default as MlMatch } from './MlMatch';
|
|
28
27
|
export { default as Merge } from './Merge';
|
|
29
28
|
export { default as MergeDark } from './MergeDark';
|
|
29
|
+
export { default as MlMatch } from './MlMatch';
|
|
30
30
|
export { default as NegativeRuleIcon } from './NegativeRuleIcon';
|
|
31
31
|
export { default as NegativeRuleTooltipIcon } from './NegativeRuleTooltipIcon';
|
|
32
32
|
export { default as NestedAttribute } from './NestedAttribute';
|
|
@@ -35,15 +35,16 @@ export { default as NoDataSearch } from './NoDataSearch';
|
|
|
35
35
|
export { default as NoMatches } from './NoMatches';
|
|
36
36
|
export { default as NotMatchDark } from './NotMatchDark';
|
|
37
37
|
export { default as NotMatchRule } from './NotMatchRule';
|
|
38
|
-
export { default as PmIcon } from './PmIcon';
|
|
39
|
-
export { default as PmTaskIcon } from './PmTaskIcon';
|
|
40
38
|
export { default as Pin } from './Pin';
|
|
41
39
|
export { default as PinOutlined } from './PinOutlined';
|
|
42
40
|
export { default as PivotingIcon } from './PivotingIcon';
|
|
41
|
+
export { default as PmIcon } from './PmIcon';
|
|
42
|
+
export { default as PmTaskIcon } from './PmTaskIcon';
|
|
43
43
|
export { default as Polygon } from './Polygon';
|
|
44
44
|
export { default as PotentialMatch } from './PotentialMatch';
|
|
45
45
|
export { default as Profile } from './Profile';
|
|
46
46
|
export { default as Radius } from './Radius';
|
|
47
|
+
export { default as ReadOnlyError } from './ReadOnlyError';
|
|
47
48
|
export { default as Reassign } from './Reassign';
|
|
48
49
|
export { default as Recommended } from './Recommended';
|
|
49
50
|
export { default as ReferenceAttribute } from './ReferenceAttribute';
|
package/cjs/icons/index.js
CHANGED
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.UploadIcon = exports.UnMerge = exports.Tenant = exports.Table = exports.SimpleAttribute = exports.SelectAttributes = exports.Search = exports.ResizeIconInline = void 0;
|
|
6
|
+
exports.ReferenceAttribute = exports.Recommended = exports.Reassign = exports.ReadOnlyError = exports.Radius = exports.Profile = exports.PotentialMatch = exports.Polygon = exports.PmTaskIcon = exports.PmIcon = exports.PivotingIcon = exports.PinOutlined = exports.Pin = exports.NotMatchRule = exports.NotMatchDark = exports.NoMatches = exports.NoDataSearch = exports.NoData = exports.NestedAttribute = exports.NegativeRuleTooltipIcon = exports.NegativeRuleIcon = exports.MlMatch = exports.MergeDark = exports.Merge = exports.LogOut = exports.LogIn = exports.IgnoredOutlined = exports.Ignored = exports.Hyperlink = exports.Filter = exports.Error = exports.EmptySearchResults = exports.Duplicate = exports.Draw = exports.Download = exports.Details = exports.Description = exports.DeleteRequestTaskIcon = exports.DefaultTaskIcon = exports.DefaultImage = exports.DcrTaskIcon = exports.Create = exports.Copy = exports.CommentBubble = exports.Comment = exports.CollaborationIcon = exports.Calendar = exports.AttributesList = exports.AddComment = exports.Add = void 0;
|
|
7
|
+
exports.UploadIcon = exports.UnMerge = exports.Tenant = exports.Table = exports.SimpleAttribute = exports.SelectAttributes = exports.Search = exports.ResizeIconInline = exports.Remove = void 0;
|
|
8
8
|
var Add_1 = require("./Add");
|
|
9
9
|
Object.defineProperty(exports, "Add", { enumerable: true, get: function () { return __importDefault(Add_1).default; } });
|
|
10
10
|
var AddComment_1 = require("./AddComment");
|
|
@@ -57,12 +57,12 @@ var LogIn_1 = require("./LogIn");
|
|
|
57
57
|
Object.defineProperty(exports, "LogIn", { enumerable: true, get: function () { return __importDefault(LogIn_1).default; } });
|
|
58
58
|
var LogOut_1 = require("./LogOut");
|
|
59
59
|
Object.defineProperty(exports, "LogOut", { enumerable: true, get: function () { return __importDefault(LogOut_1).default; } });
|
|
60
|
-
var MlMatch_1 = require("./MlMatch");
|
|
61
|
-
Object.defineProperty(exports, "MlMatch", { enumerable: true, get: function () { return __importDefault(MlMatch_1).default; } });
|
|
62
60
|
var Merge_1 = require("./Merge");
|
|
63
61
|
Object.defineProperty(exports, "Merge", { enumerable: true, get: function () { return __importDefault(Merge_1).default; } });
|
|
64
62
|
var MergeDark_1 = require("./MergeDark");
|
|
65
63
|
Object.defineProperty(exports, "MergeDark", { enumerable: true, get: function () { return __importDefault(MergeDark_1).default; } });
|
|
64
|
+
var MlMatch_1 = require("./MlMatch");
|
|
65
|
+
Object.defineProperty(exports, "MlMatch", { enumerable: true, get: function () { return __importDefault(MlMatch_1).default; } });
|
|
66
66
|
var NegativeRuleIcon_1 = require("./NegativeRuleIcon");
|
|
67
67
|
Object.defineProperty(exports, "NegativeRuleIcon", { enumerable: true, get: function () { return __importDefault(NegativeRuleIcon_1).default; } });
|
|
68
68
|
var NegativeRuleTooltipIcon_1 = require("./NegativeRuleTooltipIcon");
|
|
@@ -79,16 +79,16 @@ var NotMatchDark_1 = require("./NotMatchDark");
|
|
|
79
79
|
Object.defineProperty(exports, "NotMatchDark", { enumerable: true, get: function () { return __importDefault(NotMatchDark_1).default; } });
|
|
80
80
|
var NotMatchRule_1 = require("./NotMatchRule");
|
|
81
81
|
Object.defineProperty(exports, "NotMatchRule", { enumerable: true, get: function () { return __importDefault(NotMatchRule_1).default; } });
|
|
82
|
-
var PmIcon_1 = require("./PmIcon");
|
|
83
|
-
Object.defineProperty(exports, "PmIcon", { enumerable: true, get: function () { return __importDefault(PmIcon_1).default; } });
|
|
84
|
-
var PmTaskIcon_1 = require("./PmTaskIcon");
|
|
85
|
-
Object.defineProperty(exports, "PmTaskIcon", { enumerable: true, get: function () { return __importDefault(PmTaskIcon_1).default; } });
|
|
86
82
|
var Pin_1 = require("./Pin");
|
|
87
83
|
Object.defineProperty(exports, "Pin", { enumerable: true, get: function () { return __importDefault(Pin_1).default; } });
|
|
88
84
|
var PinOutlined_1 = require("./PinOutlined");
|
|
89
85
|
Object.defineProperty(exports, "PinOutlined", { enumerable: true, get: function () { return __importDefault(PinOutlined_1).default; } });
|
|
90
86
|
var PivotingIcon_1 = require("./PivotingIcon");
|
|
91
87
|
Object.defineProperty(exports, "PivotingIcon", { enumerable: true, get: function () { return __importDefault(PivotingIcon_1).default; } });
|
|
88
|
+
var PmIcon_1 = require("./PmIcon");
|
|
89
|
+
Object.defineProperty(exports, "PmIcon", { enumerable: true, get: function () { return __importDefault(PmIcon_1).default; } });
|
|
90
|
+
var PmTaskIcon_1 = require("./PmTaskIcon");
|
|
91
|
+
Object.defineProperty(exports, "PmTaskIcon", { enumerable: true, get: function () { return __importDefault(PmTaskIcon_1).default; } });
|
|
92
92
|
var Polygon_1 = require("./Polygon");
|
|
93
93
|
Object.defineProperty(exports, "Polygon", { enumerable: true, get: function () { return __importDefault(Polygon_1).default; } });
|
|
94
94
|
var PotentialMatch_1 = require("./PotentialMatch");
|
|
@@ -97,6 +97,8 @@ var Profile_1 = require("./Profile");
|
|
|
97
97
|
Object.defineProperty(exports, "Profile", { enumerable: true, get: function () { return __importDefault(Profile_1).default; } });
|
|
98
98
|
var Radius_1 = require("./Radius");
|
|
99
99
|
Object.defineProperty(exports, "Radius", { enumerable: true, get: function () { return __importDefault(Radius_1).default; } });
|
|
100
|
+
var ReadOnlyError_1 = require("./ReadOnlyError");
|
|
101
|
+
Object.defineProperty(exports, "ReadOnlyError", { enumerable: true, get: function () { return __importDefault(ReadOnlyError_1).default; } });
|
|
100
102
|
var Reassign_1 = require("./Reassign");
|
|
101
103
|
Object.defineProperty(exports, "Reassign", { enumerable: true, get: function () { return __importDefault(Reassign_1).default; } });
|
|
102
104
|
var Recommended_1 = require("./Recommended");
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React, { memo, useContext } from 'react';
|
|
2
2
|
import i18n from 'ui-i18n';
|
|
3
|
+
import { ErrorType } from '@reltio/mdm-sdk';
|
|
4
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
5
|
import HyperlinkIcon from '../../../icons/Hyperlink';
|
|
4
6
|
import { SmallIconButtonWithTooltip } from '../../SmallIconButton';
|
|
5
7
|
import { ScrollToElementContext, useMdmIsEditableMode, useMdmMetadata } from '../../../contexts';
|
|
6
8
|
import { getDisplayedAttributeTypesPath, getDisplayedErrorMessage, getDisplayedErrorPath } from './helpers';
|
|
9
|
+
import { ReadOnlyError } from '../../../icons';
|
|
7
10
|
import useStyles from '../styles';
|
|
8
11
|
export var Error = memo(function (_a) {
|
|
9
12
|
var error = _a.error;
|
|
@@ -15,7 +18,10 @@ export var Error = memo(function (_a) {
|
|
|
15
18
|
var displayedAttributeTypesPath = getDisplayedAttributeTypesPath(error);
|
|
16
19
|
var highlightError = useContext(ScrollToElementContext).highlightError;
|
|
17
20
|
var showLink = error.uri || (error.parentUri && error.attributeTypeUri);
|
|
18
|
-
return (React.createElement("
|
|
21
|
+
return (React.createElement("div", { className: styles.errorListItem },
|
|
22
|
+
React.createElement("div", { className: styles.listItemMarker }, error.type === ErrorType.rdmIssueInReference ? (React.createElement(Tooltip, { title: i18n.text('This error is visible only in view mode') },
|
|
23
|
+
React.createElement("span", null,
|
|
24
|
+
React.createElement(ReadOnlyError, { className: styles.errorIcon })))) : (React.createElement("div", { className: styles.discIcon }))),
|
|
19
25
|
React.createElement("div", { className: styles.errorWrapper },
|
|
20
26
|
displayedAttributeTypesPath && (React.createElement("span", { className: styles.attributeTypesPath }, displayedAttributeTypesPath)),
|
|
21
27
|
React.createElement("span", { className: styles.errorTitle },
|
|
@@ -19,8 +19,7 @@ export var ErrorsPanel = memo(function (_a) {
|
|
|
19
19
|
}, expandIcon: React.createElement(ExpandMoreIcon, null) },
|
|
20
20
|
icon,
|
|
21
21
|
React.createElement(Typography, { className: styles.accordionSummaryHeading }, title)),
|
|
22
|
-
React.createElement(AccordionDetails, { className: classnames(styles.accordionDetails, accordionDetailsClassName) },
|
|
23
|
-
React.createElement("ul", null, items.map(function (error, i) { return (React.createElement(ErrorComponent, { key: i, error: error })); })))));
|
|
22
|
+
React.createElement(AccordionDetails, { className: classnames(styles.accordionDetails, accordionDetailsClassName) }, items.map(function (error, i) { return (React.createElement(ErrorComponent, { key: i, error: error })); }))));
|
|
24
23
|
}))) : null;
|
|
25
24
|
});
|
|
26
25
|
ErrorsPanel.displayName = 'ErrorsPanel';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"icon" | "parents" | "errorWrapper" | "accordion" | "accordionExpanded" | "accordionSummary" | "accordionSummaryHeading" | "accordionSummaryExpanded" | "accordionSummaryContent" | "accordionDetails" | "errorTitle" | "attributeTypesPath" | "goToIcon" | "errorsAccordion" | "errorsAccordionDetails" | "warningsAccordion" | "warningsAccordionDetails" | "errorIcon" | "warningIcon">;
|
|
1
|
+
declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"icon" | "parents" | "errorWrapper" | "accordion" | "accordionExpanded" | "accordionSummary" | "accordionSummaryHeading" | "accordionSummaryExpanded" | "accordionSummaryContent" | "accordionDetails" | "errorTitle" | "attributeTypesPath" | "goToIcon" | "errorsAccordion" | "errorsAccordionDetails" | "warningsAccordion" | "warningsAccordionDetails" | "errorIcon" | "warningIcon" | "errorListItem" | "listItemMarker" | "discIcon">;
|
|
2
2
|
export default useStyles;
|
|
@@ -41,24 +41,19 @@ var useStyles = makeStyles(function (theme) { return ({
|
|
|
41
41
|
accordionDetails: {
|
|
42
42
|
maxHeight: '21vh',
|
|
43
43
|
overflow: 'auto',
|
|
44
|
-
paddingTop:
|
|
45
|
-
paddingBottom:
|
|
46
|
-
'& ul': {
|
|
47
|
-
paddingLeft: '23px',
|
|
48
|
-
marginTop: '3px'
|
|
49
|
-
},
|
|
50
|
-
'& li': {
|
|
51
|
-
paddingLeft: '9px',
|
|
52
|
-
paddingBottom: '8px'
|
|
53
|
-
}
|
|
44
|
+
paddingTop: '3px',
|
|
45
|
+
paddingBottom: '8px'
|
|
54
46
|
},
|
|
55
47
|
parents: {
|
|
56
48
|
color: theme.palette.text.primary
|
|
57
49
|
},
|
|
58
50
|
errorWrapper: {
|
|
51
|
+
flex: 1,
|
|
59
52
|
lineHeight: '18px',
|
|
60
53
|
display: 'flex',
|
|
61
|
-
flexDirection: 'column'
|
|
54
|
+
flexDirection: 'column',
|
|
55
|
+
paddingLeft: '8px',
|
|
56
|
+
paddingBottom: '8px'
|
|
62
57
|
},
|
|
63
58
|
errorTitle: {
|
|
64
59
|
display: 'flex',
|
|
@@ -92,6 +87,27 @@ var useStyles = makeStyles(function (theme) { return ({
|
|
|
92
87
|
},
|
|
93
88
|
warningIcon: {
|
|
94
89
|
fill: '#F9A825'
|
|
90
|
+
},
|
|
91
|
+
errorListItem: {
|
|
92
|
+
display: 'flex',
|
|
93
|
+
alignItems: 'flex-start',
|
|
94
|
+
'& svg': {
|
|
95
|
+
fill: 'currentColor'
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
listItemMarker: {
|
|
99
|
+
flexShrink: 0,
|
|
100
|
+
width: '24px',
|
|
101
|
+
marginTop: '3px',
|
|
102
|
+
display: 'flex',
|
|
103
|
+
justifyContent: 'center'
|
|
104
|
+
},
|
|
105
|
+
discIcon: {
|
|
106
|
+
height: '4px',
|
|
107
|
+
width: '4px',
|
|
108
|
+
backgroundColor: 'currentColor',
|
|
109
|
+
borderRadius: '50%',
|
|
110
|
+
marginTop: '4px'
|
|
95
111
|
}
|
|
96
112
|
}); });
|
|
97
113
|
export default useStyles;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { AttributeError } from '@reltio/mdm-sdk';
|
|
2
|
+
export declare const useCachedErrors: (allErrors: AttributeError[]) => AttributeError[];
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { useRef } from 'react';
|
|
1
|
+
import { useRef, useMemo } from 'react';
|
|
2
|
+
import { ErrorType, isViewMode } from '@reltio/mdm-sdk';
|
|
3
|
+
import { useMdmMode } from '../../contexts';
|
|
2
4
|
import { areErrorsEqual } from './ErrorsPanel/helpers';
|
|
3
5
|
export var useCachedErrors = function (allErrors) {
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
+
var mode = useMdmMode();
|
|
7
|
+
var filteredErrors = useMemo(function () { return (isViewMode(mode) ? allErrors : allErrors.filter(function (_a) {
|
|
8
|
+
var type = _a.type;
|
|
9
|
+
return type !== ErrorType.rdmIssueInReference;
|
|
10
|
+
})); }, [mode, allErrors]);
|
|
11
|
+
var cacheForFilteredErrors = useRef(filteredErrors);
|
|
12
|
+
var areEqualErrors = areErrorsEqual(filteredErrors, cacheForFilteredErrors.current);
|
|
6
13
|
if (!areEqualErrors) {
|
|
7
|
-
|
|
14
|
+
cacheForFilteredErrors.current = filteredErrors;
|
|
8
15
|
}
|
|
9
|
-
return
|
|
16
|
+
return cacheForFilteredErrors.current;
|
|
10
17
|
};
|
|
@@ -28,7 +28,9 @@ export var useWorkflowAssignee = function (_a) {
|
|
|
28
28
|
}, [assignee]);
|
|
29
29
|
var getAssignees = useCallback(function (text) {
|
|
30
30
|
if (workflowPath && canUpdateTask && taskId) {
|
|
31
|
-
var filterOutRest_1 = filter(function (item) {
|
|
31
|
+
var filterOutRest_1 = filter(function (item) {
|
|
32
|
+
return item.value.toLowerCase().includes(text === null || text === void 0 ? void 0 : text.toLowerCase());
|
|
33
|
+
});
|
|
32
34
|
if (assignees) {
|
|
33
35
|
return Promise.resolve(filterOutRest_1(assignees));
|
|
34
36
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
var SvgReadOnlyError = function (props) {
|
|
14
|
+
return (React.createElement("svg", __assign({ width: 12, height: 12, viewBox: "0 0 12 12", fill: "#DD2C00", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
15
|
+
React.createElement("path", { d: "M6 11.848a1.15 1.15 0 01-.445-.088 1.309 1.309 0 01-.386-.248L.487 6.832a1.31 1.31 0 01-.247-.387 1.207 1.207 0 010-.897c.058-.146.14-.272.247-.38L5.17.489c.116-.117.245-.202.386-.256a1.303 1.303 0 01.897 0 .953.953 0 01.38.256l4.68 4.68a.954.954 0 01.256.38 1.303 1.303 0 010 .897c-.054.14-.139.27-.256.386l-4.68 4.681a1.205 1.205 0 01-.831.335zm0-1.167L10.681 6 6 1.319 1.319 6 6 10.681zm-.583-4.098h1.166v-3.5H5.417v3.5zM6 8.333a.564.564 0 00.416-.167.564.564 0 00.167-.416.564.564 0 00-.167-.416A.564.564 0 006 7.167a.564.564 0 00-.416.167.564.564 0 00-.167.416c0 .165.056.304.167.416.112.111.25.167.416.167z" })));
|
|
16
|
+
};
|
|
17
|
+
export default SvgReadOnlyError;
|
package/esm/icons/index.d.ts
CHANGED
|
@@ -24,9 +24,9 @@ export { default as Ignored } from './Ignored';
|
|
|
24
24
|
export { default as IgnoredOutlined } from './IgnoredOutlined';
|
|
25
25
|
export { default as LogIn } from './LogIn';
|
|
26
26
|
export { default as LogOut } from './LogOut';
|
|
27
|
-
export { default as MlMatch } from './MlMatch';
|
|
28
27
|
export { default as Merge } from './Merge';
|
|
29
28
|
export { default as MergeDark } from './MergeDark';
|
|
29
|
+
export { default as MlMatch } from './MlMatch';
|
|
30
30
|
export { default as NegativeRuleIcon } from './NegativeRuleIcon';
|
|
31
31
|
export { default as NegativeRuleTooltipIcon } from './NegativeRuleTooltipIcon';
|
|
32
32
|
export { default as NestedAttribute } from './NestedAttribute';
|
|
@@ -35,15 +35,16 @@ export { default as NoDataSearch } from './NoDataSearch';
|
|
|
35
35
|
export { default as NoMatches } from './NoMatches';
|
|
36
36
|
export { default as NotMatchDark } from './NotMatchDark';
|
|
37
37
|
export { default as NotMatchRule } from './NotMatchRule';
|
|
38
|
-
export { default as PmIcon } from './PmIcon';
|
|
39
|
-
export { default as PmTaskIcon } from './PmTaskIcon';
|
|
40
38
|
export { default as Pin } from './Pin';
|
|
41
39
|
export { default as PinOutlined } from './PinOutlined';
|
|
42
40
|
export { default as PivotingIcon } from './PivotingIcon';
|
|
41
|
+
export { default as PmIcon } from './PmIcon';
|
|
42
|
+
export { default as PmTaskIcon } from './PmTaskIcon';
|
|
43
43
|
export { default as Polygon } from './Polygon';
|
|
44
44
|
export { default as PotentialMatch } from './PotentialMatch';
|
|
45
45
|
export { default as Profile } from './Profile';
|
|
46
46
|
export { default as Radius } from './Radius';
|
|
47
|
+
export { default as ReadOnlyError } from './ReadOnlyError';
|
|
47
48
|
export { default as Reassign } from './Reassign';
|
|
48
49
|
export { default as Recommended } from './Recommended';
|
|
49
50
|
export { default as ReferenceAttribute } from './ReferenceAttribute';
|
package/esm/icons/index.js
CHANGED
|
@@ -24,9 +24,9 @@ export { default as Ignored } from './Ignored';
|
|
|
24
24
|
export { default as IgnoredOutlined } from './IgnoredOutlined';
|
|
25
25
|
export { default as LogIn } from './LogIn';
|
|
26
26
|
export { default as LogOut } from './LogOut';
|
|
27
|
-
export { default as MlMatch } from './MlMatch';
|
|
28
27
|
export { default as Merge } from './Merge';
|
|
29
28
|
export { default as MergeDark } from './MergeDark';
|
|
29
|
+
export { default as MlMatch } from './MlMatch';
|
|
30
30
|
export { default as NegativeRuleIcon } from './NegativeRuleIcon';
|
|
31
31
|
export { default as NegativeRuleTooltipIcon } from './NegativeRuleTooltipIcon';
|
|
32
32
|
export { default as NestedAttribute } from './NestedAttribute';
|
|
@@ -35,15 +35,16 @@ export { default as NoDataSearch } from './NoDataSearch';
|
|
|
35
35
|
export { default as NoMatches } from './NoMatches';
|
|
36
36
|
export { default as NotMatchDark } from './NotMatchDark';
|
|
37
37
|
export { default as NotMatchRule } from './NotMatchRule';
|
|
38
|
-
export { default as PmIcon } from './PmIcon';
|
|
39
|
-
export { default as PmTaskIcon } from './PmTaskIcon';
|
|
40
38
|
export { default as Pin } from './Pin';
|
|
41
39
|
export { default as PinOutlined } from './PinOutlined';
|
|
42
40
|
export { default as PivotingIcon } from './PivotingIcon';
|
|
41
|
+
export { default as PmIcon } from './PmIcon';
|
|
42
|
+
export { default as PmTaskIcon } from './PmTaskIcon';
|
|
43
43
|
export { default as Polygon } from './Polygon';
|
|
44
44
|
export { default as PotentialMatch } from './PotentialMatch';
|
|
45
45
|
export { default as Profile } from './Profile';
|
|
46
46
|
export { default as Radius } from './Radius';
|
|
47
|
+
export { default as ReadOnlyError } from './ReadOnlyError';
|
|
47
48
|
export { default as Reassign } from './Reassign';
|
|
48
49
|
export { default as Recommended } from './Recommended';
|
|
49
50
|
export { default as ReferenceAttribute } from './ReferenceAttribute';
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1722",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
10
|
+
"@reltio/mdm-sdk": "^1.4.1712",
|
|
11
11
|
"classnames": "^2.2.5",
|
|
12
12
|
"d3-cloud": "^1.2.5",
|
|
13
13
|
"d3-geo": "^2.0.1",
|