@opengeoweb/core 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +1055 -459
- package/index.umd.js +1108 -443
- package/lib/components/CanvasComponent/CanvasComponent.d.ts +6 -6
- package/lib/components/ConfigurableMap/ConfigurableMapConnect.d.ts +1 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderLayers/RenderLayers.d.ts +1 -1
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderStyles/RenderStyles.d.ts +1 -1
- package/lib/components/LayerManager/LayerSelect/ServiceOptionsDialog/ServiceOptionsDialog.d.ts +2 -0
- package/lib/components/LayerManager/LayerSelect/ServiceOptionsDialog/ServiceOptionsDialogConnect.d.ts +2 -0
- package/lib/components/LayerManager/LayerSelect/ServicePopup/utils.d.ts +2 -0
- package/lib/components/LayerManager/useFetchServices.d.ts +1 -1
- package/lib/components/MultiMapView/ModelRunInterval/ModelRunInterval.d.ts +6 -0
- package/lib/components/MultiMapView/MultiMapViewConnect.d.ts +1 -0
- package/lib/components/ReactMapView/AdagucMapDraw.d.ts +1 -1
- package/lib/components/ReactMapView/AdagucMapDrawTools.d.ts +1 -1
- package/lib/components/ReactMapView/ReactMapView.d.ts +5 -5
- package/lib/components/ReactMapView/ReactMapViewParseLayer.d.ts +2 -2
- package/lib/components/SyncGroups/SimpleTimeSliderConnect.d.ts +9 -1
- package/lib/components/SyncGroups/selector.d.ts +6 -6
- package/lib/components/TimeSlider/TimeSlider.stories.d.ts +15 -0
- package/lib/components/TimeSlider/TimeSliderButtons/AutoUpdateButton/AutoUpdateButtonConnect.d.ts +13 -1
- package/lib/components/TimeSlider/TimeSliderButtons/BackwardForwardStepButton/BackwardForwardStepButton.d.ts +10 -0
- package/lib/components/TimeSlider/TimeSliderButtons/BackwardForwardStepButton/BackwardForwardStepButton.spec.d.ts +1 -0
- package/lib/components/TimeSlider/TimeSliderButtons/BackwardForwardStepButton/BackwardForwardStepButtonConnect.d.ts +6 -0
- package/lib/components/TimeSlider/TimeSliderButtons/BackwardForwardStepButton/BackwardForwardStepButtonConnect.spec.d.ts +1 -0
- package/lib/components/TimeSlider/TimeSliderButtons/HideSliderButton/HideSliderButton.d.ts +7 -0
- package/lib/components/TimeSlider/TimeSliderButtons/HideSliderButton/HideSliderButton.spec.d.ts +1 -0
- package/lib/components/TimeSlider/TimeSliderButtons/OptionsMenuButton/OptionsMenuButton.d.ts +2 -1
- package/lib/components/TimeSlider/TimeSliderButtons/OptionsMenuButton/OptionsMenuButton.stories.d.ts +24 -0
- package/lib/components/TimeSlider/TimeSliderButtons/PlayButton/PlayButtonConnect.d.ts +19 -18
- package/lib/components/TimeSlider/TimeSliderButtons/TimeSliderButtons.d.ts +2 -0
- package/lib/components/TimeSlider/TimeSliderClock/TimeSliderClock.d.ts +5 -0
- package/lib/components/TimeSlider/TimeSliderClock/TimeSliderClock.stories.d.ts +24 -0
- package/lib/components/TimeSlider/TimeSliderClock/TimeSliderClockConnect.d.ts +4 -0
- package/lib/components/TimeSlider/TimeSliderClock/TimeSliderClockConnect.spec.d.ts +1 -0
- package/lib/components/TimeSlider/TimeSliderConnect.d.ts +12 -1
- package/lib/components/TimeSlider/TimeSliderLegend/TimeSliderLegend.d.ts +1 -1
- package/lib/components/TimeSlider/TimeSliderLegend/TimeSliderLegendConnect.d.ts +22 -3
- package/lib/components/TimeSlider/TimeSliderLegend/TimeSliderLegendRenderFunctions.d.ts +1 -1
- package/lib/components/TimeSlider/TimeSliderRail/TimeSliderRailConnect.d.ts +22 -3
- package/lib/components/TimeSlider/TimeSliderRail/TimeSliderRailRenderFunctions.d.ts +1 -1
- package/lib/components/TimeSlider/TimeSliderUtils.d.ts +4 -1
- package/lib/components/WMSLoader/WMSLayerTree/WMSLayerTreeConnect.d.ts +11 -1
- package/lib/index.d.ts +52 -52
- package/lib/store/coreModuleConfig.d.ts +1 -1
- package/lib/store/generic/actions.d.ts +2 -2
- package/lib/store/generic/config.d.ts +3 -2
- package/lib/store/generic/index.d.ts +10 -10
- package/lib/store/generic/selectors.d.ts +7 -7
- package/lib/store/generic/synchronizationGroups/reducer.d.ts +2 -2
- package/lib/store/generic/synchronizationGroups/selectors.d.ts +13 -13
- package/lib/store/layerSelect/config.d.ts +3 -2
- package/lib/store/layerSelect/reducer.d.ts +1 -1
- package/lib/store/layerSelect/sagas.d.ts +3 -1
- package/lib/store/layerSelect/selectors.d.ts +54 -54
- package/lib/store/mapStore/config.d.ts +3 -2
- package/lib/store/mapStore/layers/reducer.d.ts +1 -1
- package/lib/store/mapStore/layers/selectors.d.ts +129 -109
- package/lib/store/mapStore/layers/types.d.ts +2 -1
- package/lib/store/mapStore/map/actions.d.ts +2 -2
- package/lib/store/mapStore/map/reducer.d.ts +33 -33
- package/lib/store/mapStore/map/sagas.d.ts +2 -1
- package/lib/store/mapStore/map/selectors.d.ts +297 -297
- package/lib/store/mapStore/service/reducer.d.ts +1 -1
- package/lib/store/mapStore/service/selectors.d.ts +36 -36
- package/lib/store/mapStore/service/types.d.ts +1 -0
- package/lib/store/snackbar/config.d.ts +3 -2
- package/lib/store/snackbar/reducer.d.ts +1 -1
- package/lib/store/snackbar/selectors.d.ts +2 -2
- package/lib/store/ui/config.d.ts +3 -2
- package/lib/store/ui/reducer.d.ts +1 -1
- package/lib/store/ui/selectors.d.ts +30 -30
- package/lib/storybookUtils/store.d.ts +1 -1
- package/lib/utils/__mocks__/getCapabilities.d.ts +24 -22
- package/lib/utils/defaultConfigurations.d.ts +2 -2
- package/lib/utils/defaultTestSettings.d.ts +1 -1
- package/lib/utils/testUtils.d.ts +1 -1
- package/package.json +11 -9
package/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@reduxjs/toolkit'), require('immer'), require('moment'), require('react'), require('lodash'), require('redux-saga/effects'), require('react-redux'), require('@mui/material'), require('@opengeoweb/shared'), require('@opengeoweb/theme'), require('@opengeoweb/webmap'), require('react-sortablejs'), require('sortablejs'), require('@opengeoweb/form-fields'), require('react-hook-form'), require('react-window'), require('@mui/material/Box'), require('@mui/material/Typography'), require('@mui/material/Grid'), require('@mui/material/Tooltip'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@reduxjs/toolkit', 'immer', 'moment', 'react', 'lodash', 'redux-saga/effects', 'react-redux', '@mui/material', '@opengeoweb/shared', '@opengeoweb/theme', '@opengeoweb/webmap', 'react-sortablejs', 'sortablejs', '@opengeoweb/form-fields', 'react-hook-form', 'react-window', '@mui/material/Box', '@mui/material/Typography', '@mui/material/Grid', '@mui/material/Tooltip', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.toolkit, global.produce, global.moment, global.React, global._, global.effects, global.reactRedux, global.material, global.shared, global.theme, global.webmap, global.reactSortablejs, global.Sortable, global.formFields, global.reactHookForm, global.reactWindow, global.Box, global.Typography, global.Grid, global.Tooltip, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.
|
|
5
|
-
})(this, (function (exports, toolkit, produce, moment, React, _, effects, reactRedux, material, shared, theme, webmap, reactSortablejs, Sortable, formFields, reactHookForm, reactWindow, Box, Typography, Grid, Tooltip, throttleDebounce, cloneDeep, proj4, turf,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@reduxjs/toolkit'), require('immer'), require('moment'), require('react'), require('lodash'), require('redux-saga/effects'), require('react-redux'), require('@mui/material'), require('@opengeoweb/shared'), require('@opengeoweb/theme'), require('@opengeoweb/webmap'), require('react-sortablejs'), require('sortablejs'), require('@opengeoweb/form-fields'), require('react-hook-form'), require('react-window'), require('@mui/material/Box'), require('@mui/material/Typography'), require('@mui/material/Grid'), require('@mui/material/Tooltip'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('@mui/system'), require('react-draggable'), require('re-resizable'), require('@redux-eggs/redux-toolkit'), require('@redux-eggs/saga-extension')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@reduxjs/toolkit', 'immer', 'moment', 'react', 'lodash', 'redux-saga/effects', 'react-redux', '@mui/material', '@opengeoweb/shared', '@opengeoweb/theme', '@opengeoweb/webmap', 'react-sortablejs', 'sortablejs', '@opengeoweb/form-fields', 'react-hook-form', 'react-window', '@mui/material/Box', '@mui/material/Typography', '@mui/material/Grid', '@mui/material/Tooltip', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', '@mui/system', 'react-draggable', 're-resizable', '@redux-eggs/redux-toolkit', '@redux-eggs/saga-extension'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.toolkit, global.produce, global.moment, global.React, global._, global.effects, global.reactRedux, global.material, global.shared, global.theme, global.webmap, global.reactSortablejs, global.Sortable, global.formFields, global.reactHookForm, global.reactWindow, global.Box, global.Typography, global.Grid, global.Tooltip, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.system, global.Draggable, global.reResizable, global.reduxToolkit, global.sagaExtension));
|
|
5
|
+
})(this, (function (exports, toolkit, produce, moment, React, _, effects, reactRedux, material, shared, theme, webmap, reactSortablejs, Sortable, formFields, reactHookForm, reactWindow, Box, Typography, Grid, Tooltip, throttleDebounce, cloneDeep, proj4, turf, system, Draggable, reResizable, reduxToolkit, sagaExtension) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep);
|
|
38
38
|
var proj4__default = /*#__PURE__*/_interopDefaultLegacy(proj4);
|
|
39
39
|
var turf__namespace = /*#__PURE__*/_interopNamespace(turf);
|
|
40
|
+
var Draggable__default = /*#__PURE__*/_interopDefaultLegacy(Draggable);
|
|
40
41
|
|
|
41
42
|
/*! *****************************************************************************
|
|
42
43
|
Copyright (c) Microsoft Corporation.
|
|
@@ -208,6 +209,7 @@
|
|
|
208
209
|
LayerActionOrigin["ReactMapViewParseLayer"] = "ReactMapViewParseLayer";
|
|
209
210
|
LayerActionOrigin["setLayerDimensionSaga"] = "setLayerDimensionSaga";
|
|
210
211
|
LayerActionOrigin["toggleAutoUpdateSaga"] = "toggleAutoUpdateSaga";
|
|
212
|
+
LayerActionOrigin["unregisterMapSaga"] = "unregisterMapSaga";
|
|
211
213
|
})(LayerActionOrigin || (LayerActionOrigin = {}));
|
|
212
214
|
|
|
213
215
|
/* *
|
|
@@ -456,6 +458,11 @@
|
|
|
456
458
|
var getSpeedFactor = function getSpeedFactor(speedDelay) {
|
|
457
459
|
return defaultDelay / speedDelay;
|
|
458
460
|
};
|
|
461
|
+
var getSelectedTime = function getSelectedTime(timeDimension) {
|
|
462
|
+
var currentValueIsValid = timeDimension && timeDimension.currentValue && moment__default["default"].utc(timeDimension.currentValue).isValid();
|
|
463
|
+
var selectedTime = currentValueIsValid && timeDimension ? moment__default["default"].utc(timeDimension.currentValue).unix() : moment__default["default"].utc().unix();
|
|
464
|
+
return selectedTime;
|
|
465
|
+
};
|
|
459
466
|
/**
|
|
460
467
|
* Returns time bounds from the given dimension. If no time dimension given, current time is returned as default
|
|
461
468
|
*/
|
|
@@ -465,13 +472,12 @@
|
|
|
465
472
|
second: 0,
|
|
466
473
|
millisecond: 0
|
|
467
474
|
}).unix();
|
|
468
|
-
var timeDimension = dimensions ? dimensions.find(function (dim) {
|
|
475
|
+
var timeDimension = dimensions === null || dimensions === void 0 ? void 0 : dimensions.find(function (dim) {
|
|
469
476
|
return dim.name === 'time';
|
|
470
|
-
})
|
|
477
|
+
});
|
|
471
478
|
var startTime = timeDimension && timeDimension.minValue ? moment__default["default"].utc(timeDimension.minValue).unix() : defaultStartEnd;
|
|
472
479
|
var endTime = timeDimension && timeDimension.maxValue ? moment__default["default"].utc(timeDimension.maxValue).unix() : defaultStartEnd;
|
|
473
|
-
var
|
|
474
|
-
var selectedTime = currentValueIsValid ? moment__default["default"].utc(timeDimension.currentValue).unix() : moment__default["default"].utc().unix();
|
|
480
|
+
var selectedTime = getSelectedTime(timeDimension);
|
|
475
481
|
return {
|
|
476
482
|
selectedTime: selectedTime,
|
|
477
483
|
startTime: startTime,
|
|
@@ -506,22 +512,12 @@
|
|
|
506
512
|
var pixelToTimestamp = function pixelToTimestamp(timePx, centerTime, widthPx, secondsPerPx) {
|
|
507
513
|
return centerTime - (widthPx / 2 - timePx) * secondsPerPx;
|
|
508
514
|
};
|
|
509
|
-
var onSetNewDateDebouncer;
|
|
510
515
|
var onsetNewDateDebounced = function onsetNewDateDebounced(dateToSet, onSetNewDate) {
|
|
511
|
-
|
|
512
|
-
if (onSetNewDateDebouncer === undefined) {
|
|
513
|
-
onSetNewDateDebouncer = dateToSet;
|
|
516
|
+
_.debounce(function () {
|
|
514
517
|
onSetNewDate(dateToSet);
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
onSetNewDateDebouncer = undefined;
|
|
521
|
-
}, 10);
|
|
522
|
-
} else {
|
|
523
|
-
onSetNewDateDebouncer = dateToSet;
|
|
524
|
-
}
|
|
518
|
+
}, 10, {
|
|
519
|
+
leading: true
|
|
520
|
+
})();
|
|
525
521
|
};
|
|
526
522
|
var roundWithTimeStep = function roundWithTimeStep(unixTime, timeStep, type) {
|
|
527
523
|
var adjustedTimeStep = timeStep * 60;
|
|
@@ -543,7 +539,9 @@
|
|
|
543
539
|
var setNewRoundedTime = function setNewRoundedTime(x, centerTime, width, secondsPerPx, timeStep, dataStartTime, dataEndTime, onSetNewDate) {
|
|
544
540
|
var unixTime = pixelToTimestamp(x, centerTime, width, secondsPerPx);
|
|
545
541
|
var roundedTime = roundWithTimeStep(unixTime, timeStep);
|
|
546
|
-
var
|
|
542
|
+
var maxTime = Math.max(roundedTime, dataStartTime);
|
|
543
|
+
var newTime = Math.min(maxTime, dataEndTime || roundedTime);
|
|
544
|
+
var selectedTimeString = moment__default["default"].unix(newTime).toISOString();
|
|
547
545
|
onsetNewDateDebounced(selectedTimeString, onSetNewDate);
|
|
548
546
|
};
|
|
549
547
|
var getDataLimitsFromLayers = function getDataLimitsFromLayers(layers) {
|
|
@@ -570,6 +568,32 @@
|
|
|
570
568
|
*/
|
|
571
569
|
[2147483647, 0]);
|
|
572
570
|
};
|
|
571
|
+
var setPreviousTimeStep = function setPreviousTimeStep(timeStep, curTime, dataStartTime, onSetNewDate) {
|
|
572
|
+
var prevTimeStep = moment__default["default"].utc(curTime).subtract(timeStep, 'm').toISOString();
|
|
573
|
+
|
|
574
|
+
if (!prevTimeStep) {
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
if (moment__default["default"].utc(prevTimeStep) < moment__default["default"].utc(dataStartTime * millisecondsInSecond)) {
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
onsetNewDateDebounced(prevTimeStep, onSetNewDate);
|
|
583
|
+
};
|
|
584
|
+
var setNextTimeStep = function setNextTimeStep(timeStep, curTime, dataEndTime, onSetNewDate) {
|
|
585
|
+
var nextTimeStep = moment__default["default"].utc(curTime).add(timeStep, 'm').toISOString();
|
|
586
|
+
|
|
587
|
+
if (!nextTimeStep) {
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
if (moment__default["default"].utc(nextTimeStep) > moment__default["default"].utc(dataEndTime * millisecondsInSecond)) {
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
onsetNewDateDebounced(nextTimeStep, onSetNewDate);
|
|
596
|
+
};
|
|
573
597
|
var getTimeStepFromDataInterval = function getTimeStepFromDataInterval(timeInterval) {
|
|
574
598
|
switch (timeInterval.isRegularInterval) {
|
|
575
599
|
case false:
|
|
@@ -2683,6 +2707,22 @@
|
|
|
2683
2707
|
return layers[layerId];
|
|
2684
2708
|
});
|
|
2685
2709
|
}, selectorMemoizationOptions);
|
|
2710
|
+
/**
|
|
2711
|
+
* Retrieves all layers (including base layers and overlayers) for the given mapId
|
|
2712
|
+
*
|
|
2713
|
+
* Example: layers = getLayersByMapId(store, mapId)
|
|
2714
|
+
* @param {object} store store: object - object from which the layers state will be extracted
|
|
2715
|
+
* @param {string} mapId mapId: string - mapId
|
|
2716
|
+
* @returns {array} returnType: ReduxLayer[] - an array of all layers containing layer information (service, name, style, enabled etc.)
|
|
2717
|
+
*/
|
|
2718
|
+
|
|
2719
|
+
var getLayersByMapId = toolkit.createSelector(getAllLayers, function (_store, _mapId) {
|
|
2720
|
+
return _mapId;
|
|
2721
|
+
}, function (layers, mapId) {
|
|
2722
|
+
return layers.filter(function (layer) {
|
|
2723
|
+
return layer.mapId === mapId;
|
|
2724
|
+
});
|
|
2725
|
+
}, selectorMemoizationOptions);
|
|
2686
2726
|
/**
|
|
2687
2727
|
* Retrieves all layers that aren't base layers and aren't overlayers
|
|
2688
2728
|
*
|
|
@@ -4787,8 +4827,8 @@
|
|
|
4787
4827
|
* @returns {object} returnType: SynchronizationGroupState
|
|
4788
4828
|
*/
|
|
4789
4829
|
|
|
4790
|
-
toolkit.createSelector(syncGroupStore, function (store) {
|
|
4791
|
-
return store ||
|
|
4830
|
+
var getSynchronizationGroupState = toolkit.createSelector(syncGroupStore, function (store) {
|
|
4831
|
+
return store || null;
|
|
4792
4832
|
});
|
|
4793
4833
|
var getSynchronizationGroup = function getSynchronizationGroup(state, id) {
|
|
4794
4834
|
return syncGroupStore(state).groups.byId[id];
|
|
@@ -5844,25 +5884,9 @@
|
|
|
5844
5884
|
});
|
|
5845
5885
|
}
|
|
5846
5886
|
|
|
5847
|
-
/* *
|
|
5848
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5849
|
-
* you may not use this file except in compliance with the License.
|
|
5850
|
-
* You may obtain a copy of the License at
|
|
5851
|
-
*
|
|
5852
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5853
|
-
*
|
|
5854
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
5855
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5856
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5857
|
-
* See the License for the specific language governing permissions and
|
|
5858
|
-
* limitations under the License.
|
|
5859
|
-
*
|
|
5860
|
-
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5861
|
-
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
5862
|
-
* */
|
|
5863
5887
|
var synchronizationGroupConfig = {
|
|
5864
5888
|
id: 'syncronizationGroupStore-module',
|
|
5865
|
-
|
|
5889
|
+
reducersMap: {
|
|
5866
5890
|
syncronizationGroupStore: reducer$2
|
|
5867
5891
|
},
|
|
5868
5892
|
sagas: [rootSaga$5, rootSaga$4]
|
|
@@ -6025,12 +6049,12 @@
|
|
|
6025
6049
|
* See the License for the specific language governing permissions and
|
|
6026
6050
|
* limitations under the License.
|
|
6027
6051
|
*
|
|
6028
|
-
* Copyright
|
|
6029
|
-
* Copyright
|
|
6052
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6053
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
6030
6054
|
* */
|
|
6031
6055
|
var uiModuleConfig = {
|
|
6032
6056
|
id: 'ui-module',
|
|
6033
|
-
|
|
6057
|
+
reducersMap: {
|
|
6034
6058
|
ui: reducer$4
|
|
6035
6059
|
},
|
|
6036
6060
|
sagas: [rootSaga$3]
|
|
@@ -6355,7 +6379,7 @@
|
|
|
6355
6379
|
};
|
|
6356
6380
|
var KNMIgeoservicesObs = {
|
|
6357
6381
|
name: 'KNMIgeoservicesObs',
|
|
6358
|
-
url: 'https://geoservices.knmi.nl/adagucserver?dataset=OBS
|
|
6382
|
+
url: 'https://geoservices.knmi.nl/adagucserver?dataset=OBS',
|
|
6359
6383
|
id: 'KNMIgeoservicesObs'
|
|
6360
6384
|
};
|
|
6361
6385
|
var KNMIgeoservicesKlimaatAtlas = {
|
|
@@ -7035,11 +7059,11 @@
|
|
|
7035
7059
|
return;
|
|
7036
7060
|
}
|
|
7037
7061
|
|
|
7038
|
-
if (
|
|
7062
|
+
if (this.ctx.canvas.height !== this.currentHeight) {
|
|
7039
7063
|
this.ctx.canvas.height = this.currentHeight;
|
|
7040
7064
|
}
|
|
7041
7065
|
|
|
7042
|
-
if (
|
|
7066
|
+
if (this.ctx.canvas.width !== this.currentWidth) {
|
|
7043
7067
|
this.ctx.canvas.width = this.currentWidth;
|
|
7044
7068
|
}
|
|
7045
7069
|
|
|
@@ -8435,6 +8459,39 @@
|
|
|
8435
8459
|
}
|
|
8436
8460
|
});
|
|
8437
8461
|
}
|
|
8462
|
+
function unregisterMapSaga(_a) {
|
|
8463
|
+
var mapId, layerList;
|
|
8464
|
+
var payload = _a.payload;
|
|
8465
|
+
return __generator(this, function (_b) {
|
|
8466
|
+
switch (_b.label) {
|
|
8467
|
+
case 0:
|
|
8468
|
+
mapId = payload.mapId;
|
|
8469
|
+
return [4
|
|
8470
|
+
/*yield*/
|
|
8471
|
+
, effects.select(getLayersByMapId, mapId)];
|
|
8472
|
+
|
|
8473
|
+
case 1:
|
|
8474
|
+
layerList = _b.sent();
|
|
8475
|
+
return [4
|
|
8476
|
+
/*yield*/
|
|
8477
|
+
, effects.all(layerList.map(function (layer) {
|
|
8478
|
+
return effects.put(layerActions.layerDelete({
|
|
8479
|
+
mapId: mapId,
|
|
8480
|
+
layerId: layer.id,
|
|
8481
|
+
layerIndex: 0,
|
|
8482
|
+
origin: LayerActionOrigin.unregisterMapSaga
|
|
8483
|
+
}));
|
|
8484
|
+
}))];
|
|
8485
|
+
|
|
8486
|
+
case 2:
|
|
8487
|
+
_b.sent();
|
|
8488
|
+
|
|
8489
|
+
return [2
|
|
8490
|
+
/*return*/
|
|
8491
|
+
];
|
|
8492
|
+
}
|
|
8493
|
+
});
|
|
8494
|
+
}
|
|
8438
8495
|
function rootSaga$2() {
|
|
8439
8496
|
return __generator(this, function (_a) {
|
|
8440
8497
|
switch (_a.label) {
|
|
@@ -8492,6 +8549,13 @@
|
|
|
8492
8549
|
case 7:
|
|
8493
8550
|
_a.sent();
|
|
8494
8551
|
|
|
8552
|
+
return [4
|
|
8553
|
+
/*yield*/
|
|
8554
|
+
, effects.takeEvery(mapActions$1.unregisterMap.type, unregisterMapSaga)];
|
|
8555
|
+
|
|
8556
|
+
case 8:
|
|
8557
|
+
_a.sent();
|
|
8558
|
+
|
|
8495
8559
|
return [2
|
|
8496
8560
|
/*return*/
|
|
8497
8561
|
];
|
|
@@ -8499,25 +8563,9 @@
|
|
|
8499
8563
|
});
|
|
8500
8564
|
}
|
|
8501
8565
|
|
|
8502
|
-
/* *
|
|
8503
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8504
|
-
* you may not use this file except in compliance with the License.
|
|
8505
|
-
* You may obtain a copy of the License at
|
|
8506
|
-
*
|
|
8507
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8508
|
-
*
|
|
8509
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
8510
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8511
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8512
|
-
* See the License for the specific language governing permissions and
|
|
8513
|
-
* limitations under the License.
|
|
8514
|
-
*
|
|
8515
|
-
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8516
|
-
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
8517
|
-
* */
|
|
8518
8566
|
var moduleConfig = {
|
|
8519
8567
|
id: 'webmap-module',
|
|
8520
|
-
|
|
8568
|
+
reducersMap: {
|
|
8521
8569
|
webmap: reducer$3,
|
|
8522
8570
|
services: reducer$5,
|
|
8523
8571
|
layers: reducer$6
|
|
@@ -8595,13 +8643,16 @@
|
|
|
8595
8643
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
8596
8644
|
* */
|
|
8597
8645
|
function newServiceAddedSaga(capturedAction) {
|
|
8598
|
-
var addedService, id, serviceUrl, name, scope, _abstract, keywords, groups;
|
|
8646
|
+
var addedService, id, serviceUrl, name, scope, _abstract, isUpdating, keywords, groups;
|
|
8599
8647
|
|
|
8600
8648
|
return __generator(this, function (_a) {
|
|
8601
8649
|
switch (_a.label) {
|
|
8602
8650
|
case 0:
|
|
8603
8651
|
addedService = capturedAction.payload;
|
|
8604
|
-
id = addedService.id, serviceUrl = addedService.serviceUrl, name = addedService.name, scope = addedService.scope, _abstract = addedService["abstract"];
|
|
8652
|
+
id = addedService.id, serviceUrl = addedService.serviceUrl, name = addedService.name, scope = addedService.scope, _abstract = addedService["abstract"], isUpdating = addedService.isUpdating;
|
|
8653
|
+
if (isUpdating) return [2
|
|
8654
|
+
/*return*/
|
|
8655
|
+
];
|
|
8605
8656
|
keywords = addedService.layers.reduce(function (keywords, layer) {
|
|
8606
8657
|
var _a;
|
|
8607
8658
|
|
|
@@ -8641,6 +8692,131 @@
|
|
|
8641
8692
|
}
|
|
8642
8693
|
});
|
|
8643
8694
|
}
|
|
8695
|
+
function layerSelectCloseInfoDialogSaga(_a) {
|
|
8696
|
+
var _b, togglePayload, activeMapIdPayload, isLayerInfoDialogOpen, isLayerInfoDialogOpen, filteredLayers, dialogInfo;
|
|
8697
|
+
|
|
8698
|
+
var type = _a.type,
|
|
8699
|
+
payload = _a.payload;
|
|
8700
|
+
return __generator(this, function (_c) {
|
|
8701
|
+
switch (_c.label) {
|
|
8702
|
+
case 0:
|
|
8703
|
+
_b = type;
|
|
8704
|
+
|
|
8705
|
+
switch (_b) {
|
|
8706
|
+
case uiActions.setToggleOpenDialog.type:
|
|
8707
|
+
return [3
|
|
8708
|
+
/*break*/
|
|
8709
|
+
, 1];
|
|
8710
|
+
|
|
8711
|
+
case uiActions.setActiveMapIdForDialog.type:
|
|
8712
|
+
return [3
|
|
8713
|
+
/*break*/
|
|
8714
|
+
, 4];
|
|
8715
|
+
}
|
|
8716
|
+
|
|
8717
|
+
return [3
|
|
8718
|
+
/*break*/
|
|
8719
|
+
, 8];
|
|
8720
|
+
|
|
8721
|
+
case 1:
|
|
8722
|
+
togglePayload = payload;
|
|
8723
|
+
if (!(!togglePayload.setOpen && togglePayload.type === DialogTypes.LayerSelect)) return [3
|
|
8724
|
+
/*break*/
|
|
8725
|
+
, 3];
|
|
8726
|
+
return [4
|
|
8727
|
+
/*yield*/
|
|
8728
|
+
, effects.put(uiActions.setToggleOpenDialog({
|
|
8729
|
+
type: DialogTypes.LayerInfo,
|
|
8730
|
+
setOpen: false
|
|
8731
|
+
}))];
|
|
8732
|
+
|
|
8733
|
+
case 2:
|
|
8734
|
+
_c.sent();
|
|
8735
|
+
|
|
8736
|
+
_c.label = 3;
|
|
8737
|
+
|
|
8738
|
+
case 3:
|
|
8739
|
+
return [3
|
|
8740
|
+
/*break*/
|
|
8741
|
+
, 13];
|
|
8742
|
+
|
|
8743
|
+
case 4:
|
|
8744
|
+
activeMapIdPayload = payload;
|
|
8745
|
+
if (!!activeMapIdPayload.setOpen) return [3
|
|
8746
|
+
/*break*/
|
|
8747
|
+
, 7];
|
|
8748
|
+
return [4
|
|
8749
|
+
/*yield*/
|
|
8750
|
+
, effects.select(getisDialogOpen, DialogTypes.LayerInfo)];
|
|
8751
|
+
|
|
8752
|
+
case 5:
|
|
8753
|
+
isLayerInfoDialogOpen = _c.sent();
|
|
8754
|
+
if (!isLayerInfoDialogOpen) return [3
|
|
8755
|
+
/*break*/
|
|
8756
|
+
, 7];
|
|
8757
|
+
return [4
|
|
8758
|
+
/*yield*/
|
|
8759
|
+
, effects.put(uiActions.setToggleOpenDialog({
|
|
8760
|
+
type: DialogTypes.LayerInfo,
|
|
8761
|
+
setOpen: false
|
|
8762
|
+
}))];
|
|
8763
|
+
|
|
8764
|
+
case 6:
|
|
8765
|
+
_c.sent();
|
|
8766
|
+
|
|
8767
|
+
_c.label = 7;
|
|
8768
|
+
|
|
8769
|
+
case 7:
|
|
8770
|
+
return [3
|
|
8771
|
+
/*break*/
|
|
8772
|
+
, 13];
|
|
8773
|
+
|
|
8774
|
+
case 8:
|
|
8775
|
+
return [4
|
|
8776
|
+
/*yield*/
|
|
8777
|
+
, effects.select(getisDialogOpen, DialogTypes.LayerInfo)];
|
|
8778
|
+
|
|
8779
|
+
case 9:
|
|
8780
|
+
isLayerInfoDialogOpen = _c.sent();
|
|
8781
|
+
if (!isLayerInfoDialogOpen) return [3
|
|
8782
|
+
/*break*/
|
|
8783
|
+
, 13];
|
|
8784
|
+
return [4
|
|
8785
|
+
/*yield*/
|
|
8786
|
+
, effects.select(getFilteredLayers)];
|
|
8787
|
+
|
|
8788
|
+
case 10:
|
|
8789
|
+
filteredLayers = _c.sent();
|
|
8790
|
+
return [4
|
|
8791
|
+
/*yield*/
|
|
8792
|
+
, effects.select(getActiveLayerInfo)];
|
|
8793
|
+
|
|
8794
|
+
case 11:
|
|
8795
|
+
dialogInfo = _c.sent();
|
|
8796
|
+
if (!!filteredLayers.map(function (layer) {
|
|
8797
|
+
return layer.text;
|
|
8798
|
+
}).includes(dialogInfo.text)) return [3
|
|
8799
|
+
/*break*/
|
|
8800
|
+
, 13];
|
|
8801
|
+
return [4
|
|
8802
|
+
/*yield*/
|
|
8803
|
+
, effects.put(uiActions.setToggleOpenDialog({
|
|
8804
|
+
type: DialogTypes.LayerInfo,
|
|
8805
|
+
setOpen: false
|
|
8806
|
+
}))];
|
|
8807
|
+
|
|
8808
|
+
case 12:
|
|
8809
|
+
_c.sent();
|
|
8810
|
+
|
|
8811
|
+
_c.label = 13;
|
|
8812
|
+
|
|
8813
|
+
case 13:
|
|
8814
|
+
return [2
|
|
8815
|
+
/*return*/
|
|
8816
|
+
];
|
|
8817
|
+
}
|
|
8818
|
+
});
|
|
8819
|
+
}
|
|
8644
8820
|
function layerSelectRemoveServiceSaga(capturedAction) {
|
|
8645
8821
|
var removedService, serviceId, serviceUrl, results, services, servicesEnabled;
|
|
8646
8822
|
return __generator(this, function (_a) {
|
|
@@ -8755,6 +8931,13 @@
|
|
|
8755
8931
|
case 4:
|
|
8756
8932
|
_a.sent();
|
|
8757
8933
|
|
|
8934
|
+
return [4
|
|
8935
|
+
/*yield*/
|
|
8936
|
+
, effects.takeEvery([uiActions.setToggleOpenDialog.type, uiActions.setActiveMapIdForDialog.type, layerSelectActions.disableActiveService.type, layerSelectActions.toggleFilter.type, layerSelectActions.setSearchFilter.type], layerSelectCloseInfoDialogSaga)];
|
|
8937
|
+
|
|
8938
|
+
case 5:
|
|
8939
|
+
_a.sent();
|
|
8940
|
+
|
|
8758
8941
|
return [2
|
|
8759
8942
|
/*return*/
|
|
8760
8943
|
];
|
|
@@ -8762,25 +8945,9 @@
|
|
|
8762
8945
|
});
|
|
8763
8946
|
}
|
|
8764
8947
|
|
|
8765
|
-
/* *
|
|
8766
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8767
|
-
* you may not use this file except in compliance with the License.
|
|
8768
|
-
* You may obtain a copy of the License at
|
|
8769
|
-
*
|
|
8770
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8771
|
-
*
|
|
8772
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
8773
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8774
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8775
|
-
* See the License for the specific language governing permissions and
|
|
8776
|
-
* limitations under the License.
|
|
8777
|
-
*
|
|
8778
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8779
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8780
|
-
* */
|
|
8781
8948
|
var layerSelectConfig = {
|
|
8782
8949
|
id: 'layerSelect-module',
|
|
8783
|
-
|
|
8950
|
+
reducersMap: {
|
|
8784
8951
|
layerSelect: reducer$1
|
|
8785
8952
|
},
|
|
8786
8953
|
sagas: [rootSaga$1]
|
|
@@ -8911,7 +9078,7 @@
|
|
|
8911
9078
|
* */
|
|
8912
9079
|
var snackbarModuleConfig = {
|
|
8913
9080
|
id: 'snackbar-module',
|
|
8914
|
-
|
|
9081
|
+
reducersMap: {
|
|
8915
9082
|
snackbar: reducer
|
|
8916
9083
|
},
|
|
8917
9084
|
sagas: [rootSaga]
|
|
@@ -8992,6 +9159,7 @@
|
|
|
8992
9159
|
return new Promise(function (resolve, reject) {
|
|
8993
9160
|
var serviceObject = webmap.WMGetServiceFromStore(serviceUrl);
|
|
8994
9161
|
serviceObject.getNodes(function (nodes) {
|
|
9162
|
+
// TODO: Maarten Plieger, 2022-11-02: Harmonize types and use correct types: https://gitlab.com/opengeoweb/opengeoweb/-/issues/2817
|
|
8995
9163
|
var layerTree = recurseNodes(nodes);
|
|
8996
9164
|
resolve(layerTree);
|
|
8997
9165
|
}, function (error) {
|
|
@@ -9411,7 +9579,7 @@
|
|
|
9411
9579
|
},
|
|
9412
9580
|
{
|
|
9413
9581
|
name: "KNMIgeoservicesObs",
|
|
9414
|
-
url: "https://geoservices.knmi.nl/adagucserver?dataset=OBS
|
|
9582
|
+
url: "https://geoservices.knmi.nl/adagucserver?dataset=OBS",
|
|
9415
9583
|
id: "KNMIgeoservicesObs"
|
|
9416
9584
|
},
|
|
9417
9585
|
{
|
|
@@ -10227,7 +10395,9 @@
|
|
|
10227
10395
|
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
10228
10396
|
variant: "body1",
|
|
10229
10397
|
sx: {
|
|
10230
|
-
fontSize:
|
|
10398
|
+
fontSize: function fontSize(theme) {
|
|
10399
|
+
return theme.palette.geowebColors.layerManager.tableRowDefaultText.fontSize;
|
|
10400
|
+
},
|
|
10231
10401
|
color: 'geowebColors.layerManager.tableRowDefaultText.rgba',
|
|
10232
10402
|
fontWeight: 500
|
|
10233
10403
|
}
|
|
@@ -10630,9 +10800,7 @@
|
|
|
10630
10800
|
services = _a.services,
|
|
10631
10801
|
mapId = _a.mapId,
|
|
10632
10802
|
_b = _a.onLayerRowClick,
|
|
10633
|
-
onLayerRowClick = _b === void 0 ? function () {
|
|
10634
|
-
return null;
|
|
10635
|
-
} : _b,
|
|
10803
|
+
onLayerRowClick = _b === void 0 ? function () {} : _b,
|
|
10636
10804
|
_c = _a.isEnabled,
|
|
10637
10805
|
isEnabled = _c === void 0 ? true : _c,
|
|
10638
10806
|
_d = _a.isLayerMissing,
|
|
@@ -11042,39 +11210,93 @@
|
|
|
11042
11210
|
var isLayerEnabled = reactRedux.useSelector(function (store) {
|
|
11043
11211
|
return getLayerEnabled(store, layerId);
|
|
11044
11212
|
});
|
|
11045
|
-
var
|
|
11046
|
-
return
|
|
11047
|
-
});
|
|
11048
|
-
var layerChangeName = React__namespace.useCallback(function (_a) {
|
|
11049
|
-
var layerId = _a.layerId,
|
|
11050
|
-
name = _a.name;
|
|
11051
|
-
return dispatch(layerActions.layerChangeName({
|
|
11052
|
-
layerId: layerId,
|
|
11053
|
-
name: name,
|
|
11054
|
-
mapId: mapId,
|
|
11055
|
-
origin: LayerActionOrigin.layerManager
|
|
11056
|
-
}));
|
|
11057
|
-
}, [dispatch, mapId]);
|
|
11058
|
-
return /*#__PURE__*/React__namespace.createElement(RenderLayers, {
|
|
11059
|
-
layers: layers,
|
|
11060
|
-
layerName: layerName,
|
|
11061
|
-
onChangeLayerName: function onChangeLayerName(name) {
|
|
11062
|
-
layerChangeName({
|
|
11063
|
-
layerId: layerId,
|
|
11064
|
-
name: name
|
|
11065
|
-
});
|
|
11066
|
-
},
|
|
11067
|
-
isEnabled: isLayerEnabled
|
|
11213
|
+
var service = reactRedux.useSelector(function (store) {
|
|
11214
|
+
return getServiceByName(store, layerService);
|
|
11068
11215
|
});
|
|
11069
|
-
|
|
11216
|
+
var serviceSetLayers = React__namespace.useCallback(function (payload) {
|
|
11217
|
+
dispatch(serviceActions.serviceSetLayers(payload));
|
|
11218
|
+
}, [dispatch]);
|
|
11070
11219
|
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11075
|
-
|
|
11076
|
-
|
|
11077
|
-
|
|
11220
|
+
var addService = function addService(serviceUrl) {
|
|
11221
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
11222
|
+
var layers_1, wmService, error_1;
|
|
11223
|
+
return __generator(this, function (_a) {
|
|
11224
|
+
switch (_a.label) {
|
|
11225
|
+
case 0:
|
|
11226
|
+
_a.trys.push([0, 2,, 3]);
|
|
11227
|
+
|
|
11228
|
+
return [4
|
|
11229
|
+
/*yield*/
|
|
11230
|
+
, getLayersFlattenedFromService(serviceUrl)];
|
|
11231
|
+
|
|
11232
|
+
case 1:
|
|
11233
|
+
layers_1 = _a.sent();
|
|
11234
|
+
wmService = webmap.WMGetServiceFromStore(serviceUrl);
|
|
11235
|
+
serviceSetLayers({
|
|
11236
|
+
id: wmService.id,
|
|
11237
|
+
name: wmService.title,
|
|
11238
|
+
serviceUrl: serviceUrl,
|
|
11239
|
+
layers: layers_1,
|
|
11240
|
+
scope: 'user',
|
|
11241
|
+
"abstract": wmService["abstract"]
|
|
11242
|
+
});
|
|
11243
|
+
return [3
|
|
11244
|
+
/*break*/
|
|
11245
|
+
, 3];
|
|
11246
|
+
|
|
11247
|
+
case 2:
|
|
11248
|
+
error_1 = _a.sent();
|
|
11249
|
+
console.warn(error_1.message);
|
|
11250
|
+
return [3
|
|
11251
|
+
/*break*/
|
|
11252
|
+
, 3];
|
|
11253
|
+
|
|
11254
|
+
case 3:
|
|
11255
|
+
return [2
|
|
11256
|
+
/*return*/
|
|
11257
|
+
];
|
|
11258
|
+
}
|
|
11259
|
+
});
|
|
11260
|
+
});
|
|
11261
|
+
};
|
|
11262
|
+
|
|
11263
|
+
if (!service) {
|
|
11264
|
+
addService(layerService);
|
|
11265
|
+
}
|
|
11266
|
+
|
|
11267
|
+
var layers = reactRedux.useSelector(function (store) {
|
|
11268
|
+
return getLayersFromService$1(store, layerService);
|
|
11269
|
+
});
|
|
11270
|
+
var layerChangeName = React__namespace.useCallback(function (_a) {
|
|
11271
|
+
var layerId = _a.layerId,
|
|
11272
|
+
name = _a.name;
|
|
11273
|
+
return dispatch(layerActions.layerChangeName({
|
|
11274
|
+
layerId: layerId,
|
|
11275
|
+
name: name,
|
|
11276
|
+
mapId: mapId,
|
|
11277
|
+
origin: LayerActionOrigin.layerManager
|
|
11278
|
+
}));
|
|
11279
|
+
}, [dispatch, mapId]);
|
|
11280
|
+
return /*#__PURE__*/React__namespace.createElement(RenderLayers, {
|
|
11281
|
+
layers: layers,
|
|
11282
|
+
layerName: layerName,
|
|
11283
|
+
onChangeLayerName: function onChangeLayerName(name) {
|
|
11284
|
+
layerChangeName({
|
|
11285
|
+
layerId: layerId,
|
|
11286
|
+
name: name
|
|
11287
|
+
});
|
|
11288
|
+
},
|
|
11289
|
+
isEnabled: isLayerEnabled
|
|
11290
|
+
});
|
|
11291
|
+
};
|
|
11292
|
+
|
|
11293
|
+
/* *
|
|
11294
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11295
|
+
* you may not use this file except in compliance with the License.
|
|
11296
|
+
* You may obtain a copy of the License at
|
|
11297
|
+
*
|
|
11298
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11299
|
+
*
|
|
11078
11300
|
* Unless required by applicable law or agreed to in writing, software
|
|
11079
11301
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11080
11302
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -12005,6 +12227,37 @@
|
|
|
12005
12227
|
|
|
12006
12228
|
return true;
|
|
12007
12229
|
};
|
|
12230
|
+
var loadWMSService = function loadWMSService(serviceUrl, forceReload) {
|
|
12231
|
+
if (forceReload === void 0) {
|
|
12232
|
+
forceReload = false;
|
|
12233
|
+
}
|
|
12234
|
+
|
|
12235
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
12236
|
+
var layers, service;
|
|
12237
|
+
return __generator(this, function (_a) {
|
|
12238
|
+
switch (_a.label) {
|
|
12239
|
+
case 0:
|
|
12240
|
+
return [4
|
|
12241
|
+
/*yield*/
|
|
12242
|
+
, getLayersFlattenedFromService(serviceUrl, forceReload)];
|
|
12243
|
+
|
|
12244
|
+
case 1:
|
|
12245
|
+
layers = _a.sent();
|
|
12246
|
+
service = webmap.WMGetServiceFromStore(serviceUrl);
|
|
12247
|
+
return [2
|
|
12248
|
+
/*return*/
|
|
12249
|
+
, {
|
|
12250
|
+
id: service.id,
|
|
12251
|
+
name: service.title,
|
|
12252
|
+
serviceUrl: serviceUrl,
|
|
12253
|
+
"abstract": service["abstract"],
|
|
12254
|
+
layers: layers,
|
|
12255
|
+
scope: 'user'
|
|
12256
|
+
}];
|
|
12257
|
+
}
|
|
12258
|
+
});
|
|
12259
|
+
});
|
|
12260
|
+
};
|
|
12008
12261
|
|
|
12009
12262
|
/* *
|
|
12010
12263
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -12159,77 +12412,40 @@
|
|
|
12159
12412
|
|
|
12160
12413
|
var addNewService = function addNewService(formValues) {
|
|
12161
12414
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
12162
|
-
var
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
return __generator(this, function (_d) {
|
|
12167
|
-
switch (_d.label) {
|
|
12415
|
+
var layersForService;
|
|
12416
|
+
return __generator(this, function (_a) {
|
|
12417
|
+
switch (_a.label) {
|
|
12168
12418
|
case 0:
|
|
12169
12419
|
clearErrors(fields.serviceUrl.name);
|
|
12170
12420
|
setIsLoading(true);
|
|
12171
|
-
|
|
12421
|
+
_a.label = 1;
|
|
12172
12422
|
|
|
12173
12423
|
case 1:
|
|
12174
|
-
|
|
12424
|
+
_a.trys.push([1, 3,, 4]);
|
|
12175
12425
|
|
|
12176
12426
|
return [4
|
|
12177
12427
|
/*yield*/
|
|
12178
|
-
,
|
|
12428
|
+
, loadWMSService(formValues.serviceUrl, true)];
|
|
12179
12429
|
|
|
12180
12430
|
case 2:
|
|
12181
|
-
|
|
12182
|
-
|
|
12183
|
-
|
|
12184
|
-
|
|
12185
|
-
|
|
12186
|
-
|
|
12187
|
-
|
|
12188
|
-
|
|
12189
|
-
|
|
12190
|
-
|
|
12191
|
-
|
|
12192
|
-
|
|
12193
|
-
path: object.path,
|
|
12194
|
-
keywords: object.keywords ? object.keywords : [],
|
|
12195
|
-
"abstract": object["abstract"] ? object["abstract"] : '',
|
|
12196
|
-
styles: object.styles ? object.styles : [],
|
|
12197
|
-
dimensions: object.dimensions || [],
|
|
12198
|
-
geographicBoundingBox: object.geographicBoundingBox || null
|
|
12199
|
-
});
|
|
12200
|
-
}
|
|
12201
|
-
} catch (e_1_1) {
|
|
12202
|
-
e_1 = {
|
|
12203
|
-
error: e_1_1
|
|
12204
|
-
};
|
|
12205
|
-
} finally {
|
|
12206
|
-
try {
|
|
12207
|
-
if (_b && !_b.done && (_c = _a["return"])) _c.call(_a);
|
|
12208
|
-
} finally {
|
|
12209
|
-
if (e_1) throw e_1.error;
|
|
12210
|
-
}
|
|
12211
|
-
}
|
|
12212
|
-
|
|
12213
|
-
service = webmap.WMGetServiceFromStore(formValues.serviceUrl);
|
|
12214
|
-
serviceSetLayers({
|
|
12215
|
-
id: service.id,
|
|
12216
|
-
name: formValues.serviceName,
|
|
12217
|
-
serviceUrl: formValues.serviceUrl,
|
|
12218
|
-
"abstract": formValues.serviceAbstracts,
|
|
12219
|
-
layers: serviceLayers,
|
|
12220
|
-
scope: 'user'
|
|
12221
|
-
});
|
|
12222
|
-
setIsLoading(false);
|
|
12223
|
-
showSnackbar(getSuccesMessage(formValues.serviceName));
|
|
12224
|
-
closePopup();
|
|
12225
|
-
}
|
|
12226
|
-
|
|
12431
|
+
layersForService = _a.sent();
|
|
12432
|
+
serviceSetLayers({
|
|
12433
|
+
id: layersForService.id,
|
|
12434
|
+
name: formValues.serviceName,
|
|
12435
|
+
serviceUrl: formValues.serviceUrl,
|
|
12436
|
+
"abstract": formValues.serviceAbstracts,
|
|
12437
|
+
layers: layersForService.layers,
|
|
12438
|
+
scope: 'user'
|
|
12439
|
+
});
|
|
12440
|
+
setIsLoading(false);
|
|
12441
|
+
showSnackbar(getSuccesMessage(formValues.serviceName));
|
|
12442
|
+
closePopup();
|
|
12227
12443
|
return [3
|
|
12228
12444
|
/*break*/
|
|
12229
12445
|
, 4];
|
|
12230
12446
|
|
|
12231
12447
|
case 3:
|
|
12232
|
-
|
|
12448
|
+
_a.sent();
|
|
12233
12449
|
setIsLoading(false);
|
|
12234
12450
|
setError(fields.serviceUrl.name, {
|
|
12235
12451
|
message: VALIDATIONS_REQUEST_FAILED,
|
|
@@ -12413,7 +12629,7 @@
|
|
|
12413
12629
|
InputProps: {
|
|
12414
12630
|
disableUnderline: isShowPopup
|
|
12415
12631
|
},
|
|
12416
|
-
helperText: !isShowPopup
|
|
12632
|
+
helperText: !isShowPopup ? 'Short description of what this service does' : '',
|
|
12417
12633
|
sx: style$1.textField,
|
|
12418
12634
|
defaultValue: ""
|
|
12419
12635
|
}), !isServiceUrlDisabled && /*#__PURE__*/React__namespace.createElement(InitialValidationsTrigger, {
|
|
@@ -13029,17 +13245,17 @@
|
|
|
13029
13245
|
* */
|
|
13030
13246
|
|
|
13031
13247
|
var LayerInfoDialog = function LayerInfoDialog(_a) {
|
|
13032
|
-
var _b;
|
|
13248
|
+
var _b, _c;
|
|
13033
13249
|
|
|
13034
13250
|
var onClose = _a.onClose,
|
|
13035
13251
|
layer = _a.layer,
|
|
13036
13252
|
isOpen = _a.isOpen,
|
|
13037
|
-
|
|
13038
|
-
onMouseDown =
|
|
13039
|
-
|
|
13040
|
-
order =
|
|
13041
|
-
|
|
13042
|
-
source =
|
|
13253
|
+
_d = _a.onMouseDown,
|
|
13254
|
+
onMouseDown = _d === void 0 ? function () {} : _d,
|
|
13255
|
+
_e = _a.order,
|
|
13256
|
+
order = _e === void 0 ? 0 : _e,
|
|
13257
|
+
_f = _a.source,
|
|
13258
|
+
source = _f === void 0 ? 'app' : _f,
|
|
13043
13259
|
dialogHeight = _a.dialogHeight;
|
|
13044
13260
|
var styles = getLayerStyles(layer);
|
|
13045
13261
|
var bbox = getLayerBbox(layer);
|
|
@@ -13095,7 +13311,7 @@
|
|
|
13095
13311
|
title: layer.text,
|
|
13096
13312
|
name: layer.name,
|
|
13097
13313
|
dimensions: layer.dimensions,
|
|
13098
|
-
legendURL: layer.styles
|
|
13314
|
+
legendURL: ((_c = layer.styles) === null || _c === void 0 ? void 0 : _c.length) ? layer.styles[0].legendURL : undefined
|
|
13099
13315
|
})));
|
|
13100
13316
|
};
|
|
13101
13317
|
|
|
@@ -13545,6 +13761,7 @@
|
|
|
13545
13761
|
isSelected = _a.isSelected,
|
|
13546
13762
|
isDisabled = _a.isDisabled,
|
|
13547
13763
|
toggleChip = _a.toggleChip;
|
|
13764
|
+
var chip = all ? 'all' : service && service.serviceUrl;
|
|
13548
13765
|
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
13549
13766
|
title: (service === null || service === void 0 ? void 0 : service["abstract"]) ? "Abstract: " + service["abstract"] : ''
|
|
13550
13767
|
}, /*#__PURE__*/React__namespace.createElement(shared.CustomToggleButton, {
|
|
@@ -13553,10 +13770,10 @@
|
|
|
13553
13770
|
tabIndex: 0,
|
|
13554
13771
|
"data-testid": all ? 'serviceChipAll' : 'serviceChip',
|
|
13555
13772
|
onClick: function onClick() {
|
|
13556
|
-
return toggleChip(
|
|
13773
|
+
return toggleChip(chip);
|
|
13557
13774
|
},
|
|
13558
13775
|
onKeyPress: function onKeyPress() {
|
|
13559
|
-
return toggleChip(
|
|
13776
|
+
return toggleChip(chip);
|
|
13560
13777
|
},
|
|
13561
13778
|
disabled: isDisabled,
|
|
13562
13779
|
sx: style
|
|
@@ -13813,7 +14030,7 @@
|
|
|
13813
14030
|
* */
|
|
13814
14031
|
var styles$1 = {
|
|
13815
14032
|
servicesContainer: {
|
|
13816
|
-
width: '
|
|
14033
|
+
width: '360px',
|
|
13817
14034
|
maxHeight: '380px',
|
|
13818
14035
|
top: '140px',
|
|
13819
14036
|
backgroundColor: 'geowebColors.background.surface',
|
|
@@ -13828,6 +14045,10 @@
|
|
|
13828
14045
|
backgroundColor: 'geowebColors.background.surface',
|
|
13829
14046
|
zIndex: 100
|
|
13830
14047
|
},
|
|
14048
|
+
loading: {
|
|
14049
|
+
position: 'absolute',
|
|
14050
|
+
zIndex: 101
|
|
14051
|
+
},
|
|
13831
14052
|
footer: {
|
|
13832
14053
|
display: 'flex',
|
|
13833
14054
|
justifyContent: 'center',
|
|
@@ -13848,8 +14069,11 @@
|
|
|
13848
14069
|
var ServiceOptionsDialog = function ServiceOptionsDialog(_a) {
|
|
13849
14070
|
var services = _a.services,
|
|
13850
14071
|
layerSelectRemoveService = _a.layerSelectRemoveService,
|
|
14072
|
+
layerSelectReloadService = _a.layerSelectReloadService,
|
|
13851
14073
|
selectedLayers = _a.selectedLayers,
|
|
13852
|
-
setServicePopupInfo = _a.setServicePopupInfo
|
|
14074
|
+
setServicePopupInfo = _a.setServicePopupInfo,
|
|
14075
|
+
_b = _a.isLoading,
|
|
14076
|
+
isLoading = _b === void 0 ? false : _b;
|
|
13853
14077
|
|
|
13854
14078
|
var openAddService = function openAddService() {
|
|
13855
14079
|
setServicePopupInfo({
|
|
@@ -13863,9 +14087,13 @@
|
|
|
13863
14087
|
"data-testid": "ServiceDialog"
|
|
13864
14088
|
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
13865
14089
|
sx: styles$1.header
|
|
13866
|
-
}, "Services"), /*#__PURE__*/React__namespace.createElement(
|
|
14090
|
+
}, "Services"), /*#__PURE__*/React__namespace.createElement(material.Backdrop, {
|
|
14091
|
+
sx: styles$1.loading,
|
|
14092
|
+
open: isLoading
|
|
14093
|
+
}, /*#__PURE__*/React__namespace.createElement(material.CircularProgress, null)), /*#__PURE__*/React__namespace.createElement(Rows, {
|
|
13867
14094
|
services: services,
|
|
13868
14095
|
layerSelectRemoveService: layerSelectRemoveService,
|
|
14096
|
+
layerSelectReloadService: layerSelectReloadService,
|
|
13869
14097
|
setServicePopupInfo: setServicePopupInfo,
|
|
13870
14098
|
selectedLayers: selectedLayers
|
|
13871
14099
|
}), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
@@ -13881,6 +14109,7 @@
|
|
|
13881
14109
|
|
|
13882
14110
|
var Rows = function Rows(_a) {
|
|
13883
14111
|
var services = _a.services,
|
|
14112
|
+
layerSelectReloadService = _a.layerSelectReloadService,
|
|
13884
14113
|
layerSelectRemoveService = _a.layerSelectRemoveService,
|
|
13885
14114
|
setServicePopupInfo = _a.setServicePopupInfo,
|
|
13886
14115
|
selectedLayers = _a.selectedLayers;
|
|
@@ -13912,18 +14141,31 @@
|
|
|
13912
14141
|
noWrap: true,
|
|
13913
14142
|
style: {
|
|
13914
14143
|
textOverflow: 'ellipsis',
|
|
13915
|
-
paddingRight: '
|
|
14144
|
+
paddingRight: '70px'
|
|
13916
14145
|
}
|
|
13917
14146
|
}, serviceName)), /*#__PURE__*/React__namespace.createElement(material.ListItemSecondaryAction, {
|
|
13918
14147
|
style: {
|
|
13919
|
-
marginRight: '
|
|
13920
|
-
width:
|
|
14148
|
+
marginRight: '0px',
|
|
14149
|
+
width: 100
|
|
13921
14150
|
}
|
|
13922
14151
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13923
14152
|
container: true
|
|
13924
14153
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13925
14154
|
item: true,
|
|
13926
|
-
xs:
|
|
14155
|
+
xs: 4
|
|
14156
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
14157
|
+
title: "Update layers from WMS service",
|
|
14158
|
+
"data-testid": "updateServiceTooltip"
|
|
14159
|
+
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
14160
|
+
"data-testid": "updateServiceButton",
|
|
14161
|
+
"aria-label": "Update layers from WMS service",
|
|
14162
|
+
size: "large",
|
|
14163
|
+
onClick: function onClick() {
|
|
14164
|
+
return layerSelectReloadService(serviceUrl);
|
|
14165
|
+
}
|
|
14166
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.Cached, null)))), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
14167
|
+
item: true,
|
|
14168
|
+
xs: 4
|
|
13927
14169
|
}, userAddedService ? /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
13928
14170
|
title: "Edit Service"
|
|
13929
14171
|
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
@@ -13954,7 +14196,7 @@
|
|
|
13954
14196
|
}
|
|
13955
14197
|
}, /*#__PURE__*/React__namespace.createElement(theme.Visibility, null))))), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13956
14198
|
item: true,
|
|
13957
|
-
xs:
|
|
14199
|
+
xs: 4
|
|
13958
14200
|
}, userAddedService && /*#__PURE__*/React__namespace.createElement(material.Box, null, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
13959
14201
|
title: serviceHasActiveLayers ? 'Service has active layers. Cannot remove this service' : 'Delete Service',
|
|
13960
14202
|
"data-testid": "removeServiceTooltip"
|
|
@@ -13987,9 +14229,30 @@
|
|
|
13987
14229
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
13988
14230
|
* */
|
|
13989
14231
|
|
|
14232
|
+
var getService = function getService(services, serviceUrl) {
|
|
14233
|
+
var serviceIds = Object.keys(services);
|
|
14234
|
+
var serviceIndex = serviceIds.findIndex(function (serviceId) {
|
|
14235
|
+
return services[serviceId].serviceUrl === serviceUrl;
|
|
14236
|
+
});
|
|
14237
|
+
if (serviceIndex < 0) return null;
|
|
14238
|
+
return services[serviceIds[serviceIndex]];
|
|
14239
|
+
};
|
|
14240
|
+
|
|
14241
|
+
var getServiceSuccesUpdateMessage = function getServiceSuccesUpdateMessage(serviceName) {
|
|
14242
|
+
return "Service \"" + serviceName + "\" has been succesfully updated";
|
|
14243
|
+
};
|
|
14244
|
+
var getServiceFailedUpdateMessage = function getServiceFailedUpdateMessage(error) {
|
|
14245
|
+
return "Unable to update service, reason: \"" + error.message + "\"";
|
|
14246
|
+
};
|
|
14247
|
+
|
|
13990
14248
|
var ServiceOptionsDialogConnect = function ServiceOptionsDialogConnect(_a) {
|
|
13991
14249
|
var mapId = _a.mapId,
|
|
13992
14250
|
setServicePopupInfo = _a.setServicePopupInfo;
|
|
14251
|
+
|
|
14252
|
+
var _b = __read(React__namespace.useState(false), 2),
|
|
14253
|
+
isLoading = _b[0],
|
|
14254
|
+
setIsLoading = _b[1];
|
|
14255
|
+
|
|
13993
14256
|
var dispatch = reactRedux.useDispatch();
|
|
13994
14257
|
var layerSelectRemoveService = React__namespace.useCallback(function (serviceId, serviceUrl) {
|
|
13995
14258
|
dispatch(layerSelectActions.layerSelectRemoveService({
|
|
@@ -13997,17 +14260,87 @@
|
|
|
13997
14260
|
serviceUrl: serviceUrl
|
|
13998
14261
|
}));
|
|
13999
14262
|
}, [dispatch]);
|
|
14263
|
+
var serviceSetLayers = React__namespace.useCallback(function (payload) {
|
|
14264
|
+
dispatch(serviceActions.serviceSetLayers(__assign(__assign({}, payload), {
|
|
14265
|
+
isUpdating: true
|
|
14266
|
+
})));
|
|
14267
|
+
}, [dispatch]);
|
|
14268
|
+
var showSnackbar = React__namespace.useCallback(function (message) {
|
|
14269
|
+
dispatch(snackbarActions.openSnackbar({
|
|
14270
|
+
message: message
|
|
14271
|
+
}));
|
|
14272
|
+
}, [dispatch]);
|
|
14000
14273
|
var services = reactRedux.useSelector(function (store) {
|
|
14001
14274
|
return getActiveServices(store);
|
|
14002
14275
|
});
|
|
14003
14276
|
var selectedLayers = reactRedux.useSelector(function (store) {
|
|
14004
14277
|
return getMapLayers(store, mapId);
|
|
14005
14278
|
});
|
|
14279
|
+
var layerSelectReloadService = React__namespace.useCallback(function (serviceUrl) {
|
|
14280
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
14281
|
+
var layersForService, service, serviceTitle, error_1;
|
|
14282
|
+
return __generator(this, function (_a) {
|
|
14283
|
+
switch (_a.label) {
|
|
14284
|
+
case 0:
|
|
14285
|
+
setIsLoading(true);
|
|
14286
|
+
_a.label = 1;
|
|
14287
|
+
|
|
14288
|
+
case 1:
|
|
14289
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
14290
|
+
|
|
14291
|
+
return [4
|
|
14292
|
+
/*yield*/
|
|
14293
|
+
, loadWMSService(serviceUrl, true)];
|
|
14294
|
+
|
|
14295
|
+
case 2:
|
|
14296
|
+
layersForService = _a.sent();
|
|
14297
|
+
service = getService(services, serviceUrl);
|
|
14298
|
+
serviceSetLayers({
|
|
14299
|
+
id: layersForService.id,
|
|
14300
|
+
name: service && service.serviceName || layersForService.name,
|
|
14301
|
+
serviceUrl: serviceUrl,
|
|
14302
|
+
"abstract": service && service["abstract"] || layersForService["abstract"],
|
|
14303
|
+
layers: layersForService.layers,
|
|
14304
|
+
scope: service && service.scope || 'user',
|
|
14305
|
+
isUpdating: true
|
|
14306
|
+
});
|
|
14307
|
+
webmap.clearImageCache();
|
|
14308
|
+
serviceTitle = service && service.serviceName || layersForService.name;
|
|
14309
|
+
showSnackbar(getServiceSuccesUpdateMessage(serviceTitle));
|
|
14310
|
+
return [3
|
|
14311
|
+
/*break*/
|
|
14312
|
+
, 5];
|
|
14313
|
+
|
|
14314
|
+
case 3:
|
|
14315
|
+
error_1 = _a.sent(); // TODO: Maarten Plieger 2022-11-02: Snackbars should not be used to inform the user that something went wrong.
|
|
14316
|
+
// https://gitlab.com/opengeoweb/opengeoweb/-/issues/2819
|
|
14317
|
+
|
|
14318
|
+
showSnackbar(getServiceFailedUpdateMessage(error_1));
|
|
14319
|
+
return [3
|
|
14320
|
+
/*break*/
|
|
14321
|
+
, 5];
|
|
14322
|
+
|
|
14323
|
+
case 4:
|
|
14324
|
+
setIsLoading(false);
|
|
14325
|
+
return [7
|
|
14326
|
+
/*endfinally*/
|
|
14327
|
+
];
|
|
14328
|
+
|
|
14329
|
+
case 5:
|
|
14330
|
+
return [2
|
|
14331
|
+
/*return*/
|
|
14332
|
+
];
|
|
14333
|
+
}
|
|
14334
|
+
});
|
|
14335
|
+
});
|
|
14336
|
+
}, [serviceSetLayers, services, showSnackbar]);
|
|
14006
14337
|
return /*#__PURE__*/React__namespace.createElement(ServiceOptionsDialog, {
|
|
14007
14338
|
selectedLayers: selectedLayers,
|
|
14008
14339
|
services: services,
|
|
14009
14340
|
layerSelectRemoveService: layerSelectRemoveService,
|
|
14010
|
-
|
|
14341
|
+
layerSelectReloadService: layerSelectReloadService,
|
|
14342
|
+
setServicePopupInfo: setServicePopupInfo,
|
|
14343
|
+
isLoading: isLoading
|
|
14011
14344
|
});
|
|
14012
14345
|
};
|
|
14013
14346
|
|
|
@@ -16077,9 +16410,7 @@
|
|
|
16077
16410
|
|
|
16078
16411
|
var NowButton = function NowButton(_a) {
|
|
16079
16412
|
var _b = _a.onSetNow,
|
|
16080
|
-
onSetNow = _b === void 0 ? function () {
|
|
16081
|
-
return null;
|
|
16082
|
-
} : _b,
|
|
16413
|
+
onSetNow = _b === void 0 ? function () {} : _b,
|
|
16083
16414
|
_c = _a.disabled,
|
|
16084
16415
|
disabled = _c === void 0 ? false : _c;
|
|
16085
16416
|
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
@@ -16112,91 +16443,124 @@
|
|
|
16112
16443
|
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
16113
16444
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
16114
16445
|
* */
|
|
16115
|
-
var OptionsPopOver = material.styled(material.Popover)(function (_a) {
|
|
16116
|
-
var theme = _a.theme;
|
|
16117
|
-
return {
|
|
16118
|
-
'& .MuiPaper-root': {
|
|
16119
|
-
padding: '5px',
|
|
16120
|
-
overflow: 'visible',
|
|
16121
|
-
backgroundColor: theme.palette.geowebColors.background.surface
|
|
16122
|
-
}
|
|
16123
|
-
};
|
|
16124
|
-
});
|
|
16125
16446
|
|
|
16126
16447
|
var OptionsMenuButton = function OptionsMenuButton(_a) {
|
|
16127
16448
|
var nowBtn = _a.nowBtn,
|
|
16128
16449
|
autoUpdateBtn = _a.autoUpdateBtn,
|
|
16129
16450
|
speedBtn = _a.speedBtn,
|
|
16130
16451
|
timeStepBtn = _a.timeStepBtn,
|
|
16131
|
-
timeScaleBtn = _a.timeScaleBtn
|
|
16132
|
-
|
|
16133
|
-
|
|
16134
|
-
anchorEl = _b[0],
|
|
16135
|
-
setAnchorEl = _b[1];
|
|
16452
|
+
timeScaleBtn = _a.timeScaleBtn,
|
|
16453
|
+
_b = _a.isOpenByDefault,
|
|
16454
|
+
isOpenByDefault = _b === void 0 ? false : _b;
|
|
16136
16455
|
|
|
16137
|
-
var
|
|
16138
|
-
|
|
16139
|
-
|
|
16456
|
+
var _c = __read(React.useState(null), 2),
|
|
16457
|
+
anchorEl = _c[0],
|
|
16458
|
+
setAnchorEl = _c[1];
|
|
16140
16459
|
|
|
16141
|
-
var
|
|
16142
|
-
|
|
16143
|
-
|
|
16460
|
+
var _d = __read(React.useState(false), 2),
|
|
16461
|
+
open = _d[0],
|
|
16462
|
+
setOpen = _d[1];
|
|
16144
16463
|
|
|
16145
|
-
|
|
16146
|
-
|
|
16147
|
-
|
|
16464
|
+
React.useEffect(function () {
|
|
16465
|
+
if (anchorEl && isOpenByDefault) {
|
|
16466
|
+
setOpen(true);
|
|
16467
|
+
}
|
|
16468
|
+
}, [anchorEl, isOpenByDefault]);
|
|
16469
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
|
|
16148
16470
|
title: "Animation options",
|
|
16149
16471
|
placement: "bottom"
|
|
16150
|
-
}, /*#__PURE__*/
|
|
16151
|
-
|
|
16472
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
16473
|
+
ref: function ref(_ref) {
|
|
16474
|
+
setAnchorEl(_ref);
|
|
16475
|
+
}
|
|
16476
|
+
}, /*#__PURE__*/React__default["default"].createElement(shared.ToolButton, {
|
|
16477
|
+
onClick: function onClick() {
|
|
16478
|
+
setOpen(!open);
|
|
16479
|
+
},
|
|
16152
16480
|
"data-testid": "optionsMenuButton",
|
|
16153
16481
|
active: open,
|
|
16154
16482
|
"aria-label": "animation options"
|
|
16155
|
-
}, /*#__PURE__*/
|
|
16156
|
-
|
|
16483
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.Options, null)))), /*#__PURE__*/React__default["default"].createElement(material.Popper, {
|
|
16484
|
+
sx: {
|
|
16485
|
+
zIndex: 3
|
|
16486
|
+
},
|
|
16487
|
+
placement: "top-start",
|
|
16157
16488
|
open: open,
|
|
16158
16489
|
"data-testid": "optionsMenuPopOver",
|
|
16159
|
-
anchorEl: anchorEl
|
|
16160
|
-
|
|
16161
|
-
|
|
16162
|
-
|
|
16163
|
-
|
|
16490
|
+
anchorEl: anchorEl
|
|
16491
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Paper, {
|
|
16492
|
+
elevation: 3
|
|
16493
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
16494
|
+
sx: {
|
|
16495
|
+
padding: '0px 10px 10px'
|
|
16164
16496
|
},
|
|
16165
|
-
transformOrigin: {
|
|
16166
|
-
vertical: 'bottom',
|
|
16167
|
-
horizontal: 'left'
|
|
16168
|
-
}
|
|
16169
|
-
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
16170
16497
|
container: true,
|
|
16171
16498
|
spacing: 1
|
|
16172
|
-
}, /*#__PURE__*/
|
|
16499
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
16173
16500
|
item: true,
|
|
16174
16501
|
xs: "auto"
|
|
16175
|
-
}, nowBtn || /*#__PURE__*/
|
|
16502
|
+
}, nowBtn || /*#__PURE__*/React__default["default"].createElement(NowButton, null)), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
16176
16503
|
item: true,
|
|
16177
16504
|
xs: "auto"
|
|
16178
|
-
}, timeScaleBtn || /*#__PURE__*/
|
|
16505
|
+
}, timeScaleBtn || /*#__PURE__*/React__default["default"].createElement(TimeScaleButton, {
|
|
16179
16506
|
centerTime: 0,
|
|
16180
16507
|
onChangeTimeSliderScale: function onChangeTimeSliderScale() {},
|
|
16181
16508
|
secondsPerPx: 0,
|
|
16182
16509
|
selectedTime: 0,
|
|
16183
16510
|
timeSliderScale: 0
|
|
16184
|
-
})), /*#__PURE__*/
|
|
16511
|
+
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
16185
16512
|
item: true,
|
|
16186
16513
|
xs: "auto"
|
|
16187
|
-
}, timeStepBtn || /*#__PURE__*/
|
|
16514
|
+
}, timeStepBtn || /*#__PURE__*/React__default["default"].createElement(TimeStepButton, {
|
|
16188
16515
|
timeStep: 0,
|
|
16189
16516
|
onChangeTimeStep: function onChangeTimeStep() {}
|
|
16190
|
-
})), /*#__PURE__*/
|
|
16517
|
+
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
16191
16518
|
item: true,
|
|
16192
16519
|
xs: "auto"
|
|
16193
|
-
}, speedBtn || /*#__PURE__*/
|
|
16520
|
+
}, speedBtn || /*#__PURE__*/React__default["default"].createElement(SpeedButton, {
|
|
16194
16521
|
animationDelay: defaultAnimationDelayAtStart,
|
|
16195
16522
|
setMapAnimationDelay: function setMapAnimationDelay() {}
|
|
16196
|
-
})), /*#__PURE__*/
|
|
16523
|
+
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
16197
16524
|
item: true,
|
|
16198
16525
|
xs: "auto"
|
|
16199
|
-
}, autoUpdateBtn || /*#__PURE__*/
|
|
16526
|
+
}, autoUpdateBtn || /*#__PURE__*/React__default["default"].createElement(AutoUpdateButton, null))))));
|
|
16527
|
+
};
|
|
16528
|
+
|
|
16529
|
+
/* *
|
|
16530
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
16531
|
+
* you may not use this file except in compliance with the License.
|
|
16532
|
+
* You may obtain a copy of the License at
|
|
16533
|
+
*
|
|
16534
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16535
|
+
*
|
|
16536
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16537
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16538
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16539
|
+
* See the License for the specific language governing permissions and
|
|
16540
|
+
* limitations under the License.
|
|
16541
|
+
*
|
|
16542
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
16543
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
16544
|
+
* */
|
|
16545
|
+
var forwardTooltipTitle = 'Forward';
|
|
16546
|
+
var backwardTooltipTitle = 'Backward';
|
|
16547
|
+
|
|
16548
|
+
var BackwardForwardStepButton = function BackwardForwardStepButton(_a) {
|
|
16549
|
+
var isForwardStep = _a.isForwardStep,
|
|
16550
|
+
isDisabled = _a.isDisabled,
|
|
16551
|
+
_b = _a.onClickBFButton,
|
|
16552
|
+
onClickBFButton = _b === void 0 ? function () {} : _b;
|
|
16553
|
+
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
16554
|
+
title: isForwardStep ? forwardTooltipTitle : backwardTooltipTitle
|
|
16555
|
+
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
16556
|
+
disabled: isDisabled,
|
|
16557
|
+
"aria-label": isForwardStep ? 'forward' : 'backward',
|
|
16558
|
+
onClick: onClickBFButton
|
|
16559
|
+
}, isForwardStep ? /*#__PURE__*/React__namespace.createElement(theme.StepForward, {
|
|
16560
|
+
"data-testid": "step-forward-svg-path"
|
|
16561
|
+
}) : /*#__PURE__*/React__namespace.createElement(theme.StepBackward, {
|
|
16562
|
+
"data-testid": "step-backward-svg-path"
|
|
16563
|
+
}))));
|
|
16200
16564
|
};
|
|
16201
16565
|
|
|
16202
16566
|
/* *
|
|
@@ -16218,16 +16582,28 @@
|
|
|
16218
16582
|
|
|
16219
16583
|
var TimeSliderButtons = function TimeSliderButtons(_a) {
|
|
16220
16584
|
var optionsMenuBtn = _a.optionsMenuBtn,
|
|
16221
|
-
playBtn = _a.playBtn
|
|
16585
|
+
playBtn = _a.playBtn,
|
|
16586
|
+
backwardBtn = _a.backwardBtn,
|
|
16587
|
+
forwardBtn = _a.forwardBtn;
|
|
16222
16588
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
16223
16589
|
"data-testid": "timeSliderButtons"
|
|
16224
16590
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
16225
16591
|
container: true,
|
|
16226
|
-
spacing:
|
|
16592
|
+
spacing: 0.5,
|
|
16593
|
+
alignItems: "center",
|
|
16594
|
+
justifyContent: "center"
|
|
16227
16595
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
16228
16596
|
item: true
|
|
16229
16597
|
}, optionsMenuBtn || /*#__PURE__*/React__namespace.createElement(OptionsMenuButton, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
16230
16598
|
item: true
|
|
16599
|
+
}, backwardBtn || /*#__PURE__*/React__namespace.createElement(BackwardForwardStepButton, {
|
|
16600
|
+
isForwardStep: false
|
|
16601
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
16602
|
+
item: true
|
|
16603
|
+
}, forwardBtn || /*#__PURE__*/React__namespace.createElement(BackwardForwardStepButton, {
|
|
16604
|
+
isForwardStep: true
|
|
16605
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
16606
|
+
item: true
|
|
16231
16607
|
}, playBtn || /*#__PURE__*/React__namespace.createElement(PlayButton, null))));
|
|
16232
16608
|
};
|
|
16233
16609
|
|
|
@@ -16798,13 +17174,30 @@
|
|
|
16798
17174
|
}
|
|
16799
17175
|
};
|
|
16800
17176
|
|
|
16801
|
-
var drawBackground = function drawBackground(context, theme, visibleTimeStart, visibleTimeEnd, animationStartPx, animationEndPx, canvasWidth, height, scale) {
|
|
17177
|
+
var drawBackground = function drawBackground(context, theme, visibleTimeStart, visibleTimeEnd, animationStartPx, animationEndPx, canvasWidth, height, scale, dataStartPx, dataEndPx, currentTimePx) {
|
|
16802
17178
|
var ctx = context;
|
|
16803
17179
|
var _a = theme.palette.geowebColors.timeSlider,
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
17180
|
+
timelineNightTime = _a.timelineNightTime,
|
|
17181
|
+
ledgendObservedBackground = _a.ledgendObservedBackground,
|
|
17182
|
+
legendForecastBackground = _a.legendForecastBackground,
|
|
17183
|
+
legendNoDataBackground = _a.legendNoDataBackground; // top spacing
|
|
17184
|
+
|
|
17185
|
+
var y = 0;
|
|
17186
|
+
ctx.fillStyle = legendNoDataBackground.rgba;
|
|
17187
|
+
ctx.fillRect(0, y, canvasWidth, height); // observed data
|
|
17188
|
+
|
|
17189
|
+
if (dataStartPx < currentTimePx) {
|
|
17190
|
+
ctx.fillStyle = ledgendObservedBackground.fill;
|
|
17191
|
+
ctx.fillRect(Math.max(dataStartPx, 0), y, Math.min(currentTimePx, dataEndPx) - Math.max(dataStartPx, 0), height);
|
|
17192
|
+
} // forecast data
|
|
17193
|
+
|
|
17194
|
+
|
|
17195
|
+
if (dataEndPx > currentTimePx) {
|
|
17196
|
+
ctx.fillStyle = legendForecastBackground.fill;
|
|
17197
|
+
ctx.fillRect(Math.max(currentTimePx, dataStartPx), y, Math.min(canvasWidth, dataEndPx) - Math.max(currentTimePx, dataStartPx), height);
|
|
17198
|
+
} // hovered area
|
|
17199
|
+
|
|
17200
|
+
|
|
16808
17201
|
ctx.fillStyle = theme.palette.geowebColors.timeSlider.timelineSelectionBackground.rgba;
|
|
16809
17202
|
ctx.fillRect(animationStartPx, 0, Math.max(animationEndPx - animationStartPx, 0), height);
|
|
16810
17203
|
var colorChangeUnit = getColorChangeTimestepUnit(scale);
|
|
@@ -16900,7 +17293,7 @@
|
|
|
16900
17293
|
drawLeftSideDateText(ctx, theme, dateText, height);
|
|
16901
17294
|
};
|
|
16902
17295
|
|
|
16903
|
-
var renderTimeSliderLegend = function renderTimeSliderLegend(context, theme, canvasWidth, height, centerTime, secondsPerPx, dataScaleToSecondsPerPx, selectedTimeUnix, scale, currentTimeUnix, animationStartTime, animationEndTime) {
|
|
17296
|
+
var renderTimeSliderLegend = function renderTimeSliderLegend(context, theme, canvasWidth, height, centerTime, secondsPerPx, dataScaleToSecondsPerPx, selectedTimeUnix, scale, currentTimeUnix, animationStartTime, animationEndTime, dataStartTime, dataEndTime) {
|
|
16904
17297
|
var ctx = context;
|
|
16905
17298
|
|
|
16906
17299
|
var _a = __read([0, canvasWidth].map(function (px) {
|
|
@@ -16909,13 +17302,17 @@
|
|
|
16909
17302
|
visibleTimeStart = _a[0],
|
|
16910
17303
|
visibleTimeEnd = _a[1];
|
|
16911
17304
|
|
|
16912
|
-
var _b = __read([animationStartTime, animationEndTime].map(function (time) {
|
|
17305
|
+
var _b = __read([animationStartTime, animationEndTime, dataStartTime, dataEndTime, currentTimeUnix].map(function (time) {
|
|
16913
17306
|
return timestampToPixel(time, centerTime, canvasWidth, secondsPerPx);
|
|
16914
|
-
}),
|
|
17307
|
+
}), 5),
|
|
16915
17308
|
animationStartPx = _b[0],
|
|
16916
|
-
animationEndPx = _b[1]
|
|
17309
|
+
animationEndPx = _b[1],
|
|
17310
|
+
dataStartPx = _b[2],
|
|
17311
|
+
dataEndPx = _b[3],
|
|
17312
|
+
currentTimePx = _b[4];
|
|
16917
17313
|
|
|
16918
|
-
|
|
17314
|
+
ctx.clearRect(0, 0, canvasWidth, height);
|
|
17315
|
+
drawBackground(ctx, theme, visibleTimeStart, visibleTimeEnd, animationStartPx, animationEndPx, canvasWidth, height, scale, dataStartPx, dataEndPx, currentTimePx);
|
|
16919
17316
|
drawTimeScale(ctx, theme, visibleTimeStart, visibleTimeEnd, canvasWidth, height, scale, dataScaleToSecondsPerPx);
|
|
16920
17317
|
drawNeedle(ctx, theme, canvasWidth, height, visibleTimeStart, visibleTimeEnd, selectedTimeUnix);
|
|
16921
17318
|
drawCurrentTime(ctx, theme, canvasWidth, height, visibleTimeStart, visibleTimeEnd, currentTimeUnix);
|
|
@@ -17039,7 +17436,9 @@
|
|
|
17039
17436
|
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
17040
17437
|
"data-testid": "timeSliderLegend",
|
|
17041
17438
|
sx: {
|
|
17042
|
-
height: TIME_SLIDER_LEGEND_HEIGHT + "px"
|
|
17439
|
+
height: TIME_SLIDER_LEGEND_HEIGHT + "px",
|
|
17440
|
+
borderRadius: '4.5px',
|
|
17441
|
+
overflow: 'hidden'
|
|
17043
17442
|
}
|
|
17044
17443
|
}, /*#__PURE__*/React__namespace.createElement(CanvasComponent, {
|
|
17045
17444
|
ref: node,
|
|
@@ -17091,12 +17490,12 @@
|
|
|
17091
17490
|
}
|
|
17092
17491
|
},
|
|
17093
17492
|
onRenderCanvas: function onRenderCanvas(ctx, width, height) {
|
|
17094
|
-
renderTimeSliderLegend(ctx, theme, width, height, centerTime, secondsPerPx, dataScaleToSecondsPerPx, selectedTime, scale, currentTime, localAnimationStartTime, localAnimationEndTime);
|
|
17493
|
+
renderTimeSliderLegend(ctx, theme, width, height, centerTime, secondsPerPx, dataScaleToSecondsPerPx, selectedTime, scale, currentTime, localAnimationStartTime, localAnimationEndTime, dataStartTime, dataEndTime);
|
|
17095
17494
|
}
|
|
17096
17495
|
}));
|
|
17097
17496
|
};
|
|
17098
17497
|
|
|
17099
|
-
var TIME_SLIDER_LEGEND_HEIGHT =
|
|
17498
|
+
var TIME_SLIDER_LEGEND_HEIGHT = 24;
|
|
17100
17499
|
|
|
17101
17500
|
/* eslint-disable no-param-reassign */
|
|
17102
17501
|
|
|
@@ -17303,21 +17702,6 @@
|
|
|
17303
17702
|
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
17304
17703
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
17305
17704
|
* */
|
|
17306
|
-
|
|
17307
|
-
var setPreviousTimeStep = function setPreviousTimeStep(timeStep, curTime, dataStartTime, onSetNewDate) {
|
|
17308
|
-
var prevTimeStep = moment__default["default"].utc(curTime).subtract(timeStep, 'm').toISOString();
|
|
17309
|
-
if (!prevTimeStep) return;
|
|
17310
|
-
if (moment__default["default"].utc(prevTimeStep) < moment__default["default"].utc(dataStartTime * 1000)) return;
|
|
17311
|
-
onsetNewDateDebounced(prevTimeStep, onSetNewDate);
|
|
17312
|
-
};
|
|
17313
|
-
|
|
17314
|
-
var setNextTimeStep = function setNextTimeStep(timeStep, curTime, dataEndTime, onSetNewDate) {
|
|
17315
|
-
var nextTimeStep = moment__default["default"].utc(curTime).add(timeStep, 'm').toISOString();
|
|
17316
|
-
if (!nextTimeStep) return;
|
|
17317
|
-
if (moment__default["default"].utc(nextTimeStep) > moment__default["default"].utc(dataEndTime * 1000)) return;
|
|
17318
|
-
onsetNewDateDebounced(nextTimeStep, onSetNewDate);
|
|
17319
|
-
};
|
|
17320
|
-
|
|
17321
17705
|
var DRAG_AREA_WIDTH = 10;
|
|
17322
17706
|
var DRAG_HANDLER_AREA_WIDTH = 30;
|
|
17323
17707
|
|
|
@@ -17622,11 +18006,42 @@
|
|
|
17622
18006
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
17623
18007
|
* */
|
|
17624
18008
|
|
|
17625
|
-
var
|
|
17626
|
-
|
|
17627
|
-
|
|
17628
|
-
|
|
17629
|
-
|
|
18009
|
+
var HideSliderButton = function HideSliderButton(_a) {
|
|
18010
|
+
var isVisible = _a.isVisible,
|
|
18011
|
+
toggleTimeSliderIsVisible = _a.toggleTimeSliderIsVisible;
|
|
18012
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
|
|
18013
|
+
title: isVisible ? 'Hide timeslider' : 'Show timeslider',
|
|
18014
|
+
"data-testid": "autoUpdateButtonTooltip"
|
|
18015
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", null, /*#__PURE__*/React__default["default"].createElement(shared.ToolButton, {
|
|
18016
|
+
onClick: function onClick() {
|
|
18017
|
+
toggleTimeSliderIsVisible(!isVisible);
|
|
18018
|
+
},
|
|
18019
|
+
"data-testid": "hideTimeSliderButton"
|
|
18020
|
+
}, isVisible ? /*#__PURE__*/React__default["default"].createElement(theme.ChevronDown, null) : /*#__PURE__*/React__default["default"].createElement(theme.ChevronUp, null))));
|
|
18021
|
+
};
|
|
18022
|
+
|
|
18023
|
+
/* *
|
|
18024
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18025
|
+
* you may not use this file except in compliance with the License.
|
|
18026
|
+
* You may obtain a copy of the License at
|
|
18027
|
+
*
|
|
18028
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
18029
|
+
*
|
|
18030
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18031
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18032
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18033
|
+
* See the License for the specific language governing permissions and
|
|
18034
|
+
* limitations under the License.
|
|
18035
|
+
*
|
|
18036
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
18037
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
18038
|
+
* */
|
|
18039
|
+
|
|
18040
|
+
var useTimeSliderKeyBoardControl = function useTimeSliderKeyBoardControl(mapIsActive, isVisible, onToggleTimeSlider) {
|
|
18041
|
+
React__namespace.useEffect(function () {
|
|
18042
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
18043
|
+
var target = event.target;
|
|
18044
|
+
|
|
17630
18045
|
if (target.tagName !== 'INPUT' && target.tagName !== 'TEXTAREA' && event.key === 't' && mapIsActive) {
|
|
17631
18046
|
onToggleTimeSlider(!isVisible);
|
|
17632
18047
|
}
|
|
@@ -17657,14 +18072,22 @@
|
|
|
17657
18072
|
_d = _a.onToggleTimeSlider,
|
|
17658
18073
|
onToggleTimeSlider = _d === void 0 ? function () {} : _d;
|
|
17659
18074
|
useTimeSliderKeyBoardControl(mapIsActive, isVisible, onToggleTimeSlider);
|
|
18075
|
+
var visibilityState = isVisible ? 'visible' : 'hidden';
|
|
17660
18076
|
return isVisible ? /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
18077
|
+
style: {
|
|
18078
|
+
visibility: visibilityState
|
|
18079
|
+
},
|
|
17661
18080
|
container: true,
|
|
17662
18081
|
sx: {
|
|
17663
18082
|
display: 'grid',
|
|
17664
|
-
gridTemplateColumns: 'minmax(100px, 210px) minmax(66%, 1fr)',
|
|
17665
|
-
gridTemplateRows:
|
|
18083
|
+
gridTemplateColumns: 'minmax(100px, 210px) minmax(66%, 1fr) minmax(40px, 40px)',
|
|
18084
|
+
gridTemplateRows: 24,
|
|
18085
|
+
paddingBottom: 1,
|
|
18086
|
+
alignItems: 'center',
|
|
18087
|
+
justifyContent: 'center'
|
|
17666
18088
|
},
|
|
17667
|
-
"data-testid": "timeSlider"
|
|
18089
|
+
"data-testid": "timeSlider",
|
|
18090
|
+
spacing: 1
|
|
17668
18091
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
17669
18092
|
item: true
|
|
17670
18093
|
}), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
@@ -17673,19 +18096,30 @@
|
|
|
17673
18096
|
selectedTime: defaultProps.selectedTime,
|
|
17674
18097
|
mapIsActive: mapIsActive
|
|
17675
18098
|
})), ' '), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
17676
|
-
item: true
|
|
17677
|
-
|
|
17678
|
-
|
|
17679
|
-
},
|
|
17680
|
-
container: true,
|
|
17681
|
-
alignItems: "center",
|
|
17682
|
-
justifyContent: "center"
|
|
18099
|
+
item: true
|
|
18100
|
+
}), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
18101
|
+
item: true
|
|
17683
18102
|
}, buttons || /*#__PURE__*/React__namespace.createElement(TimeSliderButtons, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
17684
18103
|
item: true
|
|
17685
18104
|
}, legend || /*#__PURE__*/React__namespace.createElement(TimeSliderLegend, __assign({}, defaultProps, {
|
|
17686
18105
|
selectedTime: defaultProps.selectedTime.unix(),
|
|
17687
18106
|
mapIsActive: mapIsActive
|
|
17688
|
-
})), ' ')
|
|
18107
|
+
})), ' '), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
18108
|
+
item: true
|
|
18109
|
+
}, /*#__PURE__*/React__namespace.createElement(HideSliderButton, {
|
|
18110
|
+
toggleTimeSliderIsVisible: onToggleTimeSlider,
|
|
18111
|
+
isVisible: isVisible
|
|
18112
|
+
}))) : /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
18113
|
+
sx: {
|
|
18114
|
+
paddingRight: 1
|
|
18115
|
+
},
|
|
18116
|
+
container: true,
|
|
18117
|
+
alignItems: "center",
|
|
18118
|
+
justifyContent: "flex-end"
|
|
18119
|
+
}, /*#__PURE__*/React__namespace.createElement(HideSliderButton, {
|
|
18120
|
+
toggleTimeSliderIsVisible: onToggleTimeSlider,
|
|
18121
|
+
isVisible: isVisible
|
|
18122
|
+
}));
|
|
17689
18123
|
};
|
|
17690
18124
|
|
|
17691
18125
|
/* *
|
|
@@ -18008,6 +18442,79 @@
|
|
|
18008
18442
|
});
|
|
18009
18443
|
};
|
|
18010
18444
|
|
|
18445
|
+
/* *
|
|
18446
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18447
|
+
* you may not use this file except in compliance with the License.
|
|
18448
|
+
* You may obtain a copy of the License at
|
|
18449
|
+
*
|
|
18450
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
18451
|
+
*
|
|
18452
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18453
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18454
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18455
|
+
* See the License for the specific language governing permissions and
|
|
18456
|
+
* limitations under the License.
|
|
18457
|
+
*
|
|
18458
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
18459
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
18460
|
+
* */
|
|
18461
|
+
|
|
18462
|
+
var BackwardForwardStepButtonConnect = function BackwardForwardStepButtonConnect(_a) {
|
|
18463
|
+
var isForwardStep = _a.isForwardStep,
|
|
18464
|
+
mapId = _a.mapId;
|
|
18465
|
+
var timeStep = reactRedux.useSelector(function (store) {
|
|
18466
|
+
return getMapTimeStep(store, mapId);
|
|
18467
|
+
});
|
|
18468
|
+
var dispatch = reactRedux.useDispatch();
|
|
18469
|
+
|
|
18470
|
+
var setTime = function setTime(newDate) {
|
|
18471
|
+
dispatch(genericActions.setTime({
|
|
18472
|
+
origin: '',
|
|
18473
|
+
sourceId: mapId,
|
|
18474
|
+
value: handleMomentISOString(newDate)
|
|
18475
|
+
}));
|
|
18476
|
+
};
|
|
18477
|
+
|
|
18478
|
+
var stopAnimation = function stopAnimation() {
|
|
18479
|
+
dispatch(mapActions$1.mapStopAnimation({
|
|
18480
|
+
mapId: mapId,
|
|
18481
|
+
origin: MapActionOrigin.map
|
|
18482
|
+
}));
|
|
18483
|
+
};
|
|
18484
|
+
|
|
18485
|
+
var isAnimating$1 = reactRedux.useSelector(function (store) {
|
|
18486
|
+
return isAnimating(store, mapId);
|
|
18487
|
+
});
|
|
18488
|
+
var timedim = reactRedux.useSelector(function (store) {
|
|
18489
|
+
return getMapDimension(store, mapId, 'time');
|
|
18490
|
+
});
|
|
18491
|
+
var selectedTime = getSelectedTime(timedim);
|
|
18492
|
+
var curTime = moment__default["default"].unix(selectedTime).toISOString();
|
|
18493
|
+
var layers = reactRedux.useSelector(function (store) {
|
|
18494
|
+
return getMapLayers(store, mapId);
|
|
18495
|
+
});
|
|
18496
|
+
|
|
18497
|
+
var _b = __read(getDataLimitsFromLayers(layers), 2),
|
|
18498
|
+
dataStartTime = _b[0],
|
|
18499
|
+
dataEndTime = _b[1];
|
|
18500
|
+
|
|
18501
|
+
var onClickBF = function onClickBF() {
|
|
18502
|
+
if (isAnimating$1) {
|
|
18503
|
+
stopAnimation();
|
|
18504
|
+
}
|
|
18505
|
+
|
|
18506
|
+
isForwardStep ? setNextTimeStep(timeStep, curTime, dataEndTime, setTime) : setPreviousTimeStep(timeStep, curTime, dataStartTime, setTime);
|
|
18507
|
+
};
|
|
18508
|
+
|
|
18509
|
+
return /*#__PURE__*/React__default["default"].createElement(BackwardForwardStepButton, {
|
|
18510
|
+
isDisabled: false,
|
|
18511
|
+
isForwardStep: isForwardStep,
|
|
18512
|
+
onClickBFButton: function onClickBFButton() {
|
|
18513
|
+
onClickBF();
|
|
18514
|
+
}
|
|
18515
|
+
});
|
|
18516
|
+
};
|
|
18517
|
+
|
|
18011
18518
|
/* *
|
|
18012
18519
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18013
18520
|
* you may not use this file except in compliance with the License.
|
|
@@ -18043,6 +18550,14 @@
|
|
|
18043
18550
|
}),
|
|
18044
18551
|
playBtn: /*#__PURE__*/React__namespace.createElement(PlayButtonConnect, {
|
|
18045
18552
|
mapId: mapId
|
|
18553
|
+
}),
|
|
18554
|
+
backwardBtn: /*#__PURE__*/React__namespace.createElement(BackwardForwardStepButtonConnect, {
|
|
18555
|
+
mapId: mapId,
|
|
18556
|
+
isForwardStep: false
|
|
18557
|
+
}),
|
|
18558
|
+
forwardBtn: /*#__PURE__*/React__namespace.createElement(BackwardForwardStepButtonConnect, {
|
|
18559
|
+
mapId: mapId,
|
|
18560
|
+
isForwardStep: true
|
|
18046
18561
|
})
|
|
18047
18562
|
});
|
|
18048
18563
|
};
|
|
@@ -18082,8 +18597,6 @@
|
|
|
18082
18597
|
}, {
|
|
18083
18598
|
stopMapAnimation: mapActions$1.mapStopAnimation,
|
|
18084
18599
|
setTime: genericActions.setTime,
|
|
18085
|
-
syncGroupAddSource: genericActions.syncGroupAddSource,
|
|
18086
|
-
syncGroupRemoveSource: genericActions.syncGroupRemoveSource,
|
|
18087
18600
|
mapSetTimeSliderCenterTime: mapActions$1.setTimeSliderCenterTime,
|
|
18088
18601
|
mapSetTimeSliderSecondsPerPx: mapActions$1.setTimeSliderSecondsPerPx
|
|
18089
18602
|
});
|
|
@@ -18105,8 +18618,6 @@
|
|
|
18105
18618
|
activeWindowId = _a.activeWindowId,
|
|
18106
18619
|
stopMapAnimation = _a.stopMapAnimation,
|
|
18107
18620
|
setTime = _a.setTime,
|
|
18108
|
-
syncGroupAddSource = _a.syncGroupAddSource,
|
|
18109
|
-
syncGroupRemoveSource = _a.syncGroupRemoveSource,
|
|
18110
18621
|
mapSetTimeSliderCenterTime = _a.mapSetTimeSliderCenterTime,
|
|
18111
18622
|
mapSetTimeSliderSecondsPerPx = _a.mapSetTimeSliderSecondsPerPx;
|
|
18112
18623
|
var selectedTime = getTimeBounds(dimensions).selectedTime;
|
|
@@ -18117,17 +18628,6 @@
|
|
|
18117
18628
|
dataEndTime = _b[1];
|
|
18118
18629
|
|
|
18119
18630
|
var mapIsActive = mapId === activeWindowId;
|
|
18120
|
-
React__namespace.useEffect(function () {
|
|
18121
|
-
syncGroupAddSource({
|
|
18122
|
-
id: sourceId,
|
|
18123
|
-
type: [SYNCGROUPS_TYPE_SETTIME]
|
|
18124
|
-
});
|
|
18125
|
-
return function () {
|
|
18126
|
-
syncGroupRemoveSource({
|
|
18127
|
-
id: sourceId
|
|
18128
|
-
});
|
|
18129
|
-
};
|
|
18130
|
-
}, [sourceId, syncGroupAddSource, syncGroupRemoveSource]);
|
|
18131
18631
|
return /*#__PURE__*/React__namespace.createElement(TimeSliderLegend, {
|
|
18132
18632
|
centerTime: centerTime,
|
|
18133
18633
|
secondsPerPx: secondsPerPx,
|
|
@@ -18221,8 +18721,6 @@
|
|
|
18221
18721
|
setAnimationEndTime: mapActions$1.setAnimationEndTime,
|
|
18222
18722
|
setTime: genericActions.setTime,
|
|
18223
18723
|
stopMapAnimation: mapActions$1.mapStopAnimation,
|
|
18224
|
-
syncGroupAddSource: genericActions.syncGroupAddSource,
|
|
18225
|
-
syncGroupRemoveSource: genericActions.syncGroupRemoveSource,
|
|
18226
18724
|
mapSetTimeSliderCenterTime: mapActions$1.setTimeSliderCenterTime
|
|
18227
18725
|
});
|
|
18228
18726
|
|
|
@@ -18244,8 +18742,6 @@
|
|
|
18244
18742
|
setAnimationEndTime = _a.setAnimationEndTime,
|
|
18245
18743
|
stopMapAnimation = _a.stopMapAnimation,
|
|
18246
18744
|
setTime = _a.setTime,
|
|
18247
|
-
syncGroupAddSource = _a.syncGroupAddSource,
|
|
18248
|
-
syncGroupRemoveSource = _a.syncGroupRemoveSource,
|
|
18249
18745
|
mapSetTimeSliderCenterTime = _a.mapSetTimeSliderCenterTime;
|
|
18250
18746
|
var selectedTime = getMomentTimeBounds(dimensions).selectedTime;
|
|
18251
18747
|
var currentTime = moment__default["default"].utc().unix();
|
|
@@ -18255,17 +18751,6 @@
|
|
|
18255
18751
|
dataEndTime = _b[1];
|
|
18256
18752
|
|
|
18257
18753
|
var mapIsActive = activeWindowId === mapId;
|
|
18258
|
-
React__namespace.useEffect(function () {
|
|
18259
|
-
syncGroupAddSource({
|
|
18260
|
-
id: sourceId,
|
|
18261
|
-
type: [SYNCGROUPS_TYPE_SETTIME]
|
|
18262
|
-
});
|
|
18263
|
-
return function () {
|
|
18264
|
-
syncGroupRemoveSource({
|
|
18265
|
-
id: sourceId
|
|
18266
|
-
});
|
|
18267
|
-
};
|
|
18268
|
-
}, [sourceId, syncGroupAddSource, syncGroupRemoveSource]);
|
|
18269
18754
|
return /*#__PURE__*/React__namespace.createElement(TimeSliderRail, {
|
|
18270
18755
|
centerTime: centerTime,
|
|
18271
18756
|
secondsPerPx: secondsPerPx,
|
|
@@ -22788,6 +23273,151 @@
|
|
|
22788
23273
|
}, /*#__PURE__*/React__namespace.createElement(theme.List, null));
|
|
22789
23274
|
};
|
|
22790
23275
|
|
|
23276
|
+
/* *
|
|
23277
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
23278
|
+
* you may not use this file except in compliance with the License.
|
|
23279
|
+
* You may obtain a copy of the License at
|
|
23280
|
+
*
|
|
23281
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23282
|
+
*
|
|
23283
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
23284
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
23285
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23286
|
+
* See the License for the specific language governing permissions and
|
|
23287
|
+
* limitations under the License.
|
|
23288
|
+
*
|
|
23289
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
23290
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
23291
|
+
* */
|
|
23292
|
+
var MIN_WIDTH = 170;
|
|
23293
|
+
var MIN_HEIGHT = 32;
|
|
23294
|
+
var MIN_FONT_SIZE = 14;
|
|
23295
|
+
var FONT_SIZE_WIDTH_RATIO = MIN_FONT_SIZE / MIN_WIDTH;
|
|
23296
|
+
var TimeSliderClock = function TimeSliderClock(_a) {
|
|
23297
|
+
var time = _a.time;
|
|
23298
|
+
var nodeRef = React__namespace.useRef(null);
|
|
23299
|
+
|
|
23300
|
+
var _b = __read(React__namespace.useState({
|
|
23301
|
+
x: 0,
|
|
23302
|
+
y: 0
|
|
23303
|
+
}), 2),
|
|
23304
|
+
position = _b[0],
|
|
23305
|
+
setPosition = _b[1];
|
|
23306
|
+
|
|
23307
|
+
shared.useMakeSureContainerStaysInsideWindow(nodeRef, position, setPosition);
|
|
23308
|
+
|
|
23309
|
+
var _c = __read(React__namespace.useState({
|
|
23310
|
+
width: MIN_WIDTH,
|
|
23311
|
+
height: MIN_HEIGHT
|
|
23312
|
+
}), 2),
|
|
23313
|
+
size = _c[0],
|
|
23314
|
+
setSize = _c[1];
|
|
23315
|
+
|
|
23316
|
+
var _d = __read(React__namespace.useState(MIN_FONT_SIZE), 2),
|
|
23317
|
+
fontSize = _d[0],
|
|
23318
|
+
setFontSize = _d[1];
|
|
23319
|
+
|
|
23320
|
+
return /*#__PURE__*/React__namespace.createElement(Draggable__default["default"], {
|
|
23321
|
+
nodeRef: nodeRef,
|
|
23322
|
+
bounds: "parent",
|
|
23323
|
+
position: position,
|
|
23324
|
+
onStop: function onStop(_event, position) {
|
|
23325
|
+
setPosition(position);
|
|
23326
|
+
}
|
|
23327
|
+
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
23328
|
+
style: {
|
|
23329
|
+
position: 'absolute',
|
|
23330
|
+
zIndex: 100,
|
|
23331
|
+
top: '10px',
|
|
23332
|
+
right: '10px'
|
|
23333
|
+
},
|
|
23334
|
+
ref: nodeRef
|
|
23335
|
+
}, /*#__PURE__*/React__namespace.createElement(reResizable.Resizable, {
|
|
23336
|
+
onResizeStart: function onResizeStart(event) {
|
|
23337
|
+
event.stopPropagation();
|
|
23338
|
+
},
|
|
23339
|
+
onResize: function onResize(_event, _direction, _ref, delta) {
|
|
23340
|
+
var width = size.width + delta.width;
|
|
23341
|
+
var fontSize = FONT_SIZE_WIDTH_RATIO * width;
|
|
23342
|
+
setFontSize(fontSize);
|
|
23343
|
+
},
|
|
23344
|
+
onResizeStop: function onResizeStop(_event, _direction, _ref, delta) {
|
|
23345
|
+
var width = size.width + delta.width;
|
|
23346
|
+
var height = size.height + delta.height;
|
|
23347
|
+
setSize({
|
|
23348
|
+
width: width,
|
|
23349
|
+
height: height
|
|
23350
|
+
});
|
|
23351
|
+
},
|
|
23352
|
+
lockAspectRatio: true,
|
|
23353
|
+
minHeight: MIN_HEIGHT,
|
|
23354
|
+
minWidth: MIN_WIDTH,
|
|
23355
|
+
size: size,
|
|
23356
|
+
handleComponent: {
|
|
23357
|
+
bottomLeft: /*#__PURE__*/React__namespace.createElement(theme.Resize, {
|
|
23358
|
+
isRightAligned: true,
|
|
23359
|
+
style: {
|
|
23360
|
+
fill: '#FFFFFF'
|
|
23361
|
+
}
|
|
23362
|
+
})
|
|
23363
|
+
},
|
|
23364
|
+
enable: {
|
|
23365
|
+
top: false,
|
|
23366
|
+
right: false,
|
|
23367
|
+
bottom: false,
|
|
23368
|
+
left: false,
|
|
23369
|
+
topRight: false,
|
|
23370
|
+
bottomRight: false,
|
|
23371
|
+
bottomLeft: true,
|
|
23372
|
+
topLeft: false
|
|
23373
|
+
}
|
|
23374
|
+
}, /*#__PURE__*/React__namespace.createElement(system.Box, {
|
|
23375
|
+
display: "flex",
|
|
23376
|
+
justifyContent: "center",
|
|
23377
|
+
alignItems: "center",
|
|
23378
|
+
sx: {
|
|
23379
|
+
cursor: 'move',
|
|
23380
|
+
height: '100%',
|
|
23381
|
+
width: '100%',
|
|
23382
|
+
backgroundColor: '#051039',
|
|
23383
|
+
borderRadius: '5px'
|
|
23384
|
+
}
|
|
23385
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
23386
|
+
variant: "subtitle2",
|
|
23387
|
+
sx: {
|
|
23388
|
+
color: '#FFFFFF',
|
|
23389
|
+
fontSize: fontSize
|
|
23390
|
+
}
|
|
23391
|
+
}, moment__default["default"].utc(time).format('ddd DD MMM HH:mm z'))))));
|
|
23392
|
+
};
|
|
23393
|
+
|
|
23394
|
+
/* *
|
|
23395
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
23396
|
+
* you may not use this file except in compliance with the License.
|
|
23397
|
+
* You may obtain a copy of the License at
|
|
23398
|
+
*
|
|
23399
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23400
|
+
*
|
|
23401
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
23402
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
23403
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23404
|
+
* See the License for the specific language governing permissions and
|
|
23405
|
+
* limitations under the License.
|
|
23406
|
+
*
|
|
23407
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
23408
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
23409
|
+
* */
|
|
23410
|
+
var TimeSliderClockConnect = function TimeSliderClockConnect(_a) {
|
|
23411
|
+
var mapId = _a.mapId;
|
|
23412
|
+
var dimensions = reactRedux.useSelector(function (store) {
|
|
23413
|
+
return getMapDimensions(store, mapId);
|
|
23414
|
+
});
|
|
23415
|
+
var selectedTime = getMomentTimeBounds(dimensions).selectedTime;
|
|
23416
|
+
return /*#__PURE__*/React__default["default"].createElement(TimeSliderClock, {
|
|
23417
|
+
time: selectedTime
|
|
23418
|
+
});
|
|
23419
|
+
};
|
|
23420
|
+
|
|
22791
23421
|
/* *
|
|
22792
23422
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
22793
23423
|
* you may not use this file except in compliance with the License.
|
|
@@ -22854,7 +23484,9 @@
|
|
|
22854
23484
|
_p = _a.multiLegend,
|
|
22855
23485
|
multiLegend = _p === void 0 ? true : _p,
|
|
22856
23486
|
shouldShowLayerManager = _a.shouldShowLayerManager,
|
|
22857
|
-
|
|
23487
|
+
_q = _a.showClock,
|
|
23488
|
+
showClock = _q === void 0 ? true : _q,
|
|
23489
|
+
props = __rest(_a, ["id", "title", "layers", "shouldAutoUpdate", "shouldAnimate", "bbox", "srs", "shouldShowZoomControls", "displayMapPin", "showTimeSlider", "disableTimeSlider", "displayTimeInMap", "displayLayerManagerAndLegendButtonInMap", "displayDimensionSelectButtonInMap", "multiLegend", "shouldShowLayerManager", "showClock"]);
|
|
22858
23490
|
|
|
22859
23491
|
var dispatch = reactRedux.useDispatch();
|
|
22860
23492
|
var mapId = React__default["default"].useRef(id || generateMapId()).current;
|
|
@@ -22942,6 +23574,8 @@
|
|
|
22942
23574
|
showMapId: true,
|
|
22943
23575
|
mapId: mapId,
|
|
22944
23576
|
multiLegend: multiLegend
|
|
23577
|
+
}), showClock && /*#__PURE__*/React__default["default"].createElement(TimeSliderClockConnect, {
|
|
23578
|
+
mapId: mapId
|
|
22945
23579
|
}));
|
|
22946
23580
|
};
|
|
22947
23581
|
|
|
@@ -22981,7 +23615,9 @@
|
|
|
22981
23615
|
_c = _a.showZoomControls,
|
|
22982
23616
|
showZoomControls = _c === void 0 ? true : _c,
|
|
22983
23617
|
_d = _a.multiLegend,
|
|
22984
|
-
multiLegend = _d === void 0 ? false : _d
|
|
23618
|
+
multiLegend = _d === void 0 ? false : _d,
|
|
23619
|
+
_e = _a.showClock,
|
|
23620
|
+
showClock = _e === void 0 ? true : _e;
|
|
22985
23621
|
var dispatch = reactRedux.useDispatch();
|
|
22986
23622
|
var syncGroupAddTarget = React__default["default"].useCallback(function (payload) {
|
|
22987
23623
|
dispatch(genericActions.syncGroupAddTarget(payload));
|
|
@@ -23024,6 +23660,8 @@
|
|
|
23024
23660
|
showMapId: true,
|
|
23025
23661
|
mapId: firstMapId,
|
|
23026
23662
|
multiLegend: multiLegend
|
|
23663
|
+
}), showClock && /*#__PURE__*/React__default["default"].createElement(TimeSliderClockConnect, {
|
|
23664
|
+
mapId: firstMapId
|
|
23027
23665
|
}), maps.map(function (map, mapIndex) {
|
|
23028
23666
|
var mapId = map.id;
|
|
23029
23667
|
return /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
@@ -23043,112 +23681,12 @@
|
|
|
23043
23681
|
shouldShowZoomControls: showZoomControls && mapIndex === 0,
|
|
23044
23682
|
showTimeSlider: false,
|
|
23045
23683
|
disableTimeSlider: true,
|
|
23684
|
+
showClock: false,
|
|
23046
23685
|
multiLegend: multiLegend
|
|
23047
23686
|
}));
|
|
23048
23687
|
}));
|
|
23049
23688
|
};
|
|
23050
23689
|
|
|
23051
|
-
/* *
|
|
23052
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
23053
|
-
* you may not use this file except in compliance with the License.
|
|
23054
|
-
* You may obtain a copy of the License at
|
|
23055
|
-
*
|
|
23056
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23057
|
-
*
|
|
23058
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
23059
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
23060
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23061
|
-
* See the License for the specific language governing permissions and
|
|
23062
|
-
* limitations under the License.
|
|
23063
|
-
*
|
|
23064
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
23065
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
23066
|
-
* */
|
|
23067
|
-
|
|
23068
|
-
var useGetReferenceTimes = function useGetReferenceTimes(inputLayer) {
|
|
23069
|
-
var _a = __read(React__namespace.useState([]), 2),
|
|
23070
|
-
referenceTimes = _a[0],
|
|
23071
|
-
setReferenceTimes = _a[1];
|
|
23072
|
-
|
|
23073
|
-
React__namespace.useEffect(function () {
|
|
23074
|
-
var referenceTimes = [];
|
|
23075
|
-
var wmLayer = new webmap.WMLayer(__assign({}, inputLayer));
|
|
23076
|
-
wmLayer.parseLayerPromise().then(function (layer) {
|
|
23077
|
-
var refTimeDim = layer.getDimension('reference_time');
|
|
23078
|
-
/* Loop through all values of the dimension.
|
|
23079
|
-
A map cannot be used for iterating, as the dimension values are not in an array (it is an API). */
|
|
23080
|
-
|
|
23081
|
-
for (var j = 0; j < refTimeDim.size(); j += 1) {
|
|
23082
|
-
var referenceTimeValue = refTimeDim.getValueForIndex(j);
|
|
23083
|
-
referenceTimes.push(referenceTimeValue);
|
|
23084
|
-
}
|
|
23085
|
-
|
|
23086
|
-
setReferenceTimes(referenceTimes);
|
|
23087
|
-
});
|
|
23088
|
-
}, [inputLayer]);
|
|
23089
|
-
return referenceTimes;
|
|
23090
|
-
};
|
|
23091
|
-
|
|
23092
|
-
var HarmonieTempAndPrecipPreset = function HarmonieTempAndPrecipPreset(_a) {
|
|
23093
|
-
var layers = _a.layers,
|
|
23094
|
-
_b = _a.multiLegend,
|
|
23095
|
-
multiLegend = _b === void 0 ? false : _b;
|
|
23096
|
-
/* Get all the reference times for this layer */
|
|
23097
|
-
|
|
23098
|
-
var referenceTimes = useGetReferenceTimes(layers.topRow);
|
|
23099
|
-
if (referenceTimes.length === 0) return /*#__PURE__*/React__namespace.createElement("div", null, "Loading...");
|
|
23100
|
-
/* Helper to make a map layer prest */
|
|
23101
|
-
|
|
23102
|
-
var makeMapPreset = function makeMapPreset(referenceTime, uniqueId, layer, syncGroupsIds, col) {
|
|
23103
|
-
return {
|
|
23104
|
-
id: uniqueId,
|
|
23105
|
-
title: "Harmonie run " + ("" + referenceTime.substring(8, 13).replace('T', ' / ')),
|
|
23106
|
-
bbox: {
|
|
23107
|
-
left: -450651.2255879827,
|
|
23108
|
-
bottom: 6490531.093143953,
|
|
23109
|
-
right: 1428345.8183648037,
|
|
23110
|
-
top: 7438773.776232235
|
|
23111
|
-
},
|
|
23112
|
-
srs: 'EPSG:3857',
|
|
23113
|
-
layers: [__assign(__assign({}, layer), {
|
|
23114
|
-
id: uniqueId,
|
|
23115
|
-
dimensions: [{
|
|
23116
|
-
name: 'reference_time',
|
|
23117
|
-
currentValue: referenceTime
|
|
23118
|
-
}]
|
|
23119
|
-
})],
|
|
23120
|
-
syncGroupsIds: syncGroupsIds,
|
|
23121
|
-
displayLayerManagerAndLegendButtonInMap: col === 0 || !syncGroupsIds,
|
|
23122
|
-
displayDimensionSelectButtonInMap: col === 0 || !syncGroupsIds
|
|
23123
|
-
};
|
|
23124
|
-
};
|
|
23125
|
-
/* Make the preset */
|
|
23126
|
-
|
|
23127
|
-
|
|
23128
|
-
var nCols = 5;
|
|
23129
|
-
/* Add the harmonie air temperature layers with the different referencetimes */
|
|
23130
|
-
|
|
23131
|
-
var mapsTemperature = __spreadArray([], __read(Array(nCols))).map(function (_, index) {
|
|
23132
|
-
var refTime = referenceTimes[referenceTimes.length - nCols + index];
|
|
23133
|
-
return makeMapPreset(refTime, "harm_air" + index, layers.topRow, layers.topRowSyncGroups, index);
|
|
23134
|
-
});
|
|
23135
|
-
/* Add the harmonie precipitation layers with the different referencetimes */
|
|
23136
|
-
|
|
23137
|
-
|
|
23138
|
-
var mapsPrecipitation = __spreadArray([], __read(Array(nCols))).map(function (_, index) {
|
|
23139
|
-
var refTime = referenceTimes[referenceTimes.length - nCols + index];
|
|
23140
|
-
return makeMapPreset(refTime, "harm_precip" + index, layers.bottomRow, layers.bottomRowSyncGroups, index);
|
|
23141
|
-
});
|
|
23142
|
-
|
|
23143
|
-
var maps = mapsTemperature.concat(mapsPrecipitation);
|
|
23144
|
-
return /*#__PURE__*/React__namespace.createElement(MultiMapViewConnect, {
|
|
23145
|
-
rows: 2,
|
|
23146
|
-
cols: 5,
|
|
23147
|
-
maps: maps,
|
|
23148
|
-
multiLegend: multiLegend
|
|
23149
|
-
});
|
|
23150
|
-
};
|
|
23151
|
-
|
|
23152
23690
|
/* *
|
|
23153
23691
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
23154
23692
|
* you may not use this file except in compliance with the License.
|
|
@@ -23181,8 +23719,30 @@
|
|
|
23181
23719
|
}, [inputLayer]);
|
|
23182
23720
|
return latestReferenceTime;
|
|
23183
23721
|
};
|
|
23184
|
-
|
|
23722
|
+
/**
|
|
23723
|
+
* Custom hook to find out if the list of syncgroup id's contains a group which is of type SYNCGROUPS_TYPE_SETLAYERACTIONS
|
|
23724
|
+
* @param syncGroupsIds A string array of syncgroup ids
|
|
23725
|
+
* @returns True if indeed a group is included which is of type SYNCGROUPS_TYPE_SETLAYERACTIONS
|
|
23726
|
+
*/
|
|
23727
|
+
|
|
23728
|
+
|
|
23729
|
+
var useHasSyncGroupWithLayerActions = function useHasSyncGroupWithLayerActions(syncGroupsIds) {
|
|
23730
|
+
/* Get Syncgroupstate */
|
|
23731
|
+
var syncGroupState = reactRedux.useSelector(function (store) {
|
|
23732
|
+
return getSynchronizationGroupState(store);
|
|
23733
|
+
});
|
|
23734
|
+
if (!syncGroupState) return false;
|
|
23735
|
+
/* Return all syncgroups configured for this component of type SYNCGROUPS_TYPE_SETLAYERACTIONS */
|
|
23736
|
+
|
|
23737
|
+
var syncGroupsWithLayerActions = syncGroupState.groups.allIds.filter(function (syncGroupId) {
|
|
23738
|
+
return syncGroupsIds && syncGroupsIds.includes(syncGroupId) && syncGroupState.groups.byId[syncGroupId].type === 'SYNCGROUPS_TYPE_SETLAYERACTIONS';
|
|
23739
|
+
});
|
|
23740
|
+
/* Figure out if there is a syncgroup which controls layeractions. */
|
|
23185
23741
|
|
|
23742
|
+
var displayLayerManagerAndLegendButtonInAllMaps = syncGroupsIds ? syncGroupsWithLayerActions.length === 1 : false;
|
|
23743
|
+
return displayLayerManagerAndLegendButtonInAllMaps;
|
|
23744
|
+
};
|
|
23745
|
+
/* Helper to make a map layer preset */
|
|
23186
23746
|
|
|
23187
23747
|
var makeMapPreset = function makeMapPreset(timeIncrement, uniqueId, referenceTime, layers, syncGroupsIds, displayLayerManagerAndLegendButtonInMap, displayDimensionSelectButtonInMap) {
|
|
23188
23748
|
var mapTime = moment__default["default"].utc(referenceTime).add(timeIncrement, 'h').format('YYYY-MM-DDTHH:mm:ss[Z]');
|
|
@@ -23224,6 +23784,7 @@
|
|
|
23224
23784
|
startTimeIncrement = _d === void 0 ? 3 : _d,
|
|
23225
23785
|
_e = _a.multiLegend,
|
|
23226
23786
|
multiLegend = _e === void 0 ? false : _e;
|
|
23787
|
+
var displayLayerManagerAndLegendButtonInAllMaps = !useHasSyncGroupWithLayerActions(syncGroupsIds);
|
|
23227
23788
|
/* Get latest reference time for this layer */
|
|
23228
23789
|
|
|
23229
23790
|
var latestReferenceTime = useGetLatestReferenceTime(layers[0]);
|
|
@@ -23238,7 +23799,7 @@
|
|
|
23238
23799
|
|
|
23239
23800
|
|
|
23240
23801
|
var maps = timeIncrements.map(function (increment, index) {
|
|
23241
|
-
return makeMapPreset(increment, "harm_precip" + increment, latestReferenceTime, layers, syncGroupsIds, index === 0 ||
|
|
23802
|
+
return makeMapPreset(increment, "harm_precip" + increment, latestReferenceTime, layers, syncGroupsIds, index === 0 || displayLayerManagerAndLegendButtonInAllMaps, index === 0 || displayLayerManagerAndLegendButtonInAllMaps);
|
|
23242
23803
|
});
|
|
23243
23804
|
return /*#__PURE__*/React__namespace.createElement(MultiMapViewConnect, {
|
|
23244
23805
|
rows: 3,
|
|
@@ -23246,6 +23807,110 @@
|
|
|
23246
23807
|
maps: maps,
|
|
23247
23808
|
syncTime: false,
|
|
23248
23809
|
showTimeSlider: false,
|
|
23810
|
+
multiLegend: multiLegend,
|
|
23811
|
+
showClock: false
|
|
23812
|
+
});
|
|
23813
|
+
};
|
|
23814
|
+
|
|
23815
|
+
/* *
|
|
23816
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
23817
|
+
* you may not use this file except in compliance with the License.
|
|
23818
|
+
* You may obtain a copy of the License at
|
|
23819
|
+
*
|
|
23820
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23821
|
+
*
|
|
23822
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
23823
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
23824
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23825
|
+
* See the License for the specific language governing permissions and
|
|
23826
|
+
* limitations under the License.
|
|
23827
|
+
*
|
|
23828
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
23829
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
23830
|
+
* */
|
|
23831
|
+
|
|
23832
|
+
var useGetReferenceTimes = function useGetReferenceTimes(inputLayer) {
|
|
23833
|
+
var _a = __read(React__namespace.useState([]), 2),
|
|
23834
|
+
referenceTimes = _a[0],
|
|
23835
|
+
setReferenceTimes = _a[1];
|
|
23836
|
+
|
|
23837
|
+
React__namespace.useEffect(function () {
|
|
23838
|
+
var referenceTimes = [];
|
|
23839
|
+
var wmLayer = new webmap.WMLayer(__assign({}, inputLayer));
|
|
23840
|
+
wmLayer.parseLayerPromise().then(function (layer) {
|
|
23841
|
+
var refTimeDim = layer.getDimension('reference_time');
|
|
23842
|
+
/* Loop through all values of the dimension.
|
|
23843
|
+
A map cannot be used for iterating, as the dimension values are not in an array (it is an API). */
|
|
23844
|
+
|
|
23845
|
+
for (var j = 0; j < refTimeDim.size(); j += 1) {
|
|
23846
|
+
var referenceTimeValue = refTimeDim.getValueForIndex(j);
|
|
23847
|
+
referenceTimes.push(referenceTimeValue);
|
|
23848
|
+
}
|
|
23849
|
+
|
|
23850
|
+
setReferenceTimes(referenceTimes);
|
|
23851
|
+
});
|
|
23852
|
+
}, [inputLayer]);
|
|
23853
|
+
return referenceTimes;
|
|
23854
|
+
};
|
|
23855
|
+
|
|
23856
|
+
var HarmonieTempAndPrecipPreset = function HarmonieTempAndPrecipPreset(_a) {
|
|
23857
|
+
var layers = _a.layers,
|
|
23858
|
+
_b = _a.multiLegend,
|
|
23859
|
+
multiLegend = _b === void 0 ? false : _b;
|
|
23860
|
+
var displayLayerManagerAndLegendButtonInAllTopRows = !useHasSyncGroupWithLayerActions(layers && layers.topRowSyncGroups);
|
|
23861
|
+
var displayLayerManagerAndLegendButtonInAllBottomRows = !useHasSyncGroupWithLayerActions(layers && layers.bottomRowSyncGroups);
|
|
23862
|
+
/* Get all the reference times for this layer */
|
|
23863
|
+
|
|
23864
|
+
var referenceTimes = useGetReferenceTimes(layers.topRow);
|
|
23865
|
+
if (referenceTimes.length === 0) return /*#__PURE__*/React__namespace.createElement("div", null, "Loading...");
|
|
23866
|
+
/* Helper to make a map layer prest */
|
|
23867
|
+
|
|
23868
|
+
var makeMapPreset = function makeMapPreset(referenceTime, uniqueId, layer, syncGroupsIds, col) {
|
|
23869
|
+
return {
|
|
23870
|
+
id: uniqueId,
|
|
23871
|
+
title: "Harmonie run " + ("" + referenceTime.substring(8, 13).replace('T', ' / ')),
|
|
23872
|
+
bbox: {
|
|
23873
|
+
left: -450651.2255879827,
|
|
23874
|
+
bottom: 6490531.093143953,
|
|
23875
|
+
right: 1428345.8183648037,
|
|
23876
|
+
top: 7438773.776232235
|
|
23877
|
+
},
|
|
23878
|
+
srs: 'EPSG:3857',
|
|
23879
|
+
layers: [__assign(__assign({}, layer), {
|
|
23880
|
+
id: uniqueId,
|
|
23881
|
+
dimensions: [{
|
|
23882
|
+
name: 'reference_time',
|
|
23883
|
+
currentValue: referenceTime
|
|
23884
|
+
}]
|
|
23885
|
+
})],
|
|
23886
|
+
syncGroupsIds: syncGroupsIds,
|
|
23887
|
+
displayLayerManagerAndLegendButtonInMap: col === 0 || displayLayerManagerAndLegendButtonInAllTopRows,
|
|
23888
|
+
displayDimensionSelectButtonInMap: col === 0 || displayLayerManagerAndLegendButtonInAllBottomRows
|
|
23889
|
+
};
|
|
23890
|
+
};
|
|
23891
|
+
/* Make the preset */
|
|
23892
|
+
|
|
23893
|
+
|
|
23894
|
+
var nCols = 5;
|
|
23895
|
+
/* Add the harmonie air temperature layers with the different referencetimes */
|
|
23896
|
+
|
|
23897
|
+
var mapsTemperature = __spreadArray([], __read(Array(nCols))).map(function (_, index) {
|
|
23898
|
+
var refTime = referenceTimes[referenceTimes.length - nCols + index];
|
|
23899
|
+
return makeMapPreset(refTime, "harm_air" + index, layers.topRow, layers.topRowSyncGroups, index);
|
|
23900
|
+
});
|
|
23901
|
+
/* Add the harmonie precipitation layers with the different referencetimes */
|
|
23902
|
+
|
|
23903
|
+
|
|
23904
|
+
var mapsPrecipitation = __spreadArray([], __read(Array(nCols))).map(function (_, index) {
|
|
23905
|
+
var refTime = referenceTimes[referenceTimes.length - nCols + index];
|
|
23906
|
+
return makeMapPreset(refTime, "harm_precip" + index, layers.bottomRow, layers.bottomRowSyncGroups, index);
|
|
23907
|
+
});
|
|
23908
|
+
|
|
23909
|
+
var maps = mapsTemperature.concat(mapsPrecipitation);
|
|
23910
|
+
return /*#__PURE__*/React__namespace.createElement(MultiMapViewConnect, {
|
|
23911
|
+
rows: 2,
|
|
23912
|
+
cols: 5,
|
|
23913
|
+
maps: maps,
|
|
23249
23914
|
multiLegend: multiLegend
|
|
23250
23915
|
});
|
|
23251
23916
|
};
|
|
@@ -23717,9 +24382,8 @@
|
|
|
23717
24382
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
23718
24383
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
23719
24384
|
* */
|
|
23720
|
-
var store =
|
|
23721
|
-
|
|
23722
|
-
extensions: [reduxDynamicModulesSaga.getSagaExtension({})]
|
|
24385
|
+
var store = reduxToolkit.createStore({
|
|
24386
|
+
extensions: [sagaExtension.getSagaExtension()]
|
|
23723
24387
|
});
|
|
23724
24388
|
|
|
23725
24389
|
/* *
|
|
@@ -23900,9 +24564,7 @@
|
|
|
23900
24564
|
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
23901
24565
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
23902
24566
|
* */
|
|
23903
|
-
var SnackbarWrapperConnect = function
|
|
23904
|
-
var props = __rest(_a, []);
|
|
23905
|
-
|
|
24567
|
+
var SnackbarWrapperConnect = shared.withEggs([snackbarModuleConfig])(function (props) {
|
|
23906
24568
|
var dispatch = reactRedux.useDispatch();
|
|
23907
24569
|
|
|
23908
24570
|
var onCloseSnackbar = function onCloseSnackbar() {
|
|
@@ -23912,15 +24574,13 @@
|
|
|
23912
24574
|
var currentSnackbarMessage = reactRedux.useSelector(function (store) {
|
|
23913
24575
|
return getFirstSnackbarMessage(store);
|
|
23914
24576
|
});
|
|
23915
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
23916
|
-
modules: [snackbarModuleConfig]
|
|
23917
|
-
}, /*#__PURE__*/React__namespace.createElement(SnackbarWrapper, __assign({
|
|
24577
|
+
return /*#__PURE__*/React__namespace.createElement(SnackbarWrapper, __assign({
|
|
23918
24578
|
isOpen: !!currentSnackbarMessage,
|
|
23919
24579
|
onCloseSnackbar: onCloseSnackbar,
|
|
23920
24580
|
message: currentSnackbarMessage ? currentSnackbarMessage.message : '',
|
|
23921
24581
|
id: currentSnackbarMessage ? currentSnackbarMessage.id : ''
|
|
23922
|
-
}, props))
|
|
23923
|
-
};
|
|
24582
|
+
}, props));
|
|
24583
|
+
});
|
|
23924
24584
|
|
|
23925
24585
|
/* *
|
|
23926
24586
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -23952,6 +24612,13 @@
|
|
|
23952
24612
|
theme: theme$1
|
|
23953
24613
|
}, children);
|
|
23954
24614
|
};
|
|
24615
|
+
var ThemeWrapperWithModules = shared.withEggs(coreModuleConfig)(function (_a) {
|
|
24616
|
+
var theme = _a.theme,
|
|
24617
|
+
children = _a.children;
|
|
24618
|
+
return /*#__PURE__*/React__default["default"].createElement(CoreThemeProvider, {
|
|
24619
|
+
theme: theme
|
|
24620
|
+
}, children, " ");
|
|
24621
|
+
});
|
|
23955
24622
|
/**
|
|
23956
24623
|
* A Provider component which provides the GeoWeb theme and store for the core.
|
|
23957
24624
|
* Note: Should only be used with core components, as the provided store is only for core.
|
|
@@ -23966,11 +24633,9 @@
|
|
|
23966
24633
|
store = _a.store;
|
|
23967
24634
|
return /*#__PURE__*/React__default["default"].createElement(reactRedux.Provider, {
|
|
23968
24635
|
store: store
|
|
23969
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
23970
|
-
modules: coreModuleConfig
|
|
23971
|
-
}, /*#__PURE__*/React__default["default"].createElement(CoreThemeProvider, {
|
|
24636
|
+
}, /*#__PURE__*/React__default["default"].createElement(ThemeWrapperWithModules, {
|
|
23972
24637
|
theme: theme$1
|
|
23973
|
-
}, /*#__PURE__*/React__default["default"].createElement(SnackbarWrapperConnect, null, children)))
|
|
24638
|
+
}, /*#__PURE__*/React__default["default"].createElement(SnackbarWrapperConnect, null, children)));
|
|
23974
24639
|
};
|
|
23975
24640
|
|
|
23976
24641
|
/* *
|