@opengeoweb/core 2.1.3 → 2.1.4
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/{core.esm.js → index.esm.js} +745 -391
- package/{core.umd.js → index.umd.js} +959 -601
- package/lib/components/CustomSwitch/CustomSwitch.d.ts +1 -1
- package/lib/components/LayerManager/LayerContainerRow/LayerManagerButton.d.ts +1 -1
- package/lib/components/LayerManager/LayerManagerUtils.d.ts +2 -2
- package/lib/components/LayerManager/LayerSelect/LayerList/LayerList.d.ts +1 -0
- package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChip.d.ts +2 -0
- package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChipConnect.d.ts +9 -0
- package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChipConnect.spec.d.ts +1 -0
- package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceList.d.ts +2 -0
- package/lib/components/LayerManager/tooltipContainerStyles.d.ts +1 -1
- package/lib/components/MapView/MapViewConnect.LayerChangeEnabledOpacity.stories.d.ts +7 -0
- package/lib/components/MapView/MapViewConnect.d.ts +2 -0
- package/lib/components/Mapcontrols/MapControlButton.d.ts +1 -1
- package/lib/components/MultiMapDimensionSelect/MultiDimensionSelectConfig.d.ts +1 -1
- package/lib/components/MultiMapView/MultiMapViewConnect.d.ts +1 -1
- package/lib/components/Providers/Providers.d.ts +1 -1
- package/lib/components/ReactMapView/ReactMapView.d.ts +3 -7
- package/lib/components/ReactMapView/ReactMapViewParseLayer.d.ts +2 -2
- package/lib/components/ReactMapView/types.d.ts +2 -7
- package/lib/components/TimeSlider/TimeSliderLegend/TimeSliderLegendRenderFunctions.d.ts +1 -1
- package/lib/components/TimeSlider/TimeSliderRail/TimeSliderRailRenderFunctions.d.ts +1 -1
- package/lib/components/ToggleIconButton/ToggleIconButton.d.ts +6 -3
- package/lib/components/TooltipSelect/TooltipSelect.d.ts +2 -2
- package/lib/store/layerSelect/actions.d.ts +19 -4
- package/lib/store/layerSelect/constants.d.ts +3 -0
- package/lib/store/layerSelect/sagas.d.ts +2 -1
- package/lib/store/layerSelect/selectors.d.ts +32 -2
- package/lib/store/layerSelect/types.d.ts +32 -6
- package/lib/store/mapStore/layers/actions.d.ts +2 -8
- package/lib/store/mapStore/layers/constants.d.ts +1 -1
- package/lib/store/mapStore/layers/selectors.d.ts +5 -14
- package/lib/store/mapStore/layers/types.d.ts +34 -21
- package/lib/store/mapStore/map/sagas.d.ts +2 -2
- package/lib/store/mapStore/map/selectors.d.ts +6 -6
- package/lib/store/mapStore/service/selectors.d.ts +35 -5
- package/lib/store/mapStore/service/types.d.ts +5 -1
- package/lib/storybookUtils/HelperComponents.d.ts +1 -1
- package/lib/storybookUtils/storyComponents/MapDrawGeoJSON.d.ts +5 -5
- package/lib/storybookUtils/storyComponents/MapDrawGeoJSONStyles.d.ts +2 -1
- package/lib/utils/defaultTestSettings.d.ts +13 -1
- package/package.json +13 -14
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('reselect'), require('moment'), require('react'), require('immer'), require('redux-saga/effects'), require('@opengeoweb/webmap'), require('@material
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'reselect', 'moment', 'react', 'immer', 'redux-saga/effects', '@opengeoweb/webmap', '@material
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.reselect, global.moment, global.React, global.produce, global.effects, global.webmap, global.
|
|
5
|
-
})(this, (function (exports, reselect, moment, React, produce, effects, webmap,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('reselect'), require('moment'), require('react'), require('immer'), require('redux-saga/effects'), require('@opengeoweb/webmap'), require('@mui/material'), require('@mui/styles/makeStyles'), require('react-redux'), require('@opengeoweb/shared'), require('lodash'), require('@mui/icons-material'), require('react-sortablejs'), require('@mui/styles/createStyles'), require('@mui/styles/withStyles'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('redux-dynamic-modules'), require('redux-dynamic-modules-saga'), require('@opengeoweb/theme')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'reselect', 'moment', 'react', 'immer', 'redux-saga/effects', '@opengeoweb/webmap', '@mui/material', '@mui/styles/makeStyles', 'react-redux', '@opengeoweb/shared', 'lodash', '@mui/icons-material', 'react-sortablejs', '@mui/styles/createStyles', '@mui/styles/withStyles', 'throttle-debounce', 'lodash.clonedeep', 'proj4', 'redux-dynamic-modules', 'redux-dynamic-modules-saga', '@opengeoweb/theme'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.reselect, global.moment, global.React, global.produce, global.effects, global.webmap, global.material, global.makeStyles, global.reactRedux, global.shared, global._, global.iconsMaterial, global.reactSortablejs, global.createStyles, global.withStyles, global.throttleDebounce, global.cloneDeep, global.proj4, global.reduxDynamicModules, global.reduxDynamicModulesSaga, global.theme));
|
|
5
|
+
})(this, (function (exports, reselect, moment, React, produce, effects, webmap, material, makeStyles, reactRedux, shared, _, iconsMaterial, reactSortablejs, createStyles, withStyles, throttleDebounce, cloneDeep, proj4, reduxDynamicModules, reduxDynamicModulesSaga, theme) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
29
29
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
30
|
var produce__default = /*#__PURE__*/_interopDefaultLegacy(produce);
|
|
31
|
+
var makeStyles__default = /*#__PURE__*/_interopDefaultLegacy(makeStyles);
|
|
31
32
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
33
|
+
var createStyles__default = /*#__PURE__*/_interopDefaultLegacy(createStyles);
|
|
34
|
+
var withStyles__default = /*#__PURE__*/_interopDefaultLegacy(withStyles);
|
|
32
35
|
var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep);
|
|
33
36
|
var proj4__default = /*#__PURE__*/_interopDefaultLegacy(proj4);
|
|
34
37
|
|
|
@@ -400,7 +403,6 @@
|
|
|
400
403
|
var WEBMAP_LAYER_CHANGE_STYLE = 'WEBMAP_LAYER_CHANGE_STYLE';
|
|
401
404
|
var WEBMAP_LAYER_CHANGE_DIMENSION = 'WEBMAP_LAYER_CHANGE_DIMENSION';
|
|
402
405
|
var WEBMAP_LAYER_SET_DIMENSIONS = 'WEBMAP_LAYER_SET_DIMENSIONS';
|
|
403
|
-
var WEBMAP_LAYER_SET_STYLES = 'WEBMAP_LAYER_SET_STYLES';
|
|
404
406
|
var WEBMAP_LAYER_CHANGE_ENABLED = 'WEBMAP_LAYER_CHANGE_ENABLED';
|
|
405
407
|
var WEBMAP_LAYER_DELETE = 'WEBMAP_LAYER_DELETE';
|
|
406
408
|
var WEBMAP_LAYER_ERROR = 'WEBMAP_LAYER_ERROR';
|
|
@@ -411,6 +413,7 @@
|
|
|
411
413
|
var WEBMAP_ADD_BASELAYER = 'WEBMAP_ADD_BASELAYER';
|
|
412
414
|
var WEBMAP_ADD_AVAILABLE_BASELAYER = 'WEBMAP_ADD_AVAILABLE_BASELAYER';
|
|
413
415
|
var WEBMAP_ADD_AVAILABLE_BASELAYERS = 'WEBMAP_ADD_AVAILABLE_BASELAYERS';
|
|
416
|
+
var WEBMAP_UPDATE_LAYER_INFO = 'WEBMAP_UPDATE_LAYER_INFO';
|
|
414
417
|
|
|
415
418
|
/* *
|
|
416
419
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -549,19 +552,6 @@
|
|
|
549
552
|
payload: payload
|
|
550
553
|
};
|
|
551
554
|
};
|
|
552
|
-
/**
|
|
553
|
-
* Action layerSetStyles is used automatically after calling the setLayers action. Contents is based on WMS GetCapabilities
|
|
554
|
-
*
|
|
555
|
-
* Example: layerSetStyles({service: someService, name: 'layerName', styles: styleArray})
|
|
556
|
-
* @param {object} payload consisting of service: string, name: string, styles: Style[]
|
|
557
|
-
*/
|
|
558
|
-
|
|
559
|
-
var layerSetStyles = function layerSetStyles(payload) {
|
|
560
|
-
return {
|
|
561
|
-
type: WEBMAP_LAYER_SET_STYLES,
|
|
562
|
-
payload: payload
|
|
563
|
-
};
|
|
564
|
-
};
|
|
565
555
|
/**
|
|
566
556
|
* Changes the name of the layer
|
|
567
557
|
*
|
|
@@ -657,6 +647,12 @@
|
|
|
657
647
|
payload: payload
|
|
658
648
|
};
|
|
659
649
|
};
|
|
650
|
+
var onUpdateLayerInformation = function onUpdateLayerInformation(payload) {
|
|
651
|
+
return {
|
|
652
|
+
type: WEBMAP_UPDATE_LAYER_INFO,
|
|
653
|
+
payload: payload
|
|
654
|
+
};
|
|
655
|
+
};
|
|
660
656
|
|
|
661
657
|
/* *
|
|
662
658
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -755,7 +751,6 @@
|
|
|
755
751
|
layerChangeEnabled: layerChangeEnabled,
|
|
756
752
|
layerChangeDimension: layerChangeDimension,
|
|
757
753
|
layerSetDimensions: layerSetDimensions,
|
|
758
|
-
layerSetStyles: layerSetStyles,
|
|
759
754
|
layerChangeName: layerChangeName,
|
|
760
755
|
layerChangeStyle: layerChangeStyle,
|
|
761
756
|
layerDelete: layerDelete,
|
|
@@ -763,6 +758,7 @@
|
|
|
763
758
|
layerError: layerError,
|
|
764
759
|
addAvailableBaseLayer: addAvailableBaseLayer,
|
|
765
760
|
addAvailableBaseLayers: addAvailableBaseLayers,
|
|
761
|
+
onUpdateLayerInformation: onUpdateLayerInformation,
|
|
766
762
|
serviceSetLayers: serviceSetLayers
|
|
767
763
|
});
|
|
768
764
|
|
|
@@ -1110,18 +1106,6 @@
|
|
|
1110
1106
|
return layer.layerType === LayerType.overLayer;
|
|
1111
1107
|
});
|
|
1112
1108
|
});
|
|
1113
|
-
/**
|
|
1114
|
-
* Gets styles of the passed layer
|
|
1115
|
-
*
|
|
1116
|
-
* Example: layerStyles = getLayerStyles(store, 'layerId_1')
|
|
1117
|
-
* @param {object} store store: object - object from which the layers state will be extracted
|
|
1118
|
-
* @param {string} layerId layerId: string - Id of the layer
|
|
1119
|
-
* @returns {array} returnType: Style[] - array containing layer styles
|
|
1120
|
-
*/
|
|
1121
|
-
|
|
1122
|
-
var getLayerStyles = reselect.createSelector(getLayerById, function (layer) {
|
|
1123
|
-
return layer && layer.styles ? layer.styles : [];
|
|
1124
|
-
});
|
|
1125
1109
|
/**
|
|
1126
1110
|
* Gets dimensions of the passed layer
|
|
1127
1111
|
*
|
|
@@ -1384,10 +1368,14 @@
|
|
|
1384
1368
|
return ar;
|
|
1385
1369
|
}
|
|
1386
1370
|
|
|
1387
|
-
function __spreadArray(to, from) {
|
|
1388
|
-
for (var i = 0,
|
|
1389
|
-
|
|
1390
|
-
|
|
1371
|
+
function __spreadArray(to, from, pack) {
|
|
1372
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
1373
|
+
if (ar || !(i in from)) {
|
|
1374
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
1375
|
+
ar[i] = from[i];
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
1391
1379
|
}
|
|
1392
1380
|
|
|
1393
1381
|
/* *
|
|
@@ -2510,8 +2498,8 @@
|
|
|
2510
2498
|
*/
|
|
2511
2499
|
|
|
2512
2500
|
|
|
2513
|
-
var getServiceIds = reselect.createSelector(servicesStore, function (
|
|
2514
|
-
return
|
|
2501
|
+
var getServiceIds = reselect.createSelector(servicesStore, function (serviceState) {
|
|
2502
|
+
return serviceState ? serviceState.allIds : [];
|
|
2515
2503
|
});
|
|
2516
2504
|
/**
|
|
2517
2505
|
* Gets map services
|
|
@@ -2525,20 +2513,75 @@
|
|
|
2525
2513
|
return store ? store.byId : {};
|
|
2526
2514
|
});
|
|
2527
2515
|
/**
|
|
2528
|
-
* Gets
|
|
2516
|
+
* Gets the service object by its url
|
|
2529
2517
|
*
|
|
2530
|
-
* Example:
|
|
2518
|
+
* Example: service = getServiceByName(store, 'serviceName')
|
|
2531
2519
|
* @param {object} store store: object - Store object
|
|
2532
|
-
* @returns {
|
|
2520
|
+
* @returns {Service} returnType: Service
|
|
2533
2521
|
*/
|
|
2534
2522
|
|
|
2535
|
-
var
|
|
2536
|
-
|
|
2537
|
-
|
|
2523
|
+
var getServiceByName = reselect.createSelector([servicesStore, function (state, serviceName) {
|
|
2524
|
+
return serviceName;
|
|
2525
|
+
}], function (serviceState, serviceName) {
|
|
2526
|
+
if (serviceState && serviceState.byId && serviceState.byId[serviceName]) {
|
|
2527
|
+
return serviceState.byId[serviceName];
|
|
2538
2528
|
}
|
|
2539
2529
|
|
|
2540
2530
|
return null;
|
|
2541
|
-
};
|
|
2531
|
+
});
|
|
2532
|
+
/**
|
|
2533
|
+
* Gets the layer from the store using the serviceUrl and layerName
|
|
2534
|
+
*
|
|
2535
|
+
* Example: layers = getLayersFromService(store, 'https://geoservices.knmi.nl/...')
|
|
2536
|
+
* @param {object} store store: object - object from which the layers state will be extracted
|
|
2537
|
+
* @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
|
|
2538
|
+
* @returns {arrayr} returnType: ServiceLayer[] - All layers within the service object.
|
|
2539
|
+
*/
|
|
2540
|
+
|
|
2541
|
+
var getLayersFromService$1 = reselect.createSelector(getServiceByName, function (service) {
|
|
2542
|
+
return service && service.layers || null;
|
|
2543
|
+
});
|
|
2544
|
+
/**
|
|
2545
|
+
* Gets the layer from the store using the serviceUrl and layerName
|
|
2546
|
+
*
|
|
2547
|
+
* Example: layer = getLayerFromService(store, 'https://geoservices.knmi.nl/...', 'radar')
|
|
2548
|
+
* @param {object} store store: object - The application store
|
|
2549
|
+
* @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
|
|
2550
|
+
* @param {string} layerName layerName: string - Name of the layer in the service
|
|
2551
|
+
* @returns {ServiceLayer} returnType: ServiceLayer - The layer from the service object.
|
|
2552
|
+
*/
|
|
2553
|
+
|
|
2554
|
+
var getLayerFromService = reselect.createSelector(function (store, serviceUrl) {
|
|
2555
|
+
return getLayersFromService$1(store, serviceUrl);
|
|
2556
|
+
}, function (store, serviceUrl) {
|
|
2557
|
+
return serviceUrl;
|
|
2558
|
+
}, function (store, serviceUrl, layerName) {
|
|
2559
|
+
return layerName;
|
|
2560
|
+
}, function (layers, serviceUrl, layerName) {
|
|
2561
|
+
if (!layers) return null;
|
|
2562
|
+
var index = layers.findIndex(function (serviceLayer) {
|
|
2563
|
+
return serviceLayer.name === layerName;
|
|
2564
|
+
});
|
|
2565
|
+
|
|
2566
|
+
if (index === -1) {
|
|
2567
|
+
return null;
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
return layers[index];
|
|
2571
|
+
});
|
|
2572
|
+
/**
|
|
2573
|
+
* Gets the layers stylelist from the servicestore using the serviceUrl and layerName
|
|
2574
|
+
*
|
|
2575
|
+
* Example: layerStyles = getLayerStyles(store, layerService, layerName);
|
|
2576
|
+
* @param {object} store store: object - store from which the layers state will be extracted
|
|
2577
|
+
* @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
|
|
2578
|
+
* @param {string} layerName layerName: string - Name of the layer in the service
|
|
2579
|
+
* @returns {array} returnType: Style[] - array containing layer styles
|
|
2580
|
+
*/
|
|
2581
|
+
|
|
2582
|
+
var getLayerStyles = reselect.createSelector(getLayerFromService, function (layer) {
|
|
2583
|
+
return layer && layer.styles ? layer.styles : [];
|
|
2584
|
+
});
|
|
2542
2585
|
|
|
2543
2586
|
/* *
|
|
2544
2587
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -2602,7 +2645,6 @@
|
|
|
2602
2645
|
getLayers: getLayers,
|
|
2603
2646
|
getBaseLayers: getBaseLayers,
|
|
2604
2647
|
getOverLayers: getOverLayers,
|
|
2605
|
-
getLayerStyles: getLayerStyles,
|
|
2606
2648
|
getLayerDimensions: getLayerDimensions,
|
|
2607
2649
|
getLayerNonTimeDimensions: getLayerNonTimeDimensions,
|
|
2608
2650
|
getLayerTimeDimension: getLayerTimeDimension,
|
|
@@ -2616,7 +2658,10 @@
|
|
|
2616
2658
|
getAvailableBaseLayersForMap: getAvailableBaseLayersForMap,
|
|
2617
2659
|
getServiceIds: getServiceIds,
|
|
2618
2660
|
getServices: getServices,
|
|
2619
|
-
|
|
2661
|
+
getServiceByName: getServiceByName,
|
|
2662
|
+
getLayersFromService: getLayersFromService$1,
|
|
2663
|
+
getLayerFromService: getLayerFromService,
|
|
2664
|
+
getLayerStyles: getLayerStyles
|
|
2620
2665
|
});
|
|
2621
2666
|
|
|
2622
2667
|
/* *
|
|
@@ -2665,7 +2710,6 @@
|
|
|
2665
2710
|
WEBMAP_LAYER_CHANGE_STYLE: WEBMAP_LAYER_CHANGE_STYLE,
|
|
2666
2711
|
WEBMAP_LAYER_CHANGE_DIMENSION: WEBMAP_LAYER_CHANGE_DIMENSION,
|
|
2667
2712
|
WEBMAP_LAYER_SET_DIMENSIONS: WEBMAP_LAYER_SET_DIMENSIONS,
|
|
2668
|
-
WEBMAP_LAYER_SET_STYLES: WEBMAP_LAYER_SET_STYLES,
|
|
2669
2713
|
WEBMAP_LAYER_CHANGE_ENABLED: WEBMAP_LAYER_CHANGE_ENABLED,
|
|
2670
2714
|
WEBMAP_LAYER_DELETE: WEBMAP_LAYER_DELETE,
|
|
2671
2715
|
WEBMAP_LAYER_ERROR: WEBMAP_LAYER_ERROR,
|
|
@@ -2676,6 +2720,7 @@
|
|
|
2676
2720
|
WEBMAP_ADD_BASELAYER: WEBMAP_ADD_BASELAYER,
|
|
2677
2721
|
WEBMAP_ADD_AVAILABLE_BASELAYER: WEBMAP_ADD_AVAILABLE_BASELAYER,
|
|
2678
2722
|
WEBMAP_ADD_AVAILABLE_BASELAYERS: WEBMAP_ADD_AVAILABLE_BASELAYERS,
|
|
2723
|
+
WEBMAP_UPDATE_LAYER_INFO: WEBMAP_UPDATE_LAYER_INFO,
|
|
2679
2724
|
MAP_SERVICES_SET_LAYERS: MAP_SERVICES_SET_LAYERS
|
|
2680
2725
|
});
|
|
2681
2726
|
|
|
@@ -3600,18 +3645,6 @@
|
|
|
3600
3645
|
});
|
|
3601
3646
|
}
|
|
3602
3647
|
|
|
3603
|
-
case WEBMAP_LAYER_SET_STYLES:
|
|
3604
|
-
{
|
|
3605
|
-
var _m = action.payload,
|
|
3606
|
-
styles_1 = _m.styles,
|
|
3607
|
-
layerId_10 = _m.layerId;
|
|
3608
|
-
return produce__default["default"](state, function (draft) {
|
|
3609
|
-
if (draft.byId[layerId_10]) {
|
|
3610
|
-
draft.byId[layerId_10].styles = styles_1;
|
|
3611
|
-
}
|
|
3612
|
-
});
|
|
3613
|
-
}
|
|
3614
|
-
|
|
3615
3648
|
case WEBMAP_ADD_AVAILABLE_BASELAYER:
|
|
3616
3649
|
{
|
|
3617
3650
|
var layer_3 = action.payload.layer;
|
|
@@ -3643,6 +3676,23 @@
|
|
|
3643
3676
|
});
|
|
3644
3677
|
}
|
|
3645
3678
|
|
|
3679
|
+
case WEBMAP_UPDATE_LAYER_INFO:
|
|
3680
|
+
{
|
|
3681
|
+
var _m = action.payload,
|
|
3682
|
+
layerStyle = _m.layerStyle,
|
|
3683
|
+
layerDimensions = _m.layerDimensions;
|
|
3684
|
+
var layerStyleAction = {
|
|
3685
|
+
payload: layerStyle,
|
|
3686
|
+
type: WEBMAP_LAYER_CHANGE_STYLE
|
|
3687
|
+
};
|
|
3688
|
+
var intermediateState = layerStyle === null ? state : reducer(state, layerStyleAction);
|
|
3689
|
+
var dimensionsAction = {
|
|
3690
|
+
payload: layerDimensions,
|
|
3691
|
+
type: WEBMAP_LAYER_SET_DIMENSIONS
|
|
3692
|
+
};
|
|
3693
|
+
return layerDimensions === null ? intermediateState : reducer(intermediateState, dimensionsAction);
|
|
3694
|
+
}
|
|
3695
|
+
|
|
3646
3696
|
default:
|
|
3647
3697
|
return state;
|
|
3648
3698
|
}
|
|
@@ -4340,82 +4390,72 @@
|
|
|
4340
4390
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
4341
4391
|
* */
|
|
4342
4392
|
var ORIGIN_REACTMAPVIEWPARSELAYER = 'ReactMapViewParseLayer';
|
|
4343
|
-
var setServiceMetadata = function setServiceMetadata(wmLayer, mapId, webMapJSInstance, mapProperties,
|
|
4393
|
+
var setServiceMetadata = function setServiceMetadata(wmLayer, mapId, webMapJSInstance, mapProperties, onUpdateLayerInformation) {
|
|
4344
4394
|
var origin = ORIGIN_REACTMAPVIEWPARSELAYER;
|
|
4345
4395
|
var service = webmap.WMGetServiceFromStore(wmLayer.service);
|
|
4346
4396
|
/* Update list of layers for service */
|
|
4347
4397
|
|
|
4348
4398
|
var done = function done(layers) {
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
units
|
|
4378
|
-
currentValue
|
|
4379
|
-
synced
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
units: units,
|
|
4410
|
-
currentValue: currentValue,
|
|
4411
|
-
maxValue: dimMaxValue,
|
|
4412
|
-
minValue: dimMinValue,
|
|
4413
|
-
timeInterval: dimTimeInterval,
|
|
4414
|
-
values: values,
|
|
4415
|
-
synced: synced
|
|
4416
|
-
};
|
|
4417
|
-
})
|
|
4418
|
-
});
|
|
4399
|
+
var updateObject = {
|
|
4400
|
+
origin: ORIGIN_REACTMAPVIEWPARSELAYER,
|
|
4401
|
+
serviceLayers: {
|
|
4402
|
+
id: wmLayer.service,
|
|
4403
|
+
name: wmLayer.title,
|
|
4404
|
+
service: wmLayer.service,
|
|
4405
|
+
layers: layers
|
|
4406
|
+
},
|
|
4407
|
+
layerStyle: {
|
|
4408
|
+
origin: origin,
|
|
4409
|
+
layerId: wmLayer.ReactWMJSLayerId,
|
|
4410
|
+
style: wmLayer.currentStyle
|
|
4411
|
+
},
|
|
4412
|
+
mapDimensions: {
|
|
4413
|
+
origin: origin,
|
|
4414
|
+
mapId: mapId,
|
|
4415
|
+
dimensions: webMapJSInstance.mapdimensions.map(function (_a) {
|
|
4416
|
+
var name = _a.name,
|
|
4417
|
+
units = _a.units,
|
|
4418
|
+
currentValue = _a.currentValue,
|
|
4419
|
+
synced = _a.synced;
|
|
4420
|
+
var reactDim = mapProperties.dimensions && mapProperties.dimensions.find(function (dim) {
|
|
4421
|
+
return dim.name === name;
|
|
4422
|
+
});
|
|
4423
|
+
var newDimValue = reactDim && reactDim.currentValue || currentValue;
|
|
4424
|
+
var newDimSynced = reactDim && reactDim.synced || synced;
|
|
4425
|
+
return {
|
|
4426
|
+
name: name,
|
|
4427
|
+
units: units,
|
|
4428
|
+
currentValue: newDimValue,
|
|
4429
|
+
synced: newDimSynced
|
|
4430
|
+
};
|
|
4431
|
+
})
|
|
4432
|
+
},
|
|
4433
|
+
layerDimensions: {
|
|
4434
|
+
origin: origin,
|
|
4435
|
+
layerId: wmLayer.id,
|
|
4436
|
+
dimensions: wmLayer.dimensions.map(function (_a) {
|
|
4437
|
+
var name = _a.name,
|
|
4438
|
+
units = _a.units,
|
|
4439
|
+
currentValue = _a.currentValue,
|
|
4440
|
+
dimMinValue = _a.dimMinValue,
|
|
4441
|
+
dimMaxValue = _a.dimMaxValue,
|
|
4442
|
+
dimTimeInterval = _a.dimTimeInterval,
|
|
4443
|
+
values = _a.values,
|
|
4444
|
+
synced = _a.synced;
|
|
4445
|
+
return {
|
|
4446
|
+
name: name,
|
|
4447
|
+
units: units,
|
|
4448
|
+
currentValue: currentValue,
|
|
4449
|
+
maxValue: dimMaxValue,
|
|
4450
|
+
minValue: dimMinValue,
|
|
4451
|
+
timeInterval: dimTimeInterval,
|
|
4452
|
+
values: values,
|
|
4453
|
+
synced: synced
|
|
4454
|
+
};
|
|
4455
|
+
})
|
|
4456
|
+
}
|
|
4457
|
+
};
|
|
4458
|
+
onUpdateLayerInformation && onUpdateLayerInformation(updateObject);
|
|
4419
4459
|
};
|
|
4420
4460
|
|
|
4421
4461
|
service.getLayerObjectsFlat(done, function () {// do nothing
|
|
@@ -5038,7 +5078,7 @@
|
|
|
5038
5078
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5039
5079
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
5040
5080
|
* */
|
|
5041
|
-
var useStyles$J =
|
|
5081
|
+
var useStyles$J = makeStyles__default["default"](function (theme) {
|
|
5042
5082
|
return {
|
|
5043
5083
|
select: {
|
|
5044
5084
|
'& ul': {
|
|
@@ -5083,6 +5123,9 @@
|
|
|
5083
5123
|
onChangeMouseWheel = _d === void 0 ? function () {} : _d,
|
|
5084
5124
|
props = __rest(_a, ["tooltip", "list", "currentIndex", "onChangeMouseWheel"]);
|
|
5085
5125
|
|
|
5126
|
+
props.disableUnderline;
|
|
5127
|
+
var otherProps = __rest(props, ["disableUnderline"]);
|
|
5128
|
+
|
|
5086
5129
|
var _e = __read(React__namespace.useState(false), 2),
|
|
5087
5130
|
selectOpen = _e[0],
|
|
5088
5131
|
setSelectOpen = _e[1];
|
|
@@ -5135,11 +5178,11 @@
|
|
|
5135
5178
|
enableScroll();
|
|
5136
5179
|
setTooltipOpen(false);
|
|
5137
5180
|
}, [enableScroll]);
|
|
5138
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
5181
|
+
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
5139
5182
|
title: tooltip,
|
|
5140
5183
|
placement: "top",
|
|
5141
5184
|
open: tooltipOpen
|
|
5142
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
5185
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Select, __assign({
|
|
5143
5186
|
onOpen: onOpen,
|
|
5144
5187
|
onClose: onClose,
|
|
5145
5188
|
onMouseEnter: onMouseEnter,
|
|
@@ -5152,7 +5195,7 @@
|
|
|
5152
5195
|
paper: classes.select
|
|
5153
5196
|
}
|
|
5154
5197
|
}
|
|
5155
|
-
},
|
|
5198
|
+
}, otherProps)));
|
|
5156
5199
|
};
|
|
5157
5200
|
|
|
5158
5201
|
/* *
|
|
@@ -6285,6 +6328,17 @@
|
|
|
6285
6328
|
}, state);
|
|
6286
6329
|
}
|
|
6287
6330
|
|
|
6331
|
+
case WEBMAP_UPDATE_LAYER_INFO:
|
|
6332
|
+
{
|
|
6333
|
+
var mapDimensions = action.payload.mapDimensions;
|
|
6334
|
+
if (mapDimensions === null) return state;
|
|
6335
|
+
var mapAction = {
|
|
6336
|
+
payload: mapDimensions,
|
|
6337
|
+
type: WEBMAP_MAP_UPDATE_ALL_DIMENSIONS
|
|
6338
|
+
};
|
|
6339
|
+
return reducer(state, mapAction);
|
|
6340
|
+
}
|
|
6341
|
+
|
|
6288
6342
|
default:
|
|
6289
6343
|
return state;
|
|
6290
6344
|
}
|
|
@@ -6326,6 +6380,17 @@
|
|
|
6326
6380
|
if (!draft.allIds.includes(action.payload.service)) draft.allIds.push(action.payload.service);
|
|
6327
6381
|
});
|
|
6328
6382
|
|
|
6383
|
+
case WEBMAP_UPDATE_LAYER_INFO:
|
|
6384
|
+
{
|
|
6385
|
+
var serviceLayers = action.payload.serviceLayers;
|
|
6386
|
+
if (serviceLayers === null) return state;
|
|
6387
|
+
var mapAction = {
|
|
6388
|
+
payload: serviceLayers,
|
|
6389
|
+
type: MAP_SERVICES_SET_LAYERS
|
|
6390
|
+
};
|
|
6391
|
+
return reducer(state, mapAction);
|
|
6392
|
+
}
|
|
6393
|
+
|
|
6329
6394
|
default:
|
|
6330
6395
|
return state;
|
|
6331
6396
|
}
|
|
@@ -6535,14 +6600,18 @@
|
|
|
6535
6600
|
});
|
|
6536
6601
|
}
|
|
6537
6602
|
function setLayerDimensionsSaga(_a) {
|
|
6538
|
-
var dimensions, layerId, layer, newTimeDimension, mapId, activeLayerId, shouldAutoUpdate, prevTimeDimension, isAnimating$1, webmapInstance, error_1;
|
|
6603
|
+
var layerDimensions, dimensions, layerId, layer, newTimeDimension, mapId, activeLayerId, shouldAutoUpdate, prevTimeDimension, isAnimating$1, webmapInstance, error_1;
|
|
6539
6604
|
var payload = _a.payload;
|
|
6540
6605
|
return __generator(this, function (_b) {
|
|
6541
6606
|
switch (_b.label) {
|
|
6542
6607
|
case 0:
|
|
6543
6608
|
_b.trys.push([0, 12,, 13]);
|
|
6544
6609
|
|
|
6545
|
-
|
|
6610
|
+
layerDimensions = payload.layerDimensions;
|
|
6611
|
+
if (!layerDimensions) return [2
|
|
6612
|
+
/*return*/
|
|
6613
|
+
];
|
|
6614
|
+
dimensions = layerDimensions.dimensions, layerId = layerDimensions.layerId;
|
|
6546
6615
|
return [4
|
|
6547
6616
|
/*yield*/
|
|
6548
6617
|
, effects.select(getLayerById, layerId)];
|
|
@@ -6746,7 +6815,7 @@
|
|
|
6746
6815
|
|
|
6747
6816
|
return [4
|
|
6748
6817
|
/*yield*/
|
|
6749
|
-
, effects.takeLatest(
|
|
6818
|
+
, effects.takeLatest(WEBMAP_UPDATE_LAYER_INFO, setLayerDimensionsSaga)];
|
|
6750
6819
|
|
|
6751
6820
|
case 4:
|
|
6752
6821
|
_a.sent();
|
|
@@ -6810,6 +6879,7 @@
|
|
|
6810
6879
|
var initialState = {
|
|
6811
6880
|
filters: {
|
|
6812
6881
|
searchFilter: '',
|
|
6882
|
+
activeServices: [],
|
|
6813
6883
|
keywords: [],
|
|
6814
6884
|
addedServices: []
|
|
6815
6885
|
}
|
|
@@ -6828,6 +6898,43 @@
|
|
|
6828
6898
|
});
|
|
6829
6899
|
}
|
|
6830
6900
|
|
|
6901
|
+
case 'LAYER_SELECT_SET_ACTIVE_SERVICES':
|
|
6902
|
+
{
|
|
6903
|
+
var activeServices_1 = action.payload.activeServices;
|
|
6904
|
+
return produce__default["default"](state, function (draft) {
|
|
6905
|
+
activeServices_1.forEach(function (service) {
|
|
6906
|
+
if (draft.filters.activeServices.filter(function (s) {
|
|
6907
|
+
return s.id === service;
|
|
6908
|
+
}).length === 0) draft.filters.activeServices.push({
|
|
6909
|
+
id: service,
|
|
6910
|
+
enabled: true
|
|
6911
|
+
});
|
|
6912
|
+
});
|
|
6913
|
+
});
|
|
6914
|
+
}
|
|
6915
|
+
|
|
6916
|
+
case 'LAYER_SELECT_ENABLE_ACTIVE_SERVICE':
|
|
6917
|
+
{
|
|
6918
|
+
var service_1 = action.payload.service;
|
|
6919
|
+
return produce__default["default"](state, function (draft) {
|
|
6920
|
+
var index = draft.filters.activeServices.findIndex(function (s) {
|
|
6921
|
+
return s.id === service_1;
|
|
6922
|
+
});
|
|
6923
|
+
draft.filters.activeServices[index].enabled = true;
|
|
6924
|
+
});
|
|
6925
|
+
}
|
|
6926
|
+
|
|
6927
|
+
case 'LAYER_SELECT_DISABLE_ACTIVE_SERVICE':
|
|
6928
|
+
{
|
|
6929
|
+
var service_2 = action.payload.service;
|
|
6930
|
+
return produce__default["default"](state, function (draft) {
|
|
6931
|
+
var index = draft.filters.activeServices.findIndex(function (s) {
|
|
6932
|
+
return s.id === service_2;
|
|
6933
|
+
});
|
|
6934
|
+
draft.filters.activeServices[index].enabled = false;
|
|
6935
|
+
});
|
|
6936
|
+
}
|
|
6937
|
+
|
|
6831
6938
|
case 'LAYER_SELECT_ADD_NEW_KEYWORDS':
|
|
6832
6939
|
{
|
|
6833
6940
|
return produce__default["default"](state, function (draft) {
|
|
@@ -6902,6 +7009,9 @@
|
|
|
6902
7009
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
6903
7010
|
* */
|
|
6904
7011
|
var LAYER_SELECT_SET_SEARCH_FILTER = 'LAYER_SELECT_SET_SEARCH_FILTER';
|
|
7012
|
+
var LAYER_SELECT_SET_ACTIVE_SERVICES = 'LAYER_SELECT_SET_ACTIVE_SERVICES';
|
|
7013
|
+
var LAYER_SELECT_DISABLE_ACTIVE_SERVICE = 'LAYER_SELECT_DISABLE_ACTIVE_SERVICE';
|
|
7014
|
+
var LAYER_SELECT_ENABLE_ACTIVE_SERVICE = 'LAYER_SELECT_ENABLE_ACTIVE_SERVICE';
|
|
6905
7015
|
var LAYER_SELECT_ADD_NEW_KEYWORDS = 'LAYER_SELECT_ADD_NEW_KEYWORDS';
|
|
6906
7016
|
|
|
6907
7017
|
/* *
|
|
@@ -6934,6 +7044,45 @@
|
|
|
6934
7044
|
};
|
|
6935
7045
|
};
|
|
6936
7046
|
/**
|
|
7047
|
+
* Sets the given array of string as active services
|
|
7048
|
+
*
|
|
7049
|
+
* Example: setActiveServices({ activeServices: ['service-1', 'service-2'] })
|
|
7050
|
+
* @param {string} payload { activeServices: string[] }
|
|
7051
|
+
*/
|
|
7052
|
+
|
|
7053
|
+
var setActiveServices = function setActiveServices(payload) {
|
|
7054
|
+
return {
|
|
7055
|
+
type: LAYER_SELECT_SET_ACTIVE_SERVICES,
|
|
7056
|
+
payload: payload
|
|
7057
|
+
};
|
|
7058
|
+
};
|
|
7059
|
+
/**
|
|
7060
|
+
* Activates given service in the activeServices array
|
|
7061
|
+
*
|
|
7062
|
+
* Example: enableActiveService({ serviceId: 'service-1' })
|
|
7063
|
+
* @param {string} payload { serviceId: string }
|
|
7064
|
+
*/
|
|
7065
|
+
|
|
7066
|
+
var enableActiveService = function enableActiveService(payload) {
|
|
7067
|
+
return {
|
|
7068
|
+
type: LAYER_SELECT_ENABLE_ACTIVE_SERVICE,
|
|
7069
|
+
payload: payload
|
|
7070
|
+
};
|
|
7071
|
+
};
|
|
7072
|
+
/**
|
|
7073
|
+
* Disables given service in the activeServices array
|
|
7074
|
+
*
|
|
7075
|
+
* Example: disableActiveService({ serviceId: 'service-1' })
|
|
7076
|
+
* @param {string} payload { serviceId: string }
|
|
7077
|
+
*/
|
|
7078
|
+
|
|
7079
|
+
var disableActiveService = function disableActiveService(payload) {
|
|
7080
|
+
return {
|
|
7081
|
+
type: LAYER_SELECT_DISABLE_ACTIVE_SERVICE,
|
|
7082
|
+
payload: payload
|
|
7083
|
+
};
|
|
7084
|
+
};
|
|
7085
|
+
/*
|
|
6937
7086
|
* Sets the given keywords to Layer Select store
|
|
6938
7087
|
*
|
|
6939
7088
|
* Example: addNewKeywords({ keywords: ['keyword1', 'keyword2'] })
|
|
@@ -6963,7 +7112,7 @@
|
|
|
6963
7112
|
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6964
7113
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
6965
7114
|
* */
|
|
6966
|
-
function
|
|
7115
|
+
function newServiceAddedSagaUpdateKeywords(capturedAction) {
|
|
6967
7116
|
var addedService, serviceName, keywords;
|
|
6968
7117
|
return __generator(this, function (_a) {
|
|
6969
7118
|
switch (_a.label) {
|
|
@@ -6999,17 +7148,50 @@
|
|
|
6999
7148
|
}
|
|
7000
7149
|
});
|
|
7001
7150
|
}
|
|
7151
|
+
function newServiceAddedSagaUpdateActiveServices() {
|
|
7152
|
+
var services;
|
|
7153
|
+
return __generator(this, function (_a) {
|
|
7154
|
+
switch (_a.label) {
|
|
7155
|
+
case 0:
|
|
7156
|
+
return [4
|
|
7157
|
+
/*yield*/
|
|
7158
|
+
, effects.select(getServiceIds)];
|
|
7159
|
+
|
|
7160
|
+
case 1:
|
|
7161
|
+
services = _a.sent();
|
|
7162
|
+
return [4
|
|
7163
|
+
/*yield*/
|
|
7164
|
+
, effects.put(setActiveServices({
|
|
7165
|
+
activeServices: services
|
|
7166
|
+
}))];
|
|
7167
|
+
|
|
7168
|
+
case 2:
|
|
7169
|
+
_a.sent();
|
|
7170
|
+
|
|
7171
|
+
return [2
|
|
7172
|
+
/*return*/
|
|
7173
|
+
];
|
|
7174
|
+
}
|
|
7175
|
+
});
|
|
7176
|
+
}
|
|
7002
7177
|
function rootSaga() {
|
|
7003
7178
|
return __generator(this, function (_a) {
|
|
7004
7179
|
switch (_a.label) {
|
|
7005
7180
|
case 0:
|
|
7006
7181
|
return [4
|
|
7007
7182
|
/*yield*/
|
|
7008
|
-
, effects.takeEvery(MAP_SERVICES_SET_LAYERS,
|
|
7183
|
+
, effects.takeEvery(MAP_SERVICES_SET_LAYERS, newServiceAddedSagaUpdateKeywords)];
|
|
7009
7184
|
|
|
7010
7185
|
case 1:
|
|
7011
7186
|
_a.sent();
|
|
7012
7187
|
|
|
7188
|
+
return [4
|
|
7189
|
+
/*yield*/
|
|
7190
|
+
, effects.takeLatest(MAP_SERVICES_SET_LAYERS, newServiceAddedSagaUpdateActiveServices)];
|
|
7191
|
+
|
|
7192
|
+
case 2:
|
|
7193
|
+
_a.sent();
|
|
7194
|
+
|
|
7013
7195
|
return [2
|
|
7014
7196
|
/*return*/
|
|
7015
7197
|
];
|
|
@@ -7161,29 +7343,30 @@
|
|
|
7161
7343
|
var WMSLayerTreeHeader = function WMSLayerTreeHeader(_a) {
|
|
7162
7344
|
var serviceName = _a.serviceName,
|
|
7163
7345
|
onClickReload = _a.onClickReload;
|
|
7164
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
7346
|
+
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
7165
7347
|
container: true,
|
|
7166
7348
|
direction: "row",
|
|
7167
7349
|
spacing: 1,
|
|
7168
|
-
|
|
7169
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7350
|
+
justifyContent: "space-between"
|
|
7351
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
7170
7352
|
item: true
|
|
7171
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7353
|
+
}, /*#__PURE__*/React__namespace.createElement(material.InputLabel, {
|
|
7172
7354
|
shrink: true,
|
|
7173
7355
|
htmlFor: "select-multiple-native"
|
|
7174
|
-
}, "Available layers for ", serviceName)), onClickReload && /*#__PURE__*/React__namespace.createElement(
|
|
7356
|
+
}, "Available layers for ", serviceName)), onClickReload && /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
7175
7357
|
item: true
|
|
7176
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7358
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
7177
7359
|
title: "Reload layers from service",
|
|
7178
7360
|
placement: "top"
|
|
7179
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7361
|
+
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
7180
7362
|
"data-testid": "reloadLayers",
|
|
7181
7363
|
color: "primary",
|
|
7182
7364
|
style: {
|
|
7183
7365
|
padding: 3
|
|
7184
7366
|
},
|
|
7185
|
-
onClick: onClickReload
|
|
7186
|
-
|
|
7367
|
+
onClick: onClickReload,
|
|
7368
|
+
size: "large"
|
|
7369
|
+
}, /*#__PURE__*/React__namespace.createElement(iconsMaterial.Cached, {
|
|
7187
7370
|
fontSize: "small"
|
|
7188
7371
|
})))));
|
|
7189
7372
|
};
|
|
@@ -7265,13 +7448,13 @@
|
|
|
7265
7448
|
if ((!layerTree.children || !layerTree.children.length) && !isLoading) {
|
|
7266
7449
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(WMSLayerTreeHeader, {
|
|
7267
7450
|
serviceName: service.name
|
|
7268
|
-
}), /*#__PURE__*/React__namespace.createElement(
|
|
7451
|
+
}), /*#__PURE__*/React__namespace.createElement(material.Paper, {
|
|
7269
7452
|
"data-testid": "message",
|
|
7270
7453
|
style: paperStyle
|
|
7271
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7454
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
7272
7455
|
p: 2,
|
|
7273
7456
|
display: "flex"
|
|
7274
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7457
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
7275
7458
|
variant: "body2"
|
|
7276
7459
|
}, "No data"))));
|
|
7277
7460
|
} // Base case where there exists at least one layer
|
|
@@ -7305,13 +7488,13 @@
|
|
|
7305
7488
|
onClickReload: function onClickReload() {
|
|
7306
7489
|
return setForceReload(true);
|
|
7307
7490
|
}
|
|
7308
|
-
}), /*#__PURE__*/React__namespace.createElement(
|
|
7491
|
+
}), /*#__PURE__*/React__namespace.createElement(material.Paper, {
|
|
7309
7492
|
style: paperStyle
|
|
7310
|
-
}, isLoading ? /*#__PURE__*/React__namespace.createElement(
|
|
7493
|
+
}, isLoading ? /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
7311
7494
|
p: 4,
|
|
7312
7495
|
display: "flex",
|
|
7313
7496
|
justifyContent: "center"
|
|
7314
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7497
|
+
}, /*#__PURE__*/React__namespace.createElement(material.CircularProgress, null)) : /*#__PURE__*/React__namespace.createElement(material.List, {
|
|
7315
7498
|
"data-testid": "layer-list",
|
|
7316
7499
|
dense: true,
|
|
7317
7500
|
style: {
|
|
@@ -7323,7 +7506,7 @@
|
|
|
7323
7506
|
}, category === '' ? '' // Do not render a subheader if category is empty
|
|
7324
7507
|
:
|
|
7325
7508
|
/*#__PURE__*/
|
|
7326
|
-
React__namespace.createElement(
|
|
7509
|
+
React__namespace.createElement(material.ListSubheader, {
|
|
7327
7510
|
key: category
|
|
7328
7511
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
7329
7512
|
style: {
|
|
@@ -7334,7 +7517,7 @@
|
|
|
7334
7517
|
textOverflow: 'ellipsis'
|
|
7335
7518
|
}
|
|
7336
7519
|
}, category)), layerMap[category].map(function (layer) {
|
|
7337
|
-
return layer.leaf ? /*#__PURE__*/React__namespace.createElement(
|
|
7520
|
+
return layer.leaf ? /*#__PURE__*/React__namespace.createElement(material.ListItem, {
|
|
7338
7521
|
"data-testid": "selectableLayer",
|
|
7339
7522
|
key: layer.name,
|
|
7340
7523
|
button: true,
|
|
@@ -7342,7 +7525,7 @@
|
|
|
7342
7525
|
onClick: function onClick() {
|
|
7343
7526
|
return handleInternalSelect(layer.name);
|
|
7344
7527
|
}
|
|
7345
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7528
|
+
}, /*#__PURE__*/React__namespace.createElement(material.ListItemText, {
|
|
7346
7529
|
id: layer.name,
|
|
7347
7530
|
primary: layer.title
|
|
7348
7531
|
})) : null; // Do not list subcategories as layers
|
|
@@ -7457,27 +7640,27 @@
|
|
|
7457
7640
|
handleChangeService(index);
|
|
7458
7641
|
};
|
|
7459
7642
|
|
|
7460
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(
|
|
7643
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
7461
7644
|
container: true,
|
|
7462
7645
|
direction: "row",
|
|
7463
7646
|
spacing: 1,
|
|
7464
7647
|
style: {
|
|
7465
7648
|
height: '34px'
|
|
7466
7649
|
}
|
|
7467
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7650
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
7468
7651
|
item: true
|
|
7469
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7652
|
+
}, /*#__PURE__*/React__namespace.createElement(material.InputLabel, {
|
|
7470
7653
|
shrink: true,
|
|
7471
7654
|
htmlFor: "select-multiple-native"
|
|
7472
|
-
}, "Available services"))), /*#__PURE__*/React__namespace.createElement(
|
|
7655
|
+
}, "Available services"))), /*#__PURE__*/React__namespace.createElement(material.Paper, {
|
|
7473
7656
|
style: {
|
|
7474
7657
|
height: 200,
|
|
7475
7658
|
overflow: 'auto'
|
|
7476
7659
|
}
|
|
7477
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7660
|
+
}, /*#__PURE__*/React__namespace.createElement(material.List, {
|
|
7478
7661
|
dense: true
|
|
7479
7662
|
}, availableServices.map(function (service, index) {
|
|
7480
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
7663
|
+
return /*#__PURE__*/React__namespace.createElement(material.ListItem, {
|
|
7481
7664
|
"data-testid": "service-item",
|
|
7482
7665
|
key: service.url,
|
|
7483
7666
|
selected: service === activeService,
|
|
@@ -7485,7 +7668,7 @@
|
|
|
7485
7668
|
onClick: function onClick(event) {
|
|
7486
7669
|
handleListItemClick(event, index);
|
|
7487
7670
|
}
|
|
7488
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7671
|
+
}, /*#__PURE__*/React__namespace.createElement(material.ListItemText, {
|
|
7489
7672
|
primary: service.name
|
|
7490
7673
|
}));
|
|
7491
7674
|
}))));
|
|
@@ -7732,7 +7915,7 @@
|
|
|
7732
7915
|
name: 'RAD_NL25_PCP_CM',
|
|
7733
7916
|
format: 'image/png',
|
|
7734
7917
|
enabled: true,
|
|
7735
|
-
style: '
|
|
7918
|
+
style: 'radar/nearest',
|
|
7736
7919
|
id: generateLayerId(),
|
|
7737
7920
|
layerType: LayerType.mapLayer
|
|
7738
7921
|
};
|
|
@@ -8073,7 +8256,7 @@
|
|
|
8073
8256
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8074
8257
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8075
8258
|
* */
|
|
8076
|
-
var useStyles$I =
|
|
8259
|
+
var useStyles$I = makeStyles__default["default"]({
|
|
8077
8260
|
buttonDiv: {
|
|
8078
8261
|
position: 'relative'
|
|
8079
8262
|
},
|
|
@@ -8177,25 +8360,25 @@
|
|
|
8177
8360
|
}
|
|
8178
8361
|
};
|
|
8179
8362
|
|
|
8180
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
8363
|
+
return /*#__PURE__*/React__namespace.createElement(material.Dialog, {
|
|
8181
8364
|
fullWidth: true,
|
|
8182
8365
|
maxWidth: "md",
|
|
8183
8366
|
open: open,
|
|
8184
8367
|
onClose: handleClose,
|
|
8185
8368
|
"aria-labelledby": "form-dialog-title",
|
|
8186
8369
|
"data-testid": "addLayersPopup"
|
|
8187
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8370
|
+
}, /*#__PURE__*/React__namespace.createElement(material.DialogTitle, {
|
|
8188
8371
|
id: "form-dialog-title"
|
|
8189
|
-
}, "Load WMS layer(s)"), /*#__PURE__*/React__namespace.createElement(
|
|
8372
|
+
}, "Load WMS layer(s)"), /*#__PURE__*/React__namespace.createElement(material.DialogContent, null, /*#__PURE__*/React__namespace.createElement(material.DialogContentText, null, "Please enter a wms server, or select one from the list."), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
8190
8373
|
m: 2
|
|
8191
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8374
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8192
8375
|
container: true,
|
|
8193
8376
|
direction: "row",
|
|
8194
8377
|
alignItems: "center"
|
|
8195
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8378
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8196
8379
|
item: true,
|
|
8197
8380
|
xs: 10
|
|
8198
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8381
|
+
}, /*#__PURE__*/React__namespace.createElement(material.TextField, {
|
|
8199
8382
|
margin: "dense",
|
|
8200
8383
|
id: "serviceurl",
|
|
8201
8384
|
label: "Service URL",
|
|
@@ -8215,34 +8398,36 @@
|
|
|
8215
8398
|
fullWidth: true,
|
|
8216
8399
|
disabled: loading,
|
|
8217
8400
|
error: urlError !== '',
|
|
8218
|
-
helperText: urlError
|
|
8219
|
-
|
|
8401
|
+
helperText: urlError,
|
|
8402
|
+
variant: "standard"
|
|
8403
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8220
8404
|
item: true,
|
|
8221
8405
|
xs: 2,
|
|
8222
8406
|
className: classes.buttonDiv
|
|
8223
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8407
|
+
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
8224
8408
|
"data-testid": "add-service",
|
|
8225
8409
|
onClick: handleAddServiceURL,
|
|
8226
8410
|
color: "primary",
|
|
8227
|
-
disabled: loading
|
|
8228
|
-
|
|
8411
|
+
disabled: loading,
|
|
8412
|
+
size: "large"
|
|
8413
|
+
}, /*#__PURE__*/React__namespace.createElement(iconsMaterial.Add, null)), loading && /*#__PURE__*/React__namespace.createElement(material.CircularProgress, {
|
|
8229
8414
|
size: 35,
|
|
8230
8415
|
className: classes.loadingButton
|
|
8231
|
-
})))), /*#__PURE__*/React__namespace.createElement(
|
|
8416
|
+
})))), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
8232
8417
|
m: 2
|
|
8233
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8418
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8234
8419
|
container: true,
|
|
8235
8420
|
direction: "row",
|
|
8236
8421
|
alignItems: "center",
|
|
8237
8422
|
spacing: 3
|
|
8238
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8423
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8239
8424
|
item: true,
|
|
8240
8425
|
xs: 4
|
|
8241
8426
|
}, /*#__PURE__*/React__namespace.createElement(WMSServerList, {
|
|
8242
8427
|
availableServices: services,
|
|
8243
8428
|
service: activeService,
|
|
8244
8429
|
handleChangeService: handleChangeService
|
|
8245
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
8430
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8246
8431
|
item: true,
|
|
8247
8432
|
xs: 8
|
|
8248
8433
|
}, onRenderTree ? onRenderTree(activeService) : /*#__PURE__*/React__namespace.createElement(WMSLayerTreeConnect, {
|
|
@@ -8250,7 +8435,7 @@
|
|
|
8250
8435
|
onClickLayer: onClickService,
|
|
8251
8436
|
highlightedLayers: highlightedLayers,
|
|
8252
8437
|
layerType: layerType
|
|
8253
|
-
}))))), /*#__PURE__*/React__namespace.createElement(
|
|
8438
|
+
}))))), /*#__PURE__*/React__namespace.createElement(material.DialogActions, null, /*#__PURE__*/React__namespace.createElement(material.Button, {
|
|
8254
8439
|
onClick: handleClose,
|
|
8255
8440
|
color: "primary"
|
|
8256
8441
|
}, "Close")));
|
|
@@ -8272,7 +8457,7 @@
|
|
|
8272
8457
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8273
8458
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8274
8459
|
* */
|
|
8275
|
-
var useStyles$H =
|
|
8460
|
+
var useStyles$H = makeStyles__default["default"](function (theme) {
|
|
8276
8461
|
return {
|
|
8277
8462
|
buttonDiv: {
|
|
8278
8463
|
position: 'relative'
|
|
@@ -8323,15 +8508,16 @@
|
|
|
8323
8508
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8324
8509
|
|
|
8325
8510
|
}, []);
|
|
8326
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(
|
|
8511
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
8327
8512
|
title: tooltip
|
|
8328
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8513
|
+
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
8329
8514
|
onClick: handleClose,
|
|
8330
8515
|
className: classes.button,
|
|
8331
8516
|
disableRipple: true,
|
|
8332
8517
|
"data-testid": "addLayersButton",
|
|
8333
|
-
ref: ref
|
|
8334
|
-
|
|
8518
|
+
ref: ref,
|
|
8519
|
+
size: "large"
|
|
8520
|
+
}, /*#__PURE__*/React__namespace.createElement(iconsMaterial.Add, null))), /*#__PURE__*/React__namespace.createElement(AddLayersPopup, {
|
|
8335
8521
|
open: open,
|
|
8336
8522
|
handleClose: handleClose,
|
|
8337
8523
|
onClickService: onClickService,
|
|
@@ -8360,7 +8546,7 @@
|
|
|
8360
8546
|
* */
|
|
8361
8547
|
var iconButtonSize = 30;
|
|
8362
8548
|
var totalButtons = 5;
|
|
8363
|
-
var LayerManagerColumnsLarge =
|
|
8549
|
+
var LayerManagerColumnsLarge = makeStyles__default["default"]({
|
|
8364
8550
|
column1: {
|
|
8365
8551
|
width: iconButtonSize * 3,
|
|
8366
8552
|
display: 'flex'
|
|
@@ -8382,7 +8568,7 @@
|
|
|
8382
8568
|
display: 'inline-flex'
|
|
8383
8569
|
}
|
|
8384
8570
|
});
|
|
8385
|
-
var LayerManagerColumnsSmall =
|
|
8571
|
+
var LayerManagerColumnsSmall = makeStyles__default["default"]({
|
|
8386
8572
|
column1: {
|
|
8387
8573
|
width: iconButtonSize * 3
|
|
8388
8574
|
},
|
|
@@ -8431,7 +8617,7 @@
|
|
|
8431
8617
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8432
8618
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8433
8619
|
* */
|
|
8434
|
-
var useStyles$G =
|
|
8620
|
+
var useStyles$G = makeStyles__default["default"](function (theme) {
|
|
8435
8621
|
return {
|
|
8436
8622
|
button: {
|
|
8437
8623
|
width: '24px',
|
|
@@ -8463,15 +8649,16 @@
|
|
|
8463
8649
|
source: source
|
|
8464
8650
|
}));
|
|
8465
8651
|
}, [currentActiveMapId, dispatch, isOpenInStore, mapId, source]);
|
|
8466
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
8652
|
+
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
8467
8653
|
title: "Layer Select"
|
|
8468
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8654
|
+
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
8469
8655
|
onClick: openLayerSelectDialog,
|
|
8470
8656
|
className: classes.button,
|
|
8471
8657
|
id: "layerSelectButton",
|
|
8472
8658
|
"data-testid": "layerSelectButton",
|
|
8473
|
-
disableRipple: true
|
|
8474
|
-
|
|
8659
|
+
disableRipple: true,
|
|
8660
|
+
size: "large"
|
|
8661
|
+
}, /*#__PURE__*/React__namespace.createElement(iconsMaterial.Add, null)));
|
|
8475
8662
|
};
|
|
8476
8663
|
|
|
8477
8664
|
/* *
|
|
@@ -8490,7 +8677,7 @@
|
|
|
8490
8677
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8491
8678
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8492
8679
|
* */
|
|
8493
|
-
var useStyles$F =
|
|
8680
|
+
var useStyles$F = makeStyles__default["default"]({
|
|
8494
8681
|
row: {
|
|
8495
8682
|
height: '32px'
|
|
8496
8683
|
},
|
|
@@ -8516,12 +8703,12 @@
|
|
|
8516
8703
|
layerSelect = _e === void 0 ? false : _e;
|
|
8517
8704
|
var classes = useStyles$F();
|
|
8518
8705
|
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
8519
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
8706
|
+
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8520
8707
|
container: true,
|
|
8521
8708
|
item: true,
|
|
8522
8709
|
"data-testid": "descriptionRow",
|
|
8523
8710
|
className: classes.row
|
|
8524
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8711
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8525
8712
|
item: true,
|
|
8526
8713
|
className: columnSizes.column1
|
|
8527
8714
|
}, /*#__PURE__*/React__namespace.createElement(AddLayersButton, {
|
|
@@ -8537,23 +8724,23 @@
|
|
|
8537
8724
|
shouldFocus: true
|
|
8538
8725
|
}), layerSelect && /*#__PURE__*/React__namespace.createElement(LayerSelectButtonConnect, {
|
|
8539
8726
|
mapId: mapId
|
|
8540
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
8727
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8541
8728
|
className: columnSizes.column2
|
|
8542
8729
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
8543
8730
|
className: classes.text
|
|
8544
|
-
}, "Layer")), /*#__PURE__*/React__namespace.createElement(
|
|
8731
|
+
}, "Layer")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8545
8732
|
className: columnSizes.column3
|
|
8546
8733
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
8547
8734
|
className: classes.text
|
|
8548
|
-
}, "Style")), /*#__PURE__*/React__namespace.createElement(
|
|
8735
|
+
}, "Style")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8549
8736
|
className: columnSizes.column4
|
|
8550
8737
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
8551
8738
|
className: classes.text
|
|
8552
|
-
}, "Opacity")), /*#__PURE__*/React__namespace.createElement(
|
|
8739
|
+
}, "Opacity")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8553
8740
|
className: columnSizes.column5
|
|
8554
8741
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
8555
8742
|
className: classes.text
|
|
8556
|
-
}, "Dimensions")), /*#__PURE__*/React__namespace.createElement(
|
|
8743
|
+
}, "Dimensions")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8557
8744
|
className: columnSizes.column6
|
|
8558
8745
|
}));
|
|
8559
8746
|
};
|
|
@@ -8574,8 +8761,8 @@
|
|
|
8574
8761
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8575
8762
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8576
8763
|
* */
|
|
8577
|
-
var useTooltipContainerStyles =
|
|
8578
|
-
return
|
|
8764
|
+
var useTooltipContainerStyles = makeStyles__default["default"](function (theme) {
|
|
8765
|
+
return createStyles__default["default"]({
|
|
8579
8766
|
textContainer: {
|
|
8580
8767
|
width: '100%',
|
|
8581
8768
|
height: 32,
|
|
@@ -8584,6 +8771,12 @@
|
|
|
8584
8771
|
color: function color(isEnabled) {
|
|
8585
8772
|
return isEnabled ? theme.palette.geowebColors.layerManager.tableRowDefaultText.rgba : theme.palette.geowebColors.layerManager.tableRowDisabledText.rgba;
|
|
8586
8773
|
},
|
|
8774
|
+
'& .MuiOutlinedInput-input': {
|
|
8775
|
+
padding: '6px 24px 6px 8px'
|
|
8776
|
+
},
|
|
8777
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
8778
|
+
borderColor: 'transparent!important'
|
|
8779
|
+
},
|
|
8587
8780
|
'&:hover .MuiSelect-select': {
|
|
8588
8781
|
backgroundColor: theme.palette.geowebColors.layerManager.tableRowMouseover.rgba
|
|
8589
8782
|
},
|
|
@@ -8703,12 +8896,12 @@
|
|
|
8703
8896
|
return value === activeDim.currentValue;
|
|
8704
8897
|
});
|
|
8705
8898
|
if (dimValueCurrentIndex === -1) return null;
|
|
8706
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
8899
|
+
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8707
8900
|
container: true,
|
|
8708
8901
|
direction: "row",
|
|
8709
|
-
|
|
8902
|
+
justifyContent: "flex-start",
|
|
8710
8903
|
alignItems: "center"
|
|
8711
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8904
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
8712
8905
|
item: true,
|
|
8713
8906
|
xs: 12
|
|
8714
8907
|
}, /*#__PURE__*/React__namespace.createElement(TooltipSelect, {
|
|
@@ -8730,10 +8923,10 @@
|
|
|
8730
8923
|
style: {
|
|
8731
8924
|
maxWidth: '50%'
|
|
8732
8925
|
}
|
|
8733
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8926
|
+
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
8734
8927
|
disabled: true
|
|
8735
8928
|
}, "Select dimension"), layerDimensions.map(function (dimension) {
|
|
8736
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
8929
|
+
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
8737
8930
|
key: dimension.name,
|
|
8738
8931
|
value: dimension.name
|
|
8739
8932
|
}, dimension.name);
|
|
@@ -8756,10 +8949,10 @@
|
|
|
8756
8949
|
style: {
|
|
8757
8950
|
maxWidth: '50%'
|
|
8758
8951
|
}
|
|
8759
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
8952
|
+
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
8760
8953
|
disabled: true
|
|
8761
8954
|
}, "Select dimension value. (", valuesToDisplay.length, " options)"), valuesToDisplay.map(function (dimValue) {
|
|
8762
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
8955
|
+
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
8763
8956
|
key: dimValue,
|
|
8764
8957
|
value: dimValue
|
|
8765
8958
|
}, "" + dimValue, /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, "\xA0", /*#__PURE__*/React__namespace.createElement("i", null, "" + activeDim.units)));
|
|
@@ -8782,8 +8975,8 @@
|
|
|
8782
8975
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8783
8976
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8784
8977
|
* */
|
|
8785
|
-
var useStyles$E =
|
|
8786
|
-
return
|
|
8978
|
+
var useStyles$E = makeStyles__default["default"](function (theme) {
|
|
8979
|
+
return createStyles__default["default"]({
|
|
8787
8980
|
button: {
|
|
8788
8981
|
height: 28,
|
|
8789
8982
|
width: 28,
|
|
@@ -8824,6 +9017,9 @@
|
|
|
8824
9017
|
return isActive ? theme.palette.geowebColors.buttons.primaryMouseover.fill : theme.palette.geowebColors.layerManager.tableRowMouseover.rgba;
|
|
8825
9018
|
}
|
|
8826
9019
|
}
|
|
9020
|
+
},
|
|
9021
|
+
popper: {
|
|
9022
|
+
pointerEvents: 'none'
|
|
8827
9023
|
}
|
|
8828
9024
|
});
|
|
8829
9025
|
});
|
|
@@ -8850,10 +9046,13 @@
|
|
|
8850
9046
|
onClick(event);
|
|
8851
9047
|
};
|
|
8852
9048
|
|
|
8853
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
9049
|
+
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
8854
9050
|
title: tooltipTitle,
|
|
8855
|
-
placement: "top"
|
|
8856
|
-
|
|
9051
|
+
placement: "top",
|
|
9052
|
+
classes: {
|
|
9053
|
+
popper: classes.popper
|
|
9054
|
+
}
|
|
9055
|
+
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, __assign({
|
|
8857
9056
|
size: "small",
|
|
8858
9057
|
onClick: handleClick,
|
|
8859
9058
|
"data-testid": testId,
|
|
@@ -8878,8 +9077,8 @@
|
|
|
8878
9077
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8879
9078
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8880
9079
|
* */
|
|
8881
|
-
var useStyles$D =
|
|
8882
|
-
return
|
|
9080
|
+
var useStyles$D = makeStyles__default["default"](function (theme) {
|
|
9081
|
+
return createStyles__default["default"]({
|
|
8883
9082
|
checkbox: {
|
|
8884
9083
|
color: 'inherit',
|
|
8885
9084
|
padding: 4,
|
|
@@ -8907,14 +9106,14 @@
|
|
|
8907
9106
|
onChangeEnableLayer(!isEnabled);
|
|
8908
9107
|
};
|
|
8909
9108
|
|
|
8910
|
-
var visibilityIcon = /*#__PURE__*/React__namespace.createElement(
|
|
9109
|
+
var visibilityIcon = /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
8911
9110
|
width: 24,
|
|
8912
9111
|
height: 24,
|
|
8913
9112
|
fill: "transparent"
|
|
8914
9113
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
8915
9114
|
d: "M14.4980749,15.8618431 C15.8661433,15.0851043 16.779689,13.6936347 16.779689,12.1014551 C16.779689,10.5092755 15.8661433,9.11870594 14.4980749,8.34106705 C17.6257313,9.18620931 19.3529176,11.4300215 19.8092405,12.1014551 C19.3529176,12.7719886 17.6266313,15.0167008 14.4980749,15.8618431 L14.4980749,15.8618431 Z M4.18985949,12.1014551 C4.64618231,11.4300215 6.37336867,9.18710936 9.49922496,8.3419671 C8.13295665,9.11870594 7.21851093,10.5101755 7.21851093,12.1014551 C7.21851093,13.6936347 8.13295665,15.0842042 9.49922496,15.8618431 C6.37336867,15.0167008 4.64618231,12.7728886 4.18985949,12.1014551 L4.18985949,12.1014551 Z M11.99955,13.8583429 C10.9950998,13.8583429 10.180559,13.0717036 10.180559,12.1014551 C10.180559,11.1312066 10.9950998,10.3445672 11.99955,10.3445672 C13.0031002,10.3445672 13.8176409,11.1312066 13.8176409,12.1014551 C13.8176409,13.0717036 13.0031002,13.8583429 11.99955,13.8583429 L11.99955,13.8583429 Z M20.7983899,11.7666383 C20.6813841,11.5713286 17.8696435,7 11.99955,7 C6.12945647,7 3.31681584,11.5713286 3.19980999,11.7666383 L3,12.1014551 L3.19980999,12.4362718 C3.31681584,12.6306815 6.12945647,17.2020101 11.99955,17.2020101 C17.8696435,17.2020101 20.6813841,12.6306815 20.7983899,12.4362718 L21,12.1014551 L20.7983899,11.7666383 Z"
|
|
8916
9115
|
}));
|
|
8917
|
-
var visibilityOffIcon = /*#__PURE__*/React__namespace.createElement(
|
|
9116
|
+
var visibilityOffIcon = /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
|
|
8918
9117
|
style: {
|
|
8919
9118
|
marginTop: 2
|
|
8920
9119
|
}
|
|
@@ -8928,7 +9127,7 @@
|
|
|
8928
9127
|
return /*#__PURE__*/React__namespace.createElement(LayerManagerButton, {
|
|
8929
9128
|
tooltipTitle: title,
|
|
8930
9129
|
onClick: onClick,
|
|
8931
|
-
icon: /*#__PURE__*/React__namespace.createElement(
|
|
9130
|
+
icon: /*#__PURE__*/React__namespace.createElement(material.Checkbox, {
|
|
8932
9131
|
className: classes.checkbox,
|
|
8933
9132
|
icon: visibilityOffIcon,
|
|
8934
9133
|
checkedIcon: visibilityIcon,
|
|
@@ -8957,8 +9156,8 @@
|
|
|
8957
9156
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8958
9157
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8959
9158
|
* */
|
|
8960
|
-
var useStyles$C =
|
|
8961
|
-
return
|
|
9159
|
+
var useStyles$C = makeStyles__default["default"](function (theme) {
|
|
9160
|
+
return createStyles__default["default"]({
|
|
8962
9161
|
dropdownEmpty: {
|
|
8963
9162
|
paddingLeft: 8,
|
|
8964
9163
|
height: 32,
|
|
@@ -8986,7 +9185,7 @@
|
|
|
8986
9185
|
if (!layers || !layers.length) {
|
|
8987
9186
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
8988
9187
|
className: classes.dropdownEmpty
|
|
8989
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
9188
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
8990
9189
|
variant: "body1",
|
|
8991
9190
|
className: classes.emptyText
|
|
8992
9191
|
}, "No service available"));
|
|
@@ -9026,10 +9225,10 @@
|
|
|
9026
9225
|
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
9027
9226
|
return onChangeLayerName(e.value);
|
|
9028
9227
|
}
|
|
9029
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
9228
|
+
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9030
9229
|
disabled: true
|
|
9031
9230
|
}, "Select layer"), layers.map(function (layerFromServiceLayers) {
|
|
9032
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
9231
|
+
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9033
9232
|
key: layerFromServiceLayers.name,
|
|
9034
9233
|
value: layerFromServiceLayers.name,
|
|
9035
9234
|
disabled: !layerFromServiceLayers.leaf
|
|
@@ -9053,7 +9252,7 @@
|
|
|
9053
9252
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9054
9253
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9055
9254
|
* */
|
|
9056
|
-
var useStyles$B =
|
|
9255
|
+
var useStyles$B = makeStyles__default["default"](function (theme) {
|
|
9057
9256
|
return {
|
|
9058
9257
|
opacityDiv: {
|
|
9059
9258
|
height: 'calc(100% - 5px)',
|
|
@@ -9173,12 +9372,12 @@
|
|
|
9173
9372
|
className: classes.opacityDiv,
|
|
9174
9373
|
onWheel: onWheel,
|
|
9175
9374
|
"data-testid": "scrollOpacity"
|
|
9176
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
9375
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
9177
9376
|
title: tooltipTitle,
|
|
9178
9377
|
className: containerClass.textContainer,
|
|
9179
9378
|
placement: "top",
|
|
9180
9379
|
open: tooltipOpen
|
|
9181
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
9380
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Button, {
|
|
9182
9381
|
tabIndex: 0,
|
|
9183
9382
|
className: classes.opacityButton,
|
|
9184
9383
|
onClick: onClickButton,
|
|
@@ -9188,7 +9387,7 @@
|
|
|
9188
9387
|
onMouseLeave: onMouseLeave,
|
|
9189
9388
|
onFocus: onFocus,
|
|
9190
9389
|
onBlur: onBlur
|
|
9191
|
-
},
|
|
9390
|
+
}, Math.round(currentOpacity * 100) + " %")), open ? /*#__PURE__*/React__namespace.createElement("div", {
|
|
9192
9391
|
className: classes.sliderBackground
|
|
9193
9392
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
9194
9393
|
className: sliderClasses.sliderHeader
|
|
@@ -9224,8 +9423,8 @@
|
|
|
9224
9423
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9225
9424
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9226
9425
|
* */
|
|
9227
|
-
var useStyles$A =
|
|
9228
|
-
return
|
|
9426
|
+
var useStyles$A = makeStyles__default["default"](function (theme) {
|
|
9427
|
+
return createStyles__default["default"]({
|
|
9229
9428
|
icon: {
|
|
9230
9429
|
minWidth: 32,
|
|
9231
9430
|
color: theme.palette.geowebColors.layerManager.tableRowDefaultIcon.rgba
|
|
@@ -9242,12 +9441,12 @@
|
|
|
9242
9441
|
tooltipTitle = _a.tooltipTitle,
|
|
9243
9442
|
icon = _a.icon;
|
|
9244
9443
|
var classes = useStyles$A();
|
|
9245
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(
|
|
9444
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(material.ListItemIcon, {
|
|
9246
9445
|
className: classes.icon + " icon"
|
|
9247
|
-
}, icon), /*#__PURE__*/React__namespace.createElement(
|
|
9446
|
+
}, icon), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
9248
9447
|
title: tooltipTitle,
|
|
9249
9448
|
placement: "top"
|
|
9250
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
9449
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
9251
9450
|
className: classes.text,
|
|
9252
9451
|
variant: "inherit"
|
|
9253
9452
|
}, title)));
|
|
@@ -9269,7 +9468,7 @@
|
|
|
9269
9468
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9270
9469
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9271
9470
|
* */
|
|
9272
|
-
var useStyles$z =
|
|
9471
|
+
var useStyles$z = makeStyles__default["default"](function (theme) {
|
|
9273
9472
|
return {
|
|
9274
9473
|
menu: {
|
|
9275
9474
|
backgroundColor: theme.palette.geowebColors.background.surface,
|
|
@@ -9312,10 +9511,10 @@
|
|
|
9312
9511
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(LayerManagerButton, {
|
|
9313
9512
|
tooltipTitle: tooltipTitle,
|
|
9314
9513
|
onClick: handleClick,
|
|
9315
|
-
icon: /*#__PURE__*/React__namespace.createElement(
|
|
9514
|
+
icon: /*#__PURE__*/React__namespace.createElement(iconsMaterial.MoreVert, null),
|
|
9316
9515
|
testId: "openMenuButton",
|
|
9317
9516
|
isEnabled: isEnabled
|
|
9318
|
-
}), /*#__PURE__*/React__namespace.createElement(
|
|
9517
|
+
}), /*#__PURE__*/React__namespace.createElement(material.Menu, {
|
|
9319
9518
|
anchorEl: anchorEl,
|
|
9320
9519
|
keepMounted: true,
|
|
9321
9520
|
open: Boolean(anchorEl),
|
|
@@ -9323,13 +9522,13 @@
|
|
|
9323
9522
|
PaperProps: {
|
|
9324
9523
|
className: classes.menu
|
|
9325
9524
|
}
|
|
9326
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
9525
|
+
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9327
9526
|
"data-testid": "duplicateLayerButton",
|
|
9328
9527
|
onClick: onClickDuplicate
|
|
9329
9528
|
}, /*#__PURE__*/React__namespace.createElement(MenuItemButton, {
|
|
9330
9529
|
title: "Duplicate layer",
|
|
9331
9530
|
tooltipTitle: "Duplicate layer",
|
|
9332
|
-
icon: /*#__PURE__*/React__namespace.createElement(
|
|
9531
|
+
icon: /*#__PURE__*/React__namespace.createElement(iconsMaterial.FileCopy, {
|
|
9333
9532
|
fontSize: "small"
|
|
9334
9533
|
})
|
|
9335
9534
|
}))));
|
|
@@ -9385,10 +9584,10 @@
|
|
|
9385
9584
|
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
9386
9585
|
return onChangeLayerStyle(e.value);
|
|
9387
9586
|
}
|
|
9388
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
9587
|
+
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9389
9588
|
disabled: true
|
|
9390
9589
|
}, "Select style"), styles.map(function (styleFromlayer) {
|
|
9391
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
9590
|
+
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
9392
9591
|
key: styleFromlayer.name,
|
|
9393
9592
|
value: styleFromlayer.name
|
|
9394
9593
|
}, styleFromlayer.title);
|
|
@@ -9411,8 +9610,8 @@
|
|
|
9411
9610
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9412
9611
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9413
9612
|
* */
|
|
9414
|
-
var useStyles$y =
|
|
9415
|
-
return
|
|
9613
|
+
var useStyles$y = makeStyles__default["default"](function () {
|
|
9614
|
+
return createStyles__default["default"]({
|
|
9416
9615
|
icon: {
|
|
9417
9616
|
width: 20,
|
|
9418
9617
|
height: 20
|
|
@@ -9429,7 +9628,7 @@
|
|
|
9429
9628
|
return /*#__PURE__*/React__namespace.createElement(LayerManagerButton, {
|
|
9430
9629
|
tooltipTitle: tooltipTitle,
|
|
9431
9630
|
onClick: onClickDelete,
|
|
9432
|
-
icon: /*#__PURE__*/React__namespace.createElement(
|
|
9631
|
+
icon: /*#__PURE__*/React__namespace.createElement(iconsMaterial.Delete, {
|
|
9433
9632
|
className: classes.icon
|
|
9434
9633
|
}),
|
|
9435
9634
|
testId: "deleteButton",
|
|
@@ -9453,8 +9652,8 @@
|
|
|
9453
9652
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9454
9653
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9455
9654
|
* */
|
|
9456
|
-
var useStyles$x =
|
|
9457
|
-
return
|
|
9655
|
+
var useStyles$x = makeStyles__default["default"](function (theme) {
|
|
9656
|
+
return createStyles__default["default"]({
|
|
9458
9657
|
icon: {
|
|
9459
9658
|
width: 18,
|
|
9460
9659
|
height: 18,
|
|
@@ -9496,7 +9695,7 @@
|
|
|
9496
9695
|
});
|
|
9497
9696
|
|
|
9498
9697
|
var Icon = function Icon() {
|
|
9499
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
9698
|
+
return /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
|
|
9500
9699
|
className: classes.icon
|
|
9501
9700
|
}, /*#__PURE__*/React__namespace.createElement("g", {
|
|
9502
9701
|
id: "Concept-3",
|
|
@@ -9539,8 +9738,8 @@
|
|
|
9539
9738
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9540
9739
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9541
9740
|
* */
|
|
9542
|
-
var useStyles$w =
|
|
9543
|
-
return
|
|
9741
|
+
var useStyles$w = makeStyles__default["default"](function (theme) {
|
|
9742
|
+
return createStyles__default["default"]({
|
|
9544
9743
|
row: {
|
|
9545
9744
|
background: function background(isEnabled) {
|
|
9546
9745
|
return isEnabled ? theme.palette.geowebColors.layerManager.tableRowDefaultCardContainer.fill : theme.palette.geowebColors.layerManager.tableRowDisabledCardContainer.fill;
|
|
@@ -9598,12 +9797,12 @@
|
|
|
9598
9797
|
return onLayerRowClick(layerId);
|
|
9599
9798
|
};
|
|
9600
9799
|
|
|
9601
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
9800
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9602
9801
|
className: classes.row,
|
|
9603
9802
|
item: true,
|
|
9604
9803
|
container: true,
|
|
9605
9804
|
"data-testid": "layerRow-" + layerId
|
|
9606
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
9805
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9607
9806
|
item: true,
|
|
9608
9807
|
className: columnSizes.column1
|
|
9609
9808
|
}, dragHandle, layerEnableLayout || /*#__PURE__*/React__default["default"].createElement(EnableLayer, {
|
|
@@ -9617,7 +9816,7 @@
|
|
|
9617
9816
|
}
|
|
9618
9817
|
}), layerActiveLayout || /*#__PURE__*/React__default["default"].createElement(ActivateLayer, {
|
|
9619
9818
|
onClickActivate: onClickRow
|
|
9620
|
-
})), /*#__PURE__*/React__default["default"].createElement(
|
|
9819
|
+
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9621
9820
|
item: true,
|
|
9622
9821
|
className: "" + columnSizes.column2
|
|
9623
9822
|
}, layerServicesLayout || /*#__PURE__*/React__default["default"].createElement(RenderLayers, {
|
|
@@ -9629,7 +9828,7 @@
|
|
|
9629
9828
|
name: name
|
|
9630
9829
|
});
|
|
9631
9830
|
}
|
|
9632
|
-
})), /*#__PURE__*/React__default["default"].createElement(
|
|
9831
|
+
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9633
9832
|
item: true,
|
|
9634
9833
|
className: "" + columnSizes.column3
|
|
9635
9834
|
}, layerStylesLayout || /*#__PURE__*/React__default["default"].createElement(RenderStyles, {
|
|
@@ -9642,7 +9841,7 @@
|
|
|
9642
9841
|
style: style
|
|
9643
9842
|
});
|
|
9644
9843
|
}
|
|
9645
|
-
})), /*#__PURE__*/React__default["default"].createElement(
|
|
9844
|
+
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9646
9845
|
item: true,
|
|
9647
9846
|
className: "" + columnSizes.column4
|
|
9648
9847
|
}, layerOpacityLayout || /*#__PURE__*/React__default["default"].createElement(OpacitySelect, {
|
|
@@ -9654,7 +9853,7 @@
|
|
|
9654
9853
|
opacity: _opacity
|
|
9655
9854
|
});
|
|
9656
9855
|
}
|
|
9657
|
-
})), /*#__PURE__*/React__default["default"].createElement(
|
|
9856
|
+
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9658
9857
|
item: true,
|
|
9659
9858
|
className: "" + columnSizes.column5
|
|
9660
9859
|
}, layerDimensionLayout || /*#__PURE__*/React__default["default"].createElement(DimensionSelect, {
|
|
@@ -9672,7 +9871,7 @@
|
|
|
9672
9871
|
dimension: dimension
|
|
9673
9872
|
});
|
|
9674
9873
|
}
|
|
9675
|
-
})), /*#__PURE__*/React__default["default"].createElement(
|
|
9874
|
+
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
9676
9875
|
item: true,
|
|
9677
9876
|
className: columnSizes.column6
|
|
9678
9877
|
}, layerDeleteLayout || /*#__PURE__*/React__default["default"].createElement(DeleteButton, {
|
|
@@ -9894,11 +10093,14 @@
|
|
|
9894
10093
|
var RenderStylesConnect = function RenderStylesConnect(_a) {
|
|
9895
10094
|
var layerId = _a.layerId;
|
|
9896
10095
|
var dispatch = reactRedux.useDispatch();
|
|
10096
|
+
var layerService = reactRedux.useSelector(function (store) {
|
|
10097
|
+
return getLayerService(store, layerId);
|
|
10098
|
+
});
|
|
9897
10099
|
var layerName = reactRedux.useSelector(function (store) {
|
|
9898
10100
|
return getLayerName(store, layerId);
|
|
9899
10101
|
});
|
|
9900
10102
|
var layerStyles = reactRedux.useSelector(function (store) {
|
|
9901
|
-
return getLayerStyles(store,
|
|
10103
|
+
return getLayerStyles(store, layerService, layerName);
|
|
9902
10104
|
});
|
|
9903
10105
|
var currentLayerStyle = reactRedux.useSelector(function (store) {
|
|
9904
10106
|
return getLayerStyle(store, layerId);
|
|
@@ -9951,7 +10153,7 @@
|
|
|
9951
10153
|
return getLayerEnabled(store, layerId);
|
|
9952
10154
|
});
|
|
9953
10155
|
var layers = reactRedux.useSelector(function (store) {
|
|
9954
|
-
return
|
|
10156
|
+
return getLayersFromService$1(store, layerService);
|
|
9955
10157
|
});
|
|
9956
10158
|
var layerChangeName$1 = React__namespace.useCallback(function (_a) {
|
|
9957
10159
|
var layerId = _a.layerId,
|
|
@@ -10170,7 +10372,7 @@
|
|
|
10170
10372
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10171
10373
|
* */
|
|
10172
10374
|
var TOOLTIP_TITLE = 'Drag a layer up or down';
|
|
10173
|
-
var useStyles$v =
|
|
10375
|
+
var useStyles$v = makeStyles__default["default"](function (theme) {
|
|
10174
10376
|
return {
|
|
10175
10377
|
dragHandle: {
|
|
10176
10378
|
cursor: 'grab',
|
|
@@ -10178,6 +10380,7 @@
|
|
|
10178
10380
|
'&:hover': {
|
|
10179
10381
|
backgroundColor: 'inherit'
|
|
10180
10382
|
},
|
|
10383
|
+
height: 32,
|
|
10181
10384
|
color: function color(_a) {
|
|
10182
10385
|
var isDisabled = _a.isDisabled;
|
|
10183
10386
|
return isDisabled ? theme.palette.geowebColors.layerManager.tableRowDefaultIcon.rgba : theme.palette.geowebColors.layerManager.tableRowDisabledIcon.fill;
|
|
@@ -10199,7 +10402,7 @@
|
|
|
10199
10402
|
var tooltipTitle = hideTooltip ? '' : TOOLTIP_TITLE;
|
|
10200
10403
|
return /*#__PURE__*/React__default["default"].createElement(LayerManagerButton, {
|
|
10201
10404
|
tooltipTitle: tooltipTitle,
|
|
10202
|
-
icon: /*#__PURE__*/React__default["default"].createElement(
|
|
10405
|
+
icon: /*#__PURE__*/React__default["default"].createElement(iconsMaterial.DragIndicator, null),
|
|
10203
10406
|
testId: "dragHandle" + (index !== undefined ? "-" + index : ''),
|
|
10204
10407
|
className: classes.dragHandle + " handle",
|
|
10205
10408
|
tabIndex: -1,
|
|
@@ -10226,7 +10429,7 @@
|
|
|
10226
10429
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10227
10430
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10228
10431
|
* */
|
|
10229
|
-
var useStyles$u =
|
|
10432
|
+
var useStyles$u = makeStyles__default["default"](function () {
|
|
10230
10433
|
return {
|
|
10231
10434
|
layerRows: {
|
|
10232
10435
|
width: '100%',
|
|
@@ -10293,7 +10496,7 @@
|
|
|
10293
10496
|
var isSorting = activeDragIndex !== null;
|
|
10294
10497
|
var isDragDisabled = layerIds.length === 1;
|
|
10295
10498
|
var classes = useStyles$u(isSorting);
|
|
10296
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
10499
|
+
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10297
10500
|
container: true,
|
|
10298
10501
|
item: true,
|
|
10299
10502
|
className: classes.layerRows,
|
|
@@ -10363,7 +10566,7 @@
|
|
|
10363
10566
|
var currentIndex = availableBaseLayers.findIndex(function (layer) {
|
|
10364
10567
|
return selectedBaseLayerId === layer.id;
|
|
10365
10568
|
});
|
|
10366
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
10569
|
+
return /*#__PURE__*/React__namespace.createElement(material.FormControl, {
|
|
10367
10570
|
style: {
|
|
10368
10571
|
width: '100%'
|
|
10369
10572
|
}
|
|
@@ -10388,10 +10591,10 @@
|
|
|
10388
10591
|
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
10389
10592
|
return onChangeBaseLayers(e.value);
|
|
10390
10593
|
}
|
|
10391
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
10594
|
+
}, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
10392
10595
|
disabled: true
|
|
10393
10596
|
}, "Select base layer"), availableBaseLayers.map(function (baseLayer) {
|
|
10394
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
10597
|
+
return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
|
|
10395
10598
|
key: baseLayer.id,
|
|
10396
10599
|
value: baseLayer.id
|
|
10397
10600
|
}, baseLayer.name);
|
|
@@ -10502,7 +10705,7 @@
|
|
|
10502
10705
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10503
10706
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10504
10707
|
* */
|
|
10505
|
-
var useStyles$t =
|
|
10708
|
+
var useStyles$t = makeStyles__default["default"]({
|
|
10506
10709
|
layerRow: {
|
|
10507
10710
|
width: '100%',
|
|
10508
10711
|
height: '36px'
|
|
@@ -10527,12 +10730,12 @@
|
|
|
10527
10730
|
tooltip = _d === void 0 ? '' : _d;
|
|
10528
10731
|
var classes = useStyles$t();
|
|
10529
10732
|
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
10530
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
10733
|
+
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10531
10734
|
container: true,
|
|
10532
10735
|
item: true,
|
|
10533
10736
|
className: classes.layerRow,
|
|
10534
10737
|
"data-testid": "baseLayerRow"
|
|
10535
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
10738
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10536
10739
|
item: true,
|
|
10537
10740
|
className: columnSizes.column1 + " " + classes.addBaseLayers
|
|
10538
10741
|
}, /*#__PURE__*/React__namespace.createElement(AddLayersButton, {
|
|
@@ -10545,7 +10748,7 @@
|
|
|
10545
10748
|
layerType: LayerType.baseLayer
|
|
10546
10749
|
});
|
|
10547
10750
|
}
|
|
10548
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
10751
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10549
10752
|
item: true,
|
|
10550
10753
|
className: "" + columnSizes.column2
|
|
10551
10754
|
}, /*#__PURE__*/React__namespace.createElement(BaseLayersConnect, {
|
|
@@ -10570,7 +10773,7 @@
|
|
|
10570
10773
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10571
10774
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10572
10775
|
* */
|
|
10573
|
-
var useStyles$s =
|
|
10776
|
+
var useStyles$s = makeStyles__default["default"]({
|
|
10574
10777
|
layerRowContainer: {
|
|
10575
10778
|
position: 'relative',
|
|
10576
10779
|
width: '100%',
|
|
@@ -10639,7 +10842,7 @@
|
|
|
10639
10842
|
source: source
|
|
10640
10843
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
10641
10844
|
className: classes.layerManagerContainer
|
|
10642
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
10845
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
10643
10846
|
container: true,
|
|
10644
10847
|
"data-testid": "layerManagerRowContainer",
|
|
10645
10848
|
className: classes.layerRowContainer
|
|
@@ -10677,8 +10880,8 @@
|
|
|
10677
10880
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10678
10881
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10679
10882
|
* */
|
|
10680
|
-
var useButtonStyles =
|
|
10681
|
-
return
|
|
10883
|
+
var useButtonStyles = makeStyles__default["default"](function (theme) {
|
|
10884
|
+
return createStyles__default["default"]({
|
|
10682
10885
|
button: {
|
|
10683
10886
|
height: '24px',
|
|
10684
10887
|
width: function width(_a) {
|
|
@@ -10699,7 +10902,8 @@
|
|
|
10699
10902
|
backgroundColor: theme.palette.geowebColors.buttons.disabled.fill,
|
|
10700
10903
|
'& svg path, svg text': {
|
|
10701
10904
|
fill: theme.palette.geowebColors.typographyAndIcons.iconLinkDisabled
|
|
10702
|
-
}
|
|
10905
|
+
},
|
|
10906
|
+
border: "1px solid " + theme.palette.geowebColors.buttons.disabled.fill
|
|
10703
10907
|
},
|
|
10704
10908
|
'&.Mui-selected': {
|
|
10705
10909
|
backgroundColor: theme.palette.geowebColors.buttons.primaryActive.fill,
|
|
@@ -10721,16 +10925,18 @@
|
|
|
10721
10925
|
var active = _a.active,
|
|
10722
10926
|
width = _a.width,
|
|
10723
10927
|
children = _a.children,
|
|
10724
|
-
|
|
10928
|
+
_b = _a.value,
|
|
10929
|
+
value = _b === void 0 ? 0 : _b,
|
|
10930
|
+
props = __rest(_a, ["active", "width", "children", "value"]);
|
|
10725
10931
|
|
|
10726
10932
|
var classes = useButtonStyles({
|
|
10727
10933
|
width: width
|
|
10728
10934
|
});
|
|
10729
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
10935
|
+
return /*#__PURE__*/React__namespace.createElement(material.ToggleButton, __assign({
|
|
10730
10936
|
className: classes.button,
|
|
10731
10937
|
disableRipple: true,
|
|
10732
10938
|
selected: active,
|
|
10733
|
-
value:
|
|
10939
|
+
value: value
|
|
10734
10940
|
}, props), children);
|
|
10735
10941
|
};
|
|
10736
10942
|
|
|
@@ -10776,7 +10982,7 @@
|
|
|
10776
10982
|
id: "keywordFilterButton",
|
|
10777
10983
|
"data-testid": "keywordFilterButton",
|
|
10778
10984
|
disableRipple: true
|
|
10779
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
10985
|
+
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
|
|
10780
10986
|
viewBox: "0 0 24 24",
|
|
10781
10987
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10782
10988
|
}, /*#__PURE__*/React__namespace.createElement("g", null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -10806,10 +11012,57 @@
|
|
|
10806
11012
|
var layerSelectStore = function layerSelectStore(store) {
|
|
10807
11013
|
return store && store.layerSelect ? store.layerSelect : null;
|
|
10808
11014
|
};
|
|
11015
|
+
/**
|
|
11016
|
+
* Returns search filter string
|
|
11017
|
+
*
|
|
11018
|
+
* Example getSearchFilter(store);
|
|
11019
|
+
* @param {object} store store: object - store object
|
|
11020
|
+
* @returns {array} returnType: string
|
|
11021
|
+
*/
|
|
11022
|
+
|
|
10809
11023
|
|
|
10810
11024
|
var getSearchFilter = reselect.createSelector(layerSelectStore, function (store) {
|
|
10811
11025
|
return store ? store.filters.searchFilter : '';
|
|
10812
11026
|
});
|
|
11027
|
+
/**
|
|
11028
|
+
* Returns active services array
|
|
11029
|
+
*
|
|
11030
|
+
* Example getActiveServices(store);
|
|
11031
|
+
* @param {object} store store: object - store object
|
|
11032
|
+
* @returns {array} returnType: array of active services
|
|
11033
|
+
*/
|
|
11034
|
+
|
|
11035
|
+
var getActiveServices = reselect.createSelector(layerSelectStore, function (store) {
|
|
11036
|
+
var _a;
|
|
11037
|
+
|
|
11038
|
+
return store ? (_a = store === null || store === void 0 ? void 0 : store.filters) === null || _a === void 0 ? void 0 : _a.activeServices : [];
|
|
11039
|
+
});
|
|
11040
|
+
/**
|
|
11041
|
+
* Returns all ids of enabled services
|
|
11042
|
+
*
|
|
11043
|
+
* Example getEnabledServiceIds(store);
|
|
11044
|
+
* @param {object} store store: object - store object
|
|
11045
|
+
* @returns {array} returnType: array of service ids that are enabled
|
|
11046
|
+
*/
|
|
11047
|
+
|
|
11048
|
+
var getEnabledServiceIds = reselect.createSelector(layerSelectStore, function (store) {
|
|
11049
|
+
var _a, _b;
|
|
11050
|
+
|
|
11051
|
+
var enabledServices = (_b = (_a = store === null || store === void 0 ? void 0 : store.filters) === null || _a === void 0 ? void 0 : _a.activeServices.filter(function (service) {
|
|
11052
|
+
return service.enabled;
|
|
11053
|
+
})) !== null && _b !== void 0 ? _b : [];
|
|
11054
|
+
return enabledServices.map(function (service) {
|
|
11055
|
+
return service.id;
|
|
11056
|
+
});
|
|
11057
|
+
});
|
|
11058
|
+
/**
|
|
11059
|
+
* Returns all keywords
|
|
11060
|
+
*
|
|
11061
|
+
* Example getKeywords(store);
|
|
11062
|
+
* @param {object} store store: object - store object
|
|
11063
|
+
* @returns {array} returnType: array of keyword objects
|
|
11064
|
+
*/
|
|
11065
|
+
|
|
10813
11066
|
var getKeywords = reselect.createSelector(layerSelectStore, function (store) {
|
|
10814
11067
|
return store ? store.filters.keywords : [];
|
|
10815
11068
|
});
|
|
@@ -10830,8 +11083,8 @@
|
|
|
10830
11083
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10831
11084
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10832
11085
|
* */
|
|
10833
|
-
var useStyles$r =
|
|
10834
|
-
return
|
|
11086
|
+
var useStyles$r = makeStyles__default["default"](function (theme) {
|
|
11087
|
+
return createStyles__default["default"]({
|
|
10835
11088
|
dialogTitle: {
|
|
10836
11089
|
display: 'flex',
|
|
10837
11090
|
justifyContent: 'space-between'
|
|
@@ -10845,12 +11098,23 @@
|
|
|
10845
11098
|
},
|
|
10846
11099
|
'&.MuiButton-outlined': {
|
|
10847
11100
|
color: theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat
|
|
11101
|
+
},
|
|
11102
|
+
color: theme.palette.common.white
|
|
11103
|
+
},
|
|
11104
|
+
cancelButton: {
|
|
11105
|
+
border: "1px solid " + theme.palette.action.disabled,
|
|
11106
|
+
color: theme.palette.text.secondary,
|
|
11107
|
+
'&:hover': {
|
|
11108
|
+
border: "1px solid " + theme.palette.action.disabled
|
|
10848
11109
|
}
|
|
10849
11110
|
},
|
|
10850
11111
|
container: {
|
|
10851
11112
|
'& .MuiDialog-paper': {
|
|
10852
11113
|
backgroundColor: theme.palette.geowebColors.cards.cardContainer
|
|
10853
11114
|
}
|
|
11115
|
+
},
|
|
11116
|
+
dialogContent: {
|
|
11117
|
+
padding: '8px 24px'
|
|
10854
11118
|
}
|
|
10855
11119
|
});
|
|
10856
11120
|
});
|
|
@@ -10880,45 +11144,50 @@
|
|
|
10880
11144
|
_c = _a.url,
|
|
10881
11145
|
url = _c === void 0 ? '' : _c;
|
|
10882
11146
|
var classes = useStyles$r();
|
|
10883
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
11147
|
+
return /*#__PURE__*/React__namespace.createElement(material.Dialog, {
|
|
10884
11148
|
open: isOpen,
|
|
10885
|
-
disableBackdropClick: true,
|
|
10886
11149
|
hideBackdrop: hideBackdrop,
|
|
10887
11150
|
fullWidth: true,
|
|
10888
11151
|
maxWidth: "xs",
|
|
10889
11152
|
className: classes.container
|
|
10890
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
10891
|
-
className: classes.dialogTitle
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
}, getTitleForVariant(servicePopupVariant)), /*#__PURE__*/React__namespace.createElement(
|
|
11153
|
+
}, /*#__PURE__*/React__namespace.createElement(material.DialogTitle, {
|
|
11154
|
+
className: classes.dialogTitle
|
|
11155
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
11156
|
+
variant: "h5",
|
|
11157
|
+
component: "span"
|
|
11158
|
+
}, getTitleForVariant(servicePopupVariant)), /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
10896
11159
|
size: "small",
|
|
10897
11160
|
onClick: closePopup,
|
|
10898
11161
|
"data-testid": "ClosePopupButtonCross"
|
|
10899
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
11162
|
+
}, /*#__PURE__*/React__namespace.createElement(iconsMaterial.Close, null))), /*#__PURE__*/React__namespace.createElement(material.DialogContent, {
|
|
11163
|
+
className: classes.dialogContent
|
|
11164
|
+
}, /*#__PURE__*/React__namespace.createElement(material.TextField, {
|
|
10900
11165
|
className: classes.textField,
|
|
10901
11166
|
variant: "filled",
|
|
10902
11167
|
label: "Service name"
|
|
10903
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
11168
|
+
})), /*#__PURE__*/React__namespace.createElement(material.DialogContent, {
|
|
11169
|
+
className: classes.dialogContent
|
|
11170
|
+
}, /*#__PURE__*/React__namespace.createElement(material.TextField, {
|
|
10904
11171
|
className: classes.textField,
|
|
10905
11172
|
variant: "filled",
|
|
10906
11173
|
label: "Service URL",
|
|
10907
11174
|
defaultValue: url,
|
|
10908
11175
|
id: "service-url"
|
|
10909
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
11176
|
+
})), /*#__PURE__*/React__namespace.createElement(material.DialogContent, {
|
|
11177
|
+
className: classes.dialogContent
|
|
11178
|
+
}, /*#__PURE__*/React__namespace.createElement(material.TextField, {
|
|
10910
11179
|
className: classes.textField,
|
|
10911
11180
|
variant: "filled",
|
|
10912
11181
|
multiline: true,
|
|
10913
11182
|
rows: 4,
|
|
10914
11183
|
label: "Abstracts",
|
|
10915
11184
|
helperText: "Short description of what this service does"
|
|
10916
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
11185
|
+
})), /*#__PURE__*/React__namespace.createElement(material.DialogActions, null, /*#__PURE__*/React__namespace.createElement(material.Button, {
|
|
10917
11186
|
variant: "outlined",
|
|
10918
|
-
className: classes.
|
|
11187
|
+
className: classes.cancelButton,
|
|
10919
11188
|
onClick: closePopup,
|
|
10920
11189
|
"data-testid": "ClosePopupButtonCancel"
|
|
10921
|
-
}, "cancel"), /*#__PURE__*/React__namespace.createElement(
|
|
11190
|
+
}, "cancel"), /*#__PURE__*/React__namespace.createElement(material.Button, {
|
|
10922
11191
|
variant: "contained",
|
|
10923
11192
|
color: "primary",
|
|
10924
11193
|
className: classes.button
|
|
@@ -10944,7 +11213,7 @@
|
|
|
10944
11213
|
var isURL = function isURL(string) {
|
|
10945
11214
|
return /^https?:\/\//.test(string);
|
|
10946
11215
|
};
|
|
10947
|
-
var useStyles$q =
|
|
11216
|
+
var useStyles$q = makeStyles__default["default"](function (theme) {
|
|
10948
11217
|
return {
|
|
10949
11218
|
iconButton: {
|
|
10950
11219
|
color: theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat
|
|
@@ -10957,7 +11226,7 @@
|
|
|
10957
11226
|
};
|
|
10958
11227
|
});
|
|
10959
11228
|
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';
|
|
10960
|
-
var clearIcon = /*#__PURE__*/React__default["default"].createElement(
|
|
11229
|
+
var clearIcon = /*#__PURE__*/React__default["default"].createElement(material.SvgIcon, {
|
|
10961
11230
|
style: {
|
|
10962
11231
|
width: '24px',
|
|
10963
11232
|
height: '24px'
|
|
@@ -10968,7 +11237,7 @@
|
|
|
10968
11237
|
d: clearIconPath
|
|
10969
11238
|
}));
|
|
10970
11239
|
var searchIconPath = 'M7.81701445,12.5845372 L7.81701445,12.5845372 C7.17924024,11.946763 6.82932049,11.100321 6.82932049,10.1993044 C6.82932049,9.29828785 7.17924024,8.45077582 7.81701445,7.8140717 C8.47405029,7.15703585 9.3376137,6.82851792 10.2022472,6.82851792 C11.0658106,6.82851792 11.929374,7.15703585 12.5874799,7.8140717 C13.9026217,9.12921348 13.9026217,11.2693954 12.5874799,12.5845372 C11.9497057,13.2212413 11.1021937,13.5722311 10.2022472,13.5722311 C9.3012306,13.5722311 8.45371857,13.2212413 7.81701445,12.5845372 M19.5858748,17.581862 L15.4681648,13.465222 C16.9513109,11.0735688 16.6613162,7.88683788 14.5874799,5.81300161 C12.1690744,3.39566613 8.23434992,3.39566613 5.81594436,5.81300161 C4.64419476,6.9847512 4,8.54280364 4,10.1993044 C4,11.8558052 4.64419476,13.4138577 5.81594436,14.5845372 C6.98769395,15.7562868 8.5446763,16.4015516 10.2022472,16.4015516 C11.376137,16.4015516 12.4965222,16.0719636 13.4681648,15.4662921 L17.5837346,19.582932 C17.8608882,19.8590155 18.2225789,19.9970572 18.5853398,19.9970572 C18.9470305,19.9970572 19.3087212,19.8590155 19.5858748,19.582932 C20.1380417,19.029695 20.1380417,18.135099 19.5858748,17.581862';
|
|
10971
|
-
var searchIcon = /*#__PURE__*/React__default["default"].createElement(
|
|
11240
|
+
var searchIcon = /*#__PURE__*/React__default["default"].createElement(material.SvgIcon, {
|
|
10972
11241
|
style: {
|
|
10973
11242
|
width: '24px',
|
|
10974
11243
|
height: '24px'
|
|
@@ -10988,21 +11257,22 @@
|
|
|
10988
11257
|
setPopupOpen = _b[1];
|
|
10989
11258
|
|
|
10990
11259
|
var classes = useStyles$q();
|
|
10991
|
-
var ClearButton = /*#__PURE__*/React__default["default"].createElement(
|
|
11260
|
+
var ClearButton = /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
|
|
10992
11261
|
title: "Clear",
|
|
10993
11262
|
placement: "top"
|
|
10994
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
11263
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
|
|
10995
11264
|
className: classes.iconButton,
|
|
10996
11265
|
edge: "end",
|
|
10997
11266
|
onClick: function onClick() {
|
|
10998
11267
|
onClickClear();
|
|
10999
|
-
}
|
|
11268
|
+
},
|
|
11269
|
+
size: "large"
|
|
11000
11270
|
}, clearIcon));
|
|
11001
11271
|
if (isURL(localSearchString)) return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
11002
11272
|
style: {
|
|
11003
11273
|
marginRight: '15px'
|
|
11004
11274
|
}
|
|
11005
|
-
}, ClearButton), /*#__PURE__*/React__default["default"].createElement(
|
|
11275
|
+
}, ClearButton), /*#__PURE__*/React__default["default"].createElement(material.Button, {
|
|
11006
11276
|
variant: "outlined",
|
|
11007
11277
|
onClick: function onClick() {
|
|
11008
11278
|
return setPopupOpen(true);
|
|
@@ -11017,12 +11287,13 @@
|
|
|
11017
11287
|
url: localSearchString
|
|
11018
11288
|
}));
|
|
11019
11289
|
if (localSearchString) return ClearButton;
|
|
11020
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
11290
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
|
|
11021
11291
|
title: "Search",
|
|
11022
11292
|
placement: "top"
|
|
11023
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
11293
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
|
|
11024
11294
|
className: classes.iconButton,
|
|
11025
|
-
edge: "end"
|
|
11295
|
+
edge: "end",
|
|
11296
|
+
size: "large"
|
|
11026
11297
|
}, searchIcon));
|
|
11027
11298
|
};
|
|
11028
11299
|
|
|
@@ -11064,7 +11335,7 @@
|
|
|
11064
11335
|
if (!isURL(text)) setSearchFilterDebounced(text);else if (searchFilter) setSearchFilterDebounced('');
|
|
11065
11336
|
};
|
|
11066
11337
|
|
|
11067
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
11338
|
+
return /*#__PURE__*/React__namespace.createElement(material.TextField, {
|
|
11068
11339
|
variant: "filled",
|
|
11069
11340
|
label: "Search through services or enter a service URL",
|
|
11070
11341
|
value: localSearchString,
|
|
@@ -11074,7 +11345,7 @@
|
|
|
11074
11345
|
autoFocus: true,
|
|
11075
11346
|
fullWidth: true,
|
|
11076
11347
|
InputProps: {
|
|
11077
|
-
endAdornment: /*#__PURE__*/React__namespace.createElement(
|
|
11348
|
+
endAdornment: /*#__PURE__*/React__namespace.createElement(material.InputAdornment, {
|
|
11078
11349
|
position: "end"
|
|
11079
11350
|
}, /*#__PURE__*/React__namespace.createElement(SearchFieldButtonContainer, {
|
|
11080
11351
|
localSearchString: localSearchString,
|
|
@@ -11135,7 +11406,7 @@
|
|
|
11135
11406
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11136
11407
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11137
11408
|
* */
|
|
11138
|
-
var useStyles$p =
|
|
11409
|
+
var useStyles$p = makeStyles__default["default"](function (theme) {
|
|
11139
11410
|
return {
|
|
11140
11411
|
layerRow: {
|
|
11141
11412
|
background: theme.palette.geowebColors.background.surface,
|
|
@@ -11181,18 +11452,28 @@
|
|
|
11181
11452
|
var LayerList = function LayerList(_a) {
|
|
11182
11453
|
var services = _a.services,
|
|
11183
11454
|
serviceIds = _a.serviceIds,
|
|
11184
|
-
layerSelectHeight = _a.layerSelectHeight
|
|
11455
|
+
layerSelectHeight = _a.layerSelectHeight,
|
|
11456
|
+
searchString = _a.searchString;
|
|
11185
11457
|
var classes = useStyles$p();
|
|
11186
11458
|
|
|
11187
11459
|
var _b = __read(React__namespace.useState(0), 2),
|
|
11188
11460
|
numberOfLayers = _b[0],
|
|
11189
11461
|
setNumberOfLayers = _b[1];
|
|
11190
11462
|
|
|
11463
|
+
var filterLayersFromService = React__namespace.useCallback(function (serviceId) {
|
|
11464
|
+
if (searchString === '') {
|
|
11465
|
+
return services[serviceId].layers;
|
|
11466
|
+
}
|
|
11467
|
+
|
|
11468
|
+
return services[serviceId].layers.filter(function (layer) {
|
|
11469
|
+
return searchString === '' || !!layer.name && layer.name.toLowerCase().includes(searchString.toLowerCase()) || !!layer.text && layer.text.toLowerCase().includes(searchString.toLowerCase()) || !!layer["abstract"] && layer["abstract"].toLowerCase().includes(searchString.toLowerCase());
|
|
11470
|
+
});
|
|
11471
|
+
}, [services, searchString]);
|
|
11191
11472
|
React__namespace.useEffect(function () {
|
|
11192
11473
|
setNumberOfLayers(serviceIds.reduce(function (totalNumberOfLayers, serviceId) {
|
|
11193
|
-
return totalNumberOfLayers +
|
|
11474
|
+
return totalNumberOfLayers + filterLayersFromService(serviceId).length;
|
|
11194
11475
|
}, 0));
|
|
11195
|
-
}, [serviceIds,
|
|
11476
|
+
}, [serviceIds, filterLayersFromService]);
|
|
11196
11477
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
11197
11478
|
"data-testid": "layerList"
|
|
11198
11479
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
@@ -11203,7 +11484,7 @@
|
|
|
11203
11484
|
overflow: 'auto'
|
|
11204
11485
|
}
|
|
11205
11486
|
}, serviceIds.map(function (serviceId) {
|
|
11206
|
-
return
|
|
11487
|
+
return filterLayersFromService(serviceId).map(function (layer) {
|
|
11207
11488
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
11208
11489
|
key: serviceId + "-" + layer.name,
|
|
11209
11490
|
className: classes.layerRow,
|
|
@@ -11241,16 +11522,20 @@
|
|
|
11241
11522
|
|
|
11242
11523
|
var LayerListConnect = function LayerListConnect(_a) {
|
|
11243
11524
|
var layerSelectHeight = _a.layerSelectHeight;
|
|
11244
|
-
var
|
|
11245
|
-
return getServiceIds(store);
|
|
11246
|
-
});
|
|
11247
|
-
var allServices = reactRedux.useSelector(function (store) {
|
|
11525
|
+
var services = reactRedux.useSelector(function (store) {
|
|
11248
11526
|
return getServices(store);
|
|
11249
11527
|
});
|
|
11528
|
+
var enabledServiceIds = reactRedux.useSelector(function (store) {
|
|
11529
|
+
return getEnabledServiceIds(store);
|
|
11530
|
+
});
|
|
11531
|
+
var searchString = reactRedux.useSelector(function (store) {
|
|
11532
|
+
return getSearchFilter(store);
|
|
11533
|
+
});
|
|
11250
11534
|
return /*#__PURE__*/React__namespace.createElement(LayerList, {
|
|
11251
|
-
services:
|
|
11252
|
-
serviceIds:
|
|
11253
|
-
layerSelectHeight: layerSelectHeight
|
|
11535
|
+
services: services,
|
|
11536
|
+
serviceIds: enabledServiceIds,
|
|
11537
|
+
layerSelectHeight: layerSelectHeight,
|
|
11538
|
+
searchString: searchString
|
|
11254
11539
|
});
|
|
11255
11540
|
};
|
|
11256
11541
|
|
|
@@ -11270,20 +11555,36 @@
|
|
|
11270
11555
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11271
11556
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11272
11557
|
* */
|
|
11273
|
-
var useStyles$o =
|
|
11274
|
-
return
|
|
11558
|
+
var useStyles$o = makeStyles__default["default"](function (theme) {
|
|
11559
|
+
return createStyles__default["default"]({
|
|
11275
11560
|
chip: {
|
|
11276
11561
|
height: '32px',
|
|
11277
11562
|
margin: '0 8px 0 0',
|
|
11278
11563
|
padding: '5px 12px 7px',
|
|
11279
11564
|
borderRadius: '20px',
|
|
11280
|
-
border:
|
|
11281
|
-
|
|
11282
|
-
|
|
11565
|
+
border: function border(_a) {
|
|
11566
|
+
var isEnabled = _a.isEnabled;
|
|
11567
|
+
return isEnabled ? "solid 1px " + theme.palette.geowebColors.buttons.primaryActive.fill : "solid 1px " + theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat;
|
|
11568
|
+
},
|
|
11569
|
+
backgroundColor: function backgroundColor(_a) {
|
|
11570
|
+
var isEnabled = _a.isEnabled;
|
|
11571
|
+
return isEnabled ? theme.palette.geowebColors.buttons.primaryActive.fill : theme.palette.geowebColors.buttons.surfaceIconDefault.fill;
|
|
11572
|
+
},
|
|
11573
|
+
color: function color(_a) {
|
|
11574
|
+
var isEnabled = _a.isEnabled;
|
|
11575
|
+
return isEnabled ? theme.palette.geowebColors.typographyAndIcons.buttonIcon : theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat;
|
|
11576
|
+
},
|
|
11283
11577
|
"float": 'left',
|
|
11284
11578
|
whiteSpace: 'nowrap',
|
|
11285
11579
|
'&:hover': {
|
|
11286
|
-
backgroundColor:
|
|
11580
|
+
backgroundColor: function backgroundColor(_a) {
|
|
11581
|
+
var isEnabled = _a.isEnabled;
|
|
11582
|
+
return isEnabled ? theme.palette.geowebColors.buttons.primaryMouseover.fill : theme.palette.geowebColors.buttons.flatMouseover.fill;
|
|
11583
|
+
},
|
|
11584
|
+
border: function border(_a) {
|
|
11585
|
+
var isEnabled = _a.isEnabled;
|
|
11586
|
+
return isEnabled ? "solid 1px " + theme.palette.geowebColors.buttons.primaryMouseover.fill : "solid 1px " + theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat;
|
|
11587
|
+
},
|
|
11287
11588
|
cursor: 'pointer'
|
|
11288
11589
|
}
|
|
11289
11590
|
}
|
|
@@ -11293,25 +11594,86 @@
|
|
|
11293
11594
|
var ServiceChip = function ServiceChip(_a) {
|
|
11294
11595
|
var _b = _a.all,
|
|
11295
11596
|
all = _b === void 0 ? false : _b,
|
|
11296
|
-
service = _a.service
|
|
11297
|
-
|
|
11597
|
+
service = _a.service,
|
|
11598
|
+
isEnabled = _a.isEnabled,
|
|
11599
|
+
toggleChip = _a.toggleChip;
|
|
11600
|
+
var classes = useStyles$o({
|
|
11601
|
+
isEnabled: isEnabled
|
|
11602
|
+
});
|
|
11603
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
11604
|
+
role: "button",
|
|
11605
|
+
tabIndex: 0,
|
|
11606
|
+
className: classes.chip,
|
|
11607
|
+
"data-testid": all ? 'serviceChipAll' : 'serviceChip',
|
|
11608
|
+
onClick: function onClick() {
|
|
11609
|
+
return toggleChip(all ? 'all' : service && service.service);
|
|
11610
|
+
},
|
|
11611
|
+
onKeyPress: function onKeyPress() {
|
|
11612
|
+
return toggleChip(all ? 'all' : service && service.service);
|
|
11613
|
+
}
|
|
11614
|
+
}, service ? service.name : 'All');
|
|
11615
|
+
};
|
|
11298
11616
|
|
|
11299
|
-
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11617
|
+
/* *
|
|
11618
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11619
|
+
* you may not use this file except in compliance with the License.
|
|
11620
|
+
* You may obtain a copy of the License at
|
|
11621
|
+
*
|
|
11622
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11623
|
+
*
|
|
11624
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11625
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11626
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11627
|
+
* See the License for the specific language governing permissions and
|
|
11628
|
+
* limitations under the License.
|
|
11629
|
+
*
|
|
11630
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11631
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
11632
|
+
* */
|
|
11305
11633
|
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11634
|
+
var ServiceChipConnect = function ServiceChipConnect(_a) {
|
|
11635
|
+
var _b = _a.all,
|
|
11636
|
+
all = _b === void 0 ? false : _b,
|
|
11637
|
+
service = _a.service,
|
|
11638
|
+
isEnabled = _a.isEnabled;
|
|
11639
|
+
var dispatch = reactRedux.useDispatch();
|
|
11640
|
+
var activeServices = reactRedux.useSelector(function (store) {
|
|
11641
|
+
return getActiveServices(store);
|
|
11642
|
+
});
|
|
11312
11643
|
|
|
11313
|
-
|
|
11314
|
-
|
|
11644
|
+
var toggleChip = function toggleChip(service) {
|
|
11645
|
+
var _a;
|
|
11646
|
+
|
|
11647
|
+
if (service === 'all') {
|
|
11648
|
+
if (activeServices.every(function (activeService) {
|
|
11649
|
+
return activeService.enabled;
|
|
11650
|
+
})) activeServices.forEach(function (s) {
|
|
11651
|
+
if (s.enabled) dispatch(disableActiveService({
|
|
11652
|
+
service: s.id
|
|
11653
|
+
}));
|
|
11654
|
+
});else activeServices.forEach(function (s) {
|
|
11655
|
+
if (!s.enabled) dispatch(enableActiveService({
|
|
11656
|
+
service: s.id
|
|
11657
|
+
}));
|
|
11658
|
+
});
|
|
11659
|
+
} else if ((_a = activeServices.find(function (activeService) {
|
|
11660
|
+
return activeService.id === service;
|
|
11661
|
+
})) === null || _a === void 0 ? void 0 : _a.enabled) {
|
|
11662
|
+
dispatch(disableActiveService({
|
|
11663
|
+
service: service
|
|
11664
|
+
}));
|
|
11665
|
+
} else {
|
|
11666
|
+
dispatch(enableActiveService({
|
|
11667
|
+
service: service
|
|
11668
|
+
}));
|
|
11669
|
+
}
|
|
11670
|
+
};
|
|
11671
|
+
|
|
11672
|
+
return /*#__PURE__*/React__namespace.createElement(ServiceChip, {
|
|
11673
|
+
service: service,
|
|
11674
|
+
all: all,
|
|
11675
|
+
toggleChip: toggleChip,
|
|
11676
|
+
isEnabled: isEnabled
|
|
11315
11677
|
});
|
|
11316
11678
|
};
|
|
11317
11679
|
|
|
@@ -11331,8 +11693,8 @@
|
|
|
11331
11693
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11332
11694
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11333
11695
|
* */
|
|
11334
|
-
var useStyles$n =
|
|
11335
|
-
return
|
|
11696
|
+
var useStyles$n = makeStyles__default["default"](function (theme) {
|
|
11697
|
+
return createStyles__default["default"]({
|
|
11336
11698
|
serviceChips: {
|
|
11337
11699
|
width: '100%',
|
|
11338
11700
|
display: 'inline-flex',
|
|
@@ -11351,7 +11713,8 @@
|
|
|
11351
11713
|
maxWidth: function maxWidth(_a) {
|
|
11352
11714
|
var maxWidthValue = _a.maxWidthValue;
|
|
11353
11715
|
return maxWidthValue;
|
|
11354
|
-
}
|
|
11716
|
+
},
|
|
11717
|
+
fontSize: '0.875rem'
|
|
11355
11718
|
},
|
|
11356
11719
|
scrollArrowLeft: {
|
|
11357
11720
|
width: '120px',
|
|
@@ -11384,7 +11747,8 @@
|
|
|
11384
11747
|
|
|
11385
11748
|
var ServiceList = function ServiceList(_a) {
|
|
11386
11749
|
var layerSelectWidth = _a.layerSelectWidth,
|
|
11387
|
-
services = _a.services
|
|
11750
|
+
services = _a.services,
|
|
11751
|
+
activeServices = _a.activeServices;
|
|
11388
11752
|
|
|
11389
11753
|
var _b = __read(React__namespace.useState(0), 2),
|
|
11390
11754
|
margin = _b[0],
|
|
@@ -11410,25 +11774,35 @@
|
|
|
11410
11774
|
setWidth(ref.current.scrollWidth + 50);
|
|
11411
11775
|
setMargin(Math.max(0, Math.min(width - layerSelectWidth, margin)));
|
|
11412
11776
|
}, [services, layerSelectWidth, width, margin]);
|
|
11777
|
+
var isAllEnabled = activeServices.every(function (activeService) {
|
|
11778
|
+
return activeService.enabled;
|
|
11779
|
+
});
|
|
11413
11780
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
11414
11781
|
className: classes.serviceList,
|
|
11415
11782
|
"data-testid": "serviceList"
|
|
11416
|
-
}, margin !== 0 && /*#__PURE__*/React__namespace.createElement(
|
|
11783
|
+
}, margin !== 0 && /*#__PURE__*/React__namespace.createElement(iconsMaterial.ChevronLeft, {
|
|
11417
11784
|
className: classes.scrollArrowLeft,
|
|
11418
11785
|
onClick: onLeftArrowClick,
|
|
11419
11786
|
"data-testid": "leftScrollArrow"
|
|
11420
11787
|
}), /*#__PURE__*/React__namespace.createElement("div", {
|
|
11421
11788
|
className: classes.serviceChips,
|
|
11422
11789
|
ref: ref
|
|
11423
|
-
}, services && Object.keys(services) && Object.keys(services).length > 0 && /*#__PURE__*/React__namespace.createElement(
|
|
11790
|
+
}, services && Object.keys(services) && Object.keys(services).length > 0 && /*#__PURE__*/React__namespace.createElement(ServiceChipConnect, {
|
|
11424
11791
|
key: "All",
|
|
11425
|
-
all: true
|
|
11792
|
+
all: true,
|
|
11793
|
+
isEnabled: isAllEnabled
|
|
11426
11794
|
}), Object.keys(services).map(function (service) {
|
|
11427
|
-
|
|
11795
|
+
var _a;
|
|
11796
|
+
|
|
11797
|
+
var isServiceEnabled = (_a = activeServices.find(function (activeService) {
|
|
11798
|
+
return activeService.id === services[service].service;
|
|
11799
|
+
})) === null || _a === void 0 ? void 0 : _a.enabled;
|
|
11800
|
+
return /*#__PURE__*/React__namespace.createElement(ServiceChipConnect, {
|
|
11428
11801
|
key: services[service].id,
|
|
11429
|
-
service: services[service]
|
|
11802
|
+
service: services[service],
|
|
11803
|
+
isEnabled: isServiceEnabled
|
|
11430
11804
|
});
|
|
11431
|
-
})), layerSelectWidth + margin < width && /*#__PURE__*/React__namespace.createElement(
|
|
11805
|
+
})), layerSelectWidth + margin < width && /*#__PURE__*/React__namespace.createElement(iconsMaterial.ChevronRight, {
|
|
11432
11806
|
className: classes.scrollArrowRight,
|
|
11433
11807
|
onClick: onRightArrowClick,
|
|
11434
11808
|
"data-testid": "rightScrollArrow"
|
|
@@ -11457,9 +11831,13 @@
|
|
|
11457
11831
|
var services = reactRedux.useSelector(function (store) {
|
|
11458
11832
|
return getServices(store);
|
|
11459
11833
|
});
|
|
11834
|
+
var activeServices = reactRedux.useSelector(function (store) {
|
|
11835
|
+
return getActiveServices(store);
|
|
11836
|
+
});
|
|
11460
11837
|
return /*#__PURE__*/React__namespace.createElement(ServiceList, {
|
|
11461
11838
|
layerSelectWidth: layerSelectWidth,
|
|
11462
|
-
services: services
|
|
11839
|
+
services: services,
|
|
11840
|
+
activeServices: activeServices
|
|
11463
11841
|
});
|
|
11464
11842
|
};
|
|
11465
11843
|
|
|
@@ -11479,8 +11857,8 @@
|
|
|
11479
11857
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11480
11858
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11481
11859
|
* */
|
|
11482
|
-
var useStyles$m =
|
|
11483
|
-
return
|
|
11860
|
+
var useStyles$m = makeStyles__default["default"](function (theme) {
|
|
11861
|
+
return createStyles__default["default"]({
|
|
11484
11862
|
servicesContainer: {
|
|
11485
11863
|
width: '300px',
|
|
11486
11864
|
height: '380px',
|
|
@@ -11512,17 +11890,17 @@
|
|
|
11512
11890
|
onClick: toggleContainer,
|
|
11513
11891
|
active: containerOpen,
|
|
11514
11892
|
"data-testid": "serviceOptionsButton"
|
|
11515
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
11893
|
+
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
|
|
11516
11894
|
viewBox: "0 0 24 24",
|
|
11517
11895
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11518
11896
|
}, /*#__PURE__*/React__namespace.createElement("g", null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
11519
11897
|
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",
|
|
11520
11898
|
fill: "#FFF",
|
|
11521
11899
|
fillRule: "evenodd"
|
|
11522
|
-
})))), containerOpen ? /*#__PURE__*/React__namespace.createElement(
|
|
11900
|
+
})))), containerOpen ? /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
11523
11901
|
className: classes.servicesContainer,
|
|
11524
11902
|
"data-testid": "container"
|
|
11525
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
11903
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
11526
11904
|
className: classes.servicesText
|
|
11527
11905
|
}, "Services")) : null);
|
|
11528
11906
|
};
|
|
@@ -11543,7 +11921,7 @@
|
|
|
11543
11921
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11544
11922
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11545
11923
|
* */
|
|
11546
|
-
var useStyles$l =
|
|
11924
|
+
var useStyles$l = makeStyles__default["default"]({
|
|
11547
11925
|
serviceList: {
|
|
11548
11926
|
height: '48px'
|
|
11549
11927
|
},
|
|
@@ -11651,7 +12029,7 @@
|
|
|
11651
12029
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11652
12030
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11653
12031
|
* */
|
|
11654
|
-
var CustomSwitch =
|
|
12032
|
+
var CustomSwitch = withStyles__default["default"](function (theme) {
|
|
11655
12033
|
return {
|
|
11656
12034
|
switchBase: {
|
|
11657
12035
|
'&$checked': {
|
|
@@ -11667,7 +12045,7 @@
|
|
|
11667
12045
|
opacity: '1 !important'
|
|
11668
12046
|
}
|
|
11669
12047
|
};
|
|
11670
|
-
})(
|
|
12048
|
+
})(material.Switch);
|
|
11671
12049
|
|
|
11672
12050
|
/* *
|
|
11673
12051
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -11685,8 +12063,8 @@
|
|
|
11685
12063
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11686
12064
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11687
12065
|
* */
|
|
11688
|
-
var useStyles$k =
|
|
11689
|
-
return
|
|
12066
|
+
var useStyles$k = makeStyles__default["default"](function (theme) {
|
|
12067
|
+
return createStyles__default["default"]({
|
|
11690
12068
|
listItem: {
|
|
11691
12069
|
width: '100%',
|
|
11692
12070
|
minWidth: '300px',
|
|
@@ -11742,20 +12120,21 @@
|
|
|
11742
12120
|
onFocus: handleMouseOver,
|
|
11743
12121
|
onBlur: handleMouseLeave,
|
|
11744
12122
|
"data-testid": "filterResultListItem"
|
|
11745
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
12123
|
+
}, /*#__PURE__*/React__namespace.createElement(material.ListItem, {
|
|
11746
12124
|
className: classes.listItem
|
|
11747
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
12125
|
+
}, /*#__PURE__*/React__namespace.createElement(material.ListItemIcon, {
|
|
11748
12126
|
className: classes.listItemIcon
|
|
11749
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
12127
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Checkbox, {
|
|
12128
|
+
color: "secondary",
|
|
11750
12129
|
checked: checked,
|
|
11751
12130
|
onChange: function onChange() {
|
|
11752
12131
|
return toggleCheckbox(index);
|
|
11753
12132
|
},
|
|
11754
12133
|
className: classes.checkbox
|
|
11755
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
12134
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
11756
12135
|
variant: "body2",
|
|
11757
12136
|
className: classes.listItemText
|
|
11758
|
-
}, text), hovering ? /*#__PURE__*/React__namespace.createElement(
|
|
12137
|
+
}, text), hovering ? /*#__PURE__*/React__namespace.createElement(material.ListItemSecondaryAction, null, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
11759
12138
|
style: {
|
|
11760
12139
|
backgroundColor: 'transparent'
|
|
11761
12140
|
},
|
|
@@ -11763,8 +12142,9 @@
|
|
|
11763
12142
|
size: "small",
|
|
11764
12143
|
onClick: function onClick() {
|
|
11765
12144
|
return selectOnlyOne(index);
|
|
11766
|
-
}
|
|
11767
|
-
|
|
12145
|
+
},
|
|
12146
|
+
"data-testid": "onlyButton"
|
|
12147
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
11768
12148
|
className: classes.onlyByttonText
|
|
11769
12149
|
}, "ONLY"))) : null));
|
|
11770
12150
|
};
|
|
@@ -11785,8 +12165,8 @@
|
|
|
11785
12165
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11786
12166
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11787
12167
|
* */
|
|
11788
|
-
var useStyles$j =
|
|
11789
|
-
return
|
|
12168
|
+
var useStyles$j = makeStyles__default["default"](function (theme) {
|
|
12169
|
+
return createStyles__default["default"]({
|
|
11790
12170
|
selectAll: {
|
|
11791
12171
|
padding: '15px',
|
|
11792
12172
|
paddingLeft: '20px'
|
|
@@ -11884,31 +12264,32 @@
|
|
|
11884
12264
|
onMouseDown: onMouseDown,
|
|
11885
12265
|
order: order,
|
|
11886
12266
|
source: source
|
|
11887
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
12267
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
11888
12268
|
container: true,
|
|
11889
12269
|
item: true,
|
|
11890
12270
|
xs: 12,
|
|
11891
|
-
|
|
12271
|
+
justifyContent: "space-between",
|
|
11892
12272
|
alignItems: "center",
|
|
11893
12273
|
className: classes.selectAllContainer
|
|
11894
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
12274
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
11895
12275
|
container: true,
|
|
11896
12276
|
item: true,
|
|
11897
12277
|
xs: 6,
|
|
11898
|
-
|
|
12278
|
+
justifyContent: "flex-start",
|
|
11899
12279
|
alignItems: "center",
|
|
11900
12280
|
className: classes.selectAll
|
|
11901
|
-
}, "Select all"), /*#__PURE__*/React__namespace.createElement(
|
|
12281
|
+
}, "Select all"), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
11902
12282
|
container: true,
|
|
11903
12283
|
item: true,
|
|
11904
12284
|
xs: 6,
|
|
11905
|
-
|
|
12285
|
+
justifyContent: "flex-end",
|
|
11906
12286
|
alignContent: "center",
|
|
11907
12287
|
className: classes["switch"]
|
|
11908
12288
|
}, /*#__PURE__*/React__namespace.createElement(CustomSwitch, {
|
|
11909
12289
|
checked: allSelected,
|
|
11910
|
-
onChange: toggleSelectAll
|
|
11911
|
-
|
|
12290
|
+
onChange: toggleSelectAll,
|
|
12291
|
+
"data-testid": "customSwitch"
|
|
12292
|
+
}))), /*#__PURE__*/React__namespace.createElement(material.List, {
|
|
11912
12293
|
dense: true,
|
|
11913
12294
|
style: {
|
|
11914
12295
|
padding: '0px'
|
|
@@ -12284,7 +12665,7 @@
|
|
|
12284
12665
|
return /*#__PURE__*/React__namespace.createElement(ToggleIconButton, __assign({
|
|
12285
12666
|
onClick: onClick,
|
|
12286
12667
|
active: isActive
|
|
12287
|
-
}, props), /*#__PURE__*/React__namespace.createElement(
|
|
12668
|
+
}, props), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
12288
12669
|
className: classes.button,
|
|
12289
12670
|
placement: placement,
|
|
12290
12671
|
title: title
|
|
@@ -12307,7 +12688,7 @@
|
|
|
12307
12688
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
12308
12689
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
12309
12690
|
* */
|
|
12310
|
-
var useStyles$i =
|
|
12691
|
+
var useStyles$i = makeStyles__default["default"](function () {
|
|
12311
12692
|
return {
|
|
12312
12693
|
container: {
|
|
12313
12694
|
'& > button': {
|
|
@@ -12333,7 +12714,7 @@
|
|
|
12333
12714
|
var classes = useStyles$i();
|
|
12334
12715
|
return /*#__PURE__*/React__namespace.createElement("div", __assign({
|
|
12335
12716
|
className: classes.wrapper
|
|
12336
|
-
}, props), /*#__PURE__*/React__namespace.createElement(
|
|
12717
|
+
}, props), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
12337
12718
|
className: classes.container,
|
|
12338
12719
|
container: true,
|
|
12339
12720
|
direction: "column"
|
|
@@ -12370,7 +12751,7 @@
|
|
|
12370
12751
|
title: "Reset zoom",
|
|
12371
12752
|
"data-testid": "zoom-reset",
|
|
12372
12753
|
onClick: onZoomReset
|
|
12373
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
12754
|
+
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
|
|
12374
12755
|
style: {
|
|
12375
12756
|
width: 20,
|
|
12376
12757
|
height: 20
|
|
@@ -12381,7 +12762,7 @@
|
|
|
12381
12762
|
title: "Zoom in",
|
|
12382
12763
|
"data-testid": "zoom-in",
|
|
12383
12764
|
onClick: onZoomIn
|
|
12384
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
12765
|
+
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
|
|
12385
12766
|
style: {
|
|
12386
12767
|
width: 20,
|
|
12387
12768
|
height: 20
|
|
@@ -12392,7 +12773,7 @@
|
|
|
12392
12773
|
title: "Zoom out",
|
|
12393
12774
|
"data-testid": "zoom-out",
|
|
12394
12775
|
onClick: onZoomOut
|
|
12395
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
12776
|
+
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
|
|
12396
12777
|
style: {
|
|
12397
12778
|
width: 22,
|
|
12398
12779
|
height: 22
|
|
@@ -12487,7 +12868,7 @@
|
|
|
12487
12868
|
"data-testid": "layerManagerButton",
|
|
12488
12869
|
onClick: openLayerManagerDialog,
|
|
12489
12870
|
isActive: isOpen
|
|
12490
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
12871
|
+
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
|
|
12491
12872
|
style: {
|
|
12492
12873
|
width: 22,
|
|
12493
12874
|
height: 22
|
|
@@ -12498,7 +12879,7 @@
|
|
|
12498
12879
|
};
|
|
12499
12880
|
|
|
12500
12881
|
var IconLevels = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
12501
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
12882
|
+
return /*#__PURE__*/React__namespace.createElement(material.SvgIcon, __assign({}, props, {
|
|
12502
12883
|
ref: ref,
|
|
12503
12884
|
style: {
|
|
12504
12885
|
width: 20,
|
|
@@ -12509,7 +12890,7 @@
|
|
|
12509
12890
|
}));
|
|
12510
12891
|
});
|
|
12511
12892
|
var IconEnsemble = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
12512
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
12893
|
+
return /*#__PURE__*/React__namespace.createElement(material.SvgIcon, __assign({}, props, {
|
|
12513
12894
|
ref: ref,
|
|
12514
12895
|
style: {
|
|
12515
12896
|
width: 20,
|
|
@@ -12603,13 +12984,14 @@
|
|
|
12603
12984
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
12604
12985
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
12605
12986
|
* */
|
|
12606
|
-
var useStyles$h =
|
|
12987
|
+
var useStyles$h = makeStyles__default["default"](function () {
|
|
12607
12988
|
return {
|
|
12608
12989
|
verticalLevelDimensionSelectContainer: {
|
|
12609
12990
|
height: '320px',
|
|
12610
12991
|
margin: '10px',
|
|
12611
12992
|
marginLeft: '-5px',
|
|
12612
|
-
minWidth: 120
|
|
12993
|
+
minWidth: 120,
|
|
12994
|
+
fontSize: '90%'
|
|
12613
12995
|
},
|
|
12614
12996
|
layerName: {
|
|
12615
12997
|
paddingLeft: '10px',
|
|
@@ -12619,11 +13001,11 @@
|
|
|
12619
13001
|
}
|
|
12620
13002
|
};
|
|
12621
13003
|
});
|
|
12622
|
-
var SmallFontSlider =
|
|
13004
|
+
var SmallFontSlider = withStyles__default["default"]({
|
|
12623
13005
|
markLabel: {
|
|
12624
13006
|
fontSize: '80%'
|
|
12625
13007
|
}
|
|
12626
|
-
})(
|
|
13008
|
+
})(material.Slider);
|
|
12627
13009
|
|
|
12628
13010
|
var DimensionSelectSlider = function DimensionSelectSlider(_a) {
|
|
12629
13011
|
var marks = _a.marks,
|
|
@@ -12649,11 +13031,10 @@
|
|
|
12649
13031
|
return null;
|
|
12650
13032
|
}
|
|
12651
13033
|
|
|
12652
|
-
var sortedMarks = __spreadArray([], __read(marks))
|
|
12653
|
-
|
|
12654
|
-
sortedMarks = sortedMarks.sort(function (a, b) {
|
|
13034
|
+
var sortedMarks = __spreadArray([], __read(marks)).sort(function (a, b) {
|
|
12655
13035
|
return typeof a.value === 'number' && typeof b.value === 'number' && a.value - b.value;
|
|
12656
13036
|
});
|
|
13037
|
+
|
|
12657
13038
|
var adaptedMarks = reverse ? sortedMarks.reverse() : sortedMarks;
|
|
12658
13039
|
var values = adaptedMarks.map(function (m) {
|
|
12659
13040
|
return m.value;
|
|
@@ -12671,7 +13052,7 @@
|
|
|
12671
13052
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", {
|
|
12672
13053
|
className: classes.verticalLevelDimensionSelectContainer,
|
|
12673
13054
|
"data-testid": "slider-dimensionSelect"
|
|
12674
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
13055
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
12675
13056
|
component: "span",
|
|
12676
13057
|
m: 1
|
|
12677
13058
|
}, /*#__PURE__*/React__namespace.createElement(SmallFontSlider, {
|
|
@@ -12691,9 +13072,9 @@
|
|
|
12691
13072
|
onChangeDimensionValue(values[val].toString());
|
|
12692
13073
|
if (!managedValue) setCurrentIndex(val);
|
|
12693
13074
|
}
|
|
12694
|
-
}))), /*#__PURE__*/React__namespace.createElement(
|
|
13075
|
+
}))), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
12695
13076
|
title: layerName
|
|
12696
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
13077
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
12697
13078
|
variant: "body2",
|
|
12698
13079
|
className: classes.layerName
|
|
12699
13080
|
}, layerName)));
|
|
@@ -12798,27 +13179,30 @@
|
|
|
12798
13179
|
var layerName = wmLayer.getLayerName();
|
|
12799
13180
|
var marks = marksByDimension(wmsDimension);
|
|
12800
13181
|
var isLayerDimensionSynced = layerDimension.synced !== undefined && layerDimension.synced === true;
|
|
12801
|
-
|
|
13182
|
+
var tooltipTitle = isLayerDimensionSynced ? 'Click to disconnect layer' : 'Click to connect layer';
|
|
13183
|
+
|
|
13184
|
+
var Icon = function Icon() {
|
|
13185
|
+
return isLayerDimensionSynced ? /*#__PURE__*/React__namespace.createElement(iconsMaterial.Link, {
|
|
13186
|
+
"data-testid": "syncIcon"
|
|
13187
|
+
}) : /*#__PURE__*/React__namespace.createElement(iconsMaterial.LinkOff, {
|
|
13188
|
+
"data-testid": "syncDisIcon"
|
|
13189
|
+
});
|
|
13190
|
+
};
|
|
13191
|
+
|
|
13192
|
+
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
12802
13193
|
key: layerId,
|
|
12803
13194
|
item: true,
|
|
12804
13195
|
xs: "auto"
|
|
12805
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
13196
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
13197
|
+
title: tooltipTitle,
|
|
13198
|
+
placement: "top"
|
|
13199
|
+
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
12806
13200
|
"data-testid": "syncButton",
|
|
12807
13201
|
size: "small",
|
|
12808
13202
|
onClick: function onClick() {
|
|
12809
13203
|
return handleSyncChanged(layerId, dimensionName, layerDimension.currentValue, !layerDimension.synced);
|
|
12810
13204
|
}
|
|
12811
|
-
},
|
|
12812
|
-
title: "Click to disconnect layer",
|
|
12813
|
-
placement: "top"
|
|
12814
|
-
}, /*#__PURE__*/React__namespace.createElement(icons.Link, {
|
|
12815
|
-
"data-testid": "syncIcon"
|
|
12816
|
-
})) : /*#__PURE__*/React__namespace.createElement(core.Tooltip, {
|
|
12817
|
-
title: "Click to connect layer",
|
|
12818
|
-
placement: "top"
|
|
12819
|
-
}, /*#__PURE__*/React__namespace.createElement(icons.LinkOff, {
|
|
12820
|
-
"data-testid": "syncDisIcon"
|
|
12821
|
-
}))), /*#__PURE__*/React__namespace.createElement(DimensionSelectSlider, {
|
|
13205
|
+
}, /*#__PURE__*/React__namespace.createElement(Icon, null))), /*#__PURE__*/React__namespace.createElement(DimensionSelectSlider, {
|
|
12822
13206
|
marks: marks,
|
|
12823
13207
|
layerName: layerName,
|
|
12824
13208
|
reverse: dimConfig ? dimConfig.reversed : false,
|
|
@@ -12920,7 +13304,7 @@
|
|
|
12920
13304
|
style: {
|
|
12921
13305
|
padding: 4
|
|
12922
13306
|
}
|
|
12923
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
13307
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
12924
13308
|
container: true,
|
|
12925
13309
|
direction: "row"
|
|
12926
13310
|
}, layerIds.map(function (layerId) {
|
|
@@ -13186,7 +13570,7 @@
|
|
|
13186
13570
|
_d = _a.disabled,
|
|
13187
13571
|
disabled = _d === void 0 ? false : _d;
|
|
13188
13572
|
var autoUpdateButton = isAutoUpdating ? autoUpdateButtonActive : autoUpdateButtonInactive;
|
|
13189
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
13573
|
+
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
13190
13574
|
title: autoUpdateButton.title
|
|
13191
13575
|
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
13192
13576
|
"data-testid": "autoUpdateButtonTooltip"
|
|
@@ -13197,7 +13581,7 @@
|
|
|
13197
13581
|
return toggleAutoUpdate();
|
|
13198
13582
|
},
|
|
13199
13583
|
"data-testid": "autoUpdateButton"
|
|
13200
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
13584
|
+
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("g", {
|
|
13201
13585
|
transform: "translate(-3 -3)"
|
|
13202
13586
|
}, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
13203
13587
|
width: 24,
|
|
@@ -13252,7 +13636,7 @@
|
|
|
13252
13636
|
return null;
|
|
13253
13637
|
} : _d;
|
|
13254
13638
|
var loopButtonPath = isLooping ? svgLoopOffPath : svgLoopPath;
|
|
13255
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
13639
|
+
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
13256
13640
|
title: loopButtonPath.title
|
|
13257
13641
|
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(ToggleIconButton, {
|
|
13258
13642
|
onClick: function onClick() {
|
|
@@ -13261,7 +13645,7 @@
|
|
|
13261
13645
|
active: isLooping,
|
|
13262
13646
|
disabled: isDisabled,
|
|
13263
13647
|
"data-testid": "loopButton"
|
|
13264
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
13648
|
+
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
13265
13649
|
width: 24,
|
|
13266
13650
|
height: 24,
|
|
13267
13651
|
fill: "transparent"
|
|
@@ -13287,7 +13671,7 @@
|
|
|
13287
13671
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
13288
13672
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
13289
13673
|
* */
|
|
13290
|
-
var useStyles$g =
|
|
13674
|
+
var useStyles$g = makeStyles__default["default"](function (theme) {
|
|
13291
13675
|
return {
|
|
13292
13676
|
speedButtonDiv: {
|
|
13293
13677
|
height: '24px',
|
|
@@ -13346,6 +13730,10 @@
|
|
|
13346
13730
|
};
|
|
13347
13731
|
|
|
13348
13732
|
var onKeyDown = function onKeyDown(event) {
|
|
13733
|
+
// disable default Slider behavior
|
|
13734
|
+
event.stopPropagation();
|
|
13735
|
+
event.preventDefault(); // custom logic
|
|
13736
|
+
|
|
13349
13737
|
if (event.key === 'Tab') {
|
|
13350
13738
|
setOpen(!open);
|
|
13351
13739
|
}
|
|
@@ -13360,13 +13748,13 @@
|
|
|
13360
13748
|
var text = marks[currentValue].text;
|
|
13361
13749
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
13362
13750
|
className: classes.speedButtonDiv
|
|
13363
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
13751
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
13364
13752
|
title: "Speed"
|
|
13365
13753
|
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(ToggleIconButton, {
|
|
13366
13754
|
onClick: onClickButton,
|
|
13367
13755
|
active: true,
|
|
13368
13756
|
"data-testid": "speedButton"
|
|
13369
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
13757
|
+
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
13370
13758
|
width: 24,
|
|
13371
13759
|
height: 24,
|
|
13372
13760
|
fill: "transparent"
|
|
@@ -13529,7 +13917,7 @@
|
|
|
13529
13917
|
timeStepValue: 5256000,
|
|
13530
13918
|
text: '10y'
|
|
13531
13919
|
}];
|
|
13532
|
-
var useStyles$f =
|
|
13920
|
+
var useStyles$f = makeStyles__default["default"](function (theme) {
|
|
13533
13921
|
return {
|
|
13534
13922
|
timeStepDiv: {
|
|
13535
13923
|
width: '58px',
|
|
@@ -13557,7 +13945,7 @@
|
|
|
13557
13945
|
disabled: {}
|
|
13558
13946
|
};
|
|
13559
13947
|
});
|
|
13560
|
-
var TimeStepSwitch =
|
|
13948
|
+
var TimeStepSwitch = withStyles__default["default"](function (theme) {
|
|
13561
13949
|
return {
|
|
13562
13950
|
root: {
|
|
13563
13951
|
marginLeft: '18px'
|
|
@@ -13581,7 +13969,7 @@
|
|
|
13581
13969
|
opacity: '1 !important'
|
|
13582
13970
|
}
|
|
13583
13971
|
};
|
|
13584
|
-
})(
|
|
13972
|
+
})(material.Switch);
|
|
13585
13973
|
|
|
13586
13974
|
var TimeStepButton = function TimeStepButton(_a) {
|
|
13587
13975
|
var timeStep = _a.timeStep,
|
|
@@ -13630,6 +14018,10 @@
|
|
|
13630
14018
|
};
|
|
13631
14019
|
|
|
13632
14020
|
var onKeyDown = function onKeyDown(event) {
|
|
14021
|
+
// disable default Slider behavior
|
|
14022
|
+
event.stopPropagation();
|
|
14023
|
+
event.preventDefault(); // custom logic
|
|
14024
|
+
|
|
13633
14025
|
if (event.key === 'Tab') {
|
|
13634
14026
|
setOpen(!open);
|
|
13635
14027
|
}
|
|
@@ -13648,17 +14040,17 @@
|
|
|
13648
14040
|
}, [timeStepFromLayer, isTimestepAuto, onChangeTimeStep]);
|
|
13649
14041
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
13650
14042
|
className: classes.timeStepDiv
|
|
13651
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
14043
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
13652
14044
|
title: "Time step"
|
|
13653
14045
|
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(ToggleIconButton, {
|
|
13654
14046
|
active: true,
|
|
13655
14047
|
onClick: onClickButton,
|
|
13656
14048
|
"data-testid": "timeStepButton",
|
|
13657
14049
|
width: 58
|
|
13658
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
14050
|
+
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
13659
14051
|
id: "lvnl598lea",
|
|
13660
14052
|
d: "M12.1 5.86c.247 0 .5.089.745.267l6.008 4.316c.368.265.58.65.58 1.057 0 .408-.211.793-.581 1.058l-6.005 4.316c-.248.177-.5.267-.747.267-.466 0-.967-.36-.967-1.147v-3.016l-5.419 3.896c-.207.148-.417.234-.624.26l-.124.007c-.465 0-.966-.36-.966-1.147V7.006c0-.787.5-1.147.966-1.147.247 0 .5.09.746.268l5.421 3.894V7.006c0-.735.436-1.097.873-1.142z"
|
|
13661
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
14053
|
+
})), /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("text", {
|
|
13662
14054
|
"data-testid": "timeStepButtonText",
|
|
13663
14055
|
fontFamily: "Roboto-Black, Roboto",
|
|
13664
14056
|
fontSize: 12
|
|
@@ -13684,11 +14076,11 @@
|
|
|
13684
14076
|
onChange: onChangeSlider,
|
|
13685
14077
|
onKeyDown: onKeyDown,
|
|
13686
14078
|
shouldAutoFocus: true
|
|
13687
|
-
}), /*#__PURE__*/React__namespace.createElement(
|
|
14079
|
+
}), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
13688
14080
|
title: timestepAutoSwitch.title
|
|
13689
14081
|
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
13690
14082
|
"data-testid": "timestepAutoSwitchTooltip"
|
|
13691
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
14083
|
+
}, /*#__PURE__*/React__namespace.createElement(material.FormControlLabel, {
|
|
13692
14084
|
control: /*#__PURE__*/React__namespace.createElement(TimeStepSwitch, {
|
|
13693
14085
|
checked: isTimestepAuto,
|
|
13694
14086
|
onChange: function onChange() {
|
|
@@ -13722,7 +14114,7 @@
|
|
|
13722
14114
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
13723
14115
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
13724
14116
|
* */
|
|
13725
|
-
var OptionsPopOver =
|
|
14117
|
+
var OptionsPopOver = withStyles__default["default"](function (theme) {
|
|
13726
14118
|
return {
|
|
13727
14119
|
paper: {
|
|
13728
14120
|
height: '24px',
|
|
@@ -13732,7 +14124,7 @@
|
|
|
13732
14124
|
backgroundColor: theme.palette.geowebColors.background.surface
|
|
13733
14125
|
}
|
|
13734
14126
|
};
|
|
13735
|
-
})(
|
|
14127
|
+
})(material.Popover);
|
|
13736
14128
|
|
|
13737
14129
|
var OptionsMenuButton = function OptionsMenuButton(_a) {
|
|
13738
14130
|
var autoUpdateBtn = _a.autoUpdateBtn,
|
|
@@ -13754,13 +14146,13 @@
|
|
|
13754
14146
|
|
|
13755
14147
|
var open = Boolean(anchorEl);
|
|
13756
14148
|
var id = open ? 'simple-popover' : undefined;
|
|
13757
|
-
return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(
|
|
14149
|
+
return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
13758
14150
|
title: "Options"
|
|
13759
14151
|
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(ToggleIconButton, {
|
|
13760
14152
|
onClick: onClickButton,
|
|
13761
14153
|
"data-testid": "optionsMenuButton",
|
|
13762
14154
|
active: open
|
|
13763
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
14155
|
+
}, /*#__PURE__*/React__namespace.createElement(iconsMaterial.MoreVert, {
|
|
13764
14156
|
"data-testid": "moreVertIcon",
|
|
13765
14157
|
fontSize: "small"
|
|
13766
14158
|
})))), /*#__PURE__*/React__namespace.createElement(OptionsPopOver, {
|
|
@@ -13777,10 +14169,10 @@
|
|
|
13777
14169
|
vertical: 'bottom',
|
|
13778
14170
|
horizontal: 'left'
|
|
13779
14171
|
}
|
|
13780
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
14172
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13781
14173
|
container: true,
|
|
13782
14174
|
spacing: 1
|
|
13783
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
14175
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13784
14176
|
item: true,
|
|
13785
14177
|
xs: "auto"
|
|
13786
14178
|
}, timeStepBtn || /*#__PURE__*/React__namespace.createElement(TimeStepButton, {
|
|
@@ -13788,7 +14180,7 @@
|
|
|
13788
14180
|
onChangeTimeStep: function onChangeTimeStep() {
|
|
13789
14181
|
return null;
|
|
13790
14182
|
}
|
|
13791
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
14183
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13792
14184
|
item: true,
|
|
13793
14185
|
xs: "auto"
|
|
13794
14186
|
}, speedBtn || /*#__PURE__*/React__namespace.createElement(SpeedButton, {
|
|
@@ -13796,10 +14188,10 @@
|
|
|
13796
14188
|
setMapAnimationDelay: function setMapAnimationDelay() {
|
|
13797
14189
|
return null;
|
|
13798
14190
|
}
|
|
13799
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
14191
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13800
14192
|
item: true,
|
|
13801
14193
|
xs: "auto"
|
|
13802
|
-
}, loopBtn || /*#__PURE__*/React__namespace.createElement(LoopButton, null)), /*#__PURE__*/React__namespace.createElement(
|
|
14194
|
+
}, loopBtn || /*#__PURE__*/React__namespace.createElement(LoopButton, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13803
14195
|
item: true,
|
|
13804
14196
|
xs: "auto"
|
|
13805
14197
|
}, autoUpdateBtn || /*#__PURE__*/React__namespace.createElement(AutoUpdateButton, null)))));
|
|
@@ -13843,14 +14235,14 @@
|
|
|
13843
14235
|
};
|
|
13844
14236
|
|
|
13845
14237
|
var playButtonPath = isAnimating ? pausePath : playPath;
|
|
13846
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
14238
|
+
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
13847
14239
|
title: playButtonPath.title
|
|
13848
14240
|
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(ToggleIconButton, {
|
|
13849
14241
|
onClick: onTogglePlay,
|
|
13850
14242
|
disabled: isDisabled,
|
|
13851
14243
|
"data-testid": "playButton",
|
|
13852
14244
|
active: isAnimating
|
|
13853
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
14245
|
+
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
13854
14246
|
width: 24,
|
|
13855
14247
|
height: 24,
|
|
13856
14248
|
fill: "transparent"
|
|
@@ -13877,7 +14269,7 @@
|
|
|
13877
14269
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
13878
14270
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
13879
14271
|
* */
|
|
13880
|
-
var useStyles$e =
|
|
14272
|
+
var useStyles$e = makeStyles__default["default"]({
|
|
13881
14273
|
buttonContainerBig: {
|
|
13882
14274
|
padding: '20px 0px 0px 12px',
|
|
13883
14275
|
width: '210px'
|
|
@@ -13896,40 +14288,40 @@
|
|
|
13896
14288
|
speedBtn = _a.speedBtn,
|
|
13897
14289
|
timeStepBtn = _a.timeStepBtn;
|
|
13898
14290
|
var classes = useStyles$e();
|
|
13899
|
-
var matches =
|
|
14291
|
+
var matches = material.useMediaQuery('(min-width:600px)');
|
|
13900
14292
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
13901
14293
|
"data-testid": "timeSliderButtons"
|
|
13902
|
-
}, matches ? /*#__PURE__*/React__namespace.createElement(
|
|
14294
|
+
}, matches ? /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13903
14295
|
container: true,
|
|
13904
14296
|
spacing: 1,
|
|
13905
14297
|
className: classes.buttonContainerBig
|
|
13906
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
14298
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13907
14299
|
item: true
|
|
13908
14300
|
}, timeStepBtn || /*#__PURE__*/React__namespace.createElement(TimeStepButton, {
|
|
13909
14301
|
timeStep: 5,
|
|
13910
14302
|
onChangeTimeStep: function onChangeTimeStep() {
|
|
13911
14303
|
return null;
|
|
13912
14304
|
}
|
|
13913
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
14305
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13914
14306
|
item: true
|
|
13915
14307
|
}, speedBtn || /*#__PURE__*/React__namespace.createElement(SpeedButton, {
|
|
13916
14308
|
animationDelay: defaultAnimationDelayAtStart,
|
|
13917
14309
|
setMapAnimationDelay: function setMapAnimationDelay() {
|
|
13918
14310
|
return null;
|
|
13919
14311
|
}
|
|
13920
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
14312
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13921
14313
|
item: true
|
|
13922
|
-
}, loopBtn || /*#__PURE__*/React__namespace.createElement(LoopButton, null)), /*#__PURE__*/React__namespace.createElement(
|
|
14314
|
+
}, loopBtn || /*#__PURE__*/React__namespace.createElement(LoopButton, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13923
14315
|
item: true
|
|
13924
|
-
}, autoUpdateBtn || /*#__PURE__*/React__namespace.createElement(AutoUpdateButton, null)), /*#__PURE__*/React__namespace.createElement(
|
|
14316
|
+
}, autoUpdateBtn || /*#__PURE__*/React__namespace.createElement(AutoUpdateButton, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13925
14317
|
item: true
|
|
13926
|
-
}, playBtn || /*#__PURE__*/React__namespace.createElement(PlayButton, null))) : /*#__PURE__*/React__namespace.createElement(
|
|
14318
|
+
}, playBtn || /*#__PURE__*/React__namespace.createElement(PlayButton, null))) : /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13927
14319
|
container: true,
|
|
13928
14320
|
spacing: 1,
|
|
13929
14321
|
className: classes.buttonContainerSmall
|
|
13930
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
14322
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13931
14323
|
item: true
|
|
13932
|
-
}, optionsMenuBtn || /*#__PURE__*/React__namespace.createElement(OptionsMenuButton, null)), /*#__PURE__*/React__namespace.createElement(
|
|
14324
|
+
}, optionsMenuBtn || /*#__PURE__*/React__namespace.createElement(OptionsMenuButton, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13933
14325
|
item: true
|
|
13934
14326
|
}, playBtn || /*#__PURE__*/React__namespace.createElement(PlayButton, null))));
|
|
13935
14327
|
};
|
|
@@ -15007,7 +15399,7 @@
|
|
|
15007
15399
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
15008
15400
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
15009
15401
|
* */
|
|
15010
|
-
var useStyles$d =
|
|
15402
|
+
var useStyles$d = makeStyles__default["default"]({
|
|
15011
15403
|
timeSliderLegend: {
|
|
15012
15404
|
height: '50px'
|
|
15013
15405
|
}
|
|
@@ -15087,7 +15479,7 @@
|
|
|
15087
15479
|
setNewRoundedTime(x, centerTime, width, secondsPerPx, timeStep, dataStartTime, dataEndTime, onSetNewDate);
|
|
15088
15480
|
};
|
|
15089
15481
|
|
|
15090
|
-
var theme =
|
|
15482
|
+
var theme = material.useTheme();
|
|
15091
15483
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
15092
15484
|
className: classes.timeSliderLegend,
|
|
15093
15485
|
"data-testid": "timeSliderLegend"
|
|
@@ -15170,7 +15562,7 @@
|
|
|
15170
15562
|
var scaleSliderOtherSettings = {
|
|
15171
15563
|
LEFT_PADDING: '10%'
|
|
15172
15564
|
};
|
|
15173
|
-
var useStyles$c =
|
|
15565
|
+
var useStyles$c = makeStyles__default["default"](function (theme) {
|
|
15174
15566
|
return {
|
|
15175
15567
|
Background: {
|
|
15176
15568
|
backgroundColor: theme.palette.geowebColors.background.surface,
|
|
@@ -15191,17 +15583,16 @@
|
|
|
15191
15583
|
});
|
|
15192
15584
|
|
|
15193
15585
|
var thumbComponent = function thumbComponent(props) {
|
|
15194
|
-
|
|
15195
|
-
|
|
15196
|
-
|
|
15197
|
-
|
|
15198
|
-
|
|
15199
|
-
|
|
15200
|
-
|
|
15201
|
-
|
|
15202
|
-
|
|
15203
|
-
|
|
15204
|
-
);
|
|
15586
|
+
var children = props.children,
|
|
15587
|
+
other = __rest(props, ["children"]);
|
|
15588
|
+
|
|
15589
|
+
return /*#__PURE__*/React__namespace.createElement(material.SliderThumb, __assign({}, other, {
|
|
15590
|
+
"data-testid": "scaleSliderSliderThumb",
|
|
15591
|
+
tabIndex: 0
|
|
15592
|
+
}), children, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("polygon", {
|
|
15593
|
+
transform: "translate(6.5 5.5)",
|
|
15594
|
+
points: "6,0 11,5 11,12 0,12 0,5"
|
|
15595
|
+
})));
|
|
15205
15596
|
};
|
|
15206
15597
|
|
|
15207
15598
|
var marks = [{
|
|
@@ -15247,7 +15638,7 @@
|
|
|
15247
15638
|
return valueNew;
|
|
15248
15639
|
};
|
|
15249
15640
|
|
|
15250
|
-
var GeoWebScaleSlider =
|
|
15641
|
+
var GeoWebScaleSlider = withStyles__default["default"](function (theme) {
|
|
15251
15642
|
return {
|
|
15252
15643
|
root: {
|
|
15253
15644
|
height: 4,
|
|
@@ -15257,9 +15648,14 @@
|
|
|
15257
15648
|
thumb: {
|
|
15258
15649
|
backgroundColor: 'rgba(0,0,0,0)',
|
|
15259
15650
|
marginTop: 0,
|
|
15651
|
+
width: 12,
|
|
15652
|
+
height: 12,
|
|
15260
15653
|
color: theme.palette.geowebColors.timeSlider.timeScalePointer.fill,
|
|
15261
15654
|
'& svg polygon': {
|
|
15262
15655
|
filter: theme.palette.geowebColors.timeSlider.timeScaleShadowButtonScale.filter
|
|
15656
|
+
},
|
|
15657
|
+
'&:before': {
|
|
15658
|
+
display: 'none'
|
|
15263
15659
|
}
|
|
15264
15660
|
},
|
|
15265
15661
|
valueLabel: {
|
|
@@ -15301,7 +15697,7 @@
|
|
|
15301
15697
|
}
|
|
15302
15698
|
}
|
|
15303
15699
|
};
|
|
15304
|
-
})(
|
|
15700
|
+
})(material.Slider);
|
|
15305
15701
|
var RAIL_GUTTER_OFFSET = 0.4;
|
|
15306
15702
|
|
|
15307
15703
|
var TimeSliderScaleSlider = function TimeSliderScaleSlider(_a) {
|
|
@@ -15374,7 +15770,9 @@
|
|
|
15374
15770
|
onChange: onChange,
|
|
15375
15771
|
onKeyDown: onKeyDown,
|
|
15376
15772
|
"aria-labelledby": "scale-slider",
|
|
15377
|
-
|
|
15773
|
+
components: {
|
|
15774
|
+
Thumb: thumbComponent
|
|
15775
|
+
},
|
|
15378
15776
|
marks: marks,
|
|
15379
15777
|
track: false
|
|
15380
15778
|
})));
|
|
@@ -15582,7 +15980,7 @@
|
|
|
15582
15980
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
15583
15981
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
15584
15982
|
* */
|
|
15585
|
-
var useStyles$b =
|
|
15983
|
+
var useStyles$b = makeStyles__default["default"]({
|
|
15586
15984
|
timeSliderRail: {
|
|
15587
15985
|
'& div': {
|
|
15588
15986
|
outline: 'none'
|
|
@@ -15837,7 +16235,7 @@
|
|
|
15837
16235
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15838
16236
|
|
|
15839
16237
|
}, [selectedTimeUnix]);
|
|
15840
|
-
var theme =
|
|
16238
|
+
var theme = material.useTheme();
|
|
15841
16239
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
15842
16240
|
className: classes.timeSliderRail,
|
|
15843
16241
|
style: {
|
|
@@ -15903,7 +16301,7 @@
|
|
|
15903
16301
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
15904
16302
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
15905
16303
|
* */
|
|
15906
|
-
var useStyles$a =
|
|
16304
|
+
var useStyles$a = makeStyles__default["default"]({
|
|
15907
16305
|
container: {
|
|
15908
16306
|
display: 'grid',
|
|
15909
16307
|
gridTemplateColumns: 'minmax(100px, 210px) minmax(66%, 1fr)',
|
|
@@ -15950,17 +16348,17 @@
|
|
|
15950
16348
|
legend = _a.legend;
|
|
15951
16349
|
var styles = useStyles$a();
|
|
15952
16350
|
var openTimeSlider = useTimeSlider();
|
|
15953
|
-
return openTimeSlider ? /*#__PURE__*/React__namespace.createElement(
|
|
16351
|
+
return openTimeSlider ? /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
15954
16352
|
container: true,
|
|
15955
16353
|
className: styles.container,
|
|
15956
16354
|
"data-testid": "timeSlider"
|
|
15957
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
16355
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
15958
16356
|
item: true
|
|
15959
|
-
}, " ", buttons || /*#__PURE__*/React__namespace.createElement(TimeSliderButtons, null), " "), /*#__PURE__*/React__namespace.createElement(
|
|
16357
|
+
}, " ", buttons || /*#__PURE__*/React__namespace.createElement(TimeSliderButtons, null), " "), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
15960
16358
|
item: true
|
|
15961
16359
|
}, rail || /*#__PURE__*/React__namespace.createElement(TimeSliderRail, __assign({}, defaultProps, {
|
|
15962
16360
|
selectedTime: defaultProps.selectedTime
|
|
15963
|
-
})), ' '), /*#__PURE__*/React__namespace.createElement(
|
|
16361
|
+
})), ' '), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
15964
16362
|
item: true,
|
|
15965
16363
|
className: styles.scaleSlider
|
|
15966
16364
|
}, scaleSlider || /*#__PURE__*/React__namespace.createElement(TimeSliderScaleSlider, __assign({}, defaultProps, {
|
|
@@ -15969,7 +16367,7 @@
|
|
|
15969
16367
|
onChangeTimeSliderScale: function onChangeTimeSliderScale() {
|
|
15970
16368
|
return null;
|
|
15971
16369
|
}
|
|
15972
|
-
}))), /*#__PURE__*/React__namespace.createElement(
|
|
16370
|
+
}))), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
15973
16371
|
item: true
|
|
15974
16372
|
}, legend || /*#__PURE__*/React__namespace.createElement(TimeSliderLegend, __assign({}, defaultProps, {
|
|
15975
16373
|
selectedTime: defaultProps.selectedTime.unix()
|
|
@@ -16790,7 +17188,7 @@
|
|
|
16790
17188
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
16791
17189
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
16792
17190
|
* */
|
|
16793
|
-
var useStyles$9 =
|
|
17191
|
+
var useStyles$9 = makeStyles__default["default"]({
|
|
16794
17192
|
MapViewLayer: {
|
|
16795
17193
|
width: '100%',
|
|
16796
17194
|
padding: '2px',
|
|
@@ -19426,6 +19824,7 @@
|
|
|
19426
19824
|
};
|
|
19427
19825
|
|
|
19428
19826
|
var ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION = 'ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION';
|
|
19827
|
+
var ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO = 'ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO';
|
|
19429
19828
|
|
|
19430
19829
|
var ReactMapView =
|
|
19431
19830
|
/** @class */
|
|
@@ -19468,7 +19867,7 @@
|
|
|
19468
19867
|
|
|
19469
19868
|
layers.forEach(function (layer) {
|
|
19470
19869
|
if (layer.enabled !== false) {
|
|
19471
|
-
_this.parseWMJSLayer(layer, true
|
|
19870
|
+
_this.parseWMJSLayer(layer, true);
|
|
19472
19871
|
}
|
|
19473
19872
|
});
|
|
19474
19873
|
}, fetchSpeed);
|
|
@@ -19480,25 +19879,12 @@
|
|
|
19480
19879
|
}
|
|
19481
19880
|
};
|
|
19482
19881
|
|
|
19483
|
-
_this.parseWMJSLayer = function (wmLayer, forceReload,
|
|
19882
|
+
_this.parseWMJSLayer = function (wmLayer, forceReload, child) {
|
|
19484
19883
|
var callback = function callback() {
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
onLayerSetDimensions = _a.onLayerSetDimensions,
|
|
19490
|
-
onServiceSetLayers = _a.onServiceSetLayers,
|
|
19491
|
-
onLayerSetStyles = _a.onLayerSetStyles,
|
|
19492
|
-
mapId = _a.mapId;
|
|
19493
|
-
setServiceMetadata(wmLayer, mapId, _this.adaguc.webMapJS, _this.props, onMapUpdateAllDimensions, onLayerChangeStyle, onServiceSetLayers, onLayerSetStyles, onLayerSetDimensions);
|
|
19494
|
-
}
|
|
19495
|
-
|
|
19496
|
-
if (updateStrategy === 'onlydims') {
|
|
19497
|
-
var _b = _this.props,
|
|
19498
|
-
onLayerSetDimensions = _b.onLayerSetDimensions,
|
|
19499
|
-
mapId = _b.mapId;
|
|
19500
|
-
setServiceMetadata(wmLayer, mapId, _this.adaguc.webMapJS, _this.props, null, null, null, null, onLayerSetDimensions);
|
|
19501
|
-
}
|
|
19884
|
+
var _a = _this.props,
|
|
19885
|
+
onUpdateLayerInformation = _a.onUpdateLayerInformation,
|
|
19886
|
+
mapId = _a.mapId;
|
|
19887
|
+
setServiceMetadata(wmLayer, mapId, _this.adaguc.webMapJS, _this.props, onUpdateLayerInformation);
|
|
19502
19888
|
|
|
19503
19889
|
if (child) {
|
|
19504
19890
|
if (wmLayer.hasError) {
|
|
@@ -19511,7 +19897,7 @@
|
|
|
19511
19897
|
}
|
|
19512
19898
|
};
|
|
19513
19899
|
|
|
19514
|
-
wmLayer.parseLayer(callback, forceReload);
|
|
19900
|
+
wmLayer.parseLayer(callback, forceReload, 'ReactMapView parseWMJSLayer');
|
|
19515
19901
|
};
|
|
19516
19902
|
|
|
19517
19903
|
_this.state = {
|
|
@@ -19567,6 +19953,7 @@
|
|
|
19567
19953
|
if (typeof this.adaguc.webMapJS.stopAnimating === 'function') {
|
|
19568
19954
|
this.adaguc.webMapJS.stopAnimating();
|
|
19569
19955
|
this.adaguc.webMapJS.destroy();
|
|
19956
|
+
this.adaguc.webMapJSCreated = false;
|
|
19570
19957
|
}
|
|
19571
19958
|
|
|
19572
19959
|
this.clearRefetchTimer();
|
|
@@ -19760,8 +20147,6 @@
|
|
|
19760
20147
|
this.adaguc.webMapJS.showLayerInfo = props.showLayerInfo;
|
|
19761
20148
|
}
|
|
19762
20149
|
}
|
|
19763
|
-
/* Check children */
|
|
19764
|
-
|
|
19765
20150
|
|
|
19766
20151
|
var children = props.children;
|
|
19767
20152
|
|
|
@@ -19796,23 +20181,29 @@
|
|
|
19796
20181
|
wmjsLayers_1[l].remove();
|
|
19797
20182
|
/* Trigger update of all map dimensions */
|
|
19798
20183
|
|
|
19799
|
-
var
|
|
20184
|
+
var onUpdateLayerInformation = props.onUpdateLayerInformation,
|
|
19800
20185
|
mapId = props.mapId;
|
|
19801
|
-
|
|
19802
|
-
origin:
|
|
19803
|
-
|
|
19804
|
-
|
|
19805
|
-
|
|
19806
|
-
|
|
19807
|
-
|
|
19808
|
-
|
|
19809
|
-
|
|
19810
|
-
name
|
|
19811
|
-
|
|
19812
|
-
|
|
19813
|
-
|
|
19814
|
-
|
|
19815
|
-
|
|
20186
|
+
onUpdateLayerInformation && onUpdateLayerInformation({
|
|
20187
|
+
origin: ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO,
|
|
20188
|
+
serviceLayers: null,
|
|
20189
|
+
layerStyle: null,
|
|
20190
|
+
layerDimensions: null,
|
|
20191
|
+
mapDimensions: {
|
|
20192
|
+
origin: origin,
|
|
20193
|
+
mapId: mapId,
|
|
20194
|
+
dimensions: this_1.adaguc.webMapJS.mapdimensions.map(function (_a) {
|
|
20195
|
+
var name = _a.name,
|
|
20196
|
+
units = _a.units,
|
|
20197
|
+
currentValue = _a.currentValue,
|
|
20198
|
+
synced = _a.synced;
|
|
20199
|
+
return {
|
|
20200
|
+
name: name,
|
|
20201
|
+
units: units,
|
|
20202
|
+
currentValue: currentValue,
|
|
20203
|
+
synced: synced
|
|
20204
|
+
};
|
|
20205
|
+
})
|
|
20206
|
+
}
|
|
19816
20207
|
});
|
|
19817
20208
|
this_1.checkNewProps(prevProps, props);
|
|
19818
20209
|
return {
|
|
@@ -19910,7 +20301,7 @@
|
|
|
19910
20301
|
}
|
|
19911
20302
|
|
|
19912
20303
|
if (!isBaselayer) {
|
|
19913
|
-
this_3.parseWMJSLayer(newWMLayer, false,
|
|
20304
|
+
this_3.parseWMJSLayer(newWMLayer, false, child);
|
|
19914
20305
|
}
|
|
19915
20306
|
|
|
19916
20307
|
needsRedraw = true;
|
|
@@ -19918,7 +20309,7 @@
|
|
|
19918
20309
|
/* Set the name of the ADAGUC WMJSLayer */
|
|
19919
20310
|
if (child.props.name !== undefined && wmLayer_1.name !== child.props.name) {
|
|
19920
20311
|
wmLayer_1.setName(child.props.name).then(function () {
|
|
19921
|
-
_this.parseWMJSLayer(wmLayer_1, false,
|
|
20312
|
+
_this.parseWMJSLayer(wmLayer_1, false, child);
|
|
19922
20313
|
});
|
|
19923
20314
|
needsRedraw = true;
|
|
19924
20315
|
}
|
|
@@ -20176,22 +20567,7 @@
|
|
|
20176
20567
|
onMapChangeDimension: function onMapChangeDimension() {
|
|
20177
20568
|
/* nothing */
|
|
20178
20569
|
},
|
|
20179
|
-
|
|
20180
|
-
/* nothing */
|
|
20181
|
-
},
|
|
20182
|
-
onLayerChangeStyle: function onLayerChangeStyle() {
|
|
20183
|
-
/* nothing */
|
|
20184
|
-
},
|
|
20185
|
-
onLayerChangeDimension: function onLayerChangeDimension() {
|
|
20186
|
-
/* nothing */
|
|
20187
|
-
},
|
|
20188
|
-
onLayerSetDimensions: function onLayerSetDimensions() {
|
|
20189
|
-
/* nothing */
|
|
20190
|
-
},
|
|
20191
|
-
onServiceSetLayers: function onServiceSetLayers() {
|
|
20192
|
-
/* nothing */
|
|
20193
|
-
},
|
|
20194
|
-
onLayerSetStyles: function onLayerSetStyles() {
|
|
20570
|
+
onUpdateLayerInformation: function onUpdateLayerInformation() {
|
|
20195
20571
|
/* nothing */
|
|
20196
20572
|
},
|
|
20197
20573
|
onMapZoomEnd: function onMapZoomEnd() {
|
|
@@ -20217,7 +20593,7 @@
|
|
|
20217
20593
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
20218
20594
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
20219
20595
|
* */
|
|
20220
|
-
var useStyles$8 =
|
|
20596
|
+
var useStyles$8 = makeStyles__default["default"](function () {
|
|
20221
20597
|
return {
|
|
20222
20598
|
mapTimeContainer: {
|
|
20223
20599
|
zIndex: 10,
|
|
@@ -20255,7 +20631,7 @@
|
|
|
20255
20631
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
20256
20632
|
"data-testid": "map-time",
|
|
20257
20633
|
className: classes.mapTimeContainer
|
|
20258
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
20634
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Box, null, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
20259
20635
|
variant: "caption",
|
|
20260
20636
|
className: classes.mapTimeText
|
|
20261
20637
|
}, mapTime)));
|
|
@@ -20277,7 +20653,7 @@
|
|
|
20277
20653
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
20278
20654
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
20279
20655
|
* */
|
|
20280
|
-
var useStyles$7 =
|
|
20656
|
+
var useStyles$7 = makeStyles__default["default"](function () {
|
|
20281
20657
|
return {
|
|
20282
20658
|
mapViewContainer: {
|
|
20283
20659
|
display: 'grid',
|
|
@@ -20348,6 +20724,7 @@
|
|
|
20348
20724
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
20349
20725
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
20350
20726
|
* */
|
|
20727
|
+
var ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION = 'ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION';
|
|
20351
20728
|
/**
|
|
20352
20729
|
* Connected component used to display the map and selected layers.
|
|
20353
20730
|
* Includes options to disable the map controls and legend.
|
|
@@ -20396,29 +20773,28 @@
|
|
|
20396
20773
|
return getPinLocation(store, mapId);
|
|
20397
20774
|
});
|
|
20398
20775
|
var dispatch = reactRedux.useDispatch();
|
|
20776
|
+
var map = getWMJSMapById(mapId);
|
|
20399
20777
|
var mapChangeDimension$1 = React__namespace.useCallback(function (mapDimensionPayload) {
|
|
20400
|
-
|
|
20401
|
-
|
|
20778
|
+
if (mapDimensionPayload.dimension) {
|
|
20779
|
+
var dimension = map.getDimension(mapDimensionPayload.dimension.name);
|
|
20780
|
+
|
|
20781
|
+
if (dimension && dimension.currentValue === mapDimensionPayload.dimension.currentValue) {
|
|
20782
|
+
return;
|
|
20783
|
+
}
|
|
20784
|
+
}
|
|
20785
|
+
|
|
20786
|
+
dispatch(mapChangeDimension(mapDimensionPayload));
|
|
20787
|
+
}, [dispatch, map]);
|
|
20402
20788
|
var setTime$1 = React__namespace.useCallback(function (setTimePayload) {
|
|
20403
|
-
|
|
20404
|
-
|
|
20405
|
-
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
|
|
20409
|
-
|
|
20410
|
-
|
|
20411
|
-
|
|
20412
|
-
return dispatch(layerSetDimensions(payload));
|
|
20413
|
-
}, [dispatch]);
|
|
20414
|
-
var mapUpdateAllDimensions = React__namespace.useCallback(function (payload) {
|
|
20415
|
-
return dispatch(mapUpdateAllMapDimensions(payload));
|
|
20416
|
-
}, [dispatch]);
|
|
20417
|
-
var serviceSetLayers$1 = React__namespace.useCallback(function (payload) {
|
|
20418
|
-
return dispatch(serviceSetLayers(payload));
|
|
20419
|
-
}, [dispatch]);
|
|
20420
|
-
var layerSetStyles$1 = React__namespace.useCallback(function (payload) {
|
|
20421
|
-
return dispatch(layerSetStyles(payload));
|
|
20789
|
+
/* Check if the map not already has this value set, otherwise this component will re-render */
|
|
20790
|
+
if (map.getDimension('time').currentValue === setTimePayload.value) {
|
|
20791
|
+
return;
|
|
20792
|
+
}
|
|
20793
|
+
|
|
20794
|
+
dispatch(setTime(setTimePayload));
|
|
20795
|
+
}, [dispatch, map]);
|
|
20796
|
+
var updateLayerInformation = React__namespace.useCallback(function (payload) {
|
|
20797
|
+
dispatch(onUpdateLayerInformation(payload));
|
|
20422
20798
|
}, [dispatch]);
|
|
20423
20799
|
var registerMap$1 = React__namespace.useCallback(function (payload) {
|
|
20424
20800
|
return dispatch(registerMap(payload));
|
|
@@ -20471,33 +20847,14 @@
|
|
|
20471
20847
|
if (mapDimensionPayload && mapDimensionPayload.dimension && mapDimensionPayload.dimension.name && mapDimensionPayload.dimension.name === 'time') {
|
|
20472
20848
|
setTime$1({
|
|
20473
20849
|
sourceId: mapId,
|
|
20474
|
-
origin: mapDimensionPayload.origin + "==>
|
|
20850
|
+
origin: mapDimensionPayload.origin + "==> " + ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION,
|
|
20475
20851
|
value: handleMomentISOString(mapDimensionPayload.dimension.currentValue)
|
|
20476
20852
|
});
|
|
20477
20853
|
} else {
|
|
20478
20854
|
mapChangeDimension$1(mapDimensionPayload);
|
|
20479
20855
|
}
|
|
20480
20856
|
},
|
|
20481
|
-
|
|
20482
|
-
/* Always update all dimensions */
|
|
20483
|
-
mapUpdateAllDimensions(mapDimensionPayload);
|
|
20484
|
-
/* Additionally trigger the setTime action */
|
|
20485
|
-
|
|
20486
|
-
mapDimensionPayload.dimensions.forEach(function (dimension) {
|
|
20487
|
-
if (dimension.name && dimension.name === 'time') {
|
|
20488
|
-
setTime$1({
|
|
20489
|
-
sourceId: mapId,
|
|
20490
|
-
origin: 'MapViewConnect, 220',
|
|
20491
|
-
value: handleMomentISOString(dimension.currentValue)
|
|
20492
|
-
});
|
|
20493
|
-
}
|
|
20494
|
-
});
|
|
20495
|
-
},
|
|
20496
|
-
onLayerChangeStyle: layerChangeStyle$1,
|
|
20497
|
-
onLayerChangeDimension: layerChangeDimension$1,
|
|
20498
|
-
onLayerSetDimensions: layerSetDimensions$1,
|
|
20499
|
-
onServiceSetLayers: serviceSetLayers$1,
|
|
20500
|
-
onLayerSetStyles: layerSetStyles$1,
|
|
20857
|
+
onUpdateLayerInformation: updateLayerInformation,
|
|
20501
20858
|
onMapPinChangeLocation: mapPinChangeLocation,
|
|
20502
20859
|
onMapZoomEnd: function onMapZoomEnd(a) {
|
|
20503
20860
|
genericSetBbox({
|
|
@@ -20561,7 +20918,7 @@
|
|
|
20561
20918
|
var defaultCanvasWidth = 150;
|
|
20562
20919
|
var defaultCanvasHeight = 30; // TODO: remove fontFamily styles after theming is fully implemented
|
|
20563
20920
|
|
|
20564
|
-
var useStyles$6 =
|
|
20921
|
+
var useStyles$6 = makeStyles__default["default"](function (theme) {
|
|
20565
20922
|
return {
|
|
20566
20923
|
legendCanvas: {
|
|
20567
20924
|
margin: '10px 0px 10px 0px'
|
|
@@ -20673,7 +21030,7 @@
|
|
|
20673
21030
|
like a title and the WMS legendgraphic url */
|
|
20674
21031
|
|
|
20675
21032
|
var wmLayer = getWMLayerById(layer.id);
|
|
20676
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
21033
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Paper, {
|
|
20677
21034
|
"data-testid": "legend",
|
|
20678
21035
|
className: classes.legendComponent
|
|
20679
21036
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -20681,10 +21038,10 @@
|
|
|
20681
21038
|
style: {
|
|
20682
21039
|
maxWidth: canvasContainerWidth
|
|
20683
21040
|
}
|
|
20684
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
21041
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
20685
21042
|
className: classes.legendTitle,
|
|
20686
21043
|
variant: "h3"
|
|
20687
|
-
}, wmLayer && wmLayer.title)), /*#__PURE__*/React__default["default"].createElement(
|
|
21044
|
+
}, wmLayer && wmLayer.title)), /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
|
|
20688
21045
|
title: wmLayer && wmLayer.title || 'loading',
|
|
20689
21046
|
placement: "top"
|
|
20690
21047
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -20781,7 +21138,7 @@
|
|
|
20781
21138
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
20782
21139
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
20783
21140
|
* */
|
|
20784
|
-
var useStyles$5 =
|
|
21141
|
+
var useStyles$5 = makeStyles__default["default"](function () {
|
|
20785
21142
|
return {
|
|
20786
21143
|
legendList: {
|
|
20787
21144
|
display: 'flex',
|
|
@@ -20836,7 +21193,7 @@
|
|
|
20836
21193
|
key: layer.id,
|
|
20837
21194
|
layer: layer
|
|
20838
21195
|
});
|
|
20839
|
-
})) : /*#__PURE__*/React__namespace.createElement(
|
|
21196
|
+
})) : /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
20840
21197
|
"data-testid": "NoLayers",
|
|
20841
21198
|
variant: "body1",
|
|
20842
21199
|
style: {
|
|
@@ -21001,7 +21358,7 @@
|
|
|
21001
21358
|
"data-testid": "open-Legend",
|
|
21002
21359
|
onClick: openLegendDialog,
|
|
21003
21360
|
isActive: isOpen
|
|
21004
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
21361
|
+
}, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
|
|
21005
21362
|
style: {
|
|
21006
21363
|
width: 22,
|
|
21007
21364
|
height: 22
|
|
@@ -21067,7 +21424,7 @@
|
|
|
21067
21424
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
21068
21425
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
21069
21426
|
* */
|
|
21070
|
-
var useStyles$4 =
|
|
21427
|
+
var useStyles$4 = makeStyles__default["default"](function (theme) {
|
|
21071
21428
|
return {
|
|
21072
21429
|
mapTitle: {
|
|
21073
21430
|
position: 'absolute',
|
|
@@ -21189,7 +21546,7 @@
|
|
|
21189
21546
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21190
21547
|
className: className || classes.mapContainer,
|
|
21191
21548
|
"data-testid": "configurableConnectedMap"
|
|
21192
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
21549
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
21193
21550
|
"data-testid": "mapTitle",
|
|
21194
21551
|
className: classes.mapTitle
|
|
21195
21552
|
}, title || mapId), /*#__PURE__*/React__default["default"].createElement(MapControls, {
|
|
@@ -21228,7 +21585,7 @@
|
|
|
21228
21585
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
21229
21586
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
21230
21587
|
* */
|
|
21231
|
-
var useStyles$3 =
|
|
21588
|
+
var useStyles$3 = makeStyles__default["default"](function (theme) {
|
|
21232
21589
|
return {
|
|
21233
21590
|
box: {
|
|
21234
21591
|
boxSizing: 'border-box',
|
|
@@ -21569,7 +21926,7 @@
|
|
|
21569
21926
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
21570
21927
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
21571
21928
|
* */
|
|
21572
|
-
var useStyles$2 =
|
|
21929
|
+
var useStyles$2 = makeStyles__default["default"](function () {
|
|
21573
21930
|
return {
|
|
21574
21931
|
zoomControls: {
|
|
21575
21932
|
position: 'absolute',
|
|
@@ -21772,7 +22129,7 @@
|
|
|
21772
22129
|
var isNotCheckedElseWhere = viewStateData.groups.every(function (group) {
|
|
21773
22130
|
return !(group.id !== groupId && group.selected.includes(source.id));
|
|
21774
22131
|
});
|
|
21775
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
22132
|
+
return /*#__PURE__*/React__namespace.createElement(material.ListItem, {
|
|
21776
22133
|
key: source.id,
|
|
21777
22134
|
dense: true,
|
|
21778
22135
|
button: true,
|
|
@@ -21780,7 +22137,7 @@
|
|
|
21780
22137
|
return handleToggle(source.id);
|
|
21781
22138
|
},
|
|
21782
22139
|
className: classes.listItem
|
|
21783
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
22140
|
+
}, /*#__PURE__*/React__namespace.createElement(material.ListItemIcon, null, /*#__PURE__*/React__namespace.createElement(material.Checkbox, {
|
|
21784
22141
|
edge: "start",
|
|
21785
22142
|
checked: isChecked,
|
|
21786
22143
|
tabIndex: -1,
|
|
@@ -21790,13 +22147,13 @@
|
|
|
21790
22147
|
},
|
|
21791
22148
|
className: isNotCheckedElseWhere ? classes.checkboxIsActive : classes.isDisabled,
|
|
21792
22149
|
color: "default"
|
|
21793
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
22150
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
21794
22151
|
className: isNotCheckedElseWhere ? classes.isActive : classes.isDisabled
|
|
21795
22152
|
}, source.name));
|
|
21796
22153
|
}));
|
|
21797
22154
|
};
|
|
21798
|
-
var useStyles$1 =
|
|
21799
|
-
return
|
|
22155
|
+
var useStyles$1 = makeStyles__default["default"](function (theme) {
|
|
22156
|
+
return createStyles__default["default"]({
|
|
21800
22157
|
listItem: {
|
|
21801
22158
|
width: '80%',
|
|
21802
22159
|
borderRadius: '5px'
|
|
@@ -21836,17 +22193,17 @@
|
|
|
21836
22193
|
addNewGroup = _a.addNewGroup,
|
|
21837
22194
|
removeGroup = _a.removeGroup;
|
|
21838
22195
|
var classes = useStyles();
|
|
21839
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
22196
|
+
return /*#__PURE__*/React__namespace.createElement(material.List, {
|
|
21840
22197
|
disablePadding: true
|
|
21841
22198
|
}, viewStateData.groups.map(function (groupObject, index) {
|
|
21842
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
22199
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
21843
22200
|
key: groupObject.id,
|
|
21844
22201
|
className: index === 0 ? null : classes.childListItem
|
|
21845
22202
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
21846
22203
|
className: classes.syncGroupHeader
|
|
21847
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
22204
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Typography, null, title), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
21848
22205
|
title: index === 0 ? 'Add new group to list' : 'Remove group from list'
|
|
21849
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
22206
|
+
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
21850
22207
|
style: {
|
|
21851
22208
|
right: '10px'
|
|
21852
22209
|
},
|
|
@@ -21855,10 +22212,11 @@
|
|
|
21855
22212
|
return addNewGroup(groupObject.id);
|
|
21856
22213
|
} : function () {
|
|
21857
22214
|
return removeGroup(groupObject.id);
|
|
21858
|
-
}
|
|
21859
|
-
|
|
22215
|
+
},
|
|
22216
|
+
size: "large"
|
|
22217
|
+
}, index === 0 ? /*#__PURE__*/React__namespace.createElement(iconsMaterial.Add, {
|
|
21860
22218
|
className: classes.iconColor
|
|
21861
|
-
}) : /*#__PURE__*/React__namespace.createElement(
|
|
22219
|
+
}) : /*#__PURE__*/React__namespace.createElement(iconsMaterial.DeleteForever, {
|
|
21862
22220
|
className: classes.iconColor
|
|
21863
22221
|
})))), /*#__PURE__*/React__namespace.createElement(SyncGroupListItem, {
|
|
21864
22222
|
viewStateData: viewStateData,
|
|
@@ -21871,8 +22229,8 @@
|
|
|
21871
22229
|
}));
|
|
21872
22230
|
}));
|
|
21873
22231
|
};
|
|
21874
|
-
var useStyles =
|
|
21875
|
-
return
|
|
22232
|
+
var useStyles = makeStyles__default["default"](function (theme) {
|
|
22233
|
+
return createStyles__default["default"]({
|
|
21876
22234
|
syncGroupHeader: {
|
|
21877
22235
|
display: 'flex',
|
|
21878
22236
|
flexDirection: 'row',
|