@mapcomponents/react-maplibre 1.1.0-1 → 1.2.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Change Log
2
2
 
3
+ ## [v1.1.0] - 2025-03-21
4
+
5
+ ### Added
6
+ - add dependabot
7
+
8
+ ### Changed
9
+ - update @dnd-kit and actions/setup-node@v2
10
+ - update actions/cache@v2 -> v3
11
+ - update dependencies
12
+ - update publish workflow node version
13
+ - change Design/ml measure tool
14
+
15
+ ### Fixed
16
+ - fix MlNavigation Zoom
17
+
3
18
  ## [v1.0.11] - 2025-02-14
4
19
 
5
20
  ### Fixed
package/dist/index.cjs.js CHANGED
@@ -20,10 +20,12 @@ var Box = require('@mui/material/Box');
20
20
  var Grid = require('@mui/material/Grid');
21
21
  var PolylineIcon = require('@mui/icons-material/Polyline');
22
22
  var PentagonIcon = require('@mui/icons-material/Pentagon');
23
- var iconsMaterial = require('@mui/icons-material');
23
+ var DeleteIcon = require('@mui/icons-material/Delete');
24
+ var TuneIcon = require('@mui/icons-material/Tune');
24
25
  var system = require('@mui/system');
26
+ var ExpandLessIcon = require('@mui/icons-material/ExpandLess');
27
+ var ExpandMoreIcon = require('@mui/icons-material/ExpandMore');
25
28
  var reactColor = require('react-color');
26
- var TuneIcon = require('@mui/icons-material/Tune');
27
29
  var Dialog = require('@mui/material/Dialog');
28
30
  var DialogActions = require('@mui/material/DialogActions');
29
31
  var DialogContent = require('@mui/material/DialogContent');
@@ -34,8 +36,6 @@ var utilities = require('@dnd-kit/utilities');
34
36
  var CloseIcon = require('@mui/icons-material/Close');
35
37
  var useMediaQuery = require('@mui/material/useMediaQuery');
36
38
  var react = require('@emotion/react');
37
- var _ = require('@mui/material/');
38
- var DeleteIcon = require('@mui/icons-material/Delete');
39
39
  var ButtonGroup = require('@mui/material/ButtonGroup');
40
40
  var ControlPointIcon = require('@mui/icons-material/ControlPoint');
41
41
  var RemoveCircleOutlineIcon = require('@mui/icons-material/RemoveCircleOutline');
@@ -43,7 +43,6 @@ var Divider = require('@mui/material/Divider');
43
43
  var syncMove = require('@mapbox/mapbox-gl-sync-move');
44
44
  var Paper = require('@mui/material/Paper');
45
45
  var xmldom = require('@xmldom/xmldom');
46
- var PropTypes = require('prop-types');
47
46
  var helpers = require('@turf/helpers');
48
47
  var WMSCapabilities = require('wms-capabilities');
49
48
  var InfoIcon = require('@mui/icons-material/Info');
@@ -64,6 +63,9 @@ var osm2geojson = require('osm2geojson-lite');
64
63
  var topojsonClient = require('topojson-client');
65
64
  var externParser = require('@tmcw/togeojson');
66
65
  var d3 = require('d3');
66
+ var ArrowCircleDownIcon = require('@mui/icons-material/ArrowCircleDown');
67
+ var ArrowCircleUpIcon = require('@mui/icons-material/ArrowCircleUp');
68
+ var CenterFocusWeakIcon = require('@mui/icons-material/CenterFocusWeak');
67
69
  var core = require('@dnd-kit/core');
68
70
  var modifiers = require('@dnd-kit/modifiers');
69
71
  var PlaylistAddIcon = require('@mui/icons-material/PlaylistAdd');
@@ -86,6 +88,7 @@ var DesignServicesIcon = require('@mui/icons-material/DesignServices');
86
88
  var PictureAsPdfIcon = require('@mui/icons-material/PictureAsPdf');
87
89
  var reactRedux = require('react-redux');
88
90
  var toolkit = require('@reduxjs/toolkit');
91
+ var KeyboardArrowRightIcon = require('@mui/icons-material/KeyboardArrowRight');
89
92
 
90
93
  function _interopNamespaceDefault(e) {
91
94
  var n = Object.create(null);
@@ -2944,7 +2947,7 @@ var MlFollowGps = function (props) {
2944
2947
  isFollowed && userLocationGeoJson && (React.createElement(MlGeoJsonLayer, { geojson: accuracyGeoJson, type: 'fill', paint: __assign({ 'fill-color': '#cbd300', 'fill-opacity': 0.3 }, props.accuracyPaint), insertBeforeLayer: props.insertBeforeLayer })),
2945
2948
  isFollowed && orientationCone && (React.createElement(MlGeoJsonLayer, { geojson: orientationCone, type: 'fill', paint: __assign({ 'fill-color': '#0000ff', 'fill-antialias': false, 'fill-opacity': 0.3 }, props.orientationConePaint), insertBeforeLayer: props.insertBeforeLayer })),
2946
2949
  isFollowed && userLocationGeoJson && (React.createElement(MlGeoJsonLayer, { geojson: userLocationGeoJson, type: 'circle', paint: __assign({ 'circle-color': '#009ee0', 'circle-radius': 5, 'circle-stroke-color': '#fafaff', 'circle-stroke-width': 1 }, props.circlePaint), insertBeforeLayer: props.insertBeforeLayer })),
2947
- React.createElement(material.Button, { variant: "navtools", sx: {
2950
+ React.createElement(material.Button, { variant: "navtools", "data-testid": "mlFollowGpsBtn", sx: {
2948
2951
  zIndex: 1002,
2949
2952
  color: isFollowed
2950
2953
  ? function (theme) { return theme.palette.GPS.GPSActiveColor; }
@@ -3185,7 +3188,7 @@ function LayerListFolder(_a) {
3185
3188
  return (React.createElement(React.Fragment, null,
3186
3189
  React.createElement(ListItemStyled$2, null,
3187
3190
  React.createElement(ListItemIconStyled$1, null,
3188
- React.createElement(IconButtonStyled$2, { edge: "end", "aria-label": "open", onClick: function () { return setOpen(!open); } }, open ? React.createElement(iconsMaterial.ExpandMore, null) : React.createElement(iconsMaterial.KeyboardArrowRight, null)),
3191
+ React.createElement(IconButtonStyled$2, { edge: "end", "aria-label": "open", onClick: function () { return setOpen(!open); } }, open ? React.createElement(ExpandMoreIcon, null) : React.createElement(ExpandLessIcon, null)),
3189
3192
  React.createElement(CheckboxStyled$1, { disabled: setVisible ? false : !visible, checked: setVisible ? visible : localVisible, onClick: function () {
3190
3193
  if (setVisible) {
3191
3194
  setVisible(function (val) { return !val; });
@@ -3213,7 +3216,7 @@ var ColorPicker = function (_a) {
3213
3216
  var value = (props === null || props === void 0 ? void 0 : props.value) || '';
3214
3217
  return (React.createElement(React.Fragment, null,
3215
3218
  React.createElement(material.Grid, { container: true, sx: { flexWrap: 'nowrap' } },
3216
- React.createElement(material.Grid, { xs: 12, item: true },
3219
+ React.createElement(material.Grid, { size: 12 },
3217
3220
  React.createElement(material.Button, { variant: "outlined", onClick: function () { return setShowPicker(true); }, sx: {
3218
3221
  minWidth: '100%',
3219
3222
  padding: '5px',
@@ -3458,7 +3461,8 @@ function LayerListItem(_a) {
3458
3461
  var deletedRef = React.useRef(false);
3459
3462
  var visibleRef = React.useRef(visible);
3460
3463
  // this state variable is used for layer components that provide a paint attribute
3461
- var _u = React.useState(((_b = layerComponent === null || layerComponent === void 0 ? void 0 : layerComponent.props) === null || _b === void 0 ? void 0 : _b.paint) || ((_d = (_c = layerComponent === null || layerComponent === void 0 ? void 0 : layerComponent.props) === null || _c === void 0 ? void 0 : _c.options) === null || _d === void 0 ? void 0 : _d.paint) ||
3464
+ var _u = React.useState(((_b = layerComponent === null || layerComponent === void 0 ? void 0 : layerComponent.props) === null || _b === void 0 ? void 0 : _b.paint) ||
3465
+ ((_d = (_c = layerComponent === null || layerComponent === void 0 ? void 0 : layerComponent.props) === null || _c === void 0 ? void 0 : _c.options) === null || _d === void 0 ? void 0 : _d.paint) ||
3462
3466
  getDefaultPaintPropsByType(((_e = layerComponent === null || layerComponent === void 0 ? void 0 : layerComponent.props) === null || _e === void 0 ? void 0 : _e.type) || getDefaulLayerTypeByGeometry(layerComponent.props.geojson))), paintProps = _u[0], setPaintProps = _u[1];
3463
3467
  var _visible = React.useMemo(function () {
3464
3468
  if (!visible) {
@@ -3514,7 +3518,7 @@ function LayerListItem(_a) {
3514
3518
  layout: {
3515
3519
  visibility: _visible ? 'visible' : 'none',
3516
3520
  },
3517
- options: __assign(__assign({}, (_a = layerComponent === null || layerComponent === void 0 ? void 0 : layerComponent.props) === null || _a === void 0 ? void 0 : _a.options), (setLayerState ? {} : { paint: paintProps }))
3521
+ options: __assign(__assign({}, (_a = layerComponent === null || layerComponent === void 0 ? void 0 : layerComponent.props) === null || _a === void 0 ? void 0 : _a.options), (setLayerState ? {} : { paint: paintProps })),
3518
3522
  });
3519
3523
  }
3520
3524
  }
@@ -3538,7 +3542,7 @@ function LayerListItem(_a) {
3538
3542
  return !current;
3539
3543
  });
3540
3544
  } },
3541
- React.createElement(iconsMaterial.Tune, null)))) : undefined },
3545
+ React.createElement(TuneIcon, null)))) : undefined },
3542
3546
  React.createElement(CheckboxListItemIcon, null,
3543
3547
  React.createElement(CheckboxStyled, { disabled: !visible, checked: localVisible, onClick: function () {
3544
3548
  setLocalVisible(function (val) { return !val; });
@@ -3546,7 +3550,7 @@ function LayerListItem(_a) {
3546
3550
  React.createElement(material.ListItemText, { variant: "layerlist", primary: name, secondary: description, primaryTypographyProps: { overflow: 'hidden' } })));
3547
3551
  return (React.createElement(React.Fragment, null,
3548
3552
  props.sortable && props.layerId && !((_j = layerComponent === null || layerComponent === void 0 ? void 0 : layerComponent.props) === null || _j === void 0 ? void 0 : _j.layers) && (React.createElement(SortableContainer, { layerId: props.layerId }, listContent)),
3549
- !props.sortable && !((_k = layerComponent === null || layerComponent === void 0 ? void 0 : layerComponent.props) === null || _k === void 0 ? void 0 : _k.layers) && (listContent),
3553
+ !props.sortable && !((_k = layerComponent === null || layerComponent === void 0 ? void 0 : layerComponent.props) === null || _k === void 0 ? void 0 : _k.layers) && listContent,
3550
3554
  _layerComponent,
3551
3555
  !((_l = layerComponent === null || layerComponent === void 0 ? void 0 : layerComponent.props) === null || _l === void 0 ? void 0 : _l.layers) &&
3552
3556
  Object.keys(paintProps).length > 0 &&
@@ -3558,7 +3562,7 @@ function LayerListItem(_a) {
3558
3562
  setShowDeletionConfirmationDialog(true);
3559
3563
  }
3560
3564
  } },
3561
- React.createElement(iconsMaterial.Delete, null)),
3565
+ React.createElement(DeleteIcon, null)),
3562
3566
  showDeletionConfirmationDialog && (React.createElement(ConfirmDialog, { open: showDeletionConfirmationDialog, onConfirm: function () {
3563
3567
  if (typeof setLayerState === 'function') {
3564
3568
  deletedRef.current = true;
@@ -3609,7 +3613,7 @@ function Sidebar(_a) {
3609
3613
  lg: '350px',
3610
3614
  }, boxSizing: 'border-box' }, drawerPaperProps === null || drawerPaperProps === void 0 ? void 0 : drawerPaperProps.sx) }), sx: __assign({ flexGrow: 1, zIndex: 105, position: 'absolute', bottom: 0, display: 'flex', flexDirection: 'column', maxWidth: { lg: '30%', md: '40%', sm: '50%', xs: '78%' } }, (drawerOpen ? {} : { left: mediaIsMobile ? '-90vw' : '-20vw' })) }, props),
3611
3615
  React.createElement(DrawerHeader, __assign({}, drawerHeaderProps),
3612
- React.createElement(_.Typography, { variant: "h6" }, props.name),
3616
+ React.createElement(material.Typography, { variant: "h6" }, props.name),
3613
3617
  React.createElement(material.IconButton, { onClick: setOpen
3614
3618
  ? function () {
3615
3619
  setOpen === null || setOpen === void 0 ? void 0 : setOpen(false);
@@ -3628,7 +3632,7 @@ function Sidebar(_a) {
3628
3632
  overflow: 'visible',
3629
3633
  },
3630
3634
  } }),
3631
- React.createElement(_.SwipeableDrawer, { anchor: "bottom", open: typeof props.open === 'undefined' ? drawerOpen : props.open, onClose: setOpen
3635
+ React.createElement(material.SwipeableDrawer, { anchor: "bottom", open: typeof props.open === 'undefined' ? drawerOpen : props.open, onClose: setOpen
3632
3636
  ? function () {
3633
3637
  setOpen === null || setOpen === void 0 ? void 0 : setOpen(false);
3634
3638
  }
@@ -3656,7 +3660,7 @@ function Sidebar(_a) {
3656
3660
  left: 0,
3657
3661
  } },
3658
3662
  React.createElement(Puller, null),
3659
- React.createElement(_.Typography, { variant: "h6", sx: { p: '13px' } }, props.name)),
3663
+ React.createElement(material.Typography, { variant: "h6", sx: { p: '13px' } }, props.name)),
3660
3664
  React.createElement(material.Paper, { sx: {
3661
3665
  px: '15px',
3662
3666
  pb: '15px',
@@ -3703,14 +3707,16 @@ var MlMultiMeasureTool = function (props) {
3703
3707
  });
3704
3708
  };
3705
3709
  React.useEffect(function () {
3706
- reload && setReload(false);
3707
- reload &&
3710
+ if (reload) {
3711
+ setReload(false);
3712
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
3708
3713
  measureState &&
3709
- setMeasureList(function (current) {
3710
- var newList = __spreadArray([], current, true);
3711
- newList.push(measureState);
3712
- return newList;
3713
- });
3714
+ setMeasureList(function (current) {
3715
+ var newList = __spreadArray([], current, true);
3716
+ newList.push(measureState);
3717
+ return newList;
3718
+ });
3719
+ }
3714
3720
  }, [reload]);
3715
3721
  React.useEffect(function () {
3716
3722
  setMeasureState(undefined);
@@ -3720,7 +3726,7 @@ var MlMultiMeasureTool = function (props) {
3720
3726
  React.createElement(Box, { sx: { flexGrow: 1 } },
3721
3727
  React.createElement("br", null),
3722
3728
  React.createElement(Grid, { container: true, spacing: 4, justifyContent: "flex-start" },
3723
- React.createElement(Grid, { item: true, xs: 3 },
3729
+ React.createElement(Grid, { size: 3 },
3724
3730
  React.createElement(material.Tooltip, { title: "Measure Area" },
3725
3731
  React.createElement(material.Button, { variant: "outlined", sx: {
3726
3732
  backgroundColor: selectedMode === 'polygon'
@@ -3735,7 +3741,7 @@ var MlMultiMeasureTool = function (props) {
3735
3741
  setReload(true);
3736
3742
  } },
3737
3743
  React.createElement(PentagonIcon, null)))),
3738
- React.createElement(Grid, { item: true, xs: 3 },
3744
+ React.createElement(Grid, { size: 3 },
3739
3745
  React.createElement(material.Tooltip, { title: "Measure Distance" },
3740
3746
  React.createElement(material.Button, { variant: "outlined", sx: {
3741
3747
  backgroundColor: selectedMode === 'line'
@@ -3751,7 +3757,7 @@ var MlMultiMeasureTool = function (props) {
3751
3757
  } },
3752
3758
  React.createElement(PolylineIcon, null)))))),
3753
3759
  React.createElement("br", null),
3754
- React.createElement(Grid, { item: true, xs: 4 },
3760
+ React.createElement(Grid, { size: 4 },
3755
3761
  React.createElement(material.FormControl, null,
3756
3762
  React.createElement(material.InputLabel, { id: "unit-select-label" }, "Unit"),
3757
3763
  React.createElement(material.Select, { labelId: "unit-select-label", id: "unit-select", value: selectedUnit, label: "Unit", onChange: function (e) {
@@ -3823,56 +3829,24 @@ MlMultiMeasureTool.defaultProps = {
3823
3829
  buttonStyleOverride: {},
3824
3830
  };
3825
3831
 
3826
- var _g;
3827
- function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
3828
- var SvgCompassNeedle = function SvgCompassNeedle(props) {
3829
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
3830
- width: 10,
3831
- height: 40,
3832
- viewBox: "0 0 10 40",
3833
- fill: "none",
3834
- id: "svg6"
3835
- }, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
3836
- id: "g14",
3837
- transform: "translate(0.67544,-1.25e-5)"
3838
- }, /*#__PURE__*/React__namespace.createElement("path", {
3839
- d: "m 3.34715,4.52028 c 0.22737,-1.05154 1.72745,-1.05154 1.95482,0 L 8.64912,20 H 0 Z",
3840
- fill: "#cf003d"
3841
- }), /*#__PURE__*/React__namespace.createElement("path", {
3842
- d: "m 3.34715,35.4797 c 0.22737,1.0516 1.72745,1.0516 1.95482,0 L 8.64912,20 H 0 Z",
3843
- fill: "#d3dcf0"
3844
- }))));
3832
+ var CompassBackground = function (_a) {
3833
+ var _b = _a.className, className = _b === void 0 ? '' : _b, title = _a.title, onClick = _a.onClick, style = _a.style;
3834
+ return (React.createElement("svg", { width: "52", height: "53", viewBox: "0 0 52 53", fill: "none", className: className, onClick: onClick, role: title ? 'img' : 'presentation', "aria-hidden": !title, style: style },
3835
+ title && React.createElement("title", null, title),
3836
+ React.createElement("circle", { cx: "26.0001", cy: "26.1843", r: "24", fill: "white", stroke: "#009EE0", strokeWidth: "2" }),
3837
+ React.createElement("path", { d: "M26.4915 7.59161C26.3524 8.07338 25.6698 8.07338 25.5307 7.59161L24.2998 3.3276C24.2075 3.0079 24.4474 2.68893 24.7802 2.68893H27.242C27.5748 2.68893 27.8147 3.0079 27.7224 3.3276L26.4915 7.59161Z", fill: "#009EE0" }),
3838
+ React.createElement("path", { d: "M25.5085 44.7598C25.6476 44.278 26.3302 44.278 26.4693 44.7598L27.7002 49.0238C27.7925 49.3435 27.5526 49.6625 27.2198 49.6625H24.758C24.4252 49.6625 24.1853 49.3435 24.2776 49.0238L25.5085 44.7598Z", fill: "#009EE0" }),
3839
+ React.createElement("path", { d: "M44.6641 26.4915C44.1823 26.3524 44.1823 25.6698 44.6641 25.5307L48.9281 24.2998C49.2478 24.2075 49.5668 24.4474 49.5668 24.7802V27.242C49.5668 27.5747 49.2478 27.8147 48.9281 27.7224L44.6641 26.4915Z", fill: "#009EE0" }),
3840
+ React.createElement("path", { d: "M7.3959 25.6085C7.87766 25.7476 7.87766 26.4302 7.3959 26.5693L3.13189 27.8002C2.81218 27.8925 2.49321 27.6526 2.49321 27.3198L2.49321 24.858C2.49321 24.5253 2.81218 24.2853 3.13189 24.3776L7.3959 25.6085Z", fill: "#009EE0" })));
3845
3841
  };
3846
3842
 
3847
- var _circle, _path$1, _path2$1, _path3, _path4;
3848
- function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
3849
- var SvgCompassBackground = function SvgCompassBackground(props) {
3850
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
3851
- width: 52,
3852
- height: 53,
3853
- viewBox: "0 0 52 53",
3854
- fill: "none",
3855
- xmlns: "http://www.w3.org/2000/svg"
3856
- }, props), _circle || (_circle = /*#__PURE__*/React__namespace.createElement("circle", {
3857
- cx: 26.0001,
3858
- cy: 26.1843,
3859
- r: 24,
3860
- fill: "white",
3861
- stroke: "#009EE0",
3862
- strokeWidth: 2
3863
- })), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
3864
- d: "M26.4915 7.59161C26.3524 8.07338 25.6698 8.07338 25.5307 7.59161L24.2998 3.3276C24.2075 3.0079 24.4474 2.68893 24.7802 2.68893H27.242C27.5748 2.68893 27.8147 3.0079 27.7224 3.3276L26.4915 7.59161Z",
3865
- fill: "#009EE0"
3866
- })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
3867
- d: "M25.5085 44.7598C25.6476 44.278 26.3302 44.278 26.4693 44.7598L27.7002 49.0238C27.7925 49.3435 27.5526 49.6625 27.2198 49.6625H24.758C24.4252 49.6625 24.1853 49.3435 24.2776 49.0238L25.5085 44.7598Z",
3868
- fill: "#009EE0"
3869
- })), _path3 || (_path3 = /*#__PURE__*/React__namespace.createElement("path", {
3870
- d: "M44.6641 26.4915C44.1823 26.3524 44.1823 25.6698 44.6641 25.5307L48.9281 24.2998C49.2478 24.2075 49.5668 24.4474 49.5668 24.7802V27.242C49.5668 27.5747 49.2478 27.8147 48.9281 27.7224L44.6641 26.4915Z",
3871
- fill: "#009EE0"
3872
- })), _path4 || (_path4 = /*#__PURE__*/React__namespace.createElement("path", {
3873
- d: "M7.3959 25.6085C7.87766 25.7476 7.87766 26.4302 7.3959 26.5693L3.13189 27.8002C2.81218 27.8925 2.49321 27.6526 2.49321 27.3198L2.49321 24.858C2.49321 24.5253 2.81218 24.2853 3.13189 24.3776L7.3959 25.6085Z",
3874
- fill: "#009EE0"
3875
- })));
3843
+ var CompassNeedle = function (_a) {
3844
+ var _b = _a.className, className = _b === void 0 ? '' : _b, title = _a.title, onClick = _a.onClick, style = _a.style;
3845
+ return (React.createElement("svg", { width: "10", height: "40", viewBox: "0 0 10 40", fill: "none", className: className, onClick: onClick, role: title ? 'img' : 'presentation', "aria-hidden": !title, style: style },
3846
+ title && React.createElement("title", null, title),
3847
+ React.createElement("g", { transform: "translate(0.67544,-1.25e-5)" },
3848
+ React.createElement("path", { d: "m 3.34715,4.52028 c 0.22737,-1.05154 1.72745,-1.05154 1.95482,0 L 8.64912,20 H 0 Z", fill: "#cf003d" }),
3849
+ React.createElement("path", { d: "m 3.34715,35.4797 c 0.22737,1.0516 1.72745,1.0516 1.95482,0 L 8.64912,20 H 0 Z", fill: "#d3dcf0" }))));
3876
3850
  };
3877
3851
 
3878
3852
  var BoxStyled$2 = material.styled(material.Box)(function (_a) {
@@ -3978,9 +3952,9 @@ var MlNavigationCompass = function (props) {
3978
3952
  return (React.createElement(React.Fragment, null,
3979
3953
  React.createElement(BoxStyled$2, { sx: __assign({}, props.style) },
3980
3954
  React.createElement(CompassBox, { onClick: rotate, sx: __assign({}, props.backgroundStyle) },
3981
- React.createElement(SvgCompassBackground, { style: { position: 'absolute', top: 0, left: 0 } }),
3955
+ React.createElement(CompassBackground, { style: { position: 'absolute', top: 0, left: 0 } }),
3982
3956
  React.createElement(NeedleBox, { onClick: rotate, sx: __assign({}, props.needleStyle) },
3983
- React.createElement(SvgCompassNeedle, { style: {
3957
+ React.createElement(CompassNeedle, { style: {
3984
3958
  transform: 'rotate(' + (bearing > 0 ? '-' + bearing : -1 * bearing) + 'deg)',
3985
3959
  } }))))));
3986
3960
  };
@@ -4008,16 +3982,12 @@ var MlNavigationTools = function (props) {
4008
3982
  var zoomIn = React.useCallback(function () {
4009
3983
  if (!mapHook.map)
4010
3984
  return;
4011
- if (mapHook.map.transform.zoom + 0.5 <= mapHook.map.transform.maxZoom) {
4012
- mapHook.map.easeTo({ zoom: mapHook.map.transform.zoom + 0.5 });
4013
- }
3985
+ mapHook.map.easeTo({ zoom: mapHook.map.getZoom() + 0.5 });
4014
3986
  }, [mapHook.map]);
4015
3987
  var zoomOut = React.useCallback(function () {
4016
3988
  if (!mapHook.map)
4017
3989
  return;
4018
- if (mapHook.map.transform.zoom - 0.5 >= mapHook.map.transform.minZoom) {
4019
- mapHook.map.easeTo({ zoom: mapHook.map.transform.zoom - 0.5 });
4020
- }
3990
+ mapHook.map.easeTo({ zoom: mapHook.map.getZoom() - 0.5 });
4021
3991
  }, [mapHook.map]);
4022
3992
  var adjustPitch = React.useCallback(function () {
4023
3993
  if (!mapHook.map)
@@ -4298,20 +4268,11 @@ MlLayerMagnify.defaultProps = {
4298
4268
  magnifierStyle: {},
4299
4269
  };
4300
4270
 
4301
- var _path, _path2;
4302
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4303
- var SvgIcononlyarrow = function SvgIcononlyarrow(props) {
4304
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
4305
- viewBox: "0 0 47 30",
4306
- fill: "none",
4307
- xmlns: "http://www.w3.org/2000/svg"
4308
- }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
4309
- d: "M29.5 21.25L35.75 15L29.5 8.75V21.25Z",
4310
- fill: "#009EE0"
4311
- })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
4312
- d: "M17.5 8.75L11.25 15L17.5 21.25V8.75Z",
4313
- fill: "#009EE0"
4314
- })));
4271
+ var SwipeIcon = function (_a) {
4272
+ var _b = _a.className, className = _b === void 0 ? '' : _b, title = _a.title, onClick = _a.onClick, style = _a.style, color = _a.color;
4273
+ return (React.createElement("svg", { viewBox: "0 0 47 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, onClick: onClick, role: title ? 'img' : 'presentation', "aria-hidden": !title, style: style, color: color },
4274
+ React.createElement("path", { d: "M29.5 21.25L35.75 15L29.5 8.75V21.25Z", fill: "#009EE0" }),
4275
+ React.createElement("path", { d: "M17.5 8.75L11.25 15L17.5 21.25V8.75Z", fill: "#009EE0" })));
4315
4276
  };
4316
4277
 
4317
4278
  /**
@@ -4405,7 +4366,7 @@ var MlLayerSwipe = function (props) {
4405
4366
  };
4406
4367
  }, [mapContext]);
4407
4368
  return (React.createElement("div", { style: __assign({ position: 'absolute', left: swipeX + '%', top: '50%', borderRadius: '50%', width: '65px', height: '65px', background: 'rgba(234, 235, 241, 0.75)', border: '2px solid rgba(0, 158, 224, 0.75)', cursor: 'pointer', zIndex: '110', marginLeft: '-35px', marginTop: '-50px', textAlign: 'center', lineHeight: '91px', fontSize: '2em', color: '#fafafa', userSelect: 'none' }, props.buttonStyle), onTouchStart: onDown, onMouseDown: onDown },
4408
- React.createElement(SvgIcononlyarrow, { color: "#0066ff", style: {
4369
+ React.createElement(SwipeIcon, { color: "#0066ff", style: {
4409
4370
  width: '65px',
4410
4371
  height: '65px',
4411
4372
  justifyContent: 'center',
@@ -5592,12 +5553,6 @@ var MlShareMapState = function (props) {
5592
5553
  MlShareMapState.defaultProps = {
5593
5554
  mapId: undefined,
5594
5555
  };
5595
- MlShareMapState.propTypes = {
5596
- /**
5597
- * Id of the target MapLibre instance in mapContext
5598
- */
5599
- mapId: PropTypes.string,
5600
- };
5601
5556
 
5602
5557
  function getElevationData(_geojsonInfo, elevationFactor) {
5603
5558
  var createStep = function (x, y, z, x2, y2) {
@@ -5943,12 +5898,6 @@ var MlWmsFeatureInfoPopup = function (props) {
5943
5898
  MlWmsFeatureInfoPopup.defaultProps = {
5944
5899
  mapId: undefined,
5945
5900
  };
5946
- MlWmsFeatureInfoPopup.propTypes = {
5947
- /**
5948
- * Id of the target MapLibre instance in mapContext
5949
- */
5950
- mapId: PropTypes.string,
5951
- };
5952
5901
 
5953
5902
  var defaultProps = {
5954
5903
  visible: true,
@@ -6060,51 +6009,6 @@ var MlWmsLayer = function (props) {
6060
6009
  return React.createElement(React.Fragment, null);
6061
6010
  };
6062
6011
  MlWmsLayer.defaultProps = __assign({}, defaultProps);
6063
- MlWmsLayer.propTypes = {
6064
- /**
6065
- * WMS URL
6066
- */
6067
- url: PropTypes.string.isRequired,
6068
- /**
6069
- * URL query parameters that will be added to the WMS URL. A layers property (string) is mandatory. Any value defined on this attribute will extend the default object.
6070
- */
6071
- urlParameters: PropTypes.shape({
6072
- layers: PropTypes.string.isRequired,
6073
- bbox: PropTypes.string,
6074
- format: PropTypes.string,
6075
- service: PropTypes.string,
6076
- version: PropTypes.string,
6077
- request: PropTypes.string,
6078
- srs: PropTypes.string,
6079
- width: PropTypes.number,
6080
- height: PropTypes.number,
6081
- }),
6082
- /**
6083
- * Id of the target MapLibre instance in mapContext
6084
- */
6085
- mapId: PropTypes.string,
6086
- /**
6087
- * MapLibre attribution shown in the bottom right of the map, if this layer is visible
6088
- */
6089
- attribution: PropTypes.string,
6090
- /**
6091
- * Object that is passed to the MapLibre.addLayer call as config option parameter
6092
- */
6093
- layerOptions: PropTypes.object,
6094
- /**
6095
- * Object that is passed to the MapLibre.addSource call as config option parameter
6096
- */
6097
- sourceOptions: PropTypes.object,
6098
- /**
6099
- * Id of an existing layer in the mapLibre instance to help specify the layer order
6100
- * This layer will be visually beneath the layer with the "insertBeforeLayer" id.
6101
- */
6102
- insertBeforeLayer: PropTypes.string,
6103
- /**
6104
- * Sets layer "visibility" property to "visible" if true or "none" if false
6105
- */
6106
- visible: PropTypes.bool,
6107
- };
6108
6012
 
6109
6013
  function useWms(props) {
6110
6014
  // Use a useRef hook to reference the layer object to be able to access it later inside useEffect hooks
@@ -6416,7 +6320,7 @@ var MlWmsLoader = function (props) {
6416
6320
  }
6417
6321
  }, disabled: !(layers === null || layers === void 0 ? void 0 : layers.some(function (layer) { return layer.visible && layer.queryable; })) },
6418
6322
  React.createElement(InfoIcon, null))),
6419
- React.createElement(IconButton, { edge: props.showDeleteButton ? false : 'end', sx: __assign({ padding: '4px', marginTop: '-3px' }, (props.showDeleteButton ? { marginRight: '4px' } : {})), "aria-label": "open", onClick: function () { return setOpen(function (current) { return !current; }); } }, open ? React.createElement(iconsMaterial.ExpandLess, null) : React.createElement(iconsMaterial.ExpandMore, null)),
6323
+ React.createElement(IconButton, { edge: props.showDeleteButton ? false : 'end', sx: __assign({ padding: '4px', marginTop: '-3px' }, (props.showDeleteButton ? { marginRight: '4px' } : {})), "aria-label": "open", onClick: function () { return setOpen(function (current) { return !current; }); } }, open ? React.createElement(ExpandLessIcon, null) : React.createElement(ExpandMoreIcon, null)),
6420
6324
  props.showDeleteButton && (React.createElement(React.Fragment, null,
6421
6325
  React.createElement(IconButton, { "aria-label": "delete", edge: "end", onClick: function () {
6422
6326
  if (typeof props.onConfigChange === 'function') {
@@ -6780,9 +6684,8 @@ function TemporalControllerPlayer(props) {
6780
6684
  flexShrink: 0,
6781
6685
  '& .MuiDrawer-paper': mediaIsMobile ? mobileScreenBoxStyle : bigScreenBoxStyle,
6782
6686
  } },
6783
- React.createElement(material.Grid, { container: true },
6784
- mediaIsMobile ? React.createElement(React.Fragment, null) : React.createElement(material.Grid, { item: true, xs: 3 }),
6785
- React.createElement(material.Grid, { item: true, xs: mediaIsMobile ? 12 : 6, textAlign: "center" },
6687
+ React.createElement(material.Grid, { container: true, alignItems: "center", justifyContent: "space-between" },
6688
+ React.createElement(material.Grid, { item: true, xs: 12, sm: 10, textAlign: "center" },
6786
6689
  React.createElement(material.Button, { onClick: handleFastRewind },
6787
6690
  React.createElement(FastRewindIcon, null)),
6788
6691
  React.createElement(material.Button, { onClick: handleStop },
@@ -6790,8 +6693,11 @@ function TemporalControllerPlayer(props) {
6790
6693
  React.createElement(material.Button, { onClick: handlePlayPause }, isPlaying ? React.createElement(PauseIcon, null) : React.createElement(PlayArrowIcon, null)),
6791
6694
  React.createElement(material.Button, { onClick: handleFastForward },
6792
6695
  React.createElement(FastForwardIcon, null))),
6793
- props.display && !mediaIsMobile && (React.createElement(material.Grid, { item: true, xs: 3 },
6794
- React.createElement(material.Typography, { variant: 'h5', textAlign: 'right', sx: { paddingRight: '25px' } }, Math.floor(currentVal))))),
6696
+ props.display && !mediaIsMobile && (
6697
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6698
+ // @ts-expect-error
6699
+ React.createElement(material.Grid, { item: true, xs: 12, sm: 5, textAlign: "right" },
6700
+ React.createElement(material.Typography, { variant: 'h5', sx: { paddingRight: '25px' } }, Math.floor(currentVal))))),
6795
6701
  React.createElement(material.Slider, { sx: {
6796
6702
  position: 'flex',
6797
6703
  width: '95%',
@@ -7795,9 +7701,6 @@ var SimpleDataProvider = function (props) {
7795
7701
  };
7796
7702
  return (React.createElement(SimpleDataContextProvider, { value: value }, props.children));
7797
7703
  };
7798
- SimpleDataProvider.propTypes = {
7799
- children: PropTypes.node.isRequired,
7800
- };
7801
7704
 
7802
7705
  var IconButtonStyled$1 = material.styled(material.IconButton)({
7803
7706
  padding: '4px',
@@ -7905,13 +7808,13 @@ function LayerListItemFactory(props) {
7905
7808
  React.createElement(IconButtonStyled$1, { disabled: idx === layers.length - 1, onClick: function () {
7906
7809
  layerContext.moveDown(layer.id || '');
7907
7810
  } },
7908
- React.createElement(iconsMaterial.ArrowCircleDown, null)),
7811
+ React.createElement(ArrowCircleDownIcon, null)),
7909
7812
  React.createElement(IconButtonStyled$1, { disabled: idx === 0, onClick: function () {
7910
7813
  layerContext.moveUp(layer.id || '');
7911
7814
  } },
7912
- React.createElement(iconsMaterial.ArrowCircleUp, null)),
7815
+ React.createElement(ArrowCircleUpIcon, null)),
7913
7816
  React.createElement(IconButtonStyled$1, { onClick: function () { return fitLayer(layer); } },
7914
- React.createElement(iconsMaterial.CenterFocusWeak, null))), setLayerState: function (layerConfig) {
7817
+ React.createElement(CenterFocusWeakIcon, null))), setLayerState: function (layerConfig) {
7915
7818
  return setLayers === null || setLayers === void 0 ? void 0 : setLayers(function (current) {
7916
7819
  var _layers = __spreadArray([], current, true);
7917
7820
  if (layerConfig === false) {
@@ -7951,26 +7854,26 @@ function LayerListItemFactory(props) {
7951
7854
  React.createElement(IconButtonStyled$1, { disabled: idx === layers.length - 1, onClick: function () {
7952
7855
  layerContext.moveDown(layer.id || '');
7953
7856
  } },
7954
- React.createElement(iconsMaterial.ArrowCircleDown, null)),
7857
+ React.createElement(ArrowCircleDownIcon, null)),
7955
7858
  React.createElement(IconButtonStyled$1, { disabled: idx === 0, onClick: function () {
7956
7859
  layerContext.moveUp(layer.id || '');
7957
7860
  } },
7958
- React.createElement(iconsMaterial.ArrowCircleUp, null)),
7861
+ React.createElement(ArrowCircleUpIcon, null)),
7959
7862
  React.createElement(IconButtonStyled$1, { onClick: function () { return fitLayer(layer); } },
7960
- React.createElement(iconsMaterial.CenterFocusWeak, null))) }))));
7863
+ React.createElement(CenterFocusWeakIcon, null))) }))));
7961
7864
  case 'vt':
7962
7865
  return (React.createElement(React.Fragment, { key: (layer === null || layer === void 0 ? void 0 : layer.id) + '_listItem' },
7963
7866
  React.createElement(LayerListItem, { key: layer.id, name: (layer === null || layer === void 0 ? void 0 : layer.name) || (layer === null || layer === void 0 ? void 0 : layer.type) + ' layer' || 'unnamed layer', layerComponent: React.createElement(MlVectorTileLayer, { layers: ((_c = layer === null || layer === void 0 ? void 0 : layer.config) === null || _c === void 0 ? void 0 : _c.layers) || [], key: layer.id, mapId: layer === null || layer === void 0 ? void 0 : layer.config.mapId, sourceOptions: (_d = layer === null || layer === void 0 ? void 0 : layer.config) === null || _d === void 0 ? void 0 : _d.sourceOptions, layerId: layer.id, url: (_e = layer === null || layer === void 0 ? void 0 : layer.config) === null || _e === void 0 ? void 0 : _e.url }), buttons: React.createElement(React.Fragment, null,
7964
7867
  React.createElement(IconButtonStyled$1, { key: layer.id + '_button1', disabled: idx === layers.length - 1, onClick: function () {
7965
7868
  layerContext.moveDown(layer.id || '');
7966
7869
  } },
7967
- React.createElement(iconsMaterial.ArrowCircleDown, null)),
7870
+ React.createElement(ArrowCircleDownIcon, null)),
7968
7871
  React.createElement(IconButtonStyled$1, { key: layer.id + '_button2', disabled: idx === 0, onClick: function () {
7969
7872
  layerContext.moveUp(layer.id || '');
7970
7873
  } },
7971
- React.createElement(iconsMaterial.ArrowCircleUp, null)),
7874
+ React.createElement(ArrowCircleUpIcon, null)),
7972
7875
  React.createElement(IconButtonStyled$1, { onClick: function () { return fitLayer(layer); } },
7973
- React.createElement(iconsMaterial.CenterFocusWeak, null))), setLayerState: function (layerConfig) {
7876
+ React.createElement(CenterFocusWeakIcon, null))), setLayerState: function (layerConfig) {
7974
7877
  return setLayers === null || setLayers === void 0 ? void 0 : setLayers(function (current) {
7975
7878
  var _layers = __spreadArray([], current, true);
7976
7879
  if (layerConfig === false) {
@@ -21710,18 +21613,18 @@ function LayerTreeListItem(props) {
21710
21613
  React.createElement(IconButtonStyled, { disabled: false, onClick: function () {
21711
21614
  moveDown(layer.uuid);
21712
21615
  } },
21713
- React.createElement(iconsMaterial.ArrowCircleDown, null)),
21616
+ React.createElement(ArrowCircleDownIcon, null)),
21714
21617
  React.createElement(IconButtonStyled, { disabled: false, onClick: function () {
21715
21618
  moveUp(layer.uuid);
21716
21619
  } },
21717
- React.createElement(iconsMaterial.ArrowCircleUp, null)),
21620
+ React.createElement(ArrowCircleUpIcon, null)),
21718
21621
  layer.configurable && (React.createElement(React.Fragment, null,
21719
21622
  React.createElement(TuneIconButton, { edge: 'end', "aria-label": "settings", onClick: function () {
21720
21623
  setPaintPropsFormVisible(function (current) {
21721
21624
  return !current;
21722
21625
  });
21723
21626
  } },
21724
- React.createElement(iconsMaterial.Tune, null))))) },
21627
+ React.createElement(TuneIcon, null))))) },
21725
21628
  React.createElement(CheckboxListItemIcon, null,
21726
21629
  React.createElement(CheckboxStyled, { checked: visible, disabled: layer.masterVisible === false, onClick: function () { return handleToggleVisibility(visible); } })),
21727
21630
  React.createElement(material.ListItemText, { variant: "layerlist", primary: layer.name || '', secondary: props.description, primaryTypographyProps: { overflow: 'hidden' } }),
@@ -21729,7 +21632,7 @@ function LayerTreeListItem(props) {
21729
21632
  layer.configurable && paintPropsFormVisible && (React.createElement(React.Fragment, null,
21730
21633
  props.showDeleteButton && (React.createElement(React.Fragment, null,
21731
21634
  React.createElement(DeleteIconButton, { edge: "end", "aria-label": "delete", onClick: function () { } },
21732
- React.createElement(iconsMaterial.Delete, null)),
21635
+ React.createElement(DeleteIcon, null)),
21733
21636
  showDeletionConfirmationDialog && (React.createElement(ConfirmDialog, { open: showDeletionConfirmationDialog, onConfirm: function () {
21734
21637
  setShowDeletionConfirmationDialog(false);
21735
21638
  }, onCancel: function () {
@@ -21741,7 +21644,7 @@ function LayerTreeListItem(props) {
21741
21644
  return (React.createElement(React.Fragment, null,
21742
21645
  React.createElement(ListItemStyled, { key: layer.uuid, sx: __assign({}, props.listItemSx), secondaryAction: undefined },
21743
21646
  React.createElement(ListItemIconStyled, null,
21744
- React.createElement(IconButtonStyled, { edge: "end", "aria-label": "open", onClick: function () { return setOpen(!open); } }, open ? React.createElement(iconsMaterial.ExpandMore, null) : React.createElement(iconsMaterial.KeyboardArrowRight, null)),
21647
+ React.createElement(IconButtonStyled, { edge: "end", "aria-label": "open", onClick: function () { return setOpen(!open); } }, open ? React.createElement(ExpandMoreIcon, null) : React.createElement(KeyboardArrowRightIcon, null)),
21745
21648
  React.createElement(CheckboxListItemIcon, null,
21746
21649
  React.createElement(CheckboxStyled, { checked: layer.visible, disabled: layer.masterVisible === false, onClick: function () { var _a; return handleToggleVisibility((_a = layer.visible) !== null && _a !== void 0 ? _a : false); } }))),
21747
21650
  React.createElement(material.ListItemText, { primary: layer.name, secondary: props.description, primaryTypographyProps: { overflow: 'hidden' } })),
@@ -21771,7 +21674,7 @@ function LayerTreeListItem(props) {
21771
21674
  return (React.createElement(React.Fragment, null,
21772
21675
  React.createElement(ListItemStyled, { key: layer.uuid, sx: __assign({}, props.listItemSx) },
21773
21676
  React.createElement(ListItemIconStyled, null,
21774
- React.createElement(IconButtonStyled, { edge: "end", "aria-label": "open", onClick: function () { return setOpen(!open); } }, open ? React.createElement(iconsMaterial.ExpandMore, null) : React.createElement(iconsMaterial.KeyboardArrowRight, null)),
21677
+ React.createElement(IconButtonStyled, { edge: "end", "aria-label": "open", onClick: function () { return setOpen(!open); } }, open ? React.createElement(ExpandMoreIcon, null) : React.createElement(KeyboardArrowRightIcon, null)),
21775
21678
  React.createElement(CheckboxListItemIcon, null,
21776
21679
  React.createElement(CheckboxStyled, { checked: layer.visible, disabled: layer.masterVisible, onClick: function () { return handleToggleVisibility(layer.visible ? layer.visible : false); } }))),
21777
21680
  React.createElement(material.ListItemText, { primary: layer.name, secondary: props.description, primaryTypographyProps: { overflow: 'hidden' } })),