@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.
Files changed (61) hide show
  1. package/components/BasicView/BasicView.d.ts +1 -1
  2. package/components/ErrorWrapper/ErrorMessage.d.ts +2 -1
  3. package/components/ErrorWrapper/ErrorMessage.js +3 -2
  4. package/components/ErrorWrapper/ErrorWrapper.d.ts +5 -1
  5. package/components/ErrorWrapper/ErrorWrapper.js +3 -3
  6. package/components/ErrorWrapper/styles.js +1 -1
  7. package/components/ProfileBand/styles.js +1 -1
  8. package/components/ProfileBandNavigation/ProfileBandNavigationWidget.d.ts +1 -1
  9. package/components/ReactSelect/styles.d.ts +1 -1
  10. package/components/ReltioMap/MapControls/TopRightMapControls/TopRightMapControls.d.ts +1 -1
  11. package/components/SmallIconButton/SmallIconButton.d.ts +1 -1
  12. package/components/SmallIconButton/index.d.ts +2 -2
  13. package/components/attributes/editMode/AttributesPager/AttributeRenderer.d.ts +2 -2
  14. package/components/attributes/editMode/AttributesPager/AttributeRenderer.js +11 -9
  15. package/components/attributes/editMode/AttributesPager/AttributesPager.js +8 -6
  16. package/components/attributes/editMode/AttributesPager/styles.d.ts +1 -1
  17. package/components/attributes/editMode/AttributesPager/styles.js +3 -0
  18. package/components/attributes/editMode/AttributesView/index.d.ts +4 -4
  19. package/components/attributes/editMode/ComplexAttribute/ComplexAttribute.d.ts +2 -2
  20. package/components/attributes/editMode/ComplexAttribute/ComplexAttribute.js +1 -1
  21. package/components/attributes/editMode/ComplexAttribute/styles.d.ts +1 -1
  22. package/components/attributes/editMode/ComplexAttribute/styles.js +3 -0
  23. package/components/attributes/editMode/NestedAttribute/NestedAttribute.d.ts +2 -2
  24. package/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.d.ts +2 -2
  25. package/components/attributes/editMode/ReferenceAttribute/index.d.ts +2 -2
  26. package/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +1 -1
  27. package/components/attributes/inline/AttributesList/AttributesList.d.ts +2 -2
  28. package/components/attributes/inline/AttributesPager/AttributesPager.d.ts +2 -2
  29. package/components/attributes/inline/ComplexAttribute/ComplexAttribute.d.ts +3 -3
  30. package/components/attributes/inline/ComplexAttribute/ComplexAttribute.js +6 -6
  31. package/components/attributes/inline/ImageAttribute/ImageAttribute.d.ts +2 -2
  32. package/components/attributes/inline/ImageAttributesBlock/ImageAttributesBlock.d.ts +2 -2
  33. package/components/attributes/inline/NestedAttribute/NestedAttribute.d.ts +2 -2
  34. package/components/attributes/inline/NestedAttributesBlock/NestedAttributesBlock.d.ts +3 -3
  35. package/components/attributes/inline/NestedAttributesBlock/NestedAttributesBlock.js +3 -3
  36. package/components/attributes/inline/ReferenceAttribute/ReferenceAttribute.d.ts +2 -2
  37. package/components/attributes/inline/ReferenceAttributesBlock/ReferenceAttributesBlock.d.ts +2 -2
  38. package/components/attributes/inline/SimpleAttribute/SimpleAttribute.d.ts +3 -3
  39. package/components/attributes/inline/SimpleAttribute/SimpleAttribute.js +5 -5
  40. package/components/attributes/inline/SimpleAttributesBlock/SimpleAttributesBlock.d.ts +3 -3
  41. package/components/attributes/inline/SimpleAttributesBlock/SimpleAttributesBlock.js +3 -3
  42. package/components/attributes/readMode/AttributesView/index.d.ts +4 -4
  43. package/components/attributes/readMode/NestedAttribute/NestedAttribute.d.ts +2 -2
  44. package/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.d.ts +2 -2
  45. package/components/attributes/readMode/ReferenceAttribute/index.d.ts +2 -2
  46. package/components/crosswalks/AttributesTable/AttributesTable.d.ts +8 -7
  47. package/components/crosswalks/AttributesTable/AttributesTable.js +12 -9
  48. package/components/crosswalks/AttributesTable/cell-renderers/AttributeValuesRenderer.d.ts +2 -1
  49. package/components/crosswalks/AttributesTable/cell-renderers/AttributeValuesRenderer.js +3 -3
  50. package/components/crosswalks/AttributesTable/cell-renderers/AttributesHeadCellRenderer.d.ts +9 -2
  51. package/components/crosswalks/AttributesTable/cell-renderers/AttributesHeadCellRenderer.js +19 -3
  52. package/components/crosswalks/AttributesTable/cell-renderers/attribute-renderers/AttributesFactory.d.ts +2 -0
  53. package/components/history/ProfileBandHistory/ProfileBandHistory.d.ts +3 -0
  54. package/components/history/ProfileBandHistory/ProfileBandHistory.js +45 -0
  55. package/components/history/ProfileBandHistory/styles.d.ts +1 -0
  56. package/components/history/ProfileBandHistory/styles.js +18 -0
  57. package/components/history/hooks/useHistorySlice.d.ts +4 -0
  58. package/components/history/hooks/useHistorySlice.js +58 -0
  59. package/components/history/index.d.ts +2 -2
  60. package/components/history/index.js +5 -5
  61. 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<string>;
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<string>;
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">;
@@ -35,5 +35,8 @@ exports.useStyles = styles_1.makeStyles(function (theme) { return ({
35
35
  editedLabel: {
36
36
  fontStyle: 'italic',
37
37
  color: theme.palette.text.secondary
38
+ },
39
+ errorWrapperHelperText: {
40
+ marginLeft: 0
38
41
  }
39
42
  }); });
@@ -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<string>;
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<string>;
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<string>;
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<string>;
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<string>;
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<string>;
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.ErrorTypes.missed) {
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
- allowDelete?: boolean;
15
- allowEdit?: boolean;
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
- allowDelete?: boolean;
17
- allowEdit?: boolean;
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
- allowEdit?: boolean;
17
- allowDelete?: boolean;
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, allowEdit, allowDelete, onPin, onIgnore, onDelete, onEdit, onAdd }: Props) => JSX.Element;
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, _b = _a.allowEdit, allowEdit = _b === void 0 ? true : _b, _c = _a.allowDelete, allowDelete = _c === void 0 ? true : _c, onPin = _a.onPin, onIgnore = _a.onIgnore, onDelete = _a.onDelete, onEdit = _a.onEdit, onAdd = _a.onAdd;
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 _d = useAttributeState_1.useAttributeState(), isReadingMode = _d.isReadingMode, onMouseEnter = _d.onMouseEnter, onMouseLeave = _d.onMouseLeave;
43
- var canEdit = allowEdit && mdm_sdk_1.checkMetadataForUpdate(mdm_sdk_1.ModeTypes.EDITING, attributeType);
44
- var canDelete = allowDelete && mdm_sdk_1.checkMetadataForDelete(mdm_sdk_1.ModeTypes.EDITING, attributeType);
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 _e = react_1.useState(expandedFromContext || isTemporary), expanded = _e[0], setExpanded = _e[1];
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, allowEdit: canEdit, allowDelete: canDelete, onPin: onPin, onIgnore: onIgnore, onDelete: onDelete, onEdit: onEdit, onAdd: onAdd }))));
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
- allowEdit?: boolean;
14
- allowDelete?: boolean;
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
- allowDelete?: boolean;
15
- allowEdit?: boolean;
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
- allowEdit?: boolean;
14
- allowDelete?: boolean;
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
- allowDelete?: boolean;
16
- allowEdit?: boolean;
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
- allowEdit?: boolean;
14
- allowDelete?: boolean;
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
- allowDelete?: boolean;
15
- allowEdit?: boolean;
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
- allowEdit?: boolean;
14
- allowDelete?: boolean;
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, allowEdit, allowDelete, onIgnore, onEdit, onPin, onDelete }: Props) => JSX.Element;
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, _c = _a.allowEdit, allowEdit = _c === void 0 ? true : _c, _d = _a.allowDelete, allowDelete = _d === void 0 ? true : _d, onIgnore = _a.onIgnore, onEdit = _a.onEdit, onPin = _a.onPin, onDelete = _a.onDelete;
44
- var _e = useAttributeState_1.useAttributeState(), isReadingMode = _e.isReadingMode, isEditingMode = _e.isEditingMode, isHovered = _e.isHovered, onMouseEnter = _e.onMouseEnter, onMouseLeave = _e.onMouseLeave, setReadingMode = _e.setReadingMode, setEditingMode = _e.setEditingMode;
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 && allowEdit && mdm_sdk_1.checkMetadataForUpdate(mdm_sdk_1.ModeTypes.EDITING, attributeType);
50
- var canDelete = canModifyAttribute && allowDelete && mdm_sdk_1.checkMetadataForDelete(mdm_sdk_1.ModeTypes.EDITING, attributeType);
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 _f = contexts_1.useCrosswalkHighlight(crosswalk), isHighlighted = _f.isHighlighted, isDimmed = _f.isDimmed, highlightCrosswalk = _f.highlightCrosswalk, removeHighlight = _f.removeHighlight;
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
- allowDelete?: boolean;
15
- allowEdit?: boolean;
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, allowEdit, crosswalksMap, onAdd, ...props }: Props) => JSX.Element;
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, allowEdit = _a.allowEdit, crosswalksMap = _a.crosswalksMap, onAdd = _a.onAdd, props = __rest(_a, ["attributeValues", "attributeType", "parentUri", "allowEdit", "crosswalksMap", "onAdd"]);
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
- allowEdit !== false &&
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, allowEdit: allowEdit, dataReltioId: "value-index-" + attributeIndex++ }, props))); });
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<string>;
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<string>;
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<string>;
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<string>;
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<string>;
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<string>;
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
- onDelete: (event: DeleteInlineAttributeEvent) => void;
12
- onPin: (event: PinInlineAttributeEvent) => void;
13
- onIgnore: (event: IgnoreInlineAttributeEvent) => void;
14
- onEdit: (event: EditInlineAttributeEvent) => void;
15
- onAdd: (event: AddInlineAttributeEvent) => void;
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: (selected: AttributeType[]) => void;
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, onDelete = _a.onDelete, onPin = _a.onPin, onIgnore = _a.onIgnore, onEdit = _a.onEdit, onAdd = _a.onAdd, selectedAttributeTypes = _a.selectedAttributeTypes, onSelectAttributeTypes = _a.onSelectAttributeTypes;
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 _c = entity || {}, parentTypeUri = _c.type, parentUri = _c.uri, _d = _c.attributes, attributes = _d === void 0 ? {} : _d;
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 (parentUri) {
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
- }, [parentUri]);
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 _e = BasicTableView_1.useDynamicRowCellHeight(), getDynamicRowCellHeight = _e.getDynamicRowCellHeight, changeRowCellHeight = _e.changeRowCellHeight;
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 _f = react_1.useState(null), pendingDeletion = _f[0], setPendingDeletion = _f[1];
80
- var _g = react_1.useState(null), pendingIgnoredEditing = _g[0], setPendingIgnoredEditing = _g[1];
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);
@@ -1,3 +1,10 @@
1
1
  /// <reference types="react" />
2
- declare const AttributesHeadCellRenderer: (props: any) => JSX.Element;
3
- export default AttributesHeadCellRenderer;
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;