@micromag/element-map 0.4.38 → 0.4.40

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 (2) hide show
  1. package/es/index.js +12 -12
  2. package/package.json +3 -3
package/es/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import _typeof from '@babel/runtime/helpers/typeof';
2
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
2
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
4
3
  import classNames from 'classnames';
5
4
  import React, { useState, useRef, useEffect, useCallback, useMemo } from 'react';
6
5
  import { useGoogleMapsClient } from '@micromag/core/contexts';
6
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
7
7
  import { useDimensionObserver } from '@micromag/core/hooks';
8
8
  import isObject from 'lodash/isObject';
9
9
 
@@ -391,7 +391,7 @@ function Map$1(_ref) {
391
391
  map = _useGoogleMap.map,
392
392
  mapRef = _useGoogleMap.ref;
393
393
  return /*#__PURE__*/React.createElement("div", Object.assign({
394
- className: classNames([styles$1.container, _defineProperty(_defineProperty({}, className, className !== null), styles$1.preventScroll, !draggable)])
394
+ className: classNames([styles$1.container, className, _defineProperty({}, styles$1.preventScroll, !draggable)])
395
395
  }, stopDragEventsPropagation), /*#__PURE__*/React.createElement("div", {
396
396
  ref: mapRef,
397
397
  className: styles$1.map,
@@ -602,7 +602,7 @@ function Map(_ref) {
602
602
  };
603
603
  }, [onClick, onCenterChanged, onBoundsChanged, onDrag, onDragEnd, onTilesLoaded]);
604
604
  return /*#__PURE__*/React.createElement("div", {
605
- className: classNames([styles.container, _defineProperty({}, className, className !== null)])
605
+ className: classNames([styles.container, className])
606
606
  }, /*#__PURE__*/React.createElement(Map$1, {
607
607
  center: center,
608
608
  zoom: zoom,
@@ -618,15 +618,15 @@ function Map(_ref) {
618
618
  rotateControl: rotateControl,
619
619
  fullscreenControl: fullscreenControl,
620
620
  focusable: focusable
621
- }, markers !== null ? markers.map(function (_ref5, index) {
622
- var _ref5$active = _ref5.active,
623
- active = _ref5$active === void 0 ? true : _ref5$active,
624
- _ref5$geoPosition = _ref5.geoPosition,
625
- geoPosition = _ref5$geoPosition === void 0 ? null : _ref5$geoPosition,
626
- _ref5$image = _ref5.image,
627
- image = _ref5$image === void 0 ? null : _ref5$image,
628
- _ref5$title = _ref5.title,
629
- title = _ref5$title === void 0 ? null : _ref5$title;
621
+ }, markers !== null ? markers.map(function (_ref4, index) {
622
+ var _ref4$active = _ref4.active,
623
+ active = _ref4$active === void 0 ? true : _ref4$active,
624
+ _ref4$geoPosition = _ref4.geoPosition,
625
+ geoPosition = _ref4$geoPosition === void 0 ? null : _ref4$geoPosition,
626
+ _ref4$image = _ref4.image,
627
+ image = _ref4$image === void 0 ? null : _ref4$image,
628
+ _ref4$title = _ref4.title,
629
+ title = _ref4$title === void 0 ? null : _ref4$title;
630
630
  return geoPosition !== null && (geoPosition.lat || null) !== null && (geoPosition.lng || null) !== null ? /*#__PURE__*/React.createElement(Marker, {
631
631
  key: "marker-".concat(index),
632
632
  active: active,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-map",
3
- "version": "0.4.38",
3
+ "version": "0.4.40",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@babel/runtime": "^7.28.6",
63
- "@micromag/core": "^0.4.38",
63
+ "@micromag/core": "^0.4.40",
64
64
  "classnames": "^2.2.6",
65
65
  "lodash": "^4.17.23",
66
66
  "react-intl": "^8.1.3 || ^10.0.0",
@@ -70,6 +70,6 @@
70
70
  "access": "public",
71
71
  "registry": "https://registry.npmjs.org/"
72
72
  },
73
- "gitHead": "e984a8b97d5c87914dd4844ff29628a5690edd6f",
73
+ "gitHead": "6a9ff6e196a972abfd617f49353862cf445b0e83",
74
74
  "types": "es/index.d.ts"
75
75
  }