@opengeoweb/core 2.2.1 → 2.3.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 +597 -556
- package/index.umd.js +578 -548
- package/lib/components/ComponentsLookUp/componentsLookUp.d.ts +1 -1
- package/lib/components/ConfigurableConnectedMap/ConfigurableConnectedMap.d.ts +2 -0
- package/lib/components/ConfigurableMapWithSlider/ConfigurableMapWithSliderConnect.d.ts +3 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerManagerButton.d.ts +1 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/Menubutton/MenuButton.d.ts +0 -2
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/styles.d.ts +1 -0
- package/lib/components/LayerManager/LayerSelect/LayerList/LayerAddRemoveButton.d.ts +18 -0
- package/lib/components/{CustomToggleButton/CustomToggleButton.spec.d.ts → LayerManager/LayerSelect/LayerList/LayerAddRemoveButton.spec.d.ts} +0 -0
- package/lib/components/LayerManager/LayerSelect/LayerList/LayerList.d.ts +10 -0
- package/lib/components/LayerManager/LayerSelect/LayerList/LayerListConnect.d.ts +1 -0
- package/lib/components/MapControls/MapControlButton.d.ts +1 -1
- package/lib/components/MapView/MapViewConnect.DisableMapPin.stories.d.ts +5 -0
- package/lib/components/MapView/MapViewConnect.stories.d.ts +1 -0
- package/lib/components/ReactMapView/types.d.ts +1 -0
- package/lib/components/TooltipSelect/TooltipSelect.d.ts +1 -0
- package/lib/index.d.ts +4 -1
- package/lib/store/mapStore/map/actions.d.ts +8 -1
- package/lib/store/mapStore/map/constants.d.ts +1 -0
- package/lib/store/mapStore/map/selectors.d.ts +22 -1
- package/lib/store/mapStore/map/types.d.ts +11 -2
- package/lib/store/ui/types.d.ts +1 -1
- package/lib/utils/types.d.ts +14 -23
- package/package.json +5 -5
- package/lib/components/CustomToggleButton/CustomToggleButton.d.ts +0 -9
- package/lib/components/CustomToggleButton/CustomToggleButton.stories.d.ts +0 -13
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/Menubutton/MenuItemButton.d.ts +0 -8
- package/lib/components/ToolButton/ToolButton.d.ts +0 -12
- package/lib/components/ToolButton/ToolButton.spec.d.ts +0 -1
- package/lib/components/ToolButton/ToolButton.stories.d.ts +0 -13
- package/lib/components/ToolButton/index.d.ts +0 -1
package/index.umd.js
CHANGED
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
var WEBMAP_SET_TIME_SLIDER_SECONDS_PER_PX = 'WEBMAP_SET_TIME_SLIDER_SECONDS_PER_PX';
|
|
74
74
|
var WEBMAP_SET_TIME_SLIDER_DATA_SCALE_TO_SECONDS_PER_PX = 'WEBMAP_SET_TIME_SLIDER_DATA_SCALE_TO_SECONDS_PER_PX';
|
|
75
75
|
var WEBMAP_SET_PIN = 'WEBMAP_SET_PIN';
|
|
76
|
+
var WEBMAP_DISABLE_PIN = 'WEBMAP_DISABLE_PIN';
|
|
76
77
|
|
|
77
78
|
/* *
|
|
78
79
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -381,6 +382,19 @@
|
|
|
381
382
|
payload: payload
|
|
382
383
|
};
|
|
383
384
|
};
|
|
385
|
+
/**
|
|
386
|
+
* Sets the diable map pin boolean
|
|
387
|
+
*
|
|
388
|
+
* Example: setMapPinLocation({ mapId: 'mapId1', diableMapPin: true })
|
|
389
|
+
* @param {object} payload object with mapId: string, diableMapPin: boolean
|
|
390
|
+
*/
|
|
391
|
+
|
|
392
|
+
var setDisableMapPin = function setDisableMapPin(payload) {
|
|
393
|
+
return {
|
|
394
|
+
type: WEBMAP_DISABLE_PIN,
|
|
395
|
+
payload: payload
|
|
396
|
+
};
|
|
397
|
+
};
|
|
384
398
|
|
|
385
399
|
/* *
|
|
386
400
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -757,6 +771,7 @@
|
|
|
757
771
|
setTimeSliderSecondsPerPx: setTimeSliderSecondsPerPx,
|
|
758
772
|
setTimeSliderDataScaleToSecondsPerPx: setTimeSliderDataScaleToSecondsPerPx,
|
|
759
773
|
setMapPinLocation: setMapPinLocation,
|
|
774
|
+
setDisableMapPin: setDisableMapPin,
|
|
760
775
|
setLayers: setLayers,
|
|
761
776
|
setBaseLayers: setBaseLayers,
|
|
762
777
|
addBaseLayer: addBaseLayer,
|
|
@@ -2502,7 +2517,7 @@
|
|
|
2502
2517
|
/**
|
|
2503
2518
|
* Returns the mapPinLocation for the current map
|
|
2504
2519
|
*
|
|
2505
|
-
* Example
|
|
2520
|
+
* Example getPinLocation(store);
|
|
2506
2521
|
* @param {object} store store: object - store object
|
|
2507
2522
|
* @param {string} mapId mapId: string - Id of the map
|
|
2508
2523
|
* @returns {object} returnType: latitude and longitude of pin
|
|
@@ -2511,6 +2526,18 @@
|
|
|
2511
2526
|
var getPinLocation = reselect.createSelector(getMapById, function (store) {
|
|
2512
2527
|
return store ? store.mapPinLocation : undefined;
|
|
2513
2528
|
}, selectorMemoizationOptions);
|
|
2529
|
+
/**
|
|
2530
|
+
* Returns the disable map pin boolean for the current map
|
|
2531
|
+
*
|
|
2532
|
+
* Example getDisableMapPin(store);
|
|
2533
|
+
* @param {object} store store: object - store object
|
|
2534
|
+
* @param {string} mapId mapId: string - Id of the map
|
|
2535
|
+
* @returns {boolean} returnType: boolean or undefined
|
|
2536
|
+
*/
|
|
2537
|
+
|
|
2538
|
+
var getDisableMapPin = reselect.createSelector(getMapById, function (store) {
|
|
2539
|
+
return store ? store.disableMapPin : undefined;
|
|
2540
|
+
});
|
|
2514
2541
|
|
|
2515
2542
|
/* *
|
|
2516
2543
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -2662,7 +2689,7 @@
|
|
|
2662
2689
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
2663
2690
|
* */
|
|
2664
2691
|
|
|
2665
|
-
var selectors = /*#__PURE__*/Object.freeze({
|
|
2692
|
+
var selectors$1 = /*#__PURE__*/Object.freeze({
|
|
2666
2693
|
__proto__: null,
|
|
2667
2694
|
getMapById: getMapById,
|
|
2668
2695
|
getAllMapIds: getAllMapIds,
|
|
@@ -2700,6 +2727,7 @@
|
|
|
2700
2727
|
getLayerByLayerIndex: getLayerByLayerIndex,
|
|
2701
2728
|
getAllUniqueDimensions: getAllUniqueDimensions,
|
|
2702
2729
|
getPinLocation: getPinLocation,
|
|
2730
|
+
getDisableMapPin: getDisableMapPin,
|
|
2703
2731
|
getLayerById: getLayerById,
|
|
2704
2732
|
getLayersById: getLayersById,
|
|
2705
2733
|
getLayersIds: getLayersIds,
|
|
@@ -2768,6 +2796,7 @@
|
|
|
2768
2796
|
WEBMAP_SET_TIME_SLIDER_SECONDS_PER_PX: WEBMAP_SET_TIME_SLIDER_SECONDS_PER_PX,
|
|
2769
2797
|
WEBMAP_SET_TIME_SLIDER_DATA_SCALE_TO_SECONDS_PER_PX: WEBMAP_SET_TIME_SLIDER_DATA_SCALE_TO_SECONDS_PER_PX,
|
|
2770
2798
|
WEBMAP_SET_PIN: WEBMAP_SET_PIN,
|
|
2799
|
+
WEBMAP_DISABLE_PIN: WEBMAP_DISABLE_PIN,
|
|
2771
2800
|
WEBMAP_LAYER_CHANGE_OPACITY: WEBMAP_LAYER_CHANGE_OPACITY,
|
|
2772
2801
|
WEBMAP_LAYER_CHANGE_NAME: WEBMAP_LAYER_CHANGE_NAME,
|
|
2773
2802
|
WEBMAP_LAYER_CHANGE_STYLE: WEBMAP_LAYER_CHANGE_STYLE,
|
|
@@ -2901,6 +2930,130 @@
|
|
|
2901
2930
|
orderDialog: orderDialog
|
|
2902
2931
|
});
|
|
2903
2932
|
|
|
2933
|
+
/* *
|
|
2934
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2935
|
+
* you may not use this file except in compliance with the License.
|
|
2936
|
+
* You may obtain a copy of the License at
|
|
2937
|
+
*
|
|
2938
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2939
|
+
*
|
|
2940
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2941
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2942
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2943
|
+
* See the License for the specific language governing permissions and
|
|
2944
|
+
* limitations under the License.
|
|
2945
|
+
*
|
|
2946
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2947
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
2948
|
+
* */
|
|
2949
|
+
/**
|
|
2950
|
+
* Gets the active map Id and wether a dialog is open or closed
|
|
2951
|
+
*
|
|
2952
|
+
* Example: getDialogDetailsByType(store, 'legend')
|
|
2953
|
+
* @param {object} store store object from which the ui state wll be extracted
|
|
2954
|
+
* @param {string} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation'
|
|
2955
|
+
* @returns {array} [string, boolean] first element gives the active map id, second element whether the dialog is open
|
|
2956
|
+
*/
|
|
2957
|
+
|
|
2958
|
+
var getDialogDetailsByType = function getDialogDetailsByType(store, dialogType) {
|
|
2959
|
+
if (store && store.ui && store.ui.dialogs && store.ui.dialogs[dialogType]) {
|
|
2960
|
+
return store.ui.dialogs[dialogType];
|
|
2961
|
+
}
|
|
2962
|
+
|
|
2963
|
+
return null;
|
|
2964
|
+
};
|
|
2965
|
+
/**
|
|
2966
|
+
* For a given ui component: gets wether the dialog is open or closed
|
|
2967
|
+
*
|
|
2968
|
+
* @param {object} store store object from which the ui state wll be extracted
|
|
2969
|
+
* @param {string} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation'
|
|
2970
|
+
* @returns {boolean} returnType: boolean
|
|
2971
|
+
*/
|
|
2972
|
+
|
|
2973
|
+
var getisDialogOpen = reselect.createSelector(getDialogDetailsByType, function (details) {
|
|
2974
|
+
if (details) {
|
|
2975
|
+
return details.isOpen;
|
|
2976
|
+
}
|
|
2977
|
+
|
|
2978
|
+
return false;
|
|
2979
|
+
});
|
|
2980
|
+
/**
|
|
2981
|
+
*For a given ui component: gets the active map Id
|
|
2982
|
+
*
|
|
2983
|
+
* @param {object} store store object from which the ui state wll be extracted
|
|
2984
|
+
* @param {string} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation'
|
|
2985
|
+
* @returns {string} returnType: string - the active map id
|
|
2986
|
+
*/
|
|
2987
|
+
|
|
2988
|
+
var getDialogMapId = reselect.createSelector(getDialogDetailsByType, function (details) {
|
|
2989
|
+
if (details) {
|
|
2990
|
+
return details.activeMapId;
|
|
2991
|
+
}
|
|
2992
|
+
|
|
2993
|
+
return '';
|
|
2994
|
+
});
|
|
2995
|
+
/**
|
|
2996
|
+
*For a given ui component: gets the order of visible dialog
|
|
2997
|
+
*
|
|
2998
|
+
* @param {object} store store object from which the ui state wll be extracted
|
|
2999
|
+
* @param {DialogType} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation' | dimensionSelect-ensemble_member
|
|
3000
|
+
* @returns {number} the higher the order number the higher the zIndex
|
|
3001
|
+
*/
|
|
3002
|
+
|
|
3003
|
+
var getDialogOrder = reselect.createSelector(function (store, dialogType) {
|
|
3004
|
+
if (store && store.ui && store.ui.order) {
|
|
3005
|
+
var order = store.ui.order;
|
|
3006
|
+
var visibleOrder = order.filter(function (orderedDialogType) {
|
|
3007
|
+
return store.ui.dialogs[orderedDialogType].isOpen;
|
|
3008
|
+
});
|
|
3009
|
+
|
|
3010
|
+
if (!visibleOrder.includes(dialogType)) {
|
|
3011
|
+
return 0;
|
|
3012
|
+
}
|
|
3013
|
+
|
|
3014
|
+
return visibleOrder.length - visibleOrder.indexOf(dialogType);
|
|
3015
|
+
}
|
|
3016
|
+
|
|
3017
|
+
return 0;
|
|
3018
|
+
}, function (order) {
|
|
3019
|
+
return order;
|
|
3020
|
+
});
|
|
3021
|
+
/**
|
|
3022
|
+
*For a given ui component: returns if ordered on top
|
|
3023
|
+
*
|
|
3024
|
+
* @param {object} store store object from which the ui state wll be extracted
|
|
3025
|
+
* @param {DialogType} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation' | dimensionSelect-ensemble_member
|
|
3026
|
+
* @returns {boolean}
|
|
3027
|
+
*/
|
|
3028
|
+
|
|
3029
|
+
var getDialogIsOrderedOnTop = reselect.createSelector(function (store, dialogType) {
|
|
3030
|
+
if (store && store.ui && store.ui.order) {
|
|
3031
|
+
var order = store.ui.order;
|
|
3032
|
+
return order.includes(dialogType) && order.indexOf(dialogType) === 0;
|
|
3033
|
+
}
|
|
3034
|
+
|
|
3035
|
+
return false;
|
|
3036
|
+
}, function (isOrderedOnTop) {
|
|
3037
|
+
return isOrderedOnTop;
|
|
3038
|
+
});
|
|
3039
|
+
var getDialogSource = reselect.createSelector(getDialogDetailsByType, function (details) {
|
|
3040
|
+
if (details && details.source) {
|
|
3041
|
+
return details.source;
|
|
3042
|
+
}
|
|
3043
|
+
|
|
3044
|
+
return 'app';
|
|
3045
|
+
});
|
|
3046
|
+
|
|
3047
|
+
var selectors = /*#__PURE__*/Object.freeze({
|
|
3048
|
+
__proto__: null,
|
|
3049
|
+
getDialogDetailsByType: getDialogDetailsByType,
|
|
3050
|
+
getisDialogOpen: getisDialogOpen,
|
|
3051
|
+
getDialogMapId: getDialogMapId,
|
|
3052
|
+
getDialogOrder: getDialogOrder,
|
|
3053
|
+
getDialogIsOrderedOnTop: getDialogIsOrderedOnTop,
|
|
3054
|
+
getDialogSource: getDialogSource
|
|
3055
|
+
});
|
|
3056
|
+
|
|
2904
3057
|
/* *
|
|
2905
3058
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2906
3059
|
* you may not use this file except in compliance with the License.
|
|
@@ -5143,7 +5296,7 @@
|
|
|
5143
5296
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5144
5297
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
5145
5298
|
* */
|
|
5146
|
-
var useStyles$
|
|
5299
|
+
var useStyles$B = makeStyles__default["default"](function (theme) {
|
|
5147
5300
|
return {
|
|
5148
5301
|
select: {
|
|
5149
5302
|
'& ul': {
|
|
@@ -5186,20 +5339,22 @@
|
|
|
5186
5339
|
currentIndex = _c === void 0 ? -1 : _c,
|
|
5187
5340
|
_d = _a.onChangeMouseWheel,
|
|
5188
5341
|
onChangeMouseWheel = _d === void 0 ? function () {} : _d,
|
|
5189
|
-
|
|
5342
|
+
_e = _a.requiresCtrlToChange,
|
|
5343
|
+
requiresCtrlToChange = _e === void 0 ? false : _e,
|
|
5344
|
+
props = __rest(_a, ["tooltip", "list", "currentIndex", "onChangeMouseWheel", "requiresCtrlToChange"]);
|
|
5190
5345
|
|
|
5191
5346
|
props.disableUnderline;
|
|
5192
5347
|
var otherProps = __rest(props, ["disableUnderline"]);
|
|
5193
5348
|
|
|
5194
|
-
var _e = __read(React__namespace.useState(false), 2),
|
|
5195
|
-
selectOpen = _e[0],
|
|
5196
|
-
setSelectOpen = _e[1];
|
|
5197
|
-
|
|
5198
5349
|
var _f = __read(React__namespace.useState(false), 2),
|
|
5199
|
-
|
|
5200
|
-
|
|
5350
|
+
selectOpen = _f[0],
|
|
5351
|
+
setSelectOpen = _f[1];
|
|
5201
5352
|
|
|
5202
|
-
var
|
|
5353
|
+
var _g = __read(React__namespace.useState(false), 2),
|
|
5354
|
+
tooltipOpen = _g[0],
|
|
5355
|
+
setTooltipOpen = _g[1];
|
|
5356
|
+
|
|
5357
|
+
var classes = useStyles$B();
|
|
5203
5358
|
|
|
5204
5359
|
var preventDefault = function preventDefault(event) {
|
|
5205
5360
|
event.preventDefault();
|
|
@@ -5215,11 +5370,14 @@
|
|
|
5215
5370
|
});
|
|
5216
5371
|
}, []);
|
|
5217
5372
|
var onWheel = React__namespace.useCallback(function (event) {
|
|
5218
|
-
if (
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5373
|
+
if (requiresCtrlToChange && (event.ctrlKey || event.metaKey) || !requiresCtrlToChange) {
|
|
5374
|
+
disableScroll();
|
|
5375
|
+
if (selectOpen) return;
|
|
5376
|
+
var direction = event.deltaY < 0 ? 1 : -1;
|
|
5377
|
+
var newValue = list[Math.min(Math.max(currentIndex - direction, 0), list.length - 1)];
|
|
5378
|
+
onChangeMouseWheel(newValue);
|
|
5379
|
+
} else enableScroll();
|
|
5380
|
+
}, [selectOpen, currentIndex, list, onChangeMouseWheel, enableScroll, disableScroll, requiresCtrlToChange]);
|
|
5223
5381
|
var onOpen = React__namespace.useCallback(function () {
|
|
5224
5382
|
setSelectOpen(true);
|
|
5225
5383
|
setTooltipOpen(false);
|
|
@@ -5228,17 +5386,23 @@
|
|
|
5228
5386
|
setSelectOpen(false);
|
|
5229
5387
|
}, []);
|
|
5230
5388
|
var onMouseEnter = React__namespace.useCallback(function () {
|
|
5231
|
-
|
|
5389
|
+
if (!requiresCtrlToChange) {
|
|
5390
|
+
disableScroll();
|
|
5391
|
+
}
|
|
5392
|
+
|
|
5232
5393
|
if (!selectOpen) setTooltipOpen(true);
|
|
5233
|
-
}, [selectOpen, disableScroll]);
|
|
5394
|
+
}, [selectOpen, disableScroll, requiresCtrlToChange]);
|
|
5234
5395
|
var onMouseLeave = React__namespace.useCallback(function () {
|
|
5235
5396
|
enableScroll();
|
|
5236
5397
|
setTooltipOpen(false);
|
|
5237
5398
|
}, [enableScroll]);
|
|
5238
5399
|
var onFocus = React__namespace.useCallback(function () {
|
|
5239
|
-
|
|
5400
|
+
if (!requiresCtrlToChange) {
|
|
5401
|
+
disableScroll();
|
|
5402
|
+
}
|
|
5403
|
+
|
|
5240
5404
|
setTooltipOpen(true);
|
|
5241
|
-
}, [disableScroll]);
|
|
5405
|
+
}, [disableScroll, requiresCtrlToChange]);
|
|
5242
5406
|
var onBlur = React__namespace.useCallback(function () {
|
|
5243
5407
|
enableScroll();
|
|
5244
5408
|
setTooltipOpen(false);
|
|
@@ -5450,120 +5614,6 @@
|
|
|
5450
5614
|
}
|
|
5451
5615
|
};
|
|
5452
5616
|
|
|
5453
|
-
/* *
|
|
5454
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5455
|
-
* you may not use this file except in compliance with the License.
|
|
5456
|
-
* You may obtain a copy of the License at
|
|
5457
|
-
*
|
|
5458
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5459
|
-
*
|
|
5460
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
5461
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5462
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5463
|
-
* See the License for the specific language governing permissions and
|
|
5464
|
-
* limitations under the License.
|
|
5465
|
-
*
|
|
5466
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5467
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
5468
|
-
* */
|
|
5469
|
-
/**
|
|
5470
|
-
* Gets the active map Id and wether a dialog is open or closed
|
|
5471
|
-
*
|
|
5472
|
-
* Example: getDialogDetailsByType(store, 'legend')
|
|
5473
|
-
* @param {object} store store object from which the ui state wll be extracted
|
|
5474
|
-
* @param {string} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation'
|
|
5475
|
-
* @returns {array} [string, boolean] first element gives the active map id, second element whether the dialog is open
|
|
5476
|
-
*/
|
|
5477
|
-
|
|
5478
|
-
var getDialogDetailsByType = function getDialogDetailsByType(store, dialogType) {
|
|
5479
|
-
if (store && store.ui && store.ui.dialogs && store.ui.dialogs[dialogType]) {
|
|
5480
|
-
return store.ui.dialogs[dialogType];
|
|
5481
|
-
}
|
|
5482
|
-
|
|
5483
|
-
return null;
|
|
5484
|
-
};
|
|
5485
|
-
/**
|
|
5486
|
-
* For a given ui component: gets wether the dialog is open or closed
|
|
5487
|
-
*
|
|
5488
|
-
* @param {object} store store object from which the ui state wll be extracted
|
|
5489
|
-
* @param {string} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation'
|
|
5490
|
-
* @returns {boolean} returnType: boolean
|
|
5491
|
-
*/
|
|
5492
|
-
|
|
5493
|
-
var getisDialogOpen = reselect.createSelector(getDialogDetailsByType, function (details) {
|
|
5494
|
-
if (details) {
|
|
5495
|
-
return details.isOpen;
|
|
5496
|
-
}
|
|
5497
|
-
|
|
5498
|
-
return false;
|
|
5499
|
-
});
|
|
5500
|
-
/**
|
|
5501
|
-
*For a given ui component: gets the active map Id
|
|
5502
|
-
*
|
|
5503
|
-
* @param {object} store store object from which the ui state wll be extracted
|
|
5504
|
-
* @param {string} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation'
|
|
5505
|
-
* @returns {string} returnType: string - the active map id
|
|
5506
|
-
*/
|
|
5507
|
-
|
|
5508
|
-
var getDialogMapId = reselect.createSelector(getDialogDetailsByType, function (details) {
|
|
5509
|
-
if (details) {
|
|
5510
|
-
return details.activeMapId;
|
|
5511
|
-
}
|
|
5512
|
-
|
|
5513
|
-
return '';
|
|
5514
|
-
});
|
|
5515
|
-
/**
|
|
5516
|
-
*For a given ui component: gets the order of visible dialog
|
|
5517
|
-
*
|
|
5518
|
-
* @param {object} store store object from which the ui state wll be extracted
|
|
5519
|
-
* @param {DialogType} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation' | dimensionSelect-ensemble_member
|
|
5520
|
-
* @returns {number} the higher the order number the higher the zIndex
|
|
5521
|
-
*/
|
|
5522
|
-
|
|
5523
|
-
var getDialogOrder = reselect.createSelector(function (store, dialogType) {
|
|
5524
|
-
if (store && store.ui && store.ui.order) {
|
|
5525
|
-
var order = store.ui.order;
|
|
5526
|
-
var visibleOrder = order.filter(function (orderedDialogType) {
|
|
5527
|
-
return store.ui.dialogs[orderedDialogType].isOpen;
|
|
5528
|
-
});
|
|
5529
|
-
|
|
5530
|
-
if (!visibleOrder.includes(dialogType)) {
|
|
5531
|
-
return 0;
|
|
5532
|
-
}
|
|
5533
|
-
|
|
5534
|
-
return visibleOrder.length - visibleOrder.indexOf(dialogType);
|
|
5535
|
-
}
|
|
5536
|
-
|
|
5537
|
-
return 0;
|
|
5538
|
-
}, function (order) {
|
|
5539
|
-
return order;
|
|
5540
|
-
});
|
|
5541
|
-
/**
|
|
5542
|
-
*For a given ui component: returns if ordered on top
|
|
5543
|
-
*
|
|
5544
|
-
* @param {object} store store object from which the ui state wll be extracted
|
|
5545
|
-
* @param {DialogType} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation' | dimensionSelect-ensemble_member
|
|
5546
|
-
* @returns {boolean}
|
|
5547
|
-
*/
|
|
5548
|
-
|
|
5549
|
-
var getDialogIsOrderedOnTop = reselect.createSelector(function (store, dialogType) {
|
|
5550
|
-
if (store && store.ui && store.ui.order) {
|
|
5551
|
-
var order = store.ui.order;
|
|
5552
|
-
return order.includes(dialogType) && order.indexOf(dialogType) === 0;
|
|
5553
|
-
}
|
|
5554
|
-
|
|
5555
|
-
return false;
|
|
5556
|
-
}, function (isOrderedOnTop) {
|
|
5557
|
-
return isOrderedOnTop;
|
|
5558
|
-
});
|
|
5559
|
-
var getDialogSource = reselect.createSelector(getDialogDetailsByType, function (details) {
|
|
5560
|
-
if (details && details.source) {
|
|
5561
|
-
return details.source;
|
|
5562
|
-
}
|
|
5563
|
-
|
|
5564
|
-
return 'app';
|
|
5565
|
-
});
|
|
5566
|
-
|
|
5567
5617
|
/* *
|
|
5568
5618
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5569
5619
|
* you may not use this file except in compliance with the License.
|
|
@@ -6373,6 +6423,21 @@
|
|
|
6373
6423
|
});
|
|
6374
6424
|
}
|
|
6375
6425
|
|
|
6426
|
+
case WEBMAP_DISABLE_PIN:
|
|
6427
|
+
{
|
|
6428
|
+
var _1 = action.payload,
|
|
6429
|
+
mapId_29 = _1.mapId,
|
|
6430
|
+
disableMapPin_1 = _1.disableMapPin;
|
|
6431
|
+
|
|
6432
|
+
if (!state.byId[mapId_29]) {
|
|
6433
|
+
return state;
|
|
6434
|
+
}
|
|
6435
|
+
|
|
6436
|
+
return produce.produce(state, function (draft) {
|
|
6437
|
+
draft.byId[mapId_29].disableMapPin = disableMapPin_1;
|
|
6438
|
+
});
|
|
6439
|
+
}
|
|
6440
|
+
|
|
6376
6441
|
case GENERIC_SYNC_SETLAYERACTIONS:
|
|
6377
6442
|
{
|
|
6378
6443
|
/*
|
|
@@ -6381,9 +6446,9 @@
|
|
|
6381
6446
|
* These targets can be used as payloads in new Layer actions.
|
|
6382
6447
|
* These actions are here handled via the layer reducer, as it is the same logic
|
|
6383
6448
|
*/
|
|
6384
|
-
var
|
|
6385
|
-
targets =
|
|
6386
|
-
source_1 =
|
|
6449
|
+
var _2 = action.payload,
|
|
6450
|
+
targets = _2.targets,
|
|
6451
|
+
source_1 = _2.source;
|
|
6387
6452
|
return targets.reduce(function (prevState, target) {
|
|
6388
6453
|
var action = {
|
|
6389
6454
|
payload: target,
|
|
@@ -8071,7 +8136,7 @@
|
|
|
8071
8136
|
},
|
|
8072
8137
|
{
|
|
8073
8138
|
name: "ECMWF",
|
|
8074
|
-
url: "https://
|
|
8139
|
+
url: "https://eccharts.ecmwf.int/wms/?token=public",
|
|
8075
8140
|
id: "ecmwf"
|
|
8076
8141
|
},
|
|
8077
8142
|
{
|
|
@@ -8190,7 +8255,7 @@
|
|
|
8190
8255
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8191
8256
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8192
8257
|
* */
|
|
8193
|
-
var useStyles$
|
|
8258
|
+
var useStyles$A = makeStyles__default["default"]({
|
|
8194
8259
|
buttonDiv: {
|
|
8195
8260
|
position: 'relative'
|
|
8196
8261
|
},
|
|
@@ -8226,7 +8291,7 @@
|
|
|
8226
8291
|
handleClose = _a.handleClose,
|
|
8227
8292
|
_e = _a.layerType,
|
|
8228
8293
|
layerType = _e === void 0 ? LayerType.mapLayer : _e;
|
|
8229
|
-
var classes = useStyles$
|
|
8294
|
+
var classes = useStyles$A();
|
|
8230
8295
|
|
|
8231
8296
|
var _f = __read(React__namespace.useState(''), 2),
|
|
8232
8297
|
serviceURL = _f[0],
|
|
@@ -8341,7 +8406,6 @@
|
|
|
8341
8406
|
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
8342
8407
|
"data-testid": "add-service",
|
|
8343
8408
|
onClick: handleAddServiceURL,
|
|
8344
|
-
color: "primary",
|
|
8345
8409
|
disabled: loading,
|
|
8346
8410
|
size: "large"
|
|
8347
8411
|
}, /*#__PURE__*/React__namespace.createElement(iconsMaterial.Add, null)), loading && /*#__PURE__*/React__namespace.createElement(material.CircularProgress, {
|
|
@@ -8391,26 +8455,23 @@
|
|
|
8391
8455
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8392
8456
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8393
8457
|
* */
|
|
8394
|
-
var
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
}
|
|
8412
|
-
};
|
|
8413
|
-
});
|
|
8458
|
+
var styles = {
|
|
8459
|
+
buttonDiv: {
|
|
8460
|
+
position: 'relative'
|
|
8461
|
+
},
|
|
8462
|
+
loadingButton: {
|
|
8463
|
+
position: 'absolute',
|
|
8464
|
+
top: 7,
|
|
8465
|
+
left: 7,
|
|
8466
|
+
zIndex: 1
|
|
8467
|
+
},
|
|
8468
|
+
button: {
|
|
8469
|
+
width: '24px',
|
|
8470
|
+
height: '24px',
|
|
8471
|
+
margin: '6px 0px 0px 10px',
|
|
8472
|
+
borderRadius: '15%'
|
|
8473
|
+
}
|
|
8474
|
+
};
|
|
8414
8475
|
|
|
8415
8476
|
var AddLayersButton = function AddLayersButton(_a) {
|
|
8416
8477
|
var onClickService = _a.onClickService,
|
|
@@ -8426,7 +8487,6 @@
|
|
|
8426
8487
|
_f = _a.shouldFocus,
|
|
8427
8488
|
shouldFocus = _f === void 0 ? false : _f;
|
|
8428
8489
|
var ref = React__namespace.useRef(null);
|
|
8429
|
-
var classes = useStyles$G();
|
|
8430
8490
|
|
|
8431
8491
|
var _g = __read(React__namespace.useState(false), 2),
|
|
8432
8492
|
open = _g[0],
|
|
@@ -8446,7 +8506,7 @@
|
|
|
8446
8506
|
title: tooltip
|
|
8447
8507
|
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
8448
8508
|
onClick: handleClose,
|
|
8449
|
-
|
|
8509
|
+
sx: styles.button,
|
|
8450
8510
|
disableRipple: true,
|
|
8451
8511
|
"data-testid": "addLayersButton",
|
|
8452
8512
|
ref: ref,
|
|
@@ -8551,24 +8611,18 @@
|
|
|
8551
8611
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8552
8612
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8553
8613
|
* */
|
|
8554
|
-
var
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
color: theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat,
|
|
8561
|
-
borderRadius: '15%'
|
|
8562
|
-
}
|
|
8563
|
-
};
|
|
8564
|
-
});
|
|
8614
|
+
var style$2 = {
|
|
8615
|
+
width: '24px',
|
|
8616
|
+
height: '24px',
|
|
8617
|
+
margin: '6px 0px 0px 10px',
|
|
8618
|
+
borderRadius: '15%'
|
|
8619
|
+
};
|
|
8565
8620
|
|
|
8566
8621
|
var LayerSelectButtonConnect = function LayerSelectButtonConnect(_a) {
|
|
8567
8622
|
var mapId = _a.mapId,
|
|
8568
8623
|
_b = _a.source,
|
|
8569
8624
|
source = _b === void 0 ? 'app' : _b;
|
|
8570
8625
|
var dispatch = reactRedux.useDispatch();
|
|
8571
|
-
var classes = useStyles$F();
|
|
8572
8626
|
var currentActiveMapId = reactRedux.useSelector(function (store) {
|
|
8573
8627
|
return getDialogMapId(store, 'layerSelect');
|
|
8574
8628
|
});
|
|
@@ -8587,7 +8641,7 @@
|
|
|
8587
8641
|
title: "Layer Select"
|
|
8588
8642
|
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
8589
8643
|
onClick: openLayerSelectDialog,
|
|
8590
|
-
|
|
8644
|
+
sx: style$2,
|
|
8591
8645
|
id: "layerSelectButton",
|
|
8592
8646
|
"data-testid": "layerSelectButton",
|
|
8593
8647
|
disableRipple: true,
|
|
@@ -8611,7 +8665,7 @@
|
|
|
8611
8665
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8612
8666
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8613
8667
|
* */
|
|
8614
|
-
var useStyles$
|
|
8668
|
+
var useStyles$z = makeStyles__default["default"]({
|
|
8615
8669
|
row: {
|
|
8616
8670
|
height: '32px'
|
|
8617
8671
|
},
|
|
@@ -8635,7 +8689,7 @@
|
|
|
8635
8689
|
layerManagerWidth = _a.layerManagerWidth,
|
|
8636
8690
|
_e = _a.layerSelect,
|
|
8637
8691
|
layerSelect = _e === void 0 ? false : _e;
|
|
8638
|
-
var classes = useStyles$
|
|
8692
|
+
var classes = useStyles$z();
|
|
8639
8693
|
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
8640
8694
|
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8641
8695
|
container: true,
|
|
@@ -8728,7 +8782,7 @@
|
|
|
8728
8782
|
'& .MuiSvgIcon-root': {
|
|
8729
8783
|
transition: 'none',
|
|
8730
8784
|
fill: function fill(isEnabled) {
|
|
8731
|
-
return isEnabled ? theme.palette.geowebColors.
|
|
8785
|
+
return isEnabled ? theme.palette.geowebColors.buttons.flat["default"].color : theme.palette.geowebColors.buttons.flat.disabled.color;
|
|
8732
8786
|
}
|
|
8733
8787
|
},
|
|
8734
8788
|
'&>div': {
|
|
@@ -8909,7 +8963,7 @@
|
|
|
8909
8963
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8910
8964
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8911
8965
|
* */
|
|
8912
|
-
var useStyles$
|
|
8966
|
+
var useStyles$y = makeStyles__default["default"](function (theme) {
|
|
8913
8967
|
return createStyles__default["default"]({
|
|
8914
8968
|
button: {
|
|
8915
8969
|
height: 28,
|
|
@@ -8918,20 +8972,22 @@
|
|
|
8918
8972
|
marginTop: 2,
|
|
8919
8973
|
color: function color(_a) {
|
|
8920
8974
|
var isActive = _a.isActive,
|
|
8975
|
+
isAccessible = _a.isAccessible,
|
|
8921
8976
|
isEnabled = _a.isEnabled;
|
|
8922
|
-
var _b = theme.palette.geowebColors.layerManager,
|
|
8923
|
-
tableRowDefaultIcon = _b.tableRowDefaultIcon,
|
|
8924
|
-
tableRowDisabledIcon = _b.tableRowDisabledIcon;
|
|
8925
8977
|
|
|
8926
8978
|
if (!isEnabled) {
|
|
8927
|
-
return
|
|
8979
|
+
return theme.palette.geowebColors.buttons.flat.disabled.color;
|
|
8980
|
+
}
|
|
8981
|
+
|
|
8982
|
+
if (isAccessible) {
|
|
8983
|
+
return theme.palette.geowebColors.greys.accessible;
|
|
8928
8984
|
}
|
|
8929
8985
|
|
|
8930
8986
|
if (isActive) {
|
|
8931
8987
|
return theme.palette.common.white;
|
|
8932
8988
|
}
|
|
8933
8989
|
|
|
8934
|
-
return
|
|
8990
|
+
return theme.palette.geowebColors.buttons.flat["default"].color;
|
|
8935
8991
|
},
|
|
8936
8992
|
backgroundColor: function backgroundColor(_a) {
|
|
8937
8993
|
var isActive = _a.isActive;
|
|
@@ -8940,7 +8996,7 @@
|
|
|
8940
8996
|
'&:focus': {
|
|
8941
8997
|
backgroundColor: function backgroundColor(_a) {
|
|
8942
8998
|
var isActive = _a.isActive;
|
|
8943
|
-
return isActive ? theme.palette.geowebColors.buttons.primary.mouseOver.fill : theme.palette.geowebColors.
|
|
8999
|
+
return isActive ? theme.palette.geowebColors.buttons.primary.mouseOver.fill : theme.palette.geowebColors.buttons.flat.mouseOver.fill;
|
|
8944
9000
|
},
|
|
8945
9001
|
outline: theme.palette.geowebColors.buttons.focusDefault.outline,
|
|
8946
9002
|
borderRadius: 0
|
|
@@ -8948,7 +9004,7 @@
|
|
|
8948
9004
|
'&:hover': {
|
|
8949
9005
|
backgroundColor: function backgroundColor(_a) {
|
|
8950
9006
|
var isActive = _a.isActive;
|
|
8951
|
-
return isActive ? theme.palette.geowebColors.buttons.primary.mouseOver.fill : theme.palette.geowebColors.
|
|
9007
|
+
return isActive ? theme.palette.geowebColors.buttons.primary.mouseOver.fill : theme.palette.geowebColors.buttons.flat.mouseOver.fill;
|
|
8952
9008
|
}
|
|
8953
9009
|
}
|
|
8954
9010
|
},
|
|
@@ -8969,11 +9025,15 @@
|
|
|
8969
9025
|
isEnabled = _e === void 0 ? true : _e,
|
|
8970
9026
|
icon = _a.icon,
|
|
8971
9027
|
testId = _a.testId,
|
|
8972
|
-
|
|
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"]);
|
|
8973
9032
|
|
|
8974
|
-
var classes = useStyles$
|
|
9033
|
+
var classes = useStyles$y({
|
|
8975
9034
|
isActive: isActive,
|
|
8976
|
-
isEnabled: isEnabled
|
|
9035
|
+
isEnabled: isEnabled,
|
|
9036
|
+
isAccessible: isAccessible
|
|
8977
9037
|
});
|
|
8978
9038
|
|
|
8979
9039
|
var handleClick = function handleClick(event) {
|
|
@@ -8990,7 +9050,7 @@
|
|
|
8990
9050
|
size: "small",
|
|
8991
9051
|
onClick: handleClick,
|
|
8992
9052
|
"data-testid": testId,
|
|
8993
|
-
className: classes.button,
|
|
9053
|
+
className: classes.button + " " + className,
|
|
8994
9054
|
disableFocusRipple: true
|
|
8995
9055
|
}, props), icon));
|
|
8996
9056
|
};
|
|
@@ -9011,7 +9071,7 @@
|
|
|
9011
9071
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9012
9072
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9013
9073
|
* */
|
|
9014
|
-
var useStyles$
|
|
9074
|
+
var useStyles$x = makeStyles__default["default"](function (theme) {
|
|
9015
9075
|
return createStyles__default["default"]({
|
|
9016
9076
|
checkbox: {
|
|
9017
9077
|
color: 'inherit',
|
|
@@ -9034,7 +9094,7 @@
|
|
|
9034
9094
|
var isEnabled = _a.isEnabled,
|
|
9035
9095
|
title = _a.title,
|
|
9036
9096
|
onChangeEnableLayer = _a.onChangeEnableLayer;
|
|
9037
|
-
var classes = useStyles$
|
|
9097
|
+
var classes = useStyles$x(isEnabled);
|
|
9038
9098
|
|
|
9039
9099
|
var onClick = function onClick() {
|
|
9040
9100
|
onChangeEnableLayer(!isEnabled);
|
|
@@ -9090,7 +9150,7 @@
|
|
|
9090
9150
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9091
9151
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9092
9152
|
* */
|
|
9093
|
-
var useStyles$
|
|
9153
|
+
var useStyles$w = makeStyles__default["default"](function (theme) {
|
|
9094
9154
|
return createStyles__default["default"]({
|
|
9095
9155
|
dropdownEmpty: {
|
|
9096
9156
|
paddingLeft: 8,
|
|
@@ -9106,6 +9166,33 @@
|
|
|
9106
9166
|
});
|
|
9107
9167
|
});
|
|
9108
9168
|
|
|
9169
|
+
var getRenderLayersValues = function getRenderLayersValues(layerName, layers) {
|
|
9170
|
+
var serviceLayer = layers.find(function (l) {
|
|
9171
|
+
return l.name === layerName;
|
|
9172
|
+
});
|
|
9173
|
+
|
|
9174
|
+
if (!serviceLayer && layerName) {
|
|
9175
|
+
return {
|
|
9176
|
+
currentValue: layerName,
|
|
9177
|
+
currentIndex: layers.length,
|
|
9178
|
+
extendedLayers: __spreadArray(__spreadArray([], __read(layers)), [{
|
|
9179
|
+
name: layerName,
|
|
9180
|
+
text: layerName,
|
|
9181
|
+
leaf: true,
|
|
9182
|
+
path: []
|
|
9183
|
+
}])
|
|
9184
|
+
};
|
|
9185
|
+
}
|
|
9186
|
+
|
|
9187
|
+
return {
|
|
9188
|
+
currentValue: (serviceLayer === null || serviceLayer === void 0 ? void 0 : serviceLayer.name) || '',
|
|
9189
|
+
currentIndex: layers.findIndex(function (l) {
|
|
9190
|
+
return l.name === (serviceLayer === null || serviceLayer === void 0 ? void 0 : serviceLayer.name);
|
|
9191
|
+
}),
|
|
9192
|
+
extendedLayers: layers
|
|
9193
|
+
};
|
|
9194
|
+
};
|
|
9195
|
+
|
|
9109
9196
|
var RenderLayers = function RenderLayers(_a) {
|
|
9110
9197
|
var onChangeLayerName = _a.onChangeLayerName,
|
|
9111
9198
|
layerName = _a.layerName,
|
|
@@ -9113,7 +9200,7 @@
|
|
|
9113
9200
|
layers = _b === void 0 ? [] : _b,
|
|
9114
9201
|
_c = _a.isEnabled,
|
|
9115
9202
|
isEnabled = _c === void 0 ? true : _c;
|
|
9116
|
-
var classes = useStyles$
|
|
9203
|
+
var classes = useStyles$w();
|
|
9117
9204
|
var containerClass = useTooltipContainerStyles(isEnabled);
|
|
9118
9205
|
|
|
9119
9206
|
if (!layers || !layers.length) {
|
|
@@ -9125,24 +9212,21 @@
|
|
|
9125
9212
|
}, "No service available"));
|
|
9126
9213
|
}
|
|
9127
9214
|
|
|
9128
|
-
var filteredLayers = layers.filter(function (l) {
|
|
9129
|
-
return l.name === layerName;
|
|
9130
|
-
});
|
|
9131
|
-
var currentValue = filteredLayers.length === 1 && filteredLayers[0].name ? filteredLayers[0].name : '';
|
|
9132
|
-
|
|
9133
9215
|
var selectLayer = function selectLayer(event) {
|
|
9134
9216
|
event.stopPropagation();
|
|
9135
9217
|
onChangeLayerName(event.target.value);
|
|
9136
9218
|
};
|
|
9137
9219
|
|
|
9138
|
-
var
|
|
9220
|
+
var _d = getRenderLayersValues(layerName, layers),
|
|
9221
|
+
currentIndex = _d.currentIndex,
|
|
9222
|
+
currentValue = _d.currentValue,
|
|
9223
|
+
extendedLayers = _d.extendedLayers;
|
|
9224
|
+
|
|
9225
|
+
var list = extendedLayers.map(function (layer) {
|
|
9139
9226
|
return {
|
|
9140
9227
|
value: layer.name
|
|
9141
9228
|
};
|
|
9142
9229
|
});
|
|
9143
|
-
var currentIndex = layers.findIndex(function (layer) {
|
|
9144
|
-
return currentValue === layer.name;
|
|
9145
|
-
});
|
|
9146
9230
|
return /*#__PURE__*/React__namespace.createElement(TooltipSelect, {
|
|
9147
9231
|
disableUnderline: true,
|
|
9148
9232
|
tooltip: "Select a layer",
|
|
@@ -9158,10 +9242,11 @@
|
|
|
9158
9242
|
onChange: selectLayer,
|
|
9159
9243
|
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
9160
9244
|
return onChangeLayerName(e.value);
|
|
9161
|
-
}
|
|
9245
|
+
},
|
|
9246
|
+
requiresCtrlToChange: true
|
|
9162
9247
|
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9163
9248
|
disabled: true
|
|
9164
|
-
}, "Select layer"),
|
|
9249
|
+
}, "Select layer"), extendedLayers.map(function (layerFromServiceLayers) {
|
|
9165
9250
|
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9166
9251
|
key: layerFromServiceLayers.name,
|
|
9167
9252
|
value: layerFromServiceLayers.name,
|
|
@@ -9186,7 +9271,7 @@
|
|
|
9186
9271
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9187
9272
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9188
9273
|
* */
|
|
9189
|
-
var useStyles$
|
|
9274
|
+
var useStyles$v = makeStyles__default["default"](function (theme) {
|
|
9190
9275
|
return {
|
|
9191
9276
|
opacityDiv: {
|
|
9192
9277
|
height: 'calc(100% - 5px)',
|
|
@@ -9247,7 +9332,7 @@
|
|
|
9247
9332
|
onLayerChangeOpacity = _a.onLayerChangeOpacity,
|
|
9248
9333
|
_b = _a.isEnabled,
|
|
9249
9334
|
isEnabled = _b === void 0 ? true : _b;
|
|
9250
|
-
var classes = useStyles$
|
|
9335
|
+
var classes = useStyles$v();
|
|
9251
9336
|
var sliderClasses = shared.sliderStyles();
|
|
9252
9337
|
var containerClass = useTooltipContainerStyles(isEnabled);
|
|
9253
9338
|
|
|
@@ -9273,11 +9358,17 @@
|
|
|
9273
9358
|
});
|
|
9274
9359
|
}, []);
|
|
9275
9360
|
var onWheel = React__namespace.useCallback(function (event) {
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9361
|
+
if (event.ctrlKey || event.metaKey) {
|
|
9362
|
+
disableScroll();
|
|
9363
|
+
var multiplier = event.altKey ? 10 : 1;
|
|
9364
|
+
var direction = event.deltaY > 0 ? 0.01 * multiplier : -0.01 * multiplier;
|
|
9365
|
+
var newValue_1 = Math.min(Math.max(currentOpacity - direction, 0), 1); // Kind of "one frame debouncer", meant to dampen too fast slider movement
|
|
9366
|
+
|
|
9367
|
+
window.requestAnimationFrame(function () {
|
|
9368
|
+
onLayerChangeOpacity(newValue_1);
|
|
9369
|
+
});
|
|
9370
|
+
} else enableScroll();
|
|
9371
|
+
}, [currentOpacity, onLayerChangeOpacity, disableScroll, enableScroll]);
|
|
9281
9372
|
var onClickButton = React__namespace.useCallback(function () {
|
|
9282
9373
|
setOpen(!open);
|
|
9283
9374
|
}, [open]);
|
|
@@ -9287,17 +9378,15 @@
|
|
|
9287
9378
|
}
|
|
9288
9379
|
}, [open]);
|
|
9289
9380
|
var onMouseEnter = React__namespace.useCallback(function () {
|
|
9290
|
-
disableScroll();
|
|
9291
9381
|
if (!open) setTooltipOpen(true);
|
|
9292
|
-
}, [open
|
|
9382
|
+
}, [open]);
|
|
9293
9383
|
var onMouseLeave = React__namespace.useCallback(function () {
|
|
9294
9384
|
enableScroll();
|
|
9295
9385
|
setTooltipOpen(false);
|
|
9296
9386
|
}, [enableScroll]);
|
|
9297
9387
|
var onFocus = React__namespace.useCallback(function () {
|
|
9298
|
-
disableScroll();
|
|
9299
9388
|
setTooltipOpen(true);
|
|
9300
|
-
}, [
|
|
9389
|
+
}, []);
|
|
9301
9390
|
var onBlur = React__namespace.useCallback(function () {
|
|
9302
9391
|
enableScroll();
|
|
9303
9392
|
setTooltipOpen(false);
|
|
@@ -9337,53 +9426,8 @@
|
|
|
9337
9426
|
event.stopPropagation();
|
|
9338
9427
|
onLayerChangeOpacity(newValue);
|
|
9339
9428
|
},
|
|
9340
|
-
onKeyDown: onKeyDown
|
|
9341
|
-
})) : null);
|
|
9342
|
-
};
|
|
9343
|
-
|
|
9344
|
-
/* *
|
|
9345
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9346
|
-
* you may not use this file except in compliance with the License.
|
|
9347
|
-
* You may obtain a copy of the License at
|
|
9348
|
-
*
|
|
9349
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9350
|
-
*
|
|
9351
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
9352
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9353
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9354
|
-
* See the License for the specific language governing permissions and
|
|
9355
|
-
* limitations under the License.
|
|
9356
|
-
*
|
|
9357
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9358
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9359
|
-
* */
|
|
9360
|
-
var useStyles$z = makeStyles__default["default"](function (theme) {
|
|
9361
|
-
return createStyles__default["default"]({
|
|
9362
|
-
icon: {
|
|
9363
|
-
minWidth: 32,
|
|
9364
|
-
color: theme.palette.geowebColors.layerManager.tableRowDefaultIcon.rgba
|
|
9365
|
-
},
|
|
9366
|
-
text: {
|
|
9367
|
-
fontSize: 16,
|
|
9368
|
-
color: theme.palette.geowebColors.layerManager.tableRowDefaultText.rgba
|
|
9369
|
-
}
|
|
9370
|
-
});
|
|
9371
|
-
});
|
|
9372
|
-
|
|
9373
|
-
var MenuItemButton = function MenuItemButton(_a) {
|
|
9374
|
-
var title = _a.title,
|
|
9375
|
-
tooltipTitle = _a.tooltipTitle,
|
|
9376
|
-
icon = _a.icon;
|
|
9377
|
-
var classes = useStyles$z();
|
|
9378
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(material.ListItemIcon, {
|
|
9379
|
-
className: classes.icon + " icon"
|
|
9380
|
-
}, icon), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
9381
|
-
title: tooltipTitle,
|
|
9382
|
-
placement: "top"
|
|
9383
|
-
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
9384
|
-
className: classes.text,
|
|
9385
|
-
variant: "inherit"
|
|
9386
|
-
}, title)));
|
|
9429
|
+
onKeyDown: onKeyDown
|
|
9430
|
+
})) : null);
|
|
9387
9431
|
};
|
|
9388
9432
|
|
|
9389
9433
|
/* *
|
|
@@ -9402,70 +9446,39 @@
|
|
|
9402
9446
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9403
9447
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9404
9448
|
* */
|
|
9405
|
-
var
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
backgroundColor: theme.palette.geowebColors.background.surface,
|
|
9409
|
-
'& li:hover': {
|
|
9410
|
-
backgroundColor: theme.palette.geowebColors.layerManager.tableRowMouseover.rgba
|
|
9411
|
-
}
|
|
9412
|
-
}
|
|
9413
|
-
};
|
|
9414
|
-
});
|
|
9449
|
+
var CopyIcon = /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
9450
|
+
d: "M8 7v2H6a1 1 0 0 0-.993.883L5 10v9a1 1 0 0 0 .883.993L6 20h6a1 1 0 0 0 .993-.883L13 19h2v1.6a1.4 1.4 0 0 1-1.263 1.394l-.135.006H4.399a1.4 1.4 0 0 1-1.393-1.265L3 20.6V8.4a1.4 1.4 0 0 1 1.264-1.394L4.4 7H8zm7.584-5v2H12a1 1 0 0 0-.993.883L11 5v9a1 1 0 0 0 .883.993L12 15h6a1 1 0 0 0 .993-.883L19 14V7.42h2v8.18a1.4 1.4 0 0 1-1.263 1.394l-.135.006h-9.203a1.4 1.4 0 0 1-1.393-1.265L9 15.6V3.4a1.4 1.4 0 0 1 1.264-1.394L10.4 2h5.185zM17 2l4 4h-2.5c-.777 0-1.42-.598-1.493-1.357L17 4.499V2z"
|
|
9451
|
+
}));
|
|
9415
9452
|
|
|
9416
9453
|
var LayerManagerMenuButton = function LayerManagerMenuButton(_a) {
|
|
9417
|
-
var
|
|
9418
|
-
mapId = _a.mapId,
|
|
9454
|
+
var mapId = _a.mapId,
|
|
9419
9455
|
layerId = _a.layerId,
|
|
9420
|
-
onLayerDuplicate = _a.onLayerDuplicate
|
|
9421
|
-
_b = _a.isEnabled,
|
|
9422
|
-
isEnabled = _b === void 0 ? true : _b;
|
|
9423
|
-
var classes = useStyles$y();
|
|
9424
|
-
|
|
9425
|
-
var _c = __read(React__namespace.useState(null), 2),
|
|
9426
|
-
anchorEl = _c[0],
|
|
9427
|
-
setAnchorEl = _c[1];
|
|
9428
|
-
|
|
9429
|
-
var handleClick = function handleClick(event) {
|
|
9430
|
-
setAnchorEl(event.currentTarget);
|
|
9431
|
-
};
|
|
9432
|
-
|
|
9433
|
-
var handleClose = function handleClose() {
|
|
9434
|
-
setAnchorEl(null);
|
|
9435
|
-
};
|
|
9456
|
+
onLayerDuplicate = _a.onLayerDuplicate;
|
|
9436
9457
|
|
|
9437
9458
|
var onClickDuplicate = function onClickDuplicate() {
|
|
9438
9459
|
onLayerDuplicate({
|
|
9439
9460
|
mapId: mapId,
|
|
9440
9461
|
layerId: layerId
|
|
9441
9462
|
});
|
|
9442
|
-
handleClose();
|
|
9443
9463
|
};
|
|
9444
9464
|
|
|
9445
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
9446
|
-
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9452
|
-
|
|
9453
|
-
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
|
|
9457
|
-
|
|
9458
|
-
|
|
9459
|
-
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
}, /*#__PURE__*/React__namespace.createElement(MenuItemButton, {
|
|
9463
|
-
title: "Duplicate layer",
|
|
9464
|
-
tooltipTitle: "Duplicate layer",
|
|
9465
|
-
icon: /*#__PURE__*/React__namespace.createElement(iconsMaterial.FileCopy, {
|
|
9466
|
-
fontSize: "small"
|
|
9467
|
-
})
|
|
9468
|
-
}))));
|
|
9465
|
+
return /*#__PURE__*/React__namespace.createElement(shared.ToggleMenu, {
|
|
9466
|
+
buttonTestId: "openMenuButton",
|
|
9467
|
+
buttonSx: {
|
|
9468
|
+
margin: '4px 2px',
|
|
9469
|
+
'&.MuiButtonBase-root': {
|
|
9470
|
+
backgroundColor: 'transparent',
|
|
9471
|
+
color: 'geowebColors.greys.accessible'
|
|
9472
|
+
}
|
|
9473
|
+
},
|
|
9474
|
+
menuPosition: "bottom",
|
|
9475
|
+
menuItems: [{
|
|
9476
|
+
text: 'Duplicate layer',
|
|
9477
|
+
action: onClickDuplicate,
|
|
9478
|
+
icon: CopyIcon
|
|
9479
|
+
}],
|
|
9480
|
+
tooltipTitle: "Open menu"
|
|
9481
|
+
});
|
|
9469
9482
|
};
|
|
9470
9483
|
|
|
9471
9484
|
var RenderStyles = function RenderStyles(_a) {
|
|
@@ -9517,7 +9530,8 @@
|
|
|
9517
9530
|
onChange: selectStyle,
|
|
9518
9531
|
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
9519
9532
|
return onChangeLayerStyle(e.value);
|
|
9520
|
-
}
|
|
9533
|
+
},
|
|
9534
|
+
requiresCtrlToChange: true
|
|
9521
9535
|
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9522
9536
|
disabled: true
|
|
9523
9537
|
}, "Select style"), styles.map(function (styleFromlayer) {
|
|
@@ -9544,7 +9558,7 @@
|
|
|
9544
9558
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9545
9559
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9546
9560
|
* */
|
|
9547
|
-
var useStyles$
|
|
9561
|
+
var useStyles$u = makeStyles__default["default"](function () {
|
|
9548
9562
|
return createStyles__default["default"]({
|
|
9549
9563
|
icon: {
|
|
9550
9564
|
width: 20,
|
|
@@ -9558,7 +9572,7 @@
|
|
|
9558
9572
|
onClickDelete = _a.onClickDelete,
|
|
9559
9573
|
_b = _a.isEnabled,
|
|
9560
9574
|
isEnabled = _b === void 0 ? true : _b;
|
|
9561
|
-
var classes = useStyles$
|
|
9575
|
+
var classes = useStyles$u();
|
|
9562
9576
|
return /*#__PURE__*/React__namespace.createElement(LayerManagerButton, {
|
|
9563
9577
|
tooltipTitle: tooltipTitle,
|
|
9564
9578
|
onClick: onClickDelete,
|
|
@@ -9586,30 +9600,17 @@
|
|
|
9586
9600
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9587
9601
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9588
9602
|
* */
|
|
9589
|
-
var useStyles$
|
|
9603
|
+
var useStyles$t = makeStyles__default["default"](function (theme) {
|
|
9590
9604
|
return createStyles__default["default"]({
|
|
9591
|
-
icon: {
|
|
9592
|
-
width: 18,
|
|
9593
|
-
height: 18,
|
|
9594
|
-
marginTop: 4
|
|
9595
|
-
},
|
|
9596
9605
|
svgIcon: {
|
|
9597
9606
|
fill: function fill(_a) {
|
|
9598
|
-
var isActive = _a.isActive
|
|
9599
|
-
isEnabled = _a.isEnabled;
|
|
9600
|
-
var _b = theme.palette.geowebColors.layerManager,
|
|
9601
|
-
tableRowDefaultIcon = _b.tableRowDefaultIcon,
|
|
9602
|
-
tableRowDisabledIcon = _b.tableRowDisabledIcon;
|
|
9607
|
+
var isActive = _a.isActive;
|
|
9603
9608
|
|
|
9604
9609
|
if (isActive) {
|
|
9605
9610
|
return theme.palette.common.white;
|
|
9606
9611
|
}
|
|
9607
9612
|
|
|
9608
|
-
|
|
9609
|
-
return tableRowDisabledIcon.fill;
|
|
9610
|
-
}
|
|
9611
|
-
|
|
9612
|
-
return tableRowDefaultIcon.rgba;
|
|
9613
|
+
return theme.palette.geowebColors.buttons.flat["default"].color;
|
|
9613
9614
|
}
|
|
9614
9615
|
}
|
|
9615
9616
|
});
|
|
@@ -9623,14 +9624,18 @@
|
|
|
9623
9624
|
isActive = _c === void 0 ? false : _c,
|
|
9624
9625
|
_d = _a.isEnabled,
|
|
9625
9626
|
isEnabled = _d === void 0 ? true : _d;
|
|
9626
|
-
var classes = useStyles$
|
|
9627
|
+
var classes = useStyles$t({
|
|
9627
9628
|
isActive: isActive,
|
|
9628
9629
|
isEnabled: isEnabled
|
|
9629
9630
|
});
|
|
9630
9631
|
|
|
9631
9632
|
var Icon = function Icon() {
|
|
9632
9633
|
return /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
|
|
9633
|
-
|
|
9634
|
+
sx: {
|
|
9635
|
+
width: '18px',
|
|
9636
|
+
height: '18px',
|
|
9637
|
+
marginTop: '4px'
|
|
9638
|
+
}
|
|
9634
9639
|
}, /*#__PURE__*/React__namespace.createElement("g", {
|
|
9635
9640
|
id: "Concept-3",
|
|
9636
9641
|
stroke: "none",
|
|
@@ -9672,7 +9677,7 @@
|
|
|
9672
9677
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9673
9678
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9674
9679
|
* */
|
|
9675
|
-
var useStyles$
|
|
9680
|
+
var useStyles$s = makeStyles__default["default"](function (theme) {
|
|
9676
9681
|
return createStyles__default["default"]({
|
|
9677
9682
|
row: {
|
|
9678
9683
|
background: function background(isEnabled) {
|
|
@@ -9724,7 +9729,7 @@
|
|
|
9724
9729
|
layerActiveLayout = _a.layerActiveLayout,
|
|
9725
9730
|
layerManagerWidth = _a.layerManagerWidth,
|
|
9726
9731
|
dragHandle = _a.dragHandle;
|
|
9727
|
-
var classes = useStyles$
|
|
9732
|
+
var classes = useStyles$s(isEnabled);
|
|
9728
9733
|
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
9729
9734
|
|
|
9730
9735
|
var onClickRow = function onClickRow() {
|
|
@@ -9817,7 +9822,6 @@
|
|
|
9817
9822
|
});
|
|
9818
9823
|
}
|
|
9819
9824
|
}), layerMenuLayout || /*#__PURE__*/React__default["default"].createElement(LayerManagerMenuButton, {
|
|
9820
|
-
tooltipTitle: "Open Menu",
|
|
9821
9825
|
mapId: mapId,
|
|
9822
9826
|
layerId: layerId,
|
|
9823
9827
|
onLayerDuplicate: onLayerDuplicate
|
|
@@ -10145,11 +10149,7 @@
|
|
|
10145
10149
|
origin: 'MenuButtonConnect'
|
|
10146
10150
|
}));
|
|
10147
10151
|
}, [dispatch]);
|
|
10148
|
-
var isLayerEnabled = reactRedux.useSelector(function (store) {
|
|
10149
|
-
return getLayerEnabled(store, layerId);
|
|
10150
|
-
});
|
|
10151
10152
|
return /*#__PURE__*/React__namespace.createElement(LayerManagerMenuButton, {
|
|
10152
|
-
tooltipTitle: "Open Menu",
|
|
10153
10153
|
layerId: layerId,
|
|
10154
10154
|
mapId: mapId,
|
|
10155
10155
|
onLayerDuplicate: function onLayerDuplicate() {
|
|
@@ -10158,8 +10158,7 @@
|
|
|
10158
10158
|
mapId: mapId,
|
|
10159
10159
|
layer: layer
|
|
10160
10160
|
});
|
|
10161
|
-
}
|
|
10162
|
-
isEnabled: isLayerEnabled
|
|
10161
|
+
}
|
|
10163
10162
|
});
|
|
10164
10163
|
};
|
|
10165
10164
|
|
|
@@ -10306,22 +10305,6 @@
|
|
|
10306
10305
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10307
10306
|
* */
|
|
10308
10307
|
var TOOLTIP_TITLE = 'Drag a layer up or down';
|
|
10309
|
-
var useStyles$u = makeStyles__default["default"](function (theme) {
|
|
10310
|
-
return {
|
|
10311
|
-
dragHandle: {
|
|
10312
|
-
cursor: 'grab',
|
|
10313
|
-
backgroundColor: 'inherit',
|
|
10314
|
-
'&:hover': {
|
|
10315
|
-
backgroundColor: 'inherit'
|
|
10316
|
-
},
|
|
10317
|
-
height: 32,
|
|
10318
|
-
color: function color(_a) {
|
|
10319
|
-
var isDisabled = _a.isDisabled;
|
|
10320
|
-
return isDisabled ? theme.palette.geowebColors.layerManager.tableRowDefaultIcon.rgba : theme.palette.geowebColors.layerManager.tableRowDisabledIcon.fill;
|
|
10321
|
-
}
|
|
10322
|
-
}
|
|
10323
|
-
};
|
|
10324
|
-
});
|
|
10325
10308
|
|
|
10326
10309
|
var DragHandle = function DragHandle(_a) {
|
|
10327
10310
|
var _b = _a.isDisabled,
|
|
@@ -10330,20 +10313,26 @@
|
|
|
10330
10313
|
index = _c === void 0 ? undefined : _c,
|
|
10331
10314
|
_d = _a.hideTooltip,
|
|
10332
10315
|
hideTooltip = _d === void 0 ? false : _d;
|
|
10333
|
-
var classes = useStyles$u({
|
|
10334
|
-
isDisabled: isDisabled
|
|
10335
|
-
});
|
|
10336
10316
|
var tooltipTitle = hideTooltip ? '' : TOOLTIP_TITLE;
|
|
10337
10317
|
return /*#__PURE__*/React__default["default"].createElement(LayerManagerButton, {
|
|
10338
10318
|
tooltipTitle: tooltipTitle,
|
|
10339
10319
|
icon: /*#__PURE__*/React__default["default"].createElement(iconsMaterial.DragIndicator, null),
|
|
10340
10320
|
testId: "dragHandle" + (index !== undefined ? "-" + index : ''),
|
|
10341
|
-
className:
|
|
10321
|
+
className: "handle",
|
|
10342
10322
|
tabIndex: -1,
|
|
10343
10323
|
isEnabled: !isDisabled,
|
|
10344
10324
|
disableFocusRipple: true,
|
|
10345
10325
|
disableTouchRipple: true,
|
|
10346
|
-
disabled: isDisabled
|
|
10326
|
+
disabled: isDisabled,
|
|
10327
|
+
isAccessible: true,
|
|
10328
|
+
sx: {
|
|
10329
|
+
cursor: 'grab',
|
|
10330
|
+
'&:hover': {
|
|
10331
|
+
backgroundColor: 'inherit!important'
|
|
10332
|
+
},
|
|
10333
|
+
marginLeft: '3px',
|
|
10334
|
+
marginRight: '3px'
|
|
10335
|
+
}
|
|
10347
10336
|
});
|
|
10348
10337
|
};
|
|
10349
10338
|
|
|
@@ -10363,7 +10352,7 @@
|
|
|
10363
10352
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10364
10353
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10365
10354
|
* */
|
|
10366
|
-
var useStyles$
|
|
10355
|
+
var useStyles$r = makeStyles__default["default"](function () {
|
|
10367
10356
|
return {
|
|
10368
10357
|
layerRows: {
|
|
10369
10358
|
width: '100%',
|
|
@@ -10429,7 +10418,7 @@
|
|
|
10429
10418
|
|
|
10430
10419
|
var isSorting = activeDragIndex !== null;
|
|
10431
10420
|
var isDragDisabled = layerIds.length === 1;
|
|
10432
|
-
var classes = useStyles$
|
|
10421
|
+
var classes = useStyles$r(isSorting);
|
|
10433
10422
|
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10434
10423
|
container: true,
|
|
10435
10424
|
item: true,
|
|
@@ -10639,7 +10628,7 @@
|
|
|
10639
10628
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10640
10629
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10641
10630
|
* */
|
|
10642
|
-
var useStyles$
|
|
10631
|
+
var useStyles$q = makeStyles__default["default"]({
|
|
10643
10632
|
layerRow: {
|
|
10644
10633
|
width: '100%',
|
|
10645
10634
|
height: '36px'
|
|
@@ -10662,7 +10651,7 @@
|
|
|
10662
10651
|
layerManagerWidth = _a.layerManagerWidth,
|
|
10663
10652
|
_d = _a.tooltip,
|
|
10664
10653
|
tooltip = _d === void 0 ? '' : _d;
|
|
10665
|
-
var classes = useStyles$
|
|
10654
|
+
var classes = useStyles$q();
|
|
10666
10655
|
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
10667
10656
|
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10668
10657
|
container: true,
|
|
@@ -10707,7 +10696,7 @@
|
|
|
10707
10696
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10708
10697
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10709
10698
|
* */
|
|
10710
|
-
var useStyles$
|
|
10699
|
+
var useStyles$p = makeStyles__default["default"]({
|
|
10711
10700
|
layerRowContainer: {
|
|
10712
10701
|
position: 'relative',
|
|
10713
10702
|
width: '100%',
|
|
@@ -10742,7 +10731,7 @@
|
|
|
10742
10731
|
layerSelect = _e === void 0 ? false : _e,
|
|
10743
10732
|
_f = _a.showAddLayersTooltip,
|
|
10744
10733
|
showAddLayersTooltip = _f === void 0 ? true : _f;
|
|
10745
|
-
var classes = useStyles$
|
|
10734
|
+
var classes = useStyles$p();
|
|
10746
10735
|
|
|
10747
10736
|
var _g = __read(React__namespace.useState(LayerManagerWidth.lg), 2),
|
|
10748
10737
|
layerManagerWidth = _g[0],
|
|
@@ -10798,80 +10787,6 @@
|
|
|
10798
10787
|
}))));
|
|
10799
10788
|
};
|
|
10800
10789
|
|
|
10801
|
-
/* *
|
|
10802
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10803
|
-
* you may not use this file except in compliance with the License.
|
|
10804
|
-
* You may obtain a copy of the License at
|
|
10805
|
-
*
|
|
10806
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10807
|
-
*
|
|
10808
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
10809
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10810
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10811
|
-
* See the License for the specific language governing permissions and
|
|
10812
|
-
* limitations under the License.
|
|
10813
|
-
*
|
|
10814
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10815
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10816
|
-
* */
|
|
10817
|
-
|
|
10818
|
-
var CustomToggleButton = function CustomToggleButton(_a) {
|
|
10819
|
-
var _b = _a.variant,
|
|
10820
|
-
variant = _b === void 0 ? 'primary' : _b,
|
|
10821
|
-
_c = _a.value,
|
|
10822
|
-
value = _c === void 0 ? 0 : _c,
|
|
10823
|
-
props = __rest(_a, ["variant", "value"]);
|
|
10824
|
-
|
|
10825
|
-
return /*#__PURE__*/React__namespace.createElement(material.ToggleButton, __assign({
|
|
10826
|
-
className: variant,
|
|
10827
|
-
value: value
|
|
10828
|
-
}, props));
|
|
10829
|
-
};
|
|
10830
|
-
|
|
10831
|
-
/* *
|
|
10832
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10833
|
-
* you may not use this file except in compliance with the License.
|
|
10834
|
-
* You may obtain a copy of the License at
|
|
10835
|
-
*
|
|
10836
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10837
|
-
*
|
|
10838
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
10839
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10840
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10841
|
-
* See the License for the specific language governing permissions and
|
|
10842
|
-
* limitations under the License.
|
|
10843
|
-
*
|
|
10844
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10845
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10846
|
-
* */
|
|
10847
|
-
|
|
10848
|
-
var ToolButton = function ToolButton(_a) {
|
|
10849
|
-
var active = _a.active,
|
|
10850
|
-
_b = _a.width,
|
|
10851
|
-
width = _b === void 0 ? '24px' : _b,
|
|
10852
|
-
_c = _a.height,
|
|
10853
|
-
height = _c === void 0 ? '24px' : _c,
|
|
10854
|
-
children = _a.children,
|
|
10855
|
-
_d = _a.value,
|
|
10856
|
-
value = _d === void 0 ? 0 : _d,
|
|
10857
|
-
_e = _a.sx,
|
|
10858
|
-
sx = _e === void 0 ? {} : _e,
|
|
10859
|
-
props = __rest(_a, ["active", "width", "height", "children", "value", "sx"]);
|
|
10860
|
-
|
|
10861
|
-
return /*#__PURE__*/React__namespace.createElement(CustomToggleButton, __assign({
|
|
10862
|
-
variant: "tool",
|
|
10863
|
-
disableRipple: true,
|
|
10864
|
-
selected: active,
|
|
10865
|
-
value: value,
|
|
10866
|
-
sx: __assign({
|
|
10867
|
-
width: width + "!important",
|
|
10868
|
-
height: height + "!important",
|
|
10869
|
-
textTransform: 'none!important',
|
|
10870
|
-
padding: '11px!important'
|
|
10871
|
-
}, sx)
|
|
10872
|
-
}, props), children);
|
|
10873
|
-
};
|
|
10874
|
-
|
|
10875
10790
|
/* *
|
|
10876
10791
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10877
10792
|
* you may not use this file except in compliance with the License.
|
|
@@ -10908,7 +10823,7 @@
|
|
|
10908
10823
|
source: source
|
|
10909
10824
|
}));
|
|
10910
10825
|
}, [currentActiveMapId, dispatch, isOpenInStore, mapId, source]);
|
|
10911
|
-
return /*#__PURE__*/React__namespace.createElement(ToolButton, {
|
|
10826
|
+
return /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
10912
10827
|
onClick: openFilterResultsDialog,
|
|
10913
10828
|
active: isOpenInStore,
|
|
10914
10829
|
id: "keywordFilterButton",
|
|
@@ -11487,13 +11402,6 @@
|
|
|
11487
11402
|
var isURL = function isURL(string) {
|
|
11488
11403
|
return /^https?:\/\//.test(string);
|
|
11489
11404
|
};
|
|
11490
|
-
var useStyles$q = makeStyles__default["default"](function (theme) {
|
|
11491
|
-
return {
|
|
11492
|
-
iconButton: {
|
|
11493
|
-
color: theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat
|
|
11494
|
-
}
|
|
11495
|
-
};
|
|
11496
|
-
});
|
|
11497
11405
|
var clearIconPath = 'M12,2 C17.5228475,2 22,6.4771525 22,12 C22,17.5228475 17.5228475,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M15.44426,7.26697571 L12.0002861,10.7110482 L8.55573996,7.26697571 C8.19978253,6.9110081 7.62292549,6.9110081 7.26696807,7.26697571 C6.91101064,7.62294331 6.91101064,8.19981687 7.26696807,8.55578447 L10.7115142,11.9998569 L7.26696807,15.4445017 C6.91101064,15.8004693 6.91101064,16.3767705 7.26696807,16.7333104 C7.44494678,16.910722 7.67843653,17 7.91192629,17 C8.14484377,17 8.37776125,16.910722 8.55573996,16.7333104 L12.0002861,13.289238 L15.44426,16.7333104 C15.6222388,16.910722 15.8551562,17 16.088646,17 C16.3221357,17 16.5550532,16.910722 16.7330319,16.7333104 C17.0889894,16.3767705 17.0889894,15.8004693 16.7330319,15.4445017 L13.289058,11.9998569 L16.7330319,8.55578447 C17.0889894,8.19981687 17.0889894,7.62294331 16.7330319,7.26697571 C16.3770745,6.9110081 15.8002175,6.9110081 15.44426,7.26697571 Z';
|
|
11498
11406
|
var clearIcon = /*#__PURE__*/React__default["default"].createElement(material.SvgIcon, {
|
|
11499
11407
|
style: {
|
|
@@ -11525,7 +11433,6 @@
|
|
|
11525
11433
|
isPopupOpen = _b[0],
|
|
11526
11434
|
setPopupOpen = _b[1];
|
|
11527
11435
|
|
|
11528
|
-
var classes = useStyles$q();
|
|
11529
11436
|
React__default["default"].useEffect(function () {
|
|
11530
11437
|
if (isPopupOpen === false) {
|
|
11531
11438
|
onClickClear();
|
|
@@ -11536,7 +11443,6 @@
|
|
|
11536
11443
|
title: "Clear",
|
|
11537
11444
|
placement: "top"
|
|
11538
11445
|
}, /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
|
|
11539
|
-
className: classes.iconButton,
|
|
11540
11446
|
edge: "end",
|
|
11541
11447
|
onClick: function onClick() {
|
|
11542
11448
|
onClickClear();
|
|
@@ -11565,7 +11471,6 @@
|
|
|
11565
11471
|
title: "Search",
|
|
11566
11472
|
placement: "top"
|
|
11567
11473
|
}, /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
|
|
11568
|
-
className: classes.iconButton,
|
|
11569
11474
|
edge: "end",
|
|
11570
11475
|
size: "large"
|
|
11571
11476
|
}, searchIcon));
|
|
@@ -11664,6 +11569,50 @@
|
|
|
11664
11569
|
});
|
|
11665
11570
|
};
|
|
11666
11571
|
|
|
11572
|
+
/* *
|
|
11573
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11574
|
+
* you may not use this file except in compliance with the License.
|
|
11575
|
+
* You may obtain a copy of the License at
|
|
11576
|
+
*
|
|
11577
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11578
|
+
*
|
|
11579
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11580
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11581
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11582
|
+
* See the License for the specific language governing permissions and
|
|
11583
|
+
* limitations under the License.
|
|
11584
|
+
*
|
|
11585
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11586
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
11587
|
+
* */
|
|
11588
|
+
|
|
11589
|
+
var LayerAddRemoveButton = function LayerAddRemoveButton(_a) {
|
|
11590
|
+
var layer = _a.layer,
|
|
11591
|
+
layerIndex = _a.layerIndex,
|
|
11592
|
+
serviceId = _a.serviceId,
|
|
11593
|
+
addLayer = _a.addLayer,
|
|
11594
|
+
deleteLayer = _a.deleteLayer,
|
|
11595
|
+
mapLayers = _a.mapLayers;
|
|
11596
|
+
var foundLayer = mapLayers.find(function (lr) {
|
|
11597
|
+
return lr.name === layer.name && lr.service === serviceId;
|
|
11598
|
+
});
|
|
11599
|
+
return /*#__PURE__*/React__namespace.createElement(shared.CustomToggleButton, {
|
|
11600
|
+
"data-testid": "layerAddRemoveButton-" + layer.name,
|
|
11601
|
+
onClick: function onClick() {
|
|
11602
|
+
!foundLayer ? addLayer({
|
|
11603
|
+
serviceURL: serviceId,
|
|
11604
|
+
layerName: layer.name
|
|
11605
|
+
}) : deleteLayer({
|
|
11606
|
+
layerId: foundLayer.id,
|
|
11607
|
+
layerIndex: layerIndex
|
|
11608
|
+
});
|
|
11609
|
+
},
|
|
11610
|
+
selected: !!foundLayer,
|
|
11611
|
+
variant: "tool",
|
|
11612
|
+
fullWidth: true
|
|
11613
|
+
}, !foundLayer ? 'Add' : 'Remove');
|
|
11614
|
+
};
|
|
11615
|
+
|
|
11667
11616
|
/* *
|
|
11668
11617
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11669
11618
|
* you may not use this file except in compliance with the License.
|
|
@@ -11718,35 +11667,35 @@
|
|
|
11718
11667
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11719
11668
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11720
11669
|
* */
|
|
11721
|
-
var useStyles$
|
|
11670
|
+
var useStyles$o = makeStyles__default["default"](function (theme) {
|
|
11722
11671
|
return {
|
|
11723
11672
|
layerRow: {
|
|
11724
|
-
background: theme.palette.geowebColors.
|
|
11673
|
+
background: theme.palette.geowebColors.cards.cardContainer,
|
|
11725
11674
|
padding: '8px 0px 8px 12px',
|
|
11726
11675
|
marginBottom: '4px',
|
|
11727
11676
|
height: '64px',
|
|
11728
|
-
border: "solid 1px " + theme.palette.geowebColors.cards.cardContainerBorder
|
|
11677
|
+
border: "solid 1px " + theme.palette.geowebColors.cards.cardContainerBorder,
|
|
11678
|
+
display: 'grid',
|
|
11679
|
+
gridTemplateColumns: '1fr 0.1fr',
|
|
11680
|
+
gridGap: '20px'
|
|
11729
11681
|
},
|
|
11730
11682
|
layerText: {
|
|
11731
11683
|
fontSize: '12px',
|
|
11732
11684
|
fontWeight: 500,
|
|
11733
11685
|
overflow: 'clip',
|
|
11734
11686
|
height: '20px',
|
|
11735
|
-
textOverflow: 'ellipsis'
|
|
11736
|
-
whiteSpace: 'nowrap'
|
|
11687
|
+
textOverflow: 'ellipsis'
|
|
11737
11688
|
},
|
|
11738
11689
|
layerName: {
|
|
11739
11690
|
fontSize: '12px',
|
|
11740
11691
|
height: '24px',
|
|
11741
|
-
maxWidth: '100%',
|
|
11742
11692
|
overflow: 'clip',
|
|
11743
11693
|
"float": 'left',
|
|
11744
11694
|
paddingTop: '6px',
|
|
11745
|
-
textOverflow: 'ellipsis',
|
|
11746
11695
|
whiteSpace: 'nowrap'
|
|
11747
11696
|
},
|
|
11748
11697
|
layerNameMaxWidth: {
|
|
11749
|
-
maxWidth: '
|
|
11698
|
+
maxWidth: '270px'
|
|
11750
11699
|
},
|
|
11751
11700
|
layerAbstract: {
|
|
11752
11701
|
fontSize: '10px',
|
|
@@ -11757,6 +11706,11 @@
|
|
|
11757
11706
|
resultCount: {
|
|
11758
11707
|
marginBottom: '4px',
|
|
11759
11708
|
fontSize: '12px'
|
|
11709
|
+
},
|
|
11710
|
+
layerButton: {
|
|
11711
|
+
marginRight: '8px',
|
|
11712
|
+
marginTop: '4px',
|
|
11713
|
+
width: '80px'
|
|
11760
11714
|
}
|
|
11761
11715
|
};
|
|
11762
11716
|
});
|
|
@@ -11765,10 +11719,13 @@
|
|
|
11765
11719
|
var services = _a.services,
|
|
11766
11720
|
serviceIds = _a.serviceIds,
|
|
11767
11721
|
layerSelectHeight = _a.layerSelectHeight,
|
|
11722
|
+
addLayer = _a.addLayer,
|
|
11723
|
+
deleteLayer = _a.deleteLayer,
|
|
11768
11724
|
searchString = _a.searchString,
|
|
11725
|
+
mapLayers = _a.mapLayers,
|
|
11769
11726
|
keywordIds = _a.keywordIds,
|
|
11770
11727
|
allKeywordsActive = _a.allKeywordsActive;
|
|
11771
|
-
var classes = useStyles$
|
|
11728
|
+
var classes = useStyles$o();
|
|
11772
11729
|
|
|
11773
11730
|
var _b = __read(React__namespace.useState(0), 2),
|
|
11774
11731
|
numberOfLayers = _b[0],
|
|
@@ -11789,12 +11746,14 @@
|
|
|
11789
11746
|
overflow: 'auto'
|
|
11790
11747
|
}
|
|
11791
11748
|
}, serviceIds.map(function (serviceId) {
|
|
11792
|
-
return filterLayersFromService(serviceId, services, keywordIds, allKeywordsActive, searchString).map(function (layer) {
|
|
11749
|
+
return filterLayersFromService(serviceId, services, keywordIds, allKeywordsActive, searchString).map(function (layer, layerIndex) {
|
|
11793
11750
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
11751
|
+
key: serviceId + "-" + layer.name + "-" + layer.text
|
|
11752
|
+
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
11794
11753
|
key: serviceId + "-" + layer.name,
|
|
11795
11754
|
className: classes.layerRow,
|
|
11796
11755
|
"data-testid": "layerListLayerRow"
|
|
11797
|
-
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
11756
|
+
}, /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("div", {
|
|
11798
11757
|
className: classes.layerText
|
|
11799
11758
|
}, layer.text), /*#__PURE__*/React__namespace.createElement("div", null, layer["abstract"] ? /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", {
|
|
11800
11759
|
className: classes.layerName + " " + classes.layerNameMaxWidth
|
|
@@ -11803,7 +11762,16 @@
|
|
|
11803
11762
|
"data-testid": "layerAbstract"
|
|
11804
11763
|
}, layer["abstract"])) : /*#__PURE__*/React__namespace.createElement("div", {
|
|
11805
11764
|
className: classes.layerName
|
|
11806
|
-
}, layer.name)))
|
|
11765
|
+
}, layer.name))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
11766
|
+
className: classes.layerButton
|
|
11767
|
+
}, /*#__PURE__*/React__namespace.createElement(LayerAddRemoveButton, {
|
|
11768
|
+
layer: layer,
|
|
11769
|
+
layerIndex: layerIndex,
|
|
11770
|
+
serviceId: serviceId,
|
|
11771
|
+
addLayer: addLayer,
|
|
11772
|
+
deleteLayer: deleteLayer,
|
|
11773
|
+
mapLayers: mapLayers
|
|
11774
|
+
}))));
|
|
11807
11775
|
});
|
|
11808
11776
|
})));
|
|
11809
11777
|
};
|
|
@@ -11826,13 +11794,57 @@
|
|
|
11826
11794
|
* */
|
|
11827
11795
|
|
|
11828
11796
|
var LayerListConnect = function LayerListConnect(_a) {
|
|
11829
|
-
var
|
|
11797
|
+
var mapId = _a.mapId,
|
|
11798
|
+
layerSelectHeight = _a.layerSelectHeight;
|
|
11830
11799
|
var services = reactRedux.useSelector(function (store) {
|
|
11831
11800
|
return getServices(store);
|
|
11832
11801
|
});
|
|
11802
|
+
var dispatch = reactRedux.useDispatch();
|
|
11833
11803
|
var enabledServiceIds = reactRedux.useSelector(function (store) {
|
|
11834
11804
|
return getEnabledServiceIds(store);
|
|
11835
11805
|
});
|
|
11806
|
+
var mapLayers = reactRedux.useSelector(function (store) {
|
|
11807
|
+
return getMapLayers(store, mapId);
|
|
11808
|
+
});
|
|
11809
|
+
|
|
11810
|
+
var addLayer$1 = function addLayer(_a) {
|
|
11811
|
+
var serviceURL = _a.serviceURL,
|
|
11812
|
+
layerName = _a.layerName;
|
|
11813
|
+
var layer = {
|
|
11814
|
+
service: serviceURL,
|
|
11815
|
+
name: layerName,
|
|
11816
|
+
id: generateLayerId(),
|
|
11817
|
+
layerType: webmap.LayerType.mapLayer
|
|
11818
|
+
};
|
|
11819
|
+
addMapLayer({
|
|
11820
|
+
mapId: mapId,
|
|
11821
|
+
layerId: layer.id,
|
|
11822
|
+
layer: layer,
|
|
11823
|
+
origin: 'LayerListConnect'
|
|
11824
|
+
});
|
|
11825
|
+
};
|
|
11826
|
+
|
|
11827
|
+
var addMapLayer = React__namespace.useCallback(function (_a) {
|
|
11828
|
+
var layerId = _a.layerId,
|
|
11829
|
+
layer = _a.layer,
|
|
11830
|
+
origin = _a.origin;
|
|
11831
|
+
return dispatch(addLayer({
|
|
11832
|
+
mapId: mapId,
|
|
11833
|
+
layerId: layerId,
|
|
11834
|
+
layer: layer,
|
|
11835
|
+
origin: origin
|
|
11836
|
+
}));
|
|
11837
|
+
}, [dispatch, mapId]);
|
|
11838
|
+
var deleteLayer = React__namespace.useCallback(function (_a) {
|
|
11839
|
+
var layerId = _a.layerId,
|
|
11840
|
+
layerIndex = _a.layerIndex;
|
|
11841
|
+
return dispatch(layerDelete({
|
|
11842
|
+
mapId: mapId,
|
|
11843
|
+
layerId: layerId,
|
|
11844
|
+
layerIndex: layerIndex,
|
|
11845
|
+
origin: 'LayerListConnect'
|
|
11846
|
+
}));
|
|
11847
|
+
}, [dispatch, mapId]);
|
|
11836
11848
|
var checkedKeywordIds = reactRedux.useSelector(function (store) {
|
|
11837
11849
|
return getCheckedKeywordIds(store);
|
|
11838
11850
|
});
|
|
@@ -11846,9 +11858,12 @@
|
|
|
11846
11858
|
services: services,
|
|
11847
11859
|
serviceIds: enabledServiceIds,
|
|
11848
11860
|
layerSelectHeight: layerSelectHeight,
|
|
11861
|
+
addLayer: addLayer$1,
|
|
11862
|
+
deleteLayer: deleteLayer,
|
|
11849
11863
|
keywordIds: checkedKeywordIds,
|
|
11850
11864
|
allKeywordsActive: allKeywordsActive,
|
|
11851
|
-
searchString: searchString
|
|
11865
|
+
searchString: searchString,
|
|
11866
|
+
mapLayers: mapLayers
|
|
11852
11867
|
});
|
|
11853
11868
|
};
|
|
11854
11869
|
|
|
@@ -11884,7 +11899,7 @@
|
|
|
11884
11899
|
service = _a.service,
|
|
11885
11900
|
isEnabled = _a.isEnabled,
|
|
11886
11901
|
toggleChip = _a.toggleChip;
|
|
11887
|
-
return /*#__PURE__*/React__namespace.createElement(CustomToggleButton, {
|
|
11902
|
+
return /*#__PURE__*/React__namespace.createElement(shared.CustomToggleButton, {
|
|
11888
11903
|
variant: "boxed",
|
|
11889
11904
|
selected: isEnabled,
|
|
11890
11905
|
tabIndex: 0,
|
|
@@ -11980,7 +11995,7 @@
|
|
|
11980
11995
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11981
11996
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11982
11997
|
* */
|
|
11983
|
-
var useStyles$
|
|
11998
|
+
var useStyles$n = makeStyles__default["default"](function (theme) {
|
|
11984
11999
|
return createStyles__default["default"]({
|
|
11985
12000
|
serviceChips: {
|
|
11986
12001
|
width: '100%',
|
|
@@ -12052,7 +12067,7 @@
|
|
|
12052
12067
|
var ref = React__namespace.useRef(null);
|
|
12053
12068
|
var scrollSpeed = 5;
|
|
12054
12069
|
var maxWidthValue = ref && ref.current && ref.current.scrollWidth && ref.current.scrollWidth >= layerSelectWidth - margin && ref.current.scrollWidth || layerSelectWidth - 50;
|
|
12055
|
-
var classes = useStyles$
|
|
12070
|
+
var classes = useStyles$n({
|
|
12056
12071
|
margin: margin,
|
|
12057
12072
|
maxWidthValue: maxWidthValue
|
|
12058
12073
|
});
|
|
@@ -12182,7 +12197,7 @@
|
|
|
12182
12197
|
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
12183
12198
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
12184
12199
|
* */
|
|
12185
|
-
var useStyles$
|
|
12200
|
+
var useStyles$m = makeStyles__default["default"](function (theme) {
|
|
12186
12201
|
return createStyles__default["default"]({
|
|
12187
12202
|
servicesContainer: {
|
|
12188
12203
|
width: '300px',
|
|
@@ -12238,7 +12253,7 @@
|
|
|
12238
12253
|
mapStoreRemoveService = _a.mapStoreRemoveService,
|
|
12239
12254
|
_b = _a.layers,
|
|
12240
12255
|
layers = _b === void 0 ? [] : _b;
|
|
12241
|
-
var classes = useStyles$
|
|
12256
|
+
var classes = useStyles$m();
|
|
12242
12257
|
|
|
12243
12258
|
var _c = __read(React__namespace.useState(false), 2),
|
|
12244
12259
|
addServiceisOpen = _c[0],
|
|
@@ -12255,6 +12270,8 @@
|
|
|
12255
12270
|
var isDisabled = function isDisabled(service) {
|
|
12256
12271
|
return layers.some(function (layer) {
|
|
12257
12272
|
return layer.service && layer.service.includes(service);
|
|
12273
|
+
}) || preloadedDefaultMapServices.some(function (defaultMapService) {
|
|
12274
|
+
return defaultMapService.url && defaultMapService.url.includes(service);
|
|
12258
12275
|
});
|
|
12259
12276
|
};
|
|
12260
12277
|
|
|
@@ -12284,14 +12301,15 @@
|
|
|
12284
12301
|
}
|
|
12285
12302
|
}, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
12286
12303
|
title: "Edit Service"
|
|
12287
|
-
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
12304
|
+
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
12305
|
+
disabled: isDisabled(service.service),
|
|
12288
12306
|
"data-testid": "openEditServiceButton",
|
|
12289
12307
|
size: "large"
|
|
12290
12308
|
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("g", null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
12291
12309
|
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",
|
|
12292
12310
|
fill: classes.iconFill,
|
|
12293
12311
|
fillRule: "evenodd"
|
|
12294
|
-
}))))), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
12312
|
+
})))))), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
12295
12313
|
title: "Delete Service"
|
|
12296
12314
|
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
12297
12315
|
size: "large",
|
|
@@ -12378,48 +12396,12 @@
|
|
|
12378
12396
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
12379
12397
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
12380
12398
|
* */
|
|
12381
|
-
var useStyles$m = makeStyles__default["default"](function (theme) {
|
|
12382
|
-
return createStyles__default["default"]({
|
|
12383
|
-
servicesContainer: {
|
|
12384
|
-
position: 'fixed',
|
|
12385
|
-
top: '140px',
|
|
12386
|
-
right: '-72px',
|
|
12387
|
-
backgroundColor: theme.palette.geowebColors.background.surface,
|
|
12388
|
-
boxShadow: theme.shadows[6]
|
|
12389
|
-
},
|
|
12390
|
-
servicesText: {
|
|
12391
|
-
paddingTop: '12px',
|
|
12392
|
-
paddingLeft: '12px'
|
|
12393
|
-
}
|
|
12394
|
-
});
|
|
12395
|
-
});
|
|
12396
12399
|
|
|
12397
12400
|
var ServiceOptionsButton = function ServiceOptionsButton() {
|
|
12398
|
-
|
|
12399
|
-
|
|
12400
|
-
|
|
12401
|
-
|
|
12402
|
-
setContainerOpen = _a[1];
|
|
12403
|
-
|
|
12404
|
-
var toggleContainer = function toggleContainer() {
|
|
12405
|
-
setContainerOpen(!containerOpen);
|
|
12406
|
-
};
|
|
12407
|
-
|
|
12408
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(ToolButton, {
|
|
12409
|
-
onClick: toggleContainer,
|
|
12410
|
-
active: containerOpen,
|
|
12411
|
-
"data-testid": "serviceOptionsButton",
|
|
12412
|
-
variant: "tool"
|
|
12413
|
-
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
|
|
12414
|
-
viewBox: "0 0 24 24",
|
|
12415
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
12416
|
-
}, /*#__PURE__*/React__namespace.createElement("g", null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
12417
|
-
d: "M12 16c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0-2c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm0-6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z",
|
|
12418
|
-
fillRule: "evenodd"
|
|
12419
|
-
})))), containerOpen ? /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
12420
|
-
className: classes.servicesContainer,
|
|
12421
|
-
"data-testid": "ServiceOptionsDialogContainer"
|
|
12422
|
-
}, /*#__PURE__*/React__namespace.createElement(ServiceOptionsDialogConnect, null)) : null);
|
|
12401
|
+
return /*#__PURE__*/React__namespace.createElement(shared.ToggleMenu, {
|
|
12402
|
+
buttonTestId: "serviceOptionsButton",
|
|
12403
|
+
menuPosition: "bottom"
|
|
12404
|
+
}, /*#__PURE__*/React__namespace.createElement(ServiceOptionsDialogConnect, null));
|
|
12423
12405
|
};
|
|
12424
12406
|
|
|
12425
12407
|
/* *
|
|
@@ -12526,6 +12508,7 @@
|
|
|
12526
12508
|
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
12527
12509
|
className: classes.layerSelectContainer
|
|
12528
12510
|
}, /*#__PURE__*/React__namespace.createElement(LayerListConnect, {
|
|
12511
|
+
mapId: mapId,
|
|
12529
12512
|
layerSelectHeight: height
|
|
12530
12513
|
})));
|
|
12531
12514
|
};
|
|
@@ -13209,7 +13192,7 @@
|
|
|
13209
13192
|
isActive = _c === void 0 ? false : _c,
|
|
13210
13193
|
props = __rest(_a, ["onClick", "children", "title", "placement", "isActive"]);
|
|
13211
13194
|
|
|
13212
|
-
return /*#__PURE__*/React__namespace.createElement(ToolButton, __assign({
|
|
13195
|
+
return /*#__PURE__*/React__namespace.createElement(shared.ToolButton, __assign({
|
|
13213
13196
|
onClick: onClick,
|
|
13214
13197
|
active: isActive
|
|
13215
13198
|
}, props), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
@@ -14120,7 +14103,7 @@
|
|
|
14120
14103
|
title: autoUpdateButton.title
|
|
14121
14104
|
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
14122
14105
|
"data-testid": "autoUpdateButtonTooltip"
|
|
14123
|
-
}, /*#__PURE__*/React__namespace.createElement(ToolButton, {
|
|
14106
|
+
}, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
14124
14107
|
active: isAutoUpdating,
|
|
14125
14108
|
disabled: disabled,
|
|
14126
14109
|
onClick: function onClick() {
|
|
@@ -14184,7 +14167,7 @@
|
|
|
14184
14167
|
var loopButtonPath = isLooping ? svgLoopOffPath : svgLoopPath;
|
|
14185
14168
|
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
14186
14169
|
title: loopButtonPath.title
|
|
14187
|
-
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(ToolButton, {
|
|
14170
|
+
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
14188
14171
|
onClick: function onClick() {
|
|
14189
14172
|
return onToggleLoop();
|
|
14190
14173
|
},
|
|
@@ -14296,7 +14279,7 @@
|
|
|
14296
14279
|
className: classes.speedButtonDiv
|
|
14297
14280
|
}, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
14298
14281
|
title: "Speed"
|
|
14299
|
-
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(ToolButton, {
|
|
14282
|
+
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
14300
14283
|
onClick: onClickButton,
|
|
14301
14284
|
active: true,
|
|
14302
14285
|
"data-testid": "speedButton"
|
|
@@ -14588,7 +14571,7 @@
|
|
|
14588
14571
|
className: classes.timeStepDiv
|
|
14589
14572
|
}, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
14590
14573
|
title: "Time step"
|
|
14591
|
-
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(ToolButton, {
|
|
14574
|
+
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
14592
14575
|
active: true,
|
|
14593
14576
|
onClick: onClickButton,
|
|
14594
14577
|
"data-testid": "timeStepButton",
|
|
@@ -14694,7 +14677,7 @@
|
|
|
14694
14677
|
var id = open ? 'simple-popover' : undefined;
|
|
14695
14678
|
return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
14696
14679
|
title: "Options"
|
|
14697
|
-
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(ToolButton, {
|
|
14680
|
+
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
14698
14681
|
onClick: onClickButton,
|
|
14699
14682
|
"data-testid": "optionsMenuButton",
|
|
14700
14683
|
active: open
|
|
@@ -14783,7 +14766,7 @@
|
|
|
14783
14766
|
var playButtonPath = isAnimating ? pausePath : playPath;
|
|
14784
14767
|
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
14785
14768
|
title: playButtonPath.title
|
|
14786
|
-
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(ToolButton, {
|
|
14769
|
+
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
14787
14770
|
onClick: onTogglePlay,
|
|
14788
14771
|
disabled: isDisabled,
|
|
14789
14772
|
"data-testid": "playButton",
|
|
@@ -15961,6 +15944,12 @@
|
|
|
15961
15944
|
|
|
15962
15945
|
var NEEDLE_HANDLE_WIDTH = 10;
|
|
15963
15946
|
var LEFT_MOUSE_BTN = 1;
|
|
15947
|
+
var THROTTLE_WAIT_TIME = 500; // [ms]
|
|
15948
|
+
|
|
15949
|
+
var THROTTLE_OPTIONS = {
|
|
15950
|
+
trailing: false // Invoke function when called, but not more than once every <THROTTLE_WAIT_TIME>.
|
|
15951
|
+
|
|
15952
|
+
};
|
|
15964
15953
|
|
|
15965
15954
|
var TimeSliderLegend = function TimeSliderLegend(_a) {
|
|
15966
15955
|
var centerTime = _a.centerTime,
|
|
@@ -16025,7 +16014,21 @@
|
|
|
16025
16014
|
setNewRoundedTime(x, centerTime, width, secondsPerPx, timeStep, dataStartTime, dataEndTime, onSetNewDate);
|
|
16026
16015
|
};
|
|
16027
16016
|
|
|
16028
|
-
var theme = material.useTheme();
|
|
16017
|
+
var theme = material.useTheme(); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
16018
|
+
|
|
16019
|
+
var throttledZoom = React__namespace.useCallback(_.throttle(function (newSecondsPerPx, newCenterTime) {
|
|
16020
|
+
onZoom(newSecondsPerPx, newCenterTime);
|
|
16021
|
+
}, THROTTLE_WAIT_TIME, THROTTLE_OPTIONS), []);
|
|
16022
|
+
|
|
16023
|
+
var zoom = function zoom(deltaY, deltaX, canvasWidth, mouseX) {
|
|
16024
|
+
if (!onZoom) return;
|
|
16025
|
+
var direction = deltaY || deltaX;
|
|
16026
|
+
var newSecondsPerPx = getNextSecondsPerPxValue(Math.sign(direction), secondsPerPx, dataScaleToSecondsPerPx);
|
|
16027
|
+
var mouseTime = pixelToTimestamp(mouseX, centerTime, canvasWidth, secondsPerPx);
|
|
16028
|
+
var newCenterTime = getNewCenterOfFixedPointZoom(mouseTime, secondsPerPx, newSecondsPerPx, centerTime);
|
|
16029
|
+
throttledZoom(newSecondsPerPx, newCenterTime);
|
|
16030
|
+
};
|
|
16031
|
+
|
|
16029
16032
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
16030
16033
|
className: classes.timeSliderLegend,
|
|
16031
16034
|
"data-testid": "timeSliderLegend"
|
|
@@ -16057,12 +16060,7 @@
|
|
|
16057
16060
|
deltaX = _a.deltaX,
|
|
16058
16061
|
canvasWidth = _a.canvasWidth,
|
|
16059
16062
|
mouseX = _a.mouseX;
|
|
16060
|
-
|
|
16061
|
-
var direction = deltaY || deltaX;
|
|
16062
|
-
var newSecondsPerPx = getNextSecondsPerPxValue(Math.sign(direction), secondsPerPx, dataScaleToSecondsPerPx);
|
|
16063
|
-
var mouseTime = pixelToTimestamp(mouseX, centerTime, canvasWidth, secondsPerPx);
|
|
16064
|
-
var newCenterTime = getNewCenterOfFixedPointZoom(mouseTime, secondsPerPx, newSecondsPerPx, centerTime);
|
|
16065
|
-
onZoom(newSecondsPerPx, newCenterTime);
|
|
16063
|
+
zoom(deltaY, deltaX, canvasWidth, mouseX);
|
|
16066
16064
|
},
|
|
16067
16065
|
onMouseDown: function onMouseDown(x, y, width) {
|
|
16068
16066
|
setDragged(false);
|
|
@@ -17826,7 +17824,7 @@
|
|
|
17826
17824
|
};
|
|
17827
17825
|
var ECMWFPublicService = {
|
|
17828
17826
|
name: 'ECMWF',
|
|
17829
|
-
url: 'https://
|
|
17827
|
+
url: 'https://eccharts.ecmwf.int/wms/?token=public',
|
|
17830
17828
|
id: 'ecmwf'
|
|
17831
17829
|
};
|
|
17832
17830
|
var MeteoCanada = {
|
|
@@ -21214,6 +21212,14 @@
|
|
|
21214
21212
|
});
|
|
21215
21213
|
}
|
|
21216
21214
|
}
|
|
21215
|
+
/* Set disable map pin */
|
|
21216
|
+
|
|
21217
|
+
|
|
21218
|
+
if (!prevProps || prevProps.disableMapPin !== props.disableMapPin) {
|
|
21219
|
+
if (!(props.disableMapPin === undefined)) {
|
|
21220
|
+
this.adaguc.webMapJS.getMapPin().toggleDisableMapPin();
|
|
21221
|
+
}
|
|
21222
|
+
}
|
|
21217
21223
|
/* Change the animation delay */
|
|
21218
21224
|
|
|
21219
21225
|
|
|
@@ -21857,6 +21863,9 @@
|
|
|
21857
21863
|
var mapPinLocation = reactRedux.useSelector(function (store) {
|
|
21858
21864
|
return getPinLocation(store, mapId);
|
|
21859
21865
|
});
|
|
21866
|
+
var disableMapPin = reactRedux.useSelector(function (store) {
|
|
21867
|
+
return getDisableMapPin(store, mapId);
|
|
21868
|
+
});
|
|
21860
21869
|
var dispatch = reactRedux.useDispatch();
|
|
21861
21870
|
var map = getWMJSMapById(mapId);
|
|
21862
21871
|
var mapChangeDimension$1 = React__namespace.useCallback(function (mapDimensionPayload) {
|
|
@@ -21928,6 +21937,7 @@
|
|
|
21928
21937
|
activeLayerId: activeLayerId,
|
|
21929
21938
|
animationDelay: animationDelay,
|
|
21930
21939
|
displayMapPin: displayMapPin,
|
|
21940
|
+
disableMapPin: disableMapPin,
|
|
21931
21941
|
onMapChangeDimension: function onMapChangeDimension(mapDimensionPayload) {
|
|
21932
21942
|
if (mapDimensionPayload && mapDimensionPayload.dimension && mapDimensionPayload.dimension.name && mapDimensionPayload.dimension.name === 'time') {
|
|
21933
21943
|
setTime$1({
|
|
@@ -22562,7 +22572,9 @@
|
|
|
22562
22572
|
_k = _a.shouldShowZoomControls,
|
|
22563
22573
|
shouldShowZoomControls = _k === void 0 ? false : _k,
|
|
22564
22574
|
_l = _a.displayMapPin,
|
|
22565
|
-
displayMapPin = _l === void 0 ? false : _l
|
|
22575
|
+
displayMapPin = _l === void 0 ? false : _l,
|
|
22576
|
+
toggleTimestepAuto$1 = _a.toggleTimestepAuto,
|
|
22577
|
+
setTimestep = _a.setTimestep;
|
|
22566
22578
|
var classes = useStyles$4();
|
|
22567
22579
|
var dispatch = reactRedux.useDispatch();
|
|
22568
22580
|
var mapId = React__default["default"].useRef(id || generateMapId()).current;
|
|
@@ -22633,6 +22645,22 @@
|
|
|
22633
22645
|
timestepAuto: false
|
|
22634
22646
|
}));
|
|
22635
22647
|
}
|
|
22648
|
+
} // Set timestep auto based on preset
|
|
22649
|
+
|
|
22650
|
+
|
|
22651
|
+
if (toggleTimestepAuto$1 !== undefined && shouldAnimate !== true) {
|
|
22652
|
+
dispatch(toggleTimestepAuto({
|
|
22653
|
+
mapId: mapId,
|
|
22654
|
+
timestepAuto: toggleTimestepAuto$1
|
|
22655
|
+
}));
|
|
22656
|
+
} // Set timestep value based on preset
|
|
22657
|
+
|
|
22658
|
+
|
|
22659
|
+
if (setTimestep !== undefined && shouldAnimate !== true) {
|
|
22660
|
+
dispatch(setTimeStep({
|
|
22661
|
+
mapId: mapId,
|
|
22662
|
+
timeStep: setTimestep
|
|
22663
|
+
}));
|
|
22636
22664
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
22637
22665
|
|
|
22638
22666
|
}, []);
|
|
@@ -23011,7 +23039,11 @@
|
|
|
23011
23039
|
_h = _a.animationPayload,
|
|
23012
23040
|
animationPayload = _h === void 0 ? undefined : _h,
|
|
23013
23041
|
_j = _a.displayMapPin,
|
|
23014
|
-
displayMapPin = _j === void 0 ? false : _j
|
|
23042
|
+
displayMapPin = _j === void 0 ? false : _j,
|
|
23043
|
+
_k = _a.showTimeSlider,
|
|
23044
|
+
showTimeSlider = _k === void 0 ? true : _k,
|
|
23045
|
+
toggleTimestepAuto = _a.toggleTimestepAuto,
|
|
23046
|
+
setTimestep = _a.setTimestep;
|
|
23015
23047
|
var classes = useStyles$2();
|
|
23016
23048
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23017
23049
|
className: classes.mapSliderConnect,
|
|
@@ -23020,7 +23052,7 @@
|
|
|
23020
23052
|
className: classes.zoomControls
|
|
23021
23053
|
}, /*#__PURE__*/React__default["default"].createElement(ZoomControlConnect, {
|
|
23022
23054
|
mapId: id
|
|
23023
|
-
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23055
|
+
})), showTimeSlider && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23024
23056
|
className: classes.timeSlider
|
|
23025
23057
|
}, /*#__PURE__*/React__default["default"].createElement(TimeSliderConnect, {
|
|
23026
23058
|
mapId: id,
|
|
@@ -23038,7 +23070,9 @@
|
|
|
23038
23070
|
shouldAnimate: shouldAnimate,
|
|
23039
23071
|
animationPayload: animationPayload,
|
|
23040
23072
|
shouldShowZoomControls: shouldShowZoomControls,
|
|
23041
|
-
displayMapPin: displayMapPin
|
|
23073
|
+
displayMapPin: displayMapPin,
|
|
23074
|
+
toggleTimestepAuto: toggleTimestepAuto,
|
|
23075
|
+
setTimestep: setTimestep
|
|
23042
23076
|
}));
|
|
23043
23077
|
};
|
|
23044
23078
|
|
|
@@ -23260,11 +23294,7 @@
|
|
|
23260
23294
|
return removeGroup(groupObject.id);
|
|
23261
23295
|
},
|
|
23262
23296
|
size: "large"
|
|
23263
|
-
}, index === 0 ? /*#__PURE__*/React__namespace.createElement(iconsMaterial.Add, {
|
|
23264
|
-
className: classes.iconColor
|
|
23265
|
-
}) : /*#__PURE__*/React__namespace.createElement(iconsMaterial.DeleteForever, {
|
|
23266
|
-
className: classes.iconColor
|
|
23267
|
-
})))), /*#__PURE__*/React__namespace.createElement(SyncGroupListItem, {
|
|
23297
|
+
}, index === 0 ? /*#__PURE__*/React__namespace.createElement(iconsMaterial.Add, null) : /*#__PURE__*/React__namespace.createElement(iconsMaterial.DeleteForever, null)))), /*#__PURE__*/React__namespace.createElement(SyncGroupListItem, {
|
|
23268
23298
|
viewStateData: viewStateData,
|
|
23269
23299
|
groupId: groupObject.id,
|
|
23270
23300
|
selected: groupObject.selected,
|
|
@@ -23290,9 +23320,6 @@
|
|
|
23290
23320
|
backgroundColor: theme.palette.geowebColors.syncGroups.drawerOpen.fill,
|
|
23291
23321
|
boxShadow: 'inset 0px 7px 7px -7px, inset 0px -7px 7px -7px',
|
|
23292
23322
|
color: '#000000'
|
|
23293
|
-
},
|
|
23294
|
-
iconColor: {
|
|
23295
|
-
color: theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat
|
|
23296
23323
|
}
|
|
23297
23324
|
});
|
|
23298
23325
|
});
|
|
@@ -23851,7 +23878,8 @@
|
|
|
23851
23878
|
exports.makeMapPreset = makeMapPreset;
|
|
23852
23879
|
exports.mapActions = actions$3;
|
|
23853
23880
|
exports.mapConstants = constants$1;
|
|
23854
|
-
exports.
|
|
23881
|
+
exports.mapModuleConfig = moduleConfig;
|
|
23882
|
+
exports.mapSelectors = selectors$1;
|
|
23855
23883
|
exports.mapTypes = types$2;
|
|
23856
23884
|
exports.mapUtils = utils;
|
|
23857
23885
|
exports.publicLayers = publicLayers;
|
|
@@ -23863,6 +23891,8 @@
|
|
|
23863
23891
|
exports.synchronizationGroupModuleConfig = synchronizationGroupConfig;
|
|
23864
23892
|
exports.testLayers = testLayers;
|
|
23865
23893
|
exports.uiActions = actions$2;
|
|
23894
|
+
exports.uiModuleConfig = uiModuleConfig;
|
|
23895
|
+
exports.uiSelectors = selectors;
|
|
23866
23896
|
exports.uiTypes = types$1;
|
|
23867
23897
|
exports.useStyles = useStyles$3;
|
|
23868
23898
|
|