@opengeoweb/core 2.3.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +960 -689
- package/index.umd.js +965 -669
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/LayerRow.d.ts +1 -0
- package/lib/components/LayerManager/LayerContainerRow/{LayerManagerButton.spec.d.ts → LayerRow/LayerRowConnect.spec.d.ts} +0 -0
- package/lib/components/LayerManager/LayerManagerUtils.d.ts +2 -2
- package/lib/components/MapView/MapViewLayer.d.ts +3 -0
- package/lib/components/ReactMapView/AdagucMapDraw.d.ts +12 -7
- package/lib/components/ReactMapView/AdagucMapDraw.stories.d.ts +4 -0
- package/lib/components/ReactMapView/AdagucMapDrawContainer.d.ts +2 -1
- package/lib/components/ReactMapView/AdagucMapDrawTools.d.ts +9 -0
- package/lib/components/{LayerManager/LayerContainerRow/LayerRow/DeleteLayer/DeleteLayer.spec.d.ts → ReactMapView/AdagucMapDrawTools.spec.d.ts} +0 -0
- package/lib/components/SyncGroups/SyncGroupViewer.d.ts +2 -0
- package/lib/components/SyncGroups/SyncGroupViewerConnect.d.ts +1 -6
- package/lib/components/SyncGroups/selector.d.ts +4 -4
- package/lib/components/TimeSlider/TimeSliderButtons/PlayButton/PlayButtonConnect.d.ts +1 -0
- package/lib/components/TimeSlider/TimeSliderLegend/TimeSliderLegend.d.ts +2 -0
- package/lib/components/TimeSlider/TimeSliderLegend/TimeSliderLegendRenderFunctions.d.ts +1 -1
- package/lib/components/TooltipSelect/TooltipSelect.d.ts +0 -1
- package/lib/store/generic/selectors.d.ts +1 -0
- package/lib/store/generic/synchronizationGroups/actions.d.ts +2 -1
- package/lib/store/generic/synchronizationGroups/constants.d.ts +1 -0
- package/lib/store/generic/synchronizationGroups/sagas.d.ts +1 -0
- package/lib/store/generic/synchronizationGroups/selectors.d.ts +13 -0
- package/lib/store/generic/synchronizationGroups/types.d.ts +11 -2
- package/lib/store/layerSelect/sagas.d.ts +2 -1
- package/lib/store/mapStore/map/selectors.d.ts +30 -0
- package/lib/store/mapStore/service/types.d.ts +2 -1
- package/lib/store/ui/types.d.ts +1 -1
- package/lib/utils/localStorage.d.ts +3 -0
- package/lib/utils/testUtils.d.ts +2 -1
- package/package.json +7 -6
- package/lib/components/LayerManager/LayerContainerRow/LayerManagerButton.d.ts +0 -13
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/DeleteLayer/DeleteLayer.d.ts +0 -8
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/EnableLayer/EnableLayer.d.ts +0 -8
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/EnableLayer/EnableLayer.spec.d.ts +0 -1
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/styles.d.ts +0 -5
package/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('reselect'), require('moment'), require('lodash'), require('react'), require('immer'), require('redux-saga/effects'), require('@opengeoweb/webmap'), require('@mui/material'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'reselect', 'moment', 'lodash', 'react', 'immer', 'redux-saga/effects', '@opengeoweb/webmap', '@mui/material', '@mui/styles/makeStyles', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.reselect, global.moment, global._, global.React, global.produce, global.effects, global.webmap, global.material, global.
|
|
5
|
-
})(this, (function (exports, reselect, moment, _, React, produce, effects, webmap, material,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('reselect'), require('moment'), require('lodash'), require('react'), require('immer'), require('redux-saga/effects'), require('@opengeoweb/webmap'), require('@mui/material'), require('react-redux'), require('@mui/styles/makeStyles'), require('@opengeoweb/shared'), require('@mui/icons-material'), require('react-sortablejs'), require('@mui/styles/createStyles'), require('@mui/styles/withStyles'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('redux-dynamic-modules'), require('redux-dynamic-modules-saga'), require('@opengeoweb/theme')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'reselect', 'moment', 'lodash', 'react', 'immer', 'redux-saga/effects', '@opengeoweb/webmap', '@mui/material', 'react-redux', '@mui/styles/makeStyles', '@opengeoweb/shared', '@mui/icons-material', 'react-sortablejs', '@mui/styles/createStyles', '@mui/styles/withStyles', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', 'redux-dynamic-modules', 'redux-dynamic-modules-saga', '@opengeoweb/theme'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.reselect, global.moment, global._, global.React, global.produce, global.effects, global.webmap, global.material, global.reactRedux, global.makeStyles, global.shared, global.iconsMaterial, global.reactSortablejs, global.createStyles, global.withStyles, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.reduxDynamicModules, global.reduxDynamicModulesSaga, global.theme));
|
|
5
|
+
})(this, (function (exports, reselect, moment, _, React, produce, effects, webmap, material, reactRedux, makeStyles, shared, iconsMaterial, reactSortablejs, createStyles, withStyles, throttleDebounce, cloneDeep, proj4, turf, reduxDynamicModules, reduxDynamicModulesSaga, theme) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
var withStyles__default = /*#__PURE__*/_interopDefaultLegacy(withStyles);
|
|
35
35
|
var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep);
|
|
36
36
|
var proj4__default = /*#__PURE__*/_interopDefaultLegacy(proj4);
|
|
37
|
+
var turf__namespace = /*#__PURE__*/_interopNamespace(turf);
|
|
37
38
|
|
|
38
39
|
/* *
|
|
39
40
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1307,6 +1308,103 @@
|
|
|
1307
1308
|
return [];
|
|
1308
1309
|
}, selectorMemoizationOptions);
|
|
1309
1310
|
|
|
1311
|
+
/* *
|
|
1312
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1313
|
+
* you may not use this file except in compliance with the License.
|
|
1314
|
+
* You may obtain a copy of the License at
|
|
1315
|
+
*
|
|
1316
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1317
|
+
*
|
|
1318
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1319
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1320
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1321
|
+
* See the License for the specific language governing permissions and
|
|
1322
|
+
* limitations under the License.
|
|
1323
|
+
*
|
|
1324
|
+
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1325
|
+
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
1326
|
+
* */
|
|
1327
|
+
|
|
1328
|
+
/* Action constants for sources */
|
|
1329
|
+
var SYNCGROUPS_ADD_SOURCE = 'SYNCGROUPS_ADD_SOURCE';
|
|
1330
|
+
var SYNCGROUPS_REMOVE_SOURCE = 'SYNCGROUPS_REMOVE_SOURCE';
|
|
1331
|
+
/* Action constants for groups */
|
|
1332
|
+
|
|
1333
|
+
var SYNCGROUPS_TOGGLE_LINK_TARGET = 'SYNCGROUPS_TOGGLE_LINK_TARGET';
|
|
1334
|
+
var SYNCGROUPS_ADD_TARGET = 'SYNCGROUPS_ADD_TARGET';
|
|
1335
|
+
var SYNCGROUPS_REMOVE_TARGET = 'SYNCGROUPS_REMOVE_TARGET';
|
|
1336
|
+
var SYNCGROUPS_ADD_GROUP = 'SYNCGROUPS_ADD_GROUP';
|
|
1337
|
+
var SYNCGROUPS_REMOVE_GROUP = 'SYNCGROUPS_REMOVE_GROUP';
|
|
1338
|
+
var SYNCGROUPS_CLEAR = 'SYNCGROUPS_CLEAR';
|
|
1339
|
+
/* Type constants */
|
|
1340
|
+
|
|
1341
|
+
var SYNCGROUPS_TYPE_SETTIME = 'SYNCGROUPS_TYPE_SETTIME';
|
|
1342
|
+
var SYNCGROUPS_TYPE_SETBBOX = 'SYNCGROUPS_TYPE_SETBBOX';
|
|
1343
|
+
var SYNCGROUPS_TYPE_SETLAYERACTIONS = 'SYNCGROUPS_TYPE_SETLAYERACTIONS';
|
|
1344
|
+
var SYNCGROUPS_SET_VIEW_STATE = 'SYNCGROUPS_SET_VIEW_STATE';
|
|
1345
|
+
|
|
1346
|
+
var constants$1 = /*#__PURE__*/Object.freeze({
|
|
1347
|
+
__proto__: null,
|
|
1348
|
+
SYNCGROUPS_ADD_SOURCE: SYNCGROUPS_ADD_SOURCE,
|
|
1349
|
+
SYNCGROUPS_REMOVE_SOURCE: SYNCGROUPS_REMOVE_SOURCE,
|
|
1350
|
+
SYNCGROUPS_TOGGLE_LINK_TARGET: SYNCGROUPS_TOGGLE_LINK_TARGET,
|
|
1351
|
+
SYNCGROUPS_ADD_TARGET: SYNCGROUPS_ADD_TARGET,
|
|
1352
|
+
SYNCGROUPS_REMOVE_TARGET: SYNCGROUPS_REMOVE_TARGET,
|
|
1353
|
+
SYNCGROUPS_ADD_GROUP: SYNCGROUPS_ADD_GROUP,
|
|
1354
|
+
SYNCGROUPS_REMOVE_GROUP: SYNCGROUPS_REMOVE_GROUP,
|
|
1355
|
+
SYNCGROUPS_CLEAR: SYNCGROUPS_CLEAR,
|
|
1356
|
+
SYNCGROUPS_TYPE_SETTIME: SYNCGROUPS_TYPE_SETTIME,
|
|
1357
|
+
SYNCGROUPS_TYPE_SETBBOX: SYNCGROUPS_TYPE_SETBBOX,
|
|
1358
|
+
SYNCGROUPS_TYPE_SETLAYERACTIONS: SYNCGROUPS_TYPE_SETLAYERACTIONS,
|
|
1359
|
+
SYNCGROUPS_SET_VIEW_STATE: SYNCGROUPS_SET_VIEW_STATE
|
|
1360
|
+
});
|
|
1361
|
+
|
|
1362
|
+
/* *
|
|
1363
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1364
|
+
* you may not use this file except in compliance with the License.
|
|
1365
|
+
* You may obtain a copy of the License at
|
|
1366
|
+
*
|
|
1367
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1368
|
+
*
|
|
1369
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1370
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1371
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1372
|
+
* See the License for the specific language governing permissions and
|
|
1373
|
+
* limitations under the License.
|
|
1374
|
+
*
|
|
1375
|
+
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1376
|
+
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
1377
|
+
* */
|
|
1378
|
+
|
|
1379
|
+
var synchronizationGroupStore = function synchronizationGroupStore(store) {
|
|
1380
|
+
return store && store.syncronizationGroupStore ? store.syncronizationGroupStore : null;
|
|
1381
|
+
};
|
|
1382
|
+
|
|
1383
|
+
var getSynchronizationGroupStore = reselect.createSelector(synchronizationGroupStore, function (store) {
|
|
1384
|
+
return store;
|
|
1385
|
+
});
|
|
1386
|
+
/**
|
|
1387
|
+
* Returns the synchronization source by id
|
|
1388
|
+
* @param store The app store
|
|
1389
|
+
* @param id The source id to find
|
|
1390
|
+
*/
|
|
1391
|
+
|
|
1392
|
+
var getSyncSourceBySourceId = function getSyncSourceBySourceId(state, id) {
|
|
1393
|
+
if (state && state.sources) {
|
|
1394
|
+
var sources = state.sources;
|
|
1395
|
+
|
|
1396
|
+
if (sources.byId[id]) {
|
|
1397
|
+
return sources.byId[id];
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
return null;
|
|
1402
|
+
};
|
|
1403
|
+
|
|
1404
|
+
var getTime = reselect.createSelector(getSyncSourceBySourceId, function (store) {
|
|
1405
|
+
return store && store.payloadByType && store.payloadByType[SYNCGROUPS_TYPE_SETTIME] ? store.payloadByType[SYNCGROUPS_TYPE_SETTIME].value : null;
|
|
1406
|
+
});
|
|
1407
|
+
|
|
1310
1408
|
/*! *****************************************************************************
|
|
1311
1409
|
Copyright (c) Microsoft Corporation.
|
|
1312
1410
|
|
|
@@ -2248,6 +2346,34 @@
|
|
|
2248
2346
|
var isAnimating = reselect.createSelector(getMapById, function (store) {
|
|
2249
2347
|
return store ? store.isAnimating : false;
|
|
2250
2348
|
});
|
|
2349
|
+
/**
|
|
2350
|
+
* Gets if any linked map is animating
|
|
2351
|
+
*
|
|
2352
|
+
* Example: linkedMapIsAnimating = linkedMapAnimationInfo(store, 'mapid_1')
|
|
2353
|
+
* @param {object} store store: object - store object
|
|
2354
|
+
* @param {string} mapId mapId: string - Id of the map
|
|
2355
|
+
* @returns {object} returnType: object - object containing isAnimating boolean and id string
|
|
2356
|
+
*/
|
|
2357
|
+
|
|
2358
|
+
var linkedMapAnimationInfo = reselect.createSelector(function (store, mapId) {
|
|
2359
|
+
var animationInfo = {
|
|
2360
|
+
isAnimating: isAnimating(store, mapId),
|
|
2361
|
+
id: mapId
|
|
2362
|
+
};
|
|
2363
|
+
getSynchronizationGroupStore(store).groups.allIds.forEach(function (groupId) {
|
|
2364
|
+
if (getSynchronizationGroupStore(store).groups.byId[groupId].targets.byId[animationInfo.id] && getSynchronizationGroupStore(store).groups.byId[groupId].targets.byId[animationInfo.id].linked) {
|
|
2365
|
+
getSynchronizationGroupStore(store).groups.byId[groupId].targets.allIds.forEach(function (id) {
|
|
2366
|
+
if (isAnimating(store, id) === true) {
|
|
2367
|
+
animationInfo.isAnimating = true;
|
|
2368
|
+
animationInfo.id = id;
|
|
2369
|
+
}
|
|
2370
|
+
});
|
|
2371
|
+
}
|
|
2372
|
+
});
|
|
2373
|
+
return animationInfo;
|
|
2374
|
+
}, function (animationInfo) {
|
|
2375
|
+
return animationInfo;
|
|
2376
|
+
});
|
|
2251
2377
|
/**
|
|
2252
2378
|
* Gets start time of animation
|
|
2253
2379
|
*
|
|
@@ -2707,6 +2833,7 @@
|
|
|
2707
2833
|
getSrs: getSrs,
|
|
2708
2834
|
getBbox: getBbox,
|
|
2709
2835
|
isAnimating: isAnimating,
|
|
2836
|
+
linkedMapAnimationInfo: linkedMapAnimationInfo,
|
|
2710
2837
|
getAnimationStartTime: getAnimationStartTime,
|
|
2711
2838
|
getAnimationEndTime: getAnimationEndTime,
|
|
2712
2839
|
isAutoUpdating: isAutoUpdating,
|
|
@@ -2772,7 +2899,7 @@
|
|
|
2772
2899
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
2773
2900
|
* */
|
|
2774
2901
|
|
|
2775
|
-
var constants
|
|
2902
|
+
var constants = /*#__PURE__*/Object.freeze({
|
|
2776
2903
|
__proto__: null,
|
|
2777
2904
|
WEBMAP_REGISTER_MAP: WEBMAP_REGISTER_MAP,
|
|
2778
2905
|
WEBMAP_UNREGISTER_MAP: WEBMAP_UNREGISTER_MAP,
|
|
@@ -3094,55 +3221,6 @@
|
|
|
3094
3221
|
var GENERIC_SETTIME = 'GENERIC_SETTIME';
|
|
3095
3222
|
var GENERIC_SETBBOX = 'GENERIC_SETBBOX';
|
|
3096
3223
|
|
|
3097
|
-
/* *
|
|
3098
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3099
|
-
* you may not use this file except in compliance with the License.
|
|
3100
|
-
* You may obtain a copy of the License at
|
|
3101
|
-
*
|
|
3102
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3103
|
-
*
|
|
3104
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
3105
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3106
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3107
|
-
* See the License for the specific language governing permissions and
|
|
3108
|
-
* limitations under the License.
|
|
3109
|
-
*
|
|
3110
|
-
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3111
|
-
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
3112
|
-
* */
|
|
3113
|
-
|
|
3114
|
-
/* Action constants for sources */
|
|
3115
|
-
var SYNCGROUPS_ADD_SOURCE = 'SYNCGROUPS_ADD_SOURCE';
|
|
3116
|
-
var SYNCGROUPS_REMOVE_SOURCE = 'SYNCGROUPS_REMOVE_SOURCE';
|
|
3117
|
-
/* Action constants for groups */
|
|
3118
|
-
|
|
3119
|
-
var SYNCGROUPS_TOGGLE_LINK_TARGET = 'SYNCGROUPS_TOGGLE_LINK_TARGET';
|
|
3120
|
-
var SYNCGROUPS_ADD_TARGET = 'SYNCGROUPS_ADD_TARGET';
|
|
3121
|
-
var SYNCGROUPS_REMOVE_TARGET = 'SYNCGROUPS_REMOVE_TARGET';
|
|
3122
|
-
var SYNCGROUPS_ADD_GROUP = 'SYNCGROUPS_ADD_GROUP';
|
|
3123
|
-
var SYNCGROUPS_REMOVE_GROUP = 'SYNCGROUPS_REMOVE_GROUP';
|
|
3124
|
-
var SYNCGROUPS_CLEAR = 'SYNCGROUPS_CLEAR';
|
|
3125
|
-
/* Type constants */
|
|
3126
|
-
|
|
3127
|
-
var SYNCGROUPS_TYPE_SETTIME = 'SYNCGROUPS_TYPE_SETTIME';
|
|
3128
|
-
var SYNCGROUPS_TYPE_SETBBOX = 'SYNCGROUPS_TYPE_SETBBOX';
|
|
3129
|
-
var SYNCGROUPS_TYPE_SETLAYERACTIONS = 'SYNCGROUPS_TYPE_SETLAYERACTIONS';
|
|
3130
|
-
|
|
3131
|
-
var constants = /*#__PURE__*/Object.freeze({
|
|
3132
|
-
__proto__: null,
|
|
3133
|
-
SYNCGROUPS_ADD_SOURCE: SYNCGROUPS_ADD_SOURCE,
|
|
3134
|
-
SYNCGROUPS_REMOVE_SOURCE: SYNCGROUPS_REMOVE_SOURCE,
|
|
3135
|
-
SYNCGROUPS_TOGGLE_LINK_TARGET: SYNCGROUPS_TOGGLE_LINK_TARGET,
|
|
3136
|
-
SYNCGROUPS_ADD_TARGET: SYNCGROUPS_ADD_TARGET,
|
|
3137
|
-
SYNCGROUPS_REMOVE_TARGET: SYNCGROUPS_REMOVE_TARGET,
|
|
3138
|
-
SYNCGROUPS_ADD_GROUP: SYNCGROUPS_ADD_GROUP,
|
|
3139
|
-
SYNCGROUPS_REMOVE_GROUP: SYNCGROUPS_REMOVE_GROUP,
|
|
3140
|
-
SYNCGROUPS_CLEAR: SYNCGROUPS_CLEAR,
|
|
3141
|
-
SYNCGROUPS_TYPE_SETTIME: SYNCGROUPS_TYPE_SETTIME,
|
|
3142
|
-
SYNCGROUPS_TYPE_SETBBOX: SYNCGROUPS_TYPE_SETBBOX,
|
|
3143
|
-
SYNCGROUPS_TYPE_SETLAYERACTIONS: SYNCGROUPS_TYPE_SETLAYERACTIONS
|
|
3144
|
-
});
|
|
3145
|
-
|
|
3146
3224
|
/* *
|
|
3147
3225
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3148
3226
|
* you may not use this file except in compliance with the License.
|
|
@@ -3288,6 +3366,12 @@
|
|
|
3288
3366
|
type: SYNCGROUPS_CLEAR
|
|
3289
3367
|
};
|
|
3290
3368
|
};
|
|
3369
|
+
var syncGroupSetViewState = function syncGroupSetViewState(payload) {
|
|
3370
|
+
return {
|
|
3371
|
+
type: SYNCGROUPS_SET_VIEW_STATE,
|
|
3372
|
+
payload: payload
|
|
3373
|
+
};
|
|
3374
|
+
};
|
|
3291
3375
|
|
|
3292
3376
|
var actions$1 = /*#__PURE__*/Object.freeze({
|
|
3293
3377
|
__proto__: null,
|
|
@@ -3298,7 +3382,8 @@
|
|
|
3298
3382
|
syncGroupLinkTarget: syncGroupLinkTarget,
|
|
3299
3383
|
syncGroupAddGroup: syncGroupAddGroup,
|
|
3300
3384
|
syncGroupRemoveGroup: syncGroupRemoveGroup,
|
|
3301
|
-
syncGroupClear: syncGroupClear
|
|
3385
|
+
syncGroupClear: syncGroupClear,
|
|
3386
|
+
syncGroupSetViewState: syncGroupSetViewState
|
|
3302
3387
|
});
|
|
3303
3388
|
|
|
3304
3389
|
/* *
|
|
@@ -3368,7 +3453,8 @@
|
|
|
3368
3453
|
syncGroupLinkTarget: syncGroupLinkTarget,
|
|
3369
3454
|
syncGroupAddGroup: syncGroupAddGroup,
|
|
3370
3455
|
syncGroupRemoveGroup: syncGroupRemoveGroup,
|
|
3371
|
-
syncGroupClear: syncGroupClear
|
|
3456
|
+
syncGroupClear: syncGroupClear,
|
|
3457
|
+
syncGroupSetViewState: syncGroupSetViewState
|
|
3372
3458
|
});
|
|
3373
3459
|
|
|
3374
3460
|
/* *
|
|
@@ -3984,6 +4070,20 @@
|
|
|
3984
4070
|
groups: {
|
|
3985
4071
|
byId: {},
|
|
3986
4072
|
allIds: []
|
|
4073
|
+
},
|
|
4074
|
+
viewState: {
|
|
4075
|
+
timeslider: {
|
|
4076
|
+
groups: [],
|
|
4077
|
+
sourcesById: []
|
|
4078
|
+
},
|
|
4079
|
+
zoompane: {
|
|
4080
|
+
groups: [],
|
|
4081
|
+
sourcesById: []
|
|
4082
|
+
},
|
|
4083
|
+
level: {
|
|
4084
|
+
groups: [],
|
|
4085
|
+
sourcesById: []
|
|
4086
|
+
}
|
|
3987
4087
|
}
|
|
3988
4088
|
};
|
|
3989
4089
|
var reducer$4 = function reducer(state, action) {
|
|
@@ -4204,6 +4304,12 @@
|
|
|
4204
4304
|
case SYNCGROUPS_CLEAR:
|
|
4205
4305
|
return initialState$4;
|
|
4206
4306
|
|
|
4307
|
+
case SYNCGROUPS_SET_VIEW_STATE:
|
|
4308
|
+
return produce__default["default"](state, function (draft) {
|
|
4309
|
+
var viewState = action.payload.viewState;
|
|
4310
|
+
draft.viewState = viewState;
|
|
4311
|
+
});
|
|
4312
|
+
|
|
4207
4313
|
default:
|
|
4208
4314
|
return state;
|
|
4209
4315
|
}
|
|
@@ -4317,6 +4423,9 @@
|
|
|
4317
4423
|
}, []);
|
|
4318
4424
|
return groups;
|
|
4319
4425
|
};
|
|
4426
|
+
var syncGroupGetViewState = reselect.createSelector(syncGroupStore, function (store) {
|
|
4427
|
+
return store.viewState;
|
|
4428
|
+
});
|
|
4320
4429
|
|
|
4321
4430
|
/* *
|
|
4322
4431
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -4625,7 +4734,8 @@
|
|
|
4625
4734
|
id: wmLayer.service,
|
|
4626
4735
|
name: wmLayer.title,
|
|
4627
4736
|
service: wmLayer.service,
|
|
4628
|
-
layers: layers
|
|
4737
|
+
layers: layers,
|
|
4738
|
+
isUserAddedService: false
|
|
4629
4739
|
},
|
|
4630
4740
|
layerStyle: {
|
|
4631
4741
|
origin: origin,
|
|
@@ -5081,6 +5191,105 @@
|
|
|
5081
5191
|
});
|
|
5082
5192
|
}
|
|
5083
5193
|
|
|
5194
|
+
/* *
|
|
5195
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5196
|
+
* you may not use this file except in compliance with the License.
|
|
5197
|
+
* You may obtain a copy of the License at
|
|
5198
|
+
*
|
|
5199
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5200
|
+
*
|
|
5201
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5202
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5203
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5204
|
+
* See the License for the specific language governing permissions and
|
|
5205
|
+
* limitations under the License.
|
|
5206
|
+
*
|
|
5207
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5208
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
5209
|
+
* */
|
|
5210
|
+
var emptyState = {
|
|
5211
|
+
timeslider: {
|
|
5212
|
+
groups: [],
|
|
5213
|
+
sourcesById: []
|
|
5214
|
+
},
|
|
5215
|
+
zoompane: {
|
|
5216
|
+
groups: [],
|
|
5217
|
+
sourcesById: []
|
|
5218
|
+
},
|
|
5219
|
+
level: {
|
|
5220
|
+
groups: [],
|
|
5221
|
+
sourcesById: []
|
|
5222
|
+
}
|
|
5223
|
+
};
|
|
5224
|
+
var groupTypes = [{
|
|
5225
|
+
title: 'Timeslider',
|
|
5226
|
+
syncType: 'SYNCGROUPS_TYPE_SETTIME',
|
|
5227
|
+
groupType: 'timeslider'
|
|
5228
|
+
}, {
|
|
5229
|
+
title: 'Zoompane',
|
|
5230
|
+
syncType: 'SYNCGROUPS_TYPE_SETBBOX',
|
|
5231
|
+
groupType: 'zoompane'
|
|
5232
|
+
}];
|
|
5233
|
+
/*
|
|
5234
|
+
_____ Creates viewState _____
|
|
5235
|
+
- Runs Each time viewState is created:
|
|
5236
|
+
- Fill arrays inside initialState with objects containing new values from Redux
|
|
5237
|
+
*/
|
|
5238
|
+
|
|
5239
|
+
var createSyncGroupViewState = function createSyncGroupViewState(groups, sources) {
|
|
5240
|
+
var initialState = produce__default["default"](emptyState, function (draft) {
|
|
5241
|
+
/*
|
|
5242
|
+
_____ 1. Fill groups _____
|
|
5243
|
+
1. Goes through all groups by ID
|
|
5244
|
+
2. Collects original timeslider or zoompane values into an array
|
|
5245
|
+
3. Sorts and adds selected sources to ViewState based on ID type
|
|
5246
|
+
*/
|
|
5247
|
+
Object.keys(groups.byId).forEach(function (id) {
|
|
5248
|
+
var _a;
|
|
5249
|
+
|
|
5250
|
+
var groupType = (_a = groupTypes.find(function (object) {
|
|
5251
|
+
return object.syncType === groups.byId[id].type;
|
|
5252
|
+
})) === null || _a === void 0 ? void 0 : _a.groupType;
|
|
5253
|
+
|
|
5254
|
+
if (groupType) {
|
|
5255
|
+
draft[groupType].groups.push({
|
|
5256
|
+
id: id,
|
|
5257
|
+
selected: groups.byId[id].targets.allIds
|
|
5258
|
+
});
|
|
5259
|
+
}
|
|
5260
|
+
});
|
|
5261
|
+
/*
|
|
5262
|
+
_____ 2. Fill sourcesById _____
|
|
5263
|
+
1. Loop though sources and add source to each group type
|
|
5264
|
+
*/
|
|
5265
|
+
|
|
5266
|
+
Object.keys(sources.byId).forEach(function (id) {
|
|
5267
|
+
groupTypes.forEach(function (_a) {
|
|
5268
|
+
var syncType = _a.syncType,
|
|
5269
|
+
groupType = _a.groupType;
|
|
5270
|
+
|
|
5271
|
+
if (sources.byId[id].types.includes(syncType)) {
|
|
5272
|
+
draft[groupType].sourcesById.push({
|
|
5273
|
+
id: id,
|
|
5274
|
+
name: id
|
|
5275
|
+
});
|
|
5276
|
+
}
|
|
5277
|
+
});
|
|
5278
|
+
});
|
|
5279
|
+
});
|
|
5280
|
+
return initialState;
|
|
5281
|
+
};
|
|
5282
|
+
|
|
5283
|
+
var groups = function groups(store) {
|
|
5284
|
+
return store.syncronizationGroupStore.groups;
|
|
5285
|
+
};
|
|
5286
|
+
|
|
5287
|
+
var sources = function sources(store) {
|
|
5288
|
+
return store.syncronizationGroupStore.sources;
|
|
5289
|
+
};
|
|
5290
|
+
|
|
5291
|
+
var createSyncGroupViewStateSelector = reselect.createSelector(groups, sources, createSyncGroupViewState);
|
|
5292
|
+
|
|
5084
5293
|
/* *
|
|
5085
5294
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5086
5295
|
* you may not use this file except in compliance with the License.
|
|
@@ -5230,7 +5439,33 @@
|
|
|
5230
5439
|
}
|
|
5231
5440
|
});
|
|
5232
5441
|
}
|
|
5233
|
-
|
|
5442
|
+
function updateViewStateSaga() {
|
|
5443
|
+
var viewState;
|
|
5444
|
+
return __generator(this, function (_a) {
|
|
5445
|
+
switch (_a.label) {
|
|
5446
|
+
case 0:
|
|
5447
|
+
return [4
|
|
5448
|
+
/*yield*/
|
|
5449
|
+
, effects.select(createSyncGroupViewStateSelector)];
|
|
5450
|
+
|
|
5451
|
+
case 1:
|
|
5452
|
+
viewState = _a.sent();
|
|
5453
|
+
return [4
|
|
5454
|
+
/*yield*/
|
|
5455
|
+
, effects.put(syncGroupSetViewState({
|
|
5456
|
+
viewState: viewState
|
|
5457
|
+
}))];
|
|
5458
|
+
|
|
5459
|
+
case 2:
|
|
5460
|
+
_a.sent();
|
|
5461
|
+
|
|
5462
|
+
return [2
|
|
5463
|
+
/*return*/
|
|
5464
|
+
];
|
|
5465
|
+
}
|
|
5466
|
+
});
|
|
5467
|
+
}
|
|
5468
|
+
|
|
5234
5469
|
function rootSaga$3() {
|
|
5235
5470
|
return __generator(this, function (_a) {
|
|
5236
5471
|
switch (_a.label) {
|
|
@@ -5249,6 +5484,55 @@
|
|
|
5249
5484
|
case 2:
|
|
5250
5485
|
_a.sent();
|
|
5251
5486
|
|
|
5487
|
+
return [4
|
|
5488
|
+
/*yield*/
|
|
5489
|
+
, effects.takeLatest(SYNCGROUPS_ADD_GROUP, updateViewStateSaga)];
|
|
5490
|
+
|
|
5491
|
+
case 3:
|
|
5492
|
+
_a.sent();
|
|
5493
|
+
|
|
5494
|
+
return [4
|
|
5495
|
+
/*yield*/
|
|
5496
|
+
, effects.takeLatest(SYNCGROUPS_REMOVE_GROUP, updateViewStateSaga)];
|
|
5497
|
+
|
|
5498
|
+
case 4:
|
|
5499
|
+
_a.sent();
|
|
5500
|
+
|
|
5501
|
+
return [4
|
|
5502
|
+
/*yield*/
|
|
5503
|
+
, effects.takeLatest(SYNCGROUPS_ADD_SOURCE, updateViewStateSaga)];
|
|
5504
|
+
|
|
5505
|
+
case 5:
|
|
5506
|
+
_a.sent();
|
|
5507
|
+
|
|
5508
|
+
return [4
|
|
5509
|
+
/*yield*/
|
|
5510
|
+
, effects.takeLatest(SYNCGROUPS_REMOVE_SOURCE, updateViewStateSaga)];
|
|
5511
|
+
|
|
5512
|
+
case 6:
|
|
5513
|
+
_a.sent();
|
|
5514
|
+
|
|
5515
|
+
return [4
|
|
5516
|
+
/*yield*/
|
|
5517
|
+
, effects.takeLatest(SYNCGROUPS_ADD_TARGET, updateViewStateSaga)];
|
|
5518
|
+
|
|
5519
|
+
case 7:
|
|
5520
|
+
_a.sent();
|
|
5521
|
+
|
|
5522
|
+
return [4
|
|
5523
|
+
/*yield*/
|
|
5524
|
+
, effects.takeLatest(SYNCGROUPS_REMOVE_TARGET, updateViewStateSaga)];
|
|
5525
|
+
|
|
5526
|
+
case 8:
|
|
5527
|
+
_a.sent();
|
|
5528
|
+
|
|
5529
|
+
return [4
|
|
5530
|
+
/*yield*/
|
|
5531
|
+
, effects.takeLatest(SYNCGROUPS_TOGGLE_LINK_TARGET, updateViewStateSaga)];
|
|
5532
|
+
|
|
5533
|
+
case 9:
|
|
5534
|
+
_a.sent();
|
|
5535
|
+
|
|
5252
5536
|
return [2
|
|
5253
5537
|
/*return*/
|
|
5254
5538
|
];
|
|
@@ -5296,40 +5580,6 @@
|
|
|
5296
5580
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5297
5581
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
5298
5582
|
* */
|
|
5299
|
-
var useStyles$B = makeStyles__default["default"](function (theme) {
|
|
5300
|
-
return {
|
|
5301
|
-
select: {
|
|
5302
|
-
'& ul': {
|
|
5303
|
-
backgroundColor: theme.palette.geowebColors.background.surface
|
|
5304
|
-
},
|
|
5305
|
-
'& li': {
|
|
5306
|
-
fontSize: 16,
|
|
5307
|
-
padding: 12,
|
|
5308
|
-
'&:hover': {
|
|
5309
|
-
backgroundColor: theme.palette.geowebColors.layerManager.tableRowMouseover.rgba
|
|
5310
|
-
},
|
|
5311
|
-
'&.Mui-selected': {
|
|
5312
|
-
color: theme.palette.common.white,
|
|
5313
|
-
backgroundColor: theme.palette.geowebColors.buttons.primary.active.fill,
|
|
5314
|
-
boxShadow: "none",
|
|
5315
|
-
'&:hover': {
|
|
5316
|
-
color: theme.palette.common.white,
|
|
5317
|
-
backgroundColor: theme.palette.geowebColors.buttons.primary.mouseOver.fill
|
|
5318
|
-
}
|
|
5319
|
-
},
|
|
5320
|
-
'&:after': {
|
|
5321
|
-
background: 'none!important'
|
|
5322
|
-
},
|
|
5323
|
-
// (optional) header
|
|
5324
|
-
'&.Mui-disabled': {
|
|
5325
|
-
fontSize: 12,
|
|
5326
|
-
opacity: 0.67,
|
|
5327
|
-
padding: '0 12px'
|
|
5328
|
-
}
|
|
5329
|
-
}
|
|
5330
|
-
}
|
|
5331
|
-
};
|
|
5332
|
-
});
|
|
5333
5583
|
|
|
5334
5584
|
var TooltipSelect = function TooltipSelect(_a) {
|
|
5335
5585
|
var tooltip = _a.tooltip,
|
|
@@ -5354,8 +5604,6 @@
|
|
|
5354
5604
|
tooltipOpen = _g[0],
|
|
5355
5605
|
setTooltipOpen = _g[1];
|
|
5356
5606
|
|
|
5357
|
-
var classes = useStyles$B();
|
|
5358
|
-
|
|
5359
5607
|
var preventDefault = function preventDefault(event) {
|
|
5360
5608
|
event.preventDefault();
|
|
5361
5609
|
event.stopPropagation();
|
|
@@ -5420,8 +5668,46 @@
|
|
|
5420
5668
|
onBlur: onBlur,
|
|
5421
5669
|
onWheel: onWheel,
|
|
5422
5670
|
MenuProps: {
|
|
5423
|
-
|
|
5424
|
-
|
|
5671
|
+
BackdropProps: {
|
|
5672
|
+
sx: {
|
|
5673
|
+
'&.MuiBackdrop-root': {
|
|
5674
|
+
backgroundColor: 'transparent'
|
|
5675
|
+
}
|
|
5676
|
+
}
|
|
5677
|
+
},
|
|
5678
|
+
sx: {
|
|
5679
|
+
'& ul': {
|
|
5680
|
+
backgroundColor: 'geowebColors.background.surface'
|
|
5681
|
+
},
|
|
5682
|
+
'& li': {
|
|
5683
|
+
fontSize: '16px',
|
|
5684
|
+
padding: '12px',
|
|
5685
|
+
'&:hover': {
|
|
5686
|
+
backgroundColor: 'geowebColors.buttons.tool.mouseOver.fill'
|
|
5687
|
+
},
|
|
5688
|
+
'&.Mui-selected': {
|
|
5689
|
+
color: 'geowebColors.buttons.tool.active.color',
|
|
5690
|
+
backgroundColor: 'geowebColors.buttons.tool.active.fill',
|
|
5691
|
+
boxShadow: "none",
|
|
5692
|
+
'&:hover': {
|
|
5693
|
+
backgroundColor: 'geowebColors.buttons.tool.activeMouseOver.fill'
|
|
5694
|
+
},
|
|
5695
|
+
'&:focus': {
|
|
5696
|
+
backgroundColor: 'geowebColors.buttons.tool.activeMouseOver.fill'
|
|
5697
|
+
}
|
|
5698
|
+
},
|
|
5699
|
+
'&:after': {
|
|
5700
|
+
background: 'none!important'
|
|
5701
|
+
},
|
|
5702
|
+
'&.Mui-disabled': {
|
|
5703
|
+
fontSize: '12px',
|
|
5704
|
+
opacity: 0.67,
|
|
5705
|
+
padding: '0px 12px',
|
|
5706
|
+
'&.MuiMenuItem-root': {
|
|
5707
|
+
minHeight: '30px!important'
|
|
5708
|
+
}
|
|
5709
|
+
}
|
|
5710
|
+
}
|
|
5425
5711
|
}
|
|
5426
5712
|
}
|
|
5427
5713
|
}, otherProps)));
|
|
@@ -5470,7 +5756,7 @@
|
|
|
5470
5756
|
var index = /*#__PURE__*/Object.freeze({
|
|
5471
5757
|
__proto__: null,
|
|
5472
5758
|
actions: actions$1,
|
|
5473
|
-
constants: constants,
|
|
5759
|
+
constants: constants$1,
|
|
5474
5760
|
types: types,
|
|
5475
5761
|
initialState: initialState$4
|
|
5476
5762
|
});
|
|
@@ -6332,7 +6618,20 @@
|
|
|
6332
6618
|
case GENERIC_SYNC_SETBBOX:
|
|
6333
6619
|
{
|
|
6334
6620
|
return produce.produce(state, function (draft) {
|
|
6335
|
-
action.payload
|
|
6621
|
+
var _a = action.payload,
|
|
6622
|
+
targetsFromAction = _a.targets,
|
|
6623
|
+
source = _a.source;
|
|
6624
|
+
/* Because we want backwards compatibility with the previous code, we also need to listen to the original source action */
|
|
6625
|
+
|
|
6626
|
+
var targets = [{
|
|
6627
|
+
targetId: source.payload.sourceId,
|
|
6628
|
+
bbox: source.payload.bbox,
|
|
6629
|
+
srs: source.payload.srs
|
|
6630
|
+
}];
|
|
6631
|
+
/* And then append the targets form the action */
|
|
6632
|
+
|
|
6633
|
+
targets.push.apply(targets, __spreadArray([], __read(targetsFromAction)));
|
|
6634
|
+
targets.forEach(function (payload) {
|
|
6336
6635
|
var targetId = payload.targetId,
|
|
6337
6636
|
bbox = payload.bbox,
|
|
6338
6637
|
srs = payload.srs;
|
|
@@ -7377,6 +7676,39 @@
|
|
|
7377
7676
|
};
|
|
7378
7677
|
};
|
|
7379
7678
|
|
|
7679
|
+
/* *
|
|
7680
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7681
|
+
* you may not use this file except in compliance with the License.
|
|
7682
|
+
* You may obtain a copy of the License at
|
|
7683
|
+
*
|
|
7684
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7685
|
+
*
|
|
7686
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7687
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
7688
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
7689
|
+
* See the License for the specific language governing permissions and
|
|
7690
|
+
* limitations under the License.
|
|
7691
|
+
*
|
|
7692
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
7693
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
7694
|
+
* */
|
|
7695
|
+
var getUserAddedServices = function getUserAddedServices() {
|
|
7696
|
+
try {
|
|
7697
|
+
return JSON.parse(window.localStorage.getItem('userAddedServices')) || {};
|
|
7698
|
+
} catch (e) {
|
|
7699
|
+
console.error('Unable to read services from localStorage: ', e);
|
|
7700
|
+
}
|
|
7701
|
+
|
|
7702
|
+
return {};
|
|
7703
|
+
};
|
|
7704
|
+
var setUserAddedServices = function setUserAddedServices(services) {
|
|
7705
|
+
try {
|
|
7706
|
+
window.localStorage.setItem('userAddedServices', JSON.stringify(services));
|
|
7707
|
+
} catch (e) {
|
|
7708
|
+
console.error('Unable to write services to localStorage: ', e);
|
|
7709
|
+
}
|
|
7710
|
+
};
|
|
7711
|
+
|
|
7380
7712
|
/* *
|
|
7381
7713
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7382
7714
|
* you may not use this file except in compliance with the License.
|
|
@@ -7441,6 +7773,25 @@
|
|
|
7441
7773
|
}
|
|
7442
7774
|
});
|
|
7443
7775
|
}
|
|
7776
|
+
function addServiceToLocalStorageSaga(_a) {
|
|
7777
|
+
var _b;
|
|
7778
|
+
|
|
7779
|
+
var payload = _a.payload;
|
|
7780
|
+
var id = payload.id,
|
|
7781
|
+
isUserAddedService = payload.isUserAddedService,
|
|
7782
|
+
name = payload.name,
|
|
7783
|
+
service = payload.service;
|
|
7784
|
+
if (!isUserAddedService) return;
|
|
7785
|
+
var localStorageServices = getUserAddedServices();
|
|
7786
|
+
setUserAddedServices({
|
|
7787
|
+
byId: __assign(__assign({}, localStorageServices.byId), (_b = {}, _b[service] = {
|
|
7788
|
+
id: id,
|
|
7789
|
+
name: name,
|
|
7790
|
+
service: service
|
|
7791
|
+
}, _b)),
|
|
7792
|
+
allIds: __spreadArray([], __read(new Set(__spreadArray(__spreadArray([], __read(localStorageServices.allIds || [])), [service]))))
|
|
7793
|
+
});
|
|
7794
|
+
}
|
|
7444
7795
|
function rootSaga() {
|
|
7445
7796
|
return __generator(this, function (_a) {
|
|
7446
7797
|
switch (_a.label) {
|
|
@@ -7459,6 +7810,13 @@
|
|
|
7459
7810
|
case 2:
|
|
7460
7811
|
_a.sent();
|
|
7461
7812
|
|
|
7813
|
+
return [4
|
|
7814
|
+
/*yield*/
|
|
7815
|
+
, effects.takeEvery(MAP_SERVICES_SET_LAYERS, addServiceToLocalStorageSaga)];
|
|
7816
|
+
|
|
7817
|
+
case 3:
|
|
7818
|
+
_a.sent();
|
|
7819
|
+
|
|
7462
7820
|
return [2
|
|
7463
7821
|
/*return*/
|
|
7464
7822
|
];
|
|
@@ -8255,7 +8613,7 @@
|
|
|
8255
8613
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8256
8614
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8257
8615
|
* */
|
|
8258
|
-
var useStyles$
|
|
8616
|
+
var useStyles$w = makeStyles__default["default"]({
|
|
8259
8617
|
buttonDiv: {
|
|
8260
8618
|
position: 'relative'
|
|
8261
8619
|
},
|
|
@@ -8291,7 +8649,7 @@
|
|
|
8291
8649
|
handleClose = _a.handleClose,
|
|
8292
8650
|
_e = _a.layerType,
|
|
8293
8651
|
layerType = _e === void 0 ? LayerType.mapLayer : _e;
|
|
8294
|
-
var classes = useStyles$
|
|
8652
|
+
var classes = useStyles$w();
|
|
8295
8653
|
|
|
8296
8654
|
var _f = __read(React__namespace.useState(''), 2),
|
|
8297
8655
|
serviceURL = _f[0],
|
|
@@ -8455,7 +8813,7 @@
|
|
|
8455
8813
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8456
8814
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8457
8815
|
* */
|
|
8458
|
-
var styles = {
|
|
8816
|
+
var styles$1 = {
|
|
8459
8817
|
buttonDiv: {
|
|
8460
8818
|
position: 'relative'
|
|
8461
8819
|
},
|
|
@@ -8506,7 +8864,7 @@
|
|
|
8506
8864
|
title: tooltip
|
|
8507
8865
|
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
8508
8866
|
onClick: handleClose,
|
|
8509
|
-
sx: styles.button,
|
|
8867
|
+
sx: styles$1.button,
|
|
8510
8868
|
disableRipple: true,
|
|
8511
8869
|
"data-testid": "addLayersButton",
|
|
8512
8870
|
ref: ref,
|
|
@@ -8560,6 +8918,9 @@
|
|
|
8560
8918
|
column6: {
|
|
8561
8919
|
width: iconButtonSize * 2,
|
|
8562
8920
|
display: 'inline-flex'
|
|
8921
|
+
},
|
|
8922
|
+
columns35: {
|
|
8923
|
+
width: "calc((100% - " + iconButtonSize * totalButtons + "px) * 0.75)"
|
|
8563
8924
|
}
|
|
8564
8925
|
});
|
|
8565
8926
|
var LayerManagerColumnsSmall = makeStyles__default["default"]({
|
|
@@ -8581,6 +8942,9 @@
|
|
|
8581
8942
|
column6: {
|
|
8582
8943
|
width: iconButtonSize * 2,
|
|
8583
8944
|
display: 'inline-flex'
|
|
8945
|
+
},
|
|
8946
|
+
columns35: {
|
|
8947
|
+
display: 'none'
|
|
8584
8948
|
}
|
|
8585
8949
|
});
|
|
8586
8950
|
var LayerManagerWidth;
|
|
@@ -8665,7 +9029,7 @@
|
|
|
8665
9029
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8666
9030
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8667
9031
|
* */
|
|
8668
|
-
var useStyles$
|
|
9032
|
+
var useStyles$v = makeStyles__default["default"]({
|
|
8669
9033
|
row: {
|
|
8670
9034
|
height: '32px'
|
|
8671
9035
|
},
|
|
@@ -8689,7 +9053,7 @@
|
|
|
8689
9053
|
layerManagerWidth = _a.layerManagerWidth,
|
|
8690
9054
|
_e = _a.layerSelect,
|
|
8691
9055
|
layerSelect = _e === void 0 ? false : _e;
|
|
8692
|
-
var classes = useStyles$
|
|
9056
|
+
var classes = useStyles$v();
|
|
8693
9057
|
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
8694
9058
|
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8695
9059
|
container: true,
|
|
@@ -8766,18 +9130,18 @@
|
|
|
8766
9130
|
borderColor: 'transparent!important'
|
|
8767
9131
|
},
|
|
8768
9132
|
'&:hover .MuiSelect-select': {
|
|
8769
|
-
backgroundColor: theme.palette.geowebColors.
|
|
9133
|
+
backgroundColor: theme.palette.geowebColors.buttons.tool.mouseOver.fill
|
|
8770
9134
|
},
|
|
8771
9135
|
'&.Mui-focused .MuiSelect-select': {
|
|
8772
9136
|
outline: theme.palette.geowebColors.buttons.focusDefault.outline,
|
|
8773
|
-
backgroundColor: theme.palette.geowebColors.
|
|
9137
|
+
backgroundColor: theme.palette.geowebColors.buttons.tool.mouseOver.fill
|
|
8774
9138
|
},
|
|
8775
9139
|
'&:hover&.MuiButton-root': {
|
|
8776
|
-
backgroundColor: theme.palette.geowebColors.
|
|
9140
|
+
backgroundColor: theme.palette.geowebColors.buttons.tool.mouseOver.fill
|
|
8777
9141
|
},
|
|
8778
9142
|
'&:focus&.MuiButton-root': {
|
|
8779
9143
|
outline: theme.palette.geowebColors.buttons.focusDefault.outline,
|
|
8780
|
-
backgroundColor: theme.palette.geowebColors.
|
|
9144
|
+
backgroundColor: theme.palette.geowebColors.buttons.tool.mouseOver.fill
|
|
8781
9145
|
},
|
|
8782
9146
|
'& .MuiSvgIcon-root': {
|
|
8783
9147
|
transition: 'none',
|
|
@@ -8892,246 +9256,59 @@
|
|
|
8892
9256
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8893
9257
|
item: true,
|
|
8894
9258
|
xs: 12
|
|
8895
|
-
}, /*#__PURE__*/React__namespace.createElement(TooltipSelect, {
|
|
8896
|
-
disableUnderline: true,
|
|
8897
|
-
tooltip: "Select the dimension to adjust, currently it is set to " + activeDimName + " with value " + activeDim.currentValue,
|
|
8898
|
-
inputProps: {
|
|
8899
|
-
SelectDisplayProps: {
|
|
8900
|
-
'data-testid': 'selectDimension'
|
|
8901
|
-
}
|
|
8902
|
-
},
|
|
8903
|
-
className: classes.textContainer,
|
|
8904
|
-
value: activeDimName,
|
|
8905
|
-
list: dimNameList,
|
|
8906
|
-
currentIndex: dimNameCurrentIndex,
|
|
8907
|
-
onChange: onChangeActiveDimensionName,
|
|
8908
|
-
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
8909
|
-
return setActiveDimName(e.value);
|
|
8910
|
-
},
|
|
8911
|
-
style: {
|
|
8912
|
-
maxWidth: '50%'
|
|
8913
|
-
}
|
|
8914
|
-
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
8915
|
-
disabled: true
|
|
8916
|
-
}, "Select dimension"), layerDimensions.map(function (dimension) {
|
|
8917
|
-
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
8918
|
-
key: dimension.name,
|
|
8919
|
-
value: dimension.name
|
|
8920
|
-
}, dimension.name);
|
|
8921
|
-
})), /*#__PURE__*/React__namespace.createElement(TooltipSelect, {
|
|
8922
|
-
disableUnderline: true,
|
|
8923
|
-
tooltip: "Dimension " + activeDimName + " is set to " + activeDim.currentValue + " with units " + activeDim.units,
|
|
8924
|
-
inputProps: {
|
|
8925
|
-
SelectDisplayProps: {
|
|
8926
|
-
'data-testid': 'selectDimensionValue'
|
|
8927
|
-
}
|
|
8928
|
-
},
|
|
8929
|
-
className: classes.textContainer,
|
|
8930
|
-
value: activeDim && activeDim.currentValue,
|
|
8931
|
-
list: dimValueList,
|
|
8932
|
-
currentIndex: dimValueCurrentIndex,
|
|
8933
|
-
onChange: selectDimensionValue,
|
|
8934
|
-
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
8935
|
-
return onLayerChangeDimension(activeDim.name, e.value);
|
|
8936
|
-
},
|
|
8937
|
-
style: {
|
|
8938
|
-
maxWidth: '50%'
|
|
8939
|
-
}
|
|
8940
|
-
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
8941
|
-
disabled: true
|
|
8942
|
-
}, "Select dimension value. (", valuesToDisplay.length, " options)"), valuesToDisplay.map(function (dimValue) {
|
|
8943
|
-
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
8944
|
-
key: dimValue,
|
|
8945
|
-
value: dimValue
|
|
8946
|
-
}, "" + dimValue, /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, "\xA0", /*#__PURE__*/React__namespace.createElement("i", null, "" + activeDim.units)));
|
|
8947
|
-
}))));
|
|
8948
|
-
};
|
|
8949
|
-
|
|
8950
|
-
/* *
|
|
8951
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8952
|
-
* you may not use this file except in compliance with the License.
|
|
8953
|
-
* You may obtain a copy of the License at
|
|
8954
|
-
*
|
|
8955
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8956
|
-
*
|
|
8957
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
8958
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8959
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8960
|
-
* See the License for the specific language governing permissions and
|
|
8961
|
-
* limitations under the License.
|
|
8962
|
-
*
|
|
8963
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8964
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8965
|
-
* */
|
|
8966
|
-
var useStyles$y = makeStyles__default["default"](function (theme) {
|
|
8967
|
-
return createStyles__default["default"]({
|
|
8968
|
-
button: {
|
|
8969
|
-
height: 28,
|
|
8970
|
-
width: 28,
|
|
8971
|
-
borderRadius: 5,
|
|
8972
|
-
marginTop: 2,
|
|
8973
|
-
color: function color(_a) {
|
|
8974
|
-
var isActive = _a.isActive,
|
|
8975
|
-
isAccessible = _a.isAccessible,
|
|
8976
|
-
isEnabled = _a.isEnabled;
|
|
8977
|
-
|
|
8978
|
-
if (!isEnabled) {
|
|
8979
|
-
return theme.palette.geowebColors.buttons.flat.disabled.color;
|
|
8980
|
-
}
|
|
8981
|
-
|
|
8982
|
-
if (isAccessible) {
|
|
8983
|
-
return theme.palette.geowebColors.greys.accessible;
|
|
8984
|
-
}
|
|
8985
|
-
|
|
8986
|
-
if (isActive) {
|
|
8987
|
-
return theme.palette.common.white;
|
|
8988
|
-
}
|
|
8989
|
-
|
|
8990
|
-
return theme.palette.geowebColors.buttons.flat["default"].color;
|
|
8991
|
-
},
|
|
8992
|
-
backgroundColor: function backgroundColor(_a) {
|
|
8993
|
-
var isActive = _a.isActive;
|
|
8994
|
-
return isActive ? theme.palette.geowebColors.buttons.primary.active.fill : 'inherit';
|
|
8995
|
-
},
|
|
8996
|
-
'&:focus': {
|
|
8997
|
-
backgroundColor: function backgroundColor(_a) {
|
|
8998
|
-
var isActive = _a.isActive;
|
|
8999
|
-
return isActive ? theme.palette.geowebColors.buttons.primary.mouseOver.fill : theme.palette.geowebColors.buttons.flat.mouseOver.fill;
|
|
9000
|
-
},
|
|
9001
|
-
outline: theme.palette.geowebColors.buttons.focusDefault.outline,
|
|
9002
|
-
borderRadius: 0
|
|
9003
|
-
},
|
|
9004
|
-
'&:hover': {
|
|
9005
|
-
backgroundColor: function backgroundColor(_a) {
|
|
9006
|
-
var isActive = _a.isActive;
|
|
9007
|
-
return isActive ? theme.palette.geowebColors.buttons.primary.mouseOver.fill : theme.palette.geowebColors.buttons.flat.mouseOver.fill;
|
|
9008
|
-
}
|
|
9009
|
-
}
|
|
9010
|
-
},
|
|
9011
|
-
popper: {
|
|
9012
|
-
pointerEvents: 'none'
|
|
9013
|
-
}
|
|
9014
|
-
});
|
|
9015
|
-
});
|
|
9016
|
-
|
|
9017
|
-
var LayerManagerButton = function LayerManagerButton(_a) {
|
|
9018
|
-
var _b = _a.tooltipTitle,
|
|
9019
|
-
tooltipTitle = _b === void 0 ? '' : _b,
|
|
9020
|
-
_c = _a.onClick,
|
|
9021
|
-
onClick = _c === void 0 ? function () {} : _c,
|
|
9022
|
-
_d = _a.isActive,
|
|
9023
|
-
isActive = _d === void 0 ? false : _d,
|
|
9024
|
-
_e = _a.isEnabled,
|
|
9025
|
-
isEnabled = _e === void 0 ? true : _e,
|
|
9026
|
-
icon = _a.icon,
|
|
9027
|
-
testId = _a.testId,
|
|
9028
|
-
_f = _a.isAccessible,
|
|
9029
|
-
isAccessible = _f === void 0 ? false : _f,
|
|
9030
|
-
className = _a.className,
|
|
9031
|
-
props = __rest(_a, ["tooltipTitle", "onClick", "isActive", "isEnabled", "icon", "testId", "isAccessible", "className"]);
|
|
9032
|
-
|
|
9033
|
-
var classes = useStyles$y({
|
|
9034
|
-
isActive: isActive,
|
|
9035
|
-
isEnabled: isEnabled,
|
|
9036
|
-
isAccessible: isAccessible
|
|
9037
|
-
});
|
|
9038
|
-
|
|
9039
|
-
var handleClick = function handleClick(event) {
|
|
9040
|
-
onClick(event);
|
|
9041
|
-
};
|
|
9042
|
-
|
|
9043
|
-
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
9044
|
-
title: tooltipTitle,
|
|
9045
|
-
placement: "top",
|
|
9046
|
-
classes: {
|
|
9047
|
-
popper: classes.popper
|
|
9048
|
-
}
|
|
9049
|
-
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, __assign({
|
|
9050
|
-
size: "small",
|
|
9051
|
-
onClick: handleClick,
|
|
9052
|
-
"data-testid": testId,
|
|
9053
|
-
className: classes.button + " " + className,
|
|
9054
|
-
disableFocusRipple: true
|
|
9055
|
-
}, props), icon));
|
|
9056
|
-
};
|
|
9057
|
-
|
|
9058
|
-
/* *
|
|
9059
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9060
|
-
* you may not use this file except in compliance with the License.
|
|
9061
|
-
* You may obtain a copy of the License at
|
|
9062
|
-
*
|
|
9063
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9064
|
-
*
|
|
9065
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
9066
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9067
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9068
|
-
* See the License for the specific language governing permissions and
|
|
9069
|
-
* limitations under the License.
|
|
9070
|
-
*
|
|
9071
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9072
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9073
|
-
* */
|
|
9074
|
-
var useStyles$x = makeStyles__default["default"](function (theme) {
|
|
9075
|
-
return createStyles__default["default"]({
|
|
9076
|
-
checkbox: {
|
|
9077
|
-
color: 'inherit',
|
|
9078
|
-
padding: 4,
|
|
9079
|
-
borderRadius: 5,
|
|
9080
|
-
'&.Mui-focusVisible': {
|
|
9081
|
-
backgroundColor: theme.palette.geowebColors.layerManager.tableRowMouseover.rgba
|
|
9082
|
-
},
|
|
9083
|
-
'&:hover': {
|
|
9084
|
-
backgroundColor: 'transparent!important'
|
|
9085
|
-
},
|
|
9086
|
-
'&.Mui-checked': {
|
|
9087
|
-
color: 'inherit'
|
|
9259
|
+
}, /*#__PURE__*/React__namespace.createElement(TooltipSelect, {
|
|
9260
|
+
disableUnderline: true,
|
|
9261
|
+
tooltip: "Select the dimension to adjust, currently it is set to " + activeDimName + " with value " + activeDim.currentValue,
|
|
9262
|
+
inputProps: {
|
|
9263
|
+
SelectDisplayProps: {
|
|
9264
|
+
'data-testid': 'selectDimension'
|
|
9088
9265
|
}
|
|
9266
|
+
},
|
|
9267
|
+
className: classes.textContainer,
|
|
9268
|
+
value: activeDimName,
|
|
9269
|
+
list: dimNameList,
|
|
9270
|
+
currentIndex: dimNameCurrentIndex,
|
|
9271
|
+
onChange: onChangeActiveDimensionName,
|
|
9272
|
+
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
9273
|
+
return setActiveDimName(e.value);
|
|
9274
|
+
},
|
|
9275
|
+
style: {
|
|
9276
|
+
maxWidth: '50%'
|
|
9089
9277
|
}
|
|
9090
|
-
}
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9278
|
+
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9279
|
+
disabled: true
|
|
9280
|
+
}, "Dimension"), layerDimensions.map(function (dimension) {
|
|
9281
|
+
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9282
|
+
key: dimension.name,
|
|
9283
|
+
value: dimension.name
|
|
9284
|
+
}, dimension.name);
|
|
9285
|
+
})), /*#__PURE__*/React__namespace.createElement(TooltipSelect, {
|
|
9286
|
+
disableUnderline: true,
|
|
9287
|
+
tooltip: "Dimension " + activeDimName + " is set to " + activeDim.currentValue + " with units " + activeDim.units,
|
|
9288
|
+
inputProps: {
|
|
9289
|
+
SelectDisplayProps: {
|
|
9290
|
+
'data-testid': 'selectDimensionValue'
|
|
9291
|
+
}
|
|
9292
|
+
},
|
|
9293
|
+
className: classes.textContainer,
|
|
9294
|
+
value: activeDim && activeDim.currentValue,
|
|
9295
|
+
list: dimValueList,
|
|
9296
|
+
currentIndex: dimValueCurrentIndex,
|
|
9297
|
+
onChange: selectDimensionValue,
|
|
9298
|
+
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
9299
|
+
return onLayerChangeDimension(activeDim.name, e.value);
|
|
9300
|
+
},
|
|
9111
9301
|
style: {
|
|
9112
|
-
|
|
9302
|
+
maxWidth: '50%'
|
|
9113
9303
|
}
|
|
9114
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
tooltipTitle: title,
|
|
9123
|
-
onClick: onClick,
|
|
9124
|
-
icon: /*#__PURE__*/React__namespace.createElement(material.Checkbox, {
|
|
9125
|
-
className: classes.checkbox,
|
|
9126
|
-
icon: visibilityOffIcon,
|
|
9127
|
-
checkedIcon: visibilityIcon,
|
|
9128
|
-
checked: isEnabled,
|
|
9129
|
-
disableFocusRipple: true,
|
|
9130
|
-
tabIndex: -1
|
|
9131
|
-
}),
|
|
9132
|
-
testId: "enableLayer",
|
|
9133
|
-
isEnabled: isEnabled
|
|
9134
|
-
});
|
|
9304
|
+
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9305
|
+
disabled: true
|
|
9306
|
+
}, "Dimension value (", valuesToDisplay.length, " options)"), valuesToDisplay.map(function (dimValue) {
|
|
9307
|
+
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9308
|
+
key: dimValue,
|
|
9309
|
+
value: dimValue
|
|
9310
|
+
}, "" + dimValue, /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, "\xA0", /*#__PURE__*/React__namespace.createElement("i", null, "" + activeDim.units)));
|
|
9311
|
+
}))));
|
|
9135
9312
|
};
|
|
9136
9313
|
|
|
9137
9314
|
/* *
|
|
@@ -9150,7 +9327,7 @@
|
|
|
9150
9327
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9151
9328
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9152
9329
|
* */
|
|
9153
|
-
var useStyles$
|
|
9330
|
+
var useStyles$u = makeStyles__default["default"](function (theme) {
|
|
9154
9331
|
return createStyles__default["default"]({
|
|
9155
9332
|
dropdownEmpty: {
|
|
9156
9333
|
paddingLeft: 8,
|
|
@@ -9200,7 +9377,7 @@
|
|
|
9200
9377
|
layers = _b === void 0 ? [] : _b,
|
|
9201
9378
|
_c = _a.isEnabled,
|
|
9202
9379
|
isEnabled = _c === void 0 ? true : _c;
|
|
9203
|
-
var classes = useStyles$
|
|
9380
|
+
var classes = useStyles$u();
|
|
9204
9381
|
var containerClass = useTooltipContainerStyles(isEnabled);
|
|
9205
9382
|
|
|
9206
9383
|
if (!layers || !layers.length) {
|
|
@@ -9246,7 +9423,7 @@
|
|
|
9246
9423
|
requiresCtrlToChange: true
|
|
9247
9424
|
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9248
9425
|
disabled: true
|
|
9249
|
-
}, "
|
|
9426
|
+
}, "Layer"), extendedLayers.map(function (layerFromServiceLayers) {
|
|
9250
9427
|
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9251
9428
|
key: layerFromServiceLayers.name,
|
|
9252
9429
|
value: layerFromServiceLayers.name,
|
|
@@ -9271,7 +9448,7 @@
|
|
|
9271
9448
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9272
9449
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9273
9450
|
* */
|
|
9274
|
-
var useStyles$
|
|
9451
|
+
var useStyles$t = makeStyles__default["default"](function (theme) {
|
|
9275
9452
|
return {
|
|
9276
9453
|
opacityDiv: {
|
|
9277
9454
|
height: 'calc(100% - 5px)',
|
|
@@ -9294,7 +9471,7 @@
|
|
|
9294
9471
|
position: 'fixed',
|
|
9295
9472
|
top: '-5px',
|
|
9296
9473
|
boxSizing: 'initial',
|
|
9297
|
-
zIndex:
|
|
9474
|
+
zIndex: 2,
|
|
9298
9475
|
boxShadow: theme.shadows[8]
|
|
9299
9476
|
}
|
|
9300
9477
|
};
|
|
@@ -9332,7 +9509,7 @@
|
|
|
9332
9509
|
onLayerChangeOpacity = _a.onLayerChangeOpacity,
|
|
9333
9510
|
_b = _a.isEnabled,
|
|
9334
9511
|
isEnabled = _b === void 0 ? true : _b;
|
|
9335
|
-
var classes = useStyles$
|
|
9512
|
+
var classes = useStyles$t();
|
|
9336
9513
|
var sliderClasses = shared.sliderStyles();
|
|
9337
9514
|
var containerClass = useTooltipContainerStyles(isEnabled);
|
|
9338
9515
|
|
|
@@ -9534,7 +9711,7 @@
|
|
|
9534
9711
|
requiresCtrlToChange: true
|
|
9535
9712
|
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9536
9713
|
disabled: true
|
|
9537
|
-
}, "
|
|
9714
|
+
}, "Style"), styles.map(function (styleFromlayer) {
|
|
9538
9715
|
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9539
9716
|
key: styleFromlayer.name,
|
|
9540
9717
|
value: styleFromlayer.name
|
|
@@ -9558,59 +9735,22 @@
|
|
|
9558
9735
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9559
9736
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9560
9737
|
* */
|
|
9561
|
-
var useStyles$
|
|
9562
|
-
return createStyles__default["default"]({
|
|
9563
|
-
icon: {
|
|
9564
|
-
width: 20,
|
|
9565
|
-
height: 20
|
|
9566
|
-
}
|
|
9567
|
-
});
|
|
9568
|
-
});
|
|
9569
|
-
|
|
9570
|
-
var DeleteButton = function DeleteButton(_a) {
|
|
9571
|
-
var tooltipTitle = _a.tooltipTitle,
|
|
9572
|
-
onClickDelete = _a.onClickDelete,
|
|
9573
|
-
_b = _a.isEnabled,
|
|
9574
|
-
isEnabled = _b === void 0 ? true : _b;
|
|
9575
|
-
var classes = useStyles$u();
|
|
9576
|
-
return /*#__PURE__*/React__namespace.createElement(LayerManagerButton, {
|
|
9577
|
-
tooltipTitle: tooltipTitle,
|
|
9578
|
-
onClick: onClickDelete,
|
|
9579
|
-
icon: /*#__PURE__*/React__namespace.createElement(iconsMaterial.Delete, {
|
|
9580
|
-
className: classes.icon
|
|
9581
|
-
}),
|
|
9582
|
-
testId: "deleteButton",
|
|
9583
|
-
isEnabled: isEnabled
|
|
9584
|
-
});
|
|
9585
|
-
};
|
|
9586
|
-
|
|
9587
|
-
/* *
|
|
9588
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9589
|
-
* you may not use this file except in compliance with the License.
|
|
9590
|
-
* You may obtain a copy of the License at
|
|
9591
|
-
*
|
|
9592
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9593
|
-
*
|
|
9594
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
9595
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9596
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9597
|
-
* See the License for the specific language governing permissions and
|
|
9598
|
-
* limitations under the License.
|
|
9599
|
-
*
|
|
9600
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9601
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9602
|
-
* */
|
|
9603
|
-
var useStyles$t = makeStyles__default["default"](function (theme) {
|
|
9738
|
+
var useStyles$s = makeStyles__default["default"](function (theme) {
|
|
9604
9739
|
return createStyles__default["default"]({
|
|
9605
9740
|
svgIcon: {
|
|
9606
9741
|
fill: function fill(_a) {
|
|
9607
|
-
var isActive = _a.isActive
|
|
9742
|
+
var isActive = _a.isActive,
|
|
9743
|
+
isEnabled = _a.isEnabled;
|
|
9608
9744
|
|
|
9609
9745
|
if (isActive) {
|
|
9610
9746
|
return theme.palette.common.white;
|
|
9611
9747
|
}
|
|
9612
9748
|
|
|
9613
|
-
|
|
9749
|
+
if (isEnabled) {
|
|
9750
|
+
return theme.palette.geowebColors.buttons.flat["default"].color;
|
|
9751
|
+
}
|
|
9752
|
+
|
|
9753
|
+
return theme.palette.geowebColors.buttons.flat.disabled.color;
|
|
9614
9754
|
}
|
|
9615
9755
|
}
|
|
9616
9756
|
});
|
|
@@ -9624,7 +9764,7 @@
|
|
|
9624
9764
|
isActive = _c === void 0 ? false : _c,
|
|
9625
9765
|
_d = _a.isEnabled,
|
|
9626
9766
|
isEnabled = _d === void 0 ? true : _d;
|
|
9627
|
-
var classes = useStyles$
|
|
9767
|
+
var classes = useStyles$s({
|
|
9628
9768
|
isActive: isActive,
|
|
9629
9769
|
isEnabled: isEnabled
|
|
9630
9770
|
});
|
|
@@ -9652,7 +9792,7 @@
|
|
|
9652
9792
|
}))));
|
|
9653
9793
|
};
|
|
9654
9794
|
|
|
9655
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
9795
|
+
return /*#__PURE__*/React__namespace.createElement(shared.ManagerButton, {
|
|
9656
9796
|
tooltipTitle: tooltipTitle,
|
|
9657
9797
|
onClick: onClickActivate,
|
|
9658
9798
|
icon: /*#__PURE__*/React__namespace.createElement(Icon, null),
|
|
@@ -9677,7 +9817,7 @@
|
|
|
9677
9817
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9678
9818
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9679
9819
|
* */
|
|
9680
|
-
var useStyles$
|
|
9820
|
+
var useStyles$r = makeStyles__default["default"](function (theme) {
|
|
9681
9821
|
return createStyles__default["default"]({
|
|
9682
9822
|
row: {
|
|
9683
9823
|
background: function background(isEnabled) {
|
|
@@ -9711,6 +9851,8 @@
|
|
|
9711
9851
|
} : _b,
|
|
9712
9852
|
_c = _a.isEnabled,
|
|
9713
9853
|
isEnabled = _c === void 0 ? true : _c,
|
|
9854
|
+
_d = _a.isLayerMissing,
|
|
9855
|
+
isLayerMissing = _d === void 0 ? false : _d,
|
|
9714
9856
|
onLayerEnable = _a.onLayerEnable,
|
|
9715
9857
|
onLayerChangeName = _a.onLayerChangeName,
|
|
9716
9858
|
onLayerChangeStyle = _a.onLayerChangeStyle,
|
|
@@ -9729,7 +9871,7 @@
|
|
|
9729
9871
|
layerActiveLayout = _a.layerActiveLayout,
|
|
9730
9872
|
layerManagerWidth = _a.layerManagerWidth,
|
|
9731
9873
|
dragHandle = _a.dragHandle;
|
|
9732
|
-
var classes = useStyles$
|
|
9874
|
+
var classes = useStyles$r(isEnabled);
|
|
9733
9875
|
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
9734
9876
|
|
|
9735
9877
|
var onClickRow = function onClickRow() {
|
|
@@ -9744,7 +9886,7 @@
|
|
|
9744
9886
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9745
9887
|
item: true,
|
|
9746
9888
|
className: columnSizes.column1
|
|
9747
|
-
}, dragHandle, layerEnableLayout || /*#__PURE__*/React__default["default"].createElement(
|
|
9889
|
+
}, dragHandle, layerEnableLayout || /*#__PURE__*/React__default["default"].createElement(shared.EnableButton, {
|
|
9748
9890
|
isEnabled: layer.enabled,
|
|
9749
9891
|
title: layer.name,
|
|
9750
9892
|
onChangeEnableLayer: function onChangeEnableLayer() {
|
|
@@ -9767,7 +9909,13 @@
|
|
|
9767
9909
|
name: name
|
|
9768
9910
|
});
|
|
9769
9911
|
}
|
|
9770
|
-
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9912
|
+
})), isLayerMissing ? /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9913
|
+
item: true,
|
|
9914
|
+
className: "" + columnSizes.columns35
|
|
9915
|
+
}, /*#__PURE__*/React__default["default"].createElement(shared.AlertBanner, {
|
|
9916
|
+
title: "This layer could not be loaded: does not exist on the server.",
|
|
9917
|
+
isCompact: true
|
|
9918
|
+
})) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9771
9919
|
item: true,
|
|
9772
9920
|
className: "" + columnSizes.column3
|
|
9773
9921
|
}, layerStylesLayout || /*#__PURE__*/React__default["default"].createElement(RenderStyles, {
|
|
@@ -9810,10 +9958,10 @@
|
|
|
9810
9958
|
dimension: dimension
|
|
9811
9959
|
});
|
|
9812
9960
|
}
|
|
9813
|
-
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9961
|
+
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9814
9962
|
item: true,
|
|
9815
9963
|
className: columnSizes.column6
|
|
9816
|
-
}, layerDeleteLayout || /*#__PURE__*/React__default["default"].createElement(
|
|
9964
|
+
}, layerDeleteLayout || /*#__PURE__*/React__default["default"].createElement(shared.ManagerDeleteButton, {
|
|
9817
9965
|
tooltipTitle: "Remove layer",
|
|
9818
9966
|
onClickDelete: function onClickDelete() {
|
|
9819
9967
|
onLayerDelete({
|
|
@@ -9863,7 +10011,7 @@
|
|
|
9863
10011
|
var isLayerEnabled = reactRedux.useSelector(function (store) {
|
|
9864
10012
|
return getLayerEnabled(store, layerId);
|
|
9865
10013
|
});
|
|
9866
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
10014
|
+
return /*#__PURE__*/React__namespace.createElement(shared.ManagerDeleteButton, {
|
|
9867
10015
|
tooltipTitle: "Remove layer",
|
|
9868
10016
|
onClickDelete: function onClickDelete() {
|
|
9869
10017
|
layerDelete$1({
|
|
@@ -9907,7 +10055,7 @@
|
|
|
9907
10055
|
enabled: enabled
|
|
9908
10056
|
}));
|
|
9909
10057
|
}, [dispatch]);
|
|
9910
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
10058
|
+
return /*#__PURE__*/React__namespace.createElement(shared.EnableButton, {
|
|
9911
10059
|
isEnabled: isEnabled,
|
|
9912
10060
|
title: "Toggle this layer's visibility",
|
|
9913
10061
|
onChangeEnableLayer: function onChangeEnableLayer(enable) {
|
|
@@ -10251,10 +10399,23 @@
|
|
|
10251
10399
|
var isEnabled = reactRedux.useSelector(function (store) {
|
|
10252
10400
|
return getLayerEnabled(store, layerId);
|
|
10253
10401
|
});
|
|
10402
|
+
var layerName = reactRedux.useSelector(function (store) {
|
|
10403
|
+
return getLayerName(store, layerId);
|
|
10404
|
+
});
|
|
10405
|
+
var layerService = reactRedux.useSelector(function (store) {
|
|
10406
|
+
return getLayerService(store, layerId);
|
|
10407
|
+
});
|
|
10408
|
+
var layers = reactRedux.useSelector(function (store) {
|
|
10409
|
+
return getLayersFromService$1(store, layerService);
|
|
10410
|
+
});
|
|
10411
|
+
var isLayerMissing = layers && layers.length > 0 && !layers.some(function (l) {
|
|
10412
|
+
return l.name === layerName;
|
|
10413
|
+
});
|
|
10254
10414
|
return /*#__PURE__*/React__namespace.createElement(LayerRow, {
|
|
10255
10415
|
isEnabled: isEnabled,
|
|
10256
10416
|
mapId: mapId,
|
|
10257
10417
|
layerId: layerId,
|
|
10418
|
+
isLayerMissing: isLayerMissing,
|
|
10258
10419
|
layerEnableLayout: /*#__PURE__*/React__namespace.createElement(EnableLayerConnect, {
|
|
10259
10420
|
layerId: layerId
|
|
10260
10421
|
}),
|
|
@@ -10314,7 +10475,7 @@
|
|
|
10314
10475
|
_d = _a.hideTooltip,
|
|
10315
10476
|
hideTooltip = _d === void 0 ? false : _d;
|
|
10316
10477
|
var tooltipTitle = hideTooltip ? '' : TOOLTIP_TITLE;
|
|
10317
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
10478
|
+
return /*#__PURE__*/React__default["default"].createElement(shared.ManagerButton, {
|
|
10318
10479
|
tooltipTitle: tooltipTitle,
|
|
10319
10480
|
icon: /*#__PURE__*/React__default["default"].createElement(iconsMaterial.DragIndicator, null),
|
|
10320
10481
|
testId: "dragHandle" + (index !== undefined ? "-" + index : ''),
|
|
@@ -10352,7 +10513,7 @@
|
|
|
10352
10513
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10353
10514
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10354
10515
|
* */
|
|
10355
|
-
var useStyles$
|
|
10516
|
+
var useStyles$q = makeStyles__default["default"](function () {
|
|
10356
10517
|
return {
|
|
10357
10518
|
layerRows: {
|
|
10358
10519
|
width: '100%',
|
|
@@ -10418,7 +10579,7 @@
|
|
|
10418
10579
|
|
|
10419
10580
|
var isSorting = activeDragIndex !== null;
|
|
10420
10581
|
var isDragDisabled = layerIds.length === 1;
|
|
10421
|
-
var classes = useStyles$
|
|
10582
|
+
var classes = useStyles$q(isSorting);
|
|
10422
10583
|
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10423
10584
|
container: true,
|
|
10424
10585
|
item: true,
|
|
@@ -10516,7 +10677,7 @@
|
|
|
10516
10677
|
}
|
|
10517
10678
|
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
10518
10679
|
disabled: true
|
|
10519
|
-
}, "
|
|
10680
|
+
}, "Base layer"), availableBaseLayers.map(function (baseLayer) {
|
|
10520
10681
|
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
10521
10682
|
key: baseLayer.id,
|
|
10522
10683
|
value: baseLayer.id
|
|
@@ -10628,7 +10789,7 @@
|
|
|
10628
10789
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10629
10790
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10630
10791
|
* */
|
|
10631
|
-
var useStyles$
|
|
10792
|
+
var useStyles$p = makeStyles__default["default"]({
|
|
10632
10793
|
layerRow: {
|
|
10633
10794
|
width: '100%',
|
|
10634
10795
|
height: '36px'
|
|
@@ -10651,7 +10812,7 @@
|
|
|
10651
10812
|
layerManagerWidth = _a.layerManagerWidth,
|
|
10652
10813
|
_d = _a.tooltip,
|
|
10653
10814
|
tooltip = _d === void 0 ? '' : _d;
|
|
10654
|
-
var classes = useStyles$
|
|
10815
|
+
var classes = useStyles$p();
|
|
10655
10816
|
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
10656
10817
|
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10657
10818
|
container: true,
|
|
@@ -10696,7 +10857,7 @@
|
|
|
10696
10857
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10697
10858
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10698
10859
|
* */
|
|
10699
|
-
var useStyles$
|
|
10860
|
+
var useStyles$o = makeStyles__default["default"]({
|
|
10700
10861
|
layerRowContainer: {
|
|
10701
10862
|
position: 'relative',
|
|
10702
10863
|
width: '100%',
|
|
@@ -10731,7 +10892,7 @@
|
|
|
10731
10892
|
layerSelect = _e === void 0 ? false : _e,
|
|
10732
10893
|
_f = _a.showAddLayersTooltip,
|
|
10733
10894
|
showAddLayersTooltip = _f === void 0 ? true : _f;
|
|
10734
|
-
var classes = useStyles$
|
|
10895
|
+
var classes = useStyles$o();
|
|
10735
10896
|
|
|
10736
10897
|
var _g = __read(React__namespace.useState(LayerManagerWidth.lg), 2),
|
|
10737
10898
|
layerManagerWidth = _g[0],
|
|
@@ -11152,7 +11313,8 @@
|
|
|
11152
11313
|
id: serviceUrl,
|
|
11153
11314
|
name: serviceName,
|
|
11154
11315
|
service: serviceUrl,
|
|
11155
|
-
layers: serviceLayers
|
|
11316
|
+
layers: serviceLayers,
|
|
11317
|
+
isUserAddedService: true
|
|
11156
11318
|
});
|
|
11157
11319
|
setIsLoading(false);
|
|
11158
11320
|
closePopupAndResetState();
|
|
@@ -11667,7 +11829,7 @@
|
|
|
11667
11829
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11668
11830
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11669
11831
|
* */
|
|
11670
|
-
var useStyles$
|
|
11832
|
+
var useStyles$n = makeStyles__default["default"](function (theme) {
|
|
11671
11833
|
return {
|
|
11672
11834
|
layerRow: {
|
|
11673
11835
|
background: theme.palette.geowebColors.cards.cardContainer,
|
|
@@ -11725,7 +11887,7 @@
|
|
|
11725
11887
|
mapLayers = _a.mapLayers,
|
|
11726
11888
|
keywordIds = _a.keywordIds,
|
|
11727
11889
|
allKeywordsActive = _a.allKeywordsActive;
|
|
11728
|
-
var classes = useStyles$
|
|
11890
|
+
var classes = useStyles$n();
|
|
11729
11891
|
|
|
11730
11892
|
var _b = __read(React__namespace.useState(0), 2),
|
|
11731
11893
|
numberOfLayers = _b[0],
|
|
@@ -11995,7 +12157,7 @@
|
|
|
11995
12157
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11996
12158
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11997
12159
|
* */
|
|
11998
|
-
var useStyles$
|
|
12160
|
+
var useStyles$m = makeStyles__default["default"](function (theme) {
|
|
11999
12161
|
return createStyles__default["default"]({
|
|
12000
12162
|
serviceChips: {
|
|
12001
12163
|
width: '100%',
|
|
@@ -12019,7 +12181,7 @@
|
|
|
12019
12181
|
fontSize: '0.875rem'
|
|
12020
12182
|
},
|
|
12021
12183
|
scrollArrowLeft: {
|
|
12022
|
-
width: '
|
|
12184
|
+
width: '100px',
|
|
12023
12185
|
marginBottom: '-12px',
|
|
12024
12186
|
height: '34px',
|
|
12025
12187
|
backgroundImage: "linear-gradient(to left, rgba(0, 0, 0, 0), " + theme.palette.geowebColors.background.surfaceApp + " 51%)",
|
|
@@ -12027,7 +12189,10 @@
|
|
|
12027
12189
|
marginRight: '-120px',
|
|
12028
12190
|
"float": 'left',
|
|
12029
12191
|
zIndex: 1,
|
|
12030
|
-
position: 'relative'
|
|
12192
|
+
position: 'relative',
|
|
12193
|
+
'&:hover': {
|
|
12194
|
+
color: theme.palette.geowebColors.buttons.tertiary.activeMouseOver.color
|
|
12195
|
+
}
|
|
12031
12196
|
},
|
|
12032
12197
|
serviceList: {
|
|
12033
12198
|
height: '32px',
|
|
@@ -12036,13 +12201,16 @@
|
|
|
12036
12201
|
overflow: 'hidden'
|
|
12037
12202
|
},
|
|
12038
12203
|
scrollArrowRight: {
|
|
12039
|
-
width: '
|
|
12204
|
+
width: '100px',
|
|
12040
12205
|
marginBottom: '-12px',
|
|
12041
12206
|
height: '34px',
|
|
12042
12207
|
backgroundImage: "linear-gradient(to right, rgba(0, 0, 0, 0), " + theme.palette.geowebColors.background.surfaceApp + " 51%)",
|
|
12043
12208
|
right: '0px',
|
|
12044
12209
|
position: 'fixed',
|
|
12045
|
-
cursor: 'pointer'
|
|
12210
|
+
cursor: 'pointer',
|
|
12211
|
+
'&:hover': {
|
|
12212
|
+
color: theme.palette.geowebColors.buttons.tertiary.activeMouseOver.color
|
|
12213
|
+
}
|
|
12046
12214
|
}
|
|
12047
12215
|
});
|
|
12048
12216
|
});
|
|
@@ -12067,7 +12235,7 @@
|
|
|
12067
12235
|
var ref = React__namespace.useRef(null);
|
|
12068
12236
|
var scrollSpeed = 5;
|
|
12069
12237
|
var maxWidthValue = ref && ref.current && ref.current.scrollWidth && ref.current.scrollWidth >= layerSelectWidth - margin && ref.current.scrollWidth || layerSelectWidth - 50;
|
|
12070
|
-
var classes = useStyles$
|
|
12238
|
+
var classes = useStyles$m({
|
|
12071
12239
|
margin: margin,
|
|
12072
12240
|
maxWidthValue: maxWidthValue
|
|
12073
12241
|
});
|
|
@@ -12197,63 +12365,49 @@
|
|
|
12197
12365
|
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
12198
12366
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
12199
12367
|
* */
|
|
12200
|
-
var
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12210
|
-
|
|
12211
|
-
|
|
12212
|
-
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
|
|
12216
|
-
|
|
12217
|
-
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
|
|
12228
|
-
|
|
12229
|
-
|
|
12230
|
-
|
|
12231
|
-
|
|
12232
|
-
|
|
12233
|
-
|
|
12234
|
-
|
|
12235
|
-
|
|
12236
|
-
|
|
12237
|
-
paddingTop: '3px',
|
|
12238
|
-
fontSize: '12px',
|
|
12239
|
-
fontFamily: theme.typography.fontFamily,
|
|
12240
|
-
fontWeight: theme.typography.fontWeightRegular,
|
|
12241
|
-
textTransform: 'none',
|
|
12242
|
-
color: '#575f7a'
|
|
12243
|
-
},
|
|
12244
|
-
icon: {
|
|
12245
|
-
width: '24px',
|
|
12246
|
-
height: '24px'
|
|
12247
|
-
}
|
|
12248
|
-
});
|
|
12249
|
-
});
|
|
12368
|
+
var styles = {
|
|
12369
|
+
servicesContainer: {
|
|
12370
|
+
width: '300px',
|
|
12371
|
+
maxHeight: '380px',
|
|
12372
|
+
top: '140px',
|
|
12373
|
+
backgroundColor: 'geowebColors.background.surface',
|
|
12374
|
+
boxShadow: 6,
|
|
12375
|
+
overflow: 'auto'
|
|
12376
|
+
},
|
|
12377
|
+
header: {
|
|
12378
|
+
position: 'sticky',
|
|
12379
|
+
top: 0,
|
|
12380
|
+
fontSize: 'default',
|
|
12381
|
+
padding: '12px',
|
|
12382
|
+
backgroundColor: 'geowebColors.background.surface',
|
|
12383
|
+
zIndex: 100
|
|
12384
|
+
},
|
|
12385
|
+
footer: {
|
|
12386
|
+
display: 'flex',
|
|
12387
|
+
justifyContent: 'center',
|
|
12388
|
+
alignItems: 'center',
|
|
12389
|
+
position: 'sticky',
|
|
12390
|
+
bottom: 0,
|
|
12391
|
+
backgroundColor: 'geowebColors.background.surface',
|
|
12392
|
+
zIndex: 100
|
|
12393
|
+
},
|
|
12394
|
+
button: {
|
|
12395
|
+
margin: '16px',
|
|
12396
|
+
width: '80%',
|
|
12397
|
+
fontSize: '12px',
|
|
12398
|
+
textTransform: 'none'
|
|
12399
|
+
},
|
|
12400
|
+
icon: {
|
|
12401
|
+
width: '24px',
|
|
12402
|
+
height: '24px'
|
|
12403
|
+
}
|
|
12404
|
+
};
|
|
12250
12405
|
|
|
12251
12406
|
var ServiceOptionsDialog = function ServiceOptionsDialog(_a) {
|
|
12252
12407
|
var services = _a.services,
|
|
12253
12408
|
mapStoreRemoveService = _a.mapStoreRemoveService,
|
|
12254
12409
|
_b = _a.layers,
|
|
12255
12410
|
layers = _b === void 0 ? [] : _b;
|
|
12256
|
-
var classes = useStyles$m();
|
|
12257
12411
|
|
|
12258
12412
|
var _c = __read(React__namespace.useState(false), 2),
|
|
12259
12413
|
addServiceisOpen = _c[0],
|
|
@@ -12276,11 +12430,11 @@
|
|
|
12276
12430
|
};
|
|
12277
12431
|
|
|
12278
12432
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
12279
|
-
|
|
12433
|
+
sx: styles.servicesContainer,
|
|
12280
12434
|
"data-testid": "ServiceDialog"
|
|
12281
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
12282
|
-
|
|
12283
|
-
}, "
|
|
12435
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
12436
|
+
sx: styles.header
|
|
12437
|
+
}, "Services"), /*#__PURE__*/React__namespace.createElement(material.List, {
|
|
12284
12438
|
disablePadding: true
|
|
12285
12439
|
}, services.map(function (service) {
|
|
12286
12440
|
return /*#__PURE__*/React__namespace.createElement(material.ListItem, {
|
|
@@ -12307,7 +12461,6 @@
|
|
|
12307
12461
|
size: "large"
|
|
12308
12462
|
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("g", null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
12309
12463
|
d: "m8.332 17.09-.005.001-2.652.604.956-2.542.001-.001.001-.001.857-.744 1.69 1.945-.848.738zm.71.815L20.932 7.577 17.823 4 5.933 14.329l-.01.008.005.005L4.173 19l4.857-1.09-.004-.02.019.02-.002-.005z",
|
|
12310
|
-
fill: classes.iconFill,
|
|
12311
12464
|
fillRule: "evenodd"
|
|
12312
12465
|
})))))), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
12313
12466
|
title: "Delete Service"
|
|
@@ -12320,18 +12473,17 @@
|
|
|
12320
12473
|
"data-testid": "removeServiceButton"
|
|
12321
12474
|
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("g", null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
12322
12475
|
d: "M17.504 8.228c.588 0 1.027.48.973 1.066l-.876 9.64A1.197 1.197 0 0 1 16.434 20H8.41c-.59 0-1.115-.48-1.167-1.066l-.877-9.64a.962.962 0 0 1 .973-1.066zm-2.115 1.228a.82.82 0 0 0-.819.82v7.674a.818.818 0 0 0 1.638 0v-7.675a.819.819 0 0 0-.819-.819zm-2.968 0a.819.819 0 0 0-.819.82v7.674a.818.818 0 1 0 1.638 0v-7.675a.82.82 0 0 0-.82-.819zm-2.968 0a.819.819 0 0 0-.818.82v7.674a.818.818 0 1 0 1.637 0v-7.675a.82.82 0 0 0-.82-.819zM13.432 4c.21 0 .404.168.436.376l.107.758 3.256-.01a1.606 1.606 0 0 1 1.61 1.6l.001.535-12.841.038L6 6.76a1.605 1.605 0 0 1 1.6-1.61l3.262-.008.103-.758a.454.454 0 0 1 .434-.38z",
|
|
12323
|
-
fill: classes.iconFill,
|
|
12324
12476
|
fillRule: "evenodd"
|
|
12325
12477
|
}))))))));
|
|
12326
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
12327
|
-
|
|
12478
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
12479
|
+
sx: styles.footer
|
|
12328
12480
|
}, /*#__PURE__*/React__namespace.createElement(material.Button, {
|
|
12329
12481
|
onClick: openAddService,
|
|
12330
12482
|
"data-testid": "openAddServiceButton",
|
|
12331
|
-
|
|
12483
|
+
sx: styles.button,
|
|
12332
12484
|
variant: "tertiary",
|
|
12333
12485
|
startIcon: /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
|
|
12334
|
-
|
|
12486
|
+
sx: styles.icon
|
|
12335
12487
|
}, /*#__PURE__*/React__namespace.createElement("g", null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
12336
12488
|
d: "M13.647 13.647h6.82a1.276 1.276 0 1 0 0-2.552h-6.82v-6.82a1.276 1.276 0 1 0-2.552 0v6.82h-6.82a1.276 1.276 0 1 0 0 2.552h6.82v6.82a1.274 1.274 0 0 0 1.276 1.275c.705 0 1.276-.571 1.276-1.276v-6.82z",
|
|
12337
12489
|
fillRule: "evenodd"
|
|
@@ -13034,7 +13186,8 @@
|
|
|
13034
13186
|
id: service.id,
|
|
13035
13187
|
name: service.name,
|
|
13036
13188
|
service: service.url,
|
|
13037
|
-
layers: layers
|
|
13189
|
+
layers: layers,
|
|
13190
|
+
isUserAddedService: false
|
|
13038
13191
|
});
|
|
13039
13192
|
}
|
|
13040
13193
|
})["catch"](function () {
|
|
@@ -15422,13 +15575,15 @@
|
|
|
15422
15575
|
}
|
|
15423
15576
|
};
|
|
15424
15577
|
|
|
15425
|
-
var drawBackground = function drawBackground(context, theme, visibleTimeStart, visibleTimeEnd, canvasWidth, height, scale) {
|
|
15578
|
+
var drawBackground = function drawBackground(context, theme, visibleTimeStart, visibleTimeEnd, animationStartPx, animationEndPx, canvasWidth, height, scale) {
|
|
15426
15579
|
var ctx = context;
|
|
15427
15580
|
var _a = theme.palette.geowebColors.timeSlider,
|
|
15428
15581
|
timelineTimelineSurface = _a.timelineTimelineSurface,
|
|
15429
15582
|
timelineNightTime = _a.timelineNightTime;
|
|
15430
15583
|
ctx.fillStyle = timelineTimelineSurface.fill;
|
|
15431
15584
|
ctx.fillRect(0, 0, canvasWidth, height);
|
|
15585
|
+
ctx.fillStyle = theme.palette.geowebColors.timeSlider.timelineSelectionBackground.rgba;
|
|
15586
|
+
ctx.fillRect(animationStartPx, 0, Math.max(animationEndPx - animationStartPx, 0), height);
|
|
15432
15587
|
var colorChangeUnit = getColorChangeTimestepUnit(scale);
|
|
15433
15588
|
|
|
15434
15589
|
var _b = __read(getCustomRoundedStartAndEnd(visibleTimeStart, visibleTimeEnd, colorChangeUnit), 2),
|
|
@@ -15522,7 +15677,7 @@
|
|
|
15522
15677
|
drawLeftSideDateText(ctx, theme, dateText, height);
|
|
15523
15678
|
};
|
|
15524
15679
|
|
|
15525
|
-
var renderTimeSliderLegend = function renderTimeSliderLegend(context, theme, canvasWidth, height, centerTime, secondsPerPx, dataScaleToSecondsPerPx, selectedTimeUnix, scale, currentTimeUnix) {
|
|
15680
|
+
var renderTimeSliderLegend = function renderTimeSliderLegend(context, theme, canvasWidth, height, centerTime, secondsPerPx, dataScaleToSecondsPerPx, selectedTimeUnix, scale, currentTimeUnix, animationStartTime, animationEndTime) {
|
|
15526
15681
|
var ctx = context;
|
|
15527
15682
|
|
|
15528
15683
|
var _a = __read([0, canvasWidth].map(function (px) {
|
|
@@ -15531,7 +15686,13 @@
|
|
|
15531
15686
|
visibleTimeStart = _a[0],
|
|
15532
15687
|
visibleTimeEnd = _a[1];
|
|
15533
15688
|
|
|
15534
|
-
|
|
15689
|
+
var _b = __read([animationStartTime, animationEndTime].map(function (time) {
|
|
15690
|
+
return timestampToPixel(time, centerTime, canvasWidth, secondsPerPx);
|
|
15691
|
+
}), 2),
|
|
15692
|
+
animationStartPx = _b[0],
|
|
15693
|
+
animationEndPx = _b[1];
|
|
15694
|
+
|
|
15695
|
+
drawBackground(ctx, theme, visibleTimeStart, visibleTimeEnd, animationStartPx, animationEndPx, canvasWidth, height, scale);
|
|
15535
15696
|
drawTimeScale(ctx, theme, visibleTimeStart, visibleTimeEnd, canvasWidth, height, scale, dataScaleToSecondsPerPx);
|
|
15536
15697
|
drawNeedle(ctx, theme, canvasWidth, height, visibleTimeStart, visibleTimeEnd, selectedTimeUnix);
|
|
15537
15698
|
drawCurrentTime(ctx, theme, canvasWidth, height, visibleTimeStart, visibleTimeEnd, currentTimeUnix);
|
|
@@ -15962,6 +16123,8 @@
|
|
|
15962
16123
|
currentTime = _a.currentTime,
|
|
15963
16124
|
dataStartTime = _a.dataStartTime,
|
|
15964
16125
|
dataEndTime = _a.dataEndTime,
|
|
16126
|
+
animationStartTime = _a.animationStartTime,
|
|
16127
|
+
animationEndTime = _a.animationEndTime,
|
|
15965
16128
|
isTimeSliderHoverOn = _a.isTimeSliderHoverOn,
|
|
15966
16129
|
timeStep = _a.timeStep,
|
|
15967
16130
|
onSetNewDate = _a.onSetNewDate,
|
|
@@ -15985,6 +16148,18 @@
|
|
|
15985
16148
|
isNewSelectionTimeRequested = _g[0],
|
|
15986
16149
|
setNewSelectionTimeRequested = _g[1];
|
|
15987
16150
|
|
|
16151
|
+
var _h = __read(React__namespace.useState(animationStartTime && moment__default["default"].utc(animationStartTime).unix()), 2),
|
|
16152
|
+
localAnimationStartTime = _h[0],
|
|
16153
|
+
setLocalAnimationStartTime = _h[1];
|
|
16154
|
+
|
|
16155
|
+
var _j = __read(React__namespace.useState(animationEndTime && moment__default["default"].utc(animationEndTime).unix()), 2),
|
|
16156
|
+
localAnimationEndTime = _j[0],
|
|
16157
|
+
setLocalAnimationEndTime = _j[1];
|
|
16158
|
+
|
|
16159
|
+
React__namespace.useEffect(function () {
|
|
16160
|
+
setLocalAnimationStartTime(animationStartTime && moment__default["default"].utc(animationStartTime).unix());
|
|
16161
|
+
setLocalAnimationEndTime(animationEndTime && moment__default["default"].utc(animationEndTime).unix());
|
|
16162
|
+
}, [animationStartTime, animationEndTime]);
|
|
15988
16163
|
React__namespace.useEffect(function () {
|
|
15989
16164
|
var handleKeyDown = function handleKeyDown(event) {
|
|
15990
16165
|
if (event.key === 'Home') {
|
|
@@ -16082,7 +16257,7 @@
|
|
|
16082
16257
|
}
|
|
16083
16258
|
},
|
|
16084
16259
|
onRenderCanvas: function onRenderCanvas(ctx, width, height) {
|
|
16085
|
-
renderTimeSliderLegend(ctx, theme, width, height, centerTime, secondsPerPx, dataScaleToSecondsPerPx, selectedTime, scale, currentTime);
|
|
16260
|
+
renderTimeSliderLegend(ctx, theme, width, height, centerTime, secondsPerPx, dataScaleToSecondsPerPx, selectedTime, scale, currentTime, localAnimationStartTime, localAnimationEndTime);
|
|
16086
16261
|
}
|
|
16087
16262
|
}));
|
|
16088
16263
|
};
|
|
@@ -16374,6 +16549,9 @@
|
|
|
16374
16549
|
var svgIconPath = new Path2D('M8.843 1.029c-.56 0-.814.362-.814.699 0 .179.065.36.19.54l3.06 4.34c.065.093.14.171.221.234v8.373c-.082.064-.156.142-.22.234L8.219 19.79c-.125.18-.19.361-.19.54 0 .337.255.699.814.699h6.373c.56 0 .813-.361.813-.7 0-.178-.064-.36-.19-.538l-3.06-4.343c-.08-.112-.174-.204-.278-.273V6.883c.104-.069.199-.16.278-.273l3.06-4.343c.126-.179.19-.36.19-.539 0-.338-.254-.7-.813-.7z');
|
|
16375
16550
|
ctx.fillStyle = playerTimeMarkers.fill;
|
|
16376
16551
|
ctx.fill(svgIconPath);
|
|
16552
|
+
ctx.strokeStyle = theme.palette.geowebColors.timeSlider.playerNeedlePlayer.rgba;
|
|
16553
|
+
ctx.lineWidth = 1;
|
|
16554
|
+
ctx.stroke(svgIconPath);
|
|
16377
16555
|
ctx.restore();
|
|
16378
16556
|
};
|
|
16379
16557
|
|
|
@@ -17168,10 +17346,10 @@
|
|
|
17168
17346
|
var animationIntervalDefault = 5;
|
|
17169
17347
|
var connectRedux$3 = reactRedux.connect(function (store, props) {
|
|
17170
17348
|
return {
|
|
17171
|
-
isAnimating: isAnimating(store, props.mapId),
|
|
17172
17349
|
animationStartTime: getAnimationStartTime(store, props.mapId),
|
|
17173
17350
|
animationEndTime: getAnimationEndTime(store, props.mapId),
|
|
17174
|
-
timeStep: getMapTimeStep(store, props.mapId)
|
|
17351
|
+
timeStep: getMapTimeStep(store, props.mapId),
|
|
17352
|
+
linkedMapAnimationInfo: linkedMapAnimationInfo(store, props.mapId)
|
|
17175
17353
|
};
|
|
17176
17354
|
}, {
|
|
17177
17355
|
mapStartAnimation: mapStartAnimation,
|
|
@@ -17179,19 +17357,19 @@
|
|
|
17179
17357
|
});
|
|
17180
17358
|
var PlayButtonConnect = connectRedux$3(function (_a) {
|
|
17181
17359
|
var mapId = _a.mapId,
|
|
17182
|
-
isAnimating = _a.isAnimating,
|
|
17183
17360
|
animationStartTime = _a.animationStartTime,
|
|
17184
17361
|
animationEndTime = _a.animationEndTime,
|
|
17185
17362
|
isDisabled = _a.isDisabled,
|
|
17186
17363
|
timeStep = _a.timeStep,
|
|
17364
|
+
linkedMapAnimationInfo = _a.linkedMapAnimationInfo,
|
|
17187
17365
|
mapStartAnimation = _a.mapStartAnimation,
|
|
17188
17366
|
mapStopAnimation = _a.mapStopAnimation;
|
|
17189
17367
|
var animationInterval = timeStep || animationIntervalDefault;
|
|
17190
17368
|
|
|
17191
17369
|
var onTogglePlay = function onTogglePlay() {
|
|
17192
|
-
if (isAnimating) {
|
|
17370
|
+
if (linkedMapAnimationInfo.isAnimating) {
|
|
17193
17371
|
mapStopAnimation({
|
|
17194
|
-
mapId:
|
|
17372
|
+
mapId: linkedMapAnimationInfo.id
|
|
17195
17373
|
});
|
|
17196
17374
|
} else {
|
|
17197
17375
|
mapStartAnimation({
|
|
@@ -17204,7 +17382,7 @@
|
|
|
17204
17382
|
};
|
|
17205
17383
|
|
|
17206
17384
|
return /*#__PURE__*/React__default["default"].createElement(PlayButton, {
|
|
17207
|
-
isAnimating: isAnimating,
|
|
17385
|
+
isAnimating: linkedMapAnimationInfo.isAnimating,
|
|
17208
17386
|
isDisabled: isDisabled,
|
|
17209
17387
|
onTogglePlayButton: function onTogglePlayButton() {
|
|
17210
17388
|
onTogglePlay();
|
|
@@ -17261,52 +17439,6 @@
|
|
|
17261
17439
|
});
|
|
17262
17440
|
};
|
|
17263
17441
|
|
|
17264
|
-
/* *
|
|
17265
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
17266
|
-
* you may not use this file except in compliance with the License.
|
|
17267
|
-
* You may obtain a copy of the License at
|
|
17268
|
-
*
|
|
17269
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17270
|
-
*
|
|
17271
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
17272
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17273
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17274
|
-
* See the License for the specific language governing permissions and
|
|
17275
|
-
* limitations under the License.
|
|
17276
|
-
*
|
|
17277
|
-
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
17278
|
-
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
17279
|
-
* */
|
|
17280
|
-
|
|
17281
|
-
var synchronizationGroupStore = function synchronizationGroupStore(store) {
|
|
17282
|
-
return store && store.syncronizationGroupStore ? store.syncronizationGroupStore : null;
|
|
17283
|
-
};
|
|
17284
|
-
|
|
17285
|
-
var getSynchronizationGroupStore = reselect.createSelector(synchronizationGroupStore, function (store) {
|
|
17286
|
-
return store;
|
|
17287
|
-
});
|
|
17288
|
-
/**
|
|
17289
|
-
* Returns the synchronization source by id
|
|
17290
|
-
* @param store The app store
|
|
17291
|
-
* @param id The source id to find
|
|
17292
|
-
*/
|
|
17293
|
-
|
|
17294
|
-
var getSyncSourceBySourceId = function getSyncSourceBySourceId(state, id) {
|
|
17295
|
-
if (state && state.sources) {
|
|
17296
|
-
var sources = state.sources;
|
|
17297
|
-
|
|
17298
|
-
if (sources.byId[id]) {
|
|
17299
|
-
return sources.byId[id];
|
|
17300
|
-
}
|
|
17301
|
-
}
|
|
17302
|
-
|
|
17303
|
-
return null;
|
|
17304
|
-
};
|
|
17305
|
-
|
|
17306
|
-
var getTime = reselect.createSelector(getSyncSourceBySourceId, function (store) {
|
|
17307
|
-
return store && store.payloadByType && store.payloadByType[SYNCGROUPS_TYPE_SETTIME] ? store.payloadByType[SYNCGROUPS_TYPE_SETTIME].value : null;
|
|
17308
|
-
});
|
|
17309
|
-
|
|
17310
17442
|
/* *
|
|
17311
17443
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
17312
17444
|
* you may not use this file except in compliance with the License.
|
|
@@ -17334,7 +17466,9 @@
|
|
|
17334
17466
|
isAnimating: isAnimating(store, props.mapId),
|
|
17335
17467
|
timeStep: getMapTimeStep(store, props.mapId),
|
|
17336
17468
|
isTimeSliderHoverOn: isTimeSliderHoverOn(store, props.mapId),
|
|
17337
|
-
timeValue: getTime(getSynchronizationGroupStore(store), props.sourceId)
|
|
17469
|
+
timeValue: getTime(getSynchronizationGroupStore(store), props.sourceId),
|
|
17470
|
+
animationStartTime: getAnimationStartTime(store, props.mapId),
|
|
17471
|
+
animationEndTime: getAnimationEndTime(store, props.mapId)
|
|
17338
17472
|
};
|
|
17339
17473
|
}, {
|
|
17340
17474
|
stopMapAnimation: mapStopAnimation,
|
|
@@ -17357,6 +17491,8 @@
|
|
|
17357
17491
|
isAnimating = _a.isAnimating,
|
|
17358
17492
|
timeStep = _a.timeStep,
|
|
17359
17493
|
isTimeSliderHoverOn = _a.isTimeSliderHoverOn,
|
|
17494
|
+
animationStartTime = _a.animationStartTime,
|
|
17495
|
+
animationEndTime = _a.animationEndTime,
|
|
17360
17496
|
stopMapAnimation = _a.stopMapAnimation,
|
|
17361
17497
|
setTime = _a.setTime,
|
|
17362
17498
|
syncGroupAddSource = _a.syncGroupAddSource,
|
|
@@ -17391,6 +17527,8 @@
|
|
|
17391
17527
|
isTimeSliderHoverOn: isTimeSliderHoverOn,
|
|
17392
17528
|
dataStartTime: dataStartTime,
|
|
17393
17529
|
dataEndTime: dataEndTime,
|
|
17530
|
+
animationStartTime: animationStartTime,
|
|
17531
|
+
animationEndTime: animationEndTime,
|
|
17394
17532
|
timeStep: timeStep,
|
|
17395
17533
|
onSetNewDate: function onSetNewDate(newDate) {
|
|
17396
17534
|
if (isAnimating) {
|
|
@@ -18704,6 +18842,171 @@
|
|
|
18704
18842
|
}
|
|
18705
18843
|
};
|
|
18706
18844
|
|
|
18845
|
+
/* *
|
|
18846
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18847
|
+
* you may not use this file except in compliance with the License.
|
|
18848
|
+
* You may obtain a copy of the License at
|
|
18849
|
+
*
|
|
18850
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
18851
|
+
*
|
|
18852
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18853
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18854
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18855
|
+
* See the License for the specific language governing permissions and
|
|
18856
|
+
* limitations under the License.
|
|
18857
|
+
*
|
|
18858
|
+
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
18859
|
+
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
18860
|
+
* */
|
|
18861
|
+
/* Function which calculates the distance between two points */
|
|
18862
|
+
// eslint-disable-next-line class-methods-use-this
|
|
18863
|
+
|
|
18864
|
+
var distance = function distance(a, b) {
|
|
18865
|
+
return Math.sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
|
|
18866
|
+
};
|
|
18867
|
+
|
|
18868
|
+
var checkHoverVertice = function checkHoverVertice(feature, mouseX, mouseY, convertGeoCoordsToScreenCoords) {
|
|
18869
|
+
var maxDistance = 20;
|
|
18870
|
+
|
|
18871
|
+
if (feature.geometry.type === 'Point') {
|
|
18872
|
+
var featureCoords = feature.geometry.coordinates;
|
|
18873
|
+
/* Get all vertexes */
|
|
18874
|
+
|
|
18875
|
+
var XYCoords = convertGeoCoordsToScreenCoords([featureCoords]);
|
|
18876
|
+
|
|
18877
|
+
if (XYCoords.length > 0 && distance(XYCoords[0], {
|
|
18878
|
+
x: mouseX,
|
|
18879
|
+
y: mouseY
|
|
18880
|
+
}) < maxDistance) {
|
|
18881
|
+
return {
|
|
18882
|
+
coordinateIndexInFeature: 0
|
|
18883
|
+
};
|
|
18884
|
+
}
|
|
18885
|
+
}
|
|
18886
|
+
|
|
18887
|
+
if (feature.geometry.type === 'MultiPoint') {
|
|
18888
|
+
for (var polygonIndex = feature.geometry.coordinates.length - 1; polygonIndex >= 0; polygonIndex -= 1) {
|
|
18889
|
+
var featureCoords = feature.geometry.coordinates[polygonIndex];
|
|
18890
|
+
|
|
18891
|
+
if (featureCoords === undefined) {
|
|
18892
|
+
// eslint-disable-next-line no-continue
|
|
18893
|
+
continue;
|
|
18894
|
+
}
|
|
18895
|
+
/* Get all vertexes */
|
|
18896
|
+
|
|
18897
|
+
|
|
18898
|
+
var XYCoords = convertGeoCoordsToScreenCoords([featureCoords]);
|
|
18899
|
+
|
|
18900
|
+
if (XYCoords.length > 0 && distance(XYCoords[0], {
|
|
18901
|
+
x: mouseX,
|
|
18902
|
+
y: mouseY
|
|
18903
|
+
}) < maxDistance) {
|
|
18904
|
+
return {
|
|
18905
|
+
coordinateIndexInFeature: polygonIndex
|
|
18906
|
+
};
|
|
18907
|
+
}
|
|
18908
|
+
}
|
|
18909
|
+
}
|
|
18910
|
+
|
|
18911
|
+
if (feature.geometry.type === 'Polygon') {
|
|
18912
|
+
var point = [mouseX, mouseY];
|
|
18913
|
+
|
|
18914
|
+
for (var polygonIndex = feature.geometry.coordinates.length - 1; polygonIndex >= 0; polygonIndex -= 1) {
|
|
18915
|
+
var featureCoords = feature.geometry.coordinates[polygonIndex];
|
|
18916
|
+
|
|
18917
|
+
if (featureCoords === undefined) {
|
|
18918
|
+
// eslint-disable-next-line no-continue
|
|
18919
|
+
continue;
|
|
18920
|
+
}
|
|
18921
|
+
/* Get all vertexes */
|
|
18922
|
+
|
|
18923
|
+
|
|
18924
|
+
var poly = [convertGeoCoordsToScreenCoords(featureCoords).map(function (coord) {
|
|
18925
|
+
return [coord.x, coord.y];
|
|
18926
|
+
})];
|
|
18927
|
+
|
|
18928
|
+
try {
|
|
18929
|
+
var isPointInPoly = turf__namespace.booleanPointInPolygon(turf__namespace.point(point), turf__namespace.polygon(poly));
|
|
18930
|
+
|
|
18931
|
+
if (isPointInPoly) {
|
|
18932
|
+
return {
|
|
18933
|
+
coordinateIndexInFeature: polygonIndex
|
|
18934
|
+
};
|
|
18935
|
+
} // eslint-disable-next-line no-empty
|
|
18936
|
+
|
|
18937
|
+
} catch (e) {}
|
|
18938
|
+
}
|
|
18939
|
+
}
|
|
18940
|
+
|
|
18941
|
+
if (feature.geometry.type === 'MultiPolygon') {
|
|
18942
|
+
var point = [mouseX, mouseY];
|
|
18943
|
+
|
|
18944
|
+
for (var polygonIndex = feature.geometry.coordinates.length - 1; polygonIndex >= 0; polygonIndex -= 1) {
|
|
18945
|
+
var featureCoords = feature.geometry.coordinates[polygonIndex][0];
|
|
18946
|
+
|
|
18947
|
+
if (featureCoords === undefined) {
|
|
18948
|
+
// eslint-disable-next-line no-continue
|
|
18949
|
+
continue;
|
|
18950
|
+
}
|
|
18951
|
+
|
|
18952
|
+
var poly = [convertGeoCoordsToScreenCoords(featureCoords).map(function (coord) {
|
|
18953
|
+
return [coord.x, coord.y];
|
|
18954
|
+
})];
|
|
18955
|
+
|
|
18956
|
+
try {
|
|
18957
|
+
var isPointInPoly = turf__namespace.booleanPointInPolygon(turf__namespace.point(point), turf__namespace.polygon(poly));
|
|
18958
|
+
|
|
18959
|
+
if (isPointInPoly) {
|
|
18960
|
+
return {
|
|
18961
|
+
coordinateIndexInFeature: polygonIndex
|
|
18962
|
+
};
|
|
18963
|
+
} // eslint-disable-next-line no-empty
|
|
18964
|
+
|
|
18965
|
+
} catch (e) {}
|
|
18966
|
+
}
|
|
18967
|
+
}
|
|
18968
|
+
|
|
18969
|
+
if (feature.geometry.type === 'LineString') {
|
|
18970
|
+
var featureCoords = feature.geometry.coordinates;
|
|
18971
|
+
/* Get all vertexes */
|
|
18972
|
+
|
|
18973
|
+
var XYCoords = convertGeoCoordsToScreenCoords(featureCoords);
|
|
18974
|
+
/* Snap to the vertex closer than specified pixels */
|
|
18975
|
+
|
|
18976
|
+
for (var j = 0; j < XYCoords.length; j += 1) {
|
|
18977
|
+
var coord = XYCoords[j];
|
|
18978
|
+
|
|
18979
|
+
if (distance(coord, {
|
|
18980
|
+
x: mouseX,
|
|
18981
|
+
y: mouseY
|
|
18982
|
+
}) < maxDistance) {
|
|
18983
|
+
return {
|
|
18984
|
+
coordinateIndexInFeature: j
|
|
18985
|
+
};
|
|
18986
|
+
}
|
|
18987
|
+
}
|
|
18988
|
+
}
|
|
18989
|
+
|
|
18990
|
+
return null;
|
|
18991
|
+
};
|
|
18992
|
+
|
|
18993
|
+
var checkHoverFeatures = function checkHoverFeatures(geojson, mouseX, mouseY, convertGeoCoordsToScreenCoords) {
|
|
18994
|
+
for (var j = 0; j < geojson.features.length; j += 1) {
|
|
18995
|
+
var feature = geojson.features[j];
|
|
18996
|
+
var hoverResult = checkHoverVertice(feature, mouseX, mouseY, convertGeoCoordsToScreenCoords);
|
|
18997
|
+
|
|
18998
|
+
if (hoverResult != null) {
|
|
18999
|
+
return {
|
|
19000
|
+
coordinateIndexInFeature: hoverResult.coordinateIndexInFeature,
|
|
19001
|
+
featureIndex: j,
|
|
19002
|
+
feature: feature
|
|
19003
|
+
};
|
|
19004
|
+
}
|
|
19005
|
+
}
|
|
19006
|
+
|
|
19007
|
+
return null;
|
|
19008
|
+
};
|
|
19009
|
+
|
|
18707
19010
|
/* *
|
|
18708
19011
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18709
19012
|
* you may not use this file except in compliance with the License.
|
|
@@ -19314,9 +19617,12 @@
|
|
|
19314
19617
|
};
|
|
19315
19618
|
|
|
19316
19619
|
AdagucMapDraw.prototype.adagucMouseMove = function (event) {
|
|
19620
|
+
var _this = this;
|
|
19621
|
+
|
|
19317
19622
|
var _a = this.props,
|
|
19318
19623
|
isInEditMode = _a.isInEditMode,
|
|
19319
|
-
featureNrToEdit = _a.featureNrToEdit
|
|
19624
|
+
featureNrToEdit = _a.featureNrToEdit,
|
|
19625
|
+
onHoverFeature = _a.onHoverFeature;
|
|
19320
19626
|
if (event && event.rightButton === true) return;
|
|
19321
19627
|
/* adagucMouseMove is an event callback function which is triggered when the mouse moves over the map
|
|
19322
19628
|
This event is only triggered if the map is in hover state.
|
|
@@ -19329,6 +19635,29 @@
|
|
|
19329
19635
|
this.mouseX = mouseX;
|
|
19330
19636
|
this.mouseY = mouseY;
|
|
19331
19637
|
|
|
19638
|
+
if (onHoverFeature) {
|
|
19639
|
+
var handleMouseStoppedTimer = function handleMouseStoppedTimer() {
|
|
19640
|
+
var result = checkHoverFeatures(_this.geojson, mouseX, mouseY, function (coordinates) {
|
|
19641
|
+
return _this.convertGeoCoordsToScreenCoords(coordinates);
|
|
19642
|
+
});
|
|
19643
|
+
|
|
19644
|
+
if (result) {
|
|
19645
|
+
var featureEvent = {
|
|
19646
|
+
coordinateIndexInFeature: result.coordinateIndexInFeature,
|
|
19647
|
+
featureIndex: result.featureIndex,
|
|
19648
|
+
mouseX: mouseX,
|
|
19649
|
+
mouseY: mouseY,
|
|
19650
|
+
isInEditMode: isInEditMode,
|
|
19651
|
+
feature: result.feature
|
|
19652
|
+
};
|
|
19653
|
+
onHoverFeature(featureEvent);
|
|
19654
|
+
}
|
|
19655
|
+
};
|
|
19656
|
+
|
|
19657
|
+
window.clearTimeout(this.mouseStoppedTimer);
|
|
19658
|
+
this.mouseStoppedTimer = window.setTimeout(handleMouseStoppedTimer, 20);
|
|
19659
|
+
}
|
|
19660
|
+
|
|
19332
19661
|
if (isInEditMode === false) {
|
|
19333
19662
|
return;
|
|
19334
19663
|
}
|
|
@@ -19829,9 +20158,35 @@
|
|
|
19829
20158
|
};
|
|
19830
20159
|
|
|
19831
20160
|
AdagucMapDraw.prototype.adagucMouseUp = function (event) {
|
|
19832
|
-
var
|
|
20161
|
+
var _this = this;
|
|
20162
|
+
|
|
20163
|
+
var _a = this.props,
|
|
20164
|
+
isInEditMode = _a.isInEditMode,
|
|
20165
|
+
onClickFeature = _a.onClickFeature;
|
|
19833
20166
|
if (event && event.rightButton === true) return;
|
|
19834
20167
|
|
|
20168
|
+
if (onClickFeature) {
|
|
20169
|
+
var mouseX = event.mouseX,
|
|
20170
|
+
mouseY = event.mouseY;
|
|
20171
|
+
var result = checkHoverFeatures(this.geojson, mouseX, mouseY, function (coordinates) {
|
|
20172
|
+
return _this.convertGeoCoordsToScreenCoords(coordinates);
|
|
20173
|
+
});
|
|
20174
|
+
|
|
20175
|
+
if (result) {
|
|
20176
|
+
var featureEvent = {
|
|
20177
|
+
coordinateIndexInFeature: result.coordinateIndexInFeature,
|
|
20178
|
+
featureIndex: result.featureIndex,
|
|
20179
|
+
mouseX: mouseX,
|
|
20180
|
+
mouseY: mouseY,
|
|
20181
|
+
isInEditMode: isInEditMode,
|
|
20182
|
+
feature: result.feature
|
|
20183
|
+
};
|
|
20184
|
+
onClickFeature(featureEvent);
|
|
20185
|
+
} else {
|
|
20186
|
+
onClickFeature(null);
|
|
20187
|
+
}
|
|
20188
|
+
}
|
|
20189
|
+
|
|
19835
20190
|
if (isInEditMode === false) {
|
|
19836
20191
|
return;
|
|
19837
20192
|
}
|
|
@@ -20037,12 +20392,12 @@
|
|
|
20037
20392
|
*/
|
|
20038
20393
|
var _a = this.props,
|
|
20039
20394
|
featureNrToEdit = _a.featureNrToEdit,
|
|
20040
|
-
isInEditMode = _a.isInEditMode
|
|
20041
|
-
hoverFeatureCallback = _a.hoverFeatureCallback;
|
|
20395
|
+
isInEditMode = _a.isInEditMode;
|
|
20042
20396
|
if (!this.geojson || !this.geojson.features || !this.geojson.features.length) return;
|
|
20043
20397
|
this.textPositions = [];
|
|
20044
20398
|
this.mouseOverPolygonCoordinates = [];
|
|
20045
20399
|
this.mouseOverPolygonFeatureIndex = -1;
|
|
20400
|
+
this.mouseOverPolygonIndex = -1;
|
|
20046
20401
|
/* Current selected feature from GeoJSON */
|
|
20047
20402
|
|
|
20048
20403
|
for (var featureIndex = 0; featureIndex < this.geojson.features.length; featureIndex += 1) {
|
|
@@ -20229,19 +20584,6 @@
|
|
|
20229
20584
|
ctx.globalAlpha = 1;
|
|
20230
20585
|
ctx.stroke();
|
|
20231
20586
|
}
|
|
20232
|
-
} // if (isInEditMode === true &&
|
|
20233
|
-
// this.mouseOverPolygonFeatureIndex === this.props.featureNrToEdit &&
|
|
20234
|
-
|
|
20235
|
-
|
|
20236
|
-
if (hoverFeatureCallback) {
|
|
20237
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
20238
|
-
// @ts-ignore
|
|
20239
|
-
hoverFeatureCallback({
|
|
20240
|
-
polygonIndex: this.mouseOverPolygonFeatureIndex,
|
|
20241
|
-
featureIndex: this.mouseOverPolygonFeatureIndex,
|
|
20242
|
-
mouseX: this.mouseX,
|
|
20243
|
-
mouseY: this.mouseY
|
|
20244
|
-
});
|
|
20245
20587
|
}
|
|
20246
20588
|
/* Draw labels */
|
|
20247
20589
|
|
|
@@ -20556,7 +20898,8 @@
|
|
|
20556
20898
|
// if (test) {
|
|
20557
20899
|
|
|
20558
20900
|
this.mouseOverPolygonCoordinates = 0;
|
|
20559
|
-
this.mouseOverPolygonFeatureIndex = 0;
|
|
20901
|
+
this.mouseOverPolygonFeatureIndex = 0;
|
|
20902
|
+
this.mouseOverPolygonIndex = 0; // }
|
|
20560
20903
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
20561
20904
|
// @ts-ignore
|
|
20562
20905
|
|
|
@@ -20633,6 +20976,7 @@
|
|
|
20633
20976
|
if (test) {
|
|
20634
20977
|
this.mouseOverPolygonCoordinates = XYCoords;
|
|
20635
20978
|
this.mouseOverPolygonFeatureIndex = featureIndex;
|
|
20979
|
+
this.mouseOverPolygonIndex = polygonIndex;
|
|
20636
20980
|
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
20637
20981
|
// @ts-ignore
|
|
20638
20982
|
|
|
@@ -20848,9 +21192,14 @@
|
|
|
20848
21192
|
isInDeleteMode: layer.isInDeleteMode,
|
|
20849
21193
|
drawMode: layer.drawMode,
|
|
20850
21194
|
webmapjs: webMapJS,
|
|
20851
|
-
|
|
20852
|
-
if (layer.
|
|
20853
|
-
layer.
|
|
21195
|
+
onHoverFeature: function onHoverFeature(hoverInfo) {
|
|
21196
|
+
if (layer.onHoverFeature) {
|
|
21197
|
+
layer.onHoverFeature(hoverInfo);
|
|
21198
|
+
}
|
|
21199
|
+
},
|
|
21200
|
+
onClickFeature: function onClickFeature(hoverInfo) {
|
|
21201
|
+
if (layer.onClickFeature) {
|
|
21202
|
+
layer.onClickFeature(hoverInfo);
|
|
20854
21203
|
}
|
|
20855
21204
|
},
|
|
20856
21205
|
updateGeojson: function updateGeojson(geojson) {
|
|
@@ -23324,103 +23673,6 @@
|
|
|
23324
23673
|
});
|
|
23325
23674
|
});
|
|
23326
23675
|
|
|
23327
|
-
/* *
|
|
23328
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
23329
|
-
* you may not use this file except in compliance with the License.
|
|
23330
|
-
* You may obtain a copy of the License at
|
|
23331
|
-
*
|
|
23332
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23333
|
-
*
|
|
23334
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
23335
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
23336
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23337
|
-
* See the License for the specific language governing permissions and
|
|
23338
|
-
* limitations under the License.
|
|
23339
|
-
*
|
|
23340
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
23341
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
23342
|
-
* */
|
|
23343
|
-
var emptyState = {
|
|
23344
|
-
timeslider: {
|
|
23345
|
-
groups: [],
|
|
23346
|
-
sourcesById: []
|
|
23347
|
-
},
|
|
23348
|
-
zoompane: {
|
|
23349
|
-
groups: [],
|
|
23350
|
-
sourcesById: []
|
|
23351
|
-
},
|
|
23352
|
-
level: {
|
|
23353
|
-
groups: [],
|
|
23354
|
-
sourcesById: []
|
|
23355
|
-
}
|
|
23356
|
-
};
|
|
23357
|
-
var groupTypes = [{
|
|
23358
|
-
title: 'Timeslider',
|
|
23359
|
-
syncType: 'SYNCGROUPS_TYPE_SETTIME',
|
|
23360
|
-
groupType: 'timeslider'
|
|
23361
|
-
}, {
|
|
23362
|
-
title: 'Zoompane',
|
|
23363
|
-
syncType: 'SYNCGROUPS_TYPE_SETBBOX',
|
|
23364
|
-
groupType: 'zoompane'
|
|
23365
|
-
}];
|
|
23366
|
-
/*
|
|
23367
|
-
_____ Creates viewState _____
|
|
23368
|
-
- Runs Each time viewState is created:
|
|
23369
|
-
- Fill arrays inside initialState with objects containing new values from Redux
|
|
23370
|
-
*/
|
|
23371
|
-
|
|
23372
|
-
var createSyncGroupViewState = function createSyncGroupViewState(syncState) {
|
|
23373
|
-
var initialState = produce__default["default"](emptyState, function (draft) {
|
|
23374
|
-
/*
|
|
23375
|
-
_____ 1. Fill groups _____
|
|
23376
|
-
1. Goes through all groups by ID
|
|
23377
|
-
2. Collects original timeslider or zoompane values into an array
|
|
23378
|
-
3. Sorts and adds selected sources to ViewState based on ID type
|
|
23379
|
-
*/
|
|
23380
|
-
Object.keys(syncState.groups.byId).forEach(function (id) {
|
|
23381
|
-
var _a;
|
|
23382
|
-
|
|
23383
|
-
var groupType = (_a = groupTypes.find(function (object) {
|
|
23384
|
-
return object.syncType === syncState.groups.byId[id].type;
|
|
23385
|
-
})) === null || _a === void 0 ? void 0 : _a.groupType;
|
|
23386
|
-
|
|
23387
|
-
if (groupType) {
|
|
23388
|
-
draft[groupType].groups.push({
|
|
23389
|
-
id: id,
|
|
23390
|
-
selected: syncState.groups.byId[id].targets.allIds
|
|
23391
|
-
});
|
|
23392
|
-
}
|
|
23393
|
-
});
|
|
23394
|
-
/*
|
|
23395
|
-
_____ 2. Fill sourcesById _____
|
|
23396
|
-
1. Loop though sources and add source to each group type
|
|
23397
|
-
*/
|
|
23398
|
-
|
|
23399
|
-
Object.keys(syncState.sources.byId).forEach(function (id) {
|
|
23400
|
-
groupTypes.forEach(function (_a) {
|
|
23401
|
-
var syncType = _a.syncType,
|
|
23402
|
-
groupType = _a.groupType;
|
|
23403
|
-
|
|
23404
|
-
if (syncState.sources.byId[id].types.includes(syncType)) {
|
|
23405
|
-
draft[groupType].sourcesById.push({
|
|
23406
|
-
id: id,
|
|
23407
|
-
name: id
|
|
23408
|
-
});
|
|
23409
|
-
}
|
|
23410
|
-
});
|
|
23411
|
-
});
|
|
23412
|
-
});
|
|
23413
|
-
return initialState;
|
|
23414
|
-
}; // TODO
|
|
23415
|
-
// Improve selector to reduce unnecessary re-rendering
|
|
23416
|
-
// https://gitlab.com/opengeoweb/opengeoweb/-/issues/1333
|
|
23417
|
-
|
|
23418
|
-
var syncState = function syncState(store) {
|
|
23419
|
-
return store.syncronizationGroupStore;
|
|
23420
|
-
};
|
|
23421
|
-
|
|
23422
|
-
var createSyncGroupViewStateSelector = reselect.createSelector(syncState, createSyncGroupViewState);
|
|
23423
|
-
|
|
23424
23676
|
/* *
|
|
23425
23677
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
23426
23678
|
* you may not use this file except in compliance with the License.
|
|
@@ -23444,7 +23696,10 @@
|
|
|
23444
23696
|
syncGroupAddTarget = _a.syncGroupAddTarget,
|
|
23445
23697
|
syncGroupRemoveTarget = _a.syncGroupRemoveTarget,
|
|
23446
23698
|
syncGroupAddGroup = _a.syncGroupAddGroup,
|
|
23447
|
-
syncGroupRemoveGroup = _a.syncGroupRemoveGroup
|
|
23699
|
+
syncGroupRemoveGroup = _a.syncGroupRemoveGroup,
|
|
23700
|
+
onMouseDown = _a.onMouseDown,
|
|
23701
|
+
_b = _a.order,
|
|
23702
|
+
order = _b === void 0 ? 0 : _b;
|
|
23448
23703
|
/*
|
|
23449
23704
|
_____ Handle Toggle _____
|
|
23450
23705
|
- Handles checking, unchecking and toggling between in groups
|
|
@@ -23549,7 +23804,9 @@
|
|
|
23549
23804
|
headerSize: "medium",
|
|
23550
23805
|
isOpen: isOpen,
|
|
23551
23806
|
onClose: onClose,
|
|
23552
|
-
"data-testid": "syncGroupViewer"
|
|
23807
|
+
"data-testid": "syncGroupViewer",
|
|
23808
|
+
onMouseDown: onMouseDown,
|
|
23809
|
+
order: order
|
|
23553
23810
|
}, /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(SyncGroupList, {
|
|
23554
23811
|
viewStateData: syncGroupViewState.zoompane,
|
|
23555
23812
|
title: "ZoomPane",
|
|
@@ -23605,14 +23862,12 @@
|
|
|
23605
23862
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
23606
23863
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
23607
23864
|
* */
|
|
23608
|
-
var SyncGroupViewerConnect = function SyncGroupViewerConnect(
|
|
23609
|
-
var onClose = _a.onClose,
|
|
23610
|
-
isOpen = _a.isOpen;
|
|
23865
|
+
var SyncGroupViewerConnect = function SyncGroupViewerConnect() {
|
|
23611
23866
|
var dispatch = reactRedux.useDispatch(); // TODO
|
|
23612
23867
|
// Improve the selector to prevent re-renders
|
|
23613
23868
|
// For example dusting anination syncgroups should not re-render
|
|
23614
23869
|
|
|
23615
|
-
var viewState = reactRedux.useSelector(
|
|
23870
|
+
var viewState = reactRedux.useSelector(syncGroupGetViewState);
|
|
23616
23871
|
var syncGroupAddGroup$1 = React__namespace.useCallback(function (payload) {
|
|
23617
23872
|
return dispatch(syncGroupAddGroup(payload));
|
|
23618
23873
|
}, [dispatch]);
|
|
@@ -23625,14 +23880,55 @@
|
|
|
23625
23880
|
var syncGroupRemoveTarget$1 = React__namespace.useCallback(function (payload) {
|
|
23626
23881
|
return dispatch(syncGroupRemoveTarget(payload));
|
|
23627
23882
|
}, [dispatch]);
|
|
23883
|
+
var isOpenInStore = reactRedux.useSelector(function (store) {
|
|
23884
|
+
return getisDialogOpen(store, 'syncGroups');
|
|
23885
|
+
});
|
|
23886
|
+
var onClose = React__namespace.useCallback(function () {
|
|
23887
|
+
return dispatch(setToggleOpenDialog({
|
|
23888
|
+
type: 'syncGroups',
|
|
23889
|
+
setOpen: false
|
|
23890
|
+
}));
|
|
23891
|
+
}, [dispatch]);
|
|
23892
|
+
var uiOrder = reactRedux.useSelector(function (store) {
|
|
23893
|
+
return getDialogOrder(store, 'syncGroups');
|
|
23894
|
+
});
|
|
23895
|
+
var uiIsOrderedOnTop = reactRedux.useSelector(function (store) {
|
|
23896
|
+
return getDialogIsOrderedOnTop(store, 'syncGroups');
|
|
23897
|
+
});
|
|
23898
|
+
var registerDialog$1 = React__namespace.useCallback(function () {
|
|
23899
|
+
return dispatch(registerDialog({
|
|
23900
|
+
type: 'syncGroups',
|
|
23901
|
+
setOpen: false
|
|
23902
|
+
}));
|
|
23903
|
+
}, [dispatch]);
|
|
23904
|
+
var unregisterDialog$1 = React__namespace.useCallback(function () {
|
|
23905
|
+
return dispatch(unregisterDialog({
|
|
23906
|
+
type: 'syncGroups'
|
|
23907
|
+
}));
|
|
23908
|
+
}, [dispatch]);
|
|
23909
|
+
var onOrderDialog = React__namespace.useCallback(function () {
|
|
23910
|
+
if (!uiIsOrderedOnTop) {
|
|
23911
|
+
dispatch(orderDialog({
|
|
23912
|
+
type: 'syncGroups'
|
|
23913
|
+
}));
|
|
23914
|
+
}
|
|
23915
|
+
}, [dispatch, uiIsOrderedOnTop]);
|
|
23916
|
+
React__namespace.useEffect(function () {
|
|
23917
|
+
registerDialog$1();
|
|
23918
|
+
return function () {
|
|
23919
|
+
unregisterDialog$1();
|
|
23920
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
23921
|
+
}, []);
|
|
23628
23922
|
return /*#__PURE__*/React__namespace.createElement(SyncGroupViewer, {
|
|
23629
23923
|
onClose: onClose,
|
|
23630
|
-
isOpen:
|
|
23924
|
+
isOpen: isOpenInStore,
|
|
23631
23925
|
syncGroupViewState: viewState,
|
|
23632
23926
|
syncGroupAddTarget: syncGroupAddTarget$1,
|
|
23633
23927
|
syncGroupRemoveTarget: syncGroupRemoveTarget$1,
|
|
23634
23928
|
syncGroupAddGroup: syncGroupAddGroup$1,
|
|
23635
|
-
syncGroupRemoveGroup: syncGroupRemoveGroup$1
|
|
23929
|
+
syncGroupRemoveGroup: syncGroupRemoveGroup$1,
|
|
23930
|
+
order: uiOrder,
|
|
23931
|
+
onMouseDown: onOrderDialog
|
|
23636
23932
|
});
|
|
23637
23933
|
};
|
|
23638
23934
|
|
|
@@ -23877,7 +24173,7 @@
|
|
|
23877
24173
|
exports.layerReducer = reducer$6;
|
|
23878
24174
|
exports.makeMapPreset = makeMapPreset;
|
|
23879
24175
|
exports.mapActions = actions$3;
|
|
23880
|
-
exports.mapConstants = constants
|
|
24176
|
+
exports.mapConstants = constants;
|
|
23881
24177
|
exports.mapModuleConfig = moduleConfig;
|
|
23882
24178
|
exports.mapSelectors = selectors$1;
|
|
23883
24179
|
exports.mapTypes = types$2;
|