@micromag/screen-map 0.3.76 → 0.3.79
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/es/index.js +12 -12
- package/lib/index.js +12 -12
- package/package.json +13 -13
package/es/index.js
CHANGED
|
@@ -45,8 +45,8 @@ var propTypes = {
|
|
|
45
45
|
current: PropTypes.bool,
|
|
46
46
|
active: PropTypes.bool,
|
|
47
47
|
transitions: PropTypes$1.transitions,
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
enableInteractions: PropTypes.func,
|
|
49
|
+
disableInteraction: PropTypes.func,
|
|
50
50
|
type: PropTypes.string,
|
|
51
51
|
className: PropTypes.string
|
|
52
52
|
};
|
|
@@ -66,8 +66,8 @@ var defaultProps = {
|
|
|
66
66
|
current: true,
|
|
67
67
|
active: true,
|
|
68
68
|
transitions: null,
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
enableInteractions: null,
|
|
70
|
+
disableInteraction: null,
|
|
71
71
|
type: null,
|
|
72
72
|
className: null
|
|
73
73
|
};
|
|
@@ -90,8 +90,8 @@ function MapScreen(_ref) {
|
|
|
90
90
|
current = _ref.current,
|
|
91
91
|
active = _ref.active,
|
|
92
92
|
transitions = _ref.transitions,
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
enableInteractions = _ref.enableInteractions,
|
|
94
|
+
disableInteraction = _ref.disableInteraction,
|
|
95
95
|
type = _ref.type,
|
|
96
96
|
className = _ref.className;
|
|
97
97
|
|
|
@@ -182,22 +182,22 @@ function MapScreen(_ref) {
|
|
|
182
182
|
var onButtonClick = useCallback(function () {
|
|
183
183
|
setOpened(true);
|
|
184
184
|
|
|
185
|
-
if (
|
|
186
|
-
|
|
185
|
+
if (disableInteraction !== null) {
|
|
186
|
+
disableInteraction();
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
trackScreenEvent('click_button', button.body);
|
|
190
|
-
}, [setOpened,
|
|
190
|
+
}, [setOpened, disableInteraction, trackScreenEvent, button]);
|
|
191
191
|
var onCloseClick = useCallback(function () {
|
|
192
192
|
setOpened(false);
|
|
193
193
|
|
|
194
|
-
if (
|
|
195
|
-
|
|
194
|
+
if (enableInteractions !== null) {
|
|
195
|
+
enableInteractions();
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
trackScreenEvent('click_close', 'Close icon');
|
|
199
199
|
closeMarker();
|
|
200
|
-
}, [setOpened,
|
|
200
|
+
}, [setOpened, enableInteractions, trackScreenEvent]);
|
|
201
201
|
var onMapDragEnd = useCallback(function (newCenter) {
|
|
202
202
|
var coords = newCenter.toJSON();
|
|
203
203
|
trackScreenEvent('drag_map', "Latitude: ".concat(coords.lat.toFixed(4), ", Longitude: ").concat(coords.lng.toFixed(4)), {
|
package/lib/index.js
CHANGED
|
@@ -67,8 +67,8 @@ var propTypes = {
|
|
|
67
67
|
current: PropTypes__default["default"].bool,
|
|
68
68
|
active: PropTypes__default["default"].bool,
|
|
69
69
|
transitions: core.PropTypes.transitions,
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
enableInteractions: PropTypes__default["default"].func,
|
|
71
|
+
disableInteraction: PropTypes__default["default"].func,
|
|
72
72
|
type: PropTypes__default["default"].string,
|
|
73
73
|
className: PropTypes__default["default"].string
|
|
74
74
|
};
|
|
@@ -88,8 +88,8 @@ var defaultProps = {
|
|
|
88
88
|
current: true,
|
|
89
89
|
active: true,
|
|
90
90
|
transitions: null,
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
enableInteractions: null,
|
|
92
|
+
disableInteraction: null,
|
|
93
93
|
type: null,
|
|
94
94
|
className: null
|
|
95
95
|
};
|
|
@@ -112,8 +112,8 @@ function MapScreen(_ref) {
|
|
|
112
112
|
current = _ref.current,
|
|
113
113
|
active = _ref.active,
|
|
114
114
|
transitions = _ref.transitions,
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
enableInteractions = _ref.enableInteractions,
|
|
116
|
+
disableInteraction = _ref.disableInteraction,
|
|
117
117
|
type = _ref.type,
|
|
118
118
|
className = _ref.className;
|
|
119
119
|
|
|
@@ -204,22 +204,22 @@ function MapScreen(_ref) {
|
|
|
204
204
|
var onButtonClick = React.useCallback(function () {
|
|
205
205
|
setOpened(true);
|
|
206
206
|
|
|
207
|
-
if (
|
|
208
|
-
|
|
207
|
+
if (disableInteraction !== null) {
|
|
208
|
+
disableInteraction();
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
trackScreenEvent('click_button', button.body);
|
|
212
|
-
}, [setOpened,
|
|
212
|
+
}, [setOpened, disableInteraction, trackScreenEvent, button]);
|
|
213
213
|
var onCloseClick = React.useCallback(function () {
|
|
214
214
|
setOpened(false);
|
|
215
215
|
|
|
216
|
-
if (
|
|
217
|
-
|
|
216
|
+
if (enableInteractions !== null) {
|
|
217
|
+
enableInteractions();
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
trackScreenEvent('click_close', 'Close icon');
|
|
221
221
|
closeMarker();
|
|
222
|
-
}, [setOpened,
|
|
222
|
+
}, [setOpened, enableInteractions, trackScreenEvent]);
|
|
223
223
|
var onMapDragEnd = React.useCallback(function (newCenter) {
|
|
224
224
|
var coords = newCenter.toJSON();
|
|
225
225
|
trackScreenEvent('drag_map', "Latitude: ".concat(coords.lat.toFixed(4), ", Longitude: ").concat(coords.lng.toFixed(4)), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-map",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.79",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,17 +49,17 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
|
-
"@micromag/core": "^0.3.
|
|
53
|
-
"@micromag/element-background": "^0.3.
|
|
54
|
-
"@micromag/element-button": "^0.3.
|
|
55
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
56
|
-
"@micromag/element-container": "^0.3.
|
|
57
|
-
"@micromag/element-heading": "^0.3.
|
|
58
|
-
"@micromag/element-image": "^0.3.
|
|
59
|
-
"@micromag/element-map": "^0.3.
|
|
60
|
-
"@micromag/element-scroll": "^0.3.
|
|
61
|
-
"@micromag/element-text": "^0.3.
|
|
62
|
-
"@micromag/transforms": "^0.3.
|
|
52
|
+
"@micromag/core": "^0.3.78",
|
|
53
|
+
"@micromag/element-background": "^0.3.78",
|
|
54
|
+
"@micromag/element-button": "^0.3.79",
|
|
55
|
+
"@micromag/element-call-to-action": "^0.3.79",
|
|
56
|
+
"@micromag/element-container": "^0.3.78",
|
|
57
|
+
"@micromag/element-heading": "^0.3.78",
|
|
58
|
+
"@micromag/element-image": "^0.3.78",
|
|
59
|
+
"@micromag/element-map": "^0.3.78",
|
|
60
|
+
"@micromag/element-scroll": "^0.3.78",
|
|
61
|
+
"@micromag/element-text": "^0.3.78",
|
|
62
|
+
"@micromag/transforms": "^0.3.78",
|
|
63
63
|
"classnames": "^2.2.6",
|
|
64
64
|
"lodash": "^4.17.21",
|
|
65
65
|
"prop-types": "^15.7.2",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "b25bd1907137fd148b912a5a48c1bc9d2bd0dadd"
|
|
73
73
|
}
|