@reltio/components 1.4.848 → 1.4.852
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/components/BasicView/BasicView.d.ts +1 -1
- package/components/ErrorWrapper/ErrorMessage.d.ts +2 -1
- package/components/ErrorWrapper/ErrorMessage.js +3 -2
- package/components/ErrorWrapper/ErrorWrapper.d.ts +5 -1
- package/components/ErrorWrapper/ErrorWrapper.js +3 -3
- package/components/ErrorWrapper/styles.js +1 -1
- package/components/ProfileBand/styles.js +1 -1
- package/components/ProfileBandNavigation/ProfileBandNavigationWidget.d.ts +1 -1
- package/components/ReactSelect/styles.d.ts +1 -1
- package/components/ReltioMap/MapControls/TopRightMapControls/TopRightMapControls.d.ts +1 -1
- package/components/SmallIconButton/SmallIconButton.d.ts +1 -1
- package/components/SmallIconButton/index.d.ts +2 -2
- package/components/attributes/editMode/AttributesPager/AttributeRenderer.d.ts +2 -2
- package/components/attributes/editMode/AttributesPager/AttributeRenderer.js +11 -9
- package/components/attributes/editMode/AttributesPager/AttributesPager.js +8 -6
- package/components/attributes/editMode/AttributesPager/styles.d.ts +1 -1
- package/components/attributes/editMode/AttributesPager/styles.js +3 -0
- package/components/attributes/editMode/AttributesView/index.d.ts +4 -4
- package/components/attributes/editMode/ComplexAttribute/ComplexAttribute.d.ts +2 -2
- package/components/attributes/editMode/ComplexAttribute/ComplexAttribute.js +1 -1
- package/components/attributes/editMode/ComplexAttribute/styles.d.ts +1 -1
- package/components/attributes/editMode/ComplexAttribute/styles.js +3 -0
- package/components/attributes/editMode/NestedAttribute/NestedAttribute.d.ts +2 -2
- package/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.d.ts +2 -2
- package/components/attributes/editMode/ReferenceAttribute/index.d.ts +2 -2
- package/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +1 -1
- package/components/attributes/inline/AttributesList/AttributesList.d.ts +2 -2
- package/components/attributes/inline/AttributesPager/AttributesPager.d.ts +2 -2
- package/components/attributes/inline/ComplexAttribute/ComplexAttribute.d.ts +3 -3
- package/components/attributes/inline/ComplexAttribute/ComplexAttribute.js +6 -6
- package/components/attributes/inline/ImageAttribute/ImageAttribute.d.ts +2 -2
- package/components/attributes/inline/ImageAttributesBlock/ImageAttributesBlock.d.ts +2 -2
- package/components/attributes/inline/NestedAttribute/NestedAttribute.d.ts +2 -2
- package/components/attributes/inline/NestedAttributesBlock/NestedAttributesBlock.d.ts +3 -3
- package/components/attributes/inline/NestedAttributesBlock/NestedAttributesBlock.js +3 -3
- package/components/attributes/inline/ReferenceAttribute/ReferenceAttribute.d.ts +2 -2
- package/components/attributes/inline/ReferenceAttributesBlock/ReferenceAttributesBlock.d.ts +2 -2
- package/components/attributes/inline/SimpleAttribute/SimpleAttribute.d.ts +3 -3
- package/components/attributes/inline/SimpleAttribute/SimpleAttribute.js +5 -5
- package/components/attributes/inline/SimpleAttributesBlock/SimpleAttributesBlock.d.ts +3 -3
- package/components/attributes/inline/SimpleAttributesBlock/SimpleAttributesBlock.js +3 -3
- package/components/attributes/readMode/AttributesView/index.d.ts +4 -4
- package/components/attributes/readMode/NestedAttribute/NestedAttribute.d.ts +2 -2
- package/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.d.ts +2 -2
- package/components/attributes/readMode/ReferenceAttribute/index.d.ts +2 -2
- package/components/crosswalks/AttributesTable/AttributesTable.d.ts +8 -7
- package/components/crosswalks/AttributesTable/AttributesTable.js +12 -9
- package/components/crosswalks/AttributesTable/cell-renderers/AttributeValuesRenderer.d.ts +2 -1
- package/components/crosswalks/AttributesTable/cell-renderers/AttributeValuesRenderer.js +3 -3
- package/components/crosswalks/AttributesTable/cell-renderers/AttributesHeadCellRenderer.d.ts +9 -2
- package/components/crosswalks/AttributesTable/cell-renderers/AttributesHeadCellRenderer.js +19 -3
- package/components/crosswalks/AttributesTable/cell-renderers/attribute-renderers/AttributesFactory.d.ts +2 -0
- package/components/history/ProfileBandHistory/ProfileBandHistory.d.ts +3 -0
- package/components/history/ProfileBandHistory/ProfileBandHistory.js +45 -0
- package/components/history/ProfileBandHistory/styles.d.ts +1 -0
- package/components/history/ProfileBandHistory/styles.js +18 -0
- package/components/history/hooks/useHistorySlice.d.ts +4 -0
- package/components/history/hooks/useHistorySlice.js +58 -0
- package/components/history/index.d.ts +2 -2
- package/components/history/index.js +5 -5
- package/package.json +3 -3
|
@@ -108,14 +108,14 @@ declare namespace ComplexAttribute {
|
|
|
108
108
|
sources: PropTypes.Requireable<object[]>;
|
|
109
109
|
}>>;
|
|
110
110
|
ownError: PropTypes.Requireable<PropTypes.InferProps<{
|
|
111
|
-
type: PropTypes.Validator<
|
|
111
|
+
type: PropTypes.Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
112
112
|
attributeTypeUri: PropTypes.Validator<string>;
|
|
113
113
|
parentUri: PropTypes.Validator<string>;
|
|
114
114
|
uri: PropTypes.Requireable<string>;
|
|
115
115
|
message: PropTypes.Requireable<string>;
|
|
116
116
|
}>>;
|
|
117
117
|
errors: PropTypes.Requireable<PropTypes.InferProps<{
|
|
118
|
-
type: PropTypes.Validator<
|
|
118
|
+
type: PropTypes.Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
119
119
|
attributeTypeUri: PropTypes.Validator<string>;
|
|
120
120
|
parentUri: PropTypes.Validator<string>;
|
|
121
121
|
uri: PropTypes.Requireable<string>;
|
|
@@ -90,7 +90,7 @@ var ComplexAttribute = function (_a) {
|
|
|
90
90
|
react_1.default.createElement("div", { className: styles.editor },
|
|
91
91
|
react_1.default.createElement("div", { className: styles.titleContainer },
|
|
92
92
|
react_1.default.createElement(ArrowExpandButton_1.default, { onClick: function () { return setExpanded(function (value) { return !value; }); }, expanded: expanded, className: styles.expandButton, disabled: deleted }),
|
|
93
|
-
react_1.default.createElement(ErrorWrapper_1.default, { errorMessage: errorMessage },
|
|
93
|
+
react_1.default.createElement(ErrorWrapper_1.default, { errorMessage: errorMessage, classes: { helperText: styles.errorWrapperHelperText } },
|
|
94
94
|
react_1.default.createElement("div", { className: classnames_1.default(styles.label, (_b = {}, _b[styles.deleted] = deleted, _b)) }, label))),
|
|
95
95
|
react_1.default.createElement("div", { className: styles.actions },
|
|
96
96
|
edited && (react_1.default.createElement(Typography_1.default, { variant: "caption", className: styles.editedLabel },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"deleted" | "label" | "actions" | "expandButton" | "editor" | "editedLabel" | "titleContainer">;
|
|
1
|
+
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"deleted" | "label" | "actions" | "expandButton" | "editor" | "editedLabel" | "titleContainer" | "errorWrapperHelperText">;
|
|
@@ -86,14 +86,14 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
86
86
|
sources: import("prop-types").Requireable<object[]>;
|
|
87
87
|
}>>;
|
|
88
88
|
ownError: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
89
|
-
type: import("prop-types").Validator<
|
|
89
|
+
type: import("prop-types").Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
90
90
|
attributeTypeUri: import("prop-types").Validator<string>;
|
|
91
91
|
parentUri: import("prop-types").Validator<string>;
|
|
92
92
|
uri: import("prop-types").Requireable<string>;
|
|
93
93
|
message: import("prop-types").Requireable<string>;
|
|
94
94
|
}>>;
|
|
95
95
|
errors: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
96
|
-
type: import("prop-types").Validator<
|
|
96
|
+
type: import("prop-types").Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
97
97
|
attributeTypeUri: import("prop-types").Validator<string>;
|
|
98
98
|
parentUri: import("prop-types").Validator<string>;
|
|
99
99
|
uri: import("prop-types").Requireable<string>;
|
|
@@ -94,14 +94,14 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
94
94
|
lazy: PropTypes.Requireable<boolean>;
|
|
95
95
|
mode: PropTypes.Requireable<any>;
|
|
96
96
|
ownError: PropTypes.Requireable<PropTypes.InferProps<{
|
|
97
|
-
type: PropTypes.Validator<
|
|
97
|
+
type: PropTypes.Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
98
98
|
attributeTypeUri: PropTypes.Validator<string>;
|
|
99
99
|
parentUri: PropTypes.Validator<string>;
|
|
100
100
|
uri: PropTypes.Requireable<string>;
|
|
101
101
|
message: PropTypes.Requireable<string>;
|
|
102
102
|
}>>;
|
|
103
103
|
errors: PropTypes.Requireable<PropTypes.InferProps<{
|
|
104
|
-
type: PropTypes.Validator<
|
|
104
|
+
type: PropTypes.Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
105
105
|
attributeTypeUri: PropTypes.Validator<string>;
|
|
106
106
|
parentUri: PropTypes.Validator<string>;
|
|
107
107
|
uri: PropTypes.Requireable<string>;
|
|
@@ -95,14 +95,14 @@ declare var _default: import("react-redux").ConnectedComponent<import("react").M
|
|
|
95
95
|
lazy: import("prop-types").Requireable<boolean>;
|
|
96
96
|
mode: import("prop-types").Requireable<any>;
|
|
97
97
|
ownError: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
98
|
-
type: import("prop-types").Validator<
|
|
98
|
+
type: import("prop-types").Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
99
99
|
attributeTypeUri: import("prop-types").Validator<string>;
|
|
100
100
|
parentUri: import("prop-types").Validator<string>;
|
|
101
101
|
uri: import("prop-types").Requireable<string>;
|
|
102
102
|
message: import("prop-types").Requireable<string>;
|
|
103
103
|
}>>;
|
|
104
104
|
errors: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
105
|
-
type: import("prop-types").Validator<
|
|
105
|
+
type: import("prop-types").Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
106
106
|
attributeTypeUri: import("prop-types").Validator<string>;
|
|
107
107
|
parentUri: import("prop-types").Validator<string>;
|
|
108
108
|
uri: import("prop-types").Requireable<string>;
|
|
@@ -87,7 +87,7 @@ var SimpleAttributeEditor = function (_a) {
|
|
|
87
87
|
});
|
|
88
88
|
var onDelete = function () {
|
|
89
89
|
onDeleteAttribute({ uri: attributeValue.uri, attributeType: attributeType });
|
|
90
|
-
if (mdm_sdk_1.getErrorType(ownError) !== mdm_sdk_1.
|
|
90
|
+
if (mdm_sdk_1.getErrorType(ownError) !== mdm_sdk_1.ErrorType.missed) {
|
|
91
91
|
deactivateError();
|
|
92
92
|
}
|
|
93
93
|
};
|
|
@@ -11,8 +11,8 @@ declare type Props = {
|
|
|
11
11
|
attributes: RecordAttributesType;
|
|
12
12
|
parentUri: string;
|
|
13
13
|
crosswalksMap: CrosswalksMap;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
disableDelete?: boolean;
|
|
15
|
+
disableEdit?: boolean;
|
|
16
16
|
onPin: (event: PinAttributeEvent) => void;
|
|
17
17
|
onIgnore: (event: IgnoreAttributeEvent) => void;
|
|
18
18
|
onDelete: (event: DeleteAttributeEvent) => void;
|
|
@@ -13,8 +13,8 @@ declare type Props = {
|
|
|
13
13
|
paging?: Paging;
|
|
14
14
|
max?: number;
|
|
15
15
|
crosswalksMap: CrosswalksMap;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
disableDelete?: boolean;
|
|
17
|
+
disableEdit?: boolean;
|
|
18
18
|
onPin: (event: PinAttributeEvent) => void;
|
|
19
19
|
onIgnore: (event: IgnoreAttributeEvent) => void;
|
|
20
20
|
onDelete: (event: DeleteAttributeEvent) => void;
|
|
@@ -13,13 +13,13 @@ declare type Props = {
|
|
|
13
13
|
lazy?: boolean;
|
|
14
14
|
attributeTypesList: AttributeType[];
|
|
15
15
|
crosswalksMap: CrosswalksMap;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
disableEdit?: boolean;
|
|
17
|
+
disableDelete?: boolean;
|
|
18
18
|
onPin: (event: PinAttributeEvent) => void;
|
|
19
19
|
onIgnore: (event: IgnoreAttributeEvent) => void;
|
|
20
20
|
onDelete: (event: DeleteAttributeEvent) => void;
|
|
21
21
|
onEdit: (event: EditAttributeEvent) => void;
|
|
22
22
|
onAdd: (event: AddAttributeEvent) => void;
|
|
23
23
|
};
|
|
24
|
-
declare const ComplexAttribute: ({ attributeType, attributeValue, attributeTypesList, label, crosswalksMap,
|
|
24
|
+
declare const ComplexAttribute: ({ attributeType, attributeValue, attributeTypesList, label, crosswalksMap, disableEdit, disableDelete, onPin, onIgnore, onDelete, onEdit, onAdd }: Props) => JSX.Element;
|
|
25
25
|
export default ComplexAttribute;
|
|
@@ -37,17 +37,17 @@ var hooks_1 = require("../../../../hooks");
|
|
|
37
37
|
var contexts_1 = require("../../../../contexts");
|
|
38
38
|
var styles_1 = require("./styles");
|
|
39
39
|
var ComplexAttribute = function (_a) {
|
|
40
|
-
var attributeType = _a.attributeType, attributeValue = _a.attributeValue, attributeTypesList = _a.attributeTypesList, label = _a.label, crosswalksMap = _a.crosswalksMap,
|
|
40
|
+
var attributeType = _a.attributeType, attributeValue = _a.attributeValue, attributeTypesList = _a.attributeTypesList, label = _a.label, crosswalksMap = _a.crosswalksMap, disableEdit = _a.disableEdit, disableDelete = _a.disableDelete, onPin = _a.onPin, onIgnore = _a.onIgnore, onDelete = _a.onDelete, onEdit = _a.onEdit, onAdd = _a.onAdd;
|
|
41
41
|
var styles = styles_1.useStyles();
|
|
42
|
-
var
|
|
43
|
-
var canEdit =
|
|
44
|
-
var canDelete =
|
|
42
|
+
var _b = useAttributeState_1.useAttributeState(), isReadingMode = _b.isReadingMode, onMouseEnter = _b.onMouseEnter, onMouseLeave = _b.onMouseLeave;
|
|
43
|
+
var canEdit = !disableEdit && mdm_sdk_1.checkMetadataForUpdate(mdm_sdk_1.ModeTypes.EDITING, attributeType);
|
|
44
|
+
var canDelete = !disableDelete && mdm_sdk_1.checkMetadataForDelete(mdm_sdk_1.ModeTypes.EDITING, attributeType);
|
|
45
45
|
var isTemporary = mdm_sdk_1.isTempUri(attributeValue.uri);
|
|
46
46
|
var showPin = !isTemporary && ((!isReadingMode && canEdit) || attributeValue.pin);
|
|
47
47
|
var showIgnore = !isTemporary && ((!isReadingMode && canEdit) || attributeValue.ignored);
|
|
48
48
|
var showDelete = !isReadingMode && canDelete;
|
|
49
49
|
var expandedFromContext = contexts_1.useAttributeExpanded(attributeValue.uri);
|
|
50
|
-
var
|
|
50
|
+
var _c = react_1.useState(expandedFromContext || isTemporary), expanded = _c[0], setExpanded = _c[1];
|
|
51
51
|
hooks_1.useDidUpdateEffect(function () {
|
|
52
52
|
if (expandedFromContext)
|
|
53
53
|
setExpanded(expandedFromContext);
|
|
@@ -70,6 +70,6 @@ var ComplexAttribute = function (_a) {
|
|
|
70
70
|
crosswalks: crosswalksMap[attributeValue.uri]
|
|
71
71
|
});
|
|
72
72
|
} })))),
|
|
73
|
-
expanded && (react_1.default.createElement(AttributesList_1.default, { attributeTypes: attributeTypesList, attributes: attributeValue.value, parentUri: attributeValue.uri, crosswalksMap: crosswalksMap,
|
|
73
|
+
expanded && (react_1.default.createElement(AttributesList_1.default, { attributeTypes: attributeTypesList, attributes: attributeValue.value, parentUri: attributeValue.uri, crosswalksMap: crosswalksMap, disableEdit: !canEdit, disableDelete: !canDelete, onPin: onPin, onIgnore: onIgnore, onDelete: onDelete, onEdit: onEdit, onAdd: onAdd }))));
|
|
74
74
|
};
|
|
75
75
|
exports.default = ComplexAttribute;
|
|
@@ -10,8 +10,8 @@ declare type Props = {
|
|
|
10
10
|
attributeValue: ImageAttributeValue;
|
|
11
11
|
attributeType: AttributeType;
|
|
12
12
|
crosswalksMap: CrosswalksMap;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
disableEdit?: boolean;
|
|
14
|
+
disableDelete?: boolean;
|
|
15
15
|
onPin: (event: PinAttributeEvent) => void;
|
|
16
16
|
onIgnore: (event: IgnoreAttributeEvent) => void;
|
|
17
17
|
onDelete: (event: DeleteAttributeEvent) => void;
|
|
@@ -11,8 +11,8 @@ declare type Props = {
|
|
|
11
11
|
attributeType: AttributeType;
|
|
12
12
|
attributeValues: ImageAttributeValue[];
|
|
13
13
|
crosswalksMap: CrosswalksMap;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
disableDelete?: boolean;
|
|
15
|
+
disableEdit?: boolean;
|
|
16
16
|
onPin: (event: PinAttributeEvent) => void;
|
|
17
17
|
onIgnore: (event: IgnoreAttributeEvent) => void;
|
|
18
18
|
onDelete: (event: DeleteAttributeEvent) => void;
|
|
@@ -10,8 +10,8 @@ declare type Props = {
|
|
|
10
10
|
attributeValue: NestedAttributeValue;
|
|
11
11
|
attributeType: AttributeType;
|
|
12
12
|
crosswalksMap: CrosswalksMap;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
disableEdit?: boolean;
|
|
14
|
+
disableDelete?: boolean;
|
|
15
15
|
onPin: (event: PinAttributeEvent) => void;
|
|
16
16
|
onIgnore: (event: IgnoreAttributeEvent) => void;
|
|
17
17
|
onDelete: (event: DeleteAttributeEvent) => void;
|
|
@@ -12,13 +12,13 @@ declare type Props = {
|
|
|
12
12
|
attributeValues: NestedAttributeValue[];
|
|
13
13
|
crosswalksMap: CrosswalksMap;
|
|
14
14
|
parentUri: string;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
disableDelete?: boolean;
|
|
16
|
+
disableEdit?: boolean;
|
|
17
17
|
onPin: (event: PinAttributeEvent) => void;
|
|
18
18
|
onIgnore: (event: IgnoreAttributeEvent) => void;
|
|
19
19
|
onDelete: (event: DeleteAttributeEvent) => void;
|
|
20
20
|
onEdit: (event: EditAttributeEvent) => void;
|
|
21
21
|
onAdd: (event: AddAttributeEvent) => void;
|
|
22
22
|
};
|
|
23
|
-
declare const NestedAttributesBlock: ({ className, attributeValues, attributeType, onAdd, parentUri, ...props }: Props) => JSX.Element;
|
|
23
|
+
declare const NestedAttributesBlock: ({ className, attributeValues, attributeType, onAdd, parentUri, disableEdit, ...props }: Props) => JSX.Element;
|
|
24
24
|
export default NestedAttributesBlock;
|
|
@@ -31,14 +31,14 @@ var NestedAttribute_1 = __importDefault(require("../NestedAttribute/NestedAttrib
|
|
|
31
31
|
var Button_1 = __importDefault(require("@material-ui/core/Button"));
|
|
32
32
|
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
33
33
|
var NestedAttributesBlock = function (_a) {
|
|
34
|
-
var className = _a.className, attributeValues = _a.attributeValues, attributeType = _a.attributeType, onAdd = _a.onAdd, parentUri = _a.parentUri, props = __rest(_a, ["className", "attributeValues", "attributeType", "onAdd", "parentUri"]);
|
|
35
|
-
var canCreate = mdm_sdk_1.checkMetadataForCreate(mdm_sdk_1.ModeTypes.EDITING, attributeType);
|
|
34
|
+
var className = _a.className, attributeValues = _a.attributeValues, attributeType = _a.attributeType, onAdd = _a.onAdd, parentUri = _a.parentUri, disableEdit = _a.disableEdit, props = __rest(_a, ["className", "attributeValues", "attributeType", "onAdd", "parentUri", "disableEdit"]);
|
|
35
|
+
var canCreate = !disableEdit && mdm_sdk_1.checkMetadataForCreate(mdm_sdk_1.ModeTypes.EDITING, attributeType);
|
|
36
36
|
return attributeValues.length === 0 && canCreate ? (react_1.default.createElement(Button_1.default, { variant: "text", color: "primary", onClick: function () {
|
|
37
37
|
return onAdd({
|
|
38
38
|
parentUri: parentUri,
|
|
39
39
|
attributeType: attributeType,
|
|
40
40
|
index: 0
|
|
41
41
|
});
|
|
42
|
-
} }, ui_i18n_1.default.text('Create attribute'))) : (react_1.default.createElement("div", { className: className }, attributeValues.map(function (value) { return (react_1.default.createElement(NestedAttribute_1.default, __assign({ key: value.uri, attributeValue: value, attributeType: attributeType, onAdd: onAdd }, props))); })));
|
|
42
|
+
} }, ui_i18n_1.default.text('Create attribute'))) : (react_1.default.createElement("div", { className: className }, attributeValues.map(function (value) { return (react_1.default.createElement(NestedAttribute_1.default, __assign({ key: value.uri, attributeValue: value, attributeType: attributeType, onAdd: onAdd, disableEdit: disableEdit }, props))); })));
|
|
43
43
|
};
|
|
44
44
|
exports.default = NestedAttributesBlock;
|
|
@@ -10,8 +10,8 @@ declare type Props = {
|
|
|
10
10
|
attributeValue: ReferenceAttributeValue;
|
|
11
11
|
attributeType: AttributeType;
|
|
12
12
|
crosswalksMap: RelationCrosswalksMap;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
disableEdit?: boolean;
|
|
14
|
+
disableDelete?: boolean;
|
|
15
15
|
onPin: (event: PinAttributeEvent) => void;
|
|
16
16
|
onIgnore: (event: IgnoreAttributeEvent) => void;
|
|
17
17
|
onDelete: (event: DeleteAttributeEvent) => void;
|
|
@@ -11,8 +11,8 @@ declare type Props = {
|
|
|
11
11
|
attributeType: AttributeType;
|
|
12
12
|
attributeValues: ReferenceAttributeValue[];
|
|
13
13
|
crosswalksMap: RelationCrosswalksMap;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
disableDelete?: boolean;
|
|
15
|
+
disableEdit?: boolean;
|
|
16
16
|
onPin: (event: PinAttributeEvent) => void;
|
|
17
17
|
onIgnore: (event: IgnoreAttributeEvent) => void;
|
|
18
18
|
onDelete: (event: DeleteAttributeEvent) => void;
|
|
@@ -10,12 +10,12 @@ declare type Props = {
|
|
|
10
10
|
attributeValue: SimpleAttributeValue;
|
|
11
11
|
attributeType: AttributeType;
|
|
12
12
|
crosswalk: Crosswalk | RelationCrosswalk;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
disableEdit?: boolean;
|
|
14
|
+
disableDelete?: boolean;
|
|
15
15
|
onDelete: (event: DeleteAttributeEvent) => void;
|
|
16
16
|
onEdit: (event: EditAttributeEvent) => void;
|
|
17
17
|
onPin: (event: PinAttributeEvent) => void;
|
|
18
18
|
onIgnore: (event: IgnoreAttributeEvent) => void;
|
|
19
19
|
};
|
|
20
|
-
declare const SimpleAttribute: ({ className, dataReltioId, attributeType, attributeValue, crosswalk,
|
|
20
|
+
declare const SimpleAttribute: ({ className, dataReltioId, attributeType, attributeValue, crosswalk, disableEdit, disableDelete, onIgnore, onEdit, onPin, onDelete }: Props) => JSX.Element;
|
|
21
21
|
export default SimpleAttribute;
|
|
@@ -40,19 +40,19 @@ var useAttributeState_1 = require("../hooks/useAttributeState");
|
|
|
40
40
|
var contexts_1 = require("../../../../contexts");
|
|
41
41
|
var styles_1 = require("./styles");
|
|
42
42
|
var SimpleAttribute = function (_a) {
|
|
43
|
-
var className = _a.className, dataReltioId = _a.dataReltioId, _b = _a.attributeType, attributeType = _b === void 0 ? null : _b, attributeValue = _a.attributeValue, crosswalk = _a.crosswalk,
|
|
44
|
-
var
|
|
43
|
+
var className = _a.className, dataReltioId = _a.dataReltioId, _b = _a.attributeType, attributeType = _b === void 0 ? null : _b, attributeValue = _a.attributeValue, crosswalk = _a.crosswalk, disableEdit = _a.disableEdit, disableDelete = _a.disableDelete, onIgnore = _a.onIgnore, onEdit = _a.onEdit, onPin = _a.onPin, onDelete = _a.onDelete;
|
|
44
|
+
var _c = useAttributeState_1.useAttributeState(), isReadingMode = _c.isReadingMode, isEditingMode = _c.isEditingMode, isHovered = _c.isHovered, onMouseEnter = _c.onMouseEnter, onMouseLeave = _c.onMouseLeave, setReadingMode = _c.setReadingMode, setEditingMode = _c.setEditingMode;
|
|
45
45
|
var containerRef = react_1.useRef();
|
|
46
46
|
var id = mdm_sdk_1.getLastUriPart(attributeValue.uri);
|
|
47
47
|
var crosswalkDisabled = mdm_sdk_1.isCrosswalkDisabled(crosswalk);
|
|
48
48
|
var canModifyAttribute = !attributeType.system && !crosswalkDisabled;
|
|
49
|
-
var canEdit = canModifyAttribute &&
|
|
50
|
-
var canDelete = canModifyAttribute &&
|
|
49
|
+
var canEdit = canModifyAttribute && !disableEdit && mdm_sdk_1.checkMetadataForUpdate(mdm_sdk_1.ModeTypes.EDITING, attributeType);
|
|
50
|
+
var canDelete = canModifyAttribute && !disableDelete && mdm_sdk_1.checkMetadataForDelete(mdm_sdk_1.ModeTypes.EDITING, attributeType);
|
|
51
51
|
var isTemporary = mdm_sdk_1.isTempUri(attributeValue.uri);
|
|
52
52
|
var showPin = !isTemporary && ((!isReadingMode && canEdit) || attributeValue.pin);
|
|
53
53
|
var showIgnore = !isTemporary && ((!isReadingMode && canEdit) || attributeValue.ignored);
|
|
54
54
|
var color = contexts_1.useCrosswalkColor(crosswalk);
|
|
55
|
-
var
|
|
55
|
+
var _d = contexts_1.useCrosswalkHighlight(crosswalk), isHighlighted = _d.isHighlighted, isDimmed = _d.isDimmed, highlightCrosswalk = _d.highlightCrosswalk, removeHighlight = _d.removeHighlight;
|
|
56
56
|
var styles = styles_1.useStyles({
|
|
57
57
|
variant: crosswalkDisabled ? 'outlined' : 'filled',
|
|
58
58
|
opaque: !isDimmed,
|
|
@@ -11,13 +11,13 @@ declare type Props = {
|
|
|
11
11
|
attributeValues: SimpleAttributeValue[];
|
|
12
12
|
crosswalksMap: CrosswalksMap;
|
|
13
13
|
parentUri: string;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
disableDelete?: boolean;
|
|
15
|
+
disableEdit?: boolean;
|
|
16
16
|
onPin: (event: PinAttributeEvent) => void;
|
|
17
17
|
onIgnore: (event: IgnoreAttributeEvent) => void;
|
|
18
18
|
onDelete: (event: DeleteAttributeEvent) => void;
|
|
19
19
|
onEdit: (event: EditAttributeEvent) => void;
|
|
20
20
|
onAdd: (event: AddAttributeEvent) => void;
|
|
21
21
|
};
|
|
22
|
-
declare const SimpleAttributesBlock: ({ attributeValues, attributeType, parentUri,
|
|
22
|
+
declare const SimpleAttributesBlock: ({ attributeValues, attributeType, parentUri, disableEdit, crosswalksMap, onAdd, ...props }: Props) => JSX.Element;
|
|
23
23
|
export default SimpleAttributesBlock;
|
|
@@ -32,7 +32,7 @@ var react_dnd_1 = require("react-dnd");
|
|
|
32
32
|
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
33
33
|
var styles_1 = require("./styles");
|
|
34
34
|
var SimpleAttributesBlock = function (_a) {
|
|
35
|
-
var attributeValues = _a.attributeValues, attributeType = _a.attributeType, parentUri = _a.parentUri,
|
|
35
|
+
var attributeValues = _a.attributeValues, attributeType = _a.attributeType, parentUri = _a.parentUri, disableEdit = _a.disableEdit, crosswalksMap = _a.crosswalksMap, onAdd = _a.onAdd, props = __rest(_a, ["attributeValues", "attributeType", "parentUri", "disableEdit", "crosswalksMap", "onAdd"]);
|
|
36
36
|
var styles = styles_1.useStyles();
|
|
37
37
|
var _b = react_dnd_1.useDrop({
|
|
38
38
|
accept: 'Crosswalk',
|
|
@@ -41,7 +41,7 @@ var SimpleAttributesBlock = function (_a) {
|
|
|
41
41
|
var isRelationCrosswalk = mdm_sdk_1.isRelationUri(crosswalk.uri) || crosswalk.ownerType === 'relation';
|
|
42
42
|
var isEntityCrosswalk = mdm_sdk_1.isEntityUri(crosswalk.uri) && crosswalk.ownerType === 'entity';
|
|
43
43
|
return (mdm_sdk_1.checkMetadataForCreate(mdm_sdk_1.ModeTypes.EDITING, attributeType) &&
|
|
44
|
-
|
|
44
|
+
!disableEdit &&
|
|
45
45
|
((isRelationCrosswalk && mdm_sdk_1.isRelationTypeUri(attributeType.uri)) ||
|
|
46
46
|
(isEntityCrosswalk && mdm_sdk_1.isEntityTypeUri(attributeType.uri))));
|
|
47
47
|
},
|
|
@@ -58,7 +58,7 @@ var SimpleAttributesBlock = function (_a) {
|
|
|
58
58
|
return (react_1.default.createElement("div", { ref: drop, className: styles.simpleAttributesWrapper },
|
|
59
59
|
attributeValues.map(function (value) {
|
|
60
60
|
var _a;
|
|
61
|
-
return (_a = crosswalksMap[value.uri]) === null || _a === void 0 ? void 0 : _a.map(function (crosswalk) { return (react_1.default.createElement(SimpleAttribute_1.default, __assign({ key: value.uri + crosswalk.uri, attributeType: attributeType, attributeValue: value, crosswalk: crosswalk,
|
|
61
|
+
return (_a = crosswalksMap[value.uri]) === null || _a === void 0 ? void 0 : _a.map(function (crosswalk) { return (react_1.default.createElement(SimpleAttribute_1.default, __assign({ key: value.uri + crosswalk.uri, attributeType: attributeType, attributeValue: value, crosswalk: crosswalk, disableEdit: disableEdit, dataReltioId: "value-index-" + attributeIndex++ }, props))); });
|
|
62
62
|
}),
|
|
63
63
|
isDragItemOver && react_1.default.createElement("div", { className: styles.dropIndicator }, ui_i18n_1.default.text('Drop here'))));
|
|
64
64
|
};
|
|
@@ -5,17 +5,17 @@ declare const _default: import("react-redux").ConnectedComponent<({ className, e
|
|
|
5
5
|
entity?: import("@reltio/mdm-sdk").Entity | Record<string, never>;
|
|
6
6
|
metadata: import("@reltio/mdm-sdk").Metadata;
|
|
7
7
|
caption?: string;
|
|
8
|
+
includeUris?: string[];
|
|
9
|
+
excludeUris?: string[];
|
|
8
10
|
className?: string;
|
|
9
11
|
attributesCount?: number;
|
|
10
|
-
excludeUris?: string[];
|
|
11
|
-
includeUris?: string[];
|
|
12
12
|
}) => JSX.Element, import("react-redux").Omit<{
|
|
13
13
|
entity?: import("@reltio/mdm-sdk").Entity | Record<string, never>;
|
|
14
14
|
metadata: import("@reltio/mdm-sdk").Metadata;
|
|
15
15
|
caption?: string;
|
|
16
|
+
includeUris?: string[];
|
|
17
|
+
excludeUris?: string[];
|
|
16
18
|
className?: string;
|
|
17
19
|
attributesCount?: number;
|
|
18
|
-
excludeUris?: string[];
|
|
19
|
-
includeUris?: string[];
|
|
20
20
|
}, "metadata">>;
|
|
21
21
|
export default _default;
|
|
@@ -90,14 +90,14 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
90
90
|
sources: import("prop-types").Requireable<object[]>;
|
|
91
91
|
}>>;
|
|
92
92
|
ownError: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
93
|
-
type: import("prop-types").Validator<
|
|
93
|
+
type: import("prop-types").Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
94
94
|
attributeTypeUri: import("prop-types").Validator<string>;
|
|
95
95
|
parentUri: import("prop-types").Validator<string>;
|
|
96
96
|
uri: import("prop-types").Requireable<string>;
|
|
97
97
|
message: import("prop-types").Requireable<string>;
|
|
98
98
|
}>>;
|
|
99
99
|
errors: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
100
|
-
type: import("prop-types").Validator<
|
|
100
|
+
type: import("prop-types").Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
101
101
|
attributeTypeUri: import("prop-types").Validator<string>;
|
|
102
102
|
parentUri: import("prop-types").Validator<string>;
|
|
103
103
|
uri: import("prop-types").Requireable<string>;
|
|
@@ -92,14 +92,14 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
92
92
|
sources: import("prop-types").Requireable<object[]>;
|
|
93
93
|
}>>;
|
|
94
94
|
ownError: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
95
|
-
type: import("prop-types").Validator<
|
|
95
|
+
type: import("prop-types").Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
96
96
|
attributeTypeUri: import("prop-types").Validator<string>;
|
|
97
97
|
parentUri: import("prop-types").Validator<string>;
|
|
98
98
|
uri: import("prop-types").Requireable<string>;
|
|
99
99
|
message: import("prop-types").Requireable<string>;
|
|
100
100
|
}>>;
|
|
101
101
|
errors: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
102
|
-
type: import("prop-types").Validator<
|
|
102
|
+
type: import("prop-types").Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
103
103
|
attributeTypeUri: import("prop-types").Validator<string>;
|
|
104
104
|
parentUri: import("prop-types").Validator<string>;
|
|
105
105
|
uri: import("prop-types").Requireable<string>;
|
|
@@ -93,14 +93,14 @@ declare var _default: import("react-redux").ConnectedComponent<import("react").M
|
|
|
93
93
|
sources: import("prop-types").Requireable<object[]>;
|
|
94
94
|
}>>;
|
|
95
95
|
ownError: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
96
|
-
type: import("prop-types").Validator<
|
|
96
|
+
type: import("prop-types").Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
97
97
|
attributeTypeUri: import("prop-types").Validator<string>;
|
|
98
98
|
parentUri: import("prop-types").Validator<string>;
|
|
99
99
|
uri: import("prop-types").Requireable<string>;
|
|
100
100
|
message: import("prop-types").Requireable<string>;
|
|
101
101
|
}>>;
|
|
102
102
|
errors: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
103
|
-
type: import("prop-types").Validator<
|
|
103
|
+
type: import("prop-types").Validator<import("@reltio/mdm-sdk").ErrorType>;
|
|
104
104
|
attributeTypeUri: import("prop-types").Validator<string>;
|
|
105
105
|
parentUri: import("prop-types").Validator<string>;
|
|
106
106
|
uri: import("prop-types").Requireable<string>;
|
|
@@ -8,13 +8,14 @@ declare type Props = {
|
|
|
8
8
|
crosswalksMap: CrosswalksByOwnerTypeMap;
|
|
9
9
|
visibleColumns?: string[];
|
|
10
10
|
onChangeVisibleColumns?: (visibleColumns: string[]) => void;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
onDelete?: (event: DeleteInlineAttributeEvent) => void;
|
|
13
|
+
onPin?: (event: PinInlineAttributeEvent) => void;
|
|
14
|
+
onIgnore?: (event: IgnoreInlineAttributeEvent) => void;
|
|
15
|
+
onEdit?: (event: EditInlineAttributeEvent) => void;
|
|
16
|
+
onAdd?: (event: AddInlineAttributeEvent) => void;
|
|
16
17
|
selectedAttributeTypes?: AttributeType[];
|
|
17
|
-
onSelectAttributeTypes
|
|
18
|
+
onSelectAttributeTypes?: (selected: AttributeType[]) => void;
|
|
18
19
|
};
|
|
19
|
-
declare const _default: React.MemoExoticComponent<({ entity, isLoading, crosswalksMap, visibleColumns, onChangeVisibleColumns, onDelete, onPin, onIgnore, onEdit, onAdd, selectedAttributeTypes, onSelectAttributeTypes }: Props) => JSX.Element>;
|
|
20
|
+
declare const _default: React.MemoExoticComponent<({ entity, isLoading, crosswalksMap, visibleColumns, onChangeVisibleColumns, readOnly, onDelete, onPin, onIgnore, onEdit, onAdd, selectedAttributeTypes, onSelectAttributeTypes }: Props) => JSX.Element>;
|
|
20
21
|
export default _default;
|
|
@@ -46,10 +46,11 @@ var RowCellRenderer_1 = __importDefault(require("./cell-renderers/RowCellRendere
|
|
|
46
46
|
var LinearLoadIndicator_1 = __importDefault(require("../../LinearLoadIndicator/LinearLoadIndicator"));
|
|
47
47
|
var ConfirmDeleteDialog_1 = __importDefault(require("../../ConfirmDeleteDialog/ConfirmDeleteDialog"));
|
|
48
48
|
var ConfirmEditIgnoredDialog_1 = __importDefault(require("./ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog"));
|
|
49
|
+
var core_1 = require("../../../core");
|
|
49
50
|
var styles_1 = require("./styles");
|
|
50
51
|
var DEFAULT_ROW_HEIGHT = 68;
|
|
51
52
|
var AttributesTable = function (_a) {
|
|
52
|
-
var entity = _a.entity, isLoading = _a.isLoading, crosswalksMap = _a.crosswalksMap, _b = _a.visibleColumns, visibleColumns = _b === void 0 ? helpers_1.DEFAULT_VISIBLE_COLUMNS : _b, onChangeVisibleColumns = _a.onChangeVisibleColumns,
|
|
53
|
+
var entity = _a.entity, isLoading = _a.isLoading, crosswalksMap = _a.crosswalksMap, _b = _a.visibleColumns, visibleColumns = _b === void 0 ? helpers_1.DEFAULT_VISIBLE_COLUMNS : _b, onChangeVisibleColumns = _a.onChangeVisibleColumns, readOnly = _a.readOnly, _c = _a.onDelete, onDelete = _c === void 0 ? core_1.noop : _c, _d = _a.onPin, onPin = _d === void 0 ? core_1.noop : _d, _e = _a.onIgnore, onIgnore = _e === void 0 ? core_1.noop : _e, _f = _a.onEdit, onEdit = _f === void 0 ? core_1.noop : _f, _g = _a.onAdd, onAdd = _g === void 0 ? core_1.noop : _g, selectedAttributeTypes = _a.selectedAttributeTypes, _h = _a.onSelectAttributeTypes, onSelectAttributeTypes = _h === void 0 ? core_1.noop : _h;
|
|
53
54
|
var styles = styles_1.useStyles();
|
|
54
55
|
var visibleColumnsData = react_1.useMemo(function () {
|
|
55
56
|
return ramda_1.pipe(ramda_1.filter(function (_a) {
|
|
@@ -57,27 +58,27 @@ var AttributesTable = function (_a) {
|
|
|
57
58
|
return visibleColumns.includes(id);
|
|
58
59
|
}), helpers_1.getBasicTableColumnsData)(helpers_1.COLUMNS_DATA);
|
|
59
60
|
}, [visibleColumns]);
|
|
60
|
-
var
|
|
61
|
+
var _j = entity || {}, parentTypeUri = _j.type, parentUri = _j.uri, _k = _j.attributes, attributes = _k === void 0 ? {} : _k;
|
|
61
62
|
var metadata = react_redux_1.useSelector(mdm_module_1.default.selectors.getMetadata);
|
|
62
63
|
react_1.useEffect(function () {
|
|
63
|
-
if (
|
|
64
|
+
if (entity && ramda_1.isNil(selectedAttributeTypes)) {
|
|
64
65
|
var initialAttrTypes = ramda_1.pipe(ramda_1.keys, ramda_1.without(['paging']), ramda_1.map(mdm_sdk_1.makeAttrTypeUri(parentTypeUri)), ramda_1.map(function (attrTypeUri) { return mdm_sdk_1.findAttributeTypeByUri(metadata, attrTypeUri, parentTypeUri); }), ramda_1.filter(mdm_sdk_1.isReadableAttribute))(attributes);
|
|
65
66
|
onSelectAttributeTypes(initialAttrTypes);
|
|
66
67
|
}
|
|
67
|
-
}, [
|
|
68
|
+
}, [entity, selectedAttributeTypes]);
|
|
68
69
|
var rowsData = react_1.useMemo(function () {
|
|
69
70
|
return parentTypeUri
|
|
70
71
|
? helpers_1.getBasicTableRowsData(metadata, parentTypeUri, selectedAttributeTypes, visibleColumns, crosswalksMap, attributes)
|
|
71
72
|
: [];
|
|
72
73
|
}, [metadata, parentTypeUri, selectedAttributeTypes, visibleColumns, attributes, crosswalksMap]);
|
|
73
|
-
var
|
|
74
|
+
var _l = BasicTableView_1.useDynamicRowCellHeight(), getDynamicRowCellHeight = _l.getDynamicRowCellHeight, changeRowCellHeight = _l.changeRowCellHeight;
|
|
74
75
|
var renderRowCell = react_1.useCallback(function (props) { return (react_1.default.createElement(BasicTableView_1.RowCellAutoSizer, __assign({ onChangeHeight: changeRowCellHeight }, props),
|
|
75
76
|
react_1.default.createElement(RowCellRenderer_1.default, __assign({}, props)))); }, [changeRowCellHeight]);
|
|
76
77
|
var getRowCellHeight = react_1.useCallback(ramda_1.either(getDynamicRowCellHeight, ramda_1.always(DEFAULT_ROW_HEIGHT)), [
|
|
77
78
|
getDynamicRowCellHeight
|
|
78
79
|
]);
|
|
79
|
-
var
|
|
80
|
-
var
|
|
80
|
+
var _m = react_1.useState(null), pendingDeletion = _m[0], setPendingDeletion = _m[1];
|
|
81
|
+
var _o = react_1.useState(null), pendingIgnoredEditing = _o[0], setPendingIgnoredEditing = _o[1];
|
|
81
82
|
var handleEdit = react_1.useCallback(function (event) {
|
|
82
83
|
event.attributeValue.ignored ? setPendingIgnoredEditing(event) : onEdit(event);
|
|
83
84
|
}, [onEdit, setPendingIgnoredEditing]);
|
|
@@ -90,7 +91,8 @@ var AttributesTable = function (_a) {
|
|
|
90
91
|
parentUri: parentUri,
|
|
91
92
|
parentTypeUri: parentTypeUri,
|
|
92
93
|
selectedAttributeTypes: selectedAttributeTypes,
|
|
93
|
-
onSelectAttributeTypes: onSelectAttributeTypes
|
|
94
|
+
onSelectAttributeTypes: onSelectAttributeTypes,
|
|
95
|
+
readOnly: readOnly
|
|
94
96
|
}); }, [
|
|
95
97
|
setPendingDeletion,
|
|
96
98
|
onPin,
|
|
@@ -100,7 +102,8 @@ var AttributesTable = function (_a) {
|
|
|
100
102
|
parentUri,
|
|
101
103
|
parentTypeUri,
|
|
102
104
|
selectedAttributeTypes,
|
|
103
|
-
onSelectAttributeTypes
|
|
105
|
+
onSelectAttributeTypes,
|
|
106
|
+
readOnly
|
|
104
107
|
]);
|
|
105
108
|
return (react_1.default.createElement("div", { className: styles.tableContainer },
|
|
106
109
|
react_1.default.createElement(BasicViewHeader_1.default, { classes: { root: styles.tableHeader }, title: ui_i18n_1.default.text('Sources') },
|
|
@@ -13,7 +13,8 @@ declare type Props = {
|
|
|
13
13
|
onIgnore: (event: IgnoreInlineAttributeEvent) => void;
|
|
14
14
|
onAdd: (event: AddInlineAttributeEvent) => void;
|
|
15
15
|
parentUri: string;
|
|
16
|
+
readOnly?: boolean;
|
|
16
17
|
};
|
|
17
|
-
export declare const AttributeValuesRenderer: ({ value, onDelete, onEdit, onPin, onIgnore, onAdd, parentUri }: Props) => JSX.Element;
|
|
18
|
+
export declare const AttributeValuesRenderer: ({ value, onDelete, onEdit, onPin, onIgnore, onAdd, parentUri, readOnly }: Props) => JSX.Element;
|
|
18
19
|
declare const _default: any;
|
|
19
20
|
export default _default;
|
|
@@ -19,13 +19,13 @@ var AttributesFactory_1 = __importDefault(require("./attribute-renderers/Attribu
|
|
|
19
19
|
var BasicTableView_1 = require("../../../BasicTableView");
|
|
20
20
|
var ramda_1 = require("ramda");
|
|
21
21
|
var AttributeValuesRenderer = function (_a) {
|
|
22
|
-
var value = _a.value, onDelete = _a.onDelete, onEdit = _a.onEdit, onPin = _a.onPin, onIgnore = _a.onIgnore, onAdd = _a.onAdd, parentUri = _a.parentUri;
|
|
22
|
+
var value = _a.value, onDelete = _a.onDelete, onEdit = _a.onEdit, onPin = _a.onPin, onIgnore = _a.onIgnore, onAdd = _a.onAdd, parentUri = _a.parentUri, readOnly = _a.readOnly;
|
|
23
23
|
return AttributesFactory_1.default.build(value.attributeType.type, __assign(__assign({}, value), { parentUri: parentUri,
|
|
24
24
|
onDelete: onDelete,
|
|
25
25
|
onEdit: onEdit,
|
|
26
26
|
onPin: onPin,
|
|
27
27
|
onIgnore: onIgnore,
|
|
28
|
-
onAdd: onAdd }));
|
|
28
|
+
onAdd: onAdd, disableEdit: readOnly, disableDelete: readOnly }));
|
|
29
29
|
};
|
|
30
30
|
exports.AttributeValuesRenderer = AttributeValuesRenderer;
|
|
31
|
-
exports.default = BasicTableView_1.withTableContext(ramda_1.pick(['onDelete', 'onPin', 'onIgnore', 'onEdit', 'onAdd', 'parentUri']))(exports.AttributeValuesRenderer);
|
|
31
|
+
exports.default = BasicTableView_1.withTableContext(ramda_1.pick(['onDelete', 'onPin', 'onIgnore', 'onEdit', 'onAdd', 'parentUri', 'readOnly']))(exports.AttributeValuesRenderer);
|
package/components/crosswalks/AttributesTable/cell-renderers/AttributesHeadCellRenderer.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare
|
|
3
|
-
|
|
2
|
+
declare type Props = {
|
|
3
|
+
readOnly?: boolean;
|
|
4
|
+
headCellData: {
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare const AttributesHeadCellRenderer: ({ readOnly, ...props }: Props) => JSX.Element;
|
|
9
|
+
declare const _default: any;
|
|
10
|
+
export default _default;
|