@opengeoweb/layer-select 15.3.0 → 17.0.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 +606 -158
- package/package.json +9 -9
- package/jest.config.d.ts +0 -0
- package/src/index.d.ts +0 -4
- package/src/lib/components/DataExplorerButtonConnect/DataExplorerButtonConnect.d.ts +0 -8
- package/src/lib/components/DataExplorerButtonConnect/index.d.ts +0 -1
- package/src/lib/components/KeywordFilterButton/KeywordFilterButtonConnect.d.ts +0 -9
- package/src/lib/components/KeywordFilterButton/KeywordFilterButtonConnect.spec.d.ts +0 -1
- package/src/lib/components/KeywordFilterButton/index.d.ts +0 -1
- package/src/lib/components/KeywordFilterResults/KeywordFilterResults.d.ts +0 -13
- package/src/lib/components/KeywordFilterResults/KeywordFilterResults.integration.spec.d.ts +0 -1
- package/src/lib/components/KeywordFilterResults/KeywordFilterResults.stories.d.ts +0 -8
- package/src/lib/components/KeywordFilterResults/KeywordFilterResultsConnect.d.ts +0 -8
- package/src/lib/components/KeywordFilterResults/KeywordFilterResultsListItemConnect.d.ts +0 -6
- package/src/lib/components/KeywordFilterResults/KeywordFilterSelectAllSwitchConnect.d.ts +0 -2
- package/src/lib/components/KeywordFilterResults/index.d.ts +0 -4
- package/src/lib/components/LayerList/LayerAddRemoveButton.d.ts +0 -23
- package/src/lib/components/LayerList/LayerAddRemoveButton.spec.d.ts +0 -1
- package/src/lib/components/LayerList/LayerList.d.ts +0 -30
- package/src/lib/components/LayerList/LayerList.spec.d.ts +0 -3
- package/src/lib/components/LayerList/LayerListConnect.d.ts +0 -9
- package/src/lib/components/LayerList/LayerListConnect.spec.d.ts +0 -1
- package/src/lib/components/LayerList/LayerListDimensions.d.ts +0 -7
- package/src/lib/components/LayerList/LayerListRow.d.ts +0 -25
- package/src/lib/components/LayerList/index.d.ts +0 -5
- package/src/lib/components/LayerSelect/LayerSelect.d.ts +0 -21
- package/src/lib/components/LayerSelect/LayerSelect.spec.d.ts +0 -1
- package/src/lib/components/LayerSelect/LayerSelect.stories.d.ts +0 -14
- package/src/lib/components/LayerSelect/LayerSelectButtonConnect.d.ts +0 -11
- package/src/lib/components/LayerSelect/LayerSelectButtonConnect.spec.d.ts +0 -1
- package/src/lib/components/LayerSelect/LayerSelectConnect.d.ts +0 -16
- package/src/lib/components/LayerSelect/LayerSelectConnect.integration.spec.d.ts +0 -1
- package/src/lib/components/LayerSelect/LayerSelectConnect.spec.d.ts +0 -1
- package/src/lib/components/LayerSelect/LayerSelectUtils.d.ts +0 -77
- package/src/lib/components/LayerSelect/LayerSelectUtils.spec.d.ts +0 -1
- package/src/lib/components/LayerSelect/index.d.ts +0 -2
- package/src/lib/components/Providers/Providers.d.ts +0 -22
- package/src/lib/components/Providers/index.d.ts +0 -1
- package/src/lib/components/SearchField/SearchFieldConnect.d.ts +0 -2
- package/src/lib/components/SearchField/SearchFieldConnect.spec.d.ts +0 -1
- package/src/lib/components/SearchField/index.d.ts +0 -1
- package/src/lib/components/ServiceList/ServiceChip.d.ts +0 -12
- package/src/lib/components/ServiceList/ServiceChip.spec.d.ts +0 -1
- package/src/lib/components/ServiceList/ServiceChipConnect.d.ts +0 -10
- package/src/lib/components/ServiceList/ServiceList.d.ts +0 -8
- package/src/lib/components/ServiceList/ServiceListConnect.d.ts +0 -6
- package/src/lib/components/ServiceList/ServiceListConnect.spec.d.ts +0 -1
- package/src/lib/components/ServiceList/index.d.ts +0 -4
- package/src/lib/components/ServiceOptionsButton/ServiceOptionsButton.d.ts +0 -6
- package/src/lib/components/ServiceOptionsButton/ServiceOptionsButton.spec.d.ts +0 -1
- package/src/lib/components/ServiceOptionsButton/ServiceOptionsButton.stories.d.ts +0 -8
- package/src/lib/components/ServiceOptionsButton/index.d.ts +0 -1
- package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.d.ts +0 -20
- package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.spec.d.ts +0 -1
- package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.stories.d.ts +0 -45
- package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialogConnect.d.ts +0 -8
- package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialogConnect.spec.d.ts +0 -1
- package/src/lib/components/ServiceOptionsDialog/index.d.ts +0 -2
- package/src/lib/components/ServicePopup/ServicePopup.d.ts +0 -20
- package/src/lib/components/ServicePopup/ServicePopup.spec.d.ts +0 -1
- package/src/lib/components/ServicePopup/ServicePopup.stories.d.ts +0 -12
- package/src/lib/components/ServicePopup/ServicePopupConnect.d.ts +0 -2
- package/src/lib/components/ServicePopup/ServicePopupConnect.spec.d.ts +0 -1
- package/src/lib/components/ServicePopup/ServicePopupConnect.stories.d.ts +0 -9
- package/src/lib/components/ServicePopup/ServicePopupDialogConnect.d.ts +0 -11
- package/src/lib/components/ServicePopup/index.d.ts +0 -3
- package/src/lib/components/ServicePopup/utils.d.ts +0 -7
- package/src/lib/components/ServicePopup/utils.spec.d.ts +0 -1
- package/src/lib/components/index.d.ts +0 -10
- package/src/lib/index.d.ts +0 -2
- package/src/lib/store/index.d.ts +0 -7
- package/src/lib/store/listeners.d.ts +0 -2
- package/src/lib/store/listeners.spec.d.ts +0 -1
- package/src/lib/store/reducer.d.ts +0 -26
- package/src/lib/store/reducer.spec.d.ts +0 -1
- package/src/lib/store/selectors.d.ts +0 -535
- package/src/lib/store/selectors.spec.d.ts +0 -1
- package/src/lib/store/store.d.ts +0 -13
- package/src/lib/store/types.d.ts +0 -71
- package/src/lib/store/utils.d.ts +0 -9
- package/src/lib/store/utils.spec.d.ts +0 -1
- package/src/lib/utils/i18n.d.ts +0 -7
package/index.esm.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { useSelector, useDispatch } from 'react-redux';
|
|
4
3
|
import { CustomIconButton, FilterOption, ToolContainerDraggable, CustomAccordion, CustomTooltip, SearchHighlight, SearchField, CustomToggleButton, AlertBanner, ToggleMenu, CustomDialog, sessionStorageProvider } from '@opengeoweb/shared';
|
|
@@ -6,7 +5,8 @@ import { uiTypes, serviceActions, selectorMemoizationOptions, serviceSelectors,
|
|
|
6
5
|
import { Filter, ArrowDropDownDown, LayersAdd, MeteoGate, Add, Cached, Edit, Visibility, Delete, Copy } from '@opengeoweb/theme';
|
|
7
6
|
import { createEntityAdapter, createSlice, createSelector, createListenerMiddleware, isAnyOf, combineReducers, configureStore } from '@reduxjs/toolkit';
|
|
8
7
|
import { compact, countBy, partition } from 'lodash';
|
|
9
|
-
import { snackbarListener, snackbarReducer,
|
|
8
|
+
import { snackbarListener, snackbarReducer, snackbarActions, snackbarTypes } from '@opengeoweb/snackbar';
|
|
9
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
10
|
import { Switch, Grid, List, ToggleButtonGroup, ToggleButton, Box, Popper, Grow, Paper, ClickAwayListener, MenuList, MenuItem, Typography, useTheme, Backdrop, CircularProgress, Button, ListItem, ListItemText, LinearProgress, InputAdornment } from '@mui/material';
|
|
11
11
|
import 'i18next';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
@@ -196,6 +196,7 @@ var layerSelectTranslations = {
|
|
|
196
196
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
197
197
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
198
198
|
* */
|
|
199
|
+
|
|
199
200
|
var getFilterId = function getFilterId(filterType, filterName) {
|
|
200
201
|
return filterType + "-" + filterName;
|
|
201
202
|
};
|
|
@@ -250,6 +251,24 @@ var isUserAddedService = function isUserAddedService(scope) {
|
|
|
250
251
|
return scope === 'user';
|
|
251
252
|
};
|
|
252
253
|
|
|
254
|
+
/* *
|
|
255
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
256
|
+
* you may not use this file except in compliance with the License.
|
|
257
|
+
* You may obtain a copy of the License at
|
|
258
|
+
*
|
|
259
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
260
|
+
*
|
|
261
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
262
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
263
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
264
|
+
* See the License for the specific language governing permissions and
|
|
265
|
+
* limitations under the License.
|
|
266
|
+
*
|
|
267
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
268
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
269
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
270
|
+
* */
|
|
271
|
+
|
|
253
272
|
var layerSelectFilterAdapter = createEntityAdapter();
|
|
254
273
|
var layerSelectActiveServicesAdapter = createEntityAdapter({
|
|
255
274
|
selectId: function selectId(service) {
|
|
@@ -474,10 +493,12 @@ var layerSelectReducer = slice.reducer,
|
|
|
474
493
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
475
494
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
476
495
|
* */
|
|
496
|
+
|
|
477
497
|
var useAppSelector = useSelector;
|
|
478
498
|
var layerSelectStore = function layerSelectStore(store) {
|
|
479
499
|
return store != null && store.layerSelect ? store.layerSelect : null;
|
|
480
500
|
};
|
|
501
|
+
|
|
481
502
|
/**
|
|
482
503
|
* Returns search filter string
|
|
483
504
|
*
|
|
@@ -489,6 +510,7 @@ var getSearchFilter = createSelector(layerSelectStore, function (store) {
|
|
|
489
510
|
var _store$filters;
|
|
490
511
|
return (store == null || (_store$filters = store.filters) == null ? void 0 : _store$filters.searchFilter) || '';
|
|
491
512
|
});
|
|
513
|
+
|
|
492
514
|
/**
|
|
493
515
|
* Returns active services array
|
|
494
516
|
*
|
|
@@ -518,6 +540,7 @@ var getEnabledServiceIds = createSelector(getAllActiveServices, function (servic
|
|
|
518
540
|
return service.serviceId;
|
|
519
541
|
});
|
|
520
542
|
}, selectorMemoizationOptions);
|
|
543
|
+
|
|
521
544
|
/**
|
|
522
545
|
* Returns ids of all keywords
|
|
523
546
|
*
|
|
@@ -587,6 +610,7 @@ var getFilters = createSelector(getAllActiveServices, getAllFilters, function (s
|
|
|
587
610
|
keywords: keywordsSorted
|
|
588
611
|
};
|
|
589
612
|
});
|
|
613
|
+
|
|
590
614
|
/**
|
|
591
615
|
* Returns if all keywords are checked
|
|
592
616
|
*
|
|
@@ -601,6 +625,7 @@ var isAllFiltersChecked = createSelector(layerSelectStore, function (store) {
|
|
|
601
625
|
return store == null || (_store$filters3 = store.filters) == null || (_store$filters3 = _store$filters3.filters) == null || (_store$filters3 = _store$filters3.entities[filterId]) == null ? void 0 : _store$filters3.checked;
|
|
602
626
|
});
|
|
603
627
|
});
|
|
628
|
+
|
|
604
629
|
/**
|
|
605
630
|
* Returns a filtered active layer object based on the given filter settings
|
|
606
631
|
* Example: layerSelectSelectors.getFilteredLayers(store, filteredSettings);
|
|
@@ -616,6 +641,7 @@ var getFilteredLayers = createSelector([getEnabledServiceIds, serviceSelectors.g
|
|
|
616
641
|
}));
|
|
617
642
|
}, []);
|
|
618
643
|
}, selectorMemoizationOptions);
|
|
644
|
+
|
|
619
645
|
/**
|
|
620
646
|
* Returns service popup details
|
|
621
647
|
*
|
|
@@ -627,6 +653,7 @@ var getServicePopupDetails = function getServicePopupDetails(store) {
|
|
|
627
653
|
var _store$layerSelect3;
|
|
628
654
|
return (store == null || (_store$layerSelect3 = store.layerSelect) == null ? void 0 : _store$layerSelect3.servicePopup) || initialServicePopupState;
|
|
629
655
|
};
|
|
656
|
+
|
|
630
657
|
/**
|
|
631
658
|
* Returns service with active filtered layers from seaerch
|
|
632
659
|
*
|
|
@@ -670,6 +697,10 @@ var selectors = /*#__PURE__*/Object.freeze({
|
|
|
670
697
|
useAppSelector: useAppSelector
|
|
671
698
|
});
|
|
672
699
|
|
|
700
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
701
|
+
__proto__: null
|
|
702
|
+
});
|
|
703
|
+
|
|
673
704
|
function _OverloadYield(e, d) {
|
|
674
705
|
this.v = e, this.k = d;
|
|
675
706
|
}
|
|
@@ -1109,6 +1140,7 @@ layerSelectListener.startListening({
|
|
|
1109
1140
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1110
1141
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1111
1142
|
* */
|
|
1143
|
+
|
|
1112
1144
|
var layerSelectReducersMap = {
|
|
1113
1145
|
webmap: mapReducer,
|
|
1114
1146
|
services: serviceReducer,
|
|
@@ -1129,6 +1161,24 @@ var createMockStore = function createMockStore(mockState) {
|
|
|
1129
1161
|
});
|
|
1130
1162
|
};
|
|
1131
1163
|
|
|
1164
|
+
/* *
|
|
1165
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1166
|
+
* you may not use this file except in compliance with the License.
|
|
1167
|
+
* You may obtain a copy of the License at
|
|
1168
|
+
*
|
|
1169
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1170
|
+
*
|
|
1171
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1172
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1173
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1174
|
+
* See the License for the specific language governing permissions and
|
|
1175
|
+
* limitations under the License.
|
|
1176
|
+
*
|
|
1177
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1178
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
1179
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1180
|
+
* */
|
|
1181
|
+
|
|
1132
1182
|
var KeywordFilterButtonConnect = function KeywordFilterButtonConnect(_ref) {
|
|
1133
1183
|
var mapId = _ref.mapId,
|
|
1134
1184
|
_ref$source = _ref.source,
|
|
@@ -1150,16 +1200,34 @@ var KeywordFilterButtonConnect = function KeywordFilterButtonConnect(_ref) {
|
|
|
1150
1200
|
source: source
|
|
1151
1201
|
}));
|
|
1152
1202
|
}, [currentActiveMapId, dispatch, isOpenInStore, mapId, source, dialogType]);
|
|
1153
|
-
return jsx(CustomIconButton, {
|
|
1203
|
+
return /*#__PURE__*/jsx(CustomIconButton, {
|
|
1154
1204
|
"data-testid": "keywordFilterButton",
|
|
1155
1205
|
id: "keywordFilterButton",
|
|
1156
1206
|
isSelected: isOpenInStore,
|
|
1157
1207
|
onClick: openFilterResultsDialog,
|
|
1158
1208
|
variant: "tool",
|
|
1159
|
-
children: jsx(Filter, {})
|
|
1209
|
+
children: /*#__PURE__*/jsx(Filter, {})
|
|
1160
1210
|
});
|
|
1161
1211
|
};
|
|
1162
1212
|
|
|
1213
|
+
/* *
|
|
1214
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1215
|
+
* you may not use this file except in compliance with the License.
|
|
1216
|
+
* You may obtain a copy of the License at
|
|
1217
|
+
*
|
|
1218
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1219
|
+
*
|
|
1220
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1221
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1222
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1223
|
+
* See the License for the specific language governing permissions and
|
|
1224
|
+
* limitations under the License.
|
|
1225
|
+
*
|
|
1226
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1227
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
1228
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1229
|
+
* */
|
|
1230
|
+
|
|
1163
1231
|
var KeywordFilterResultsListItemConnect = function KeywordFilterResultsListItemConnect(_ref) {
|
|
1164
1232
|
var filter = _ref.filter;
|
|
1165
1233
|
var dispatch = useDispatch();
|
|
@@ -1169,7 +1237,7 @@ var KeywordFilterResultsListItemConnect = function KeywordFilterResultsListItemC
|
|
|
1169
1237
|
only: only
|
|
1170
1238
|
}));
|
|
1171
1239
|
}, [dispatch]);
|
|
1172
|
-
return jsx(FilterOption, {
|
|
1240
|
+
return /*#__PURE__*/jsx(FilterOption, {
|
|
1173
1241
|
checked: !!filter.checked,
|
|
1174
1242
|
label: filter.amountVisible ? filter.name + " (" + filter.amountVisible + ")" : filter.name,
|
|
1175
1243
|
onClick: function onClick(checked, only) {
|
|
@@ -1179,6 +1247,24 @@ var KeywordFilterResultsListItemConnect = function KeywordFilterResultsListItemC
|
|
|
1179
1247
|
});
|
|
1180
1248
|
};
|
|
1181
1249
|
|
|
1250
|
+
/* *
|
|
1251
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1252
|
+
* you may not use this file except in compliance with the License.
|
|
1253
|
+
* You may obtain a copy of the License at
|
|
1254
|
+
*
|
|
1255
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1256
|
+
*
|
|
1257
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1258
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1259
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1260
|
+
* See the License for the specific language governing permissions and
|
|
1261
|
+
* limitations under the License.
|
|
1262
|
+
*
|
|
1263
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1264
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
1265
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1266
|
+
* */
|
|
1267
|
+
|
|
1182
1268
|
var KeywordFilterSelectAllSwitchConnect = function KeywordFilterSelectAllSwitchConnect() {
|
|
1183
1269
|
var dispatch = useDispatch();
|
|
1184
1270
|
var allFiltersActive = useAppSelector(function (store) {
|
|
@@ -1187,7 +1273,7 @@ var KeywordFilterSelectAllSwitchConnect = function KeywordFilterSelectAllSwitchC
|
|
|
1187
1273
|
var toggleFilters = React.useCallback(function () {
|
|
1188
1274
|
dispatch(layerSelectActions.toggleAllFilters());
|
|
1189
1275
|
}, [dispatch]);
|
|
1190
|
-
return jsx(Switch, {
|
|
1276
|
+
return /*#__PURE__*/jsx(Switch, {
|
|
1191
1277
|
checked: allFiltersActive,
|
|
1192
1278
|
"data-testid": "customSwitch",
|
|
1193
1279
|
onChange: toggleFilters,
|
|
@@ -1216,11 +1302,30 @@ var KeywordFilterSelectAllSwitchConnect = function KeywordFilterSelectAllSwitchC
|
|
|
1216
1302
|
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
1217
1303
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1218
1304
|
* */
|
|
1305
|
+
|
|
1219
1306
|
var LAYER_SELECT_NAMESPACE = 'layerselect';
|
|
1220
1307
|
var useLayerSelectTranslation = function useLayerSelectTranslation() {
|
|
1221
1308
|
return useTranslation(LAYER_SELECT_NAMESPACE);
|
|
1222
1309
|
};
|
|
1223
1310
|
|
|
1311
|
+
/* *
|
|
1312
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1313
|
+
* you may not use this file except in compliance with the License.
|
|
1314
|
+
* You may obtain a copy of the License at
|
|
1315
|
+
*
|
|
1316
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1317
|
+
*
|
|
1318
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1319
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1320
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1321
|
+
* See the License for the specific language governing permissions and
|
|
1322
|
+
* limitations under the License.
|
|
1323
|
+
*
|
|
1324
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1325
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1326
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1327
|
+
* */
|
|
1328
|
+
|
|
1224
1329
|
var listStyle = {
|
|
1225
1330
|
padding: '0px'
|
|
1226
1331
|
};
|
|
@@ -1242,7 +1347,7 @@ var KeywordFilterResults = function KeywordFilterResults(_ref) {
|
|
|
1242
1347
|
source = _ref$source === void 0 ? 'module' : _ref$source;
|
|
1243
1348
|
var _useLayerSelectTransl = useLayerSelectTranslation(),
|
|
1244
1349
|
t = _useLayerSelectTransl.t;
|
|
1245
|
-
return jsxs(ToolContainerDraggable, {
|
|
1350
|
+
return /*#__PURE__*/jsxs(ToolContainerDraggable, {
|
|
1246
1351
|
bounds: bounds,
|
|
1247
1352
|
"data-testid": "keywordFilterResults",
|
|
1248
1353
|
isOpen: isOpen,
|
|
@@ -1257,7 +1362,7 @@ var KeywordFilterResults = function KeywordFilterResults(_ref) {
|
|
|
1257
1362
|
height: 600
|
|
1258
1363
|
},
|
|
1259
1364
|
title: t('groups-and-keywords-dialog-title'),
|
|
1260
|
-
children: [jsxs(Grid, {
|
|
1365
|
+
children: [/*#__PURE__*/jsxs(Grid, {
|
|
1261
1366
|
alignItems: "center",
|
|
1262
1367
|
container: true,
|
|
1263
1368
|
justifyContent: "space-between",
|
|
@@ -1270,7 +1375,7 @@ var KeywordFilterResults = function KeywordFilterResults(_ref) {
|
|
|
1270
1375
|
top: 0,
|
|
1271
1376
|
zIndex: 100
|
|
1272
1377
|
},
|
|
1273
|
-
children: [jsx(Grid, {
|
|
1378
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
1274
1379
|
alignItems: "center",
|
|
1275
1380
|
container: true,
|
|
1276
1381
|
justifyContent: "flex-start",
|
|
@@ -1281,7 +1386,7 @@ var KeywordFilterResults = function KeywordFilterResults(_ref) {
|
|
|
1281
1386
|
padding: '15px 15px 0 24px'
|
|
1282
1387
|
},
|
|
1283
1388
|
children: t('select-all')
|
|
1284
|
-
}), jsx(Grid, {
|
|
1389
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
1285
1390
|
alignContent: "center",
|
|
1286
1391
|
container: true,
|
|
1287
1392
|
justifyContent: "flex-end",
|
|
@@ -1291,28 +1396,28 @@ var KeywordFilterResults = function KeywordFilterResults(_ref) {
|
|
|
1291
1396
|
sx: {
|
|
1292
1397
|
padding: '15px 15px 0 15px'
|
|
1293
1398
|
},
|
|
1294
|
-
children: jsx(KeywordFilterSelectAllSwitchConnect, {})
|
|
1399
|
+
children: /*#__PURE__*/jsx(KeywordFilterSelectAllSwitchConnect, {})
|
|
1295
1400
|
})]
|
|
1296
|
-
}), jsx(CustomAccordion, {
|
|
1401
|
+
}), /*#__PURE__*/jsx(CustomAccordion, {
|
|
1297
1402
|
detailsSx: accordionDetailsStyle,
|
|
1298
1403
|
title: t('groups'),
|
|
1299
|
-
children: jsx(List, {
|
|
1404
|
+
children: /*#__PURE__*/jsx(List, {
|
|
1300
1405
|
dense: true,
|
|
1301
1406
|
style: listStyle,
|
|
1302
1407
|
children: filters.groups.map(function (group) {
|
|
1303
|
-
return jsx(KeywordFilterResultsListItemConnect, {
|
|
1408
|
+
return /*#__PURE__*/jsx(KeywordFilterResultsListItemConnect, {
|
|
1304
1409
|
filter: group
|
|
1305
1410
|
}, group.id);
|
|
1306
1411
|
})
|
|
1307
1412
|
})
|
|
1308
|
-
}), jsx(CustomAccordion, {
|
|
1413
|
+
}), /*#__PURE__*/jsx(CustomAccordion, {
|
|
1309
1414
|
detailsSx: accordionDetailsStyle,
|
|
1310
1415
|
title: t('keywords'),
|
|
1311
|
-
children: jsx(List, {
|
|
1416
|
+
children: /*#__PURE__*/jsx(List, {
|
|
1312
1417
|
dense: true,
|
|
1313
1418
|
style: listStyle,
|
|
1314
1419
|
children: filters.keywords.map(function (keyword) {
|
|
1315
|
-
return jsx(KeywordFilterResultsListItemConnect, {
|
|
1420
|
+
return /*#__PURE__*/jsx(KeywordFilterResultsListItemConnect, {
|
|
1316
1421
|
filter: keyword
|
|
1317
1422
|
}, keyword.id);
|
|
1318
1423
|
})
|
|
@@ -1321,6 +1426,24 @@ var KeywordFilterResults = function KeywordFilterResults(_ref) {
|
|
|
1321
1426
|
});
|
|
1322
1427
|
};
|
|
1323
1428
|
|
|
1429
|
+
/* *
|
|
1430
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1431
|
+
* you may not use this file except in compliance with the License.
|
|
1432
|
+
* You may obtain a copy of the License at
|
|
1433
|
+
*
|
|
1434
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1435
|
+
*
|
|
1436
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1437
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1438
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1439
|
+
* See the License for the specific language governing permissions and
|
|
1440
|
+
* limitations under the License.
|
|
1441
|
+
*
|
|
1442
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1443
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
1444
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1445
|
+
* */
|
|
1446
|
+
|
|
1324
1447
|
var KeywordFilterResultsConnect = function KeywordFilterResultsConnect(_ref) {
|
|
1325
1448
|
var bounds = _ref.bounds,
|
|
1326
1449
|
mapId = _ref.mapId,
|
|
@@ -1333,7 +1456,7 @@ var KeywordFilterResultsConnect = function KeywordFilterResultsConnect(_ref) {
|
|
|
1333
1456
|
isDialogOpen = _useSetupDialog.isDialogOpen,
|
|
1334
1457
|
uiSource = _useSetupDialog.uiSource;
|
|
1335
1458
|
var filters = useAppSelector(getFilters);
|
|
1336
|
-
return jsx(KeywordFilterResults, {
|
|
1459
|
+
return /*#__PURE__*/jsx(KeywordFilterResults, {
|
|
1337
1460
|
bounds: bounds,
|
|
1338
1461
|
filters: filters,
|
|
1339
1462
|
isOpen: isDialogOpen,
|
|
@@ -1344,6 +1467,23 @@ var KeywordFilterResultsConnect = function KeywordFilterResultsConnect(_ref) {
|
|
|
1344
1467
|
});
|
|
1345
1468
|
};
|
|
1346
1469
|
|
|
1470
|
+
/* *
|
|
1471
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1472
|
+
* you may not use this file except in compliance with the License.
|
|
1473
|
+
* You may obtain a copy of the License at
|
|
1474
|
+
*
|
|
1475
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1476
|
+
*
|
|
1477
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1478
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1479
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1480
|
+
* See the License for the specific language governing permissions and
|
|
1481
|
+
* limitations under the License.
|
|
1482
|
+
*
|
|
1483
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1484
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1485
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1486
|
+
* */
|
|
1347
1487
|
var LayerAddRemoveButton = function LayerAddRemoveButton(_ref) {
|
|
1348
1488
|
var layer = _ref.layer,
|
|
1349
1489
|
serviceUrl = _ref.serviceUrl,
|
|
@@ -1401,14 +1541,14 @@ var LayerAddRemoveButton = function LayerAddRemoveButton(_ref) {
|
|
|
1401
1541
|
removeLayerFromAllMaps(id);
|
|
1402
1542
|
setOpen(false);
|
|
1403
1543
|
};
|
|
1404
|
-
return jsxs(Fragment, {
|
|
1405
|
-
children: [jsxs(ToggleButtonGroup, {
|
|
1544
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
1545
|
+
children: [/*#__PURE__*/jsxs(ToggleButtonGroup, {
|
|
1406
1546
|
fullWidth: true,
|
|
1407
1547
|
ref: anchorRef,
|
|
1408
1548
|
style: {
|
|
1409
1549
|
height: '32px'
|
|
1410
1550
|
},
|
|
1411
|
-
children: [jsx(ToggleButton, {
|
|
1551
|
+
children: [/*#__PURE__*/jsx(ToggleButton, {
|
|
1412
1552
|
className: "tool",
|
|
1413
1553
|
"data-testid": "layerAddRemoveButton-" + layer.name,
|
|
1414
1554
|
fullWidth: true,
|
|
@@ -1433,12 +1573,12 @@ var LayerAddRemoveButton = function LayerAddRemoveButton(_ref) {
|
|
|
1433
1573
|
},
|
|
1434
1574
|
value: "selected",
|
|
1435
1575
|
children: !foundLayer ? t('add') : t('remove')
|
|
1436
|
-
}), jsx(Box, {
|
|
1576
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
1437
1577
|
sx: {
|
|
1438
1578
|
minWidth: '1px',
|
|
1439
1579
|
backgroundColor: foundLayer || layerExistsInWorkspace ? 'geowebColors.buttons.primary.default.borderColor' : 'geowebColors.buttons.secondary.default.fill'
|
|
1440
1580
|
}
|
|
1441
|
-
}), jsx(ToggleButton, {
|
|
1581
|
+
}), /*#__PURE__*/jsx(ToggleButton, {
|
|
1442
1582
|
className: "tool",
|
|
1443
1583
|
"data-testid": "layerAddRemoveButton-dropdown-" + layer.name,
|
|
1444
1584
|
onClick: handleToggle,
|
|
@@ -1453,13 +1593,13 @@ var LayerAddRemoveButton = function LayerAddRemoveButton(_ref) {
|
|
|
1453
1593
|
height: 'inherit'
|
|
1454
1594
|
},
|
|
1455
1595
|
value: "dropdown",
|
|
1456
|
-
children: jsx(ArrowDropDownDown, {
|
|
1596
|
+
children: /*#__PURE__*/jsx(ArrowDropDownDown, {
|
|
1457
1597
|
style: {
|
|
1458
1598
|
marginRight: '1px'
|
|
1459
1599
|
}
|
|
1460
1600
|
})
|
|
1461
1601
|
})]
|
|
1462
|
-
}), jsx(Popper, {
|
|
1602
|
+
}), /*#__PURE__*/jsx(Popper, {
|
|
1463
1603
|
anchorEl: anchorRef.current,
|
|
1464
1604
|
open: open,
|
|
1465
1605
|
placement: "bottom-end",
|
|
@@ -1471,20 +1611,20 @@ var LayerAddRemoveButton = function LayerAddRemoveButton(_ref) {
|
|
|
1471
1611
|
children: function children(_ref2) {
|
|
1472
1612
|
var TransitionProps = _ref2.TransitionProps,
|
|
1473
1613
|
placement = _ref2.placement;
|
|
1474
|
-
return jsx(Grow, Object.assign({}, TransitionProps, {
|
|
1614
|
+
return /*#__PURE__*/jsx(Grow, Object.assign({}, TransitionProps, {
|
|
1475
1615
|
style: {
|
|
1476
1616
|
transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom'
|
|
1477
1617
|
},
|
|
1478
|
-
children: jsx(Paper, {
|
|
1479
|
-
children: jsx(ClickAwayListener, {
|
|
1618
|
+
children: /*#__PURE__*/jsx(Paper, {
|
|
1619
|
+
children: /*#__PURE__*/jsx(ClickAwayListener, {
|
|
1480
1620
|
onClickAway: handleClose,
|
|
1481
|
-
children: jsxs(MenuList, {
|
|
1621
|
+
children: /*#__PURE__*/jsxs(MenuList, {
|
|
1482
1622
|
autoFocusItem: true,
|
|
1483
|
-
children: [jsx(MenuItem, {
|
|
1623
|
+
children: [/*#__PURE__*/jsx(MenuItem, {
|
|
1484
1624
|
disabled: existsInAllMaps,
|
|
1485
1625
|
onClick: handleAddAll,
|
|
1486
1626
|
children: t('add-to-all-maps')
|
|
1487
|
-
}), jsx(MenuItem, {
|
|
1627
|
+
}), /*#__PURE__*/jsx(MenuItem, {
|
|
1488
1628
|
disabled: !layerExistsInWorkspace,
|
|
1489
1629
|
onClick: function onClick() {
|
|
1490
1630
|
layerExistsInWorkspace && handleRemoveAll(layerExistsInWorkspace.id);
|
|
@@ -1500,16 +1640,34 @@ var LayerAddRemoveButton = function LayerAddRemoveButton(_ref) {
|
|
|
1500
1640
|
});
|
|
1501
1641
|
};
|
|
1502
1642
|
|
|
1643
|
+
/* *
|
|
1644
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1645
|
+
* you may not use this file except in compliance with the License.
|
|
1646
|
+
* You may obtain a copy of the License at
|
|
1647
|
+
*
|
|
1648
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1649
|
+
*
|
|
1650
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1651
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1652
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1653
|
+
* See the License for the specific language governing permissions and
|
|
1654
|
+
* limitations under the License.
|
|
1655
|
+
*
|
|
1656
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1657
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1658
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1659
|
+
* */
|
|
1660
|
+
|
|
1503
1661
|
var LayerListDimensions = function LayerListDimensions(_ref) {
|
|
1504
1662
|
var dimensions = _ref.dimensions;
|
|
1505
1663
|
if (!(dimensions != null && dimensions.length)) {
|
|
1506
1664
|
return null;
|
|
1507
1665
|
}
|
|
1508
|
-
return jsx(Fragment, {
|
|
1666
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
1509
1667
|
children: dimensions.map(function (dimension) {
|
|
1510
|
-
return jsx(CustomTooltip, {
|
|
1668
|
+
return /*#__PURE__*/jsx(CustomTooltip, {
|
|
1511
1669
|
title: dimension.label + ": " + dimension.value,
|
|
1512
|
-
children: jsx("span", {
|
|
1670
|
+
children: /*#__PURE__*/jsx("span", {
|
|
1513
1671
|
style: {
|
|
1514
1672
|
marginRight: 4
|
|
1515
1673
|
},
|
|
@@ -1537,6 +1695,7 @@ var LayerListDimensions = function LayerListDimensions(_ref) {
|
|
|
1537
1695
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1538
1696
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1539
1697
|
* */
|
|
1698
|
+
|
|
1540
1699
|
var buttonLarge = 80;
|
|
1541
1700
|
var buttonSmall = 60;
|
|
1542
1701
|
var layerSelectColumnsLarge = {
|
|
@@ -1639,6 +1798,24 @@ var sortByService = function sortByService(serviceObj) {
|
|
|
1639
1798
|
}, {});
|
|
1640
1799
|
};
|
|
1641
1800
|
|
|
1801
|
+
/* *
|
|
1802
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1803
|
+
* you may not use this file except in compliance with the License.
|
|
1804
|
+
* You may obtain a copy of the License at
|
|
1805
|
+
*
|
|
1806
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1807
|
+
*
|
|
1808
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1809
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1810
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1811
|
+
* See the License for the specific language governing permissions and
|
|
1812
|
+
* limitations under the License.
|
|
1813
|
+
*
|
|
1814
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1815
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1816
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1817
|
+
* */
|
|
1818
|
+
|
|
1642
1819
|
var layerInfoStyle = {
|
|
1643
1820
|
fontSize: '10px',
|
|
1644
1821
|
textOverflow: 'ellipsis',
|
|
@@ -1667,7 +1844,7 @@ var LayerListRow = function LayerListRow(_ref) {
|
|
|
1667
1844
|
var rowHeight = widthToRowHeight(layerSelectWidth);
|
|
1668
1845
|
var columns = widthToColumns(layerSelectWidth);
|
|
1669
1846
|
var dimensions = getDimensionsList(layer.dimensions);
|
|
1670
|
-
return jsxs(Grid, {
|
|
1847
|
+
return /*#__PURE__*/jsxs(Grid, {
|
|
1671
1848
|
alignItems: "center",
|
|
1672
1849
|
container: true,
|
|
1673
1850
|
"data-testid": "layerListLayerRow",
|
|
@@ -1680,14 +1857,14 @@ var LayerListRow = function LayerListRow(_ref) {
|
|
|
1680
1857
|
border: 'solid 1px',
|
|
1681
1858
|
borderColor: 'geowebColors.cards.cardContainerBorder'
|
|
1682
1859
|
},
|
|
1683
|
-
children: [jsxs(Grid, {
|
|
1860
|
+
children: [/*#__PURE__*/jsxs(Grid, {
|
|
1684
1861
|
container: true,
|
|
1685
1862
|
sx: columns.column8,
|
|
1686
|
-
children: [jsx(Grid, {
|
|
1863
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
1687
1864
|
size: {
|
|
1688
1865
|
xs: 12
|
|
1689
1866
|
},
|
|
1690
|
-
children: jsx(Box, {
|
|
1867
|
+
children: /*#__PURE__*/jsx(Box, {
|
|
1691
1868
|
sx: {
|
|
1692
1869
|
fontSize: '12px',
|
|
1693
1870
|
height: '14px',
|
|
@@ -1696,16 +1873,16 @@ var LayerListRow = function LayerListRow(_ref) {
|
|
|
1696
1873
|
textOverflow: 'ellipsis',
|
|
1697
1874
|
overflow: 'hidden'
|
|
1698
1875
|
},
|
|
1699
|
-
children: jsx(SearchHighlight, {
|
|
1876
|
+
children: /*#__PURE__*/jsx(SearchHighlight, {
|
|
1700
1877
|
search: searchFilter,
|
|
1701
1878
|
text: layer.title
|
|
1702
1879
|
})
|
|
1703
1880
|
})
|
|
1704
|
-
}), jsxs(Grid, {
|
|
1881
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
1705
1882
|
container: true,
|
|
1706
1883
|
direction: "column",
|
|
1707
1884
|
sx: columns.column1,
|
|
1708
|
-
children: [jsx(Box, {
|
|
1885
|
+
children: [/*#__PURE__*/jsx(Box, {
|
|
1709
1886
|
sx: {
|
|
1710
1887
|
fontSize: '12px',
|
|
1711
1888
|
height: '18px',
|
|
@@ -1713,45 +1890,45 @@ var LayerListRow = function LayerListRow(_ref) {
|
|
|
1713
1890
|
textOverflow: 'ellipsis',
|
|
1714
1891
|
overflow: 'hidden'
|
|
1715
1892
|
},
|
|
1716
|
-
children: jsx(SearchHighlight, {
|
|
1893
|
+
children: /*#__PURE__*/jsx(SearchHighlight, {
|
|
1717
1894
|
search: searchFilter,
|
|
1718
1895
|
text: service.name
|
|
1719
1896
|
})
|
|
1720
|
-
}), jsx(LayerInfoButton, {
|
|
1897
|
+
}), /*#__PURE__*/jsx(LayerInfoButton, {
|
|
1721
1898
|
isActive: hasActiveLayer,
|
|
1722
1899
|
onClick: onToggleActiveLayer
|
|
1723
1900
|
})]
|
|
1724
|
-
}), jsxs(Grid, {
|
|
1901
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
1725
1902
|
sx: columns.column2,
|
|
1726
|
-
children: [jsx(Grid, {
|
|
1903
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
1727
1904
|
sx: columns.column3,
|
|
1728
|
-
children: !!layer["abstract"] && jsx(Typography, {
|
|
1905
|
+
children: !!layer["abstract"] && /*#__PURE__*/jsx(Typography, {
|
|
1729
1906
|
"data-testid": "layerAbstract",
|
|
1730
1907
|
sx: layerInfoStyle,
|
|
1731
|
-
children: jsx(SearchHighlight, {
|
|
1908
|
+
children: /*#__PURE__*/jsx(SearchHighlight, {
|
|
1732
1909
|
search: searchFilter,
|
|
1733
1910
|
text: layer["abstract"]
|
|
1734
1911
|
})
|
|
1735
1912
|
})
|
|
1736
|
-
}), jsxs(Grid, {
|
|
1913
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
1737
1914
|
container: true,
|
|
1738
1915
|
sx: columns.column4,
|
|
1739
|
-
children: [jsx(Grid, {
|
|
1916
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
1740
1917
|
sx: columns.column5,
|
|
1741
|
-
children: jsx(LayerListDimensions, {
|
|
1918
|
+
children: /*#__PURE__*/jsx(LayerListDimensions, {
|
|
1742
1919
|
dimensions: dimensions
|
|
1743
1920
|
})
|
|
1744
|
-
}), jsxs(Grid, {
|
|
1921
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
1745
1922
|
sx: columns.column6,
|
|
1746
|
-
children: [layer.path.length > 0 && jsxs(Typography, {
|
|
1923
|
+
children: [layer.path.length > 0 && /*#__PURE__*/jsxs(Typography, {
|
|
1747
1924
|
sx: layerInfoStyle,
|
|
1748
|
-
children: [t('groups'), ":", ' ', jsx(SearchHighlight, {
|
|
1925
|
+
children: [t('groups'), ":", ' ', /*#__PURE__*/jsx(SearchHighlight, {
|
|
1749
1926
|
search: searchFilter,
|
|
1750
1927
|
text: layer.path.join(' / ')
|
|
1751
1928
|
})]
|
|
1752
|
-
}), ((_layer$keywords = layer.keywords) == null ? void 0 : _layer$keywords.length) > 0 && jsxs(Typography, {
|
|
1929
|
+
}), ((_layer$keywords = layer.keywords) == null ? void 0 : _layer$keywords.length) > 0 && /*#__PURE__*/jsxs(Typography, {
|
|
1753
1930
|
sx: layerInfoStyle,
|
|
1754
|
-
children: [t('keywords'), ":", ' ', jsx(SearchHighlight, {
|
|
1931
|
+
children: [t('keywords'), ":", ' ', /*#__PURE__*/jsx(SearchHighlight, {
|
|
1755
1932
|
search: searchFilter,
|
|
1756
1933
|
text: ((_layer$keywords2 = layer.keywords) != null ? _layer$keywords2 : []).slice().sort(function (textA, textB) {
|
|
1757
1934
|
return textA.localeCompare(textB);
|
|
@@ -1761,18 +1938,18 @@ var LayerListRow = function LayerListRow(_ref) {
|
|
|
1761
1938
|
})]
|
|
1762
1939
|
})]
|
|
1763
1940
|
})]
|
|
1764
|
-
}), jsx(Grid, {
|
|
1941
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
1765
1942
|
alignItems: "center",
|
|
1766
1943
|
container: true,
|
|
1767
1944
|
justifyContent: "flex-end",
|
|
1768
1945
|
sx: columns.column9,
|
|
1769
|
-
children: jsx(Box, {
|
|
1946
|
+
children: /*#__PURE__*/jsx(Box, {
|
|
1770
1947
|
alignItems: "flex-start",
|
|
1771
1948
|
sx: (columns.column7, {
|
|
1772
1949
|
width: '100%',
|
|
1773
1950
|
paddingLeft: '16px'
|
|
1774
1951
|
}),
|
|
1775
|
-
children: jsx(LayerAddRemoveButton, {
|
|
1952
|
+
children: /*#__PURE__*/jsx(LayerAddRemoveButton, {
|
|
1776
1953
|
addLayer: addLayer,
|
|
1777
1954
|
addLayerToAllMaps: addLayerToAllMaps,
|
|
1778
1955
|
allLayers: allLayers,
|
|
@@ -1788,6 +1965,24 @@ var LayerListRow = function LayerListRow(_ref) {
|
|
|
1788
1965
|
});
|
|
1789
1966
|
};
|
|
1790
1967
|
|
|
1968
|
+
/* *
|
|
1969
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1970
|
+
* you may not use this file except in compliance with the License.
|
|
1971
|
+
* You may obtain a copy of the License at
|
|
1972
|
+
*
|
|
1973
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1974
|
+
*
|
|
1975
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1976
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1977
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1978
|
+
* See the License for the specific language governing permissions and
|
|
1979
|
+
* limitations under the License.
|
|
1980
|
+
*
|
|
1981
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1982
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1983
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1984
|
+
* */
|
|
1985
|
+
|
|
1791
1986
|
var LayerRow = function LayerRow(_ref) {
|
|
1792
1987
|
var index = _ref.index,
|
|
1793
1988
|
style = _ref.style,
|
|
@@ -1809,7 +2004,7 @@ var LayerRow = function LayerRow(_ref) {
|
|
|
1809
2004
|
var layer = filteredLayers[index];
|
|
1810
2005
|
var service = services[layer.serviceName];
|
|
1811
2006
|
if (!service) {
|
|
1812
|
-
return jsx("div", {
|
|
2007
|
+
return /*#__PURE__*/jsx("div", {
|
|
1813
2008
|
style: style
|
|
1814
2009
|
});
|
|
1815
2010
|
}
|
|
@@ -1818,9 +2013,9 @@ var LayerRow = function LayerRow(_ref) {
|
|
|
1818
2013
|
boxSizing: 'border-box',
|
|
1819
2014
|
paddingBottom: rowMargin
|
|
1820
2015
|
});
|
|
1821
|
-
return jsx("div", {
|
|
2016
|
+
return /*#__PURE__*/jsx("div", {
|
|
1822
2017
|
style: rowStyle,
|
|
1823
|
-
children: jsx(LayerListRow, {
|
|
2018
|
+
children: /*#__PURE__*/jsx(LayerListRow, {
|
|
1824
2019
|
addLayer: addLayer,
|
|
1825
2020
|
addLayerToAllMaps: addLayerToAllMaps,
|
|
1826
2021
|
allLayers: allLayers,
|
|
@@ -1867,15 +2062,15 @@ var LayerList = function LayerList(_ref2) {
|
|
|
1867
2062
|
var layerSelectFilterHeight = 155 + serviceListHeight;
|
|
1868
2063
|
var minHeight = 320;
|
|
1869
2064
|
var listHeight = layerSelectHeight - layerSelectFilterHeight < minHeight ? minHeight : layerSelectHeight - layerSelectFilterHeight;
|
|
1870
|
-
return jsxs(Box, {
|
|
2065
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
1871
2066
|
"data-testid": "layerList",
|
|
1872
|
-
children: [jsxs(Box, {
|
|
2067
|
+
children: [/*#__PURE__*/jsxs(Box, {
|
|
1873
2068
|
sx: {
|
|
1874
2069
|
marginBottom: '4px',
|
|
1875
2070
|
fontSize: '12px'
|
|
1876
2071
|
},
|
|
1877
2072
|
children: [filteredLayers.length, " ", t('layer-list-results')]
|
|
1878
|
-
}), jsx(List$1, {
|
|
2073
|
+
}), /*#__PURE__*/jsx(List$1, {
|
|
1879
2074
|
defaultHeight: minHeight,
|
|
1880
2075
|
rowComponent: LayerRow,
|
|
1881
2076
|
rowCount: filteredLayers.length,
|
|
@@ -1905,6 +2100,24 @@ var LayerList = function LayerList(_ref2) {
|
|
|
1905
2100
|
});
|
|
1906
2101
|
};
|
|
1907
2102
|
|
|
2103
|
+
/* *
|
|
2104
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2105
|
+
* you may not use this file except in compliance with the License.
|
|
2106
|
+
* You may obtain a copy of the License at
|
|
2107
|
+
*
|
|
2108
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2109
|
+
*
|
|
2110
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2111
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2112
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2113
|
+
* See the License for the specific language governing permissions and
|
|
2114
|
+
* limitations under the License.
|
|
2115
|
+
*
|
|
2116
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2117
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2118
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2119
|
+
* */
|
|
2120
|
+
|
|
1908
2121
|
var LayerListConnect = function LayerListConnect(_ref) {
|
|
1909
2122
|
var mapId = _ref.mapId,
|
|
1910
2123
|
layerSelectHeight = _ref.layerSelectHeight,
|
|
@@ -2019,7 +2232,7 @@ var LayerListConnect = function LayerListConnect(_ref) {
|
|
|
2019
2232
|
dispatch(layerActions.hideLayerInfo());
|
|
2020
2233
|
}
|
|
2021
2234
|
}, [mapId, dispatch]);
|
|
2022
|
-
return jsx(LayerList, {
|
|
2235
|
+
return /*#__PURE__*/jsx(LayerList, {
|
|
2023
2236
|
addLayer: function addLayer(params) {
|
|
2024
2237
|
return _addLayer(params, mapId);
|
|
2025
2238
|
},
|
|
@@ -2041,6 +2254,24 @@ var LayerListConnect = function LayerListConnect(_ref) {
|
|
|
2041
2254
|
});
|
|
2042
2255
|
};
|
|
2043
2256
|
|
|
2257
|
+
/* *
|
|
2258
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2259
|
+
* you may not use this file except in compliance with the License.
|
|
2260
|
+
* You may obtain a copy of the License at
|
|
2261
|
+
*
|
|
2262
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2263
|
+
*
|
|
2264
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2265
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2266
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2267
|
+
* See the License for the specific language governing permissions and
|
|
2268
|
+
* limitations under the License.
|
|
2269
|
+
*
|
|
2270
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2271
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
2272
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2273
|
+
* */
|
|
2274
|
+
|
|
2044
2275
|
var style$2 = {
|
|
2045
2276
|
width: 'auto !important',
|
|
2046
2277
|
height: 'auto !important',
|
|
@@ -2052,7 +2283,7 @@ var LayerSelectButtonConnect = function LayerSelectButtonConnect(_ref) {
|
|
|
2052
2283
|
source = _ref$source === void 0 ? 'app' : _ref$source,
|
|
2053
2284
|
tooltipTitle = _ref.tooltipTitle,
|
|
2054
2285
|
_ref$icon = _ref.icon,
|
|
2055
|
-
icon = _ref$icon === void 0 ? jsx(LayersAdd, {
|
|
2286
|
+
icon = _ref$icon === void 0 ? /*#__PURE__*/jsx(LayersAdd, {
|
|
2056
2287
|
"data-testid": "layerSelectButtonConnectIcon"
|
|
2057
2288
|
}) : _ref$icon,
|
|
2058
2289
|
_ref$isMultiMap = _ref.isMultiMap,
|
|
@@ -2075,7 +2306,7 @@ var LayerSelectButtonConnect = function LayerSelectButtonConnect(_ref) {
|
|
|
2075
2306
|
source: source
|
|
2076
2307
|
}));
|
|
2077
2308
|
}, [currentActiveMapId, dispatch, isOpenInStore, mapId, source, dialogType]);
|
|
2078
|
-
return jsx(CustomIconButton, {
|
|
2309
|
+
return /*#__PURE__*/jsx(CustomIconButton, {
|
|
2079
2310
|
"data-testid": "layerSelectButton",
|
|
2080
2311
|
id: "layerSelectButton",
|
|
2081
2312
|
onClick: openLayerSelectDialog,
|
|
@@ -2085,6 +2316,24 @@ var LayerSelectButtonConnect = function LayerSelectButtonConnect(_ref) {
|
|
|
2085
2316
|
});
|
|
2086
2317
|
};
|
|
2087
2318
|
|
|
2319
|
+
/* *
|
|
2320
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2321
|
+
* you may not use this file except in compliance with the License.
|
|
2322
|
+
* You may obtain a copy of the License at
|
|
2323
|
+
*
|
|
2324
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2325
|
+
*
|
|
2326
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2327
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2328
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2329
|
+
* See the License for the specific language governing permissions and
|
|
2330
|
+
* limitations under the License.
|
|
2331
|
+
*
|
|
2332
|
+
* Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2333
|
+
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
2334
|
+
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
2335
|
+
* */
|
|
2336
|
+
|
|
2088
2337
|
var DataExplorerButtonConnect = function DataExplorerButtonConnect(_ref) {
|
|
2089
2338
|
var mapId = _ref.mapId,
|
|
2090
2339
|
_ref$source = _ref.source,
|
|
@@ -2106,20 +2355,38 @@ var DataExplorerButtonConnect = function DataExplorerButtonConnect(_ref) {
|
|
|
2106
2355
|
origin: mapEnums.MapActionOrigin.map
|
|
2107
2356
|
}));
|
|
2108
2357
|
}, [dispatch, dialogType, currentActiveMapId, mapId, isOpenInStore, source]);
|
|
2109
|
-
return jsx(CustomTooltip, {
|
|
2358
|
+
return /*#__PURE__*/jsx(CustomTooltip, {
|
|
2110
2359
|
title: "MeteoGate Data Explorer",
|
|
2111
|
-
children: jsx(CustomIconButton, {
|
|
2360
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
2112
2361
|
"data-testid": "dataExplorerButton",
|
|
2113
2362
|
isSelected: currentActiveMapId !== mapId ? false : isOpenInStore,
|
|
2114
2363
|
onClick: openDataExplorerDialog,
|
|
2115
2364
|
variant: "tool",
|
|
2116
|
-
children: jsx(MeteoGate, {
|
|
2365
|
+
children: /*#__PURE__*/jsx(MeteoGate, {
|
|
2117
2366
|
sx: {}
|
|
2118
2367
|
})
|
|
2119
2368
|
})
|
|
2120
2369
|
});
|
|
2121
2370
|
};
|
|
2122
2371
|
|
|
2372
|
+
/* *
|
|
2373
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2374
|
+
* you may not use this file except in compliance with the License.
|
|
2375
|
+
* You may obtain a copy of the License at
|
|
2376
|
+
*
|
|
2377
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2378
|
+
*
|
|
2379
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2380
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2381
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2382
|
+
* See the License for the specific language governing permissions and
|
|
2383
|
+
* limitations under the License.
|
|
2384
|
+
*
|
|
2385
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2386
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
2387
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2388
|
+
* */
|
|
2389
|
+
|
|
2123
2390
|
var SearchFieldConnect = function SearchFieldConnect() {
|
|
2124
2391
|
var dispatch = useDispatch();
|
|
2125
2392
|
var searchFilter = useAppSelector(function (store) {
|
|
@@ -2137,13 +2404,31 @@ var SearchFieldConnect = function SearchFieldConnect() {
|
|
|
2137
2404
|
filterText: filterText
|
|
2138
2405
|
}));
|
|
2139
2406
|
};
|
|
2140
|
-
return jsx(SearchField, {
|
|
2407
|
+
return /*#__PURE__*/jsx(SearchField, {
|
|
2141
2408
|
onOpenServicePopup: toggleServicePopup,
|
|
2142
2409
|
searchFilter: searchFilter,
|
|
2143
2410
|
setSearchFilter: setSearchFilter
|
|
2144
2411
|
});
|
|
2145
2412
|
};
|
|
2146
2413
|
|
|
2414
|
+
/* *
|
|
2415
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2416
|
+
* you may not use this file except in compliance with the License.
|
|
2417
|
+
* You may obtain a copy of the License at
|
|
2418
|
+
*
|
|
2419
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2420
|
+
*
|
|
2421
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2422
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2423
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2424
|
+
* See the License for the specific language governing permissions and
|
|
2425
|
+
* limitations under the License.
|
|
2426
|
+
*
|
|
2427
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2428
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2429
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2430
|
+
* */
|
|
2431
|
+
|
|
2147
2432
|
var style$1 = {
|
|
2148
2433
|
borderRadius: '20px!important',
|
|
2149
2434
|
marginRight: '4px',
|
|
@@ -2167,10 +2452,10 @@ var ServiceChip = function ServiceChip(_ref) {
|
|
|
2167
2452
|
var _useTheme = useTheme(),
|
|
2168
2453
|
geowebColors = _useTheme.palette.geowebColors;
|
|
2169
2454
|
var chip = all ? 'all' : service == null ? void 0 : service.serviceUrl;
|
|
2170
|
-
return jsx(CustomTooltip, {
|
|
2455
|
+
return /*#__PURE__*/jsx(CustomTooltip, {
|
|
2171
2456
|
title: service != null && service["abstract"] ? "Abstract: " + service["abstract"] : '',
|
|
2172
|
-
children: jsx("span", {
|
|
2173
|
-
children: jsx(CustomToggleButton, {
|
|
2457
|
+
children: /*#__PURE__*/jsx("span", {
|
|
2458
|
+
children: /*#__PURE__*/jsx(CustomToggleButton, {
|
|
2174
2459
|
"data-testid": all ? 'serviceChipAll' : 'serviceChip',
|
|
2175
2460
|
disabled: isDisabled,
|
|
2176
2461
|
onClick: function onClick() {
|
|
@@ -2199,6 +2484,24 @@ var ServiceChip = function ServiceChip(_ref) {
|
|
|
2199
2484
|
});
|
|
2200
2485
|
};
|
|
2201
2486
|
|
|
2487
|
+
/* *
|
|
2488
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2489
|
+
* you may not use this file except in compliance with the License.
|
|
2490
|
+
* You may obtain a copy of the License at
|
|
2491
|
+
*
|
|
2492
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2493
|
+
*
|
|
2494
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2495
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2496
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2497
|
+
* See the License for the specific language governing permissions and
|
|
2498
|
+
* limitations under the License.
|
|
2499
|
+
*
|
|
2500
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2501
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2502
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2503
|
+
* */
|
|
2504
|
+
|
|
2202
2505
|
var ServiceChipConnect = function ServiceChipConnect(_ref) {
|
|
2203
2506
|
var service = _ref.service,
|
|
2204
2507
|
isAllSelected = _ref.isAllSelected;
|
|
@@ -2222,7 +2525,7 @@ var ServiceChipConnect = function ServiceChipConnect(_ref) {
|
|
|
2222
2525
|
serviceId: serviceId
|
|
2223
2526
|
}));
|
|
2224
2527
|
};
|
|
2225
|
-
return jsx(ServiceChip, {
|
|
2528
|
+
return /*#__PURE__*/jsx(ServiceChip, {
|
|
2226
2529
|
isDisabled: service.isLoading,
|
|
2227
2530
|
isInSearch: isInSearch,
|
|
2228
2531
|
isSelected: isAllSelected ? false : service.enabled,
|
|
@@ -2233,7 +2536,7 @@ var ServiceChipConnect = function ServiceChipConnect(_ref) {
|
|
|
2233
2536
|
var AllChipConnect = function AllChipConnect(_ref2) {
|
|
2234
2537
|
var isAllSelected = _ref2.isAllSelected;
|
|
2235
2538
|
var dispatch = useDispatch();
|
|
2236
|
-
return jsx(ServiceChip, {
|
|
2539
|
+
return /*#__PURE__*/jsx(ServiceChip, {
|
|
2237
2540
|
isSelected: isAllSelected,
|
|
2238
2541
|
toggleChip: function toggleChip() {
|
|
2239
2542
|
if (!isAllSelected) {
|
|
@@ -2243,6 +2546,24 @@ var AllChipConnect = function AllChipConnect(_ref2) {
|
|
|
2243
2546
|
});
|
|
2244
2547
|
};
|
|
2245
2548
|
|
|
2549
|
+
/* *
|
|
2550
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2551
|
+
* you may not use this file except in compliance with the License.
|
|
2552
|
+
* You may obtain a copy of the License at
|
|
2553
|
+
*
|
|
2554
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2555
|
+
*
|
|
2556
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2557
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2558
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2559
|
+
* See the License for the specific language governing permissions and
|
|
2560
|
+
* limitations under the License.
|
|
2561
|
+
*
|
|
2562
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2563
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2564
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2565
|
+
* */
|
|
2566
|
+
|
|
2246
2567
|
var ServiceList = function ServiceList(_ref) {
|
|
2247
2568
|
var _ref$current;
|
|
2248
2569
|
var activeServicesById = _ref.activeServicesById,
|
|
@@ -2266,14 +2587,14 @@ var ServiceList = function ServiceList(_ref) {
|
|
|
2266
2587
|
var isAllSelected = activeServices.every(function (activeService) {
|
|
2267
2588
|
return activeService.enabled;
|
|
2268
2589
|
});
|
|
2269
|
-
return jsx(Box, {
|
|
2590
|
+
return /*#__PURE__*/jsx(Box, {
|
|
2270
2591
|
"data-testid": "serviceList",
|
|
2271
2592
|
sx: {
|
|
2272
2593
|
marginTop: '8px',
|
|
2273
2594
|
width: '100%',
|
|
2274
2595
|
overflow: 'hidden'
|
|
2275
2596
|
},
|
|
2276
|
-
children: jsxs(Box, {
|
|
2597
|
+
children: /*#__PURE__*/jsxs(Box, {
|
|
2277
2598
|
ref: ref,
|
|
2278
2599
|
sx: {
|
|
2279
2600
|
width: '100%',
|
|
@@ -2285,10 +2606,10 @@ var ServiceList = function ServiceList(_ref) {
|
|
|
2285
2606
|
marginBottom: '8px',
|
|
2286
2607
|
fontSize: '0.875rem'
|
|
2287
2608
|
},
|
|
2288
|
-
children: [!!(activeServicesIds != null && activeServicesIds.length) && jsx(AllChipConnect, {
|
|
2609
|
+
children: [!!(activeServicesIds != null && activeServicesIds.length) && /*#__PURE__*/jsx(AllChipConnect, {
|
|
2289
2610
|
isAllSelected: isAllSelected
|
|
2290
2611
|
}), activeServices.map(function (service) {
|
|
2291
|
-
return jsx(ServiceChipConnect, {
|
|
2612
|
+
return /*#__PURE__*/jsx(ServiceChipConnect, {
|
|
2292
2613
|
isAllSelected: isAllSelected,
|
|
2293
2614
|
service: service
|
|
2294
2615
|
}, service.serviceUrl);
|
|
@@ -2297,17 +2618,53 @@ var ServiceList = function ServiceList(_ref) {
|
|
|
2297
2618
|
});
|
|
2298
2619
|
};
|
|
2299
2620
|
|
|
2621
|
+
/* *
|
|
2622
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2623
|
+
* you may not use this file except in compliance with the License.
|
|
2624
|
+
* You may obtain a copy of the License at
|
|
2625
|
+
*
|
|
2626
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2627
|
+
*
|
|
2628
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2629
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2630
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2631
|
+
* See the License for the specific language governing permissions and
|
|
2632
|
+
* limitations under the License.
|
|
2633
|
+
*
|
|
2634
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2635
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2636
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2637
|
+
* */
|
|
2638
|
+
|
|
2300
2639
|
var ServiceListConnect = function ServiceListConnect(_ref) {
|
|
2301
2640
|
var setHeight = _ref.setHeight;
|
|
2302
2641
|
var filteredActiveServices = useAppSelector(function (store) {
|
|
2303
2642
|
return getFilteredActiveServices(store);
|
|
2304
2643
|
});
|
|
2305
|
-
return jsx(ServiceList, {
|
|
2644
|
+
return /*#__PURE__*/jsx(ServiceList, {
|
|
2306
2645
|
activeServicesById: sortByService(filteredActiveServices),
|
|
2307
2646
|
setHeight: setHeight
|
|
2308
2647
|
});
|
|
2309
2648
|
};
|
|
2310
2649
|
|
|
2650
|
+
/* *
|
|
2651
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2652
|
+
* you may not use this file except in compliance with the License.
|
|
2653
|
+
* You may obtain a copy of the License at
|
|
2654
|
+
*
|
|
2655
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2656
|
+
*
|
|
2657
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2658
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2659
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2660
|
+
* See the License for the specific language governing permissions and
|
|
2661
|
+
* limitations under the License.
|
|
2662
|
+
*
|
|
2663
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2664
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
2665
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2666
|
+
* */
|
|
2667
|
+
|
|
2311
2668
|
var styles = {
|
|
2312
2669
|
servicesContainer: {
|
|
2313
2670
|
width: '360px',
|
|
@@ -2375,7 +2732,7 @@ var ServiceOptionsDialog = function ServiceOptionsDialog(_ref) {
|
|
|
2375
2732
|
var _dialogRef$current;
|
|
2376
2733
|
(_dialogRef$current = dialogRef.current) == null || _dialogRef$current.focus();
|
|
2377
2734
|
}, []);
|
|
2378
|
-
return jsxs(Box, {
|
|
2735
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
2379
2736
|
"data-testid": "ServiceDialog",
|
|
2380
2737
|
onKeyDown: function onKeyDown(event) {
|
|
2381
2738
|
if (event.key !== 'Escape') {
|
|
@@ -2385,34 +2742,34 @@ var ServiceOptionsDialog = function ServiceOptionsDialog(_ref) {
|
|
|
2385
2742
|
ref: dialogRef,
|
|
2386
2743
|
sx: styles.servicesContainer,
|
|
2387
2744
|
tabIndex: -1,
|
|
2388
|
-
children: [jsxs(Box, {
|
|
2745
|
+
children: [/*#__PURE__*/jsxs(Box, {
|
|
2389
2746
|
sx: styles.header,
|
|
2390
|
-
children: [jsx(Box, {
|
|
2747
|
+
children: [/*#__PURE__*/jsx(Box, {
|
|
2391
2748
|
sx: styles.text,
|
|
2392
2749
|
children: t('services')
|
|
2393
|
-
}), error ? jsx(AlertBanner, {
|
|
2750
|
+
}), error ? /*#__PURE__*/jsx(AlertBanner, {
|
|
2394
2751
|
shouldClose: true,
|
|
2395
2752
|
title: error
|
|
2396
2753
|
}) : null]
|
|
2397
|
-
}), jsx(Backdrop, {
|
|
2754
|
+
}), /*#__PURE__*/jsx(Backdrop, {
|
|
2398
2755
|
open: isLoading,
|
|
2399
2756
|
sx: Object.assign({}, styles.loading, {
|
|
2400
2757
|
backgroundSize: 'cover'
|
|
2401
2758
|
}),
|
|
2402
|
-
children: jsx(CircularProgress, {})
|
|
2403
|
-
}), jsx(Rows, {
|
|
2759
|
+
children: /*#__PURE__*/jsx(CircularProgress, {})
|
|
2760
|
+
}), /*#__PURE__*/jsx(Rows, {
|
|
2404
2761
|
layerSelectReloadService: layerSelectReloadService,
|
|
2405
2762
|
layerSelectRemoveService: layerSelectRemoveService,
|
|
2406
2763
|
selectedLayers: selectedLayers,
|
|
2407
2764
|
services: services,
|
|
2408
2765
|
setServicePopupInfo: setServicePopupInfo
|
|
2409
|
-
}), jsx(Box, {
|
|
2766
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
2410
2767
|
sx: styles.footer,
|
|
2411
|
-
children: jsx(Button, {
|
|
2768
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
2412
2769
|
"data-testid": "openAddServiceButton",
|
|
2413
2770
|
onClick: openAddService,
|
|
2414
2771
|
onKeyDown: stopTabPropagation,
|
|
2415
|
-
startIcon: jsx(Add, {}),
|
|
2772
|
+
startIcon: /*#__PURE__*/jsx(Add, {}),
|
|
2416
2773
|
sx: styles.button,
|
|
2417
2774
|
variant: "tertiary",
|
|
2418
2775
|
children: t('add-a-new-service')
|
|
@@ -2455,7 +2812,7 @@ var Rows = function Rows(_ref2) {
|
|
|
2455
2812
|
return false;
|
|
2456
2813
|
};
|
|
2457
2814
|
var sortedServices = sortByService(services);
|
|
2458
|
-
return jsx(List, {
|
|
2815
|
+
return /*#__PURE__*/jsx(List, {
|
|
2459
2816
|
disablePadding: true,
|
|
2460
2817
|
children: Object.keys(sortedServices).map(function (serviceId) {
|
|
2461
2818
|
var _services$serviceId = services[serviceId],
|
|
@@ -2464,8 +2821,8 @@ var Rows = function Rows(_ref2) {
|
|
|
2464
2821
|
scope = _services$serviceId.scope;
|
|
2465
2822
|
var serviceHasActiveLayers = checkIfServiceHasActiveLayers(serviceUrl);
|
|
2466
2823
|
var userAddedService = isUserAddedService(scope);
|
|
2467
|
-
return jsx(ListItem, {
|
|
2468
|
-
secondaryAction: jsx(Box, {
|
|
2824
|
+
return /*#__PURE__*/jsx(ListItem, {
|
|
2825
|
+
secondaryAction: /*#__PURE__*/jsx(Box, {
|
|
2469
2826
|
sx: {
|
|
2470
2827
|
marginRight: '0px',
|
|
2471
2828
|
width: 96,
|
|
@@ -2473,7 +2830,7 @@ var Rows = function Rows(_ref2) {
|
|
|
2473
2830
|
marginLeft: 1
|
|
2474
2831
|
}
|
|
2475
2832
|
},
|
|
2476
|
-
children: jsxs(Grid, {
|
|
2833
|
+
children: /*#__PURE__*/jsxs(Grid, {
|
|
2477
2834
|
container: true,
|
|
2478
2835
|
justifyContent: "left",
|
|
2479
2836
|
sx: {
|
|
@@ -2483,30 +2840,30 @@ var Rows = function Rows(_ref2) {
|
|
|
2483
2840
|
marginLeft: 1
|
|
2484
2841
|
}
|
|
2485
2842
|
},
|
|
2486
|
-
children: [jsx(CustomTooltip, {
|
|
2843
|
+
children: [/*#__PURE__*/jsx(CustomTooltip, {
|
|
2487
2844
|
"data-testid": "updateServiceTooltip",
|
|
2488
2845
|
placement: tooltipPlacement(),
|
|
2489
2846
|
slotProps: {
|
|
2490
2847
|
popper: tooltipPopperProps
|
|
2491
2848
|
},
|
|
2492
2849
|
title: t('update-service-title'),
|
|
2493
|
-
children: jsx(CustomIconButton, {
|
|
2850
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
2494
2851
|
"aria-label": "Update layers from WMS service",
|
|
2495
2852
|
"data-testid": "updateServiceButton",
|
|
2496
2853
|
onClick: function onClick() {
|
|
2497
2854
|
layerSelectReloadService(serviceUrl);
|
|
2498
2855
|
},
|
|
2499
2856
|
onKeyDown: stopTabPropagation,
|
|
2500
|
-
children: jsx(Cached, {})
|
|
2857
|
+
children: /*#__PURE__*/jsx(Cached, {})
|
|
2501
2858
|
})
|
|
2502
|
-
}), userAddedService ? jsx(CustomTooltip, {
|
|
2859
|
+
}), userAddedService ? /*#__PURE__*/jsx(CustomTooltip, {
|
|
2503
2860
|
placement: tooltipPlacement(),
|
|
2504
2861
|
slotProps: {
|
|
2505
2862
|
popper: tooltipPopperProps
|
|
2506
2863
|
},
|
|
2507
2864
|
title: t('edit-service-title'),
|
|
2508
|
-
children: jsx("span", {
|
|
2509
|
-
children: jsx(CustomIconButton, {
|
|
2865
|
+
children: /*#__PURE__*/jsx("span", {
|
|
2866
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
2510
2867
|
"aria-label": "edit service",
|
|
2511
2868
|
"data-testid": "openEditServiceButton",
|
|
2512
2869
|
onClick: function onClick() {
|
|
@@ -2518,17 +2875,17 @@ var Rows = function Rows(_ref2) {
|
|
|
2518
2875
|
});
|
|
2519
2876
|
},
|
|
2520
2877
|
onKeyDown: stopTabPropagation,
|
|
2521
|
-
children: jsx(Edit, {})
|
|
2878
|
+
children: /*#__PURE__*/jsx(Edit, {})
|
|
2522
2879
|
})
|
|
2523
2880
|
})
|
|
2524
|
-
}) : jsx(CustomTooltip, {
|
|
2881
|
+
}) : /*#__PURE__*/jsx(CustomTooltip, {
|
|
2525
2882
|
placement: tooltipPlacement(),
|
|
2526
2883
|
slotProps: {
|
|
2527
2884
|
popper: tooltipPopperProps
|
|
2528
2885
|
},
|
|
2529
2886
|
title: t('show-service-title'),
|
|
2530
|
-
children: jsx("span", {
|
|
2531
|
-
children: jsx(CustomIconButton, {
|
|
2887
|
+
children: /*#__PURE__*/jsx("span", {
|
|
2888
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
2532
2889
|
"aria-label": "show service",
|
|
2533
2890
|
"data-testid": "openShowServiceButton",
|
|
2534
2891
|
onClick: function onClick() {
|
|
@@ -2540,19 +2897,19 @@ var Rows = function Rows(_ref2) {
|
|
|
2540
2897
|
});
|
|
2541
2898
|
},
|
|
2542
2899
|
onKeyDown: stopTabPropagation,
|
|
2543
|
-
children: jsx(Visibility, {})
|
|
2900
|
+
children: /*#__PURE__*/jsx(Visibility, {})
|
|
2544
2901
|
})
|
|
2545
2902
|
})
|
|
2546
|
-
}), !!userAddedService && jsx(Box, {
|
|
2547
|
-
children: jsx(CustomTooltip, {
|
|
2903
|
+
}), !!userAddedService && /*#__PURE__*/jsx(Box, {
|
|
2904
|
+
children: /*#__PURE__*/jsx(CustomTooltip, {
|
|
2548
2905
|
"data-testid": "removeServiceTooltip",
|
|
2549
2906
|
placement: tooltipPlacement(),
|
|
2550
2907
|
slotProps: {
|
|
2551
2908
|
popper: tooltipPopperProps
|
|
2552
2909
|
},
|
|
2553
2910
|
title: deleteServiceTitle(t, serviceHasActiveLayers),
|
|
2554
|
-
children: jsx("span", {
|
|
2555
|
-
children: jsx(CustomIconButton, {
|
|
2911
|
+
children: /*#__PURE__*/jsx("span", {
|
|
2912
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
2556
2913
|
"aria-label": "delete service",
|
|
2557
2914
|
"data-testid": "removeServiceButton",
|
|
2558
2915
|
disabled: serviceHasActiveLayers,
|
|
@@ -2560,18 +2917,18 @@ var Rows = function Rows(_ref2) {
|
|
|
2560
2917
|
return layerSelectRemoveService(serviceId, serviceUrl, serviceName);
|
|
2561
2918
|
},
|
|
2562
2919
|
onKeyDown: stopTabPropagation,
|
|
2563
|
-
children: jsx(Delete, {})
|
|
2920
|
+
children: /*#__PURE__*/jsx(Delete, {})
|
|
2564
2921
|
})
|
|
2565
2922
|
})
|
|
2566
2923
|
})
|
|
2567
2924
|
})]
|
|
2568
2925
|
})
|
|
2569
2926
|
}),
|
|
2570
|
-
children: jsx(ListItemText, {
|
|
2927
|
+
children: /*#__PURE__*/jsx(ListItemText, {
|
|
2571
2928
|
style: {
|
|
2572
2929
|
fontSize: '16px'
|
|
2573
2930
|
},
|
|
2574
|
-
children: jsx(Typography, {
|
|
2931
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
2575
2932
|
noWrap: true,
|
|
2576
2933
|
style: {
|
|
2577
2934
|
textOverflow: 'ellipsis',
|
|
@@ -2779,7 +3136,7 @@ var ServiceOptionsDialogConnect = function ServiceOptionsDialogConnect(_ref) {
|
|
|
2779
3136
|
return _ref2.apply(this, arguments);
|
|
2780
3137
|
};
|
|
2781
3138
|
}(), [serviceSetLayers, services, showSnackbar, t]);
|
|
2782
|
-
return jsx(ServiceOptionsDialog, {
|
|
3139
|
+
return /*#__PURE__*/jsx(ServiceOptionsDialog, {
|
|
2783
3140
|
error: error,
|
|
2784
3141
|
isLoading: isLoading,
|
|
2785
3142
|
layerSelectReloadService: layerSelectReloadService,
|
|
@@ -2790,17 +3147,53 @@ var ServiceOptionsDialogConnect = function ServiceOptionsDialogConnect(_ref) {
|
|
|
2790
3147
|
});
|
|
2791
3148
|
};
|
|
2792
3149
|
|
|
3150
|
+
/* *
|
|
3151
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3152
|
+
* you may not use this file except in compliance with the License.
|
|
3153
|
+
* You may obtain a copy of the License at
|
|
3154
|
+
*
|
|
3155
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3156
|
+
*
|
|
3157
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3158
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3159
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3160
|
+
* See the License for the specific language governing permissions and
|
|
3161
|
+
* limitations under the License.
|
|
3162
|
+
*
|
|
3163
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3164
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
3165
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3166
|
+
* */
|
|
3167
|
+
|
|
2793
3168
|
var ServiceOptionsButton = function ServiceOptionsButton(_ref) {
|
|
2794
3169
|
var mapId = _ref.mapId;
|
|
2795
|
-
return jsx(ToggleMenu, {
|
|
3170
|
+
return /*#__PURE__*/jsx(ToggleMenu, {
|
|
2796
3171
|
buttonTestId: "serviceOptionsButton",
|
|
2797
3172
|
menuPosition: "bottom",
|
|
2798
|
-
children: jsx(ServiceOptionsDialogConnect, {
|
|
3173
|
+
children: /*#__PURE__*/jsx(ServiceOptionsDialogConnect, {
|
|
2799
3174
|
mapId: mapId
|
|
2800
3175
|
})
|
|
2801
3176
|
});
|
|
2802
3177
|
};
|
|
2803
3178
|
|
|
3179
|
+
/* *
|
|
3180
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3181
|
+
* you may not use this file except in compliance with the License.
|
|
3182
|
+
* You may obtain a copy of the License at
|
|
3183
|
+
*
|
|
3184
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3185
|
+
*
|
|
3186
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3187
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3188
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3189
|
+
* See the License for the specific language governing permissions and
|
|
3190
|
+
* limitations under the License.
|
|
3191
|
+
*
|
|
3192
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3193
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
3194
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3195
|
+
* */
|
|
3196
|
+
|
|
2804
3197
|
var LayerSelect = function LayerSelect(_ref) {
|
|
2805
3198
|
var mapId = _ref.mapId,
|
|
2806
3199
|
bounds = _ref.bounds,
|
|
@@ -2844,7 +3237,7 @@ var LayerSelect = function LayerSelect(_ref) {
|
|
|
2844
3237
|
setServiceListHeight(height);
|
|
2845
3238
|
}
|
|
2846
3239
|
};
|
|
2847
|
-
return jsxs(ToolContainerDraggable, {
|
|
3240
|
+
return /*#__PURE__*/jsxs(ToolContainerDraggable, {
|
|
2848
3241
|
bounds: bounds,
|
|
2849
3242
|
"data-testid": "layerSelectWindow",
|
|
2850
3243
|
isOpen: isOpen,
|
|
@@ -2854,6 +3247,7 @@ var LayerSelect = function LayerSelect(_ref) {
|
|
|
2854
3247
|
onMouseDown: function onMouseDown(event) {
|
|
2855
3248
|
var target = event.target;
|
|
2856
3249
|
var isButtonInScrollableList = target.closest('.layerInfoButton') || target.closest('.layerAddRemoveButton');
|
|
3250
|
+
|
|
2857
3251
|
// don't propagate when clicking on layerInfoButton or addRemoveButton
|
|
2858
3252
|
if (isButtonInScrollableList) {
|
|
2859
3253
|
event.stopPropagation();
|
|
@@ -2880,55 +3274,55 @@ var LayerSelect = function LayerSelect(_ref) {
|
|
|
2880
3274
|
height: height
|
|
2881
3275
|
},
|
|
2882
3276
|
title: showTitle ? "Layer Select " + mapId : 'Layer Select',
|
|
2883
|
-
children: [jsx(Box, {
|
|
3277
|
+
children: [/*#__PURE__*/jsx(Box, {
|
|
2884
3278
|
sx: {
|
|
2885
3279
|
padding: '4px 16px 0 16px'
|
|
2886
3280
|
},
|
|
2887
|
-
children: jsx(SearchFieldConnect, {})
|
|
2888
|
-
}), jsx(Box, {
|
|
3281
|
+
children: /*#__PURE__*/jsx(SearchFieldConnect, {})
|
|
3282
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
2889
3283
|
sx: {
|
|
2890
3284
|
"float": 'left',
|
|
2891
3285
|
position: 'absolute',
|
|
2892
3286
|
margin: '8px 8px 0 16px',
|
|
2893
3287
|
zIndex: 2
|
|
2894
3288
|
},
|
|
2895
|
-
children: jsxs(Grid, {
|
|
3289
|
+
children: /*#__PURE__*/jsxs(Grid, {
|
|
2896
3290
|
container: true,
|
|
2897
|
-
children: [jsx(Grid, {
|
|
3291
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
2898
3292
|
size: 12,
|
|
2899
|
-
children: jsx(KeywordFilterButtonConnect, {
|
|
3293
|
+
children: /*#__PURE__*/jsx(KeywordFilterButtonConnect, {
|
|
2900
3294
|
isMultiMap: isMultiMap,
|
|
2901
3295
|
mapId: mapId,
|
|
2902
3296
|
source: source
|
|
2903
3297
|
})
|
|
2904
|
-
}), !!hasDataExplorer && jsx(Grid, {
|
|
3298
|
+
}), !!hasDataExplorer && /*#__PURE__*/jsx(Grid, {
|
|
2905
3299
|
size: 12,
|
|
2906
|
-
children: jsx(DataExplorerButtonConnect, {
|
|
3300
|
+
children: /*#__PURE__*/jsx(DataExplorerButtonConnect, {
|
|
2907
3301
|
mapId: mapId
|
|
2908
3302
|
})
|
|
2909
3303
|
})]
|
|
2910
3304
|
})
|
|
2911
|
-
}), jsx(Box, {
|
|
3305
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
2912
3306
|
sx: {
|
|
2913
3307
|
position: 'absolute',
|
|
2914
3308
|
margin: '8px 0 0 calc(100% - 40px)',
|
|
2915
3309
|
zIndex: 2
|
|
2916
3310
|
},
|
|
2917
|
-
children: jsx(ServiceOptionsButton, {
|
|
3311
|
+
children: /*#__PURE__*/jsx(ServiceOptionsButton, {
|
|
2918
3312
|
mapId: mapId
|
|
2919
3313
|
})
|
|
2920
|
-
}), jsx(Box, {
|
|
3314
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
2921
3315
|
sx: hasDataExplorer ? {
|
|
2922
3316
|
minHeight: '52px'
|
|
2923
3317
|
} : {},
|
|
2924
|
-
children: jsx(ServiceListConnect, {
|
|
3318
|
+
children: /*#__PURE__*/jsx(ServiceListConnect, {
|
|
2925
3319
|
setHeight: handleHeightChange
|
|
2926
3320
|
})
|
|
2927
|
-
}), jsx(Box, {
|
|
3321
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
2928
3322
|
sx: {
|
|
2929
3323
|
padding: '0 16px'
|
|
2930
3324
|
},
|
|
2931
|
-
children: jsx(LayerListConnect, {
|
|
3325
|
+
children: /*#__PURE__*/jsx(LayerListConnect, {
|
|
2932
3326
|
layerSelectHeight: height,
|
|
2933
3327
|
layerSelectWidth: width,
|
|
2934
3328
|
mapId: mapId,
|
|
@@ -2961,12 +3355,12 @@ var getTitleForVariant = function getTitleForVariant(t, variant) {
|
|
|
2961
3355
|
return 'Service';
|
|
2962
3356
|
}
|
|
2963
3357
|
};
|
|
2964
|
-
var FormFields
|
|
2965
|
-
(function (FormFields) {
|
|
3358
|
+
var FormFields = /*#__PURE__*/function (FormFields) {
|
|
2966
3359
|
FormFields["serviceUrl"] = "serviceUrl";
|
|
2967
3360
|
FormFields["serviceName"] = "serviceName";
|
|
2968
3361
|
FormFields["serviceAbstracts"] = "serviceAbstracts";
|
|
2969
|
-
|
|
3362
|
+
return FormFields;
|
|
3363
|
+
}(FormFields || {});
|
|
2970
3364
|
var InitialValidationsTrigger = function InitialValidationsTrigger(_ref) {
|
|
2971
3365
|
var trigger = _ref.trigger,
|
|
2972
3366
|
getValues = _ref.getValues,
|
|
@@ -3137,8 +3531,8 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
3137
3531
|
var isSubmitDisabled = getFormHasformErrors() || getFormAreRequiredFieldsEmpty();
|
|
3138
3532
|
var isShowPopup = servicePopupVariant === 'show';
|
|
3139
3533
|
var isServiceUrlDisabled = isShowPopup || servicePopupVariant === 'edit';
|
|
3140
|
-
return jsx(CustomDialog, {
|
|
3141
|
-
actions: isShowPopup ? jsx(Button, {
|
|
3534
|
+
return /*#__PURE__*/jsx(CustomDialog, {
|
|
3535
|
+
actions: isShowPopup ? /*#__PURE__*/jsx(Button, {
|
|
3142
3536
|
onClick: function onClick() {
|
|
3143
3537
|
return closePopup();
|
|
3144
3538
|
},
|
|
@@ -3150,8 +3544,8 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
3150
3544
|
},
|
|
3151
3545
|
variant: "tertiary",
|
|
3152
3546
|
children: t('close')
|
|
3153
|
-
}) : jsxs(Fragment, {
|
|
3154
|
-
children: [jsx(Button, {
|
|
3547
|
+
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
3548
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
3155
3549
|
"data-testid": "closePopupButtonCancel",
|
|
3156
3550
|
onClick: closePopup,
|
|
3157
3551
|
sx: {
|
|
@@ -3162,7 +3556,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
3162
3556
|
},
|
|
3163
3557
|
variant: "tertiary",
|
|
3164
3558
|
children: t('cancel')
|
|
3165
|
-
}), jsx(Button, {
|
|
3559
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
3166
3560
|
"data-testid": "saveServiceButton",
|
|
3167
3561
|
disabled: isSubmitDisabled || isLoading,
|
|
3168
3562
|
form: "servicePopupForm",
|
|
@@ -3196,7 +3590,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
3196
3590
|
}
|
|
3197
3591
|
},
|
|
3198
3592
|
title: getTitleForVariant(t, servicePopupVariant),
|
|
3199
|
-
children: jsxs("form", {
|
|
3593
|
+
children: /*#__PURE__*/jsxs("form", {
|
|
3200
3594
|
id: "servicePopupForm",
|
|
3201
3595
|
onSubmit: handleSubmit(/*#__PURE__*/function () {
|
|
3202
3596
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(formValues) {
|
|
@@ -3214,11 +3608,11 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
3214
3608
|
return _ref5.apply(this, arguments);
|
|
3215
3609
|
};
|
|
3216
3610
|
}()),
|
|
3217
|
-
children: [!!isLoading && jsx(Box, {
|
|
3611
|
+
children: [!!isLoading && /*#__PURE__*/jsx(Box, {
|
|
3218
3612
|
sx: {
|
|
3219
3613
|
position: 'relative'
|
|
3220
3614
|
},
|
|
3221
|
-
children: jsx(LinearProgress, {
|
|
3615
|
+
children: /*#__PURE__*/jsx(LinearProgress, {
|
|
3222
3616
|
color: "secondary",
|
|
3223
3617
|
"data-testid": "loadingIndicator",
|
|
3224
3618
|
sx: {
|
|
@@ -3227,15 +3621,15 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
3227
3621
|
top: 8
|
|
3228
3622
|
}
|
|
3229
3623
|
})
|
|
3230
|
-
}), jsx(ReactHookFormTextField, {
|
|
3624
|
+
}), /*#__PURE__*/jsx(ReactHookFormTextField, {
|
|
3231
3625
|
autoFocus: !shouldDisableAutoFocus,
|
|
3232
3626
|
defaultValue: serviceUrl,
|
|
3233
3627
|
disabled: isServiceUrlDisabled || isLoading,
|
|
3234
3628
|
inputSlotProps: {
|
|
3235
3629
|
disableUnderline: isShowPopup,
|
|
3236
|
-
endAdornment: isShowPopup && jsx(InputAdornment, {
|
|
3630
|
+
endAdornment: isShowPopup && /*#__PURE__*/jsx(InputAdornment, {
|
|
3237
3631
|
position: "end",
|
|
3238
|
-
children: jsx(CustomIconButton, {
|
|
3632
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
3239
3633
|
"aria-label": "copy url",
|
|
3240
3634
|
onClick: function onClick() {
|
|
3241
3635
|
void navigator.clipboard.writeText(serviceUrl);
|
|
@@ -3244,7 +3638,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
3244
3638
|
sx: {
|
|
3245
3639
|
marginTop: 0.5
|
|
3246
3640
|
},
|
|
3247
|
-
children: jsx(Copy, {})
|
|
3641
|
+
children: /*#__PURE__*/jsx(Copy, {})
|
|
3248
3642
|
})
|
|
3249
3643
|
})
|
|
3250
3644
|
},
|
|
@@ -3261,7 +3655,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
3261
3655
|
})
|
|
3262
3656
|
},
|
|
3263
3657
|
sx: style.textField
|
|
3264
|
-
}), jsx(ReactHookFormTextField, {
|
|
3658
|
+
}), /*#__PURE__*/jsx(ReactHookFormTextField, {
|
|
3265
3659
|
defaultValue: serviceName,
|
|
3266
3660
|
disabled: isShowPopup || isLoading,
|
|
3267
3661
|
inputSlotProps: {
|
|
@@ -3277,7 +3671,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
3277
3671
|
}
|
|
3278
3672
|
},
|
|
3279
3673
|
sx: style.textField
|
|
3280
|
-
}), jsx(ReactHookFormTextField, {
|
|
3674
|
+
}), /*#__PURE__*/jsx(ReactHookFormTextField, {
|
|
3281
3675
|
defaultValue: "",
|
|
3282
3676
|
disabled: isShowPopup || isLoading,
|
|
3283
3677
|
helperText: !isShowPopup ? t('service-popup-helper-text') : '',
|
|
@@ -3290,7 +3684,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
3290
3684
|
name: FormFields.serviceAbstracts,
|
|
3291
3685
|
rows: 4,
|
|
3292
3686
|
sx: style.textField
|
|
3293
|
-
}), !isServiceUrlDisabled && jsx(InitialValidationsTrigger, {
|
|
3687
|
+
}), !isServiceUrlDisabled && /*#__PURE__*/jsx(InitialValidationsTrigger, {
|
|
3294
3688
|
getValues: getValues,
|
|
3295
3689
|
onValidField: fetchServiceData,
|
|
3296
3690
|
trigger: trigger
|
|
@@ -3300,7 +3694,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
3300
3694
|
};
|
|
3301
3695
|
var ServicePopup = function ServicePopup(_ref6) {
|
|
3302
3696
|
var props = Object.assign({}, (_objectDestructuringEmpty(_ref6), _ref6));
|
|
3303
|
-
return jsx(ReactHookFormProvider, {
|
|
3697
|
+
return /*#__PURE__*/jsx(ReactHookFormProvider, {
|
|
3304
3698
|
options: Object.assign({}, defaultFormOptions, {
|
|
3305
3699
|
defaultValues: {
|
|
3306
3700
|
serviceUrl: props.serviceUrl,
|
|
@@ -3308,10 +3702,28 @@ var ServicePopup = function ServicePopup(_ref6) {
|
|
|
3308
3702
|
serviceAbstracts: props.serviceAbstracts
|
|
3309
3703
|
}
|
|
3310
3704
|
}),
|
|
3311
|
-
children: jsx(ServicePopupUnwrapped, Object.assign({}, props))
|
|
3705
|
+
children: /*#__PURE__*/jsx(ServicePopupUnwrapped, Object.assign({}, props))
|
|
3312
3706
|
});
|
|
3313
3707
|
};
|
|
3314
3708
|
|
|
3709
|
+
/* *
|
|
3710
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3711
|
+
* you may not use this file except in compliance with the License.
|
|
3712
|
+
* You may obtain a copy of the License at
|
|
3713
|
+
*
|
|
3714
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3715
|
+
*
|
|
3716
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3717
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3718
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3719
|
+
* See the License for the specific language governing permissions and
|
|
3720
|
+
* limitations under the License.
|
|
3721
|
+
*
|
|
3722
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3723
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
3724
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3725
|
+
* */
|
|
3726
|
+
|
|
3315
3727
|
// Extracted from ServicePopupDialog as the getActiveServices and getActiveServiceById selectors
|
|
3316
3728
|
// Result in many rerenders. By extracting we're able to only render this component and these selectors
|
|
3317
3729
|
// when the dialog is open
|
|
@@ -3339,7 +3751,7 @@ var ServicePopupDialogConnect = function ServicePopupDialogConnect(_ref) {
|
|
|
3339
3751
|
message: message
|
|
3340
3752
|
}));
|
|
3341
3753
|
}, [dispatch]);
|
|
3342
|
-
return jsx(ServicePopup, {
|
|
3754
|
+
return /*#__PURE__*/jsx(ServicePopup, {
|
|
3343
3755
|
closePopup: setServicePopupClosed,
|
|
3344
3756
|
isOpen: isOpen,
|
|
3345
3757
|
serviceAbstracts: activeService == null ? void 0 : activeService["abstract"],
|
|
@@ -3353,6 +3765,24 @@ var ServicePopupDialogConnect = function ServicePopupDialogConnect(_ref) {
|
|
|
3353
3765
|
});
|
|
3354
3766
|
};
|
|
3355
3767
|
|
|
3768
|
+
/* *
|
|
3769
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3770
|
+
* you may not use this file except in compliance with the License.
|
|
3771
|
+
* You may obtain a copy of the License at
|
|
3772
|
+
*
|
|
3773
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3774
|
+
*
|
|
3775
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3776
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3777
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3778
|
+
* See the License for the specific language governing permissions and
|
|
3779
|
+
* limitations under the License.
|
|
3780
|
+
*
|
|
3781
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3782
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
3783
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3784
|
+
* */
|
|
3785
|
+
|
|
3356
3786
|
var ServicePopupConnect = function ServicePopupConnect() {
|
|
3357
3787
|
var dispatch = useDispatch();
|
|
3358
3788
|
var _useAppSelector = useAppSelector(function (store) {
|
|
@@ -3368,7 +3798,7 @@ var ServicePopupConnect = function ServicePopupConnect() {
|
|
|
3368
3798
|
if (!isOpen) {
|
|
3369
3799
|
return null;
|
|
3370
3800
|
}
|
|
3371
|
-
return jsx(ServicePopupDialogConnect, {
|
|
3801
|
+
return /*#__PURE__*/jsx(ServicePopupDialogConnect, {
|
|
3372
3802
|
isOpen: isOpen,
|
|
3373
3803
|
serviceId: serviceId,
|
|
3374
3804
|
setServicePopupClosed: setServicePopupClosed,
|
|
@@ -3377,6 +3807,24 @@ var ServicePopupConnect = function ServicePopupConnect() {
|
|
|
3377
3807
|
});
|
|
3378
3808
|
};
|
|
3379
3809
|
|
|
3810
|
+
/* *
|
|
3811
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3812
|
+
* you may not use this file except in compliance with the License.
|
|
3813
|
+
* You may obtain a copy of the License at
|
|
3814
|
+
*
|
|
3815
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3816
|
+
*
|
|
3817
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3818
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3819
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3820
|
+
* See the License for the specific language governing permissions and
|
|
3821
|
+
* limitations under the License.
|
|
3822
|
+
*
|
|
3823
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3824
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
3825
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3826
|
+
* */
|
|
3827
|
+
|
|
3380
3828
|
/**
|
|
3381
3829
|
* LayerSelectConnect is a component that is opened from LayerManager
|
|
3382
3830
|
* It's used to add Services and Layers to the application
|
|
@@ -3404,8 +3852,8 @@ var LayerSelectConnect = function LayerSelectConnect(_ref) {
|
|
|
3404
3852
|
uiSource = _useSetupDialog.uiSource;
|
|
3405
3853
|
var config = sessionStorageProvider.getConfig();
|
|
3406
3854
|
var hasDataExplorer = !!config.GW_DATA_EXPLORER_CONFIGURATION_FILENAME;
|
|
3407
|
-
return jsxs(Fragment, {
|
|
3408
|
-
children: [jsx(LayerSelect, {
|
|
3855
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
3856
|
+
children: [/*#__PURE__*/jsx(LayerSelect, {
|
|
3409
3857
|
bounds: bounds,
|
|
3410
3858
|
hasDataExplorer: hasDataExplorer,
|
|
3411
3859
|
isMultiMap: isMultiMap,
|
|
@@ -3416,11 +3864,11 @@ var LayerSelectConnect = function LayerSelectConnect(_ref) {
|
|
|
3416
3864
|
order: dialogOrder,
|
|
3417
3865
|
showTitle: showTitle,
|
|
3418
3866
|
source: uiSource
|
|
3419
|
-
}), jsx(KeywordFilterResultsConnect, {
|
|
3867
|
+
}), /*#__PURE__*/jsx(KeywordFilterResultsConnect, {
|
|
3420
3868
|
isMultiMap: isMultiMap,
|
|
3421
3869
|
mapId: mapId || initialMapId
|
|
3422
|
-
}), jsx(ServicePopupConnect, {})]
|
|
3870
|
+
}), /*#__PURE__*/jsx(ServicePopupConnect, {})]
|
|
3423
3871
|
});
|
|
3424
3872
|
};
|
|
3425
3873
|
|
|
3426
|
-
export { AllChipConnect, DataExplorerButtonConnect, KeywordFilterButtonConnect, KeywordFilterResults, KeywordFilterResultsConnect, KeywordFilterResultsListItemConnect, KeywordFilterSelectAllSwitchConnect, LAYER_SELECT_NAMESPACE, LayerAddRemoveButton, LayerList, LayerListConnect, LayerListDimensions, LayerListRow, LayerSelectButtonConnect, LayerSelectConnect, SearchFieldConnect, ServiceChip, ServiceChipConnect, ServiceList, ServiceListConnect, ServiceOptionsButton, ServiceOptionsDialog, ServiceOptionsDialogConnect, ServicePopup, ServicePopupConnect, ServicePopupDialogConnect, createMockStore, getServiceSuccesUpdateMessage, getSuccesMessage, isUserAddedService, layerSelectActions, initialState as layerSelectInitialState, layerSelectListener, layerSelectMiddlewares, layerSelectReducer, layerSelectReducersMap, selectors as layerSelectSelectors, layerSelectTranslations, useAppSelector };
|
|
3874
|
+
export { AllChipConnect, DataExplorerButtonConnect, KeywordFilterButtonConnect, KeywordFilterResults, KeywordFilterResultsConnect, KeywordFilterResultsListItemConnect, KeywordFilterSelectAllSwitchConnect, LAYER_SELECT_NAMESPACE, LayerAddRemoveButton, LayerList, LayerListConnect, LayerListDimensions, LayerListRow, LayerSelectButtonConnect, LayerSelectConnect, SearchFieldConnect, ServiceChip, ServiceChipConnect, ServiceList, ServiceListConnect, ServiceOptionsButton, ServiceOptionsDialog, ServiceOptionsDialogConnect, ServicePopup, ServicePopupConnect, ServicePopupDialogConnect, createMockStore, getServiceSuccesUpdateMessage, getSuccesMessage, isUserAddedService, layerSelectActions, initialState as layerSelectInitialState, layerSelectListener, layerSelectMiddlewares, layerSelectReducer, layerSelectReducersMap, selectors as layerSelectSelectors, layerSelectTranslations, types as layerSelectTypes, useAppSelector };
|