@opengeoweb/core 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
@@ -1,8 +1,8 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default, { useState, useCallback, useEffect, useContext, useMemo } from 'react';
4
- import { Grid2, Box, MenuItem, Typography, useTheme, Popper, Fade, Tooltip, styled, LinearProgress, FormControl, InputLabel, Paper, List, ListItemButton, ListItemText, CircularProgress, ListSubheader, DialogContentText, TextField, InputAdornment, Button, Autocomplete, ListItemIcon, Checkbox, Switch, Select } from '@mui/material';
5
- import { safelyInitI18nForTestsAndStories, sharedTranslations, SHARED_NAMESPACE, CustomIconButton, CustomTooltip, TooltipSelect, AlertIcon, sliderHeaderStyle, CustomSlider, ToggleMenu, tooltipContainerStyles, renderCounter, AlertBanner, CustomAccordion, CustomDialog, PROJECTION, calculateStartSize, useWheelStopPropagation, ToolContainerDraggable, useDebounce, dateUtils, usePrevious, ErrorBoundary } from '@opengeoweb/shared';
4
+ import { Grid, Box, MenuItem, Typography, useTheme, Popper, Fade, Tooltip, styled, LinearProgress, FormControl, InputLabel, Paper, List, ListItemButton, ListItemText, CircularProgress, ListSubheader, DialogContentText, TextField, InputAdornment, Button, Autocomplete, ListItemIcon, Checkbox, Switch, Select } from '@mui/material';
5
+ import { safelyInitI18nForTestsAndStories, sharedTranslations, SHARED_NAMESPACE, CustomIconButton, CustomTooltip, TooltipSelect, AlertIcon, sliderHeaderStyle, CustomSlider, ToggleMenu, tooltipContainerStyles, renderCounter, AlertBanner, CustomAccordion, CustomDialog, PROJECTION, calculateStartSize, useWheelStopPropagation, ToolContainerDraggable, sessionStorageProvider, useDebounce, dateUtils, usePrevious, ErrorBoundary } from '@opengeoweb/shared';
6
6
  import { CollapseSmall, CollapseMedium, CollapseLarge, CollapseWindow, ExpandWindow, LayersAdd, CloudLoading, ColumnCollapsed, ColumnCollapse, Copy, None, FastForward, AutoUpdateActive, Both, Delete, Visibility, VisibilityOff, DragHandle as DragHandle$1, Cached, Add, MapAdd, WorldMapProjection, Layers, Search, Exclamation, MyLocation, Close, ExitDomain, Info, ThemeWrapper, lightTheme, FlagBritain, FlagNetherlands, FlagFinland, FlagNorway } from '@opengeoweb/theme';
7
7
  import i18n from 'i18next';
8
8
  import { useTranslation, I18nextProvider } from 'react-i18next';
@@ -17,7 +17,6 @@ import _, { isArray, isEqual, debounce, range } from 'lodash';
17
17
  import { Box as Box$1, styled as styled$1 } from '@mui/system';
18
18
  import { LayerSelectButtonConnect, LayerSelectConnect } from '@opengeoweb/layer-select';
19
19
  import { useQuery, QueryClient, QueryClientProvider } from '@tanstack/react-query';
20
- import { getConfig } from '@opengeoweb/authentication';
21
20
  import { handleResponse } from '@opengeoweb/api';
22
21
  import axios from 'axios';
23
22
  import { ImageWMS } from 'ol/source';
@@ -1096,7 +1095,7 @@ var RowItemCollapse$1 = function RowItemCollapse(_ref) {
1096
1095
  title: collapsedColumns != null && collapsedColumns[className] ? t('column-expand', {
1097
1096
  title: title
1098
1097
  }) : t('column-collapse'),
1099
- children: jsx(Grid2, {
1098
+ children: jsx(Grid, {
1100
1099
  className: columnClasses.columnHeader + " " + className,
1101
1100
  style: Object.assign({}, (collapsedColumns == null ? void 0 : collapsedColumns[className]) && {
1102
1101
  width: '24px',
@@ -1142,13 +1141,13 @@ var DescriptionRow = function DescriptionRow(_ref2) {
1142
1141
  gridProps = _objectWithoutPropertiesLoose(_ref2, _excluded$6);
1143
1142
  var _useCoreTranslation2 = useCoreTranslation(),
1144
1143
  t = _useCoreTranslation2.t;
1145
- return jsxs(Grid2, Object.assign({
1144
+ return jsxs(Grid, Object.assign({
1146
1145
  container: true,
1147
1146
  "data-testid": "descriptionRow",
1148
1147
  className: "descriptionRow",
1149
1148
  alignItems: "center"
1150
1149
  }, gridProps, {
1151
- children: [jsx(Grid2, {
1150
+ children: [jsx(Grid, {
1152
1151
  className: columnClasses.column1,
1153
1152
  sx: Object.assign({}, leftButtonsStyle, {
1154
1153
  justifyContent: 'center',
@@ -1158,7 +1157,7 @@ var DescriptionRow = function DescriptionRow(_ref2) {
1158
1157
  tooltipTitle: settings == null || (_settings$addLayer = settings.addLayer) == null ? void 0 : _settings$addLayer.tooltipTitle,
1159
1158
  icon: settings == null || (_settings$addLayer2 = settings.addLayer) == null ? void 0 : _settings$addLayer2.icon
1160
1159
  })
1161
- }), jsx(Grid2, {
1160
+ }), jsx(Grid, {
1162
1161
  className: "medium-layermanager columnLayerName",
1163
1162
  children: jsx(Box, {
1164
1163
  sx: styles$3.text,
@@ -1189,7 +1188,7 @@ var DescriptionRow = function DescriptionRow(_ref2) {
1189
1188
  title: (_settings$acceptanceT = settings == null || (_settings$acceptanceT2 = settings.acceptanceTime) == null ? void 0 : _settings$acceptanceT2.title) != null ? _settings$acceptanceT : t('layermanager-acceptance-time'),
1190
1189
  onToggleCollapsed: onToggleCollapsed,
1191
1190
  collapsedColumns: collapsedColumns
1192
- }), jsx(Grid2, {
1191
+ }), jsx(Grid, {
1193
1192
  className: columnClasses.loadDuration,
1194
1193
  children: jsx(Box, {
1195
1194
  sx: [styles$3.text, {
@@ -1198,7 +1197,7 @@ var DescriptionRow = function DescriptionRow(_ref2) {
1198
1197
  }],
1199
1198
  children: jsx(CloudLoading, {})
1200
1199
  })
1201
- }), jsx(Grid2, {
1200
+ }), jsx(Grid, {
1202
1201
  className: columnClasses.column6
1203
1202
  })]
1204
1203
  }));
@@ -2245,7 +2244,7 @@ var RowItemCollapse = function RowItemCollapse(_ref7) {
2245
2244
  element.style.backgroundColor = 'inherit';
2246
2245
  });
2247
2246
  });
2248
- return jsx(Grid2, {
2247
+ return jsx(Grid, {
2249
2248
  className: className,
2250
2249
  style: Object.assign({
2251
2250
  height: '32px'
@@ -2334,7 +2333,7 @@ var LayerRowUnstyled = function LayerRowUnstyled(_ref8) {
2334
2333
  // className needed for styled() utility
2335
2334
  jsx("div", {
2336
2335
  className: className,
2337
- children: jsxs(Grid2, {
2336
+ children: jsxs(Grid, {
2338
2337
  container: true,
2339
2338
  "data-testid": "layerRow-" + layerId,
2340
2339
  className: "layerRow",
@@ -2376,7 +2375,7 @@ var LayerRowUnstyled = function LayerRowUnstyled(_ref8) {
2376
2375
  DeleteLayer: layerDeleteLayout || jsx(DeleteLayer, {
2377
2376
  onClick: deleteLayer
2378
2377
  })
2379
- }), jsx(Grid2, {
2378
+ }), jsx(Grid, {
2380
2379
  className: columnClasses.column1,
2381
2380
  alignItems: "center",
2382
2381
  children: jsx(LeftButtons, {
@@ -2403,7 +2402,7 @@ var LayerRowUnstyled = function LayerRowUnstyled(_ref8) {
2403
2402
  });
2404
2403
  }
2405
2404
  })
2406
- }), isLayerMissing ? jsx(Grid2, {
2405
+ }), isLayerMissing ? jsx(Grid, {
2407
2406
  className: columnClasses.column7,
2408
2407
  children: jsx(AlertBanner, {
2409
2408
  title: t('layermanager-layer-error'),
@@ -2449,7 +2448,7 @@ var LayerRowUnstyled = function LayerRowUnstyled(_ref8) {
2449
2448
  acceptanceTime: layer.acceptanceTimeInMinutes,
2450
2449
  onChangeAcceptanceTime: changeAcceptanceTime
2451
2450
  })
2452
- }), jsx(Grid2, {
2451
+ }), jsx(Grid, {
2453
2452
  display: "flex",
2454
2453
  justifyContent: "flex-end",
2455
2454
  className: columnClasses.loadDuration,
@@ -2458,7 +2457,7 @@ var LayerRowUnstyled = function LayerRowUnstyled(_ref8) {
2458
2457
  mapId: mapId
2459
2458
  })
2460
2459
  })]
2461
- }), jsxs(Grid2, {
2460
+ }), jsxs(Grid, {
2462
2461
  className: columnClasses.column6,
2463
2462
  alignItems: "center",
2464
2463
  children: [layerShowLayerInfoLayout || jsx(ShowLayerInfo, {
@@ -2527,46 +2526,46 @@ var Accordion = function Accordion(_ref10) {
2527
2526
  children: layerName
2528
2527
  })]
2529
2528
  }),
2530
- children: jsxs(Grid2, {
2529
+ children: jsxs(Grid, {
2531
2530
  container: true,
2532
2531
  sx: {
2533
2532
  padding: '16px 32px'
2534
2533
  },
2535
2534
  spacing: 3,
2536
- children: [jsxs(Grid2, {
2535
+ children: [jsxs(Grid, {
2537
2536
  container: true,
2538
- children: [jsx(Grid2, {
2537
+ children: [jsx(Grid, {
2539
2538
  children: t('layermanager-style-title')
2540
2539
  }), Styles]
2541
- }), jsxs(Grid2, {
2540
+ }), jsxs(Grid, {
2542
2541
  container: true,
2543
2542
  sx: {
2544
2543
  '.MuiButtonBase-root': {
2545
2544
  justifyContent: 'flex-start'
2546
2545
  }
2547
2546
  },
2548
- children: [jsx(Grid2, {
2547
+ children: [jsx(Grid, {
2549
2548
  children: t('layermanager-opacity-title')
2550
2549
  }), Opacity]
2551
- }), jsxs(Grid2, {
2550
+ }), jsxs(Grid, {
2552
2551
  container: true,
2553
- children: [jsx(Grid2, {
2552
+ children: [jsx(Grid, {
2554
2553
  children: t('layermanager-acceptance-time')
2555
2554
  }), Acceptance]
2556
- }), jsxs(Grid2, {
2555
+ }), jsxs(Grid, {
2557
2556
  container: true,
2558
2557
  flexDirection: "column",
2559
- children: [jsx(Grid2, {
2558
+ children: [jsx(Grid, {
2560
2559
  children: jsx(CloudLoading, {})
2561
2560
  }), LoadDuration]
2562
- }), jsxs(Grid2, {
2561
+ }), jsxs(Grid, {
2563
2562
  container: true,
2564
2563
  justifyContent: "center",
2565
2564
  spacing: 2,
2566
- children: [jsx(Grid2, {
2565
+ children: [jsx(Grid, {
2567
2566
  sx: {},
2568
2567
  children: ShowLayerInfo
2569
- }), jsx(Grid2, {
2568
+ }), jsx(Grid, {
2570
2569
  sx: {},
2571
2570
  children: DeleteLayer
2572
2571
  })]
@@ -3287,7 +3286,8 @@ var LayerInfoButtonConnect = function LayerInfoButtonConnect(_ref) {
3287
3286
  });
3288
3287
  };
3289
3288
 
3290
- var LayerInfoDialogConnect = function LayerInfoDialogConnect() {
3289
+ var LayerInfoDialogConnect = function LayerInfoDialogConnect(_ref) {
3290
+ var source = _ref.source;
3291
3291
  var layerInfo = useSelector(function (store) {
3292
3292
  return layerSelectors.getActiveLayerInfo(store);
3293
3293
  });
@@ -3301,7 +3301,6 @@ var LayerInfoDialogConnect = function LayerInfoDialogConnect() {
3301
3301
  dialogOrder = _useSetupDialog.dialogOrder,
3302
3302
  onCloseDialog = _useSetupDialog.onCloseDialog,
3303
3303
  setDialogOrder = _useSetupDialog.setDialogOrder,
3304
- uiSource = _useSetupDialog.uiSource,
3305
3304
  isDialogOpen = _useSetupDialog.isDialogOpen;
3306
3305
  if (!layer) {
3307
3306
  return null;
@@ -3311,7 +3310,7 @@ var LayerInfoDialogConnect = function LayerInfoDialogConnect() {
3311
3310
  onClose: onCloseDialog,
3312
3311
  onMouseDown: setDialogOrder,
3313
3312
  order: dialogOrder,
3314
- source: uiSource,
3313
+ source: source,
3315
3314
  layer: layer,
3316
3315
  serviceName: currentService == null ? void 0 : currentService.name
3317
3316
  });
@@ -3584,7 +3583,7 @@ var LayerContainerRow = /*#__PURE__*/React.memo(function (_ref) {
3584
3583
  });
3585
3584
  }
3586
3585
  }, [layerLength, rowsToDisplay]);
3587
- return jsx(Grid2, Object.assign({
3586
+ return jsx(Grid, Object.assign({
3588
3587
  container: true,
3589
3588
  "data-testid": "layerContainerRow",
3590
3589
  className: "layerContainerRow",
@@ -3784,7 +3783,7 @@ var WMSServerList = function WMSServerList(_ref) {
3784
3783
  return a.name.localeCompare(b.name);
3785
3784
  });
3786
3785
  return jsxs(Fragment, {
3787
- children: [jsx(Grid2, {
3786
+ children: [jsx(Grid, {
3788
3787
  container: true,
3789
3788
  direction: "row",
3790
3789
  style: {
@@ -3824,12 +3823,12 @@ var WMSLayerTreeHeader = function WMSLayerTreeHeader(_ref) {
3824
3823
  onClickReload = _ref.onClickReload;
3825
3824
  var _useCoreTranslation = useCoreTranslation(),
3826
3825
  t = _useCoreTranslation.t;
3827
- return jsxs(Grid2, {
3826
+ return jsxs(Grid, {
3828
3827
  container: true,
3829
3828
  direction: "row",
3830
3829
  spacing: 1,
3831
3830
  justifyContent: "space-between",
3832
- children: [jsx(Grid2, {
3831
+ children: [jsx(Grid, {
3833
3832
  children: jsx(InputLabel, {
3834
3833
  shrink: true,
3835
3834
  htmlFor: "select-multiple-native",
@@ -3837,7 +3836,7 @@ var WMSLayerTreeHeader = function WMSLayerTreeHeader(_ref) {
3837
3836
  serviceName: serviceName
3838
3837
  })
3839
3838
  })
3840
- }), onClickReload && jsx(Grid2, {
3839
+ }), onClickReload && jsx(Grid, {
3841
3840
  children: jsx(CustomIconButton, {
3842
3841
  tooltipTitle: t('add-layer-popup-reload-layers'),
3843
3842
  "data-testid": "reloadLayers",
@@ -4409,12 +4408,12 @@ var AddLayersPopup = function AddLayersPopup(_ref) {
4409
4408
  children: jsxs(Fragment, {
4410
4409
  children: [jsx(DialogContentText, {
4411
4410
  children: t('wms-loader-description')
4412
- }), jsx(Grid2, {
4411
+ }), jsx(Grid, {
4413
4412
  container: true,
4414
4413
  direction: "row",
4415
4414
  alignItems: "center",
4416
4415
  mb: 1,
4417
- children: jsx(Grid2, {
4416
+ children: jsx(Grid, {
4418
4417
  size: 12,
4419
4418
  children: jsx(TextField, {
4420
4419
  margin: "dense",
@@ -4459,19 +4458,19 @@ var AddLayersPopup = function AddLayersPopup(_ref) {
4459
4458
  }
4460
4459
  })
4461
4460
  })
4462
- }), jsxs(Grid2, {
4461
+ }), jsxs(Grid, {
4463
4462
  container: true,
4464
4463
  direction: "row",
4465
4464
  alignItems: "center",
4466
4465
  spacing: 3,
4467
- children: [jsx(Grid2, {
4466
+ children: [jsx(Grid, {
4468
4467
  size: 4,
4469
4468
  children: jsx(WMSServerList, {
4470
4469
  availableServices: services,
4471
4470
  service: activeService,
4472
4471
  handleChangeService: handleChangeService
4473
4472
  })
4474
- }), jsx(Grid2, {
4473
+ }), jsx(Grid, {
4475
4474
  size: 8,
4476
4475
  children: onRenderTree ? onRenderTree(activeService) : jsx(WMSLayerTreeConnect, {
4477
4476
  mapId: "",
@@ -4554,7 +4553,7 @@ var BaseLayerRow = function BaseLayerRow(_ref2) {
4554
4553
  settings = _ref2.settings,
4555
4554
  gridProps = _objectWithoutPropertiesLoose(_ref2, _excluded$3);
4556
4555
  var theme = useTheme();
4557
- return jsxs(Grid2, Object.assign({
4556
+ return jsxs(Grid, Object.assign({
4558
4557
  container: true,
4559
4558
  "data-testid": "baseLayerRow",
4560
4559
  className: "addLayer-column",
@@ -4563,7 +4562,7 @@ var BaseLayerRow = function BaseLayerRow(_ref2) {
4563
4562
  height: '36px'
4564
4563
  }, theme.palette.geowebColors.layerManager.baseLayerRow.root)
4565
4564
  }, gridProps, {
4566
- children: [jsxs(Grid2, {
4565
+ children: [jsxs(Grid, {
4567
4566
  sx: [{
4568
4567
  marginTop: '-2px'
4569
4568
  }, leftButtonsStyle],
@@ -4578,7 +4577,7 @@ var BaseLayerRow = function BaseLayerRow(_ref2) {
4578
4577
  });
4579
4578
  }
4580
4579
  }), settings == null || (_settings$baseLayerRo2 = settings.baseLayerRow) == null ? void 0 : _settings$baseLayerRo2.title]
4581
- }), jsx(Grid2, {
4580
+ }), jsx(Grid, {
4582
4581
  className: columnClasses.baseLayer,
4583
4582
  children: jsx(BaseLayersConnect, {
4584
4583
  mapId: mapId,
@@ -4696,14 +4695,14 @@ var ProjectionSelect = function ProjectionSelect(_ref) {
4696
4695
  return projection.value === currentProjection;
4697
4696
  });
4698
4697
  var title = t('projection-title');
4699
- return jsxs(Grid2, {
4698
+ return jsxs(Grid, {
4700
4699
  container: true,
4701
4700
  className: "setProjection-column",
4702
4701
  sx: {
4703
4702
  width: '100%',
4704
4703
  height: '36px'
4705
4704
  },
4706
- children: [jsx(Grid2, {
4705
+ children: [jsx(Grid, {
4707
4706
  sx: [{
4708
4707
  marginTop: '-2px'
4709
4708
  }, leftButtonsStyle],
@@ -4715,7 +4714,7 @@ var ProjectionSelect = function ProjectionSelect(_ref) {
4715
4714
  disabled: true,
4716
4715
  children: jsx(WorldMapProjection, {})
4717
4716
  })
4718
- }), jsx(Grid2, {
4717
+ }), jsx(Grid, {
4719
4718
  className: columnClasses.baseLayer,
4720
4719
  children: jsx(FormControl, {
4721
4720
  style: {
@@ -4916,7 +4915,7 @@ var LayerManager = function LayerManager(_ref) {
4916
4915
  title: error,
4917
4916
  shouldClose: true
4918
4917
  })
4919
- }), jsxs(Grid2, {
4918
+ }), jsxs(Grid, {
4920
4919
  container: true,
4921
4920
  "data-testid": "layerManagerRowContainer",
4922
4921
  sx: styles$1.layerRowContainer,
@@ -5128,12 +5127,14 @@ var LayerManagerConnect = function LayerManagerConnect(_ref) {
5128
5127
  },
5129
5128
  addLayerComponent: jsx(LayerSelectButtonConnect, {
5130
5129
  mapId: mapId,
5131
- source: source,
5130
+ source: uiSource,
5132
5131
  isMultiMap: isMultiMap
5133
5132
  })
5134
- }), !isDocked && jsx(LayerInfoDialogConnect, {}), !isDocked && jsx(LayerSelectConnect, {})]
5133
+ }), !isDocked && jsx(LayerInfoDialogConnect, {
5134
+ source: uiSource
5135
+ }), !isDocked && jsx(LayerSelectConnect, {})]
5135
5136
  });
5136
- }, [bounds, dialogOrder, dockedLayerManagerSize, initialMapId, isDialogOpen, isDocked, isMultiMap, mapId, onCloseDialog, onToggleDock, preloadedAvailableBaseLayers, preloadedBaseServices, setDialogOrder, showMapIdInTitle, nonEmptyTitle, uiError, uiIsLoading, uiSource, source]);
5137
+ }, [bounds, dialogOrder, dockedLayerManagerSize, initialMapId, isDialogOpen, isDocked, isMultiMap, mapId, onCloseDialog, onToggleDock, preloadedAvailableBaseLayers, preloadedBaseServices, setDialogOrder, showMapIdInTitle, nonEmptyTitle, uiError, uiIsLoading, uiSource]);
5137
5138
  };
5138
5139
 
5139
5140
  var LayerManagerMapButtonConnect = function LayerManagerMapButtonConnect(_ref) {
@@ -5743,7 +5744,7 @@ var MyMapLocation = function MyMapLocation(_ref) {
5743
5744
  * Copyright 2025 - Finnish Meteorological Institute (FMI)
5744
5745
  * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
5745
5746
  * */
5746
- var config = getConfig();
5747
+ var config = sessionStorageProvider.getConfig();
5747
5748
  var locationBaseUrl = config.GW_LOCATION_BASE_URL || '';
5748
5749
  var getLocationList = function getLocationList(search) {
5749
5750
  return fetch(locationBaseUrl + "/locations?search=" + search).then(handleResponse);
@@ -6528,7 +6529,7 @@ var GetFeatureInfoDialog = function GetFeatureInfoDialog(_ref) {
6528
6529
  if (!result) {
6529
6530
  return null;
6530
6531
  }
6531
- return jsxs(Grid2, {
6532
+ return jsxs(Grid, {
6532
6533
  sx: {
6533
6534
  margin: '4px 6px 4px 6px',
6534
6535
  padding: '6px',
@@ -7356,7 +7357,8 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
7356
7357
  zoomControls: true
7357
7358
  } : _ref$controls,
7358
7359
  initialBbox = _ref.initialBbox,
7359
- holdShiftToScroll = _ref.holdShiftToScroll;
7360
+ holdShiftToScroll = _ref.holdShiftToScroll,
7361
+ source = _ref.source;
7360
7362
  var store = useStore();
7361
7363
  var mapRef = React.useRef(null);
7362
7364
  var _useGetOpenLayersView = useGetOpenLayersView(mapId, store),
@@ -7692,6 +7694,7 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
7692
7694
  isFocused: isActiveWindowId,
7693
7695
  isMouseWheelZoomEnabled: !isTimeScrollingEnabled,
7694
7696
  holdShiftToScroll: holdShiftToScroll,
7697
+ mapId: mapId,
7695
7698
  children: [jsxs("div", {
7696
7699
  style: layerDivStyle,
7697
7700
  children: [baseLayers.map(function (layer, zIndex) {
@@ -7746,10 +7749,12 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
7746
7749
  homeExtent: homeExtent
7747
7750
  }), (controls == null ? void 0 : controls.layerManagerAndLegend) && jsxs(Fragment, {
7748
7751
  children: [jsx(LayerManagerMapButtonConnect, {
7749
- mapId: mapId
7752
+ mapId: mapId,
7753
+ source: source
7750
7754
  }), jsx(LegendMapButtonConnect, {
7751
7755
  mapId: mapId,
7752
- multiLegend: controls == null ? void 0 : controls.multiLegend
7756
+ multiLegend: controls == null ? void 0 : controls.multiLegend,
7757
+ source: source
7753
7758
  })]
7754
7759
  }), (controls == null ? void 0 : controls.dimensionSelect) && jsx(MultiDimensionSelectMapButtonsConnect, {
7755
7760
  mapId: mapId
@@ -8178,12 +8183,14 @@ var NowButtonConnect = function NowButtonConnect(_ref) {
8178
8183
  * Expects the following props:
8179
8184
  * @param {string} mapId mapId: string - Id of the map
8180
8185
  * @param {string} sourceId mapId: string - Id of the source
8186
+ * @param {boolean} isVisible mapId: boolean - Whether the time slider is visible or not
8181
8187
  * @example
8182
- * ``` <TimeSliderButtonsConnect mapId={mapId} sourceId={sourceId} />```
8188
+ * ``` <TimeSliderButtonsConnect mapId={mapId} sourceId={sourceId} isVisible={isVisible} />```
8183
8189
  */
8184
8190
  var TimeSliderButtonsConnectComponent = function TimeSliderButtonsConnectComponent(_ref) {
8185
8191
  var sourceId = _ref.sourceId,
8186
- mapId = _ref.mapId;
8192
+ mapId = _ref.mapId,
8193
+ isVisible = _ref.isVisible;
8187
8194
  return jsx(TimeSliderButtons, {
8188
8195
  nowBtn: jsx(NowButtonConnect, {
8189
8196
  mapId: mapId,
@@ -8205,7 +8212,8 @@ var TimeSliderButtonsConnectComponent = function TimeSliderButtonsConnectCompone
8205
8212
  forwardBtn: jsx(BackwardForwardStepButtonConnect, {
8206
8213
  mapId: mapId,
8207
8214
  isForwardStep: true
8208
- })
8215
+ }),
8216
+ isVisible: isVisible
8209
8217
  });
8210
8218
  };
8211
8219
  var TimeSliderButtonsConnect = /*#__PURE__*/React.memo(TimeSliderButtonsConnectComponent);
@@ -8674,6 +8682,7 @@ var TimeSliderConnect = function TimeSliderConnect(_ref) {
8674
8682
  },
8675
8683
  selectedTime: selectedTime,
8676
8684
  buttons: jsx(TimeSliderButtonsConnect, {
8685
+ isVisible: isVisible,
8677
8686
  mapId: mapId,
8678
8687
  sourceId: sourceId
8679
8688
  }),
@@ -8931,50 +8940,79 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
8931
8940
  return jsxs(Box, {
8932
8941
  ref: mapWindowRef,
8933
8942
  sx: {
8934
- width: '100%',
8935
- height: '100%',
8936
8943
  position: 'relative',
8937
- overflow: 'hidden'
8944
+ minHeight: '100dvh',
8945
+ display: 'flex'
8938
8946
  },
8939
8947
  "data-testid": "ConfigurableMap",
8940
8948
  children: [title && jsx(Typography, {
8941
8949
  "data-testid": "mapTitle",
8942
8950
  sx: titleStyle,
8943
8951
  children: title
8952
+ }), jsxs(Box, {
8953
+ sx: {
8954
+ flex: '1'
8955
+ },
8956
+ children: [useOl ? jsx(OlMapViewConnect, {
8957
+ controls: mapControlConfig,
8958
+ displayTimeInMap: displayTimeInMap,
8959
+ showScaleBar: false,
8960
+ shouldAutoFetch: shouldAutoFetch,
8961
+ mapId: mapId,
8962
+ initialBbox: initialBbox,
8963
+ shouldDisablePrefetching: shouldDisablePrefetching,
8964
+ tileServerSettings: tileServerSettings,
8965
+ children: children
8966
+ }) : jsx(MapViewConnect, {
8967
+ controls: mapControlConfig,
8968
+ displayTimeInMap: displayTimeInMap,
8969
+ showScaleBar: false,
8970
+ shouldAutoFetch: shouldAutoFetch,
8971
+ mapId: mapId,
8972
+ shouldDisablePrefetching: shouldDisablePrefetching,
8973
+ tileServerSettings: tileServerSettings,
8974
+ children: children
8975
+ }), showClock && jsx(TimeSliderClockConnect, {
8976
+ mapId: mapId
8977
+ })]
8944
8978
  }), !disableTimeSlider && jsx(Box, {
8945
8979
  sx: {
8946
8980
  position: 'absolute',
8947
- left: '0px',
8948
- bottom: '0px',
8949
- zIndex: 1000,
8950
- width: '100%'
8981
+ width: '100%',
8982
+ paddingRight: 'env(safe-area-inset-right)',
8983
+ '@media screen and (orientation: landscape)': {
8984
+ minHeight: {
8985
+ xs: '125px',
8986
+ sm: '100px',
8987
+ md: '80px'
8988
+ },
8989
+ paddingLeft: {
8990
+ xs: '40px',
8991
+ md: 'env(safe-area-inset-right)'
8992
+ },
8993
+ bottom: {
8994
+ xs: 'max(5px, 7dvh)',
8995
+ sm: 'max(5px, 6dvh)',
8996
+ md: 'max(5px, 6dvh)',
8997
+ xl: 'max(5px, 4dvh)'
8998
+ }
8999
+ },
9000
+ '@media screen and (orientation: portrait)': {
9001
+ minHeight: {
9002
+ xs: '110px',
9003
+ sm: '100px',
9004
+ md: '80px'
9005
+ },
9006
+ bottom: 'max(5px, 6dvh)',
9007
+ paddingLeft: 'env(safe-area-inset-left)'
9008
+ },
9009
+ zIndex: 1000
8951
9010
  },
8952
9011
  children: jsx(TimeSliderConnect, {
8953
9012
  mapId: id,
8954
9013
  sourceId: id,
8955
9014
  mapWindowRef: mapWindowRef
8956
9015
  })
8957
- }), useOl ? jsx(OlMapViewConnect, {
8958
- controls: mapControlConfig,
8959
- displayTimeInMap: displayTimeInMap,
8960
- showScaleBar: false,
8961
- shouldAutoFetch: shouldAutoFetch,
8962
- mapId: mapId,
8963
- initialBbox: initialBbox,
8964
- shouldDisablePrefetching: shouldDisablePrefetching,
8965
- tileServerSettings: tileServerSettings,
8966
- children: children
8967
- }) : jsx(MapViewConnect, {
8968
- controls: mapControlConfig,
8969
- displayTimeInMap: displayTimeInMap,
8970
- showScaleBar: false,
8971
- shouldAutoFetch: shouldAutoFetch,
8972
- mapId: mapId,
8973
- shouldDisablePrefetching: shouldDisablePrefetching,
8974
- tileServerSettings: tileServerSettings,
8975
- children: children
8976
- }), showClock && jsx(TimeSliderClockConnect, {
8977
- mapId: mapId
8978
9016
  })]
8979
9017
  });
8980
9018
  }, [mapId, title, id, useOl, initialBbox, mapControlConfig, tileServerSettings, disableTimeSlider, displayTimeInMap, shouldAutoFetch, shouldDisablePrefetching, children, showClock]);
@@ -9306,13 +9344,14 @@ var componentsLookUp = function componentsLookUp(_ref) {
9306
9344
  switch (componentType) {
9307
9345
  case 'Map':
9308
9346
  {
9309
- var _mapPreset$proj;
9347
+ var _mapPreset$proj, _mapPreset$proj2;
9310
9348
  var mapPreset = initialProps.mapPreset,
9311
9349
  mapControls = initialProps.mapControls,
9312
9350
  shouldDisplayDrawControls = initialProps.shouldDisplayDrawControls,
9313
9351
  displaySearchButtonInMap = initialProps.displaySearchButtonInMap;
9314
9352
  return jsx(ConfigurableMapConnect, Object.assign({}, mapPreset, {
9315
9353
  initialBbox: mapPreset == null || (_mapPreset$proj = mapPreset.proj) == null ? void 0 : _mapPreset$proj.bbox,
9354
+ srs: mapPreset == null || (_mapPreset$proj2 = mapPreset.proj) == null ? void 0 : _mapPreset$proj2.srs,
9316
9355
  id: id,
9317
9356
  "data-testid": "coreConfigurableMapConnect",
9318
9357
  displayGetFeatureInfoButtonInMap: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/core",
3
- "version": "12.2.0",
3
+ "version": "12.4.1",
4
4
  "description": "GeoWeb Core library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,32 +8,31 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/shared": "12.2.0",
12
- "react-redux": "^8.1.3",
13
- "@opengeoweb/store": "12.2.0",
14
- "@opengeoweb/timeslider": "12.2.0",
15
- "@reduxjs/toolkit": "^1.9.7",
16
- "@opengeoweb/webmap-react": "12.2.0",
17
- "@opengeoweb/webmap": "12.2.0",
18
- "@opengeoweb/theme": "12.2.0",
11
+ "@opengeoweb/shared": "12.4.1",
12
+ "react-redux": "^9.2.0",
13
+ "@opengeoweb/store": "12.4.1",
14
+ "@opengeoweb/timeslider": "12.4.1",
15
+ "@reduxjs/toolkit": "^2.6.1",
16
+ "@opengeoweb/webmap-react": "12.4.1",
17
+ "@opengeoweb/webmap": "12.4.1",
18
+ "@opengeoweb/theme": "12.4.1",
19
19
  "axios": "^1.7.7",
20
- "@opengeoweb/layer-select": "12.2.0",
20
+ "@opengeoweb/layer-select": "12.4.1",
21
21
  "lodash": "^4.17.21",
22
22
  "ol": "^10.4.0",
23
23
  "react-sortablejs": "^6.1.4",
24
24
  "sortablejs": "^1.15.1",
25
- "@mui/system": "^6.1.1",
26
- "@opengeoweb/snackbar": "12.2.0",
25
+ "@mui/system": "^7.0.1",
26
+ "@opengeoweb/snackbar": "12.4.1",
27
27
  "react-router-dom": "^6.21.0",
28
28
  "react-draggable": "^4.4.6",
29
- "i18next": "^23.11.5",
29
+ "i18next": "^25.0.1",
30
30
  "react-i18next": "^15.1.1",
31
31
  "dompurify": "^3.0.6",
32
- "@mui/material": "^6.1.1",
32
+ "@mui/material": "^7.0.1",
33
33
  "@sentry/react": "^8.34.0",
34
- "@opengeoweb/authentication": "12.2.0",
35
34
  "@tanstack/react-query": "^5.69.2",
36
- "@opengeoweb/api": "12.2.0"
35
+ "@opengeoweb/api": "12.4.1"
37
36
  },
38
37
  "peerDependencies": {
39
38
  "react": "18",
@@ -1,2 +1,7 @@
1
1
  import React from 'react';
2
- export declare const LayerInfoDialogConnect: React.FC;
2
+ import { uiTypes } from '@opengeoweb/store';
3
+ interface LayerInfoDialogConnectProps {
4
+ source: uiTypes.Source;
5
+ }
6
+ export declare const LayerInfoDialogConnect: React.FC<LayerInfoDialogConnectProps>;
7
+ export {};
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { Grid2 as Grid } from '@mui/material';
2
+ import { Grid } from '@mui/material';
3
3
  import { layerTypes, serviceTypes } from '@opengeoweb/store';
4
4
  import { LayerManagerCustomSettings } from '../LayerManagerUtils';
5
5
  interface BaseLayerRowProps extends React.ComponentProps<typeof Grid> {
@@ -1,4 +1,4 @@
1
- import { Grid2 as Grid } from '@mui/material';
1
+ import { Grid } from '@mui/material';
2
2
  import * as React from 'react';
3
3
  import { uiTypes } from '@opengeoweb/store';
4
4
  import { LayerManagerCustomSettings } from '../LayerManagerUtils';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { Grid2 as Grid } from '@mui/material';
2
+ import { Grid } from '@mui/material';
3
3
  import { LayerManagerCustomSettings } from '../LayerManagerUtils';
4
4
  interface LayerContainerRowProps extends React.ComponentProps<typeof Grid> {
5
5
  mapId: string;
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Bbox } from '@opengeoweb/webmap';
3
3
  import { MapViewProps } from '@opengeoweb/webmap-react';
4
+ import { Source } from '@opengeoweb/shared';
4
5
  export interface MapControlsProps {
5
6
  mapControlsPositionTop?: number;
6
7
  search?: boolean;
@@ -20,6 +21,7 @@ export interface MapViewConnectProps extends MapViewProps {
20
21
  showLayerInfo?: boolean;
21
22
  passiveMap?: boolean;
22
23
  initialBbox?: Bbox;
24
+ source?: Source;
23
25
  }
24
26
  export declare const ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION = "ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION";
25
27
  export declare const ORIGIN_REACTMAPVIEWCONNECT_ONUPDATELAYERINFO = "ORIGIN_REACTMAPVIEWCONNECT_ONUPDATELAYERINFO";
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Bbox, TileServerSettings } from '@opengeoweb/webmap';
3
+ import { Source } from '@opengeoweb/shared';
3
4
  import { MapControlsProps } from './MapViewConnect';
4
5
  export interface OlMapViewConnectProps {
5
6
  mapId: string;
@@ -12,6 +13,7 @@ export interface OlMapViewConnectProps {
12
13
  shouldAutoFetch?: number | boolean;
13
14
  shouldDisablePrefetching?: boolean;
14
15
  tileServerSettings?: TileServerSettings;
16
+ source?: Source;
15
17
  }
16
18
  /**
17
19
  * Connected component used to display the map and selected layers.
@@ -13,7 +13,7 @@ export declare const SimpleTimeSliderConnect: import("react-redux").ConnectedCom
13
13
  setTime?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/generic/types").SetTimePayload, string> | undefined;
14
14
  syncGroupAddSource?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/generic/syncGroups/types").SyncGroupsAddSourcePayload, "synchronizationGroupsReducer/syncGroupAddSource"> | undefined;
15
15
  syncGroupRemoveSource?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/generic/syncGroups/types").SyncGroupRemoveSourcePayload, "synchronizationGroupsReducer/syncGroupRemoveSource"> | undefined;
16
- context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
17
- store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
16
+ context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction> | null> | undefined;
17
+ store?: import("redux").Store<any, import("redux").UnknownAction, unknown> | undefined;
18
18
  }>;
19
19
  export {};
@@ -9,12 +9,12 @@ export declare const AutoUpdateButtonConnect: import("react-redux").ConnectedCom
9
9
  mapId: string;
10
10
  isAutoUpdating?: boolean | undefined;
11
11
  toggleAutoUpdate?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/map/types").ToggleAutoUpdatePayload, "mapReducer/toggleAutoUpdate"> | undefined;
12
- context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
13
- store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
12
+ context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction> | null> | undefined;
13
+ store?: import("redux").Store<any, import("redux").UnknownAction, unknown> | undefined;
14
14
  }>, {
15
15
  mapId: string;
16
- context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
17
- store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
16
+ context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction> | null> | undefined;
17
+ store?: import("redux").Store<any, import("redux").UnknownAction, unknown> | undefined;
18
18
  isAutoUpdating?: boolean | undefined;
19
19
  toggleAutoUpdate?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/map/types").ToggleAutoUpdatePayload, "mapReducer/toggleAutoUpdate"> | undefined;
20
20
  }>;
@@ -39,7 +39,7 @@ export declare const PlayButtonConnect: import("react-redux").ConnectedComponent
39
39
  isAnimating: boolean;
40
40
  id: string;
41
41
  } | undefined;
42
- context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
43
- store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
42
+ context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction> | null> | undefined;
43
+ store?: import("redux").Store<any, import("redux").UnknownAction, unknown> | undefined;
44
44
  }>;
45
45
  export {};
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  interface TimeSliderButtonsConnectProps {
3
3
  sourceId: string;
4
4
  mapId: string;
5
+ isVisible: boolean | undefined;
5
6
  }
6
7
  export declare const TimeSliderButtonsConnect: React.NamedExoticComponent<TimeSliderButtonsConnectProps>;
7
8
  export {};
@@ -23,7 +23,7 @@ export declare const TimeSliderCurrentTimeBoxConnect: import("react-redux").Conn
23
23
  span?: number | undefined;
24
24
  isAutoUpdating?: boolean | undefined;
25
25
  setCenterTime?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/map/types").SetTimeSliderCenterTimePayload, "mapReducer/setTimeSliderCenterTime"> | undefined;
26
- context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
27
- store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
26
+ context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction> | null> | undefined;
27
+ store?: import("redux").Store<any, import("redux").UnknownAction, unknown> | undefined;
28
28
  }>;
29
29
  export {};
@@ -18,7 +18,7 @@ declare const WMSLayerTreeConnect: import("react-redux").ConnectedComponent<Reac
18
18
  setBaseLayers?: import("@reduxjs/toolkit").ActionCreatorWithPayload<layerTypes.SetBaseLayersPayload, "layerReducer/setBaseLayers"> | undefined;
19
19
  addAvailableBaseLayer?: import("@reduxjs/toolkit").ActionCreatorWithPayload<layerTypes.AddAvailableBaseLayerPayload, "layerReducer/addAvailableBaseLayer"> | undefined;
20
20
  loadedLayers?: layerTypes.Layer[] | undefined;
21
- context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
22
- store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
21
+ context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction> | null> | undefined;
22
+ store?: import("redux").Store<any, import("redux").UnknownAction, unknown> | undefined;
23
23
  }>;
24
24
  export default WMSLayerTreeConnect;
@@ -1,13 +1,13 @@
1
1
  import { SnackbarModuleStore } from '@opengeoweb/snackbar';
2
2
  import { WebMapStateModuleState, SynchronizationGroupModuleState, UIModuleState } from '@opengeoweb/store';
3
- import { ToolkitStore } from '@reduxjs/toolkit/dist/configureStore';
3
+ import { Store } from '@reduxjs/toolkit';
4
4
  export declare const coreReducerMap: {
5
- webmap: import("redux").Reducer<import("dist/libs/store/src/store/map/types").WebMapState, import("redux").AnyAction>;
6
- services: import("redux").Reducer<import("dist/libs/store/src/store/map/types").ServiceState, import("redux").AnyAction>;
7
- layers: import("redux").Reducer<import("dist/libs/store/src/store/map/types").LayerState, import("redux").AnyAction>;
8
- syncGroups: import("redux").Reducer<import("dist/libs/store/src/store/generic/syncGroups/types").SynchronizationGroupState, import("redux").AnyAction>;
9
- ui: import("redux").Reducer<import("dist/libs/store/src/store/ui/types").UIStoreType, import("redux").AnyAction>;
10
- snackbar: import("redux").Reducer<import("dist/libs/snackbar/src/lib/store/types").SnackbarState, import("redux").AnyAction>;
5
+ webmap: import("redux").Reducer<import("dist/libs/store/src/store/map/types").WebMapState, import("redux").UnknownAction, import("dist/libs/store/src/store/map/types").WebMapState>;
6
+ services: import("redux").Reducer<import("dist/libs/store/src/store/map/types").ServiceState, import("redux").UnknownAction, import("dist/libs/store/src/store/map/types").ServiceState>;
7
+ layers: import("redux").Reducer<import("dist/libs/store/src/store/map/types").LayerState, import("redux").UnknownAction, import("dist/libs/store/src/store/map/types").LayerState>;
8
+ syncGroups: import("redux").Reducer<import("dist/libs/store/src/store/generic/syncGroups/types").SynchronizationGroupState, import("redux").UnknownAction, import("dist/libs/store/src/store/generic/syncGroups/types").SynchronizationGroupState>;
9
+ ui: import("redux").Reducer<import("dist/libs/store/src/store/ui/types").UIStoreType, import("redux").UnknownAction, import("dist/libs/store/src/store/ui/types").UIStoreType>;
10
+ snackbar: import("redux").Reducer<import("dist/libs/snackbar/src/lib/store/types").SnackbarState, import("redux").UnknownAction, import("dist/libs/snackbar/src/lib/store/types").SnackbarState>;
11
11
  };
12
- export declare const coreMiddlewares: import("@reduxjs/toolkit").ListenerMiddleware<import("@opengeoweb/store").CoreAppStore, import("@reduxjs/toolkit").ThunkDispatch<import("@opengeoweb/store").CoreAppStore, unknown, import("redux").AnyAction>, unknown>[];
13
- export declare const createMockStore: (mockState?: WebMapStateModuleState | SynchronizationGroupModuleState | UIModuleState | SnackbarModuleStore) => ToolkitStore;
12
+ export declare const coreMiddlewares: import("@reduxjs/toolkit").ListenerMiddleware<import("@opengeoweb/store").CoreAppStore, import("redux-thunk").ThunkDispatch<import("@opengeoweb/store").CoreAppStore, unknown, import("redux").UnknownAction>, unknown>[];
13
+ export declare const createMockStore: (mockState?: WebMapStateModuleState | SynchronizationGroupModuleState | UIModuleState | SnackbarModuleStore) => Store;