@opengeoweb/core 4.18.0 → 4.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +777 -542
- package/index.umd.js +733 -499
- package/lib/components/LayerManager/BaseLayerRow/BaseLayerRow.d.ts +2 -0
- package/lib/components/LayerManager/BaseLayerRow/BaseLayers/BaseLayers.d.ts +2 -0
- package/lib/components/LayerManager/BaseLayerRow/BaseLayers/BaseLayersConnect.d.ts +2 -0
- package/lib/components/LayerManager/DescriptionRow/DescriptionRow.d.ts +2 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerContainerRow.d.ts +2 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/ActivateLayer/ActivateLayer.d.ts +8 -2
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/DeleteLayer/DeleteLayerConnect.d.ts +2 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/DragHandle/DragHandle.d.ts +3 -1
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/EnableLayer/EnableLayerConnect.d.ts +2 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/LayerRowConnect.d.ts +2 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/Menubutton/MenuButton.d.ts +2 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/Menubutton/MenuButtonConnect.d.ts +2 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/OpacitySelect/OpacitySelect.d.ts +1 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/OpacitySelect/OpacitySelectConnect.d.ts +1 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderLayers/RenderLayers.d.ts +1 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderLayers/RenderLayersConnect.d.ts +1 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderStyles/RenderStyles.d.ts +2 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderStyles/RenderStylesConnect.d.ts +2 -0
- package/lib/components/LayerManager/LayerManager.d.ts +2 -0
- package/lib/components/LayerManager/LayerManagerUtils.d.ts +60 -0
- package/lib/components/LayerManager/LayerSelect/LayerSelectButtonConnect.d.ts +2 -0
- package/lib/components/TimeSlider/TimeSliderButtons/PlayButton/PlayButtonConnect.d.ts +8 -2
- package/lib/index.d.ts +10 -2
- package/lib/store/generic/index.d.ts +2 -0
- package/lib/store/generic/synchronizationGroups/index.d.ts +1 -0
- package/lib/store/generic/synchronizationGroups/selectors.d.ts +1 -0
- package/lib/store/generic/synchronizationGroups/types.d.ts +5 -1
- package/lib/store/mapStore/map/reducer.d.ts +22 -0
- package/lib/store/mapStore/map/sagas.d.ts +2 -1
- package/lib/store/router/utils.d.ts +1 -1
- package/package.json +11 -10
package/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@reduxjs/toolkit'), require('immer'), require('moment'), require('react'), require('lodash'), require('redux-saga/effects'), require('react-redux'), require('@opengeoweb/shared'), require('@opengeoweb/theme'), require('@mui/material'), require('@opengeoweb/webmap'), require('react-sortablejs'), require('sortablejs'), require('react-window'), require('@mui/material/Box'), require('@mui/material/Typography'), require('@mui/material/Grid'), require('@opengeoweb/form-fields'), require('react-hook-form'), require('@mui/system'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('react-draggable'), require('re-resizable'), require('axios'), require('@opengeoweb/api'), require('@redux-eggs/redux-toolkit'), require('@redux-eggs/saga-extension'), require('react-router-dom')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@reduxjs/toolkit', 'immer', 'moment', 'react', 'lodash', 'redux-saga/effects', 'react-redux', '@opengeoweb/shared', '@opengeoweb/theme', '@mui/material', '@opengeoweb/webmap', 'react-sortablejs', 'sortablejs', 'react-window', '@mui/material/Box', '@mui/material/Typography', '@mui/material/Grid', '@opengeoweb/form-fields', 'react-hook-form', '@mui/system', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', 'react-draggable', 're-resizable', 'axios', '@opengeoweb/api', '@redux-eggs/redux-toolkit', '@redux-eggs/saga-extension', 'react-router-dom'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.toolkit, global.produce, global.moment, global.React, global._, global.effects, global.reactRedux, global.shared, global.theme, global.material, global.webmap, global.reactSortablejs, global.Sortable, global.reactWindow, global.Box, global.Typography, global.Grid, global.formFields, global.reactHookForm, global.system, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.Draggable, global.reResizable, global.axios, global.api, global.reduxToolkit, global.sagaExtension, global.reactRouterDom));
|
|
5
|
-
})(this, (function (exports, toolkit, produce, moment, React, _, effects, reactRedux, shared, theme, material, webmap, reactSortablejs, Sortable, reactWindow, Box, Typography, Grid, formFields, reactHookForm, system, throttleDebounce, cloneDeep, proj4, turf, Draggable, reResizable, axios, api, reduxToolkit, sagaExtension, reactRouterDom) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@reduxjs/toolkit'), require('immer'), require('moment'), require('react'), require('lodash'), require('redux-saga/effects'), require('react-redux'), require('@opengeoweb/shared'), require('@opengeoweb/theme'), require('@mui/material'), require('@opengeoweb/webmap'), require('react-sortablejs'), require('sortablejs'), require('react-window'), require('@mui/material/Box'), require('@mui/material/Typography'), require('@mui/material/Grid'), require('@opengeoweb/form-fields'), require('react-hook-form'), require('@mui/system'), require('react-resize-detector'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('react-draggable'), require('re-resizable'), require('axios'), require('@opengeoweb/api'), require('@redux-eggs/redux-toolkit'), require('@redux-eggs/saga-extension'), require('react-router-dom')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@reduxjs/toolkit', 'immer', 'moment', 'react', 'lodash', 'redux-saga/effects', 'react-redux', '@opengeoweb/shared', '@opengeoweb/theme', '@mui/material', '@opengeoweb/webmap', 'react-sortablejs', 'sortablejs', 'react-window', '@mui/material/Box', '@mui/material/Typography', '@mui/material/Grid', '@opengeoweb/form-fields', 'react-hook-form', '@mui/system', 'react-resize-detector', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', 'react-draggable', 're-resizable', 'axios', '@opengeoweb/api', '@redux-eggs/redux-toolkit', '@redux-eggs/saga-extension', 'react-router-dom'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.toolkit, global.produce, global.moment, global.React, global._, global.effects, global.reactRedux, global.shared, global.theme, global.material, global.webmap, global.reactSortablejs, global.Sortable, global.reactWindow, global.Box, global.Typography, global.Grid, global.formFields, global.reactHookForm, global.system, global.reactResizeDetector, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.Draggable, global.reResizable, global.axios, global.api, global.reduxToolkit, global.sagaExtension, global.reactRouterDom));
|
|
5
|
+
})(this, (function (exports, toolkit, produce, moment, React, _, effects, reactRedux, shared, theme, material, webmap, reactSortablejs, Sortable, reactWindow, Box, Typography, Grid, formFields, reactHookForm, system, reactResizeDetector, throttleDebounce, cloneDeep, proj4, turf, Draggable, reResizable, axios, api, reduxToolkit, sagaExtension, reactRouterDom) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -354,8 +354,10 @@
|
|
|
354
354
|
wmjsMap.getListener().suspendEvents();
|
|
355
355
|
|
|
356
356
|
try {
|
|
357
|
-
wmjsMap.stopAnimating && wmjsMap.stopAnimating();
|
|
358
|
-
} catch (e) {
|
|
357
|
+
wmjsMap.stopAnimating && wmjsMap.stopAnimating();
|
|
358
|
+
} catch (e) {
|
|
359
|
+
console.warn(e);
|
|
360
|
+
}
|
|
359
361
|
|
|
360
362
|
Object.keys(registeredWMLayersForReactLayerId).forEach(function (layerId) {
|
|
361
363
|
var wmLayer = getWMLayerById(layerId);
|
|
@@ -811,8 +813,8 @@
|
|
|
811
813
|
setTargetNode = _a[1]; // Check if pointer event targets current node element
|
|
812
814
|
|
|
813
815
|
|
|
814
|
-
var pointerEventListener = React__default["default"].useCallback(function (
|
|
815
|
-
setTargetNode(nodeRef.current.canvas ? nodeRef.current.canvas.isEqualNode(
|
|
816
|
+
var pointerEventListener = React__default["default"].useCallback(function (event) {
|
|
817
|
+
setTargetNode(nodeRef.current.canvas ? nodeRef.current.canvas.isEqualNode(event.target) : false);
|
|
816
818
|
}, [nodeRef]);
|
|
817
819
|
React__default["default"].useEffect(function () {
|
|
818
820
|
document.addEventListener(eventType, pointerEventListener);
|
|
@@ -2540,6 +2542,30 @@
|
|
|
2540
2542
|
map.autoUpdateLayerId = undefined;
|
|
2541
2543
|
}
|
|
2542
2544
|
},
|
|
2545
|
+
setAutoTimestepLayerId: function setAutoTimestepLayerId(draft, action) {
|
|
2546
|
+
var _a = action.payload,
|
|
2547
|
+
mapId = _a.mapId,
|
|
2548
|
+
autoTimestepLayerId = _a.autoTimestepLayerId;
|
|
2549
|
+
var map = draft.byId[mapId];
|
|
2550
|
+
|
|
2551
|
+
if (!map) {
|
|
2552
|
+
return;
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
map.autoTimeStepLayerId = autoTimestepLayerId;
|
|
2556
|
+
},
|
|
2557
|
+
setAutoUpdateLayerId: function setAutoUpdateLayerId(draft, action) {
|
|
2558
|
+
var _a = action.payload,
|
|
2559
|
+
mapId = _a.mapId,
|
|
2560
|
+
autoUpdateLayerId = _a.autoUpdateLayerId;
|
|
2561
|
+
var map = draft.byId[mapId];
|
|
2562
|
+
|
|
2563
|
+
if (!map) {
|
|
2564
|
+
return;
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
map.autoUpdateLayerId = autoUpdateLayerId;
|
|
2568
|
+
},
|
|
2543
2569
|
setTimeSliderCenterTime: function setTimeSliderCenterTime(draft, action) {
|
|
2544
2570
|
var _a = action.payload,
|
|
2545
2571
|
mapId = _a.mapId,
|
|
@@ -3318,7 +3344,7 @@
|
|
|
3318
3344
|
}, []);
|
|
3319
3345
|
}, selectorMemoizationOptions);
|
|
3320
3346
|
|
|
3321
|
-
var selectors$
|
|
3347
|
+
var selectors$4 = /*#__PURE__*/Object.freeze({
|
|
3322
3348
|
__proto__: null,
|
|
3323
3349
|
getLayerById: getLayerById,
|
|
3324
3350
|
getLayersById: getLayersById,
|
|
@@ -3486,7 +3512,7 @@
|
|
|
3486
3512
|
return details && details.focused || false;
|
|
3487
3513
|
});
|
|
3488
3514
|
|
|
3489
|
-
var selectors$
|
|
3515
|
+
var selectors$3 = /*#__PURE__*/Object.freeze({
|
|
3490
3516
|
__proto__: null,
|
|
3491
3517
|
getUiStore: getUiStore,
|
|
3492
3518
|
getDialogDetailsByType: getDialogDetailsByType,
|
|
@@ -3883,6 +3909,156 @@
|
|
|
3883
3909
|
get SyncGroupActionOrigin () { return SyncGroupActionOrigin; }
|
|
3884
3910
|
});
|
|
3885
3911
|
|
|
3912
|
+
/* *
|
|
3913
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3914
|
+
* you may not use this file except in compliance with the License.
|
|
3915
|
+
* You may obtain a copy of the License at
|
|
3916
|
+
*
|
|
3917
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3918
|
+
*
|
|
3919
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3920
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3921
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3922
|
+
* See the License for the specific language governing permissions and
|
|
3923
|
+
* limitations under the License.
|
|
3924
|
+
*
|
|
3925
|
+
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3926
|
+
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
3927
|
+
* */
|
|
3928
|
+
var syncGroupStore = function syncGroupStore(store) {
|
|
3929
|
+
return store.syncronizationGroupStore || null;
|
|
3930
|
+
};
|
|
3931
|
+
/**
|
|
3932
|
+
* Gets synchronization group state
|
|
3933
|
+
*
|
|
3934
|
+
* Example: synchronizationGroupState = getSynchronizationGroupState(store)
|
|
3935
|
+
* @param {object} store store: object - Store object
|
|
3936
|
+
* @returns {object} returnType: SynchronizationGroupState
|
|
3937
|
+
*/
|
|
3938
|
+
|
|
3939
|
+
var getSynchronizationGroupState = toolkit.createSelector(syncGroupStore, function (store) {
|
|
3940
|
+
return store || null;
|
|
3941
|
+
});
|
|
3942
|
+
var getSynchronizationGroup = function getSynchronizationGroup(state, id) {
|
|
3943
|
+
return syncGroupStore(state).groups.byId[id];
|
|
3944
|
+
};
|
|
3945
|
+
var getSynchronizationGroupSource = function getSynchronizationGroupSource(state, id) {
|
|
3946
|
+
return syncGroupStore(state).sources.byId[id];
|
|
3947
|
+
};
|
|
3948
|
+
var getTargets = function getTargets(state, payload, actionType) {
|
|
3949
|
+
var actionPayloads = [];
|
|
3950
|
+
var targetsInActionPayload = {};
|
|
3951
|
+
var syncronizationGroupStore = syncGroupStore(state);
|
|
3952
|
+
/* All the groups the source is member of */
|
|
3953
|
+
|
|
3954
|
+
if (syncronizationGroupStore && payload) {
|
|
3955
|
+
/* Backwards compatibility, if there are no groups, connect everything */
|
|
3956
|
+
if (syncronizationGroupStore.groups.allIds.length === 0) {
|
|
3957
|
+
syncronizationGroupStore.sources.allIds.forEach(function (targetId) {
|
|
3958
|
+
// Only add if should react to this action
|
|
3959
|
+
if (syncronizationGroupStore.sources.byId[targetId].types.includes(actionType)) {
|
|
3960
|
+
/* Remember that we have already added this target in the action payloads, prevents adding it twice */
|
|
3961
|
+
targetsInActionPayload[targetId] = true;
|
|
3962
|
+
/* Compose the payload */
|
|
3963
|
+
|
|
3964
|
+
var newPayload = __assign({
|
|
3965
|
+
targetId: targetId
|
|
3966
|
+
}, payload);
|
|
3967
|
+
|
|
3968
|
+
actionPayloads.push(newPayload);
|
|
3969
|
+
}
|
|
3970
|
+
});
|
|
3971
|
+
}
|
|
3972
|
+
|
|
3973
|
+
syncronizationGroupStore.groups.allIds.forEach(function (id) {
|
|
3974
|
+
var syncronizationGroup = syncronizationGroupStore.groups.byId[id];
|
|
3975
|
+
|
|
3976
|
+
if (actionType === syncronizationGroup.type) {
|
|
3977
|
+
/* Check if the source is in the target list of the synchonizationGroup */
|
|
3978
|
+
var source = syncronizationGroup.targets.byId[payload.sourceId];
|
|
3979
|
+
/* If the source is part of the target list, and is linked, continue syncing the other targets */
|
|
3980
|
+
|
|
3981
|
+
if (source && source.linked) {
|
|
3982
|
+
syncronizationGroup.targets.allIds.forEach(function (targetId) {
|
|
3983
|
+
var target = syncronizationGroup.targets.byId[targetId];
|
|
3984
|
+
|
|
3985
|
+
if (target.linked && !targetsInActionPayload[targetId]) {
|
|
3986
|
+
/* Remember that we have already added this target in the action payloads, prevents adding it twice */
|
|
3987
|
+
targetsInActionPayload[targetId] = true;
|
|
3988
|
+
/* Compose the payload */
|
|
3989
|
+
|
|
3990
|
+
var newPayload = __assign({
|
|
3991
|
+
targetId: targetId
|
|
3992
|
+
}, payload);
|
|
3993
|
+
|
|
3994
|
+
actionPayloads.push(newPayload);
|
|
3995
|
+
}
|
|
3996
|
+
});
|
|
3997
|
+
}
|
|
3998
|
+
}
|
|
3999
|
+
});
|
|
4000
|
+
}
|
|
4001
|
+
|
|
4002
|
+
return actionPayloads;
|
|
4003
|
+
};
|
|
4004
|
+
var getTargetGroups = function getTargetGroups(state, payload, actionType) {
|
|
4005
|
+
var syncronizationGroupStore = syncGroupStore(state);
|
|
4006
|
+
var groups = syncronizationGroupStore.groups.allIds.reduce(function (list, groupId) {
|
|
4007
|
+
var syncronizationGroup = syncronizationGroupStore.groups.byId[groupId];
|
|
4008
|
+
|
|
4009
|
+
if (actionType === syncronizationGroup.type) {
|
|
4010
|
+
/* Check if the source is in the target list of the synchronizationGroup */
|
|
4011
|
+
var source = syncronizationGroup.targets.byId[payload.sourceId];
|
|
4012
|
+
/* If the source is part of the target list, and is linked, continue syncin the other targets */
|
|
4013
|
+
|
|
4014
|
+
if (source && source.linked) {
|
|
4015
|
+
return list.concat(groupId);
|
|
4016
|
+
}
|
|
4017
|
+
}
|
|
4018
|
+
|
|
4019
|
+
return list;
|
|
4020
|
+
}, []);
|
|
4021
|
+
return groups;
|
|
4022
|
+
};
|
|
4023
|
+
var getAllTargetGroupsForSource = function getAllTargetGroupsForSource(state, sourceId) {
|
|
4024
|
+
var syncronizationGroupStore = syncGroupStore(state);
|
|
4025
|
+
|
|
4026
|
+
if (syncronizationGroupStore === null || syncronizationGroupStore === void 0 ? void 0 : syncronizationGroupStore.groups) {
|
|
4027
|
+
return syncronizationGroupStore.groups.allIds.reduce(function (linkedSyncGroupIds, groupId) {
|
|
4028
|
+
var syncronizationGroup = syncronizationGroupStore.groups.byId[groupId];
|
|
4029
|
+
var source = syncronizationGroup.targets.byId[sourceId];
|
|
4030
|
+
/* If the source is part of the target list, and is linked, continue syncin the other targets */
|
|
4031
|
+
|
|
4032
|
+
if (source && source.linked) {
|
|
4033
|
+
return linkedSyncGroupIds.concat(groupId);
|
|
4034
|
+
}
|
|
4035
|
+
|
|
4036
|
+
return linkedSyncGroupIds;
|
|
4037
|
+
}, []);
|
|
4038
|
+
}
|
|
4039
|
+
|
|
4040
|
+
return [];
|
|
4041
|
+
};
|
|
4042
|
+
var syncGroupGetViewState = toolkit.createSelector(syncGroupStore, function (store) {
|
|
4043
|
+
return store.viewState;
|
|
4044
|
+
});
|
|
4045
|
+
var getSyncedMapIdsForTimeslider = toolkit.createSelector(syncGroupStore, function (store) {
|
|
4046
|
+
return store.viewState.timeslider.groups[0].selected;
|
|
4047
|
+
}, selectorMemoizationOptions);
|
|
4048
|
+
|
|
4049
|
+
var selectors$2 = /*#__PURE__*/Object.freeze({
|
|
4050
|
+
__proto__: null,
|
|
4051
|
+
syncGroupStore: syncGroupStore,
|
|
4052
|
+
getSynchronizationGroupState: getSynchronizationGroupState,
|
|
4053
|
+
getSynchronizationGroup: getSynchronizationGroup,
|
|
4054
|
+
getSynchronizationGroupSource: getSynchronizationGroupSource,
|
|
4055
|
+
getTargets: getTargets,
|
|
4056
|
+
getTargetGroups: getTargetGroups,
|
|
4057
|
+
getAllTargetGroupsForSource: getAllTargetGroupsForSource,
|
|
4058
|
+
syncGroupGetViewState: syncGroupGetViewState,
|
|
4059
|
+
getSyncedMapIdsForTimeslider: getSyncedMapIdsForTimeslider
|
|
4060
|
+
});
|
|
4061
|
+
|
|
3886
4062
|
/* *
|
|
3887
4063
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3888
4064
|
* you may not use this file except in compliance with the License.
|
|
@@ -3905,7 +4081,8 @@
|
|
|
3905
4081
|
actions: actions,
|
|
3906
4082
|
constants: constants,
|
|
3907
4083
|
types: types$1,
|
|
3908
|
-
initialState: initialState$4
|
|
4084
|
+
initialState: initialState$4,
|
|
4085
|
+
syncGroupsSelectors: selectors$2
|
|
3909
4086
|
});
|
|
3910
4087
|
|
|
3911
4088
|
/* *
|
|
@@ -5525,121 +5702,6 @@
|
|
|
5525
5702
|
var reducer = slice.reducer;
|
|
5526
5703
|
var appActions = slice.actions;
|
|
5527
5704
|
|
|
5528
|
-
/* *
|
|
5529
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5530
|
-
* you may not use this file except in compliance with the License.
|
|
5531
|
-
* You may obtain a copy of the License at
|
|
5532
|
-
*
|
|
5533
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5534
|
-
*
|
|
5535
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
5536
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5537
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5538
|
-
* See the License for the specific language governing permissions and
|
|
5539
|
-
* limitations under the License.
|
|
5540
|
-
*
|
|
5541
|
-
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5542
|
-
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
5543
|
-
* */
|
|
5544
|
-
var syncGroupStore = function syncGroupStore(store) {
|
|
5545
|
-
return store.syncronizationGroupStore || null;
|
|
5546
|
-
};
|
|
5547
|
-
/**
|
|
5548
|
-
* Gets synchronization group state
|
|
5549
|
-
*
|
|
5550
|
-
* Example: synchronizationGroupState = getSynchronizationGroupState(store)
|
|
5551
|
-
* @param {object} store store: object - Store object
|
|
5552
|
-
* @returns {object} returnType: SynchronizationGroupState
|
|
5553
|
-
*/
|
|
5554
|
-
|
|
5555
|
-
var getSynchronizationGroupState = toolkit.createSelector(syncGroupStore, function (store) {
|
|
5556
|
-
return store || null;
|
|
5557
|
-
});
|
|
5558
|
-
var getSynchronizationGroup = function getSynchronizationGroup(state, id) {
|
|
5559
|
-
return syncGroupStore(state).groups.byId[id];
|
|
5560
|
-
};
|
|
5561
|
-
var getTargets = function getTargets(state, payload, actionType) {
|
|
5562
|
-
var actionPayloads = [];
|
|
5563
|
-
var targetsInActionPayload = {};
|
|
5564
|
-
var syncronizationGroupStore = syncGroupStore(state);
|
|
5565
|
-
/* All the groups the source is member of */
|
|
5566
|
-
|
|
5567
|
-
if (syncronizationGroupStore && payload) {
|
|
5568
|
-
/* Backwards compatibility, if there are no groups, connect everything */
|
|
5569
|
-
if (syncronizationGroupStore.groups.allIds.length === 0) {
|
|
5570
|
-
syncronizationGroupStore.sources.allIds.forEach(function (targetId) {
|
|
5571
|
-
// Only add if should react to this action
|
|
5572
|
-
if (syncronizationGroupStore.sources.byId[targetId].types.includes(actionType)) {
|
|
5573
|
-
/* Remember that we have already added this target in the action payloads, prevents adding it twice */
|
|
5574
|
-
targetsInActionPayload[targetId] = true;
|
|
5575
|
-
/* Compose the payload */
|
|
5576
|
-
|
|
5577
|
-
var newPayload = __assign({
|
|
5578
|
-
targetId: targetId
|
|
5579
|
-
}, payload);
|
|
5580
|
-
|
|
5581
|
-
actionPayloads.push(newPayload);
|
|
5582
|
-
}
|
|
5583
|
-
});
|
|
5584
|
-
}
|
|
5585
|
-
|
|
5586
|
-
syncronizationGroupStore.groups.allIds.forEach(function (id) {
|
|
5587
|
-
var syncronizationGroup = syncronizationGroupStore.groups.byId[id];
|
|
5588
|
-
|
|
5589
|
-
if (actionType === syncronizationGroup.type) {
|
|
5590
|
-
/* Check if the source is in the target list of the synchonizationGroup */
|
|
5591
|
-
var source = syncronizationGroup.targets.byId[payload.sourceId];
|
|
5592
|
-
/* If the source is part of the target list, and is linked, continue syncing the other targets */
|
|
5593
|
-
|
|
5594
|
-
if (source && source.linked) {
|
|
5595
|
-
syncronizationGroup.targets.allIds.forEach(function (targetId) {
|
|
5596
|
-
var target = syncronizationGroup.targets.byId[targetId];
|
|
5597
|
-
|
|
5598
|
-
if (target.linked && !targetsInActionPayload[targetId]) {
|
|
5599
|
-
/* Remember that we have already added this target in the action payloads, prevents adding it twice */
|
|
5600
|
-
targetsInActionPayload[targetId] = true;
|
|
5601
|
-
/* Compose the payload */
|
|
5602
|
-
|
|
5603
|
-
var newPayload = __assign({
|
|
5604
|
-
targetId: targetId
|
|
5605
|
-
}, payload);
|
|
5606
|
-
|
|
5607
|
-
actionPayloads.push(newPayload);
|
|
5608
|
-
}
|
|
5609
|
-
});
|
|
5610
|
-
}
|
|
5611
|
-
}
|
|
5612
|
-
});
|
|
5613
|
-
}
|
|
5614
|
-
|
|
5615
|
-
return actionPayloads;
|
|
5616
|
-
};
|
|
5617
|
-
var getTargetGroups = function getTargetGroups(state, payload, actionType) {
|
|
5618
|
-
var syncronizationGroupStore = syncGroupStore(state);
|
|
5619
|
-
var groups = syncronizationGroupStore.groups.allIds.reduce(function (list, groupId) {
|
|
5620
|
-
var syncronizationGroup = syncronizationGroupStore.groups.byId[groupId];
|
|
5621
|
-
|
|
5622
|
-
if (actionType === syncronizationGroup.type) {
|
|
5623
|
-
/* Check if the source is in the target list of the synchronizationGroup */
|
|
5624
|
-
var source = syncronizationGroup.targets.byId[payload.sourceId];
|
|
5625
|
-
/* If the source is part of the target list, and it linked, continue syncin the other targets */
|
|
5626
|
-
|
|
5627
|
-
if (source && source.linked) {
|
|
5628
|
-
return list.concat(groupId);
|
|
5629
|
-
}
|
|
5630
|
-
}
|
|
5631
|
-
|
|
5632
|
-
return list;
|
|
5633
|
-
}, []);
|
|
5634
|
-
return groups;
|
|
5635
|
-
};
|
|
5636
|
-
var syncGroupGetViewState = toolkit.createSelector(syncGroupStore, function (store) {
|
|
5637
|
-
return store.viewState;
|
|
5638
|
-
});
|
|
5639
|
-
var getSyncedMapIdsForTimeslider = toolkit.createSelector(syncGroupStore, function (store) {
|
|
5640
|
-
return store.viewState.timeslider.groups[0].selected;
|
|
5641
|
-
}, selectorMemoizationOptions);
|
|
5642
|
-
|
|
5643
5705
|
/* *
|
|
5644
5706
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5645
5707
|
* you may not use this file except in compliance with the License.
|
|
@@ -8041,8 +8103,7 @@
|
|
|
8041
8103
|
_this.canvas = canvas;
|
|
8042
8104
|
}
|
|
8043
8105
|
}))));
|
|
8044
|
-
};
|
|
8045
|
-
|
|
8106
|
+
};
|
|
8046
8107
|
|
|
8047
8108
|
CanvasComponent.defaultProps = {
|
|
8048
8109
|
onRenderCanvas: function onRenderCanvas() {
|
|
@@ -10336,10 +10397,6 @@
|
|
|
10336
10397
|
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10337
10398
|
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
10338
10399
|
* */
|
|
10339
|
-
var iconStyle = {
|
|
10340
|
-
height: 24,
|
|
10341
|
-
width: 24
|
|
10342
|
-
};
|
|
10343
10400
|
var sizeSmall = {
|
|
10344
10401
|
width: 100,
|
|
10345
10402
|
height: 300
|
|
@@ -10376,43 +10433,31 @@
|
|
|
10376
10433
|
document.removeEventListener('keydown', handleKeyDown);
|
|
10377
10434
|
};
|
|
10378
10435
|
}, [onChangeSize, shortcutsEnabled]);
|
|
10379
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(shared.
|
|
10380
|
-
|
|
10381
|
-
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
10436
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
10437
|
+
tooltipTitle: "small",
|
|
10382
10438
|
"data-testid": "collapseSmall-btn",
|
|
10383
|
-
size: "small",
|
|
10384
10439
|
onClick: function onClick() {
|
|
10385
10440
|
return onChangeSize(sizeSmall);
|
|
10386
10441
|
},
|
|
10387
|
-
sx: iconStyle,
|
|
10388
10442
|
className: "collapseSmall-btn"
|
|
10389
|
-
}, /*#__PURE__*/React__namespace.createElement(theme.CollapseSmall, null))
|
|
10390
|
-
|
|
10391
|
-
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
10443
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.CollapseSmall, null)), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
10444
|
+
tooltipTitle: "medium",
|
|
10392
10445
|
"data-testid": "collapseMedium-btn",
|
|
10393
|
-
size: "small",
|
|
10394
10446
|
onClick: function onClick() {
|
|
10395
10447
|
return onChangeSize(sizeMedium);
|
|
10396
10448
|
},
|
|
10397
|
-
sx: iconStyle,
|
|
10398
10449
|
className: "collapseMedium-btn"
|
|
10399
|
-
}, /*#__PURE__*/React__namespace.createElement(theme.CollapseMedium, null))
|
|
10400
|
-
|
|
10401
|
-
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
10450
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.CollapseMedium, null)), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
10451
|
+
tooltipTitle: "large",
|
|
10402
10452
|
"data-testid": "collapseLarge-btn",
|
|
10403
|
-
size: "small",
|
|
10404
10453
|
onClick: function onClick() {
|
|
10405
10454
|
return onChangeSize(sizeLarge);
|
|
10406
10455
|
},
|
|
10407
|
-
sx: iconStyle,
|
|
10408
10456
|
className: "collapseLarge-btn"
|
|
10409
|
-
}, /*#__PURE__*/React__namespace.createElement(theme.CollapseLarge, null))
|
|
10410
|
-
|
|
10411
|
-
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
10457
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.CollapseLarge, null)), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
10458
|
+
tooltipTitle: isDockedLayerManager ? 'Undock' : 'Dock',
|
|
10412
10459
|
"data-testid": "dockedBtn",
|
|
10413
10460
|
disableRipple: true,
|
|
10414
|
-
size: "small",
|
|
10415
|
-
sx: iconStyle,
|
|
10416
10461
|
onClick: function onClick() {
|
|
10417
10462
|
return onClickDockButton();
|
|
10418
10463
|
}
|
|
@@ -10420,7 +10465,7 @@
|
|
|
10420
10465
|
"data-testid": "dockedLayerManager-collapse"
|
|
10421
10466
|
}) : /*#__PURE__*/React__namespace.createElement(theme.ExpandWindow, {
|
|
10422
10467
|
"data-testid": "dockedLayerManager-uncollapse"
|
|
10423
|
-
})))
|
|
10468
|
+
})));
|
|
10424
10469
|
};
|
|
10425
10470
|
|
|
10426
10471
|
/* *
|
|
@@ -10627,20 +10672,24 @@
|
|
|
10627
10672
|
* See the License for the specific language governing permissions and
|
|
10628
10673
|
* limitations under the License.
|
|
10629
10674
|
*
|
|
10630
|
-
* Copyright
|
|
10631
|
-
* Copyright
|
|
10675
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10676
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
10632
10677
|
* */
|
|
10633
10678
|
var style$2 = {
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
margin: 'auto 0px auto 32px',
|
|
10637
|
-
borderRadius: '15%'
|
|
10679
|
+
padding: 0,
|
|
10680
|
+
margin: 'auto 0px auto 32px'
|
|
10638
10681
|
};
|
|
10639
10682
|
|
|
10640
10683
|
var LayerSelectButtonConnect = function LayerSelectButtonConnect(_a) {
|
|
10641
10684
|
var mapId = _a.mapId,
|
|
10642
10685
|
_b = _a.source,
|
|
10643
|
-
source = _b === void 0 ? 'app' : _b
|
|
10686
|
+
source = _b === void 0 ? 'app' : _b,
|
|
10687
|
+
_c = _a.tooltipTitle,
|
|
10688
|
+
tooltipTitle = _c === void 0 ? 'Open the layer selector' : _c,
|
|
10689
|
+
_d = _a.icon,
|
|
10690
|
+
icon = _d === void 0 ? /*#__PURE__*/React__namespace.createElement(theme.Add, {
|
|
10691
|
+
"data-testid": "layerSelectButtonConnectIcon"
|
|
10692
|
+
}) : _d;
|
|
10644
10693
|
var dispatch = reactRedux.useDispatch();
|
|
10645
10694
|
var currentActiveMapId = reactRedux.useSelector(function (store) {
|
|
10646
10695
|
return getDialogMapId(store, DialogTypes.LayerSelect);
|
|
@@ -10656,16 +10705,13 @@
|
|
|
10656
10705
|
source: source
|
|
10657
10706
|
}));
|
|
10658
10707
|
}, [currentActiveMapId, dispatch, isOpenInStore, mapId, source]);
|
|
10659
|
-
return /*#__PURE__*/React__namespace.createElement(shared.
|
|
10660
|
-
title: "Open the layer selector"
|
|
10661
|
-
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
10708
|
+
return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
10662
10709
|
onClick: openLayerSelectDialog,
|
|
10663
10710
|
sx: style$2,
|
|
10664
10711
|
id: "layerSelectButton",
|
|
10665
10712
|
"data-testid": "layerSelectButton",
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
}, /*#__PURE__*/React__namespace.createElement(theme.Add, null)));
|
|
10713
|
+
tooltipTitle: tooltipTitle
|
|
10714
|
+
}, icon);
|
|
10669
10715
|
};
|
|
10670
10716
|
|
|
10671
10717
|
/* *
|
|
@@ -10694,17 +10740,20 @@
|
|
|
10694
10740
|
};
|
|
10695
10741
|
|
|
10696
10742
|
var DescriptionRow = function DescriptionRow(_a) {
|
|
10743
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
10744
|
+
|
|
10697
10745
|
var mapId = _a.mapId,
|
|
10698
10746
|
mapPresetsModule = _a.mapPresetsModule,
|
|
10699
|
-
|
|
10700
|
-
source =
|
|
10747
|
+
_m = _a.source,
|
|
10748
|
+
source = _m === void 0 ? 'app' : _m,
|
|
10749
|
+
settings = _a.settings;
|
|
10701
10750
|
|
|
10702
|
-
var
|
|
10751
|
+
var _o = __read(React__namespace.useState(mapPresetsModule ? __assign(__assign({}, mapPresetsModule), {
|
|
10703
10752
|
props: __assign(__assign({}, mapPresetsModule.props), {
|
|
10704
10753
|
id: 'mappresets-menubuttonInline'
|
|
10705
10754
|
})
|
|
10706
10755
|
}) : undefined), 1),
|
|
10707
|
-
mapPresetsModuleInline =
|
|
10756
|
+
mapPresetsModuleInline = _o[0];
|
|
10708
10757
|
|
|
10709
10758
|
var hasMapPresetsModule = mapPresetsModule !== undefined;
|
|
10710
10759
|
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
@@ -10721,13 +10770,15 @@
|
|
|
10721
10770
|
className: columnClasses.column1
|
|
10722
10771
|
}, /*#__PURE__*/React__namespace.createElement(LayerSelectButtonConnect, {
|
|
10723
10772
|
mapId: mapId,
|
|
10724
|
-
source: source
|
|
10773
|
+
source: source,
|
|
10774
|
+
tooltipTitle: (_b = settings === null || settings === void 0 ? void 0 : settings.addLayer) === null || _b === void 0 ? void 0 : _b.tooltipTitle,
|
|
10775
|
+
icon: (_c = settings === null || settings === void 0 ? void 0 : settings.addLayer) === null || _c === void 0 ? void 0 : _c.icon
|
|
10725
10776
|
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10726
10777
|
className: columnClasses.column2
|
|
10727
10778
|
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
10728
10779
|
className: "header-layer " + (hasMapPresetsModule ? 'mappresetsModule-enabled' : ''),
|
|
10729
10780
|
sx: styles$4.text
|
|
10730
|
-
},
|
|
10781
|
+
}, (_e = (_d = settings === null || settings === void 0 ? void 0 : settings.layerName) === null || _d === void 0 ? void 0 : _d.title) !== null && _e !== void 0 ? _e : 'Layer'), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
10731
10782
|
className: "header-mapPresets",
|
|
10732
10783
|
sx: {
|
|
10733
10784
|
marginRight: 4
|
|
@@ -10736,15 +10787,15 @@
|
|
|
10736
10787
|
className: columnClasses.column3
|
|
10737
10788
|
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
10738
10789
|
sx: styles$4.text
|
|
10739
|
-
},
|
|
10790
|
+
}, (_g = (_f = settings === null || settings === void 0 ? void 0 : settings.layerStyle) === null || _f === void 0 ? void 0 : _f.title) !== null && _g !== void 0 ? _g : 'Style')), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10740
10791
|
className: columnClasses.column4
|
|
10741
10792
|
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
10742
10793
|
sx: styles$4.text
|
|
10743
|
-
},
|
|
10794
|
+
}, (_j = (_h = settings === null || settings === void 0 ? void 0 : settings.opacity) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : 'Opacity')), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10744
10795
|
className: columnClasses.column5
|
|
10745
10796
|
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
10746
10797
|
sx: styles$4.text
|
|
10747
|
-
},
|
|
10798
|
+
}, (_l = (_k = settings === null || settings === void 0 ? void 0 : settings.dimensions) === null || _k === void 0 ? void 0 : _k.title) !== null && _l !== void 0 ? _l : 'Dimensions')), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10748
10799
|
className: columnClasses.column6
|
|
10749
10800
|
}));
|
|
10750
10801
|
};
|
|
@@ -10983,7 +11034,9 @@
|
|
|
10983
11034
|
_c = _a.layers,
|
|
10984
11035
|
layers = _c === void 0 ? [] : _c,
|
|
10985
11036
|
_d = _a.isEnabled,
|
|
10986
|
-
isEnabled = _d === void 0 ? true : _d
|
|
11037
|
+
isEnabled = _d === void 0 ? true : _d,
|
|
11038
|
+
_e = _a.tooltipPrefix,
|
|
11039
|
+
tooltipPrefix = _e === void 0 ? 'Layer: ' : _e;
|
|
10987
11040
|
|
|
10988
11041
|
if (!layers || !layers.length) {
|
|
10989
11042
|
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
@@ -11010,10 +11063,10 @@
|
|
|
11010
11063
|
onChangeLayerName(event.target.value);
|
|
11011
11064
|
};
|
|
11012
11065
|
|
|
11013
|
-
var
|
|
11014
|
-
currentIndex =
|
|
11015
|
-
currentValue =
|
|
11016
|
-
extendedLayers =
|
|
11066
|
+
var _f = getRenderLayersValues(layerName, layers),
|
|
11067
|
+
currentIndex = _f.currentIndex,
|
|
11068
|
+
currentValue = _f.currentValue,
|
|
11069
|
+
extendedLayers = _f.extendedLayers;
|
|
11017
11070
|
|
|
11018
11071
|
var list = extendedLayers.map(function (layer) {
|
|
11019
11072
|
return {
|
|
@@ -11022,7 +11075,7 @@
|
|
|
11022
11075
|
});
|
|
11023
11076
|
return /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
|
|
11024
11077
|
disableUnderline: true,
|
|
11025
|
-
tooltip: "
|
|
11078
|
+
tooltip: "" + tooltipPrefix + ((_b = extendedLayers[currentIndex]) === null || _b === void 0 ? void 0 : _b.title),
|
|
11026
11079
|
inputProps: {
|
|
11027
11080
|
SelectDisplayProps: {
|
|
11028
11081
|
'data-testid': 'selectLayer'
|
|
@@ -11107,15 +11160,17 @@
|
|
|
11107
11160
|
var currentOpacity = _a.currentOpacity,
|
|
11108
11161
|
onLayerChangeOpacity = _a.onLayerChangeOpacity,
|
|
11109
11162
|
_b = _a.isEnabled,
|
|
11110
|
-
isEnabled = _b === void 0 ? true : _b
|
|
11163
|
+
isEnabled = _b === void 0 ? true : _b,
|
|
11164
|
+
_c = _a.tooltipPrefix,
|
|
11165
|
+
tooltipPrefix = _c === void 0 ? 'Opacity: ' : _c;
|
|
11111
11166
|
|
|
11112
|
-
var
|
|
11113
|
-
tooltipOpen =
|
|
11114
|
-
setTooltipOpen =
|
|
11167
|
+
var _d = __read(shared.useControlledTooltip(), 2),
|
|
11168
|
+
tooltipOpen = _d[0],
|
|
11169
|
+
setTooltipOpen = _d[1];
|
|
11115
11170
|
|
|
11116
|
-
var
|
|
11117
|
-
anchorEl =
|
|
11118
|
-
setAnchorEl =
|
|
11171
|
+
var _e = __read(React__namespace.useState(null), 2),
|
|
11172
|
+
anchorEl = _e[0],
|
|
11173
|
+
setAnchorEl = _e[1];
|
|
11119
11174
|
|
|
11120
11175
|
var isOpen = Boolean(anchorEl);
|
|
11121
11176
|
|
|
@@ -11170,7 +11225,7 @@
|
|
|
11170
11225
|
height: 32
|
|
11171
11226
|
}
|
|
11172
11227
|
}, /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
|
|
11173
|
-
title: "
|
|
11228
|
+
title: "" + tooltipPrefix + currentOpacityText,
|
|
11174
11229
|
sx: shared.tooltipContainerStyles(isEnabled),
|
|
11175
11230
|
placement: "top",
|
|
11176
11231
|
open: tooltipOpen
|
|
@@ -11253,7 +11308,10 @@
|
|
|
11253
11308
|
var LayerManagerMenuButton = function LayerManagerMenuButton(_a) {
|
|
11254
11309
|
var mapId = _a.mapId,
|
|
11255
11310
|
layerId = _a.layerId,
|
|
11256
|
-
onLayerDuplicate = _a.onLayerDuplicate
|
|
11311
|
+
onLayerDuplicate = _a.onLayerDuplicate,
|
|
11312
|
+
_b = _a.tooltipTitle,
|
|
11313
|
+
tooltipTitle = _b === void 0 ? 'Options' : _b,
|
|
11314
|
+
icon = _a.icon;
|
|
11257
11315
|
|
|
11258
11316
|
var onClickDuplicate = function onClickDuplicate() {
|
|
11259
11317
|
onLayerDuplicate({
|
|
@@ -11277,7 +11335,8 @@
|
|
|
11277
11335
|
action: onClickDuplicate,
|
|
11278
11336
|
icon: /*#__PURE__*/React__namespace.createElement(theme.Copy, null)
|
|
11279
11337
|
}],
|
|
11280
|
-
tooltipTitle:
|
|
11338
|
+
tooltipTitle: tooltipTitle,
|
|
11339
|
+
buttonIcon: icon
|
|
11281
11340
|
});
|
|
11282
11341
|
};
|
|
11283
11342
|
|
|
@@ -11288,7 +11347,10 @@
|
|
|
11288
11347
|
currentLayerStyle = _a.currentLayerStyle,
|
|
11289
11348
|
onChangeLayerStyle = _a.onChangeLayerStyle,
|
|
11290
11349
|
_c = _a.isEnabled,
|
|
11291
|
-
isEnabled = _c === void 0 ? true : _c
|
|
11350
|
+
isEnabled = _c === void 0 ? true : _c,
|
|
11351
|
+
icon = _a.icon,
|
|
11352
|
+
_d = _a.tooltipPrefix,
|
|
11353
|
+
tooltipPrefix = _d === void 0 ? 'Style: ' : _d;
|
|
11292
11354
|
var styles = [{
|
|
11293
11355
|
title: 'default',
|
|
11294
11356
|
name: 'default',
|
|
@@ -11316,7 +11378,7 @@
|
|
|
11316
11378
|
return currentStyle === style.name;
|
|
11317
11379
|
});
|
|
11318
11380
|
return /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
|
|
11319
|
-
tooltip: "
|
|
11381
|
+
tooltip: "" + tooltipPrefix + ((_b = styles[currentIndex]) === null || _b === void 0 ? void 0 : _b.title),
|
|
11320
11382
|
inputProps: {
|
|
11321
11383
|
SelectDisplayProps: {
|
|
11322
11384
|
'data-testid': 'selectStyle'
|
|
@@ -11330,7 +11392,8 @@
|
|
|
11330
11392
|
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
11331
11393
|
return onChangeLayerStyle(e.value);
|
|
11332
11394
|
},
|
|
11333
|
-
requiresCtrlToChange: true
|
|
11395
|
+
requiresCtrlToChange: true,
|
|
11396
|
+
IconComponent: icon
|
|
11334
11397
|
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
11335
11398
|
disabled: true
|
|
11336
11399
|
}, "Style"), styles.map(function (styleFromlayer) {
|
|
@@ -11370,13 +11433,22 @@
|
|
|
11370
11433
|
return 'geowebColors.buttons.flat.disabled.color';
|
|
11371
11434
|
};
|
|
11372
11435
|
|
|
11436
|
+
var AutoOptions;
|
|
11437
|
+
|
|
11438
|
+
(function (AutoOptions) {
|
|
11439
|
+
AutoOptions["BOTH"] = "Auto both";
|
|
11440
|
+
AutoOptions["NONE"] = "Auto none";
|
|
11441
|
+
AutoOptions["TIMESTEP"] = "Auto-timestep";
|
|
11442
|
+
AutoOptions["UPDATE"] = "Auto-update";
|
|
11443
|
+
})(AutoOptions || (AutoOptions = {}));
|
|
11444
|
+
|
|
11373
11445
|
var ActivateLayer = function ActivateLayer(_a) {
|
|
11374
11446
|
var _onChange = _a.onChange,
|
|
11375
|
-
|
|
11376
|
-
|
|
11447
|
+
isEnabled = _a.isEnabled,
|
|
11448
|
+
current = _a.current;
|
|
11377
11449
|
return /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
|
|
11378
11450
|
variant: "standard",
|
|
11379
|
-
tooltip: "
|
|
11451
|
+
tooltip: "Leading layer",
|
|
11380
11452
|
// Don't show arrow https://stackoverflow.com/questions/69085735/how-to-remove-arrow-from-react-textfield-select
|
|
11381
11453
|
inputProps: {
|
|
11382
11454
|
IconComponent: function IconComponent() {
|
|
@@ -11384,7 +11456,7 @@
|
|
|
11384
11456
|
},
|
|
11385
11457
|
tabIndex: -1
|
|
11386
11458
|
},
|
|
11387
|
-
value:
|
|
11459
|
+
value: current,
|
|
11388
11460
|
sx: {
|
|
11389
11461
|
'&& .MuiInput-input': {
|
|
11390
11462
|
paddingRight: '2px',
|
|
@@ -11392,30 +11464,39 @@
|
|
|
11392
11464
|
backgroundColor: 'inherit'
|
|
11393
11465
|
}
|
|
11394
11466
|
},
|
|
11395
|
-
renderValue: function renderValue(
|
|
11467
|
+
renderValue: function renderValue(current) {
|
|
11396
11468
|
return /*#__PURE__*/React__namespace.createElement(AutoUpdateButton$1, {
|
|
11397
|
-
|
|
11398
|
-
isActive: isActive,
|
|
11469
|
+
current: current,
|
|
11399
11470
|
isEnabled: isEnabled
|
|
11400
11471
|
});
|
|
11401
11472
|
},
|
|
11402
11473
|
onChange: function onChange(event) {
|
|
11403
11474
|
event.stopPropagation();
|
|
11404
11475
|
|
|
11405
|
-
_onChange(event.target.value
|
|
11476
|
+
_onChange(event.target.value);
|
|
11406
11477
|
},
|
|
11407
11478
|
onClose: function onClose(event) {
|
|
11408
11479
|
event.stopPropagation();
|
|
11409
11480
|
}
|
|
11410
11481
|
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
11411
11482
|
disabled: true
|
|
11412
|
-
}, "
|
|
11413
|
-
value:
|
|
11483
|
+
}, "Leading layer"), /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
11484
|
+
value: AutoOptions.NONE
|
|
11414
11485
|
}, /*#__PURE__*/React__namespace.createElement(AutoOption, {
|
|
11415
11486
|
icon: /*#__PURE__*/React__namespace.createElement(theme.None, null),
|
|
11416
11487
|
text: "None"
|
|
11417
11488
|
})), /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
11418
|
-
value:
|
|
11489
|
+
value: AutoOptions.TIMESTEP
|
|
11490
|
+
}, /*#__PURE__*/React__namespace.createElement(AutoOption, {
|
|
11491
|
+
icon: /*#__PURE__*/React__namespace.createElement(theme.FastForward, null),
|
|
11492
|
+
text: "Auto-timestep"
|
|
11493
|
+
})), /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
11494
|
+
value: AutoOptions.UPDATE
|
|
11495
|
+
}, /*#__PURE__*/React__namespace.createElement(AutoOption, {
|
|
11496
|
+
icon: /*#__PURE__*/React__namespace.createElement(theme.AutoUpdateActive, null),
|
|
11497
|
+
text: "Auto-update"
|
|
11498
|
+
})), /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
11499
|
+
value: AutoOptions.BOTH
|
|
11419
11500
|
}, /*#__PURE__*/React__namespace.createElement(AutoOption, {
|
|
11420
11501
|
icon: /*#__PURE__*/React__namespace.createElement(theme.Both, null),
|
|
11421
11502
|
text: "Both"
|
|
@@ -11423,20 +11504,13 @@
|
|
|
11423
11504
|
};
|
|
11424
11505
|
|
|
11425
11506
|
var AutoUpdateButton$1 = function AutoUpdateButton(_a) {
|
|
11426
|
-
var
|
|
11427
|
-
isActive = _a.isActive,
|
|
11507
|
+
var current = _a.current,
|
|
11428
11508
|
isEnabled = _a.isEnabled;
|
|
11429
|
-
var
|
|
11430
|
-
|
|
11431
|
-
};
|
|
11432
|
-
var Icon = isActive ? /*#__PURE__*/React__namespace.createElement(theme.Both, {
|
|
11433
|
-
sx: style
|
|
11434
|
-
}) : /*#__PURE__*/React__namespace.createElement(theme.None, {
|
|
11435
|
-
sx: style
|
|
11436
|
-
});
|
|
11509
|
+
var isActive = current !== AutoOptions.NONE;
|
|
11510
|
+
var Icon = getIcon(isActive, isEnabled, current);
|
|
11437
11511
|
return /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
11512
|
+
"aria-label": current,
|
|
11438
11513
|
"data-testid": "activateLayer-btn",
|
|
11439
|
-
"aria-label": "Auto update " + optionSelected,
|
|
11440
11514
|
sx: {
|
|
11441
11515
|
'&.MuiButtonBase-root': {
|
|
11442
11516
|
backgroundColor: 'inherit'
|
|
@@ -11461,6 +11535,34 @@
|
|
|
11461
11535
|
}, text), /*#__PURE__*/React__namespace.createElement(material.ListItemIcon, null, icon));
|
|
11462
11536
|
};
|
|
11463
11537
|
|
|
11538
|
+
function getIcon(isActive, isEnabled, current) {
|
|
11539
|
+
var style = {
|
|
11540
|
+
color: getIconColor(isActive, isEnabled)
|
|
11541
|
+
};
|
|
11542
|
+
|
|
11543
|
+
if (current === AutoOptions.BOTH) {
|
|
11544
|
+
return /*#__PURE__*/React__namespace.createElement(theme.Both, {
|
|
11545
|
+
sx: style
|
|
11546
|
+
});
|
|
11547
|
+
}
|
|
11548
|
+
|
|
11549
|
+
if (current === AutoOptions.TIMESTEP) {
|
|
11550
|
+
return /*#__PURE__*/React__namespace.createElement(theme.FastForward, {
|
|
11551
|
+
sx: style
|
|
11552
|
+
});
|
|
11553
|
+
}
|
|
11554
|
+
|
|
11555
|
+
if (current === AutoOptions.UPDATE) {
|
|
11556
|
+
return /*#__PURE__*/React__namespace.createElement(theme.AutoUpdateActive, {
|
|
11557
|
+
sx: style
|
|
11558
|
+
});
|
|
11559
|
+
}
|
|
11560
|
+
|
|
11561
|
+
return /*#__PURE__*/React__namespace.createElement(theme.None, {
|
|
11562
|
+
sx: style
|
|
11563
|
+
});
|
|
11564
|
+
}
|
|
11565
|
+
|
|
11464
11566
|
/* *
|
|
11465
11567
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11466
11568
|
* you may not use this file except in compliance with the License.
|
|
@@ -11474,8 +11576,8 @@
|
|
|
11474
11576
|
* See the License for the specific language governing permissions and
|
|
11475
11577
|
* limitations under the License.
|
|
11476
11578
|
*
|
|
11477
|
-
* Copyright
|
|
11478
|
-
* Copyright
|
|
11579
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11580
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
11479
11581
|
* */
|
|
11480
11582
|
|
|
11481
11583
|
var LayerRow = function LayerRow(_a) {
|
|
@@ -11529,9 +11631,9 @@
|
|
|
11529
11631
|
},
|
|
11530
11632
|
'&.sortable-ghost': {
|
|
11531
11633
|
opacity: 0.5
|
|
11532
|
-
}
|
|
11533
|
-
|
|
11534
|
-
|
|
11634
|
+
}
|
|
11635
|
+
},
|
|
11636
|
+
alignItems: "center"
|
|
11535
11637
|
}, /*#__PURE__*/React__default["default"].createElement(shared.CustomAccordion, {
|
|
11536
11638
|
className: "medium-layermanager",
|
|
11537
11639
|
defaultExpanded: false,
|
|
@@ -11546,8 +11648,8 @@
|
|
|
11546
11648
|
padding: 0
|
|
11547
11649
|
}
|
|
11548
11650
|
},
|
|
11549
|
-
title: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, dragHandle, layerEnableLayout || /*#__PURE__*/React__default["default"].createElement(shared.
|
|
11550
|
-
|
|
11651
|
+
title: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, dragHandle, layerEnableLayout || /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
|
|
11652
|
+
shouldShowAsDisabled: !layer.enabled,
|
|
11551
11653
|
tooltipTitle: layer.name,
|
|
11552
11654
|
onClick: function onClick(event) {
|
|
11553
11655
|
event.stopPropagation();
|
|
@@ -11556,11 +11658,10 @@
|
|
|
11556
11658
|
enabled: !layer.enabled
|
|
11557
11659
|
});
|
|
11558
11660
|
},
|
|
11559
|
-
"data-testid": "enableButton-medium"
|
|
11560
|
-
|
|
11561
|
-
|
|
11661
|
+
"data-testid": "enableButton-medium"
|
|
11662
|
+
}, isEnabled ? /*#__PURE__*/React__default["default"].createElement(theme.Visibility, null) : /*#__PURE__*/React__default["default"].createElement(theme.VisibilityOff, null)), layerActiveLayout || /*#__PURE__*/React__default["default"].createElement(ActivateLayer, {
|
|
11663
|
+
current: AutoOptions.BOTH,
|
|
11562
11664
|
onChange: onClickRow,
|
|
11563
|
-
isActive: false,
|
|
11564
11665
|
isEnabled: true
|
|
11565
11666
|
}), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
11566
11667
|
sx: {
|
|
@@ -11619,7 +11720,7 @@
|
|
|
11619
11720
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
11620
11721
|
item: true,
|
|
11621
11722
|
sx: {}
|
|
11622
|
-
}, layerDeleteLayout || /*#__PURE__*/React__default["default"].createElement(shared.
|
|
11723
|
+
}, layerDeleteLayout || /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
|
|
11623
11724
|
tooltipTitle: "Delete",
|
|
11624
11725
|
onClick: function onClick() {
|
|
11625
11726
|
onLayerDelete({
|
|
@@ -11627,13 +11728,13 @@
|
|
|
11627
11728
|
layerId: layerId
|
|
11628
11729
|
});
|
|
11629
11730
|
},
|
|
11630
|
-
icon: /*#__PURE__*/React__default["default"].createElement(theme.Delete, null),
|
|
11631
11731
|
"data-testid": "deleteButton"
|
|
11632
|
-
}))))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
11732
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.Delete, null)))))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
11633
11733
|
item: true,
|
|
11634
|
-
className: columnClasses.column1
|
|
11635
|
-
|
|
11636
|
-
|
|
11734
|
+
className: columnClasses.column1,
|
|
11735
|
+
alignItems: "center"
|
|
11736
|
+
}, dragHandle, layerEnableLayout || /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
|
|
11737
|
+
shouldShowAsDisabled: !layer.enabled,
|
|
11637
11738
|
tooltipTitle: layer.name,
|
|
11638
11739
|
onClick: function onClick(event) {
|
|
11639
11740
|
event.stopPropagation();
|
|
@@ -11642,11 +11743,10 @@
|
|
|
11642
11743
|
enabled: !layer.enabled
|
|
11643
11744
|
});
|
|
11644
11745
|
},
|
|
11645
|
-
icon: layer.enabled ? /*#__PURE__*/React__default["default"].createElement(theme.Visibility, null) : /*#__PURE__*/React__default["default"].createElement(theme.VisibilityOff, null),
|
|
11646
11746
|
"data-testid": "enableButton"
|
|
11647
|
-
}), layerActiveLayout || /*#__PURE__*/React__default["default"].createElement(ActivateLayer, {
|
|
11747
|
+
}, layer.enabled ? /*#__PURE__*/React__default["default"].createElement(theme.Visibility, null) : /*#__PURE__*/React__default["default"].createElement(theme.VisibilityOff, null)), layerActiveLayout || /*#__PURE__*/React__default["default"].createElement(ActivateLayer, {
|
|
11648
11748
|
onChange: onClickRow,
|
|
11649
|
-
|
|
11749
|
+
current: AutoOptions.BOTH,
|
|
11650
11750
|
isEnabled: true
|
|
11651
11751
|
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
11652
11752
|
item: true,
|
|
@@ -11709,8 +11809,9 @@
|
|
|
11709
11809
|
}
|
|
11710
11810
|
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
11711
11811
|
item: true,
|
|
11712
|
-
className: columnClasses.column6
|
|
11713
|
-
|
|
11812
|
+
className: columnClasses.column6,
|
|
11813
|
+
alignItems: "center"
|
|
11814
|
+
}, layerDeleteLayout || /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
|
|
11714
11815
|
tooltipTitle: "Delete",
|
|
11715
11816
|
onClick: function onClick() {
|
|
11716
11817
|
onLayerDelete({
|
|
@@ -11718,9 +11819,8 @@
|
|
|
11718
11819
|
layerId: layerId
|
|
11719
11820
|
});
|
|
11720
11821
|
},
|
|
11721
|
-
icon: /*#__PURE__*/React__default["default"].createElement(theme.Delete, null),
|
|
11722
11822
|
"data-testid": "deleteButton"
|
|
11723
|
-
}), layerMenuLayout || /*#__PURE__*/React__default["default"].createElement(LayerManagerMenuButton, {
|
|
11823
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.Delete, null)), layerMenuLayout || /*#__PURE__*/React__default["default"].createElement(LayerManagerMenuButton, {
|
|
11724
11824
|
mapId: mapId,
|
|
11725
11825
|
layerId: layerId,
|
|
11726
11826
|
onLayerDuplicate: onLayerDuplicate
|
|
@@ -11740,14 +11840,18 @@
|
|
|
11740
11840
|
* See the License for the specific language governing permissions and
|
|
11741
11841
|
* limitations under the License.
|
|
11742
11842
|
*
|
|
11743
|
-
* Copyright
|
|
11744
|
-
* Copyright
|
|
11843
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11844
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
11745
11845
|
* */
|
|
11746
11846
|
|
|
11747
11847
|
var DeleteLayerConnect = function DeleteLayerConnect(_a) {
|
|
11748
11848
|
var layerId = _a.layerId,
|
|
11749
11849
|
mapId = _a.mapId,
|
|
11750
|
-
layerIndex = _a.layerIndex
|
|
11850
|
+
layerIndex = _a.layerIndex,
|
|
11851
|
+
_b = _a.tooltipTitle,
|
|
11852
|
+
tooltipTitle = _b === void 0 ? 'Delete' : _b,
|
|
11853
|
+
_c = _a.icon,
|
|
11854
|
+
icon = _c === void 0 ? /*#__PURE__*/React__namespace.createElement(theme.Delete, null) : _c;
|
|
11751
11855
|
var dispatch = reactRedux.useDispatch();
|
|
11752
11856
|
var layerDelete = React__namespace.useCallback(function (_a) {
|
|
11753
11857
|
var mapId = _a.mapId,
|
|
@@ -11763,8 +11867,8 @@
|
|
|
11763
11867
|
var isLayerEnabled = reactRedux.useSelector(function (store) {
|
|
11764
11868
|
return getLayerEnabled(store, layerId);
|
|
11765
11869
|
});
|
|
11766
|
-
return /*#__PURE__*/React__namespace.createElement(shared.
|
|
11767
|
-
tooltipTitle:
|
|
11870
|
+
return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
11871
|
+
tooltipTitle: tooltipTitle,
|
|
11768
11872
|
onClick: function onClick() {
|
|
11769
11873
|
layerDelete({
|
|
11770
11874
|
mapId: mapId,
|
|
@@ -11772,10 +11876,9 @@
|
|
|
11772
11876
|
layerIndex: layerIndex
|
|
11773
11877
|
});
|
|
11774
11878
|
},
|
|
11775
|
-
|
|
11776
|
-
icon: /*#__PURE__*/React__namespace.createElement(theme.Delete, null),
|
|
11879
|
+
shouldShowAsDisabled: !isLayerEnabled,
|
|
11777
11880
|
"data-testid": "deleteButton"
|
|
11778
|
-
});
|
|
11881
|
+
}, icon);
|
|
11779
11882
|
};
|
|
11780
11883
|
|
|
11781
11884
|
/* *
|
|
@@ -11791,8 +11894,8 @@
|
|
|
11791
11894
|
* See the License for the specific language governing permissions and
|
|
11792
11895
|
* limitations under the License.
|
|
11793
11896
|
*
|
|
11794
|
-
* Copyright
|
|
11795
|
-
* Copyright
|
|
11897
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11898
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
11796
11899
|
* */
|
|
11797
11900
|
|
|
11798
11901
|
var EnableLayerConnect = function EnableLayerConnect(_a) {
|
|
@@ -11801,7 +11904,10 @@
|
|
|
11801
11904
|
_b = _a.isEnabled,
|
|
11802
11905
|
isEnabled = _b === void 0 ? false : _b,
|
|
11803
11906
|
_c = _a.layerName,
|
|
11804
|
-
layerName = _c === void 0 ? '' : _c
|
|
11907
|
+
layerName = _c === void 0 ? '' : _c,
|
|
11908
|
+
_d = _a.icon,
|
|
11909
|
+
icon = _d === void 0 ? isEnabled ? /*#__PURE__*/React__namespace.createElement(theme.Visibility, null) : /*#__PURE__*/React__namespace.createElement(theme.VisibilityOff, null) : _d,
|
|
11910
|
+
tooltipTitle = _a.tooltipTitle;
|
|
11805
11911
|
var dispatch = reactRedux.useDispatch();
|
|
11806
11912
|
var layerChangeEnabled = React__namespace.useCallback(function (_a) {
|
|
11807
11913
|
var layerId = _a.layerId,
|
|
@@ -11813,9 +11919,11 @@
|
|
|
11813
11919
|
origin: LayerActionOrigin.layerManager
|
|
11814
11920
|
}));
|
|
11815
11921
|
}, [dispatch, mapId]);
|
|
11816
|
-
|
|
11817
|
-
|
|
11818
|
-
|
|
11922
|
+
var normalTooltip = tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : 'Toggle visibility';
|
|
11923
|
+
var miniTooltip = tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : layerName;
|
|
11924
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
11925
|
+
shouldShowAsDisabled: !isEnabled,
|
|
11926
|
+
tooltipTitle: normalTooltip,
|
|
11819
11927
|
onClick: function onClick(event) {
|
|
11820
11928
|
event.stopPropagation();
|
|
11821
11929
|
layerChangeEnabled({
|
|
@@ -11824,11 +11932,13 @@
|
|
|
11824
11932
|
});
|
|
11825
11933
|
},
|
|
11826
11934
|
className: "enable-btn",
|
|
11827
|
-
|
|
11828
|
-
|
|
11829
|
-
|
|
11830
|
-
|
|
11831
|
-
|
|
11935
|
+
"data-testid": "enableButton",
|
|
11936
|
+
sx: {
|
|
11937
|
+
margin: 'auto 0px'
|
|
11938
|
+
}
|
|
11939
|
+
}, icon), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
11940
|
+
shouldShowAsDisabled: !isEnabled,
|
|
11941
|
+
tooltipTitle: miniTooltip,
|
|
11832
11942
|
onClick: function onClick(event) {
|
|
11833
11943
|
event.stopPropagation();
|
|
11834
11944
|
layerChangeEnabled({
|
|
@@ -11837,9 +11947,11 @@
|
|
|
11837
11947
|
});
|
|
11838
11948
|
},
|
|
11839
11949
|
className: "enable-btn-mini",
|
|
11840
|
-
|
|
11841
|
-
|
|
11842
|
-
|
|
11950
|
+
"data-testid": "enableButton",
|
|
11951
|
+
sx: {
|
|
11952
|
+
margin: 'auto 0px'
|
|
11953
|
+
}
|
|
11954
|
+
}, icon));
|
|
11843
11955
|
};
|
|
11844
11956
|
|
|
11845
11957
|
/* *
|
|
@@ -11861,7 +11973,8 @@
|
|
|
11861
11973
|
|
|
11862
11974
|
var OpacitySelectConnect = function OpacitySelectConnect(_a) {
|
|
11863
11975
|
var layerId = _a.layerId,
|
|
11864
|
-
mapId = _a.mapId
|
|
11976
|
+
mapId = _a.mapId,
|
|
11977
|
+
tooltipPrefix = _a.tooltipPrefix;
|
|
11865
11978
|
var dispatch = reactRedux.useDispatch();
|
|
11866
11979
|
var opacity = reactRedux.useSelector(function (store) {
|
|
11867
11980
|
return getLayerOpacity(store, layerId);
|
|
@@ -11879,7 +11992,8 @@
|
|
|
11879
11992
|
origin: LayerActionOrigin.layerManager
|
|
11880
11993
|
}));
|
|
11881
11994
|
},
|
|
11882
|
-
isEnabled: isLayerEnabled
|
|
11995
|
+
isEnabled: isLayerEnabled,
|
|
11996
|
+
tooltipPrefix: tooltipPrefix
|
|
11883
11997
|
});
|
|
11884
11998
|
};
|
|
11885
11999
|
|
|
@@ -11956,7 +12070,9 @@
|
|
|
11956
12070
|
|
|
11957
12071
|
var RenderStylesConnect = function RenderStylesConnect(_a) {
|
|
11958
12072
|
var layerId = _a.layerId,
|
|
11959
|
-
mapId = _a.mapId
|
|
12073
|
+
mapId = _a.mapId,
|
|
12074
|
+
icon = _a.icon,
|
|
12075
|
+
tooltipPrefix = _a.tooltipPrefix;
|
|
11960
12076
|
var dispatch = reactRedux.useDispatch();
|
|
11961
12077
|
var layerService = reactRedux.useSelector(function (store) {
|
|
11962
12078
|
return getLayerService(store, layerId);
|
|
@@ -11985,7 +12101,9 @@
|
|
|
11985
12101
|
layerStyles: layerStyles,
|
|
11986
12102
|
currentLayerStyle: currentLayerStyle,
|
|
11987
12103
|
onChangeLayerStyle: layerChangeStyle,
|
|
11988
|
-
isEnabled: isLayerEnabled
|
|
12104
|
+
isEnabled: isLayerEnabled,
|
|
12105
|
+
icon: icon,
|
|
12106
|
+
tooltipPrefix: tooltipPrefix
|
|
11989
12107
|
});
|
|
11990
12108
|
};
|
|
11991
12109
|
|
|
@@ -12008,7 +12126,8 @@
|
|
|
12008
12126
|
|
|
12009
12127
|
var RenderLayersConnect = function RenderLayersConnect(_a) {
|
|
12010
12128
|
var layerId = _a.layerId,
|
|
12011
|
-
mapId = _a.mapId
|
|
12129
|
+
mapId = _a.mapId,
|
|
12130
|
+
tooltipPrefix = _a.tooltipPrefix;
|
|
12012
12131
|
var dispatch = reactRedux.useDispatch();
|
|
12013
12132
|
var layerName = reactRedux.useSelector(function (store) {
|
|
12014
12133
|
return getLayerName(store, layerId);
|
|
@@ -12095,7 +12214,8 @@
|
|
|
12095
12214
|
name: name
|
|
12096
12215
|
});
|
|
12097
12216
|
},
|
|
12098
|
-
isEnabled: isLayerEnabled
|
|
12217
|
+
isEnabled: isLayerEnabled,
|
|
12218
|
+
tooltipPrefix: tooltipPrefix
|
|
12099
12219
|
});
|
|
12100
12220
|
};
|
|
12101
12221
|
|
|
@@ -12118,7 +12238,9 @@
|
|
|
12118
12238
|
|
|
12119
12239
|
var LayerManagerMenuButtonConnect = function LayerManagerMenuButtonConnect(_a) {
|
|
12120
12240
|
var layerId = _a.layerId,
|
|
12121
|
-
mapId = _a.mapId
|
|
12241
|
+
mapId = _a.mapId,
|
|
12242
|
+
tooltipTitle = _a.tooltipTitle,
|
|
12243
|
+
icon = _a.icon;
|
|
12122
12244
|
var dispatch = reactRedux.useDispatch();
|
|
12123
12245
|
var layer = reactRedux.useSelector(function (store) {
|
|
12124
12246
|
return getLayerById(store, layerId);
|
|
@@ -12143,7 +12265,9 @@
|
|
|
12143
12265
|
mapId: mapId,
|
|
12144
12266
|
layer: layer
|
|
12145
12267
|
});
|
|
12146
|
-
}
|
|
12268
|
+
},
|
|
12269
|
+
tooltipTitle: tooltipTitle,
|
|
12270
|
+
icon: icon
|
|
12147
12271
|
});
|
|
12148
12272
|
};
|
|
12149
12273
|
|
|
@@ -12168,49 +12292,127 @@
|
|
|
12168
12292
|
var layerId = _a.layerId,
|
|
12169
12293
|
mapId = _a.mapId;
|
|
12170
12294
|
var dispatch = reactRedux.useDispatch();
|
|
12171
|
-
var
|
|
12172
|
-
return
|
|
12295
|
+
var autoUpdateLayerId = reactRedux.useSelector(function (store) {
|
|
12296
|
+
return getAutoUpdateLayerId(store, mapId);
|
|
12297
|
+
});
|
|
12298
|
+
var autoTimestepLayerId = reactRedux.useSelector(function (store) {
|
|
12299
|
+
return getAutoTimeStepLayerId(store, mapId);
|
|
12173
12300
|
});
|
|
12174
12301
|
var isLayerEnabled = reactRedux.useSelector(function (store) {
|
|
12175
12302
|
return getLayerEnabled(store, layerId);
|
|
12176
12303
|
});
|
|
12177
|
-
var
|
|
12178
|
-
|
|
12179
|
-
|
|
12180
|
-
|
|
12304
|
+
var isAutoUpdating$1 = reactRedux.useSelector(function (store) {
|
|
12305
|
+
return isAutoUpdating(store, mapId);
|
|
12306
|
+
});
|
|
12307
|
+
|
|
12308
|
+
var goToLastAvailableTimeForLayerIfAutoUpdateIsOn = function goToLastAvailableTimeForLayerIfAutoUpdateIsOn() {
|
|
12309
|
+
if (isAutoUpdating$1) {
|
|
12310
|
+
dispatch(mapActions$1.toggleAutoUpdate({
|
|
12311
|
+
mapId: mapId,
|
|
12312
|
+
shouldAutoUpdate: true
|
|
12313
|
+
}));
|
|
12314
|
+
}
|
|
12315
|
+
};
|
|
12316
|
+
|
|
12317
|
+
var thisLayerHasAutoUpdate = layerId === autoUpdateLayerId;
|
|
12318
|
+
var thisLayerHasAutoTimestep = layerId === autoTimestepLayerId;
|
|
12319
|
+
var thisLayerHasBoth = thisLayerHasAutoTimestep && thisLayerHasAutoUpdate;
|
|
12320
|
+
|
|
12321
|
+
function handleNoneClick() {
|
|
12322
|
+
if (thisLayerHasBoth) {
|
|
12323
|
+
dispatch(mapActions$1.setAutoLayerId({
|
|
12324
|
+
autoTimeStepLayerId: undefined,
|
|
12325
|
+
autoUpdateLayerId: undefined,
|
|
12326
|
+
mapId: mapId,
|
|
12327
|
+
origin: LayerActionOrigin.layerManager
|
|
12328
|
+
}));
|
|
12329
|
+
} else if (thisLayerHasAutoTimestep) {
|
|
12330
|
+
dispatch(mapActions$1.setAutoTimestepLayerId({
|
|
12331
|
+
mapId: mapId,
|
|
12332
|
+
autoTimestepLayerId: undefined
|
|
12333
|
+
}));
|
|
12334
|
+
} else if (thisLayerHasAutoUpdate) {
|
|
12335
|
+
dispatch(mapActions$1.setAutoUpdateLayerId({
|
|
12336
|
+
mapId: mapId,
|
|
12337
|
+
autoUpdateLayerId: undefined
|
|
12338
|
+
}));
|
|
12339
|
+
}
|
|
12340
|
+
}
|
|
12341
|
+
|
|
12342
|
+
function handleBothClick() {
|
|
12343
|
+
dispatch(mapActions$1.setAutoLayerId({
|
|
12181
12344
|
autoTimeStepLayerId: layerId,
|
|
12182
12345
|
autoUpdateLayerId: layerId,
|
|
12183
12346
|
mapId: mapId,
|
|
12184
12347
|
origin: LayerActionOrigin.layerManager
|
|
12185
12348
|
}));
|
|
12186
|
-
|
|
12187
|
-
|
|
12188
|
-
|
|
12189
|
-
|
|
12190
|
-
|
|
12191
|
-
return dispatch(mapActions$1.toggleAutoUpdate({
|
|
12349
|
+
goToLastAvailableTimeForLayerIfAutoUpdateIsOn();
|
|
12350
|
+
}
|
|
12351
|
+
|
|
12352
|
+
function handleAutoUpdateClick() {
|
|
12353
|
+
dispatch(mapActions$1.setAutoUpdateLayerId({
|
|
12192
12354
|
mapId: mapId,
|
|
12193
|
-
|
|
12355
|
+
autoUpdateLayerId: layerId
|
|
12194
12356
|
}));
|
|
12195
|
-
|
|
12196
|
-
|
|
12197
|
-
|
|
12198
|
-
onChange: function onChange(isActive) {
|
|
12199
|
-
setActiveLayerId({
|
|
12357
|
+
|
|
12358
|
+
if (thisLayerHasAutoTimestep) {
|
|
12359
|
+
dispatch(mapActions$1.setAutoTimestepLayerId({
|
|
12200
12360
|
mapId: mapId,
|
|
12201
|
-
|
|
12202
|
-
});
|
|
12361
|
+
autoTimestepLayerId: undefined
|
|
12362
|
+
}));
|
|
12363
|
+
}
|
|
12364
|
+
|
|
12365
|
+
goToLastAvailableTimeForLayerIfAutoUpdateIsOn();
|
|
12366
|
+
}
|
|
12367
|
+
|
|
12368
|
+
function handleAutoTimestepClick() {
|
|
12369
|
+
dispatch(mapActions$1.setAutoTimestepLayerId({
|
|
12370
|
+
mapId: mapId,
|
|
12371
|
+
autoTimestepLayerId: layerId
|
|
12372
|
+
}));
|
|
12373
|
+
|
|
12374
|
+
if (thisLayerHasAutoUpdate) {
|
|
12375
|
+
dispatch(mapActions$1.setAutoUpdateLayerId({
|
|
12376
|
+
mapId: mapId,
|
|
12377
|
+
autoUpdateLayerId: undefined
|
|
12378
|
+
}));
|
|
12379
|
+
}
|
|
12380
|
+
}
|
|
12203
12381
|
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12382
|
+
var current = getCurrentOptionForLayer(thisLayerHasBoth, thisLayerHasAutoTimestep, thisLayerHasAutoUpdate);
|
|
12383
|
+
return /*#__PURE__*/React__namespace.createElement(ActivateLayer, {
|
|
12384
|
+
current: current,
|
|
12385
|
+
onChange: function onChange(autoOption) {
|
|
12386
|
+
if (autoOption === AutoOptions.BOTH) {
|
|
12387
|
+
handleBothClick();
|
|
12388
|
+
} else if (autoOption === AutoOptions.NONE) {
|
|
12389
|
+
handleNoneClick();
|
|
12390
|
+
} else if (autoOption === AutoOptions.TIMESTEP) {
|
|
12391
|
+
handleAutoTimestepClick();
|
|
12392
|
+
} else if (autoOption === AutoOptions.UPDATE) {
|
|
12393
|
+
handleAutoUpdateClick();
|
|
12207
12394
|
}
|
|
12208
12395
|
},
|
|
12209
|
-
isActive: isActive,
|
|
12210
12396
|
isEnabled: isLayerEnabled
|
|
12211
12397
|
});
|
|
12212
12398
|
};
|
|
12213
12399
|
|
|
12400
|
+
function getCurrentOptionForLayer(thisLayerHasBoth, thisLayerHasAutoTimestep, thisLayerHasAutoUpdate) {
|
|
12401
|
+
if (thisLayerHasBoth) {
|
|
12402
|
+
return AutoOptions.BOTH;
|
|
12403
|
+
}
|
|
12404
|
+
|
|
12405
|
+
if (thisLayerHasAutoTimestep) {
|
|
12406
|
+
return AutoOptions.TIMESTEP;
|
|
12407
|
+
}
|
|
12408
|
+
|
|
12409
|
+
if (thisLayerHasAutoUpdate) {
|
|
12410
|
+
return AutoOptions.UPDATE;
|
|
12411
|
+
}
|
|
12412
|
+
|
|
12413
|
+
return AutoOptions.NONE;
|
|
12414
|
+
}
|
|
12415
|
+
|
|
12214
12416
|
/* *
|
|
12215
12417
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12216
12418
|
* you may not use this file except in compliance with the License.
|
|
@@ -12229,12 +12431,13 @@
|
|
|
12229
12431
|
* */
|
|
12230
12432
|
|
|
12231
12433
|
var LayerRowConnect = function LayerRowConnect(_a) {
|
|
12232
|
-
var _b;
|
|
12434
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
12233
12435
|
|
|
12234
12436
|
var layerId = _a.layerId,
|
|
12235
12437
|
mapId = _a.mapId,
|
|
12236
12438
|
dragHandle = _a.dragHandle,
|
|
12237
|
-
layerIndex = _a.layerIndex
|
|
12439
|
+
layerIndex = _a.layerIndex,
|
|
12440
|
+
settings = _a.settings;
|
|
12238
12441
|
var isEnabled = reactRedux.useSelector(function (store) {
|
|
12239
12442
|
return getLayerEnabled(store, layerId);
|
|
12240
12443
|
});
|
|
@@ -12263,15 +12466,19 @@
|
|
|
12263
12466
|
layerId: layerId,
|
|
12264
12467
|
mapId: mapId,
|
|
12265
12468
|
isEnabled: isEnabled,
|
|
12266
|
-
layerName: fullLayerName || layerName
|
|
12469
|
+
layerName: fullLayerName || layerName,
|
|
12470
|
+
icon: isEnabled ? (_c = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _c === void 0 ? void 0 : _c.enabledIcon : (_d = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _d === void 0 ? void 0 : _d.disabledIcon,
|
|
12471
|
+
tooltipTitle: isEnabled ? (_e = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _e === void 0 ? void 0 : _e.enabledTooltipTitle : (_f = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _f === void 0 ? void 0 : _f.disabledTooltipTitle
|
|
12267
12472
|
}),
|
|
12268
12473
|
layerOpacityLayout: /*#__PURE__*/React__namespace.createElement(OpacitySelectConnect, {
|
|
12269
12474
|
layerId: layerId,
|
|
12270
|
-
mapId: mapId
|
|
12475
|
+
mapId: mapId,
|
|
12476
|
+
tooltipPrefix: (_g = settings === null || settings === void 0 ? void 0 : settings.opacity) === null || _g === void 0 ? void 0 : _g.tooltipPrefix
|
|
12271
12477
|
}),
|
|
12272
12478
|
layerServicesLayout: /*#__PURE__*/React__namespace.createElement(RenderLayersConnect, {
|
|
12273
12479
|
layerId: layerId,
|
|
12274
|
-
mapId: mapId
|
|
12480
|
+
mapId: mapId,
|
|
12481
|
+
tooltipPrefix: (_h = settings === null || settings === void 0 ? void 0 : settings.renderLayer) === null || _h === void 0 ? void 0 : _h.tooltipPrefix
|
|
12275
12482
|
}),
|
|
12276
12483
|
layerDimensionLayout: /*#__PURE__*/React__namespace.createElement(DimensionSelectConnect, {
|
|
12277
12484
|
layerId: layerId,
|
|
@@ -12279,16 +12486,22 @@
|
|
|
12279
12486
|
}),
|
|
12280
12487
|
layerStylesLayout: /*#__PURE__*/React__namespace.createElement(RenderStylesConnect, {
|
|
12281
12488
|
layerId: layerId,
|
|
12282
|
-
mapId: mapId
|
|
12489
|
+
mapId: mapId,
|
|
12490
|
+
tooltipPrefix: (_j = settings === null || settings === void 0 ? void 0 : settings.layerStyle) === null || _j === void 0 ? void 0 : _j.tooltipPrefix,
|
|
12491
|
+
icon: (_k = settings === null || settings === void 0 ? void 0 : settings.layerStyle) === null || _k === void 0 ? void 0 : _k.icon
|
|
12283
12492
|
}),
|
|
12284
12493
|
layerDeleteLayout: /*#__PURE__*/React__namespace.createElement(DeleteLayerConnect, {
|
|
12285
12494
|
mapId: mapId,
|
|
12286
12495
|
layerId: layerId,
|
|
12287
|
-
layerIndex: layerIndex
|
|
12496
|
+
layerIndex: layerIndex,
|
|
12497
|
+
tooltipTitle: (_l = settings === null || settings === void 0 ? void 0 : settings.deleteLayer) === null || _l === void 0 ? void 0 : _l.tooltipTitle,
|
|
12498
|
+
icon: (_m = settings === null || settings === void 0 ? void 0 : settings.deleteLayer) === null || _m === void 0 ? void 0 : _m.icon
|
|
12288
12499
|
}),
|
|
12289
12500
|
layerMenuLayout: /*#__PURE__*/React__namespace.createElement(LayerManagerMenuButtonConnect, {
|
|
12290
12501
|
mapId: mapId,
|
|
12291
|
-
layerId: layerId
|
|
12502
|
+
layerId: layerId,
|
|
12503
|
+
tooltipTitle: (_o = settings === null || settings === void 0 ? void 0 : settings.menu) === null || _o === void 0 ? void 0 : _o.tooltipTitle,
|
|
12504
|
+
icon: (_p = settings === null || settings === void 0 ? void 0 : settings.menu) === null || _p === void 0 ? void 0 : _p.icon
|
|
12292
12505
|
}),
|
|
12293
12506
|
layerActiveLayout: /*#__PURE__*/React__namespace.createElement(ActivateLayerConnect, {
|
|
12294
12507
|
mapId: mapId,
|
|
@@ -12311,8 +12524,8 @@
|
|
|
12311
12524
|
* See the License for the specific language governing permissions and
|
|
12312
12525
|
* limitations under the License.
|
|
12313
12526
|
*
|
|
12314
|
-
* Copyright
|
|
12315
|
-
* Copyright
|
|
12527
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
12528
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
12316
12529
|
* */
|
|
12317
12530
|
var TOOLTIP_TITLE = 'Drag';
|
|
12318
12531
|
|
|
@@ -12322,20 +12535,23 @@
|
|
|
12322
12535
|
_c = _a.index,
|
|
12323
12536
|
index = _c === void 0 ? undefined : _c,
|
|
12324
12537
|
_d = _a.hideTooltip,
|
|
12325
|
-
hideTooltip = _d === void 0 ?
|
|
12538
|
+
hideTooltip = _d === void 0 ? true : _d,
|
|
12326
12539
|
_e = _a.isSorting,
|
|
12327
|
-
isSorting = _e === void 0 ? false : _e
|
|
12328
|
-
|
|
12329
|
-
|
|
12330
|
-
|
|
12331
|
-
|
|
12540
|
+
isSorting = _e === void 0 ? false : _e,
|
|
12541
|
+
_f = _a.icon,
|
|
12542
|
+
icon = _f === void 0 ? /*#__PURE__*/React__default["default"].createElement(theme.DragHandle, {
|
|
12543
|
+
"data-testid": "dragHandleIcon"
|
|
12544
|
+
}) : _f,
|
|
12545
|
+
_g = _a.tooltipTitle,
|
|
12546
|
+
tooltipTitle = _g === void 0 ? TOOLTIP_TITLE : _g;
|
|
12547
|
+
var usedTooltipTitle = hideTooltip ? '' : tooltipTitle;
|
|
12548
|
+
return /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
|
|
12549
|
+
tooltipTitle: usedTooltipTitle,
|
|
12332
12550
|
"data-testid": "dragHandle" + (index !== undefined ? "-" + index : ''),
|
|
12333
12551
|
className: "handle",
|
|
12334
12552
|
tabIndex: -1,
|
|
12335
|
-
isEnabled: !isDisabled,
|
|
12336
12553
|
disableTouchRipple: true,
|
|
12337
12554
|
disabled: isDisabled,
|
|
12338
|
-
isAccessible: true,
|
|
12339
12555
|
sx: {
|
|
12340
12556
|
cursor: isSorting ? 'grabbing' : 'grab',
|
|
12341
12557
|
'&:hover': {
|
|
@@ -12344,9 +12560,12 @@
|
|
|
12344
12560
|
marginLeft: '3px',
|
|
12345
12561
|
marginRight: '3px',
|
|
12346
12562
|
marginTop: 'auto',
|
|
12347
|
-
marginBottom: 'auto'
|
|
12563
|
+
marginBottom: 'auto',
|
|
12564
|
+
'&.MuiIconButton-root': {
|
|
12565
|
+
color: 'geowebColors.greys.accessible'
|
|
12566
|
+
}
|
|
12348
12567
|
}
|
|
12349
|
-
});
|
|
12568
|
+
}, icon);
|
|
12350
12569
|
};
|
|
12351
12570
|
|
|
12352
12571
|
/* *
|
|
@@ -12367,7 +12586,8 @@
|
|
|
12367
12586
|
* */
|
|
12368
12587
|
|
|
12369
12588
|
var LayerContainerRow = function LayerContainerRow(_a) {
|
|
12370
|
-
var mapId = _a.mapId
|
|
12589
|
+
var mapId = _a.mapId,
|
|
12590
|
+
settings = _a.settings;
|
|
12371
12591
|
var dispatch = reactRedux.useDispatch();
|
|
12372
12592
|
|
|
12373
12593
|
var _b = __read(React__namespace.useState(false), 2),
|
|
@@ -12489,6 +12709,8 @@
|
|
|
12489
12709
|
width: '100%'
|
|
12490
12710
|
}
|
|
12491
12711
|
}, layerIds.map(function (layerId, index) {
|
|
12712
|
+
var _a, _b;
|
|
12713
|
+
|
|
12492
12714
|
return /*#__PURE__*/React__namespace.createElement(LayerRowConnect, {
|
|
12493
12715
|
mapId: mapId,
|
|
12494
12716
|
layerId: layerId,
|
|
@@ -12498,8 +12720,11 @@
|
|
|
12498
12720
|
isDisabled: isDragDisabled,
|
|
12499
12721
|
index: index,
|
|
12500
12722
|
hideTooltip: isSorting || isDragDisabled,
|
|
12501
|
-
isSorting: isSorting
|
|
12502
|
-
|
|
12723
|
+
isSorting: isSorting,
|
|
12724
|
+
icon: (_a = settings === null || settings === void 0 ? void 0 : settings.dragHandle) === null || _a === void 0 ? void 0 : _a.icon,
|
|
12725
|
+
tooltipTitle: (_b = settings === null || settings === void 0 ? void 0 : settings.dragHandle) === null || _b === void 0 ? void 0 : _b.tooltipTitle
|
|
12726
|
+
}),
|
|
12727
|
+
settings: settings
|
|
12503
12728
|
});
|
|
12504
12729
|
})));
|
|
12505
12730
|
};
|
|
@@ -12526,7 +12751,10 @@
|
|
|
12526
12751
|
|
|
12527
12752
|
var selectedBaseLayers = _a.selectedBaseLayers,
|
|
12528
12753
|
availableBaseLayers = _a.availableBaseLayers,
|
|
12529
|
-
onChangeBaseLayers = _a.onChangeBaseLayers
|
|
12754
|
+
onChangeBaseLayers = _a.onChangeBaseLayers,
|
|
12755
|
+
icon = _a.icon,
|
|
12756
|
+
_c = _a.tooltipPrefix,
|
|
12757
|
+
tooltipPrefix = _c === void 0 ? 'Layer: ' : _c;
|
|
12530
12758
|
|
|
12531
12759
|
if (!availableBaseLayers || !availableBaseLayers.length) {
|
|
12532
12760
|
return /*#__PURE__*/React__namespace.createElement("div", null, "No service available");
|
|
@@ -12547,7 +12775,7 @@
|
|
|
12547
12775
|
}
|
|
12548
12776
|
}, /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
|
|
12549
12777
|
disableUnderline: true,
|
|
12550
|
-
tooltip: "
|
|
12778
|
+
tooltip: "" + tooltipPrefix + ((_b = availableBaseLayers[currentIndex]) === null || _b === void 0 ? void 0 : _b.name),
|
|
12551
12779
|
inputProps: {
|
|
12552
12780
|
SelectDisplayProps: {
|
|
12553
12781
|
'data-testid': 'selectBaseLayer'
|
|
@@ -12565,7 +12793,8 @@
|
|
|
12565
12793
|
},
|
|
12566
12794
|
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
12567
12795
|
return onChangeBaseLayers(e.value);
|
|
12568
|
-
}
|
|
12796
|
+
},
|
|
12797
|
+
IconComponent: icon
|
|
12569
12798
|
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
12570
12799
|
disabled: true
|
|
12571
12800
|
}, "Base layer"), availableBaseLayers.map(function (baseLayer) {
|
|
@@ -12637,7 +12866,9 @@
|
|
|
12637
12866
|
|
|
12638
12867
|
var BaseLayersConnect = function BaseLayersConnect(_a) {
|
|
12639
12868
|
var mapId = _a.mapId,
|
|
12640
|
-
preloadedAvailableBaseLayers = _a.preloadedAvailableBaseLayers
|
|
12869
|
+
preloadedAvailableBaseLayers = _a.preloadedAvailableBaseLayers,
|
|
12870
|
+
tooltipPrefix = _a.tooltipPrefix,
|
|
12871
|
+
icon = _a.icon;
|
|
12641
12872
|
var dispatch = reactRedux.useDispatch();
|
|
12642
12873
|
var selectedBaseLayers = reactRedux.useSelector(function (store) {
|
|
12643
12874
|
return getMapBaseLayers(store, mapId);
|
|
@@ -12672,7 +12903,9 @@
|
|
|
12672
12903
|
return /*#__PURE__*/React__namespace.createElement(BaseLayers, {
|
|
12673
12904
|
selectedBaseLayers: selectedBaseLayers,
|
|
12674
12905
|
availableBaseLayers: currentAvailableBaseLayers,
|
|
12675
|
-
onChangeBaseLayers: onChangeBaseLayers
|
|
12906
|
+
onChangeBaseLayers: onChangeBaseLayers,
|
|
12907
|
+
tooltipPrefix: tooltipPrefix,
|
|
12908
|
+
icon: icon
|
|
12676
12909
|
});
|
|
12677
12910
|
};
|
|
12678
12911
|
|
|
@@ -12726,11 +12959,10 @@
|
|
|
12726
12959
|
}, /*#__PURE__*/React__namespace.createElement(material.List, {
|
|
12727
12960
|
dense: true
|
|
12728
12961
|
}, sortedServices.map(function (service) {
|
|
12729
|
-
return /*#__PURE__*/React__namespace.createElement(material.
|
|
12962
|
+
return /*#__PURE__*/React__namespace.createElement(material.ListItemButton, {
|
|
12730
12963
|
"data-testid": "service-item",
|
|
12731
12964
|
key: service.url,
|
|
12732
12965
|
selected: service === activeService,
|
|
12733
|
-
button: true,
|
|
12734
12966
|
onClick: function onClick(event) {
|
|
12735
12967
|
handleListItemClick(event, service);
|
|
12736
12968
|
}
|
|
@@ -12753,8 +12985,8 @@
|
|
|
12753
12985
|
* See the License for the specific language governing permissions and
|
|
12754
12986
|
* limitations under the License.
|
|
12755
12987
|
*
|
|
12756
|
-
* Copyright
|
|
12757
|
-
* Copyright
|
|
12988
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
12989
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
12758
12990
|
* */
|
|
12759
12991
|
|
|
12760
12992
|
var WMSLayerTreeHeader = function WMSLayerTreeHeader(_a) {
|
|
@@ -12772,18 +13004,11 @@
|
|
|
12772
13004
|
htmlFor: "select-multiple-native"
|
|
12773
13005
|
}, "Available layers for ", serviceName)), onClickReload && /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
12774
13006
|
item: true
|
|
12775
|
-
}, /*#__PURE__*/React__namespace.createElement(shared.
|
|
12776
|
-
|
|
12777
|
-
placement: "top"
|
|
12778
|
-
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
13007
|
+
}, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
13008
|
+
tooltipTitle: "Reload layers from service",
|
|
12779
13009
|
"data-testid": "reloadLayers",
|
|
12780
|
-
|
|
12781
|
-
|
|
12782
|
-
padding: 3
|
|
12783
|
-
},
|
|
12784
|
-
onClick: onClickReload,
|
|
12785
|
-
size: "large"
|
|
12786
|
-
}, /*#__PURE__*/React__namespace.createElement(theme.Cached, null)))));
|
|
13010
|
+
onClick: onClickReload
|
|
13011
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.Cached, null))));
|
|
12787
13012
|
};
|
|
12788
13013
|
|
|
12789
13014
|
/* *
|
|
@@ -12932,10 +13157,9 @@
|
|
|
12932
13157
|
textOverflow: 'ellipsis'
|
|
12933
13158
|
}
|
|
12934
13159
|
}, category)), layerMap[category].map(function (layer) {
|
|
12935
|
-
return layer.leaf ? /*#__PURE__*/React__namespace.createElement(material.
|
|
13160
|
+
return layer.leaf ? /*#__PURE__*/React__namespace.createElement(material.ListItemButton, {
|
|
12936
13161
|
"data-testid": "selectableLayer",
|
|
12937
13162
|
key: layer.name,
|
|
12938
|
-
button: true,
|
|
12939
13163
|
selected: processedOK.indexOf(layer.name) !== -1 || layerExists(layer, highlightedLayers),
|
|
12940
13164
|
onClick: function onClick() {
|
|
12941
13165
|
return handleInternalSelect(layer.name);
|
|
@@ -13170,8 +13394,8 @@
|
|
|
13170
13394
|
* See the License for the specific language governing permissions and
|
|
13171
13395
|
* limitations under the License.
|
|
13172
13396
|
*
|
|
13173
|
-
* Copyright
|
|
13174
|
-
* Copyright
|
|
13397
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
13398
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
13175
13399
|
* */
|
|
13176
13400
|
|
|
13177
13401
|
var validateServiceUrl$1 = function validateServiceUrl(url) {
|
|
@@ -13287,7 +13511,7 @@
|
|
|
13287
13511
|
alignItems: "center"
|
|
13288
13512
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13289
13513
|
item: true,
|
|
13290
|
-
xs:
|
|
13514
|
+
xs: 12
|
|
13291
13515
|
}, /*#__PURE__*/React__namespace.createElement(material.TextField, {
|
|
13292
13516
|
margin: "dense",
|
|
13293
13517
|
id: "serviceurl",
|
|
@@ -13309,25 +13533,21 @@
|
|
|
13309
13533
|
disabled: loading,
|
|
13310
13534
|
error: urlError !== '',
|
|
13311
13535
|
helperText: urlError,
|
|
13312
|
-
variant: "
|
|
13313
|
-
|
|
13314
|
-
|
|
13315
|
-
|
|
13316
|
-
|
|
13317
|
-
|
|
13318
|
-
|
|
13319
|
-
|
|
13320
|
-
|
|
13321
|
-
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13325
|
-
|
|
13326
|
-
|
|
13327
|
-
position: 'absolute',
|
|
13328
|
-
top: '7px',
|
|
13329
|
-
left: '7px',
|
|
13330
|
-
zIndex: 1
|
|
13536
|
+
variant: "filled",
|
|
13537
|
+
InputProps: {
|
|
13538
|
+
endAdornment: /*#__PURE__*/React__namespace.createElement(material.InputAdornment, {
|
|
13539
|
+
position: "end"
|
|
13540
|
+
}, loading ? /*#__PURE__*/React__namespace.createElement(material.CircularProgress, {
|
|
13541
|
+
size: 24,
|
|
13542
|
+
sx: {
|
|
13543
|
+
zIndex: 1
|
|
13544
|
+
}
|
|
13545
|
+
}) : /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
13546
|
+
"data-testid": "add-service",
|
|
13547
|
+
onClick: handleAddServiceURL,
|
|
13548
|
+
disabled: loading,
|
|
13549
|
+
size: "large"
|
|
13550
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.Add, null)))
|
|
13331
13551
|
}
|
|
13332
13552
|
})))), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
13333
13553
|
m: 2
|
|
@@ -13369,8 +13589,8 @@
|
|
|
13369
13589
|
* See the License for the specific language governing permissions and
|
|
13370
13590
|
* limitations under the License.
|
|
13371
13591
|
*
|
|
13372
|
-
* Copyright
|
|
13373
|
-
* Copyright
|
|
13592
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
13593
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
13374
13594
|
* */
|
|
13375
13595
|
var styles$3 = {
|
|
13376
13596
|
buttonDiv: {
|
|
@@ -13383,10 +13603,7 @@
|
|
|
13383
13603
|
zIndex: 1
|
|
13384
13604
|
},
|
|
13385
13605
|
button: {
|
|
13386
|
-
|
|
13387
|
-
height: '24px',
|
|
13388
|
-
margin: 'auto 0px auto 32px',
|
|
13389
|
-
borderRadius: '15%'
|
|
13606
|
+
margin: 'auto 0px auto 32px'
|
|
13390
13607
|
}
|
|
13391
13608
|
};
|
|
13392
13609
|
|
|
@@ -13406,39 +13623,24 @@
|
|
|
13406
13623
|
open = _f[0],
|
|
13407
13624
|
setOpen = _f[1];
|
|
13408
13625
|
|
|
13409
|
-
var _g = __read(React__namespace.useState(shouldFocus), 2),
|
|
13410
|
-
isTooltipDisabled = _g[0],
|
|
13411
|
-
setTooltipDisabled = _g[1];
|
|
13412
|
-
|
|
13413
13626
|
var handleClose = function handleClose() {
|
|
13414
13627
|
setOpen(!open);
|
|
13415
13628
|
};
|
|
13416
13629
|
|
|
13417
|
-
var onBlurTooltip = function onBlurTooltip(event) {
|
|
13418
|
-
// enable tooltip again after user blurs
|
|
13419
|
-
if (event.relatedTarget) {
|
|
13420
|
-
setTooltipDisabled(false);
|
|
13421
|
-
}
|
|
13422
|
-
};
|
|
13423
|
-
|
|
13424
13630
|
React__namespace.useEffect(function () {
|
|
13425
13631
|
if (shouldFocus && ref.current) {
|
|
13426
13632
|
ref.current.focus();
|
|
13427
13633
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
13428
13634
|
|
|
13429
13635
|
}, []);
|
|
13430
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(shared.
|
|
13431
|
-
title: tooltip,
|
|
13432
|
-
disableFocusListener: isTooltipDisabled,
|
|
13433
|
-
onBlur: onBlurTooltip
|
|
13434
|
-
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
13636
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
13435
13637
|
onClick: handleClose,
|
|
13436
13638
|
sx: styles$3.button,
|
|
13437
13639
|
disableRipple: true,
|
|
13438
13640
|
"data-testid": "addLayersButton",
|
|
13439
13641
|
ref: ref,
|
|
13440
|
-
|
|
13441
|
-
}, /*#__PURE__*/React__namespace.createElement(theme.Add, null))
|
|
13642
|
+
tooltipTitle: tooltip
|
|
13643
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.Add, null)), /*#__PURE__*/React__namespace.createElement(AddLayersPopup, {
|
|
13442
13644
|
open: open,
|
|
13443
13645
|
handleClose: handleClose,
|
|
13444
13646
|
onRenderTree: onRenderTree,
|
|
@@ -13465,13 +13667,16 @@
|
|
|
13465
13667
|
* */
|
|
13466
13668
|
|
|
13467
13669
|
var BaseLayerRow = function BaseLayerRow(_a) {
|
|
13670
|
+
var _b, _c, _d;
|
|
13671
|
+
|
|
13468
13672
|
var mapId = _a.mapId,
|
|
13469
|
-
|
|
13470
|
-
preloadedAvailableBaseLayers =
|
|
13471
|
-
|
|
13472
|
-
preloadedServices =
|
|
13473
|
-
|
|
13474
|
-
tooltip =
|
|
13673
|
+
_e = _a.preloadedAvailableBaseLayers,
|
|
13674
|
+
preloadedAvailableBaseLayers = _e === void 0 ? availableDefaultBaseLayers : _e,
|
|
13675
|
+
_f = _a.preloadedServices,
|
|
13676
|
+
preloadedServices = _f === void 0 ? preloadedDefaultBaseServices : _f,
|
|
13677
|
+
_g = _a.tooltip,
|
|
13678
|
+
tooltip = _g === void 0 ? '' : _g,
|
|
13679
|
+
settings = _a.settings;
|
|
13475
13680
|
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13476
13681
|
container: true,
|
|
13477
13682
|
item: true,
|
|
@@ -13497,12 +13702,14 @@
|
|
|
13497
13702
|
layerType: LayerType.baseLayer
|
|
13498
13703
|
});
|
|
13499
13704
|
}
|
|
13500
|
-
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13705
|
+
})), (_b = settings === null || settings === void 0 ? void 0 : settings.baseLayerRow) === null || _b === void 0 ? void 0 : _b.title, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13501
13706
|
item: true,
|
|
13502
13707
|
className: columnClasses.column2
|
|
13503
13708
|
}, /*#__PURE__*/React__namespace.createElement(BaseLayersConnect, {
|
|
13504
13709
|
mapId: mapId,
|
|
13505
|
-
preloadedAvailableBaseLayers: preloadedAvailableBaseLayers
|
|
13710
|
+
preloadedAvailableBaseLayers: preloadedAvailableBaseLayers,
|
|
13711
|
+
tooltipPrefix: (_c = settings === null || settings === void 0 ? void 0 : settings.baseLayerDropdown) === null || _c === void 0 ? void 0 : _c.tooltipPrefix,
|
|
13712
|
+
icon: (_d = settings === null || settings === void 0 ? void 0 : settings.baseLayerDropdown) === null || _d === void 0 ? void 0 : _d.icon
|
|
13506
13713
|
})));
|
|
13507
13714
|
};
|
|
13508
13715
|
|
|
@@ -13627,7 +13834,8 @@
|
|
|
13627
13834
|
left: 50
|
|
13628
13835
|
} : _k,
|
|
13629
13836
|
_l = _a.setFocused,
|
|
13630
|
-
setFocused = _l === void 0 ? function () {} : _l
|
|
13837
|
+
setFocused = _l === void 0 ? function () {} : _l,
|
|
13838
|
+
settings = _a.settings;
|
|
13631
13839
|
var minSize = {
|
|
13632
13840
|
width: 100,
|
|
13633
13841
|
height: 126
|
|
@@ -13718,14 +13926,17 @@
|
|
|
13718
13926
|
}, /*#__PURE__*/React__namespace.createElement(DescriptionRow, {
|
|
13719
13927
|
mapPresetsModule: leftHeaderComponent,
|
|
13720
13928
|
mapId: mapId,
|
|
13721
|
-
source: source
|
|
13929
|
+
source: source,
|
|
13930
|
+
settings: settings === null || settings === void 0 ? void 0 : settings.header
|
|
13722
13931
|
}), /*#__PURE__*/React__namespace.createElement(LayerContainerRow, {
|
|
13723
|
-
mapId: mapId
|
|
13932
|
+
mapId: mapId,
|
|
13933
|
+
settings: settings === null || settings === void 0 ? void 0 : settings.content
|
|
13724
13934
|
}), /*#__PURE__*/React__namespace.createElement(BaseLayerRow, {
|
|
13725
13935
|
mapId: mapId,
|
|
13726
13936
|
tooltip: "Add base layers",
|
|
13727
13937
|
preloadedAvailableBaseLayers: preloadedAvailableBaseLayers,
|
|
13728
|
-
preloadedServices: preloadedBaseServices
|
|
13938
|
+
preloadedServices: preloadedBaseServices,
|
|
13939
|
+
settings: settings === null || settings === void 0 ? void 0 : settings.footer
|
|
13729
13940
|
})))));
|
|
13730
13941
|
};
|
|
13731
13942
|
|
|
@@ -14123,12 +14334,19 @@
|
|
|
14123
14334
|
* See the License for the specific language governing permissions and
|
|
14124
14335
|
* limitations under the License.
|
|
14125
14336
|
*
|
|
14126
|
-
* Copyright
|
|
14127
|
-
* Copyright
|
|
14337
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
14338
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
14128
14339
|
* */
|
|
14129
14340
|
var isURL = function isURL(string) {
|
|
14130
14341
|
return /^https?:\/\//.test(string);
|
|
14131
14342
|
};
|
|
14343
|
+
var buttonStyle = {
|
|
14344
|
+
'&.MuiButtonBase-root.MuiIconButton-root': {
|
|
14345
|
+
width: 48,
|
|
14346
|
+
height: 48,
|
|
14347
|
+
marginRight: '-12px'
|
|
14348
|
+
}
|
|
14349
|
+
};
|
|
14132
14350
|
|
|
14133
14351
|
var SearchFieldButtonContainer = function SearchFieldButtonContainer(_a) {
|
|
14134
14352
|
var localSearchString = _a.localSearchString,
|
|
@@ -14136,16 +14354,13 @@
|
|
|
14136
14354
|
setPopupIsOpen = _a.setPopupIsOpen;
|
|
14137
14355
|
|
|
14138
14356
|
var ClearButton = function ClearButton() {
|
|
14139
|
-
return /*#__PURE__*/React__default["default"].createElement(shared.
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
}, /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
|
|
14143
|
-
edge: "end",
|
|
14357
|
+
return /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
|
|
14358
|
+
tooltipTitle: "Clear",
|
|
14359
|
+
sx: buttonStyle,
|
|
14144
14360
|
onClick: function onClick() {
|
|
14145
14361
|
onClickClear();
|
|
14146
|
-
}
|
|
14147
|
-
|
|
14148
|
-
}, /*#__PURE__*/React__default["default"].createElement(theme.Clear, null)));
|
|
14362
|
+
}
|
|
14363
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.Clear, null));
|
|
14149
14364
|
};
|
|
14150
14365
|
|
|
14151
14366
|
if (isURL(localSearchString)) {
|
|
@@ -14165,13 +14380,10 @@
|
|
|
14165
14380
|
return /*#__PURE__*/React__default["default"].createElement(ClearButton, null);
|
|
14166
14381
|
}
|
|
14167
14382
|
|
|
14168
|
-
return /*#__PURE__*/React__default["default"].createElement(shared.
|
|
14169
|
-
|
|
14170
|
-
|
|
14171
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
14172
|
-
edge: "end",
|
|
14173
|
-
size: "large"
|
|
14174
|
-
}, /*#__PURE__*/React__default["default"].createElement(theme.Search, null)));
|
|
14383
|
+
return /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
|
|
14384
|
+
tooltipTitle: "Search",
|
|
14385
|
+
sx: buttonStyle
|
|
14386
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.Search, null));
|
|
14175
14387
|
};
|
|
14176
14388
|
|
|
14177
14389
|
/* *
|
|
@@ -15382,7 +15594,7 @@
|
|
|
15382
15594
|
}));
|
|
15383
15595
|
};
|
|
15384
15596
|
|
|
15385
|
-
var hasSelectedStyle = !isAllSelected && isSelected || isAllSelected && service === 'all';
|
|
15597
|
+
var hasSelectedStyle = !isAllSelected && isSelected || isAllSelected && (service === null || service === void 0 ? void 0 : service.serviceName) === 'all';
|
|
15386
15598
|
|
|
15387
15599
|
var toggleChip = function toggleChip(service) {
|
|
15388
15600
|
if (service === 'all') {
|
|
@@ -15572,8 +15784,8 @@
|
|
|
15572
15784
|
* See the License for the specific language governing permissions and
|
|
15573
15785
|
* limitations under the License.
|
|
15574
15786
|
*
|
|
15575
|
-
* Copyright
|
|
15576
|
-
* Copyright
|
|
15787
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
15788
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
15577
15789
|
* */
|
|
15578
15790
|
var styles$1 = {
|
|
15579
15791
|
servicesContainer: {
|
|
@@ -15739,39 +15951,35 @@
|
|
|
15739
15951
|
paddingRight: '70px'
|
|
15740
15952
|
}
|
|
15741
15953
|
}, serviceName)), /*#__PURE__*/React__namespace.createElement(material.ListItemSecondaryAction, {
|
|
15742
|
-
|
|
15954
|
+
sx: {
|
|
15743
15955
|
marginRight: '0px',
|
|
15744
|
-
width:
|
|
15956
|
+
width: 96,
|
|
15957
|
+
button: {
|
|
15958
|
+
marginLeft: 1
|
|
15959
|
+
}
|
|
15745
15960
|
}
|
|
15746
15961
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
15747
|
-
container: true
|
|
15748
|
-
|
|
15749
|
-
item: true,
|
|
15750
|
-
xs: 4
|
|
15962
|
+
container: true,
|
|
15963
|
+
justifyContent: "left"
|
|
15751
15964
|
}, /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
|
|
15752
15965
|
"data-testid": "updateServiceTooltip",
|
|
15753
15966
|
title: updateServiceTitle,
|
|
15754
15967
|
placement: tooltipPlacement(),
|
|
15755
15968
|
PopperProps: tooltipPopperProps
|
|
15756
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
15969
|
+
}, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
15757
15970
|
"data-testid": "updateServiceButton",
|
|
15758
15971
|
"aria-label": "Update layers from WMS service",
|
|
15759
|
-
size: "large",
|
|
15760
15972
|
onKeyDown: stopTabPropagation,
|
|
15761
15973
|
onClick: function onClick() {
|
|
15762
15974
|
layerSelectReloadService(serviceUrl);
|
|
15763
15975
|
}
|
|
15764
|
-
}, /*#__PURE__*/React__namespace.createElement(theme.Cached, null)))
|
|
15765
|
-
item: true,
|
|
15766
|
-
xs: 4
|
|
15767
|
-
}, userAddedService ? /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
|
|
15976
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.Cached, null))), userAddedService ? /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
|
|
15768
15977
|
title: editServiceTitle,
|
|
15769
15978
|
placement: tooltipPlacement(),
|
|
15770
15979
|
PopperProps: tooltipPopperProps
|
|
15771
|
-
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(
|
|
15980
|
+
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
15772
15981
|
"aria-label": "edit service",
|
|
15773
15982
|
"data-testid": "openEditServiceButton",
|
|
15774
|
-
size: "large",
|
|
15775
15983
|
onKeyDown: stopTabPropagation,
|
|
15776
15984
|
onClick: function onClick() {
|
|
15777
15985
|
setServicePopupInfo({
|
|
@@ -15785,10 +15993,9 @@
|
|
|
15785
15993
|
title: showServiceTitle,
|
|
15786
15994
|
placement: tooltipPlacement(),
|
|
15787
15995
|
PopperProps: tooltipPopperProps
|
|
15788
|
-
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(
|
|
15996
|
+
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
15789
15997
|
"aria-label": "show service",
|
|
15790
15998
|
"data-testid": "openShowServiceButton",
|
|
15791
|
-
size: "large",
|
|
15792
15999
|
onKeyDown: stopTabPropagation,
|
|
15793
16000
|
onClick: function onClick() {
|
|
15794
16001
|
setServicePopupInfo({
|
|
@@ -15798,24 +16005,20 @@
|
|
|
15798
16005
|
variant: 'show'
|
|
15799
16006
|
});
|
|
15800
16007
|
}
|
|
15801
|
-
}, /*#__PURE__*/React__namespace.createElement(theme.Visibility, null))))
|
|
15802
|
-
item: true,
|
|
15803
|
-
xs: 4
|
|
15804
|
-
}, userAddedService && /*#__PURE__*/React__namespace.createElement(material.Box, null, /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
|
|
16008
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.Visibility, null)))), userAddedService && /*#__PURE__*/React__namespace.createElement(material.Box, null, /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
|
|
15805
16009
|
title: deleteServiceTitle(serviceHasActiveLayers),
|
|
15806
16010
|
PopperProps: tooltipPopperProps,
|
|
15807
16011
|
placement: tooltipPlacement(),
|
|
15808
16012
|
"data-testid": "removeServiceTooltip"
|
|
15809
|
-
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(
|
|
16013
|
+
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
15810
16014
|
"data-testid": "removeServiceButton",
|
|
15811
16015
|
"aria-label": "delete service",
|
|
15812
|
-
size: "large",
|
|
15813
16016
|
disabled: serviceHasActiveLayers,
|
|
15814
16017
|
onKeyDown: stopTabPropagation,
|
|
15815
16018
|
onClick: function onClick() {
|
|
15816
16019
|
return layerSelectRemoveService(serviceId, serviceUrl, serviceName);
|
|
15817
16020
|
}
|
|
15818
|
-
}, /*#__PURE__*/React__namespace.createElement(theme.Delete, null))))))))
|
|
16021
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.Delete, null))))))));
|
|
15819
16022
|
}));
|
|
15820
16023
|
};
|
|
15821
16024
|
|
|
@@ -16240,8 +16443,8 @@
|
|
|
16240
16443
|
* See the License for the specific language governing permissions and
|
|
16241
16444
|
* limitations under the License.
|
|
16242
16445
|
*
|
|
16243
|
-
* Copyright
|
|
16244
|
-
* Copyright
|
|
16446
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
16447
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
16245
16448
|
* */
|
|
16246
16449
|
|
|
16247
16450
|
var FilterListItem = function FilterListItem(_a) {
|
|
@@ -16332,12 +16535,12 @@
|
|
|
16332
16535
|
whiteSpace: 'nowrap',
|
|
16333
16536
|
overflow: 'hidden'
|
|
16334
16537
|
}
|
|
16335
|
-
}, filter.name, " (", filter.amountVisible, ")"), isHovering ? /*#__PURE__*/React__namespace.createElement(material.ListItemSecondaryAction, null, /*#__PURE__*/React__namespace.createElement(
|
|
16538
|
+
}, filter.name, " (", filter.amountVisible, ")"), isHovering ? /*#__PURE__*/React__namespace.createElement(material.ListItemSecondaryAction, null, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
16336
16539
|
style: {
|
|
16337
|
-
backgroundColor: 'transparent'
|
|
16540
|
+
backgroundColor: 'transparent',
|
|
16541
|
+
width: 'auto'
|
|
16338
16542
|
},
|
|
16339
16543
|
edge: "end",
|
|
16340
|
-
size: "small",
|
|
16341
16544
|
onClick: function onClick() {
|
|
16342
16545
|
return selectOnlyOne(filter.id);
|
|
16343
16546
|
},
|
|
@@ -16654,8 +16857,8 @@
|
|
|
16654
16857
|
* See the License for the specific language governing permissions and
|
|
16655
16858
|
* limitations under the License.
|
|
16656
16859
|
*
|
|
16657
|
-
* Copyright
|
|
16658
|
-
* Copyright
|
|
16860
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
16861
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
16659
16862
|
* */
|
|
16660
16863
|
var style = {
|
|
16661
16864
|
textField: {
|
|
@@ -16932,15 +17135,16 @@
|
|
|
16932
17135
|
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
16933
17136
|
variant: "h5",
|
|
16934
17137
|
component: "span"
|
|
16935
|
-
}, getTitleForVariant(servicePopupVariant)), /*#__PURE__*/React__namespace.createElement(
|
|
17138
|
+
}, getTitleForVariant(servicePopupVariant)), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
16936
17139
|
"aria-label": "close",
|
|
16937
|
-
size: "small",
|
|
16938
17140
|
onClick: closePopup,
|
|
16939
17141
|
"data-testid": "closePopupButtonCross",
|
|
16940
17142
|
sx: {
|
|
16941
|
-
color: 'geowebColors.captions.captionDisabled.color',
|
|
16942
17143
|
marginTop: 'auto',
|
|
16943
|
-
marginBottom: 'auto'
|
|
17144
|
+
marginBottom: 'auto',
|
|
17145
|
+
'&.MuiButtonBase-root': {
|
|
17146
|
+
color: 'geowebColors.greys.accessible'
|
|
17147
|
+
}
|
|
16944
17148
|
}
|
|
16945
17149
|
}, /*#__PURE__*/React__namespace.createElement(theme.Close, null))), isLoading && /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
16946
17150
|
sx: {
|
|
@@ -16978,11 +17182,14 @@
|
|
|
16978
17182
|
disableUnderline: isShowPopup,
|
|
16979
17183
|
endAdornment: isShowPopup && /*#__PURE__*/React__namespace.createElement(material.InputAdornment, {
|
|
16980
17184
|
position: "end"
|
|
16981
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
17185
|
+
}, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
16982
17186
|
"aria-label": "copy url",
|
|
16983
17187
|
onClick: function onClick() {
|
|
16984
17188
|
navigator.clipboard.writeText(serviceUrl);
|
|
16985
17189
|
showSnackbar(COPY_URL_MESSAGE);
|
|
17190
|
+
},
|
|
17191
|
+
sx: {
|
|
17192
|
+
marginTop: 0.5
|
|
16986
17193
|
}
|
|
16987
17194
|
}, /*#__PURE__*/React__namespace.createElement(theme.Copy, null)))
|
|
16988
17195
|
},
|
|
@@ -17689,8 +17896,8 @@
|
|
|
17689
17896
|
* See the License for the specific language governing permissions and
|
|
17690
17897
|
* limitations under the License.
|
|
17691
17898
|
*
|
|
17692
|
-
* Copyright
|
|
17693
|
-
* Copyright
|
|
17899
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
17900
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
17694
17901
|
* */
|
|
17695
17902
|
|
|
17696
17903
|
var DimensionSelectSliderConnect = function DimensionSelectSliderConnect(_a) {
|
|
@@ -17731,16 +17938,16 @@
|
|
|
17731
17938
|
key: layerId,
|
|
17732
17939
|
item: true,
|
|
17733
17940
|
xs: "auto"
|
|
17734
|
-
}, /*#__PURE__*/React__namespace.createElement(shared.
|
|
17735
|
-
|
|
17736
|
-
placement: "top"
|
|
17737
|
-
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
17941
|
+
}, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
17942
|
+
tooltipTitle: tooltipTitle,
|
|
17738
17943
|
"data-testid": "syncButton",
|
|
17739
|
-
size: "small",
|
|
17740
17944
|
onClick: function onClick() {
|
|
17741
17945
|
return handleSyncChanged(layerId, dimensionName, layerDimension.currentValue, !layerDimension.synced);
|
|
17946
|
+
},
|
|
17947
|
+
sx: {
|
|
17948
|
+
margin: '5px'
|
|
17742
17949
|
}
|
|
17743
|
-
}, /*#__PURE__*/React__namespace.createElement(Icon, null))
|
|
17950
|
+
}, /*#__PURE__*/React__namespace.createElement(Icon, null)), /*#__PURE__*/React__namespace.createElement(DimensionSelectSlider, {
|
|
17744
17951
|
marks: marks,
|
|
17745
17952
|
layerTitle: layerTitle,
|
|
17746
17953
|
reverse: dimConfig ? dimConfig.reversed : false,
|
|
@@ -22098,7 +22305,6 @@
|
|
|
22098
22305
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
22099
22306
|
* */
|
|
22100
22307
|
/* Function which calculates the distance between two points */
|
|
22101
|
-
// eslint-disable-next-line class-methods-use-this
|
|
22102
22308
|
|
|
22103
22309
|
var distance = function distance(a, b) {
|
|
22104
22310
|
return Math.sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
|
|
@@ -22177,9 +22383,10 @@
|
|
|
22177
22383
|
return {
|
|
22178
22384
|
coordinateIndexInFeature: polygonIndex
|
|
22179
22385
|
};
|
|
22180
|
-
}
|
|
22181
|
-
|
|
22182
|
-
|
|
22386
|
+
}
|
|
22387
|
+
} catch (e) {
|
|
22388
|
+
console.warn(e);
|
|
22389
|
+
}
|
|
22183
22390
|
}
|
|
22184
22391
|
}
|
|
22185
22392
|
|
|
@@ -22205,9 +22412,10 @@
|
|
|
22205
22412
|
return {
|
|
22206
22413
|
coordinateIndexInFeature: polygonIndex
|
|
22207
22414
|
};
|
|
22208
|
-
}
|
|
22209
|
-
|
|
22210
|
-
|
|
22415
|
+
}
|
|
22416
|
+
} catch (e) {
|
|
22417
|
+
console.warn(e);
|
|
22418
|
+
}
|
|
22211
22419
|
}
|
|
22212
22420
|
}
|
|
22213
22421
|
|
|
@@ -22435,7 +22643,7 @@
|
|
|
22435
22643
|
if (feature.geometry) {
|
|
22436
22644
|
var coordinates = feature.geometry.coordinates;
|
|
22437
22645
|
|
|
22438
|
-
if (_this.snappedPolygonIndex > coordinates.length - 1) {
|
|
22646
|
+
if (Number(_this.snappedPolygonIndex) > coordinates.length - 1) {
|
|
22439
22647
|
_this.snappedPolygonIndex = coordinates.length - 1;
|
|
22440
22648
|
}
|
|
22441
22649
|
}
|
|
@@ -25578,7 +25786,26 @@
|
|
|
25578
25786
|
|
|
25579
25787
|
var dimensions = props.dimensions,
|
|
25580
25788
|
mapId = props.mapId;
|
|
25789
|
+
var wmjsMapRef = React__namespace.useRef(null);
|
|
25790
|
+
|
|
25791
|
+
var _d = reactResizeDetector.useResizeDetector(),
|
|
25792
|
+
ref = _d.ref,
|
|
25793
|
+
height = _d.height,
|
|
25794
|
+
width = _d.width;
|
|
25795
|
+
|
|
25796
|
+
React__namespace.useEffect(function () {
|
|
25797
|
+
if (wmjsMapRef.current && !!width && !!height) {
|
|
25798
|
+
var _a = wmjsMapRef.current.getSize(),
|
|
25799
|
+
mapHeight = _a.height,
|
|
25800
|
+
mapWidth = _a.width;
|
|
25801
|
+
|
|
25802
|
+
if (width !== mapWidth || height !== mapHeight) {
|
|
25803
|
+
wmjsMapRef.current.setSize(Math.ceil(width), Math.ceil(height));
|
|
25804
|
+
}
|
|
25805
|
+
}
|
|
25806
|
+
}, [width, height]);
|
|
25581
25807
|
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
25808
|
+
ref: ref,
|
|
25582
25809
|
sx: {
|
|
25583
25810
|
display: 'grid',
|
|
25584
25811
|
width: '100%',
|
|
@@ -25611,7 +25838,10 @@
|
|
|
25611
25838
|
}
|
|
25612
25839
|
}, /*#__PURE__*/React__namespace.createElement(ReactMapView, __assign({}, props, {
|
|
25613
25840
|
showLegend: false,
|
|
25614
|
-
displayTimeInMap: false
|
|
25841
|
+
displayTimeInMap: false,
|
|
25842
|
+
onWMJSMount: function onWMJSMount(id) {
|
|
25843
|
+
wmjsMapRef.current = getWMJSMapById(id);
|
|
25844
|
+
}
|
|
25615
25845
|
}), children)), displayTimeInMap && dimensions && /*#__PURE__*/React__namespace.createElement(MapTime, {
|
|
25616
25846
|
dimensions: dimensions
|
|
25617
25847
|
}));
|
|
@@ -26725,8 +26955,8 @@
|
|
|
26725
26955
|
* See the License for the specific language governing permissions and
|
|
26726
26956
|
* limitations under the License.
|
|
26727
26957
|
*
|
|
26728
|
-
* Copyright
|
|
26729
|
-
* Copyright
|
|
26958
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
26959
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
26730
26960
|
* */
|
|
26731
26961
|
|
|
26732
26962
|
var GetFeatureInfoDialog = function GetFeatureInfoDialog(_a) {
|
|
@@ -26896,11 +27126,10 @@
|
|
|
26896
27126
|
}
|
|
26897
27127
|
}, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
26898
27128
|
variant: "subtitle1"
|
|
26899
|
-
}, title, "\xA0", /*#__PURE__*/React__default["default"].createElement(
|
|
27129
|
+
}, title, "\xA0", /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
|
|
26900
27130
|
sx: {
|
|
26901
27131
|
"float": 'right'
|
|
26902
27132
|
},
|
|
26903
|
-
size: "small",
|
|
26904
27133
|
"aria-label": "Open layer featureinfo in another page",
|
|
26905
27134
|
onClick: function onClick() {
|
|
26906
27135
|
window.open(url);
|
|
@@ -27300,8 +27529,7 @@
|
|
|
27300
27529
|
syncGroupAddTarget({
|
|
27301
27530
|
groupId: syncGroupsId,
|
|
27302
27531
|
targetId: map.id,
|
|
27303
|
-
linked: true
|
|
27304
|
-
origin: 'system'
|
|
27532
|
+
linked: true
|
|
27305
27533
|
});
|
|
27306
27534
|
});
|
|
27307
27535
|
});
|
|
@@ -27744,10 +27972,9 @@
|
|
|
27744
27972
|
var isNotCheckedElseWhere = viewStateData.groups.every(function (group) {
|
|
27745
27973
|
return !(group.id !== groupId && group.selected.includes(source.id));
|
|
27746
27974
|
});
|
|
27747
|
-
return /*#__PURE__*/React__namespace.createElement(material.
|
|
27975
|
+
return /*#__PURE__*/React__namespace.createElement(material.ListItemButton, {
|
|
27748
27976
|
key: source.id,
|
|
27749
27977
|
dense: true,
|
|
27750
|
-
button: true,
|
|
27751
27978
|
onClick: function onClick() {
|
|
27752
27979
|
return handleToggle(source.id);
|
|
27753
27980
|
},
|
|
@@ -27781,8 +28008,8 @@
|
|
|
27781
28008
|
* See the License for the specific language governing permissions and
|
|
27782
28009
|
* limitations under the License.
|
|
27783
28010
|
*
|
|
27784
|
-
* Copyright
|
|
27785
|
-
* Copyright
|
|
28011
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
28012
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
27786
28013
|
* */
|
|
27787
28014
|
var SyncGroupList = function SyncGroupList(_a) {
|
|
27788
28015
|
var viewStateData = _a.viewStateData,
|
|
@@ -27810,9 +28037,8 @@
|
|
|
27810
28037
|
paddingLeft: '15px',
|
|
27811
28038
|
paddingTop: '10px'
|
|
27812
28039
|
}
|
|
27813
|
-
}, /*#__PURE__*/React__namespace.createElement(material.Typography, null, title), /*#__PURE__*/React__namespace.createElement(shared.
|
|
27814
|
-
|
|
27815
|
-
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
28040
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Typography, null, title), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
28041
|
+
tooltipTitle: index === 0 ? 'Add new group to list' : 'Remove group from list',
|
|
27816
28042
|
style: {
|
|
27817
28043
|
right: '10px'
|
|
27818
28044
|
},
|
|
@@ -27821,9 +28047,8 @@
|
|
|
27821
28047
|
return addNewGroup(groupObject.id);
|
|
27822
28048
|
} : function () {
|
|
27823
28049
|
return removeGroup(groupObject.id);
|
|
27824
|
-
}
|
|
27825
|
-
|
|
27826
|
-
}, index === 0 ? /*#__PURE__*/React__namespace.createElement(theme.Add, null) : /*#__PURE__*/React__namespace.createElement(theme.Delete, null)))), /*#__PURE__*/React__namespace.createElement(SyncGroupListItem, {
|
|
28050
|
+
}
|
|
28051
|
+
}, index === 0 ? /*#__PURE__*/React__namespace.createElement(theme.Add, null) : /*#__PURE__*/React__namespace.createElement(theme.Delete, null))), /*#__PURE__*/React__namespace.createElement(SyncGroupListItem, {
|
|
27827
28052
|
viewStateData: viewStateData,
|
|
27828
28053
|
groupId: groupObject.id,
|
|
27829
28054
|
selected: groupObject.selected,
|
|
@@ -27880,7 +28105,8 @@
|
|
|
27880
28105
|
if (isChecked) {
|
|
27881
28106
|
syncGroupRemoveTarget({
|
|
27882
28107
|
groupId: String(groupId),
|
|
27883
|
-
targetId: String(sourceId)
|
|
28108
|
+
targetId: String(sourceId),
|
|
28109
|
+
origin: 'user'
|
|
27884
28110
|
});
|
|
27885
28111
|
} else {
|
|
27886
28112
|
var groups = syncGroupViewState[groupCategory].groups;
|
|
@@ -27893,7 +28119,8 @@
|
|
|
27893
28119
|
if (group.id !== groupId && group.selected.includes(sourceId)) {
|
|
27894
28120
|
syncGroupRemoveTarget({
|
|
27895
28121
|
groupId: String(group.id),
|
|
27896
|
-
targetId: String(sourceId)
|
|
28122
|
+
targetId: String(sourceId),
|
|
28123
|
+
origin: 'user'
|
|
27897
28124
|
});
|
|
27898
28125
|
}
|
|
27899
28126
|
}
|
|
@@ -27912,7 +28139,8 @@
|
|
|
27912
28139
|
|
|
27913
28140
|
syncGroupAddTarget({
|
|
27914
28141
|
groupId: String(groupId),
|
|
27915
|
-
targetId: String(sourceId)
|
|
28142
|
+
targetId: String(sourceId),
|
|
28143
|
+
origin: 'user'
|
|
27916
28144
|
});
|
|
27917
28145
|
}
|
|
27918
28146
|
};
|
|
@@ -27933,7 +28161,8 @@
|
|
|
27933
28161
|
syncGroupAddGroup({
|
|
27934
28162
|
groupId: String(groupId + Math.floor(Math.random() * 1000)),
|
|
27935
28163
|
title: title,
|
|
27936
|
-
type: syncType
|
|
28164
|
+
type: syncType,
|
|
28165
|
+
origin: 'user'
|
|
27937
28166
|
});
|
|
27938
28167
|
}
|
|
27939
28168
|
});
|
|
@@ -28211,8 +28440,8 @@
|
|
|
28211
28440
|
* See the License for the specific language governing permissions and
|
|
28212
28441
|
* limitations under the License.
|
|
28213
28442
|
*
|
|
28214
|
-
* Copyright
|
|
28215
|
-
* Copyright
|
|
28443
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
28444
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
28216
28445
|
* */
|
|
28217
28446
|
var SnackbarWrapper = function SnackbarWrapper(_a) {
|
|
28218
28447
|
var children = _a.children,
|
|
@@ -28230,14 +28459,19 @@
|
|
|
28230
28459
|
ClickAwayListenerProps: {
|
|
28231
28460
|
mouseEvent: false
|
|
28232
28461
|
},
|
|
28233
|
-
action: /*#__PURE__*/React__namespace.createElement(
|
|
28462
|
+
action: /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
|
|
28234
28463
|
"aria-label": "close",
|
|
28235
28464
|
"data-testid": "snackbarCloseButton",
|
|
28236
28465
|
onClick: onCloseSnackbar,
|
|
28466
|
+
size: "large",
|
|
28237
28467
|
sx: {
|
|
28238
|
-
|
|
28239
|
-
|
|
28240
|
-
|
|
28468
|
+
'&.MuiButtonBase-root': {
|
|
28469
|
+
borderRadius: 20,
|
|
28470
|
+
color: 'geowebColors.snackbar.action',
|
|
28471
|
+
'&:hover': {
|
|
28472
|
+
color: 'geowebColors.snackbar.action',
|
|
28473
|
+
backgroundColor: 'geowebColors.snackbar.actionHover.rgba'
|
|
28474
|
+
}
|
|
28241
28475
|
}
|
|
28242
28476
|
}
|
|
28243
28477
|
}, /*#__PURE__*/React__namespace.createElement(theme.Close, null))
|
|
@@ -28352,6 +28586,7 @@
|
|
|
28352
28586
|
* */
|
|
28353
28587
|
// stores navigate hook method to object, so it can be used outside components
|
|
28354
28588
|
var historyDict = {
|
|
28589
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28355
28590
|
navigate: null
|
|
28356
28591
|
};
|
|
28357
28592
|
|
|
@@ -28450,8 +28685,6 @@
|
|
|
28450
28685
|
* */
|
|
28451
28686
|
var NavigateSetter = function NavigateSetter() {
|
|
28452
28687
|
// stores navigate hook method to historyDict, so it can be used outside components
|
|
28453
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
28454
|
-
// @ts-ignore
|
|
28455
28688
|
historyDict.navigate = reactRouterDom.useNavigate();
|
|
28456
28689
|
return null;
|
|
28457
28690
|
};
|
|
@@ -28668,7 +28901,7 @@
|
|
|
28668
28901
|
exports.getWMLayerById = getWMLayerById;
|
|
28669
28902
|
exports.layerActions = layerActions;
|
|
28670
28903
|
exports.layerReducer = reducer$8;
|
|
28671
|
-
exports.layerSelectors = selectors$
|
|
28904
|
+
exports.layerSelectors = selectors$4;
|
|
28672
28905
|
exports.layerTypes = types$3;
|
|
28673
28906
|
exports.mapActions = mapActions;
|
|
28674
28907
|
exports.mapModuleConfig = moduleConfig;
|
|
@@ -28686,13 +28919,14 @@
|
|
|
28686
28919
|
exports.snackbarActions = snackbarActions;
|
|
28687
28920
|
exports.store = store;
|
|
28688
28921
|
exports.syncGroupActions = genericActions;
|
|
28922
|
+
exports.syncGroupsSelectors = selectors$2;
|
|
28689
28923
|
exports.synchronizationGroupModuleConfig = synchronizationGroupConfig;
|
|
28690
28924
|
exports.synchronizationGroupsConfig = synchronizationGroupConfig;
|
|
28691
28925
|
exports.testLayers = testLayers;
|
|
28692
28926
|
exports.timeSliderUtils = timeSliderUtils;
|
|
28693
28927
|
exports.uiActions = uiActions;
|
|
28694
28928
|
exports.uiModuleConfig = uiModuleConfig;
|
|
28695
|
-
exports.uiSelectors = selectors$
|
|
28929
|
+
exports.uiSelectors = selectors$3;
|
|
28696
28930
|
exports.uiTypes = types;
|
|
28697
28931
|
exports.unRegisterWMJSLayer = unRegisterWMJSLayer;
|
|
28698
28932
|
exports.unRegisterWMJSMap = unRegisterWMJSMap;
|