@opengeoweb/webmap-react 12.2.0 → 12.4.1

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/index.esm.js CHANGED
@@ -27,7 +27,7 @@ import VectorSource from 'ol/source/Vector';
27
27
  import GeoJSON from 'ol/format/GeoJSON';
28
28
  import 'i18next';
29
29
  import { useTranslation } from 'react-i18next';
30
- import { Paper, Box, Typography, Grid2, TextField, FormControl, InputLabel, Select, MenuItem, Icon as Icon$1, FormLabel, Switch, styled, Slider, useTheme } from '@mui/material';
30
+ import { Paper, Box, Typography, Grid, TextField, FormControl, InputLabel, Select, MenuItem, Icon as Icon$1, FormLabel, Switch, styled, Slider, useTheme } from '@mui/material';
31
31
  import { Home, Add, Minus, List, Delete, Edit, DrawRegion, DrawPolygon, Location, DrawFIRLand, ArrowUp, Equalizer, DimensionsElevation, Link, LinkOff, Info, DimensionsOther, DimensionsRefTime, DimensionsTime, locationPath } from '@opengeoweb/theme';
32
32
  import * as turf from '@turf/turf';
33
33
  import { polygonToLine, booleanClockwise, rewind } from '@turf/turf';
@@ -2086,7 +2086,8 @@ var WMSLayer = function WMSLayer(_ref) {
2086
2086
  LAYERS: layerName,
2087
2087
  STYLES: styleName
2088
2088
  }
2089
- })
2089
+ }),
2090
+ projection: projection
2090
2091
  })
2091
2092
  });
2092
2093
  map.addLayer(layer);
@@ -3611,7 +3612,7 @@ var MapControls = function MapControls(_ref) {
3611
3612
  userSelect: 'none'
3612
3613
  }
3613
3614
  }, props), {}, {
3614
- children: jsx(Grid2, {
3615
+ children: jsx(Grid, {
3615
3616
  sx: {
3616
3617
  '& > button': {
3617
3618
  marginBottom: 1
@@ -6081,7 +6082,7 @@ var GeoJSONTextField = function GeoJSONTextField(_ref) {
6081
6082
  setValidity(false);
6082
6083
  }
6083
6084
  };
6084
- return jsx(Grid2, {
6085
+ return jsx(Grid, {
6085
6086
  size: {
6086
6087
  xs: 12
6087
6088
  },
@@ -6123,7 +6124,7 @@ var FeatureLayers = function FeatureLayers(_ref) {
6123
6124
  label: "".concat(index + 1, ": ").concat(geojson.features[index].geometry.type)
6124
6125
  };
6125
6126
  }) : [];
6126
- return jsx(Grid2, {
6127
+ return jsx(Grid, {
6127
6128
  size: {
6128
6129
  sm: 12
6129
6130
  },
@@ -6168,7 +6169,7 @@ var EditModeButton = function EditModeButton(_ref) {
6168
6169
  var isInEditMode = _ref.isInEditMode,
6169
6170
  drawMode = _ref.drawMode,
6170
6171
  onToggleEditMode = _ref.onToggleEditMode;
6171
- return jsx(Grid2, {
6172
+ return jsx(Grid, {
6172
6173
  size: {
6173
6174
  xs: 12
6174
6175
  },
@@ -6716,7 +6717,7 @@ var StoryLayoutGrid = function StoryLayoutGrid(_ref) {
6716
6717
  height: '100%',
6717
6718
  padding: 2
6718
6719
  },
6719
- children: jsx(Grid2, {
6720
+ children: jsx(Grid, {
6720
6721
  spacing: 2,
6721
6722
  container: true,
6722
6723
  children: children
@@ -6780,7 +6781,7 @@ var IntersectionSelect = function IntersectionSelect(_ref) {
6780
6781
  _React$useState2 = _slicedToArray(_React$useState, 2),
6781
6782
  activeIntersection = _React$useState2[0],
6782
6783
  setActiveIntersection = _React$useState2[1];
6783
- return jsx(Grid2, {
6784
+ return jsx(Grid, {
6784
6785
  size: {
6785
6786
  sm: 12
6786
6787
  },
@@ -10474,6 +10475,7 @@ var MapWarningProperties = function MapWarningProperties(_ref) {
10474
10475
  display: 'flex',
10475
10476
  justifyContent: 'center',
10476
10477
  left: '50px',
10478
+ top: '70px',
10477
10479
  zIndex: 10
10478
10480
  },
10479
10481
  children: jsxs("div", {
@@ -10622,7 +10624,7 @@ var DimensionSelectDialog = function DimensionSelectDialog(_ref) {
10622
10624
  style: {
10623
10625
  padding: 4
10624
10626
  },
10625
- children: jsx(Grid2, {
10627
+ children: jsx(Grid, {
10626
10628
  container: true,
10627
10629
  direction: "row",
10628
10630
  children: children
@@ -10767,7 +10769,7 @@ var MapDimensionSelect = function MapDimensionSelect(_ref2) {
10767
10769
  var marks = marksByDimension(t, wmsDimension);
10768
10770
  var isLayerDimensionSynced = layerDimension.synced !== undefined && layerDimension.synced === true;
10769
10771
  var tooltipTitle = isLayerDimensionSynced ? t('webmap-react-click-disconnect') : t('webmap-react-click-connect');
10770
- return jsxs(Grid2, {
10772
+ return jsxs(Grid, {
10771
10773
  size: {
10772
10774
  xs: 'auto'
10773
10775
  },
@@ -10853,15 +10855,15 @@ var LayerInfoList = function LayerInfoList(_ref) {
10853
10855
  variant: "body2",
10854
10856
  sx: textStyleWithMargin,
10855
10857
  children: "-"
10856
- }) : jsx(Grid2, {
10858
+ }) : jsx(Grid, {
10857
10859
  container: true,
10858
10860
  direction: "column",
10859
10861
  children: list.map(function (item) {
10860
10862
  return jsxs("div", {
10861
- children: [jsxs(Grid2, {
10863
+ children: [jsxs(Grid, {
10862
10864
  container: true,
10863
10865
  direction: "row",
10864
- children: [item.icon, jsx(Grid2, {
10866
+ children: [item.icon, jsx(Grid, {
10865
10867
  sx: {
10866
10868
  marginLeft: '10px'
10867
10869
  },
@@ -10871,7 +10873,7 @@ var LayerInfoList = function LayerInfoList(_ref) {
10871
10873
  children: [item.label, ":"]
10872
10874
  })
10873
10875
  })]
10874
- }), jsx(Grid2, {
10876
+ }), jsx(Grid, {
10875
10877
  container: true,
10876
10878
  direction: "row",
10877
10879
  sx: {
@@ -11226,7 +11228,8 @@ var OpenLayersMapView = function OpenLayersMapView(_ref) {
11226
11228
  _ref$passiveMap = _ref.passiveMap,
11227
11229
  passiveMap = _ref$passiveMap === void 0 ? false : _ref$passiveMap,
11228
11230
  _ref$holdShiftToScrol = _ref.holdShiftToScroll,
11229
- holdShiftToScroll = _ref$holdShiftToScrol === void 0 ? false : _ref$holdShiftToScrol;
11231
+ holdShiftToScroll = _ref$holdShiftToScrol === void 0 ? false : _ref$holdShiftToScrol,
11232
+ mapId = _ref.mapId;
11230
11233
  var mapRef = useRef(null);
11231
11234
  var _useState = useState(null),
11232
11235
  _useState2 = _slicedToArray(_useState, 2),
@@ -11238,7 +11241,7 @@ var OpenLayersMapView = function OpenLayersMapView(_ref) {
11238
11241
  zoom: 1,
11239
11242
  center: [0, 0]
11240
11243
  }));
11241
- var mapView = view || viewRef.current;
11244
+ var mapView = view && view.getCenter() ? view : viewRef.current;
11242
11245
  useEffect(function () {
11243
11246
  if (!mapRef.current) {
11244
11247
  return function () {};
@@ -11317,6 +11320,7 @@ var OpenLayersMapView = function OpenLayersMapView(_ref) {
11317
11320
  return jsx(MapContext.Provider, {
11318
11321
  value: memoizedMapContext,
11319
11322
  children: jsxs("div", {
11323
+ id: "mapcontainer_".concat(mapId),
11320
11324
  ref: mapRef,
11321
11325
  "data-testid": "openlayers-mapview",
11322
11326
  role: "application",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap-react",
3
- "version": "12.2.0",
3
+ "version": "12.4.1",
4
4
  "description": "GeoWeb react wrapper for webmap",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,18 +8,18 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/webmap": "12.2.0",
11
+ "@opengeoweb/webmap": "12.4.1",
12
12
  "axios": "^1.7.7",
13
- "@opengeoweb/theme": "12.2.0",
14
- "@opengeoweb/shared": "12.2.0",
13
+ "@opengeoweb/theme": "12.4.1",
14
+ "@opengeoweb/shared": "12.4.1",
15
15
  "lodash": "^4.17.21",
16
16
  "ol": "^10.4.0",
17
17
  "proj4": "^2.9.2",
18
18
  "@turf/turf": "^7.1.0",
19
19
  "immer": "^10.0.3",
20
20
  "react-resize-detector": "^9.1.0",
21
- "i18next": "^23.11.5",
22
- "@mui/material": "^6.1.1",
21
+ "i18next": "^25.0.1",
22
+ "@mui/material": "^7.0.1",
23
23
  "react-i18next": "^15.1.1",
24
24
  "@tanstack/react-query": "^5.69.2"
25
25
  },
@@ -8,5 +8,6 @@ export interface OpenLayersMapViewProps {
8
8
  isMouseWheelZoomEnabled?: boolean;
9
9
  passiveMap?: boolean;
10
10
  holdShiftToScroll?: boolean;
11
+ mapId?: string;
11
12
  }
12
13
  export declare const OpenLayersMapView: React.FC<OpenLayersMapViewProps>;