@opengeoweb/core 9.25.2 → 9.26.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/index.esm.js CHANGED
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default, { useState, useCallback, useRef } from 'react';
4
4
  import { Grid, Box, MenuItem, Typography, useTheme, Popper, Fade, Tooltip, styled, LinearProgress, FormControl, InputLabel, Paper, List, ListItemButton, ListItemText, CircularProgress, ListSubheader, Dialog, DialogTitle, DialogContent, DialogContentText, TextField, InputAdornment, DialogActions, Button, circularProgressClasses, ListItemIcon, Checkbox } from '@mui/material';
5
- import { SHARED_NAMESPACE, sharedTranslations, CustomIconButton, TooltipSelect, AlertIcon, sliderHeaderStyle, CustomSlider, ToggleMenu, CustomTooltip, tooltipContainerStyles, renderCounter, AlertBanner, CustomAccordion, calculateStartSize, ToolContainerDraggable, useDebounce, dateUtils, withEggs, ErrorBoundary } from '@opengeoweb/shared';
5
+ import { SHARED_NAMESPACE, sharedTranslations, CustomIconButton, TooltipSelect, AlertIcon, sliderHeaderStyle, CustomSlider, ToggleMenu, CustomTooltip, tooltipContainerStyles, renderCounter, AlertBanner, CustomAccordion, PROJECTION, calculateStartSize, ToolContainerDraggable, useDebounce, dateUtils, withEggs, ErrorBoundary } from '@opengeoweb/shared';
6
6
  import { CollapseSmall, CollapseMedium, CollapseLarge, CollapseWindow, ExpandWindow, LayersAdd, CloudLoading, Copy, None, FastForward, AutoUpdateActive, Both, Visibility, VisibilityOff, Delete, DragHandle as DragHandle$1, Cached, Add, MapAdd, WorldMapProjection, Layers, ExitDomain, Info, Search, Exclamation, MyLocation, Close, ThemeWrapper, lightTheme } from '@opengeoweb/theme';
7
7
  import i18n from 'i18next';
8
8
  import { useTranslation, initReactI18next, I18nextProvider } from 'react-i18next';
@@ -2092,6 +2092,7 @@ const HeaderOptions = ({
2092
2092
  *
2093
2093
  * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2094
2094
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
2095
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2095
2096
  * */
2096
2097
  const iconButtonSize = 30;
2097
2098
  const columnClasses = {
@@ -4392,6 +4393,7 @@ const OpacitySelectConnect = ({
4392
4393
  *
4393
4394
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4394
4395
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4396
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4395
4397
  * */
4396
4398
  const useLayerDimensions = (layerId, mapId) => {
4397
4399
  const dispatch = useDispatch();
@@ -5973,6 +5975,7 @@ const WMSLayerTreeConnect = connectRedux$3(ConnectedTree);
5973
5975
  *
5974
5976
  * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5975
5977
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
5978
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5976
5979
  * */
5977
5980
  const isValidService = service => Object.prototype.hasOwnProperty.call(service, 'url');
5978
5981
  const filterServices = presetArray => {
@@ -6147,6 +6150,7 @@ var initialPreset = {
6147
6150
  *
6148
6151
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6149
6152
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
6153
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6150
6154
  * */
6151
6155
  const {
6152
6156
  services,
@@ -6486,79 +6490,63 @@ const HeaderOptionsConnect = ({
6486
6490
  });
6487
6491
  };
6488
6492
 
6489
- const availableProjections = [{
6490
- name: 'Europe Mercator',
6491
- value: 'EPSG:3857',
6493
+ const availableProjections = [Object.assign(Object.assign({}, PROJECTION.EPSG_3857), {
6492
6494
  bbox: {
6493
6495
  left: -1342329.1465696818,
6494
6496
  bottom: 3920707.9160590963,
6495
6497
  right: 4520696.671030318,
6496
6498
  top: 11588870.593609098
6497
6499
  }
6498
- }, {
6499
- name: 'Northern Hemisphere North Pole',
6500
- value: 'EPSG:3575',
6500
+ }), Object.assign(Object.assign({}, PROJECTION.EPSG_3575), {
6501
6501
  bbox: {
6502
6502
  left: -6974291.292427451,
6503
6503
  bottom: -4143517.10430627,
6504
6504
  right: 7160410.554092634,
6505
6505
  top: 3403105.194804561
6506
6506
  }
6507
- }, {
6508
- name: 'Sea Ice Polar Stereographic North',
6509
- value: 'EPSG:3411',
6507
+ }), Object.assign(Object.assign({}, PROJECTION.EPSG_3411), {
6510
6508
  bbox: {
6511
6509
  left: -8586591.790921725,
6512
6510
  bottom: -6905418.5308475215,
6513
6511
  right: 11520691.230089426,
6514
6512
  top: 3830009.2177224844
6515
6513
  }
6516
- }, {
6517
- name: 'Sea Ice Polar Stereographic South',
6518
- value: 'EPSG:3412',
6514
+ }), Object.assign(Object.assign({}, PROJECTION.EPSG_3412), {
6519
6515
  bbox: {
6520
6516
  left: -23805428.64174738,
6521
6517
  bottom: -13538921.571034307,
6522
6518
  right: 24880766.607377376,
6523
6519
  top: 12454999.681458568
6524
6520
  }
6525
- }, {
6526
- name: 'Europe Polar Stereographic',
6527
- value: 'EPSG:32661',
6521
+ }), Object.assign(Object.assign({}, PROJECTION.EPSG_32661), {
6528
6522
  bbox: {
6529
6523
  left: -3078812.468202346,
6530
6524
  bottom: -5551735.866551964,
6531
6525
  right: 9359725.15673533,
6532
6526
  top: 1089291.7566655697
6533
6527
  }
6534
- }, {
6535
- name: 'Europe Robinson',
6536
- value: 'EPSG:54030',
6528
+ }), Object.assign(Object.assign({}, PROJECTION.EPSG_54030), {
6537
6529
  bbox: {
6538
6530
  left: -2020532.0269369134,
6539
6531
  bottom: 4102671.9257380506,
6540
6532
  right: 3149912.1784659545,
6541
6533
  top: 6863210.489656053
6542
6534
  }
6543
- }, {
6544
- name: 'The Netherlands (28992)',
6545
- value: 'EPSG:28992',
6535
+ }), Object.assign(Object.assign({}, PROJECTION.EPSG_28992), {
6546
6536
  bbox: {
6547
6537
  left: -875225.6439854703,
6548
6538
  bottom: -36779.36485252716,
6549
6539
  right: 1356591.6745628114,
6550
6540
  top: 1154804.4779891823
6551
6541
  }
6552
- }, {
6553
- name: 'ETRS89 / TM35FIN(E,N) -- Finland',
6554
- value: 'EPSG:3067',
6542
+ }), Object.assign(Object.assign({}, PROJECTION.EPSG_3067), {
6555
6543
  bbox: {
6556
6544
  left: -1197402.0,
6557
6545
  bottom: 6439686.0,
6558
6546
  right: 2090705,
6559
6547
  top: 7975202
6560
6548
  }
6561
- }];
6549
+ })];
6562
6550
  const ProjectionSelect = ({
6563
6551
  currentProjection,
6564
6552
  onChangeProjection
@@ -7747,6 +7735,7 @@ const TOUCH_PAN_STEP_PERCENTAGE = 0.02;
7747
7735
  *
7748
7736
  * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7749
7737
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
7738
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7750
7739
  * */
7751
7740
  const useKeyboardZoomAndPan = (mapIsActive, mapId) => {
7752
7741
  React.useEffect(() => {
@@ -8198,6 +8187,7 @@ const LegendMapButtonConnect = ({
8198
8187
  *
8199
8188
  * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8200
8189
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
8190
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8201
8191
  * */
8202
8192
  /**
8203
8193
  * Get the title for this WMS layer based on its layerId. If not defined, layerId is used instead.
@@ -8250,6 +8240,7 @@ const getLayersToUpdate = (layers, mapId) => {
8250
8240
  *
8251
8241
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8252
8242
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
8243
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8253
8244
  * */
8254
8245
  const sanitizeHTML = htmlToBeSanitezed => ({
8255
8246
  __html: DOMPurify.sanitize(htmlToBeSanitezed, {
@@ -8785,6 +8776,7 @@ const SearchControlConnect = ({
8785
8776
  *
8786
8777
  * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8787
8778
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
8779
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8788
8780
  * */
8789
8781
  const useTurnOffAutoUpdateIfItsOn = mapId => {
8790
8782
  const isAutoUpdating = useSelector(store => mapSelectors.isAutoUpdating(store, mapId));
@@ -9575,7 +9567,7 @@ const titleStyle = theme => ({
9575
9567
  userSelect: 'none'
9576
9568
  });
9577
9569
  const defaultBbox = {
9578
- srs: 'EPSG:3857',
9570
+ srs: PROJECTION.EPSG_3857.value,
9579
9571
  bbox: {
9580
9572
  left: 58703.6377,
9581
9573
  bottom: 6408480.4514,
@@ -10084,7 +10076,7 @@ const makeMapPreset = (timeIncrement, uniqueId, referenceTime, layers, syncGroup
10084
10076
  right: 1215891.3289626688,
10085
10077
  top: 7540256.313079321
10086
10078
  },
10087
- srs: 'EPSG:3857',
10079
+ srs: PROJECTION.EPSG_3857.value,
10088
10080
  layers: layers.map((layer, index) => Object.assign(Object.assign({}, layer), {
10089
10081
  id: `${uniqueId}-${index}`,
10090
10082
  dimensions: [{
@@ -10175,7 +10167,7 @@ const HarmonieTempAndPrecipPreset = ({
10175
10167
  right: 1428345.8183648037,
10176
10168
  top: 7438773.776232235
10177
10169
  },
10178
- srs: 'EPSG:3857',
10170
+ srs: PROJECTION.EPSG_3857.value,
10179
10171
  layers: [Object.assign(Object.assign({}, layer), {
10180
10172
  id: uniqueId,
10181
10173
  dimensions: [{
@@ -10596,6 +10588,7 @@ const SyncGroupViewerConnect = () => {
10596
10588
  *
10597
10589
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10598
10590
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
10591
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
10599
10592
  * */
10600
10593
  const baseLayer = {
10601
10594
  name: 'arcGisSat',
@@ -10773,6 +10766,7 @@ const DemoWrapperConnect = props => jsx(CoreI18nProvider, {
10773
10766
  *
10774
10767
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10775
10768
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
10769
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
10776
10770
  * */
10777
10771
  const NavigateSetter = () => {
10778
10772
  // stores navigate hook method to historyDict, so it can be used outside components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/core",
3
- "version": "9.25.2",
3
+ "version": "9.26.0",
4
4
  "description": "GeoWeb Core library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { mapTypes } from '@opengeoweb/store';
3
+ import { PlotPreset, TimeSeriesService } from '@opengeoweb/shared';
3
4
  import { InitialHarmTempAndPrecipProps } from '../MultiMapViewConnect/HarmoniePresets';
4
5
  import { ModelRunIntervalProps } from '../MultiMapViewConnect/ModelRunInterval';
5
6
  interface InitialMultiMapProps {
@@ -20,7 +21,11 @@ export interface InitialMapProps {
20
21
  shouldDisplayDrawControls?: boolean;
21
22
  displaySearchButtonInMap?: boolean;
22
23
  }
23
- export type InitialProps = InitialMapProps | InitialMultiMapProps | InitialHarmTempAndPrecipProps | ModelRunIntervalProps | mapTypes.MapPresetInitialProps | InitialSliderProps;
24
+ export interface InitialTimeSeriesProps {
25
+ plotPreset: PlotPreset;
26
+ services: TimeSeriesService[];
27
+ }
28
+ export type InitialProps = InitialMapProps | InitialMultiMapProps | InitialHarmTempAndPrecipProps | ModelRunIntervalProps | mapTypes.MapPresetInitialProps | InitialSliderProps | InitialTimeSeriesProps;
24
29
  /**
25
30
  * The lookup table is for registering your own components with the workspace.
26
31
  * @param payload
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { mapTypes, layerTypes } from '@opengeoweb/store';
3
3
  export declare const defaultBbox: {
4
- srs: string;
4
+ srs: "EPSG:3857";
5
5
  bbox: {
6
6
  left: number;
7
7
  bottom: number;
@@ -15,7 +15,7 @@ export declare const mapPresetRadar: {
15
15
  right: number;
16
16
  top: number;
17
17
  };
18
- srs: string;
18
+ srs: "EPSG:3857";
19
19
  };
20
20
  };
21
21
  export declare const mapPresetObsTA: {
@@ -32,7 +32,7 @@ export declare const mapPresetObsTA: {
32
32
  right: number;
33
33
  top: number;
34
34
  };
35
- srs: string;
35
+ srs: "EPSG:3857";
36
36
  };
37
37
  };
38
38
  export declare const mapPresetObsWind: {
@@ -49,7 +49,7 @@ export declare const mapPresetObsWind: {
49
49
  right: number;
50
50
  top: number;
51
51
  };
52
- srs: string;
52
+ srs: "EPSG:3857";
53
53
  };
54
54
  };
55
55
  export declare const mapPresetObsPP: {
@@ -66,7 +66,7 @@ export declare const mapPresetObsPP: {
66
66
  right: number;
67
67
  top: number;
68
68
  };
69
- srs: string;
69
+ srs: "EPSG:3857";
70
70
  };
71
71
  };
72
72
  export declare const mapPresetObsRH: {
@@ -83,7 +83,7 @@ export declare const mapPresetObsRH: {
83
83
  right: number;
84
84
  top: number;
85
85
  };
86
- srs: string;
86
+ srs: "EPSG:3857";
87
87
  };
88
88
  };
89
89
  export declare const mapPresetObsQG: {
@@ -100,7 +100,7 @@ export declare const mapPresetObsQG: {
100
100
  right: number;
101
101
  top: number;
102
102
  };
103
- srs: string;
103
+ srs: "EPSG:3857";
104
104
  };
105
105
  };
106
106
  export declare const mapPresetEumetsat: {
@@ -118,7 +118,7 @@ export declare const mapPresetEumetsat: {
118
118
  right: number;
119
119
  top: number;
120
120
  };
121
- srs: string;
121
+ srs: "EPSG:3857";
122
122
  };
123
123
  };
124
124
  export declare const mapPresetHarmoniePrecipitationFlux: {
@@ -136,7 +136,7 @@ export declare const mapPresetHarmoniePrecipitationFlux: {
136
136
  right: number;
137
137
  top: number;
138
138
  };
139
- srs: string;
139
+ srs: "EPSG:3857";
140
140
  };
141
141
  };
142
142
  export declare const mapPresetHarmonieTemperature2m: {
@@ -154,7 +154,7 @@ export declare const mapPresetHarmonieTemperature2m: {
154
154
  right: number;
155
155
  top: number;
156
156
  };
157
- srs: string;
157
+ srs: "EPSG:3857";
158
158
  };
159
159
  };
160
160
  export declare const mapPresetHarmoniePressureMSL: {
@@ -172,6 +172,6 @@ export declare const mapPresetHarmoniePressureMSL: {
172
172
  right: number;
173
173
  top: number;
174
174
  };
175
- srs: string;
175
+ srs: "EPSG:3857";
176
176
  };
177
177
  };