@reltio/components 1.4.2257 → 1.4.2258
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/ReltioMap/ReltioMap.d.ts +5 -8
- package/ReltioMap/ReltioMap.js +31 -39
- package/ReltioMap/ReltioMap.spec.js +299 -104
- package/ReltioMap/components/ClusteredMarkers/ClusteredMarkers.d.ts +2 -1
- package/ReltioMap/components/ClusteredMarkers/ClusteredMarkers.js +11 -13
- package/ReltioMap/components/EntityMarker/EntityMarker.d.ts +2 -1
- package/ReltioMap/components/EntityMarker/EntityMarker.js +3 -3
- package/ReltioMap/components/PolygonDrawing/PolygonDrawing.d.ts +4 -0
- package/ReltioMap/components/PolygonDrawing/PolygonDrawing.js +18 -0
- package/ReltioMap/components/PolygonDrawing/crosshair.inline.svg.d.ts +1 -0
- package/ReltioMap/components/PolygonDrawing/crosshair.inline.svg.js +1 -0
- package/ReltioMap/components/PolygonDrawing/index.d.ts +2 -0
- package/ReltioMap/components/PolygonDrawing/index.js +2 -0
- package/ReltioMap/components/PolygonDrawing/polygonRingHelpers.d.ts +5 -0
- package/ReltioMap/components/PolygonDrawing/polygonRingHelpers.js +43 -0
- package/ReltioMap/components/PolygonDrawing/useDrawingCursors.d.ts +6 -0
- package/ReltioMap/components/PolygonDrawing/useDrawingCursors.js +87 -0
- package/ReltioMap/components/PolygonDrawing/usePolygonDrawing.d.ts +9 -0
- package/ReltioMap/components/PolygonDrawing/usePolygonDrawing.js +197 -0
- package/ReltioMap/components/PolygonDrawing/usePreviewPolylines.d.ts +7 -0
- package/ReltioMap/components/PolygonDrawing/usePreviewPolylines.js +38 -0
- package/ReltioMap/components/PolygonDrawing/useVertexHandles.d.ts +14 -0
- package/ReltioMap/components/PolygonDrawing/useVertexHandles.js +85 -0
- package/ReltioMap/components/TopRightMapControls/TopRightMapControls.d.ts +3 -3
- package/ReltioMap/components/TopRightMapControls/TopRightMapControls.js +4 -18
- package/ReltioMap/helpers.d.ts +2 -1
- package/ReltioMap/helpers.js +3 -11
- package/ReltioMap/types.d.ts +2 -2
- package/cjs/ReltioMap/ReltioMap.d.ts +5 -8
- package/cjs/ReltioMap/ReltioMap.js +29 -37
- package/cjs/ReltioMap/ReltioMap.spec.js +298 -103
- package/cjs/ReltioMap/components/ClusteredMarkers/ClusteredMarkers.d.ts +2 -1
- package/cjs/ReltioMap/components/ClusteredMarkers/ClusteredMarkers.js +11 -13
- package/cjs/ReltioMap/components/EntityMarker/EntityMarker.d.ts +2 -1
- package/cjs/ReltioMap/components/EntityMarker/EntityMarker.js +3 -3
- package/cjs/ReltioMap/components/PolygonDrawing/PolygonDrawing.d.ts +4 -0
- package/cjs/ReltioMap/components/PolygonDrawing/PolygonDrawing.js +22 -0
- package/cjs/ReltioMap/components/PolygonDrawing/crosshair.inline.svg.d.ts +1 -0
- package/cjs/ReltioMap/components/PolygonDrawing/crosshair.inline.svg.js +4 -0
- package/cjs/ReltioMap/components/PolygonDrawing/index.d.ts +2 -0
- package/cjs/ReltioMap/components/PolygonDrawing/index.js +7 -0
- package/cjs/ReltioMap/components/PolygonDrawing/polygonRingHelpers.d.ts +5 -0
- package/cjs/ReltioMap/components/PolygonDrawing/polygonRingHelpers.js +50 -0
- package/cjs/ReltioMap/components/PolygonDrawing/useDrawingCursors.d.ts +6 -0
- package/cjs/ReltioMap/components/PolygonDrawing/useDrawingCursors.js +91 -0
- package/cjs/ReltioMap/components/PolygonDrawing/usePolygonDrawing.d.ts +9 -0
- package/cjs/ReltioMap/components/PolygonDrawing/usePolygonDrawing.js +202 -0
- package/cjs/ReltioMap/components/PolygonDrawing/usePreviewPolylines.d.ts +7 -0
- package/cjs/ReltioMap/components/PolygonDrawing/usePreviewPolylines.js +42 -0
- package/cjs/ReltioMap/components/PolygonDrawing/useVertexHandles.d.ts +14 -0
- package/cjs/ReltioMap/components/PolygonDrawing/useVertexHandles.js +89 -0
- package/cjs/ReltioMap/components/TopRightMapControls/TopRightMapControls.d.ts +3 -3
- package/cjs/ReltioMap/components/TopRightMapControls/TopRightMapControls.js +3 -17
- package/cjs/ReltioMap/helpers.d.ts +2 -1
- package/cjs/ReltioMap/helpers.js +8 -15
- package/cjs/ReltioMap/types.d.ts +2 -2
- package/cjs/constants/index.d.ts +1 -1
- package/cjs/constants/index.js +2 -2
- package/cjs/constants/map.d.ts +1 -2
- package/cjs/constants/map.js +2 -5
- package/cjs/features/workflow/AddWorkflowDialog/styles.d.ts +1 -1
- package/cjs/icons/index.d.ts +0 -1
- package/cjs/icons/index.js +2 -4
- package/constants/index.d.ts +1 -1
- package/constants/index.js +1 -1
- package/constants/map.d.ts +1 -2
- package/constants/map.js +1 -4
- package/features/workflow/AddWorkflowDialog/styles.d.ts +1 -1
- package/icons/index.d.ts +0 -1
- package/icons/index.js +0 -1
- package/package.json +2 -2
- package/ReltioMap/components/DrawingManager/DrawingManager.d.ts +0 -2
- package/ReltioMap/components/DrawingManager/DrawingManager.js +0 -5
- package/ReltioMap/components/DrawingManager/index.d.ts +0 -1
- package/ReltioMap/components/DrawingManager/index.js +0 -1
- package/ReltioMap/components/DrawingManager/useDrawingManager.d.ts +0 -7
- package/ReltioMap/components/DrawingManager/useDrawingManager.js +0 -36
- package/ReltioMap/googleMock.test-data.d.ts +0 -1
- package/ReltioMap/googleMock.test-data.js +0 -109
- package/cjs/ReltioMap/components/DrawingManager/DrawingManager.d.ts +0 -2
- package/cjs/ReltioMap/components/DrawingManager/DrawingManager.js +0 -9
- package/cjs/ReltioMap/components/DrawingManager/index.d.ts +0 -1
- package/cjs/ReltioMap/components/DrawingManager/index.js +0 -5
- package/cjs/ReltioMap/components/DrawingManager/useDrawingManager.d.ts +0 -7
- package/cjs/ReltioMap/components/DrawingManager/useDrawingManager.js +0 -40
- package/cjs/ReltioMap/googleMock.test-data.d.ts +0 -1
- package/cjs/ReltioMap/googleMock.test-data.js +0 -113
- package/cjs/icons/Radius.d.ts +0 -3
- package/cjs/icons/Radius.js +0 -22
- package/icons/Radius.d.ts +0 -3
- package/icons/Radius.js +0 -17
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useVertexHandles = void 0;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
var useDrawingCursors_1 = require("./useDrawingCursors");
|
|
6
|
+
var createVertexHandleElement = function (isFirstHandle) {
|
|
7
|
+
var el = document.createElement('div');
|
|
8
|
+
el.style.width = '10px';
|
|
9
|
+
el.style.height = '10px';
|
|
10
|
+
el.style.borderRadius = '50%';
|
|
11
|
+
el.style.boxSizing = 'border-box';
|
|
12
|
+
el.style.backgroundColor = '#ffffff';
|
|
13
|
+
el.style.border = '1.25px solid #444444';
|
|
14
|
+
el.style.cursor = isFirstHandle ? 'pointer' : useDrawingCursors_1.MAP_DRAWING_CROSSHAIR_CURSOR;
|
|
15
|
+
el.style.transform = 'translateY(50%)';
|
|
16
|
+
return el;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* N circular vertex markers. The first is clickable to close the ring; others swallow clicks to avoid
|
|
20
|
+
* double map-handling.
|
|
21
|
+
*/
|
|
22
|
+
var useVertexHandles = function (_a) {
|
|
23
|
+
var map = _a.map, isActive = _a.isActive, vertices = _a.vertices, handleZIndexRef = _a.handleZIndexRef, onFirstHandleClick = _a.onFirstHandleClick, syncDisposeRef = _a.syncDisposeRef;
|
|
24
|
+
var markersRef = (0, react_1.useRef)([]);
|
|
25
|
+
var onFirstHandleClickRef = (0, react_1.useRef)(onFirstHandleClick);
|
|
26
|
+
onFirstHandleClickRef.current = onFirstHandleClick;
|
|
27
|
+
var dispose = function () {
|
|
28
|
+
markersRef.current.forEach(function (m) {
|
|
29
|
+
google.maps.event.clearInstanceListeners(m);
|
|
30
|
+
m.map = null;
|
|
31
|
+
});
|
|
32
|
+
markersRef.current = [];
|
|
33
|
+
};
|
|
34
|
+
(0, react_1.useEffect)(function () {
|
|
35
|
+
if (!map || !isActive) {
|
|
36
|
+
syncDisposeRef.current = function () {
|
|
37
|
+
dispose();
|
|
38
|
+
};
|
|
39
|
+
dispose();
|
|
40
|
+
return function () {
|
|
41
|
+
syncDisposeRef.current = function () { };
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
syncDisposeRef.current = dispose;
|
|
45
|
+
return function () {
|
|
46
|
+
syncDisposeRef.current = function () { };
|
|
47
|
+
dispose();
|
|
48
|
+
};
|
|
49
|
+
}, [map, isActive, syncDisposeRef]);
|
|
50
|
+
(0, react_1.useEffect)(function () {
|
|
51
|
+
if (!map || !isActive || typeof document === 'undefined') {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (vertices.length === 0) {
|
|
55
|
+
dispose();
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
var handleZ = handleZIndexRef.current;
|
|
59
|
+
var AdvancedMarkerElement = google.maps.marker.AdvancedMarkerElement;
|
|
60
|
+
for (var i = markersRef.current.length; i < vertices.length; i += 1) {
|
|
61
|
+
var latLng = vertices[i];
|
|
62
|
+
if (!latLng) {
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
var isFirstHandle = i === 0;
|
|
66
|
+
var content = createVertexHandleElement(isFirstHandle);
|
|
67
|
+
var marker = new AdvancedMarkerElement({
|
|
68
|
+
map: map,
|
|
69
|
+
position: latLng,
|
|
70
|
+
content: content,
|
|
71
|
+
zIndex: handleZ + (isFirstHandle ? 1 : 0),
|
|
72
|
+
gmpClickable: true
|
|
73
|
+
});
|
|
74
|
+
if (isFirstHandle) {
|
|
75
|
+
google.maps.event.addListener(marker, 'click', function (e) {
|
|
76
|
+
e.stop();
|
|
77
|
+
onFirstHandleClickRef.current();
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
google.maps.event.addListener(marker, 'click', function (e) {
|
|
82
|
+
e.stop();
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
markersRef.current.push(marker);
|
|
86
|
+
}
|
|
87
|
+
}, [map, isActive, vertices, handleZIndexRef]);
|
|
88
|
+
};
|
|
89
|
+
exports.useVertexHandles = useVertexHandles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DrawingMode
|
|
2
|
+
import { DrawingMode } from '../../types';
|
|
3
3
|
export declare const ButtonWithTooltip: React.ForwardRefExoticComponent<Omit<{
|
|
4
4
|
tooltipTitle?: import("@mui/material").TooltipProps["title"];
|
|
5
5
|
tooltipPlacement?: import("@mui/material").TooltipProps["placement"];
|
|
@@ -42,9 +42,9 @@ type Props = {
|
|
|
42
42
|
className?: string;
|
|
43
43
|
onDrawingModeChanged: (value: DrawingMode | null) => void;
|
|
44
44
|
drawingMode: DrawingMode | null;
|
|
45
|
-
|
|
45
|
+
enablePolygonDrawing: boolean;
|
|
46
46
|
hasActiveOverlay: boolean;
|
|
47
47
|
onClearOverlay: () => void;
|
|
48
48
|
};
|
|
49
|
-
export declare const TopRightMapControls: ({ className, drawingMode,
|
|
49
|
+
export declare const TopRightMapControls: ({ className, drawingMode, enablePolygonDrawing, hasActiveOverlay, onDrawingModeChanged, onClearOverlay }: Props) => React.JSX.Element;
|
|
50
50
|
export {};
|
|
@@ -11,31 +11,17 @@ var Button_1 = __importDefault(require("@mui/material/Button"));
|
|
|
11
11
|
var withTooltip_1 = require("../../../HOCs/withTooltip");
|
|
12
12
|
var HighlightOff_1 = __importDefault(require("@mui/icons-material/HighlightOff"));
|
|
13
13
|
var constants_1 = require("../../../constants");
|
|
14
|
-
var Radius_1 = __importDefault(require("../../../icons/Radius"));
|
|
15
14
|
var Draw_1 = __importDefault(require("../../../icons/Draw"));
|
|
16
15
|
var styles_1 = require("./styles");
|
|
17
16
|
exports.ButtonWithTooltip = (0, withTooltip_1.withTooltip)(Button_1.default);
|
|
18
|
-
var getIcon = function (mode) {
|
|
19
|
-
switch (mode) {
|
|
20
|
-
case constants_1.MAP_DRAWING_MODES.CIRCLE:
|
|
21
|
-
return Radius_1.default;
|
|
22
|
-
case constants_1.MAP_DRAWING_MODES.POLYGON:
|
|
23
|
-
return Draw_1.default;
|
|
24
|
-
default:
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
17
|
var TopRightMapControls = function (_a) {
|
|
29
|
-
var className = _a.className, drawingMode = _a.drawingMode,
|
|
18
|
+
var className = _a.className, drawingMode = _a.drawingMode, enablePolygonDrawing = _a.enablePolygonDrawing, hasActiveOverlay = _a.hasActiveOverlay, onDrawingModeChanged = _a.onDrawingModeChanged, onClearOverlay = _a.onClearOverlay;
|
|
30
19
|
var styles = (0, styles_1.useStyles)();
|
|
31
20
|
var changeDrawingModeTo = function (drawingMode) { return function () {
|
|
32
21
|
onDrawingModeChanged(drawingMode);
|
|
33
22
|
}; };
|
|
34
23
|
return (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.container, className) }, drawingMode || hasActiveOverlay ? (react_1.default.createElement(exports.ButtonWithTooltip, { tooltipTitle: ui_i18n_1.default.text('Clear area'), className: styles.button, onClick: hasActiveOverlay ? onClearOverlay : changeDrawingModeTo(null) },
|
|
35
|
-
react_1.default.createElement(HighlightOff_1.default, { className: styles.icon }))) : (
|
|
36
|
-
|
|
37
|
-
return (react_1.default.createElement(exports.ButtonWithTooltip, { tooltipTitle: ui_i18n_1.default.text('Draw area'), key: mode, className: styles.button, onClick: changeDrawingModeTo(mode) },
|
|
38
|
-
react_1.default.createElement(Icon, { className: styles.icon })));
|
|
39
|
-
}))));
|
|
24
|
+
react_1.default.createElement(HighlightOff_1.default, { className: styles.icon }))) : (enablePolygonDrawing && (react_1.default.createElement(exports.ButtonWithTooltip, { tooltipTitle: ui_i18n_1.default.text('Draw area'), className: styles.button, onClick: changeDrawingModeTo(constants_1.POLYGON_DRAWING_MODE) },
|
|
25
|
+
react_1.default.createElement(Draw_1.default, { className: styles.icon }))))));
|
|
40
26
|
};
|
|
41
27
|
exports.TopRightMapControls = TopRightMapControls;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GeoPoint } from '@reltio/mdm-sdk';
|
|
2
2
|
import { DrawingMode, Overlay, MapInstance } from './types';
|
|
3
|
+
export declare const isDomElement: (el: unknown) => el is Element;
|
|
3
4
|
export declare const getMapBoundsPolygon: (map: MapInstance) => any[];
|
|
4
|
-
export declare const
|
|
5
|
+
export declare const isActivePolygonDrawing: (drawingMode: DrawingMode) => boolean;
|
|
5
6
|
export declare const fitMapBoundsForMarkers: (markers: GeoPoint[], map: MapInstance, overlay: Overlay) => void;
|
|
6
7
|
export declare const fitMapBoundsForOverlay: (map: MapInstance, overlay: Overlay, existingBounds?: any) => void;
|
package/cjs/ReltioMap/helpers.js
CHANGED
|
@@ -9,8 +9,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
9
9
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.fitMapBoundsForOverlay = exports.fitMapBoundsForMarkers = exports.
|
|
13
|
-
var
|
|
12
|
+
exports.fitMapBoundsForOverlay = exports.fitMapBoundsForMarkers = exports.isActivePolygonDrawing = exports.getMapBoundsPolygon = exports.isDomElement = void 0;
|
|
13
|
+
var constants_1 = require("../constants");
|
|
14
|
+
var isDomElement = function (el) { return typeof Element !== 'undefined' && el instanceof Element; };
|
|
15
|
+
exports.isDomElement = isDomElement;
|
|
14
16
|
var getMapBoundsPolygon = function (map) {
|
|
15
17
|
var bounds = map.getBounds();
|
|
16
18
|
var ne = bounds.getNorthEast();
|
|
@@ -29,25 +31,16 @@ var getMapBoundsPolygon = function (map) {
|
|
|
29
31
|
return __spreadArray(__spreadArray(__spreadArray(__spreadArray([[neLat, neLng]], additionalPoint1, true), [[neLat, swLng], [swLat, swLng]], false), additionalPoint2, true), [[swLat, neLng]], false);
|
|
30
32
|
};
|
|
31
33
|
exports.getMapBoundsPolygon = getMapBoundsPolygon;
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
case map_1.MAP_DRAWING_MODES.CIRCLE:
|
|
35
|
-
return window.google.maps.drawing.OverlayType.CIRCLE;
|
|
36
|
-
case map_1.MAP_DRAWING_MODES.POLYGON:
|
|
37
|
-
return window.google.maps.drawing.OverlayType.POLYGON;
|
|
38
|
-
default:
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
exports.getDrawingMode = getDrawingMode;
|
|
34
|
+
var isActivePolygonDrawing = function (drawingMode) { return drawingMode === constants_1.POLYGON_DRAWING_MODE; };
|
|
35
|
+
exports.isActivePolygonDrawing = isActivePolygonDrawing;
|
|
43
36
|
var fitMapBoundsForMarkers = function (markers, map, overlay) {
|
|
44
37
|
var bounds = new window.google.maps.LatLngBounds();
|
|
45
38
|
markers.forEach(function (marker) { return bounds.extend(marker.point); });
|
|
46
39
|
var needAlignZoomLevel = markers.length === 1;
|
|
47
40
|
if (needAlignZoomLevel) {
|
|
48
41
|
var markerPoint = markers[0].point;
|
|
49
|
-
bounds.extend(new window.google.maps.LatLng(markerPoint.lat +
|
|
50
|
-
bounds.extend(new window.google.maps.LatLng(markerPoint.lat -
|
|
42
|
+
bounds.extend(new window.google.maps.LatLng(markerPoint.lat + constants_1.MAP_MINIMUM_SCALE_RADIUS, markerPoint.lng + constants_1.MAP_MINIMUM_SCALE_RADIUS));
|
|
43
|
+
bounds.extend(new window.google.maps.LatLng(markerPoint.lat - constants_1.MAP_MINIMUM_SCALE_RADIUS, markerPoint.lng - constants_1.MAP_MINIMUM_SCALE_RADIUS));
|
|
51
44
|
}
|
|
52
45
|
map.fitBounds(bounds);
|
|
53
46
|
if (overlay) {
|
package/cjs/ReltioMap/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Marker } from '@googlemaps/markerclusterer';
|
|
2
|
-
|
|
3
|
-
export type
|
|
2
|
+
import { POLYGON_DRAWING_MODE } from '../constants/map';
|
|
3
|
+
export type DrawingMode = typeof POLYGON_DRAWING_MODE;
|
|
4
4
|
export type ClusteredMarkersOptions = {
|
|
5
5
|
maxZoom?: number;
|
|
6
6
|
calculator?: (markers: Marker[]) => {
|
package/cjs/constants/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { SortingType, QueryBuilderAttributeType } from './prop-types';
|
|
2
2
|
export { COMMENTS_CONTAINER_VISIBILITY_AREA } from './classnames';
|
|
3
3
|
export { FIXED_TYPE_URIS } from './attributes';
|
|
4
|
-
export {
|
|
4
|
+
export { POLYGON_DRAWING_MODE, DEFAULT_GOOGLE_MAP_OPTIONS, DEFAULT_OVERLAY_OPTIONS, MAP_MINIMUM_SCALE_RADIUS } from './map';
|
|
5
5
|
export { COMMON_TEXT_FIELD_PROPS } from './textField';
|
|
6
6
|
export { POPUP_Z_INDEX } from './common';
|
|
7
7
|
export { ReactSelectOptionFilters } from './reactSelect';
|
package/cjs/constants/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SegmentationColumnId = exports.darkTheme = exports.theme = exports.viewingModeOption = exports.suggestingModeOption = exports.editingModeOption = exports.ReactSelectOptionFilters = exports.POPUP_Z_INDEX = exports.COMMON_TEXT_FIELD_PROPS = exports.MAP_MINIMUM_SCALE_RADIUS = exports.DEFAULT_OVERLAY_OPTIONS = exports.DEFAULT_GOOGLE_MAP_OPTIONS = exports.
|
|
3
|
+
exports.SegmentationColumnId = exports.darkTheme = exports.theme = exports.viewingModeOption = exports.suggestingModeOption = exports.editingModeOption = exports.ReactSelectOptionFilters = exports.POPUP_Z_INDEX = exports.COMMON_TEXT_FIELD_PROPS = exports.MAP_MINIMUM_SCALE_RADIUS = exports.DEFAULT_OVERLAY_OPTIONS = exports.DEFAULT_GOOGLE_MAP_OPTIONS = exports.POLYGON_DRAWING_MODE = exports.FIXED_TYPE_URIS = exports.COMMENTS_CONTAINER_VISIBILITY_AREA = exports.QueryBuilderAttributeType = 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, "QueryBuilderAttributeType", { enumerable: true, get: function () { return prop_types_1.QueryBuilderAttributeType; } });
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "COMMENTS_CONTAINER_VISIBILITY_AREA", { enumerabl
|
|
|
9
9
|
var attributes_1 = require("./attributes");
|
|
10
10
|
Object.defineProperty(exports, "FIXED_TYPE_URIS", { enumerable: true, get: function () { return attributes_1.FIXED_TYPE_URIS; } });
|
|
11
11
|
var map_1 = require("./map");
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "POLYGON_DRAWING_MODE", { enumerable: true, get: function () { return map_1.POLYGON_DRAWING_MODE; } });
|
|
13
13
|
Object.defineProperty(exports, "DEFAULT_GOOGLE_MAP_OPTIONS", { enumerable: true, get: function () { return map_1.DEFAULT_GOOGLE_MAP_OPTIONS; } });
|
|
14
14
|
Object.defineProperty(exports, "DEFAULT_OVERLAY_OPTIONS", { enumerable: true, get: function () { return map_1.DEFAULT_OVERLAY_OPTIONS; } });
|
|
15
15
|
Object.defineProperty(exports, "MAP_MINIMUM_SCALE_RADIUS", { enumerable: true, get: function () { return map_1.MAP_MINIMUM_SCALE_RADIUS; } });
|
package/cjs/constants/map.d.ts
CHANGED
package/cjs/constants/map.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MAP_MINIMUM_SCALE_RADIUS = exports.DEFAULT_GOOGLE_MAP_OPTIONS = exports.DEFAULT_OVERLAY_OPTIONS = exports.
|
|
4
|
-
exports.
|
|
5
|
-
CIRCLE: 'circle',
|
|
6
|
-
POLYGON: 'polygon'
|
|
7
|
-
};
|
|
3
|
+
exports.MAP_MINIMUM_SCALE_RADIUS = exports.DEFAULT_GOOGLE_MAP_OPTIONS = exports.DEFAULT_OVERLAY_OPTIONS = exports.POLYGON_DRAWING_MODE = void 0;
|
|
4
|
+
exports.POLYGON_DRAWING_MODE = 'polygon';
|
|
8
5
|
exports.DEFAULT_OVERLAY_OPTIONS = {
|
|
9
6
|
fillColor: 'rgb(242,82,82)',
|
|
10
7
|
fillOpacity: 0.1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"content" | "title" | "footer" | "input" | "select" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"content" | "title" | "footer" | "input" | "select" | "inputRoot" | "asterisk" | "cancelButton" | "inputLabelRoot" | "popoverPaper" | "simpleDropDownSelector">;
|
package/cjs/icons/index.d.ts
CHANGED
|
@@ -46,7 +46,6 @@ export { default as PmTaskIcon } from './PmTaskIcon';
|
|
|
46
46
|
export { default as Polygon } from './Polygon';
|
|
47
47
|
export { default as PotentialMatch } from './PotentialMatch';
|
|
48
48
|
export { default as Profile } from './Profile';
|
|
49
|
-
export { default as Radius } from './Radius';
|
|
50
49
|
export { default as ReadOnlyError } from './ReadOnlyError';
|
|
51
50
|
export { default as Reassign } from './Reassign';
|
|
52
51
|
export { default as Recommended } from './Recommended';
|
package/cjs/icons/index.js
CHANGED
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.UploadIcon = exports.UnMerge = exports.Tenant = exports.Table = exports.Suggest = exports.SimpleAttribute = exports.SelectAttributes = exports.Search = exports.ResizeIconInline = exports.Remove = exports.ReferenceAttribute = exports.Recommended =
|
|
6
|
+
exports.Reassign = exports.ReadOnlyError = exports.Profile = exports.PotentialMatch = exports.Polygon = exports.PmTaskIcon = exports.PmIcon = exports.PivotingIcon = exports.PinOutlined = exports.Pin = exports.NotMatchRule = exports.NotMatchDark = exports.NoMatches = exports.NoDataSearch = exports.NoData = exports.NestedAttribute = exports.NegativeRuleTooltipIcon = exports.NegativeRuleIcon = exports.MlMatch = exports.MergeDark = exports.Merge = exports.LogOut = exports.LogIn = exports.Info = exports.IgnoredOutlined = exports.Ignored = exports.Hyperlink = exports.Filter = exports.Error = exports.EmptySearchResults = exports.EmptyLoading = exports.Duplicate = exports.Draw = exports.Download = exports.Details = exports.Description = exports.DeleteRequestTaskIcon = exports.DefaultTaskIcon = exports.DefaultImage = exports.DcrTaskIcon = exports.Create = exports.Copy = exports.ControlAttribute = exports.CommentBubble = exports.Comment = exports.CollaborationIcon = exports.Calendar = exports.AttributesList = exports.AddComment = exports.Add = void 0;
|
|
7
|
+
exports.UploadIcon = exports.UnMerge = exports.Tenant = exports.Table = exports.Suggest = exports.SimpleAttribute = exports.SelectAttributes = exports.Search = exports.ResizeIconInline = exports.Remove = exports.ReferenceAttribute = exports.Recommended = void 0;
|
|
8
8
|
var Add_1 = require("./Add");
|
|
9
9
|
Object.defineProperty(exports, "Add", { enumerable: true, get: function () { return __importDefault(Add_1).default; } });
|
|
10
10
|
var AddComment_1 = require("./AddComment");
|
|
@@ -101,8 +101,6 @@ var PotentialMatch_1 = require("./PotentialMatch");
|
|
|
101
101
|
Object.defineProperty(exports, "PotentialMatch", { enumerable: true, get: function () { return __importDefault(PotentialMatch_1).default; } });
|
|
102
102
|
var Profile_1 = require("./Profile");
|
|
103
103
|
Object.defineProperty(exports, "Profile", { enumerable: true, get: function () { return __importDefault(Profile_1).default; } });
|
|
104
|
-
var Radius_1 = require("./Radius");
|
|
105
|
-
Object.defineProperty(exports, "Radius", { enumerable: true, get: function () { return __importDefault(Radius_1).default; } });
|
|
106
104
|
var ReadOnlyError_1 = require("./ReadOnlyError");
|
|
107
105
|
Object.defineProperty(exports, "ReadOnlyError", { enumerable: true, get: function () { return __importDefault(ReadOnlyError_1).default; } });
|
|
108
106
|
var Reassign_1 = require("./Reassign");
|
package/constants/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { SortingType, QueryBuilderAttributeType } from './prop-types';
|
|
2
2
|
export { COMMENTS_CONTAINER_VISIBILITY_AREA } from './classnames';
|
|
3
3
|
export { FIXED_TYPE_URIS } from './attributes';
|
|
4
|
-
export {
|
|
4
|
+
export { POLYGON_DRAWING_MODE, DEFAULT_GOOGLE_MAP_OPTIONS, DEFAULT_OVERLAY_OPTIONS, MAP_MINIMUM_SCALE_RADIUS } from './map';
|
|
5
5
|
export { COMMON_TEXT_FIELD_PROPS } from './textField';
|
|
6
6
|
export { POPUP_Z_INDEX } from './common';
|
|
7
7
|
export { ReactSelectOptionFilters } from './reactSelect';
|
package/constants/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { SortingType, QueryBuilderAttributeType } from './prop-types';
|
|
2
2
|
export { COMMENTS_CONTAINER_VISIBILITY_AREA } from './classnames';
|
|
3
3
|
export { FIXED_TYPE_URIS } from './attributes';
|
|
4
|
-
export {
|
|
4
|
+
export { POLYGON_DRAWING_MODE, DEFAULT_GOOGLE_MAP_OPTIONS, DEFAULT_OVERLAY_OPTIONS, MAP_MINIMUM_SCALE_RADIUS } from './map';
|
|
5
5
|
export { COMMON_TEXT_FIELD_PROPS } from './textField';
|
|
6
6
|
export { POPUP_Z_INDEX } from './common';
|
|
7
7
|
export { ReactSelectOptionFilters } from './reactSelect';
|
package/constants/map.d.ts
CHANGED
package/constants/map.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"content" | "title" | "footer" | "input" | "select" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"content" | "title" | "footer" | "input" | "select" | "inputRoot" | "asterisk" | "cancelButton" | "inputLabelRoot" | "popoverPaper" | "simpleDropDownSelector">;
|
package/icons/index.d.ts
CHANGED
|
@@ -46,7 +46,6 @@ export { default as PmTaskIcon } from './PmTaskIcon';
|
|
|
46
46
|
export { default as Polygon } from './Polygon';
|
|
47
47
|
export { default as PotentialMatch } from './PotentialMatch';
|
|
48
48
|
export { default as Profile } from './Profile';
|
|
49
|
-
export { default as Radius } from './Radius';
|
|
50
49
|
export { default as ReadOnlyError } from './ReadOnlyError';
|
|
51
50
|
export { default as Reassign } from './Reassign';
|
|
52
51
|
export { default as Recommended } from './Recommended';
|
package/icons/index.js
CHANGED
|
@@ -46,7 +46,6 @@ export { default as PmTaskIcon } from './PmTaskIcon';
|
|
|
46
46
|
export { default as Polygon } from './Polygon';
|
|
47
47
|
export { default as PotentialMatch } from './PotentialMatch';
|
|
48
48
|
export { default as Profile } from './Profile';
|
|
49
|
-
export { default as Radius } from './Radius';
|
|
50
49
|
export { default as ReadOnlyError } from './ReadOnlyError';
|
|
51
50
|
export { default as Reassign } from './Reassign';
|
|
52
51
|
export { default as Recommended } from './Recommended';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2258",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
12
12
|
"@googlemaps/markerclusterer": "^2.5.3",
|
|
13
13
|
"@react-sigma/core": "3.4.0",
|
|
14
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
14
|
+
"@reltio/mdm-sdk": "^1.4.2039",
|
|
15
15
|
"@vis.gl/react-google-maps": "^1.3.0",
|
|
16
16
|
"d3-cloud": "^1.2.5",
|
|
17
17
|
"d3-geo": "^2.0.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DrawingManager } from './DrawingManager';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DrawingManager } from './DrawingManager';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export type DrawingManagerProps = {
|
|
2
|
-
drawingMode: google.maps.drawing.OverlayType;
|
|
3
|
-
onPolygonComplete?: (polygon: google.maps.Polygon) => void;
|
|
4
|
-
onCircleComplete?: (circle: google.maps.Circle) => void;
|
|
5
|
-
options: google.maps.drawing.DrawingManagerOptions;
|
|
6
|
-
};
|
|
7
|
-
export declare const useDrawingManager: ({ drawingMode, onPolygonComplete, onCircleComplete, options }: DrawingManagerProps) => google.maps.drawing.DrawingManager;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { useMap, useMapsLibrary } from '@vis.gl/react-google-maps';
|
|
13
|
-
import { useEffect, useState } from 'react';
|
|
14
|
-
export var useDrawingManager = function (_a) {
|
|
15
|
-
var drawingMode = _a.drawingMode, onPolygonComplete = _a.onPolygonComplete, onCircleComplete = _a.onCircleComplete, options = _a.options;
|
|
16
|
-
var map = useMap();
|
|
17
|
-
var drawing = useMapsLibrary('drawing');
|
|
18
|
-
var _b = useState(null), drawingManager = _b[0], setDrawingManager = _b[1];
|
|
19
|
-
useEffect(function () {
|
|
20
|
-
if (!map || !drawing)
|
|
21
|
-
return;
|
|
22
|
-
var newDrawingManager = new drawing.DrawingManager(__assign({ map: map, drawingMode: drawingMode }, options));
|
|
23
|
-
if (onPolygonComplete) {
|
|
24
|
-
newDrawingManager.addListener('polygoncomplete', onPolygonComplete);
|
|
25
|
-
}
|
|
26
|
-
if (onCircleComplete) {
|
|
27
|
-
newDrawingManager.addListener('circlecomplete', onCircleComplete);
|
|
28
|
-
}
|
|
29
|
-
setDrawingManager(newDrawingManager);
|
|
30
|
-
return function () {
|
|
31
|
-
google.maps.event.clearInstanceListeners(newDrawingManager);
|
|
32
|
-
newDrawingManager.setMap(null);
|
|
33
|
-
};
|
|
34
|
-
}, [drawing, map, options, drawingMode, onPolygonComplete, onCircleComplete]);
|
|
35
|
-
return drawingManager;
|
|
36
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function setupGoogleMock(): void;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
export var setupGoogleMock = function () {
|
|
2
|
-
var google = {
|
|
3
|
-
maps: {
|
|
4
|
-
Animation: {},
|
|
5
|
-
BicyclingLayer: function () { },
|
|
6
|
-
Circle: function () { },
|
|
7
|
-
ControlPosition: {
|
|
8
|
-
TOP_RIGHT: 3,
|
|
9
|
-
TOP_CENTER: 2
|
|
10
|
-
},
|
|
11
|
-
Data: function () { },
|
|
12
|
-
DirectionsRenderer: function () { },
|
|
13
|
-
DirectionsService: function () { },
|
|
14
|
-
DirectionsStatus: {},
|
|
15
|
-
DirectionsTravelMode: {},
|
|
16
|
-
DirectionsUnitSystem: {},
|
|
17
|
-
DistanceMatrixElementStatus: {},
|
|
18
|
-
DistanceMatrixService: function () { },
|
|
19
|
-
DistanceMatrixStatus: {},
|
|
20
|
-
ElevationService: function () { },
|
|
21
|
-
ElevationStatus: {},
|
|
22
|
-
FusionTablesLayer: function () { },
|
|
23
|
-
Geocoder: function () { },
|
|
24
|
-
GeocoderLocationType: {},
|
|
25
|
-
GeocoderStatus: {},
|
|
26
|
-
GroundOverlay: function () { },
|
|
27
|
-
ImageMapType: function () { },
|
|
28
|
-
InfoWindow: function () { },
|
|
29
|
-
KmlLayer: function () { },
|
|
30
|
-
KmlLayerStatus: {},
|
|
31
|
-
LatLng: function () { },
|
|
32
|
-
LatLngBounds: function () {
|
|
33
|
-
return {
|
|
34
|
-
extend: function () { }
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
MVCArray: function () { },
|
|
38
|
-
MVCObject: function () { },
|
|
39
|
-
Map: function () {
|
|
40
|
-
return {
|
|
41
|
-
setTilt: function () { },
|
|
42
|
-
mapTypes: {
|
|
43
|
-
set: function () { }
|
|
44
|
-
},
|
|
45
|
-
overlayMapTypes: {
|
|
46
|
-
insertAt: function () { },
|
|
47
|
-
removeAt: function () { }
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
},
|
|
51
|
-
MapTypeControlStyle: {},
|
|
52
|
-
MapTypeId: {
|
|
53
|
-
HYBRID: '',
|
|
54
|
-
ROADMAP: '',
|
|
55
|
-
SATELLITE: '',
|
|
56
|
-
TERRAIN: ''
|
|
57
|
-
},
|
|
58
|
-
MapTypeRegistry: function () { },
|
|
59
|
-
Marker: function () { },
|
|
60
|
-
MarkerImage: function () { },
|
|
61
|
-
MaxZoomService: function () {
|
|
62
|
-
return {
|
|
63
|
-
getMaxZoomAtLatLng: function () { }
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
MaxZoomStatus: {},
|
|
67
|
-
NavigationControlStyle: {},
|
|
68
|
-
OverlayView: function () { },
|
|
69
|
-
Point: function () { },
|
|
70
|
-
Polygon: function () { },
|
|
71
|
-
Polyline: function () { },
|
|
72
|
-
Rectangle: function () { },
|
|
73
|
-
SaveWidget: function () { },
|
|
74
|
-
ScaleControlStyle: {},
|
|
75
|
-
Size: function () { },
|
|
76
|
-
StreetViewCoverageLayer: function () { },
|
|
77
|
-
StreetViewPanorama: function () { },
|
|
78
|
-
StreetViewService: function () { },
|
|
79
|
-
StreetViewStatus: {},
|
|
80
|
-
StrokePosition: {},
|
|
81
|
-
StyledMapType: function () { },
|
|
82
|
-
SymbolPath: {},
|
|
83
|
-
TrafficLayer: function () { },
|
|
84
|
-
TransitLayer: function () { },
|
|
85
|
-
TransitMode: {},
|
|
86
|
-
TransitRoutePreference: {},
|
|
87
|
-
TravelMode: {},
|
|
88
|
-
UnitSystem: {},
|
|
89
|
-
ZoomControlStyle: {},
|
|
90
|
-
event: {
|
|
91
|
-
addListener: function () { }
|
|
92
|
-
},
|
|
93
|
-
drawing: {
|
|
94
|
-
OverlayType: {
|
|
95
|
-
CIRCLE: 1,
|
|
96
|
-
POLYGON: 2
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
places: {
|
|
100
|
-
AutocompleteService: function () {
|
|
101
|
-
return {
|
|
102
|
-
getPlacePredictions: function () { }
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
global.window.google = google;
|
|
109
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DrawingManager = void 0;
|
|
4
|
-
var useDrawingManager_1 = require("./useDrawingManager");
|
|
5
|
-
var DrawingManager = function (props) {
|
|
6
|
-
(0, useDrawingManager_1.useDrawingManager)(props);
|
|
7
|
-
return null;
|
|
8
|
-
};
|
|
9
|
-
exports.DrawingManager = DrawingManager;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DrawingManager } from './DrawingManager';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DrawingManager = void 0;
|
|
4
|
-
var DrawingManager_1 = require("./DrawingManager");
|
|
5
|
-
Object.defineProperty(exports, "DrawingManager", { enumerable: true, get: function () { return DrawingManager_1.DrawingManager; } });
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export type DrawingManagerProps = {
|
|
2
|
-
drawingMode: google.maps.drawing.OverlayType;
|
|
3
|
-
onPolygonComplete?: (polygon: google.maps.Polygon) => void;
|
|
4
|
-
onCircleComplete?: (circle: google.maps.Circle) => void;
|
|
5
|
-
options: google.maps.drawing.DrawingManagerOptions;
|
|
6
|
-
};
|
|
7
|
-
export declare const useDrawingManager: ({ drawingMode, onPolygonComplete, onCircleComplete, options }: DrawingManagerProps) => google.maps.drawing.DrawingManager;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.useDrawingManager = void 0;
|
|
15
|
-
var react_google_maps_1 = require("@vis.gl/react-google-maps");
|
|
16
|
-
var react_1 = require("react");
|
|
17
|
-
var useDrawingManager = function (_a) {
|
|
18
|
-
var drawingMode = _a.drawingMode, onPolygonComplete = _a.onPolygonComplete, onCircleComplete = _a.onCircleComplete, options = _a.options;
|
|
19
|
-
var map = (0, react_google_maps_1.useMap)();
|
|
20
|
-
var drawing = (0, react_google_maps_1.useMapsLibrary)('drawing');
|
|
21
|
-
var _b = (0, react_1.useState)(null), drawingManager = _b[0], setDrawingManager = _b[1];
|
|
22
|
-
(0, react_1.useEffect)(function () {
|
|
23
|
-
if (!map || !drawing)
|
|
24
|
-
return;
|
|
25
|
-
var newDrawingManager = new drawing.DrawingManager(__assign({ map: map, drawingMode: drawingMode }, options));
|
|
26
|
-
if (onPolygonComplete) {
|
|
27
|
-
newDrawingManager.addListener('polygoncomplete', onPolygonComplete);
|
|
28
|
-
}
|
|
29
|
-
if (onCircleComplete) {
|
|
30
|
-
newDrawingManager.addListener('circlecomplete', onCircleComplete);
|
|
31
|
-
}
|
|
32
|
-
setDrawingManager(newDrawingManager);
|
|
33
|
-
return function () {
|
|
34
|
-
google.maps.event.clearInstanceListeners(newDrawingManager);
|
|
35
|
-
newDrawingManager.setMap(null);
|
|
36
|
-
};
|
|
37
|
-
}, [drawing, map, options, drawingMode, onPolygonComplete, onCircleComplete]);
|
|
38
|
-
return drawingManager;
|
|
39
|
-
};
|
|
40
|
-
exports.useDrawingManager = useDrawingManager;
|