@micromag/screen-map 0.3.76 → 0.3.77

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 (3) hide show
  1. package/es/index.js +12 -12
  2. package/lib/index.js +12 -12
  3. 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
- onEnableInteraction: PropTypes.func,
49
- onDisableInteraction: PropTypes.func,
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
- onEnableInteraction: null,
70
- onDisableInteraction: null,
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
- onEnableInteraction = _ref.onEnableInteraction,
94
- onDisableInteraction = _ref.onDisableInteraction,
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 (onDisableInteraction !== null) {
186
- onDisableInteraction();
185
+ if (disableInteraction !== null) {
186
+ disableInteraction();
187
187
  }
188
188
 
189
189
  trackScreenEvent('click_button', button.body);
190
- }, [setOpened, onDisableInteraction, trackScreenEvent, button]);
190
+ }, [setOpened, disableInteraction, trackScreenEvent, button]);
191
191
  var onCloseClick = useCallback(function () {
192
192
  setOpened(false);
193
193
 
194
- if (onEnableInteraction !== null) {
195
- onEnableInteraction();
194
+ if (enableInteractions !== null) {
195
+ enableInteractions();
196
196
  }
197
197
 
198
198
  trackScreenEvent('click_close', 'Close icon');
199
199
  closeMarker();
200
- }, [setOpened, onEnableInteraction, trackScreenEvent]);
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
- onEnableInteraction: PropTypes__default["default"].func,
71
- onDisableInteraction: PropTypes__default["default"].func,
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
- onEnableInteraction: null,
92
- onDisableInteraction: null,
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
- onEnableInteraction = _ref.onEnableInteraction,
116
- onDisableInteraction = _ref.onDisableInteraction,
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 (onDisableInteraction !== null) {
208
- onDisableInteraction();
207
+ if (disableInteraction !== null) {
208
+ disableInteraction();
209
209
  }
210
210
 
211
211
  trackScreenEvent('click_button', button.body);
212
- }, [setOpened, onDisableInteraction, trackScreenEvent, button]);
212
+ }, [setOpened, disableInteraction, trackScreenEvent, button]);
213
213
  var onCloseClick = React.useCallback(function () {
214
214
  setOpened(false);
215
215
 
216
- if (onEnableInteraction !== null) {
217
- onEnableInteraction();
216
+ if (enableInteractions !== null) {
217
+ enableInteractions();
218
218
  }
219
219
 
220
220
  trackScreenEvent('click_close', 'Close icon');
221
221
  closeMarker();
222
- }, [setOpened, onEnableInteraction, trackScreenEvent]);
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.76",
3
+ "version": "0.3.77",
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.74",
53
- "@micromag/element-background": "^0.3.74",
54
- "@micromag/element-button": "^0.3.76",
55
- "@micromag/element-call-to-action": "^0.3.76",
56
- "@micromag/element-container": "^0.3.74",
57
- "@micromag/element-heading": "^0.3.74",
58
- "@micromag/element-image": "^0.3.74",
59
- "@micromag/element-map": "^0.3.74",
60
- "@micromag/element-scroll": "^0.3.74",
61
- "@micromag/element-text": "^0.3.74",
62
- "@micromag/transforms": "^0.3.74",
52
+ "@micromag/core": "^0.3.77",
53
+ "@micromag/element-background": "^0.3.77",
54
+ "@micromag/element-button": "^0.3.77",
55
+ "@micromag/element-call-to-action": "^0.3.77",
56
+ "@micromag/element-container": "^0.3.77",
57
+ "@micromag/element-heading": "^0.3.77",
58
+ "@micromag/element-image": "^0.3.77",
59
+ "@micromag/element-map": "^0.3.77",
60
+ "@micromag/element-scroll": "^0.3.77",
61
+ "@micromag/element-text": "^0.3.77",
62
+ "@micromag/transforms": "^0.3.77",
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": "c86e3ead134f626899cfdfc34fac84eb1d02864a"
72
+ "gitHead": "12effe09a1b53e8ff487695a17d1d4fff412482e"
73
73
  }