@reltio/components 1.4.807 → 1.4.811
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/CollaborationItem/CollaborationItem.js +9 -2
- package/components/CollaborationItem/Comment/Comment.d.ts +2 -1
- package/components/CollaborationItem/Comment/Comment.js +11 -7
- package/components/CollaborationItem/SendMessageArea/SendMessageArea.d.ts +4 -2
- package/components/CollaborationItem/SendMessageArea/SendMessageArea.js +63 -26
- package/components/CollaborationItem/TextFieldWithMentions/styles.js +1 -1
- package/components/DropDownMenuButton/MenuItemRenderer.js +1 -1
- package/components/PopupWithArrow/PopupWithArrow.js +9 -1
- package/components/ProfileBand/styles.d.ts +1 -1
- package/components/ReltioMap/EntityMarker/EntityMarker.d.ts +9 -0
- package/components/ReltioMap/EntityMarker/EntityMarker.js +91 -0
- package/components/ReltioMap/EntityMarker/styles.d.ts +1 -0
- package/components/ReltioMap/EntityMarker/styles.js +13 -0
- package/components/ReltioMap/MapControls/MapControlContainer/MapControlContrainer.d.ts +10 -0
- package/components/ReltioMap/MapControls/MapControlContainer/MapControlContrainer.js +28 -0
- package/components/ReltioMap/MapControls/TopCenterMapControls/TopCenterMapControls.d.ts +7 -0
- package/components/ReltioMap/MapControls/TopCenterMapControls/TopCenterMapControls.js +23 -0
- package/components/ReltioMap/MapControls/TopCenterMapControls/styles.d.ts +1 -0
- package/components/ReltioMap/MapControls/TopCenterMapControls/styles.js +27 -0
- package/components/ReltioMap/MapControls/TopRightMapControls/TopRightMapControls.d.ts +47 -0
- package/components/ReltioMap/MapControls/TopRightMapControls/TopRightMapControls.js +40 -0
- package/components/ReltioMap/MapControls/TopRightMapControls/styles.d.ts +1 -0
- package/components/ReltioMap/MapControls/TopRightMapControls/styles.js +22 -0
- package/components/ReltioMap/constants.d.ts +14 -0
- package/components/ReltioMap/constants.js +17 -0
- package/components/ReltioMap/helpers/index.d.ts +6 -0
- package/components/ReltioMap/helpers/index.js +63 -0
- package/components/ReltioMap/index.d.ts +27 -0
- package/components/ReltioMap/index.js +162 -0
- package/components/ReltioMap/styles.d.ts +1 -0
- package/components/ReltioMap/styles.js +12 -0
- package/components/ReltioMap/types.d.ts +23 -0
- package/components/ReltioMap/types.js +2 -0
- package/components/attributes/PivotingAttributes/PivotingTooltipContent.js +3 -1
- package/components/attributes/editMode/AttributesList/AttributesList.js +1 -1
- package/components/attributes/editMode/AttributesList/helpers.d.ts +1 -2
- package/components/attributes/editMode/AttributesList/helpers.js +1 -20
- package/components/attributes/editMode/AttributesPager/AttributeRenderer.js +4 -3
- package/components/attributes/editMode/AttributesPager/index.d.ts +4 -2
- package/components/attributes/editMode/AttributesPager/index.js +11 -20
- package/components/attributes/editMode/ComplexAttribute/ComplexAttribute.d.ts +3 -1
- package/components/attributes/editMode/ComplexAttribute/ComplexAttribute.js +19 -5
- package/components/attributes/editMode/ComplexAttribute/styles.d.ts +1 -1
- package/components/attributes/editMode/ComplexAttribute/styles.js +10 -2
- package/components/attributes/editMode/NestedAttribute/NestedAttribute.d.ts +1 -0
- package/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.d.ts +1 -0
- package/components/attributes/editMode/ReferenceAttribute/index.d.ts +1 -0
- package/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +15 -4
- package/components/attributes/editMode/SimpleAttributeEditor/styles.d.ts +1 -1
- package/components/attributes/editMode/SimpleAttributeEditor/styles.js +8 -0
- package/components/attributes/inline/ComplexAttribute/ComplexAttribute.js +1 -1
- package/components/attributes/readMode/AttributesPager/index.d.ts +3 -1
- package/components/attributes/readMode/AttributesPager/index.js +26 -2
- package/components/attributes/readMode/NestedAttribute/NestedAttribute.d.ts +1 -0
- package/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.d.ts +1 -0
- package/components/attributes/readMode/ReferenceAttribute/index.d.ts +1 -0
- package/components/crosswalks/CrosswalkAttributes/styles.js +3 -2
- package/components/crosswalks/CrosswalkEditor/CrosswalkEditor.d.ts +2 -1
- package/components/crosswalks/CrosswalkEditor/CrosswalkEditor.js +2 -2
- package/components/crosswalks/CrosswalkEditor/styles.d.ts +1 -1
- package/components/crosswalks/CrosswalkEditor/styles.js +0 -4
- package/components/crosswalks/hooks/useCrosswalkActions.d.ts +12 -0
- package/components/crosswalks/hooks/useCrosswalkActions.js +75 -0
- package/components/crosswalks/index.d.ts +2 -1
- package/components/crosswalks/index.js +3 -1
- package/components/crosswalks/types/AddCrosswalkEvent.d.ts +6 -0
- package/components/crosswalks/types/AddCrosswalkEvent.js +2 -0
- package/components/crosswalks/types/DeleteCrosswalkEvent.d.ts +4 -0
- package/components/crosswalks/types/DeleteCrosswalkEvent.js +2 -0
- package/components/crosswalks/types/EditCrosswalkEvent.d.ts +6 -0
- package/components/crosswalks/types/EditCrosswalkEvent.js +2 -0
- package/components/crosswalks/types/index.d.ts +3 -0
- package/components/index.d.ts +5 -1
- package/components/index.js +10 -3
- package/constants/index.d.ts +1 -0
- package/constants/index.js +5 -1
- package/constants/map.d.ts +14 -0
- package/constants/map.js +17 -0
- package/contexts/CollaborationContext/index.d.ts +7 -1
- package/contexts/CollaborationContext/index.js +4 -2
- package/contexts/EntityMarkerContext/index.d.ts +6 -0
- package/contexts/EntityMarkerContext/index.js +9 -0
- package/contexts/index.d.ts +1 -0
- package/contexts/index.js +3 -1
- package/hooks/useCollaboration.d.ts +4 -2
- package/hooks/useCollaboration.js +56 -7
- package/hooks/useRelationsLoader.js +3 -1
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useStyles = void 0;
|
|
4
4
|
var styles_1 = require("@material-ui/core/styles");
|
|
5
|
-
exports.useStyles = styles_1.makeStyles({
|
|
5
|
+
exports.useStyles = styles_1.makeStyles(function (theme) { return ({
|
|
6
6
|
editor: {
|
|
7
7
|
display: 'flex',
|
|
8
8
|
flex: 1,
|
|
@@ -27,5 +27,13 @@ exports.useStyles = styles_1.makeStyles({
|
|
|
27
27
|
},
|
|
28
28
|
expandButton: {
|
|
29
29
|
marginTop: '2px'
|
|
30
|
+
},
|
|
31
|
+
deleted: {
|
|
32
|
+
color: theme.palette.text.secondary,
|
|
33
|
+
textDecoration: 'line-through'
|
|
34
|
+
},
|
|
35
|
+
editedLabel: {
|
|
36
|
+
fontStyle: 'italic',
|
|
37
|
+
color: theme.palette.text.secondary
|
|
30
38
|
}
|
|
31
|
-
});
|
|
39
|
+
}); });
|
|
@@ -106,6 +106,7 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
106
106
|
onChangeAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
107
107
|
additionalControlsRenderer: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
108
108
|
hideDeleteButton: import("prop-types").Requireable<boolean>;
|
|
109
|
+
state: import("prop-types").Requireable<string>;
|
|
109
110
|
attributeValue: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
110
111
|
value: import("prop-types").Requireable<object>;
|
|
111
112
|
ov: import("prop-types").Requireable<boolean>;
|
|
@@ -114,6 +114,7 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
114
114
|
onChangeAttribute: PropTypes.Requireable<(...args: any[]) => any>;
|
|
115
115
|
additionalControlsRenderer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
116
116
|
hideDeleteButton: PropTypes.Requireable<boolean>;
|
|
117
|
+
state: PropTypes.Requireable<string>;
|
|
117
118
|
attributeValue: PropTypes.Requireable<PropTypes.InferProps<{
|
|
118
119
|
refEntity: PropTypes.Requireable<object>;
|
|
119
120
|
refRelation: PropTypes.Requireable<object>;
|
|
@@ -115,6 +115,7 @@ declare var _default: import("react-redux").ConnectedComponent<import("react").M
|
|
|
115
115
|
onChangeAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
116
116
|
additionalControlsRenderer: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
117
117
|
hideDeleteButton: import("prop-types").Requireable<boolean>;
|
|
118
|
+
state: import("prop-types").Requireable<string>;
|
|
118
119
|
attributeValue: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
119
120
|
refEntity: import("prop-types").Requireable<object>;
|
|
120
121
|
refRelation: import("prop-types").Requireable<object>;
|
|
@@ -51,6 +51,8 @@ var classnames_1 = __importDefault(require("classnames"));
|
|
|
51
51
|
var ramda_1 = require("ramda");
|
|
52
52
|
var Add_1 = __importDefault(require("@material-ui/icons/Add"));
|
|
53
53
|
var Delete_1 = __importDefault(require("@material-ui/icons/Delete"));
|
|
54
|
+
var Typography_1 = __importDefault(require("@material-ui/core/Typography"));
|
|
55
|
+
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
54
56
|
var styles_1 = require("./styles");
|
|
55
57
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
56
58
|
var DataTypeValue_1 = __importDefault(require("../../../DataTypeValue/DataTypeValue"));
|
|
@@ -65,8 +67,11 @@ var AsyncMountPlaceholder = function () {
|
|
|
65
67
|
return react_1.default.createElement("div", { className: styles.placeholder });
|
|
66
68
|
};
|
|
67
69
|
var SimpleAttributeEditor = function (_a) {
|
|
68
|
-
var
|
|
70
|
+
var _b;
|
|
71
|
+
var className = _a.className, attributeValue = _a.attributeValue, attributeType = _a.attributeType, isReltioCrosswalk = _a.isReltioCrosswalk, ownError = _a.ownError, mode = _a.mode, onAddOneMore = _a.onAddOneMore, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute, onDeactivateError = _a.onDeactivateError, additionalControlsRenderer = _a.additionalControlsRenderer, state = _a.state, otherProps = __rest(_a, ["className", "attributeValue", "attributeType", "isReltioCrosswalk", "ownError", "mode", "onAddOneMore", "onDeleteAttribute", "onChangeAttribute", "onDeactivateError", "additionalControlsRenderer", "state"]);
|
|
69
72
|
var styles = styles_1.useStyles();
|
|
73
|
+
var deleted = state === 'deleted';
|
|
74
|
+
var edited = state === 'edited';
|
|
70
75
|
var isEditableMode = mdm_sdk_1.isEditableMode(mode);
|
|
71
76
|
var dataTypeDefinition = mdm_sdk_1.getAttrDataTypeDefinition(attributeType);
|
|
72
77
|
var value = utils_1.attributeValueToEditorValue(attributeValue, dataTypeDefinition);
|
|
@@ -93,13 +98,18 @@ var SimpleAttributeEditor = function (_a) {
|
|
|
93
98
|
};
|
|
94
99
|
if (showToEdit) {
|
|
95
100
|
var showAddButton = !!onAddOneMore && canCreate && !attributeType.singleValue;
|
|
96
|
-
var showDeleteButton = !!onDeleteAttribute && canDelete;
|
|
101
|
+
var showDeleteButton = !deleted && !!onDeleteAttribute && canDelete;
|
|
97
102
|
var hasError = !!errorMessage;
|
|
103
|
+
var deletedProps = deleted ? { disabled: true } : {};
|
|
98
104
|
return (react_1.default.createElement("div", { className: classnames_1.default(styles.editor, className) },
|
|
99
105
|
react_1.default.createElement(ErrorWrapper_1.default, { errorMessage: errorMessage },
|
|
100
|
-
react_1.default.createElement("div", { className: styles['editor-value'] },
|
|
101
|
-
react_1.default.createElement(DataTypeValueEditor_1.default, __assign({ fieldName: mdm_sdk_1.attributeUriToSearchUri(attributeType.uri), value: value, dataTypeDefinition: dataTypeDefinition, error: hasError, onChange: ramda_1.pipe(utils_1.prepareChangeData(attributeValue, attributeType), onChangeAttribute, deactivateError), fullWidth: true }, dependentLookupEditorContext, otherProps)))),
|
|
106
|
+
react_1.default.createElement("div", { className: classnames_1.default(styles['editor-value'], (_b = {}, _b[styles.deleted] = deleted, _b)) },
|
|
107
|
+
react_1.default.createElement(DataTypeValueEditor_1.default, __assign({ fieldName: mdm_sdk_1.attributeUriToSearchUri(attributeType.uri), value: value, dataTypeDefinition: dataTypeDefinition, error: hasError, onChange: ramda_1.pipe(utils_1.prepareChangeData(attributeValue, attributeType), onChangeAttribute, deactivateError), fullWidth: true }, dependentLookupEditorContext, otherProps, deletedProps)))),
|
|
102
108
|
react_1.default.createElement("div", { className: styles['editor-actions'] },
|
|
109
|
+
edited && (react_1.default.createElement(Typography_1.default, { variant: "caption", className: styles.editedLabel },
|
|
110
|
+
"(",
|
|
111
|
+
ui_i18n_1.default.text('edited'),
|
|
112
|
+
")")),
|
|
103
113
|
showAddButton && (react_1.default.createElement(SmallIconButton_1.default, { icon: Add_1.default, onClick: onAddOneMore, size: "L", className: classnames_1.default(styles.addButton, styles.button) })),
|
|
104
114
|
additionalControlsRenderer && additionalControlsRenderer({ attributeType: attributeType, attributeValue: attributeValue }),
|
|
105
115
|
showDeleteButton && (react_1.default.createElement(SmallIconButton_1.default, { className: styles.button, icon: Delete_1.default, onClick: onDelete, size: "L" })))));
|
|
@@ -115,6 +125,7 @@ SimpleAttributeEditor.propTypes = {
|
|
|
115
125
|
attributeType: mdm_sdk_1.AttributeTypeType,
|
|
116
126
|
ownError: mdm_sdk_1.AttributeErrorType,
|
|
117
127
|
isReltioCrosswalk: prop_types_1.default.bool,
|
|
128
|
+
state: prop_types_1.default.oneOf(['deleted', 'edited']),
|
|
118
129
|
mode: mdm_sdk_1.ModeType,
|
|
119
130
|
onAddOneMore: prop_types_1.default.func,
|
|
120
131
|
onDeleteAttribute: prop_types_1.default.func,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"button" | "placeholder" | "wrapper" | "addButton" | "editor" | "editor-value" | "editor-actions">;
|
|
1
|
+
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"deleted" | "button" | "placeholder" | "wrapper" | "addButton" | "editor" | "editor-value" | "editor-actions" | "editedLabel">;
|
|
@@ -29,5 +29,13 @@ exports.useStyles = styles_1.makeStyles(function (theme) { return ({
|
|
|
29
29
|
},
|
|
30
30
|
placeholder: {
|
|
31
31
|
height: 40 + marginBottom + "px"
|
|
32
|
+
},
|
|
33
|
+
deleted: {
|
|
34
|
+
color: theme.palette.text.secondary,
|
|
35
|
+
textDecoration: 'line-through'
|
|
36
|
+
},
|
|
37
|
+
editedLabel: {
|
|
38
|
+
fontStyle: 'italic',
|
|
39
|
+
color: theme.palette.text.secondary
|
|
32
40
|
}
|
|
33
41
|
}); });
|
|
@@ -58,7 +58,7 @@ var ComplexAttribute = function (_a) {
|
|
|
58
58
|
react_1.default.createElement(ArrowExpandButton_1.default, { onClick: function () { return setExpanded(function (value) { return !value; }); }, expanded: expanded }),
|
|
59
59
|
react_1.default.createElement("span", null,
|
|
60
60
|
label,
|
|
61
|
-
crosswalks.map(function (crosswalk) { return (react_1.default.createElement(CrosswalkIcon_1.default, { key: crosswalk
|
|
61
|
+
crosswalks.map(function (crosswalk) { return (react_1.default.createElement(CrosswalkIcon_1.default, { key: mdm_sdk_1.getCrosswalkId(crosswalk), crosswalk: crosswalk, className: styles.crosswalkIcon })); })),
|
|
62
62
|
react_1.default.createElement(index_1.Spacer, null),
|
|
63
63
|
react_1.default.createElement("div", { className: styles.actions },
|
|
64
64
|
showPin && react_1.default.createElement(PinButton_1.default, { isPinned: attributeValue.pin, onClick: function () { return onPin({ attributeValue: attributeValue }); } }),
|
|
@@ -21,6 +21,8 @@ declare var _default: import("react-redux").ConnectedComponent<import("react").M
|
|
|
21
21
|
titleClassName?: string;
|
|
22
22
|
contentClassName?: string;
|
|
23
23
|
showTitle?: boolean;
|
|
24
|
-
}, "requestNextPageOfAttributeValues"
|
|
24
|
+
}, "max" | "requestNextPageOfAttributeValues"> & {
|
|
25
|
+
max?: any;
|
|
26
|
+
}>;
|
|
25
27
|
export default _default;
|
|
26
28
|
import AttributesPager from "./AttributesPager";
|
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
23
|
};
|
|
5
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
25
|
exports.AttributesPager = void 0;
|
|
7
26
|
var react_redux_1 = require("react-redux");
|
|
8
|
-
var mdm_module_1 = require("@reltio/mdm-module");
|
|
27
|
+
var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
|
|
9
28
|
var AttributesPager_1 = __importDefault(require("./AttributesPager"));
|
|
10
29
|
exports.AttributesPager = AttributesPager_1.default;
|
|
11
|
-
var mapStateToProps =
|
|
30
|
+
var mapStateToProps = function (state, _a) {
|
|
31
|
+
var _b = _a.max, max = _b === void 0 ? undefined : _b;
|
|
32
|
+
return ({
|
|
33
|
+
max: max || mdm_module_1.default.selectors.getDefaultMaxValues(state)
|
|
34
|
+
});
|
|
35
|
+
};
|
|
12
36
|
var mapDispatchToProps = {
|
|
13
37
|
requestNextPageOfAttributeValues: mdm_module_1.profile.actions.requestNextPageOfAttributeValues
|
|
14
38
|
};
|
|
@@ -110,6 +110,7 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
110
110
|
onChangeAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
111
111
|
additionalControlsRenderer: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
112
112
|
hideDeleteButton: import("prop-types").Requireable<boolean>;
|
|
113
|
+
state: import("prop-types").Requireable<string>;
|
|
113
114
|
attributeValue: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
114
115
|
value: import("prop-types").Requireable<object>;
|
|
115
116
|
ov: import("prop-types").Requireable<boolean>;
|
|
@@ -112,6 +112,7 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
112
112
|
onChangeAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
113
113
|
additionalControlsRenderer: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
114
114
|
hideDeleteButton: import("prop-types").Requireable<boolean>;
|
|
115
|
+
state: import("prop-types").Requireable<string>;
|
|
115
116
|
attributeValue: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
116
117
|
refEntity: import("prop-types").Requireable<object>;
|
|
117
118
|
refRelation: import("prop-types").Requireable<object>;
|
|
@@ -113,6 +113,7 @@ declare var _default: import("react-redux").ConnectedComponent<import("react").M
|
|
|
113
113
|
onChangeAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
114
114
|
additionalControlsRenderer: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
115
115
|
hideDeleteButton: import("prop-types").Requireable<boolean>;
|
|
116
|
+
state: import("prop-types").Requireable<string>;
|
|
116
117
|
attributeValue: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
117
118
|
refEntity: import("prop-types").Requireable<object>;
|
|
118
119
|
refRelation: import("prop-types").Requireable<object>;
|
|
@@ -21,7 +21,8 @@ exports.useStyles = styles_1.makeStyles(function (theme) { return ({
|
|
|
21
21
|
attributeValue: {
|
|
22
22
|
paddingLeft: 10,
|
|
23
23
|
display: 'flex',
|
|
24
|
-
alignItems: 'center'
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
flexGrow: 1
|
|
25
26
|
},
|
|
26
27
|
input: {
|
|
27
28
|
paddingTop: 14,
|
|
@@ -29,7 +30,7 @@ exports.useStyles = styles_1.makeStyles(function (theme) { return ({
|
|
|
29
30
|
fontSize: 13
|
|
30
31
|
},
|
|
31
32
|
editor: {
|
|
32
|
-
|
|
33
|
+
flexGrow: 1
|
|
33
34
|
},
|
|
34
35
|
moreButton: {
|
|
35
36
|
marginLeft: 24
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Crosswalk } from '@reltio/mdm-sdk';
|
|
3
3
|
declare type Props = {
|
|
4
|
+
className?: string;
|
|
4
5
|
onAdd: (event: Omit<Crosswalk, 'uri'>) => void;
|
|
5
6
|
onClose: () => void;
|
|
6
7
|
};
|
|
7
|
-
declare const CrosswalkEditor: ({ onAdd, onClose }: Props) => JSX.Element;
|
|
8
|
+
declare const CrosswalkEditor: ({ className, onAdd, onClose }: Props) => JSX.Element;
|
|
8
9
|
export default CrosswalkEditor;
|
|
@@ -30,14 +30,14 @@ var CrosswalkAttributes_1 = __importDefault(require("../CrosswalkAttributes/Cros
|
|
|
30
30
|
var ramda_1 = require("ramda");
|
|
31
31
|
var styles_1 = require("./styles");
|
|
32
32
|
var CrosswalkEditor = function (_a) {
|
|
33
|
-
var onAdd = _a.onAdd, onClose = _a.onClose;
|
|
33
|
+
var className = _a.className, onAdd = _a.onAdd, onClose = _a.onClose;
|
|
34
34
|
var styles = styles_1.useStyles();
|
|
35
35
|
var _b = react_1.useState({ type: '', value: '' }), newCrosswalk = _b[0], setNewCrosswalk = _b[1];
|
|
36
36
|
var handleAdd = function () {
|
|
37
37
|
onAdd(newCrosswalk);
|
|
38
38
|
onClose();
|
|
39
39
|
};
|
|
40
|
-
return (react_1.default.createElement("div", { className:
|
|
40
|
+
return (react_1.default.createElement("div", { className: className },
|
|
41
41
|
react_1.default.createElement(Typography_1.default, { variant: 'body1', className: styles.caption }, ui_i18n_1.default.text('Add crosswalk')),
|
|
42
42
|
react_1.default.createElement(CrosswalkAttributes_1.default, { crosswalk: newCrosswalk, onDeleteAttribute: function (attributeName) {
|
|
43
43
|
setNewCrosswalk(ramda_1.dissoc(attributeName));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"caption" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"caption" | "cancelButton" | "controlButtons">;
|
|
@@ -8,14 +8,10 @@ exports.useStyles = styles_1.makeStyles({
|
|
|
8
8
|
paddingTop: 16,
|
|
9
9
|
paddingBottom: 8
|
|
10
10
|
},
|
|
11
|
-
wrapper: {
|
|
12
|
-
paddingLeft: 25
|
|
13
|
-
},
|
|
14
11
|
controlButtons: {
|
|
15
12
|
display: 'flex',
|
|
16
13
|
justifyContent: 'flex-end',
|
|
17
14
|
paddingBottom: 10,
|
|
18
|
-
paddingRight: 30,
|
|
19
15
|
paddingTop: 20
|
|
20
16
|
},
|
|
21
17
|
cancelButton: {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AddCrosswalkEvent, DeleteCrosswalkEvent, EditCrosswalkEvent } from '../types';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
onLoad?: () => void;
|
|
4
|
+
onSuccess?: () => void;
|
|
5
|
+
onError?: (error: unknown) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const useCrosswalkActions: ({ onLoad, onSuccess, onError }: Props) => {
|
|
8
|
+
addCrosswalk: ({ entity, contributorCrosswalk, crosswalk }: AddCrosswalkEvent) => void;
|
|
9
|
+
editCrosswalk: ({ entityUri, crosswalkId, attributeName, value }: EditCrosswalkEvent) => void;
|
|
10
|
+
deleteCrosswalk: ({ entityUri, crosswalkId }: DeleteCrosswalkEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useCrosswalkActions = void 0;
|
|
7
|
+
var react_1 = require("react");
|
|
8
|
+
var ramda_1 = require("ramda");
|
|
9
|
+
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
10
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
11
|
+
var core_1 = require("../../../core");
|
|
12
|
+
var useCrosswalkActions = function (_a) {
|
|
13
|
+
var _b = _a.onLoad, onLoad = _b === void 0 ? core_1.noop : _b, _c = _a.onSuccess, onSuccess = _c === void 0 ? core_1.noop : _c, _d = _a.onError, onError = _d === void 0 ? core_1.noop : _d;
|
|
14
|
+
var handleAction = react_1.useCallback(function (request) {
|
|
15
|
+
onLoad();
|
|
16
|
+
request
|
|
17
|
+
.then(function () {
|
|
18
|
+
onSuccess();
|
|
19
|
+
})
|
|
20
|
+
.catch(onError);
|
|
21
|
+
}, [onLoad, onError, onSuccess]);
|
|
22
|
+
var addCrosswalkAction = react_1.useCallback(function (_a) {
|
|
23
|
+
var entity = _a.entity, contributorCrosswalk = _a.contributorCrosswalk, crosswalk = _a.crosswalk;
|
|
24
|
+
var promise = contributorCrosswalk
|
|
25
|
+
? mdm_sdk_1.addCrosswalkInContributor({
|
|
26
|
+
entityTypeUri: entity.type,
|
|
27
|
+
contributorCrosswalkType: contributorCrosswalk.type,
|
|
28
|
+
contributorCrosswalkValue: contributorCrosswalk.value,
|
|
29
|
+
contributorCrosswalkSourceTable: contributorCrosswalk.sourceTable,
|
|
30
|
+
crosswalkType: crosswalk.type,
|
|
31
|
+
crosswalkValue: crosswalk.value,
|
|
32
|
+
crosswalkSourceTable: crosswalk.sourceTable,
|
|
33
|
+
crosswalkDeleteDate: crosswalk.deleteDate
|
|
34
|
+
})
|
|
35
|
+
: mdm_sdk_1.addCrosswalk({ entityUri: entity.uri, crosswalk: crosswalk });
|
|
36
|
+
ramda_1.pipe(ramda_1.andThen(function (_a) {
|
|
37
|
+
var errors = _a[0].errors;
|
|
38
|
+
if (errors)
|
|
39
|
+
throw errors;
|
|
40
|
+
}), handleAction)(promise);
|
|
41
|
+
}, [handleAction]);
|
|
42
|
+
var editCrosswalkAction = react_1.useCallback(function (_a) {
|
|
43
|
+
var entityUri = _a.entityUri, crosswalkId = _a.crosswalkId, attributeName = _a.attributeName, value = _a.value;
|
|
44
|
+
ramda_1.pipe(ramda_1.ifElse(function (_a) {
|
|
45
|
+
var value = _a.value;
|
|
46
|
+
return ramda_1.isNil(value);
|
|
47
|
+
}, mdm_sdk_1.deleteCrosswalkAttribute, mdm_sdk_1.editCrosswalkAttribute), ramda_1.andThen(function (response) {
|
|
48
|
+
if (!response[0].successful)
|
|
49
|
+
throw new Error(ui_i18n_1.default.text('Failed to edit crosswalk'));
|
|
50
|
+
return response;
|
|
51
|
+
}), handleAction)({
|
|
52
|
+
entityUri: entityUri,
|
|
53
|
+
crosswalkId: crosswalkId,
|
|
54
|
+
attributeName: attributeName,
|
|
55
|
+
value: value
|
|
56
|
+
});
|
|
57
|
+
}, [handleAction]);
|
|
58
|
+
var deleteCrosswalkAction = react_1.useCallback(function (_a) {
|
|
59
|
+
var entityUri = _a.entityUri, crosswalkId = _a.crosswalkId;
|
|
60
|
+
ramda_1.pipe(mdm_sdk_1.deleteCrosswalk, ramda_1.andThen(function (response) {
|
|
61
|
+
if (response.status === 'failed')
|
|
62
|
+
throw new Error(ui_i18n_1.default.text('Failed to delete crosswalk'));
|
|
63
|
+
return response;
|
|
64
|
+
}), handleAction)({
|
|
65
|
+
entityUri: entityUri,
|
|
66
|
+
crosswalkId: crosswalkId
|
|
67
|
+
});
|
|
68
|
+
}, [handleAction]);
|
|
69
|
+
return {
|
|
70
|
+
addCrosswalk: addCrosswalkAction,
|
|
71
|
+
editCrosswalk: editCrosswalkAction,
|
|
72
|
+
deleteCrosswalk: deleteCrosswalkAction
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
exports.useCrosswalkActions = useCrosswalkActions;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { default as AttributesTable } from './AttributesTable/AttributesTable';
|
|
2
2
|
export { useModifiedEntity } from './hooks/useModifiedEntity';
|
|
3
|
+
export { useCrosswalkActions } from './hooks/useCrosswalkActions';
|
|
3
4
|
export { default as CrosswalkDragLayer } from './CrosswalkDragLayer/CrosswalkDragLayer';
|
|
4
5
|
export { default as SourceCrosswalksRow } from './SourceCrosswalksRow/SourceCrosswalksRow';
|
|
5
6
|
export { default as CrosswalkEditor } from './CrosswalkEditor/CrosswalkEditor';
|
|
6
7
|
export { CrosswalkType } from './types';
|
|
7
|
-
export type { CrosswalksByTypes } from './types';
|
|
8
|
+
export type { CrosswalksByTypes, AddCrosswalkEvent, EditCrosswalkEvent, DeleteCrosswalkEvent } from './types';
|
|
8
9
|
export { groupCrosswalksByTypesAndSources } from './utils/legend';
|
|
@@ -3,11 +3,13 @@ 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.groupCrosswalksByTypesAndSources = exports.CrosswalkType = exports.CrosswalkEditor = exports.SourceCrosswalksRow = exports.CrosswalkDragLayer = exports.useModifiedEntity = exports.AttributesTable = void 0;
|
|
6
|
+
exports.groupCrosswalksByTypesAndSources = exports.CrosswalkType = exports.CrosswalkEditor = exports.SourceCrosswalksRow = exports.CrosswalkDragLayer = exports.useCrosswalkActions = exports.useModifiedEntity = exports.AttributesTable = void 0;
|
|
7
7
|
var AttributesTable_1 = require("./AttributesTable/AttributesTable");
|
|
8
8
|
Object.defineProperty(exports, "AttributesTable", { enumerable: true, get: function () { return __importDefault(AttributesTable_1).default; } });
|
|
9
9
|
var useModifiedEntity_1 = require("./hooks/useModifiedEntity");
|
|
10
10
|
Object.defineProperty(exports, "useModifiedEntity", { enumerable: true, get: function () { return useModifiedEntity_1.useModifiedEntity; } });
|
|
11
|
+
var useCrosswalkActions_1 = require("./hooks/useCrosswalkActions");
|
|
12
|
+
Object.defineProperty(exports, "useCrosswalkActions", { enumerable: true, get: function () { return useCrosswalkActions_1.useCrosswalkActions; } });
|
|
11
13
|
var CrosswalkDragLayer_1 = require("./CrosswalkDragLayer/CrosswalkDragLayer");
|
|
12
14
|
Object.defineProperty(exports, "CrosswalkDragLayer", { enumerable: true, get: function () { return __importDefault(CrosswalkDragLayer_1).default; } });
|
|
13
15
|
var SourceCrosswalksRow_1 = require("./SourceCrosswalksRow/SourceCrosswalksRow");
|
|
@@ -2,3 +2,6 @@ export type { CrosswalksByOwnerTypeMap } from './CrosswalksByOwnerTypeMap';
|
|
|
2
2
|
export type { CreateAttributeEvent } from './CreateAttributeEvent';
|
|
3
3
|
export { CrosswalkType } from './CrosswalkType';
|
|
4
4
|
export type { CrosswalksByTypes } from './CrosswalksByTypes';
|
|
5
|
+
export type { AddCrosswalkEvent } from './AddCrosswalkEvent';
|
|
6
|
+
export type { DeleteCrosswalkEvent } from './DeleteCrosswalkEvent';
|
|
7
|
+
export type { EditCrosswalkEvent } from './EditCrosswalkEvent';
|
package/components/index.d.ts
CHANGED
|
@@ -10,8 +10,10 @@ export { default as NestedAttributeEditor } from './attributes/editMode/NestedAt
|
|
|
10
10
|
export { default as ReferenceAttributeEditor } from './attributes/editMode/ReferenceAttribute';
|
|
11
11
|
export { default as RelationTypeSelector } from './attributes/editMode/RelationTypeSelector/RelationTypeSelector';
|
|
12
12
|
export { default as SimpleAttributeEditor } from './attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor';
|
|
13
|
-
export { default as AttributesPager } from './attributes/editMode/AttributesPager';
|
|
13
|
+
export { default as AttributesPager, CardinalityMessage } from './attributes/editMode/AttributesPager';
|
|
14
|
+
export type { AttributeItem } from './attributes/editMode/AttributesPager';
|
|
14
15
|
export { default as ReadOnlyAttribute } from './attributes/readMode/AttributesFactory/Attribute';
|
|
16
|
+
export { default as EditableAttribute } from './attributes/editMode/AttributesFactory/Attribute';
|
|
15
17
|
export { default as ReadOnlyAttributeValuesBlock } from './attributes/readMode/AttributeValuesBlock/AttributeValuesBlock';
|
|
16
18
|
export { default as ReadOnlyAttributesList } from './attributes/readMode/AttributesList';
|
|
17
19
|
export { default as ImageAttributesLine } from './attributes/readMode/ImageAttributesLine';
|
|
@@ -113,3 +115,5 @@ export { default as Marginator } from './Marginator/Marginator';
|
|
|
113
115
|
export { default as ConfirmationDialog } from './ConfirmationDialog/ConfirmationDialog';
|
|
114
116
|
export { default as ConfirmDeleteDialog } from './ConfirmDeleteDialog/ConfirmDeleteDialog';
|
|
115
117
|
export * from './crosswalks';
|
|
118
|
+
export { ReltioMap } from './ReltioMap';
|
|
119
|
+
export { default as ErrorMessage } from './ErrorWrapper/ErrorMessage';
|
package/components/index.js
CHANGED
|
@@ -13,9 +13,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.ConfirmDeleteDialog = exports.ConfirmationDialog = exports.Marginator = exports.LightArrowTooltip = exports.ArrowExpandButton = exports.ScrollableTabs = exports.ExpandableSearchInput = exports.VirtualGroupedList = exports.ViewMoreToggle = exports.VerticalHeadingsTable = exports.VerticalDivider = exports.AttributeTitle = exports.Spacer = exports.SourceIcon = void 0;
|
|
16
|
+
exports.EntityTypeIcon = exports.EntityTypeBadge = exports.EntityAvatar = exports.EMPTY_STATE_VARIANTS = exports.EMPTY_STATE_ICONS = exports.EmptyState = exports.NoResults = exports.NoData = exports.DropDownSelector = exports.DropDownMenuButton = exports.Drawer = exports.DataTypeValue = exports.ConnectionRelationTypeSelector = exports.ConfigureColumnsPopup = exports.MenuWithPopper = exports.DropdownIndicatorWithIconButton = exports.DropdownIndicator = exports.CommentsContainer = exports.ColorBar = exports.CollapseButton = exports.CollaborationItem = exports.ClickAwayProvider = exports.BasicViewHeader = exports.BasicViewContent = exports.BasicView = exports.ProfileBandNavigation = exports.AvatarWithFallback = exports.AutoSizeList = exports.ReadOnlyAttributesPager = exports.SimpleAttribute = exports.ReferenceAttribute = exports.NestedAttribute = exports.ImageAttributesLine = exports.ReadOnlyAttributesList = exports.ReadOnlyAttributeValuesBlock = exports.EditableAttribute = exports.ReadOnlyAttribute = exports.CardinalityMessage = exports.AttributesPager = exports.SimpleAttributeEditor = exports.RelationTypeSelector = exports.ReferenceAttributeEditor = exports.NestedAttributeEditor = exports.MoreAttributesButton = exports.EntitySelector = exports.EntityCreator = exports.AttributesList = exports.BranchDecorator = exports.AttributesView = exports.AttributeListItem = void 0;
|
|
17
|
+
exports.SimpleDropDownSelector = exports.SidePanelContentHeader = exports.SidePanel = exports.SideButtonsPanel = exports.SelectorWithOnlyOptionAutoSelect = exports.SelectionPopupPopper = exports.SelectionPopup = exports.useKeyboardNavigation = exports.WhiteSearchInput = exports.SearchInput = exports.ScoreLabel = exports.Score = exports.ResizablePanes = exports.ReltioGridLayout = exports.ReactSortableTreeUtils = exports.ReactSortableTreeHandlers = exports.ReactSortableTree = exports.ReactSelectOptionFilters = exports.MultiSelect = exports.QueryBuilderRowsGroup = exports.QueryBuilderRow = exports.ProfileCard = exports.ProfileBand = exports.PotentialMatchReviewCard = exports.PopupWithArrow = exports.Popper = exports.MultipleInput = exports.ModeSwitcherSelect = exports.ModeSwitcher = exports.TransitiveMatchBlock = exports.SimpleMatchRulesBuilder = exports.SimpleMatchRulesBlock = exports.MatchRulesBlock = exports.LoadingSpinner = exports.Link = exports.LinearLoadIndicator = exports.ImportModes = exports.ImportButton = exports.ImageGalleryDialog = exports.Highlighter = exports.HierarchicalAttributeTooltip = exports.HideOnShrink = exports.FlipCard = exports.FacetViewHeader = exports.ExpandedValueTooltip = exports.ErrorWrapper = exports.ErrorPopup = exports.ErrorBoundary = exports.EntityUriLink = exports.EntityTypesSelector = void 0;
|
|
18
|
+
exports.ErrorMessage = exports.ReltioMap = exports.ConfirmDeleteDialog = exports.ConfirmationDialog = exports.Marginator = exports.LightArrowTooltip = exports.ArrowExpandButton = exports.ScrollableTabs = exports.ExpandableSearchInput = exports.VirtualGroupedList = exports.ViewMoreToggle = exports.VerticalHeadingsTable = exports.VerticalDivider = exports.AttributeTitle = exports.Spacer = exports.SourceIcon = exports.SmallIconButtonWithTooltip = exports.SmallIconButton = void 0;
|
|
19
19
|
__exportStar(require("./activityLog"), exports);
|
|
20
20
|
var AttributeListItem_1 = require("./AttributeListItem/AttributeListItem");
|
|
21
21
|
Object.defineProperty(exports, "AttributeListItem", { enumerable: true, get: function () { return __importDefault(AttributeListItem_1).default; } });
|
|
@@ -41,8 +41,11 @@ var SimpleAttributeEditor_1 = require("./attributes/editMode/SimpleAttributeEdit
|
|
|
41
41
|
Object.defineProperty(exports, "SimpleAttributeEditor", { enumerable: true, get: function () { return __importDefault(SimpleAttributeEditor_1).default; } });
|
|
42
42
|
var AttributesPager_1 = require("./attributes/editMode/AttributesPager");
|
|
43
43
|
Object.defineProperty(exports, "AttributesPager", { enumerable: true, get: function () { return __importDefault(AttributesPager_1).default; } });
|
|
44
|
+
Object.defineProperty(exports, "CardinalityMessage", { enumerable: true, get: function () { return AttributesPager_1.CardinalityMessage; } });
|
|
44
45
|
var Attribute_1 = require("./attributes/readMode/AttributesFactory/Attribute");
|
|
45
46
|
Object.defineProperty(exports, "ReadOnlyAttribute", { enumerable: true, get: function () { return __importDefault(Attribute_1).default; } });
|
|
47
|
+
var Attribute_2 = require("./attributes/editMode/AttributesFactory/Attribute");
|
|
48
|
+
Object.defineProperty(exports, "EditableAttribute", { enumerable: true, get: function () { return __importDefault(Attribute_2).default; } });
|
|
46
49
|
var AttributeValuesBlock_1 = require("./attributes/readMode/AttributeValuesBlock/AttributeValuesBlock");
|
|
47
50
|
Object.defineProperty(exports, "ReadOnlyAttributeValuesBlock", { enumerable: true, get: function () { return __importDefault(AttributeValuesBlock_1).default; } });
|
|
48
51
|
var AttributesList_2 = require("./attributes/readMode/AttributesList");
|
|
@@ -245,3 +248,7 @@ Object.defineProperty(exports, "ConfirmationDialog", { enumerable: true, get: fu
|
|
|
245
248
|
var ConfirmDeleteDialog_1 = require("./ConfirmDeleteDialog/ConfirmDeleteDialog");
|
|
246
249
|
Object.defineProperty(exports, "ConfirmDeleteDialog", { enumerable: true, get: function () { return __importDefault(ConfirmDeleteDialog_1).default; } });
|
|
247
250
|
__exportStar(require("./crosswalks"), exports);
|
|
251
|
+
var ReltioMap_1 = require("./ReltioMap");
|
|
252
|
+
Object.defineProperty(exports, "ReltioMap", { enumerable: true, get: function () { return ReltioMap_1.ReltioMap; } });
|
|
253
|
+
var ErrorMessage_1 = require("./ErrorWrapper/ErrorMessage");
|
|
254
|
+
Object.defineProperty(exports, "ErrorMessage", { enumerable: true, get: function () { return __importDefault(ErrorMessage_1).default; } });
|
package/constants/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { COMMENTS_CONTAINER_VISIBILITY_AREA } from "./classnames";
|
|
2
2
|
export { ALWAYS_VISIBLE_TYPE_URIS } from "./attributes";
|
|
3
3
|
export { SortingType, ColumnFilterType, ColumnsDataType, QueryBuilderAttributeType, QueryBuilderAttributeDataType } from "./prop-types";
|
|
4
|
+
export { MAP_DRAWING_MODES, DEFAULT_OVERLAY_OPTIONS, MAP_MINIMUM_SCALE_RADIUS } from "./map";
|
package/constants/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ALWAYS_VISIBLE_TYPE_URIS = exports.COMMENTS_CONTAINER_VISIBILITY_AREA = exports.QueryBuilderAttributeDataType = exports.QueryBuilderAttributeType = exports.ColumnsDataType = exports.ColumnFilterType = exports.SortingType = void 0;
|
|
3
|
+
exports.MAP_MINIMUM_SCALE_RADIUS = exports.DEFAULT_OVERLAY_OPTIONS = exports.MAP_DRAWING_MODES = exports.ALWAYS_VISIBLE_TYPE_URIS = exports.COMMENTS_CONTAINER_VISIBILITY_AREA = exports.QueryBuilderAttributeDataType = exports.QueryBuilderAttributeType = exports.ColumnsDataType = exports.ColumnFilterType = exports.SortingType = void 0;
|
|
4
4
|
var prop_types_1 = require("./prop-types");
|
|
5
5
|
Object.defineProperty(exports, "SortingType", { enumerable: true, get: function () { return prop_types_1.SortingType; } });
|
|
6
6
|
Object.defineProperty(exports, "ColumnFilterType", { enumerable: true, get: function () { return prop_types_1.ColumnFilterType; } });
|
|
@@ -11,3 +11,7 @@ var classnames_1 = require("./classnames");
|
|
|
11
11
|
Object.defineProperty(exports, "COMMENTS_CONTAINER_VISIBILITY_AREA", { enumerable: true, get: function () { return classnames_1.COMMENTS_CONTAINER_VISIBILITY_AREA; } });
|
|
12
12
|
var attributes_1 = require("./attributes");
|
|
13
13
|
Object.defineProperty(exports, "ALWAYS_VISIBLE_TYPE_URIS", { enumerable: true, get: function () { return attributes_1.ALWAYS_VISIBLE_TYPE_URIS; } });
|
|
14
|
+
var map_1 = require("./map");
|
|
15
|
+
Object.defineProperty(exports, "MAP_DRAWING_MODES", { enumerable: true, get: function () { return map_1.MAP_DRAWING_MODES; } });
|
|
16
|
+
Object.defineProperty(exports, "DEFAULT_OVERLAY_OPTIONS", { enumerable: true, get: function () { return map_1.DEFAULT_OVERLAY_OPTIONS; } });
|
|
17
|
+
Object.defineProperty(exports, "MAP_MINIMUM_SCALE_RADIUS", { enumerable: true, get: function () { return map_1.MAP_MINIMUM_SCALE_RADIUS; } });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const MAP_DRAWING_MODES: {
|
|
2
|
+
CIRCLE: string;
|
|
3
|
+
POLYGON: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const DEFAULT_OVERLAY_OPTIONS: {
|
|
6
|
+
fillColor: string;
|
|
7
|
+
fillOpacity: number;
|
|
8
|
+
strokeWeight: number;
|
|
9
|
+
strokeColor: string;
|
|
10
|
+
clickable: boolean;
|
|
11
|
+
editable: boolean;
|
|
12
|
+
zIndex: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const MAP_MINIMUM_SCALE_RADIUS = 0.001;
|
package/constants/map.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAP_MINIMUM_SCALE_RADIUS = exports.DEFAULT_OVERLAY_OPTIONS = exports.MAP_DRAWING_MODES = void 0;
|
|
4
|
+
exports.MAP_DRAWING_MODES = {
|
|
5
|
+
CIRCLE: 'circle',
|
|
6
|
+
POLYGON: 'polygon'
|
|
7
|
+
};
|
|
8
|
+
exports.DEFAULT_OVERLAY_OPTIONS = {
|
|
9
|
+
fillColor: 'rgb(242,82,82)',
|
|
10
|
+
fillOpacity: 0.1,
|
|
11
|
+
strokeWeight: 2,
|
|
12
|
+
strokeColor: '#F25252',
|
|
13
|
+
clickable: false,
|
|
14
|
+
editable: true,
|
|
15
|
+
zIndex: 1
|
|
16
|
+
};
|
|
17
|
+
exports.MAP_MINIMUM_SCALE_RADIUS = 0.001;
|
|
@@ -7,11 +7,17 @@ export declare const CollaborationContext: React.Context<{
|
|
|
7
7
|
getComment: (commentId: Comment['commentId']) => void;
|
|
8
8
|
createComment: (params: Pick<Comment, 'content' | 'namedUsers' | 'objectType' | 'relatedObjectUris'> & {
|
|
9
9
|
uri: string;
|
|
10
|
+
}) => Promise<void>;
|
|
11
|
+
editComment: (params: Pick<Comment, 'content' | 'namedUsers' | 'objectType' | 'relatedObjectUris' | 'commentId' | 'replies'> & {
|
|
12
|
+
uri: string;
|
|
13
|
+
}) => Promise<void>;
|
|
14
|
+
deleteComment: (params: Pick<Comment, 'commentId'> & {
|
|
15
|
+
uri: string;
|
|
10
16
|
}) => void;
|
|
11
17
|
createReply: (params: Pick<Reply, 'content' | 'namedUsers' | 'action'> & {
|
|
12
18
|
uri: string;
|
|
13
19
|
commentId: string;
|
|
14
|
-
}) => void
|
|
20
|
+
}) => Promise<void>;
|
|
15
21
|
resolveThread: (params: {
|
|
16
22
|
uri: string;
|
|
17
23
|
commentId: string;
|
|
@@ -10,11 +10,13 @@ exports.CollaborationContext = react_1.default.createContext({
|
|
|
10
10
|
commentsMap: null,
|
|
11
11
|
currentComment: null,
|
|
12
12
|
getComment: noop,
|
|
13
|
-
createComment: noop,
|
|
14
|
-
|
|
13
|
+
createComment: function () { return new Promise(noop); },
|
|
14
|
+
editComment: function () { return new Promise(noop); },
|
|
15
|
+
createReply: function () { return new Promise(noop); },
|
|
15
16
|
resolveThread: noop,
|
|
16
17
|
reOpenThread: noop,
|
|
17
18
|
clearCurrentComment: noop,
|
|
19
|
+
deleteComment: noop,
|
|
18
20
|
sending: false,
|
|
19
21
|
loading: false
|
|
20
22
|
});
|