@opengeoweb/core 3.0.0 → 4.1.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 +1286 -1232
- package/index.umd.js +1315 -1211
- package/lib/components/LayerManager/LayerManager.stories.d.ts +12 -0
- package/lib/components/LayerManager/LayerManagerConnect.stories.d.ts +18 -2
- package/lib/components/LayerManager/LayerManagerUtils.d.ts +49 -2
- package/lib/components/LayerManager/LayerSelect/LayerSelect.stories.d.ts +12 -0
- package/lib/components/LayerManager/LayerSelect/LayerSelectUtils.d.ts +3 -3
- package/lib/components/MapView/useKeyboardZoomAndPan.d.ts +1 -0
- package/lib/components/MapView/useKeyboardZoomAndPan.spec.d.ts +1 -0
- package/lib/components/MapView/useTouchZoomPan.d.ts +1 -0
- package/lib/components/MapView/useTouchZoomPan.spec.d.ts +1 -0
- package/lib/components/MapWarning/MapWarningProperties.d.ts +1 -0
- package/lib/components/MultiMapView/MultiMapViewConnect.d.ts +0 -1
- package/lib/components/ReactMapView/AdagucMapDraw.d.ts +12 -0
- package/lib/components/Snackbar/SnackbarWrapper.d.ts +9 -0
- package/lib/components/Snackbar/SnackbarWrapper.spec.d.ts +1 -0
- package/lib/components/Snackbar/SnackbarWrapper.stories.d.ts +7 -0
- package/lib/components/Snackbar/SnackbarWrapperConnect.d.ts +3 -0
- package/lib/components/Snackbar/SnackbarWrapperConnect.spec.d.ts +1 -0
- package/lib/components/Snackbar/index.d.ts +1 -0
- package/lib/components/TimeSlider/TimeSliderButtons/AutoUpdateButton/AutoUpdateButton.d.ts +2 -0
- package/lib/components/TimeSlider/TimeSliderButtons/SpeedButton/SpeedButton.d.ts +1 -0
- package/lib/components/TimeSlider/TimeSliderButtons/TimeSliderButtons.d.ts +0 -3
- package/lib/components/TimeSlider/TimeSliderButtons/TimeStepButton/TimeStepButton.d.ts +5 -3
- package/lib/components/TimeSlider/TimeSliderButtons/TimeStepButton/TimeStepButton.stories.d.ts +9 -0
- package/lib/components/TimeSlider/TimeSliderConnect.stories.d.ts +6 -0
- package/lib/index.d.ts +4 -3
- package/lib/store/coreModuleConfig.d.ts +1 -1
- package/lib/store/index.d.ts +1 -0
- package/lib/store/snackbar/config.d.ts +4 -0
- package/lib/store/snackbar/index.d.ts +2 -0
- package/lib/store/snackbar/reducer.d.ts +11 -0
- package/lib/store/snackbar/reducer.spec.d.ts +1 -0
- package/lib/store/snackbar/sagas.d.ts +5 -0
- package/lib/store/snackbar/sagas.spec.d.ts +1 -0
- package/lib/store/snackbar/selectors.d.ts +10 -0
- package/lib/store/snackbar/selectors.spec.d.ts +1 -0
- package/lib/store/snackbar/types.d.ts +15 -0
- package/lib/storybookUtils/HelperComponents.d.ts +0 -1
- package/lib/storybookUtils/storyComponents/MapDrawGeoJSON.d.ts +34 -7
- package/lib/utils/jsonPresetFilter.d.ts +11 -12
- package/lib/utils/types.d.ts +2 -1
- package/package.json +5 -6
- package/lib/storybookUtils/storyComponents/MapDrawGeoJSONStyles.d.ts +0 -4
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('@
|
|
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', '@
|
|
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.
|
|
5
|
-
})(this, (function (exports, toolkit, produce, moment, React, _, effects, reactRedux, material, shared, theme,
|
|
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('react-window'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('redux-dynamic-modules'), require('redux-dynamic-modules-saga')) :
|
|
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', 'react-window', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', 'redux-dynamic-modules', 'redux-dynamic-modules-saga'], 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.reactWindow, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.reduxDynamicModules, global.reduxDynamicModulesSaga));
|
|
5
|
+
})(this, (function (exports, toolkit, produce, moment, React, _, effects, reactRedux, material, shared, theme, webmap, reactSortablejs, reactWindow, throttleDebounce, cloneDeep, proj4, turf, reduxDynamicModules, reduxDynamicModulesSaga) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -29,9 +29,6 @@
|
|
|
29
29
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
30
30
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
31
31
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
32
|
-
var makeStyles__default = /*#__PURE__*/_interopDefaultLegacy(makeStyles);
|
|
33
|
-
var createStyles__default = /*#__PURE__*/_interopDefaultLegacy(createStyles);
|
|
34
|
-
var withStyles__default = /*#__PURE__*/_interopDefaultLegacy(withStyles);
|
|
35
32
|
var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep);
|
|
36
33
|
var proj4__default = /*#__PURE__*/_interopDefaultLegacy(proj4);
|
|
37
34
|
var turf__namespace = /*#__PURE__*/_interopNamespace(turf);
|
|
@@ -1306,7 +1303,7 @@
|
|
|
1306
1303
|
status: status
|
|
1307
1304
|
});
|
|
1308
1305
|
};
|
|
1309
|
-
var initialState$
|
|
1306
|
+
var initialState$6 = {
|
|
1310
1307
|
byId: {},
|
|
1311
1308
|
allIds: [],
|
|
1312
1309
|
availableBaseLayers: {
|
|
@@ -1314,8 +1311,8 @@
|
|
|
1314
1311
|
allIds: []
|
|
1315
1312
|
}
|
|
1316
1313
|
};
|
|
1317
|
-
var slice$
|
|
1318
|
-
initialState: initialState$
|
|
1314
|
+
var slice$6 = toolkit.createSlice({
|
|
1315
|
+
initialState: initialState$6,
|
|
1319
1316
|
name: 'layerReducer',
|
|
1320
1317
|
reducers: {
|
|
1321
1318
|
addLayer: function addLayer(draft, action) {
|
|
@@ -1549,9 +1546,9 @@
|
|
|
1549
1546
|
layerDimensions = _a.layerDimensions;
|
|
1550
1547
|
var layerStyleAction = layerActions.layerChangeStyle(layerStyle);
|
|
1551
1548
|
var state = produce.current(draft);
|
|
1552
|
-
var intermediateState = layerStyle === null ? state : reducer$
|
|
1549
|
+
var intermediateState = layerStyle === null ? state : reducer$6(state, layerStyleAction);
|
|
1553
1550
|
var dimensionsAction = layerActions.layerSetDimensions(layerDimensions);
|
|
1554
|
-
var newState = layerDimensions === null ? intermediateState : reducer$
|
|
1551
|
+
var newState = layerDimensions === null ? intermediateState : reducer$6(intermediateState, dimensionsAction);
|
|
1555
1552
|
return newState;
|
|
1556
1553
|
}
|
|
1557
1554
|
},
|
|
@@ -1596,7 +1593,7 @@
|
|
|
1596
1593
|
};
|
|
1597
1594
|
/* Handle the Layer action with the same logic, using the same reducer */
|
|
1598
1595
|
|
|
1599
|
-
return reducer$
|
|
1596
|
+
return reducer$6(prevState, action);
|
|
1600
1597
|
}, state);
|
|
1601
1598
|
}).addCase(setMapPreset, function (draft, action) {
|
|
1602
1599
|
var mapId = action.payload.mapId;
|
|
@@ -1616,8 +1613,8 @@
|
|
|
1616
1613
|
});
|
|
1617
1614
|
}
|
|
1618
1615
|
});
|
|
1619
|
-
var reducer$
|
|
1620
|
-
var layerActions = slice$
|
|
1616
|
+
var reducer$6 = slice$6.reducer;
|
|
1617
|
+
var layerActions = slice$6.actions;
|
|
1621
1618
|
|
|
1622
1619
|
/* *
|
|
1623
1620
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1635,12 +1632,12 @@
|
|
|
1635
1632
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1636
1633
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
1637
1634
|
* */
|
|
1638
|
-
var initialState$
|
|
1635
|
+
var initialState$5 = {
|
|
1639
1636
|
byId: {},
|
|
1640
1637
|
allIds: []
|
|
1641
1638
|
};
|
|
1642
|
-
var slice$
|
|
1643
|
-
initialState: initialState$
|
|
1639
|
+
var slice$5 = toolkit.createSlice({
|
|
1640
|
+
initialState: initialState$5,
|
|
1644
1641
|
name: 'serviceReducer',
|
|
1645
1642
|
reducers: {
|
|
1646
1643
|
serviceSetLayers: function serviceSetLayers(draft, action) {
|
|
@@ -1667,13 +1664,13 @@
|
|
|
1667
1664
|
var serviceLayers = action.payload.serviceLayers;
|
|
1668
1665
|
if (serviceLayers === null) return draft;
|
|
1669
1666
|
var mapAction = serviceActions.serviceSetLayers(serviceLayers);
|
|
1670
|
-
var newState = reducer$
|
|
1667
|
+
var newState = reducer$5(draft, mapAction);
|
|
1671
1668
|
return newState;
|
|
1672
1669
|
});
|
|
1673
1670
|
}
|
|
1674
1671
|
});
|
|
1675
|
-
var reducer$
|
|
1676
|
-
var serviceActions = slice$
|
|
1672
|
+
var reducer$5 = slice$5.reducer;
|
|
1673
|
+
var serviceActions = slice$5.actions;
|
|
1677
1674
|
|
|
1678
1675
|
/* *
|
|
1679
1676
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1876,13 +1873,13 @@
|
|
|
1876
1873
|
source: source
|
|
1877
1874
|
};
|
|
1878
1875
|
};
|
|
1879
|
-
var initialState$
|
|
1876
|
+
var initialState$4 = {
|
|
1880
1877
|
order: [],
|
|
1881
1878
|
dialogs: {},
|
|
1882
1879
|
activeWindowId: undefined
|
|
1883
1880
|
};
|
|
1884
|
-
var slice$
|
|
1885
|
-
initialState: initialState$
|
|
1881
|
+
var slice$4 = toolkit.createSlice({
|
|
1882
|
+
initialState: initialState$4,
|
|
1886
1883
|
name: 'uiReducer',
|
|
1887
1884
|
reducers: {
|
|
1888
1885
|
registerDialog: function registerDialog(draft, action) {
|
|
@@ -1959,8 +1956,8 @@
|
|
|
1959
1956
|
}
|
|
1960
1957
|
}
|
|
1961
1958
|
});
|
|
1962
|
-
var reducer$
|
|
1963
|
-
var uiActions = slice$
|
|
1959
|
+
var reducer$4 = slice$4.reducer;
|
|
1960
|
+
var uiActions = slice$4.actions;
|
|
1964
1961
|
|
|
1965
1962
|
/* *
|
|
1966
1963
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -2027,12 +2024,12 @@
|
|
|
2027
2024
|
});
|
|
2028
2025
|
};
|
|
2029
2026
|
|
|
2030
|
-
var initialState$
|
|
2027
|
+
var initialState$3 = {
|
|
2031
2028
|
byId: {},
|
|
2032
2029
|
allIds: []
|
|
2033
2030
|
};
|
|
2034
|
-
var slice$
|
|
2035
|
-
initialState: initialState$
|
|
2031
|
+
var slice$3 = toolkit.createSlice({
|
|
2032
|
+
initialState: initialState$3,
|
|
2036
2033
|
name: 'mapReducer',
|
|
2037
2034
|
reducers: {
|
|
2038
2035
|
registerMap: function registerMap(draft, action) {
|
|
@@ -2598,13 +2595,13 @@
|
|
|
2598
2595
|
};
|
|
2599
2596
|
/* Handle the Layer action with the same logic, using the same reducer */
|
|
2600
2597
|
|
|
2601
|
-
return reducer$
|
|
2598
|
+
return reducer$3(prevState, action);
|
|
2602
2599
|
}, draft);
|
|
2603
2600
|
}).addCase(onUpdateLayerInformation, function (draft, action) {
|
|
2604
2601
|
var mapDimensions = action.payload.mapDimensions;
|
|
2605
2602
|
if (mapDimensions === null) return draft;
|
|
2606
2603
|
var mapAction = mapActions$1.mapUpdateAllMapDimensions(mapDimensions);
|
|
2607
|
-
return reducer$
|
|
2604
|
+
return reducer$3(draft, mapAction);
|
|
2608
2605
|
}).addCase(mapChangeDimension, function (draft, action) {
|
|
2609
2606
|
var _a = action.payload,
|
|
2610
2607
|
mapId = _a.mapId,
|
|
@@ -2643,11 +2640,11 @@
|
|
|
2643
2640
|
});
|
|
2644
2641
|
}
|
|
2645
2642
|
});
|
|
2646
|
-
var mapActions$1 = __assign(__assign({}, slice$
|
|
2643
|
+
var mapActions$1 = __assign(__assign({}, slice$3.actions), {
|
|
2647
2644
|
setMapPreset: setMapPreset,
|
|
2648
2645
|
mapChangeDimension: mapChangeDimension
|
|
2649
2646
|
});
|
|
2650
|
-
var reducer$
|
|
2647
|
+
var reducer$3 = slice$3.reducer;
|
|
2651
2648
|
|
|
2652
2649
|
/* *
|
|
2653
2650
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -3145,7 +3142,7 @@
|
|
|
3145
3142
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
3146
3143
|
* */
|
|
3147
3144
|
var _a$2;
|
|
3148
|
-
var initialState$
|
|
3145
|
+
var initialState$2 = {
|
|
3149
3146
|
sources: {
|
|
3150
3147
|
byId: {},
|
|
3151
3148
|
allIds: []
|
|
@@ -3169,8 +3166,8 @@
|
|
|
3169
3166
|
}
|
|
3170
3167
|
}
|
|
3171
3168
|
};
|
|
3172
|
-
var slice$
|
|
3173
|
-
initialState: initialState$
|
|
3169
|
+
var slice$2 = toolkit.createSlice({
|
|
3170
|
+
initialState: initialState$2,
|
|
3174
3171
|
name: 'synchronizationGroupsReducer',
|
|
3175
3172
|
reducers: {
|
|
3176
3173
|
syncGroupAddSource: function syncGroupAddSource(draft, action) {
|
|
@@ -3314,7 +3311,7 @@
|
|
|
3314
3311
|
});
|
|
3315
3312
|
},
|
|
3316
3313
|
syncGroupClear: function syncGroupClear() {
|
|
3317
|
-
return initialState$
|
|
3314
|
+
return initialState$2;
|
|
3318
3315
|
},
|
|
3319
3316
|
syncGroupSetViewState: function syncGroupSetViewState(draft, action) {
|
|
3320
3317
|
var viewState = action.payload.viewState;
|
|
@@ -3386,7 +3383,7 @@
|
|
|
3386
3383
|
});
|
|
3387
3384
|
};
|
|
3388
3385
|
|
|
3389
|
-
var syncGroupAddGroup = (_a$2 = slice$
|
|
3386
|
+
var syncGroupAddGroup = (_a$2 = slice$2.actions, _a$2.syncGroupAddGroup),
|
|
3390
3387
|
syncGroupAddSource = _a$2.syncGroupAddSource,
|
|
3391
3388
|
syncGroupAddTarget = _a$2.syncGroupAddTarget;
|
|
3392
3389
|
_a$2.syncGroupClear;
|
|
@@ -3395,8 +3392,8 @@
|
|
|
3395
3392
|
syncGroupRemoveSource = _a$2.syncGroupRemoveSource,
|
|
3396
3393
|
syncGroupRemoveTarget = _a$2.syncGroupRemoveTarget,
|
|
3397
3394
|
syncGroupSetViewState = _a$2.syncGroupSetViewState;
|
|
3398
|
-
var actions = slice$
|
|
3399
|
-
reducer$
|
|
3395
|
+
var actions = slice$2.actions,
|
|
3396
|
+
reducer$2 = slice$2.reducer;
|
|
3400
3397
|
|
|
3401
3398
|
/* *
|
|
3402
3399
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -3453,7 +3450,7 @@
|
|
|
3453
3450
|
actions: actions,
|
|
3454
3451
|
constants: constants,
|
|
3455
3452
|
types: types$1,
|
|
3456
|
-
initialState: initialState$
|
|
3453
|
+
initialState: initialState$2
|
|
3457
3454
|
});
|
|
3458
3455
|
|
|
3459
3456
|
/* *
|
|
@@ -4292,7 +4289,7 @@
|
|
|
4292
4289
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
4293
4290
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
4294
4291
|
* */
|
|
4295
|
-
var initialState = {
|
|
4292
|
+
var initialState$1 = {
|
|
4296
4293
|
filters: {
|
|
4297
4294
|
searchFilter: '',
|
|
4298
4295
|
activeServices: {
|
|
@@ -4305,8 +4302,8 @@
|
|
|
4305
4302
|
}
|
|
4306
4303
|
}
|
|
4307
4304
|
};
|
|
4308
|
-
var slice = toolkit.createSlice({
|
|
4309
|
-
initialState: initialState,
|
|
4305
|
+
var slice$1 = toolkit.createSlice({
|
|
4306
|
+
initialState: initialState$1,
|
|
4310
4307
|
name: 'layerSelect',
|
|
4311
4308
|
reducers: {
|
|
4312
4309
|
setSearchFilter: function setSearchFilter(draft, action) {
|
|
@@ -4492,8 +4489,8 @@
|
|
|
4492
4489
|
}
|
|
4493
4490
|
}
|
|
4494
4491
|
});
|
|
4495
|
-
var reducer = slice.reducer;
|
|
4496
|
-
var layerSelectActions = slice.actions;
|
|
4492
|
+
var reducer$1 = slice$1.reducer;
|
|
4493
|
+
var layerSelectActions = slice$1.actions;
|
|
4497
4494
|
|
|
4498
4495
|
/* *
|
|
4499
4496
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -4625,6 +4622,78 @@
|
|
|
4625
4622
|
return (_d = (_c = (_b = (_a = store === null || store === void 0 ? void 0 : store.layerSelect) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.keywords) === null || _c === void 0 ? void 0 : _c.byId[keywordId]) !== null && _d !== void 0 ? _d : {};
|
|
4626
4623
|
};
|
|
4627
4624
|
|
|
4625
|
+
/* *
|
|
4626
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4627
|
+
* you may not use this file except in compliance with the License.
|
|
4628
|
+
* You may obtain a copy of the License at
|
|
4629
|
+
*
|
|
4630
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4631
|
+
*
|
|
4632
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4633
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4634
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4635
|
+
* See the License for the specific language governing permissions and
|
|
4636
|
+
* limitations under the License.
|
|
4637
|
+
*
|
|
4638
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
4639
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
4640
|
+
* */
|
|
4641
|
+
var snackbarAdapter = toolkit.createEntityAdapter();
|
|
4642
|
+
var initialState = snackbarAdapter.getInitialState();
|
|
4643
|
+
var slice = toolkit.createSlice({
|
|
4644
|
+
initialState: initialState,
|
|
4645
|
+
name: 'snackbar',
|
|
4646
|
+
reducers: {
|
|
4647
|
+
// To open the snackbar call this action
|
|
4648
|
+
// eslint-disable-next-line no-unused-vars
|
|
4649
|
+
openSnackbar: function openSnackbar(draft, action) {},
|
|
4650
|
+
// triggerOpenSnackbarBySaga is triggered by the saga to open the snackbar after the current snackbars have all been closed
|
|
4651
|
+
// DO NOT CALL THIS ACTION DIRECTLY!
|
|
4652
|
+
triggerOpenSnackbarBySaga: function triggerOpenSnackbarBySaga(draft, action) {
|
|
4653
|
+
var snackbarContent = action.payload.snackbarContent; // Ensure we have an id before proceeding
|
|
4654
|
+
|
|
4655
|
+
if (snackbarContent.id === undefined) {
|
|
4656
|
+
return;
|
|
4657
|
+
}
|
|
4658
|
+
|
|
4659
|
+
snackbarAdapter.setOne(draft, snackbarContent);
|
|
4660
|
+
},
|
|
4661
|
+
closeSnackbar: function closeSnackbar(draft) {
|
|
4662
|
+
snackbarAdapter.removeAll(draft);
|
|
4663
|
+
}
|
|
4664
|
+
}
|
|
4665
|
+
});
|
|
4666
|
+
var reducer = slice.reducer;
|
|
4667
|
+
var snackbarActions = slice.actions;
|
|
4668
|
+
|
|
4669
|
+
/* *
|
|
4670
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4671
|
+
* you may not use this file except in compliance with the License.
|
|
4672
|
+
* You may obtain a copy of the License at
|
|
4673
|
+
*
|
|
4674
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4675
|
+
*
|
|
4676
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4677
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4678
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4679
|
+
* See the License for the specific language governing permissions and
|
|
4680
|
+
* limitations under the License.
|
|
4681
|
+
*
|
|
4682
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
4683
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
4684
|
+
* */
|
|
4685
|
+
var getCurrentSnackbarMessages = snackbarAdapter.getSelectors(function (state) {
|
|
4686
|
+
var _a;
|
|
4687
|
+
|
|
4688
|
+
return (_a = state === null || state === void 0 ? void 0 : state.snackbar) !== null && _a !== void 0 ? _a : {
|
|
4689
|
+
entities: {},
|
|
4690
|
+
ids: []
|
|
4691
|
+
};
|
|
4692
|
+
}).selectAll;
|
|
4693
|
+
var getFirstSnackbarMessage = toolkit.createSelector(getCurrentSnackbarMessages, function (currentMessages) {
|
|
4694
|
+
return currentMessages.length > 0 ? currentMessages[0] : undefined;
|
|
4695
|
+
});
|
|
4696
|
+
|
|
4628
4697
|
var types = /*#__PURE__*/Object.freeze({
|
|
4629
4698
|
__proto__: null
|
|
4630
4699
|
});
|
|
@@ -5269,7 +5338,7 @@
|
|
|
5269
5338
|
}
|
|
5270
5339
|
});
|
|
5271
5340
|
}
|
|
5272
|
-
function rootSaga$
|
|
5341
|
+
function rootSaga$5() {
|
|
5273
5342
|
return __generator(this, function (_a) {
|
|
5274
5343
|
switch (_a.label) {
|
|
5275
5344
|
case 0:
|
|
@@ -5639,7 +5708,7 @@
|
|
|
5639
5708
|
});
|
|
5640
5709
|
}
|
|
5641
5710
|
|
|
5642
|
-
function rootSaga$
|
|
5711
|
+
function rootSaga$4() {
|
|
5643
5712
|
return __generator(this, function (_a) {
|
|
5644
5713
|
switch (_a.label) {
|
|
5645
5714
|
case 0:
|
|
@@ -5732,9 +5801,9 @@
|
|
|
5732
5801
|
var synchronizationGroupConfig = {
|
|
5733
5802
|
id: 'syncronizationGroupStore-module',
|
|
5734
5803
|
reducerMap: {
|
|
5735
|
-
syncronizationGroupStore: reducer$
|
|
5804
|
+
syncronizationGroupStore: reducer$2
|
|
5736
5805
|
},
|
|
5737
|
-
sagas: [rootSaga$
|
|
5806
|
+
sagas: [rootSaga$5, rootSaga$4]
|
|
5738
5807
|
};
|
|
5739
5808
|
|
|
5740
5809
|
/* *
|
|
@@ -5856,7 +5925,7 @@
|
|
|
5856
5925
|
}
|
|
5857
5926
|
});
|
|
5858
5927
|
}
|
|
5859
|
-
function rootSaga$
|
|
5928
|
+
function rootSaga$3() {
|
|
5860
5929
|
return __generator(this, function (_a) {
|
|
5861
5930
|
switch (_a.label) {
|
|
5862
5931
|
case 0:
|
|
@@ -5900,9 +5969,9 @@
|
|
|
5900
5969
|
var uiModuleConfig = {
|
|
5901
5970
|
id: 'ui-module',
|
|
5902
5971
|
reducerMap: {
|
|
5903
|
-
ui: reducer$
|
|
5972
|
+
ui: reducer$4
|
|
5904
5973
|
},
|
|
5905
|
-
sagas: [rootSaga$
|
|
5974
|
+
sagas: [rootSaga$3]
|
|
5906
5975
|
};
|
|
5907
5976
|
|
|
5908
5977
|
/* *
|
|
@@ -6070,103 +6139,57 @@
|
|
|
6070
6139
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
6071
6140
|
* */
|
|
6072
6141
|
|
|
6073
|
-
var parseBoolean = function parseBoolean(value) {
|
|
6074
|
-
return ['true', 'false', true, false].includes(value) && JSON.parse(value);
|
|
6075
|
-
};
|
|
6076
|
-
|
|
6077
|
-
var isBaseLayer = function isBaseLayer(layer) {
|
|
6078
|
-
return ['baseLayer'].includes(layer.layerType);
|
|
6079
|
-
};
|
|
6080
|
-
|
|
6081
|
-
var isMapLayer = function isMapLayer(layer) {
|
|
6082
|
-
return ['mapLayer'].includes(layer.layerType);
|
|
6083
|
-
};
|
|
6084
|
-
|
|
6085
|
-
var isOverLayer = function isOverLayer(layer) {
|
|
6086
|
-
return ['overLayer'].includes(layer.layerType);
|
|
6087
|
-
};
|
|
6088
|
-
|
|
6089
6142
|
var isValidService = function isValidService(service) {
|
|
6090
6143
|
return Object.prototype.hasOwnProperty.call(service, 'url');
|
|
6091
6144
|
};
|
|
6092
6145
|
|
|
6093
|
-
var
|
|
6094
|
-
|
|
6095
|
-
return LayerType.baseLayer;
|
|
6096
|
-
}
|
|
6097
|
-
|
|
6098
|
-
if (isMapLayer(layer)) {
|
|
6099
|
-
return LayerType.mapLayer;
|
|
6100
|
-
}
|
|
6101
|
-
|
|
6102
|
-
if (isOverLayer(layer)) {
|
|
6103
|
-
return LayerType.overLayer;
|
|
6104
|
-
}
|
|
6105
|
-
|
|
6106
|
-
return defaultValue;
|
|
6146
|
+
var parseBoolean = function parseBoolean(value) {
|
|
6147
|
+
return typeof value === 'boolean' ? value : value === 'true';
|
|
6107
6148
|
};
|
|
6108
|
-
|
|
6109
6149
|
var parseLayer = function parseLayer(layer) {
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
}
|
|
6115
|
-
|
|
6116
|
-
if (lr.layerType) {
|
|
6117
|
-
lr.layerType = parseLayerType(lr, null);
|
|
6118
|
-
}
|
|
6119
|
-
|
|
6120
|
-
if (lr.enabled) {
|
|
6121
|
-
lr.enabled = parseBoolean(lr.enabled);
|
|
6122
|
-
}
|
|
6123
|
-
|
|
6124
|
-
return lr;
|
|
6150
|
+
return __assign(__assign(__assign({}, layer), !layer.id && {
|
|
6151
|
+
id: generateLayerId()
|
|
6152
|
+
}), layer.enabled && {
|
|
6153
|
+
enabled: parseBoolean(layer.enabled)
|
|
6154
|
+
});
|
|
6125
6155
|
};
|
|
6126
6156
|
|
|
6127
|
-
var
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
}) : null;
|
|
6134
|
-
var hasBaseLayers = filteredBaseLayers && filteredBaseLayers.length > 0;
|
|
6135
|
-
var baseLayers = hasBaseLayers ? filteredBaseLayers : undefined;
|
|
6136
|
-
return baseLayers;
|
|
6137
|
-
};
|
|
6138
|
-
var filterMapLayers = function filterMapLayers(presetArray) {
|
|
6139
|
-
var hasLayers = presetArray && Array.isArray(presetArray) && presetArray.length > 0;
|
|
6140
|
-
var filteredMapLayers = hasLayers ? presetArray.filter(function (preset) {
|
|
6141
|
-
return isMapLayer(preset);
|
|
6142
|
-
}).map(function (filteredPresetLayer) {
|
|
6143
|
-
return parseLayer(filteredPresetLayer);
|
|
6144
|
-
}) : null;
|
|
6145
|
-
var hasMapLayers = filteredMapLayers && filteredMapLayers.length > 0;
|
|
6146
|
-
var mapLayers = hasMapLayers ? filteredMapLayers : undefined;
|
|
6147
|
-
return mapLayers;
|
|
6157
|
+
var createEmtpyFilteredList = function createEmtpyFilteredList(existingList) {
|
|
6158
|
+
return {
|
|
6159
|
+
mapLayers: existingList,
|
|
6160
|
+
baseLayers: existingList,
|
|
6161
|
+
overLayers: existingList
|
|
6162
|
+
};
|
|
6148
6163
|
};
|
|
6149
|
-
|
|
6164
|
+
|
|
6165
|
+
var filterLayers = function filterLayers(layers, layerParser) {
|
|
6150
6166
|
if (layers === void 0) {
|
|
6151
6167
|
layers = [];
|
|
6152
6168
|
}
|
|
6153
6169
|
|
|
6170
|
+
if (layerParser === void 0) {
|
|
6171
|
+
layerParser = function layerParser(layer) {
|
|
6172
|
+
return layer;
|
|
6173
|
+
};
|
|
6174
|
+
}
|
|
6175
|
+
|
|
6154
6176
|
return layers.reduce(function (layers, layer) {
|
|
6155
6177
|
var mapLayers = layers.mapLayers,
|
|
6156
6178
|
baseLayers = layers.baseLayers,
|
|
6157
6179
|
overLayers = layers.overLayers;
|
|
6180
|
+
var parsedLayer = layerParser(layer);
|
|
6158
6181
|
|
|
6159
6182
|
if (layer.layerType === LayerType.baseLayer) {
|
|
6160
6183
|
return {
|
|
6161
6184
|
mapLayers: mapLayers,
|
|
6162
|
-
baseLayers: baseLayers.concat(
|
|
6185
|
+
baseLayers: baseLayers.concat(parsedLayer),
|
|
6163
6186
|
overLayers: overLayers
|
|
6164
6187
|
};
|
|
6165
6188
|
}
|
|
6166
6189
|
|
|
6167
6190
|
if (layer.layerType === LayerType.mapLayer) {
|
|
6168
6191
|
return {
|
|
6169
|
-
mapLayers: mapLayers.concat(
|
|
6192
|
+
mapLayers: mapLayers.concat(parsedLayer),
|
|
6170
6193
|
baseLayers: baseLayers,
|
|
6171
6194
|
overLayers: overLayers
|
|
6172
6195
|
};
|
|
@@ -6176,16 +6199,12 @@
|
|
|
6176
6199
|
return {
|
|
6177
6200
|
mapLayers: mapLayers,
|
|
6178
6201
|
baseLayers: baseLayers,
|
|
6179
|
-
overLayers: overLayers.concat(
|
|
6202
|
+
overLayers: overLayers.concat(parsedLayer)
|
|
6180
6203
|
};
|
|
6181
6204
|
}
|
|
6182
6205
|
|
|
6183
6206
|
return layers;
|
|
6184
|
-
},
|
|
6185
|
-
mapLayers: [],
|
|
6186
|
-
baseLayers: [],
|
|
6187
|
-
overLayers: []
|
|
6188
|
-
});
|
|
6207
|
+
}, createEmtpyFilteredList([]));
|
|
6189
6208
|
};
|
|
6190
6209
|
var filterServices = function filterServices(presetArray) {
|
|
6191
6210
|
var hasServices = presetArray && Array.isArray(presetArray) && presetArray.length > 0;
|
|
@@ -6196,21 +6215,28 @@
|
|
|
6196
6215
|
var services = hasValidServices ? validServices : undefined;
|
|
6197
6216
|
return services;
|
|
6198
6217
|
};
|
|
6199
|
-
var filterMapPresets = function filterMapPresets(
|
|
6200
|
-
var preset =
|
|
6201
|
-
var
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6218
|
+
var filterMapPresets = function filterMapPresets(initialAppPreset) {
|
|
6219
|
+
var preset = initialAppPreset && initialAppPreset.preset || {};
|
|
6220
|
+
var layers = preset.layers,
|
|
6221
|
+
services = preset.services,
|
|
6222
|
+
baseServices = preset.baseServices;
|
|
6223
|
+
|
|
6224
|
+
var _a = layers ? filterLayers(layers, parseLayer) : createEmtpyFilteredList(undefined),
|
|
6225
|
+
baseLayers = _a.baseLayers,
|
|
6226
|
+
mapLayers = _a.mapLayers;
|
|
6227
|
+
|
|
6228
|
+
var filterredServices = services ? filterServices(services) : undefined;
|
|
6229
|
+
var filteredBaseServices = baseServices ? filterServices(baseServices) : undefined;
|
|
6205
6230
|
var filteredPreset = {
|
|
6206
6231
|
services: filterredServices,
|
|
6207
|
-
baseServices:
|
|
6208
|
-
baseLayers:
|
|
6209
|
-
mapLayers:
|
|
6232
|
+
baseServices: filteredBaseServices,
|
|
6233
|
+
baseLayers: baseLayers,
|
|
6234
|
+
mapLayers: mapLayers
|
|
6210
6235
|
};
|
|
6211
6236
|
return filteredPreset;
|
|
6212
|
-
};
|
|
6213
|
-
|
|
6237
|
+
}; // loads the initialPresets.json
|
|
6238
|
+
|
|
6239
|
+
var getInitialAppPresets = function getInitialAppPresets(mapPreset, defaultInitialPresets) {
|
|
6214
6240
|
var filteredPresets = mapPreset ? filterMapPresets(mapPreset) : null;
|
|
6215
6241
|
var initialPresets = filteredPresets || filterMapPresets(defaultInitialPresets);
|
|
6216
6242
|
return initialPresets;
|
|
@@ -7143,47 +7169,11 @@
|
|
|
7143
7169
|
* See the License for the specific language governing permissions and
|
|
7144
7170
|
* limitations under the License.
|
|
7145
7171
|
*
|
|
7146
|
-
* Copyright
|
|
7147
|
-
* Copyright
|
|
7172
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
7173
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
7148
7174
|
* */
|
|
7149
7175
|
var defaultCanvasWidth = 150;
|
|
7150
|
-
var defaultCanvasHeight = 30;
|
|
7151
|
-
|
|
7152
|
-
var useStyles$s = makeStyles__default["default"](function (theme) {
|
|
7153
|
-
return {
|
|
7154
|
-
legendCanvas: {
|
|
7155
|
-
margin: '10px 0px 10px 0px'
|
|
7156
|
-
},
|
|
7157
|
-
noLegendTitle: {
|
|
7158
|
-
fontSize: '12px',
|
|
7159
|
-
fontFamily: 'Roboto, Helvetica, Arial',
|
|
7160
|
-
color: 'red'
|
|
7161
|
-
},
|
|
7162
|
-
legendComponent: {
|
|
7163
|
-
padding: 10,
|
|
7164
|
-
border: '1px solid grey',
|
|
7165
|
-
display: 'inline-block',
|
|
7166
|
-
backgroundColor: '#FFF',
|
|
7167
|
-
overflow: 'hidden',
|
|
7168
|
-
marginBottom: 4
|
|
7169
|
-
},
|
|
7170
|
-
legendTitle: {
|
|
7171
|
-
fontFamily: 'Roboto, Helvetica, Arial',
|
|
7172
|
-
fontSize: '10px',
|
|
7173
|
-
minWidth: defaultCanvasWidth,
|
|
7174
|
-
wordWrap: 'break-word',
|
|
7175
|
-
color: theme.palette.common.black
|
|
7176
|
-
},
|
|
7177
|
-
legendInfo: {
|
|
7178
|
-
fontFamily: 'Roboto, Helvetica, Arial',
|
|
7179
|
-
fontSize: 10,
|
|
7180
|
-
color: theme.palette.common.black,
|
|
7181
|
-
overflowX: 'hidden',
|
|
7182
|
-
minWidth: defaultCanvasWidth,
|
|
7183
|
-
wordWrap: 'break-word'
|
|
7184
|
-
}
|
|
7185
|
-
};
|
|
7186
|
-
});
|
|
7176
|
+
var defaultCanvasHeight = 30;
|
|
7187
7177
|
/**
|
|
7188
7178
|
* Renders a legendgraphic image based on a WMImage.
|
|
7189
7179
|
*
|
|
@@ -7217,7 +7207,6 @@
|
|
|
7217
7207
|
|
|
7218
7208
|
var Legend = function Legend(_a) {
|
|
7219
7209
|
var layer = _a.layer;
|
|
7220
|
-
var classes = useStyles$s();
|
|
7221
7210
|
/* Variable to remember the previous image */
|
|
7222
7211
|
|
|
7223
7212
|
var previousLegendImage = React.useRef(null);
|
|
@@ -7263,23 +7252,36 @@
|
|
|
7263
7252
|
var wmLayer = getWMLayerById(layer.id);
|
|
7264
7253
|
return /*#__PURE__*/React__default["default"].createElement(material.Paper, {
|
|
7265
7254
|
"data-testid": "legend",
|
|
7266
|
-
|
|
7267
|
-
|
|
7255
|
+
sx: {
|
|
7256
|
+
padding: '10px',
|
|
7257
|
+
border: '1px solid grey',
|
|
7258
|
+
display: 'inline-block',
|
|
7259
|
+
backgroundColor: '#FFF',
|
|
7260
|
+
overflow: 'hidden',
|
|
7261
|
+
marginBottom: 0.5
|
|
7262
|
+
}
|
|
7263
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
7268
7264
|
"data-testid": "legend-title",
|
|
7269
7265
|
style: {
|
|
7270
7266
|
maxWidth: canvasContainerWidth
|
|
7271
7267
|
}
|
|
7272
7268
|
}, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
7273
|
-
|
|
7269
|
+
sx: {
|
|
7270
|
+
fontFamily: 'Roboto, Helvetica, Arial',
|
|
7271
|
+
fontSize: '10px',
|
|
7272
|
+
minWidth: defaultCanvasWidth + "px",
|
|
7273
|
+
wordWrap: 'break-word',
|
|
7274
|
+
color: 'common.black'
|
|
7275
|
+
},
|
|
7274
7276
|
variant: "h3"
|
|
7275
7277
|
}, wmLayer && wmLayer.title)), /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
|
|
7276
7278
|
title: wmLayer && wmLayer.title || 'loading',
|
|
7277
7279
|
placement: "top"
|
|
7278
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
height: canvasContainerHeight,
|
|
7282
|
-
width: canvasContainerWidth
|
|
7280
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
7281
|
+
sx: {
|
|
7282
|
+
margin: '10px 0px 10px 0px',
|
|
7283
|
+
height: canvasContainerHeight + "px",
|
|
7284
|
+
width: canvasContainerWidth + "px"
|
|
7283
7285
|
}
|
|
7284
7286
|
}, /*#__PURE__*/React__default["default"].createElement(CanvasComponent, {
|
|
7285
7287
|
redrawInterval: 500,
|
|
@@ -7336,16 +7338,21 @@
|
|
|
7336
7338
|
renderLegendGraphic(previousLegendImage.current, ctx, imageWidth, imageHeight);
|
|
7337
7339
|
}
|
|
7338
7340
|
}
|
|
7339
|
-
}))), /*#__PURE__*/React__default["default"].createElement(
|
|
7341
|
+
}))), /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
7340
7342
|
"data-testid": "legend-info",
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7343
|
+
sx: {
|
|
7344
|
+
fontFamily: 'Roboto, Helvetica, Arial',
|
|
7345
|
+
fontSize: 10,
|
|
7346
|
+
color: 'common.black',
|
|
7347
|
+
overflowX: 'hidden',
|
|
7348
|
+
minWidth: defaultCanvasWidth + "px",
|
|
7349
|
+
wordWrap: 'break-word',
|
|
7350
|
+
maxWidth: canvasContainerWidth + "px"
|
|
7344
7351
|
}
|
|
7345
7352
|
}, layer.dimensions && layer.dimensions.map(function (dim) {
|
|
7346
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
7353
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
7347
7354
|
key: layer.name + dim.name
|
|
7348
|
-
}, dim.name === 'time' ? "" + dim.currentValue : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(
|
|
7355
|
+
}, dim.name === 'time' ? "" + dim.currentValue : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
7349
7356
|
style: {
|
|
7350
7357
|
fontWeight: 500
|
|
7351
7358
|
}
|
|
@@ -7366,23 +7373,9 @@
|
|
|
7366
7373
|
* See the License for the specific language governing permissions and
|
|
7367
7374
|
* limitations under the License.
|
|
7368
7375
|
*
|
|
7369
|
-
* Copyright
|
|
7370
|
-
* Copyright
|
|
7376
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
7377
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
7371
7378
|
* */
|
|
7372
|
-
var useStyles$r = makeStyles__default["default"](function () {
|
|
7373
|
-
return {
|
|
7374
|
-
legendList: {
|
|
7375
|
-
display: 'flex',
|
|
7376
|
-
flexDirection: 'column',
|
|
7377
|
-
'&>div:last-child': {
|
|
7378
|
-
marginBottom: 0
|
|
7379
|
-
}
|
|
7380
|
-
},
|
|
7381
|
-
legendContainer: {
|
|
7382
|
-
padding: 4
|
|
7383
|
-
}
|
|
7384
|
-
};
|
|
7385
|
-
});
|
|
7386
7379
|
|
|
7387
7380
|
var LegendDialog = function LegendDialog(_a) {
|
|
7388
7381
|
var layers = _a.layers,
|
|
@@ -7397,7 +7390,6 @@
|
|
|
7397
7390
|
order = _d === void 0 ? 0 : _d,
|
|
7398
7391
|
_e = _a.source,
|
|
7399
7392
|
source = _e === void 0 ? 'app' : _e;
|
|
7400
|
-
var classes = useStyles$r();
|
|
7401
7393
|
return /*#__PURE__*/React__namespace.createElement(shared.ToolContainerDraggable, {
|
|
7402
7394
|
startPosition: {
|
|
7403
7395
|
right: 20,
|
|
@@ -7414,11 +7406,19 @@
|
|
|
7414
7406
|
onMouseDown: onMouseDown,
|
|
7415
7407
|
order: order,
|
|
7416
7408
|
source: source
|
|
7417
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
7418
|
-
|
|
7419
|
-
|
|
7409
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
7410
|
+
sx: {
|
|
7411
|
+
padding: 0.5
|
|
7412
|
+
}
|
|
7413
|
+
}, layers && layers.length > 0 ? /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
7420
7414
|
"data-testid": "LegendList",
|
|
7421
|
-
|
|
7415
|
+
sx: {
|
|
7416
|
+
display: 'flex',
|
|
7417
|
+
flexDirection: 'column',
|
|
7418
|
+
'&>div:last-child': {
|
|
7419
|
+
marginBottom: 0
|
|
7420
|
+
}
|
|
7421
|
+
}
|
|
7422
7422
|
}, layers.map(function (layer) {
|
|
7423
7423
|
return /*#__PURE__*/React__namespace.createElement(Legend, {
|
|
7424
7424
|
key: layer.id,
|
|
@@ -8342,7 +8342,7 @@
|
|
|
8342
8342
|
}
|
|
8343
8343
|
});
|
|
8344
8344
|
}
|
|
8345
|
-
function rootSaga$
|
|
8345
|
+
function rootSaga$2() {
|
|
8346
8346
|
return __generator(this, function (_a) {
|
|
8347
8347
|
switch (_a.label) {
|
|
8348
8348
|
case 0:
|
|
@@ -8425,11 +8425,11 @@
|
|
|
8425
8425
|
var moduleConfig = {
|
|
8426
8426
|
id: 'webmap-module',
|
|
8427
8427
|
reducerMap: {
|
|
8428
|
-
webmap: reducer$
|
|
8429
|
-
services: reducer$
|
|
8430
|
-
layers: reducer$
|
|
8428
|
+
webmap: reducer$3,
|
|
8429
|
+
services: reducer$5,
|
|
8430
|
+
layers: reducer$6
|
|
8431
8431
|
},
|
|
8432
|
-
sagas: [rootSaga$
|
|
8432
|
+
sagas: [rootSaga$2]
|
|
8433
8433
|
};
|
|
8434
8434
|
|
|
8435
8435
|
function _typeof(obj) {
|
|
@@ -8465,15 +8465,15 @@
|
|
|
8465
8465
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
8466
8466
|
* */
|
|
8467
8467
|
var mergePresetsAndUserAddedServices = function mergePresetsAndUserAddedServices(presets, userAddedServices) {
|
|
8468
|
-
return Object.values(__assign(__assign({}, presets.reduce(function (
|
|
8468
|
+
return Object.values(__assign(__assign({}, presets.reduce(function (byUrl, preset) {
|
|
8469
8469
|
var _a;
|
|
8470
8470
|
|
|
8471
|
-
return __assign(__assign({},
|
|
8471
|
+
return __assign(__assign({}, byUrl), (_a = {}, _a[preset.url] = preset, _a));
|
|
8472
8472
|
}, {})), userAddedServices));
|
|
8473
8473
|
};
|
|
8474
|
-
var
|
|
8474
|
+
var isNoIdService = function isNoIdService(param) {
|
|
8475
8475
|
var serviceParam = param;
|
|
8476
|
-
return !!((serviceParam === null || serviceParam === void 0 ? void 0 : serviceParam.
|
|
8476
|
+
return !!((serviceParam === null || serviceParam === void 0 ? void 0 : serviceParam.name) && (serviceParam === null || serviceParam === void 0 ? void 0 : serviceParam.url));
|
|
8477
8477
|
};
|
|
8478
8478
|
|
|
8479
8479
|
var getUserAddedServices = function getUserAddedServices() {
|
|
@@ -8482,13 +8482,6 @@
|
|
|
8482
8482
|
var parsedData = JSON.parse(storedString);
|
|
8483
8483
|
|
|
8484
8484
|
if (parsedData && _typeof(parsedData) === 'object') {
|
|
8485
|
-
Object.values(parsedData).forEach(function (value) {
|
|
8486
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
8487
|
-
if (value.hasOwnProperty('url') && value.hasOwnProperty('id')) {
|
|
8488
|
-
var service = value;
|
|
8489
|
-
service.isUserAddedService = true;
|
|
8490
|
-
}
|
|
8491
|
-
});
|
|
8492
8485
|
return Object.entries(parsedData).reduce(function (userServices, _a) {
|
|
8493
8486
|
var _b;
|
|
8494
8487
|
|
|
@@ -8496,7 +8489,9 @@
|
|
|
8496
8489
|
serviceUrl = _c[0],
|
|
8497
8490
|
service = _c[1];
|
|
8498
8491
|
|
|
8499
|
-
return __assign(__assign({}, userServices),
|
|
8492
|
+
return __assign(__assign({}, userServices), isNoIdService(service) ? (_b = {}, _b[serviceUrl] = __assign(__assign({}, service), {
|
|
8493
|
+
isUserAddedService: true
|
|
8494
|
+
}), _b) : {});
|
|
8500
8495
|
}, {});
|
|
8501
8496
|
}
|
|
8502
8497
|
} catch (e) {
|
|
@@ -8590,7 +8585,6 @@
|
|
|
8590
8585
|
if (!isUserAddedService) return;
|
|
8591
8586
|
var localStorageServices = getUserAddedServices();
|
|
8592
8587
|
setUserAddedServices(__assign(__assign({}, localStorageServices), (_b = {}, _b[serviceUrl] = {
|
|
8593
|
-
id: serviceUrl,
|
|
8594
8588
|
name: name,
|
|
8595
8589
|
url: serviceUrl
|
|
8596
8590
|
}, _b)));
|
|
@@ -8606,7 +8600,7 @@
|
|
|
8606
8600
|
delete updatedServices[serviceUrl];
|
|
8607
8601
|
setUserAddedServices(updatedServices);
|
|
8608
8602
|
}
|
|
8609
|
-
function rootSaga() {
|
|
8603
|
+
function rootSaga$1() {
|
|
8610
8604
|
return __generator(this, function (_a) {
|
|
8611
8605
|
switch (_a.label) {
|
|
8612
8606
|
case 0:
|
|
@@ -8664,9 +8658,9 @@
|
|
|
8664
8658
|
var layerSelectConfig = {
|
|
8665
8659
|
id: 'layerSelect-module',
|
|
8666
8660
|
reducerMap: {
|
|
8667
|
-
layerSelect: reducer
|
|
8661
|
+
layerSelect: reducer$1
|
|
8668
8662
|
},
|
|
8669
|
-
sagas: [rootSaga]
|
|
8663
|
+
sagas: [rootSaga$1]
|
|
8670
8664
|
};
|
|
8671
8665
|
|
|
8672
8666
|
/* *
|
|
@@ -8682,33 +8676,164 @@
|
|
|
8682
8676
|
* See the License for the specific language governing permissions and
|
|
8683
8677
|
* limitations under the License.
|
|
8684
8678
|
*
|
|
8685
|
-
* Copyright
|
|
8686
|
-
* Copyright
|
|
8679
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8680
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
8687
8681
|
* */
|
|
8688
|
-
var
|
|
8682
|
+
var hideTime = 4000;
|
|
8683
|
+
function openSnackbarSaga(capturedAction) {
|
|
8684
|
+
var snackbarMessage, currentSnackbarMessages, id, currentSnackbarMessagesOpen;
|
|
8685
|
+
return __generator(this, function (_a) {
|
|
8686
|
+
switch (_a.label) {
|
|
8687
|
+
case 0:
|
|
8688
|
+
snackbarMessage = capturedAction.payload.message;
|
|
8689
|
+
return [4
|
|
8690
|
+
/*yield*/
|
|
8691
|
+
, effects.select(getCurrentSnackbarMessages)];
|
|
8689
8692
|
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8699
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8700
|
-
* See the License for the specific language governing permissions and
|
|
8701
|
-
* limitations under the License.
|
|
8702
|
-
*
|
|
8703
|
-
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8704
|
-
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
8705
|
-
* */
|
|
8706
|
-
/**
|
|
8707
|
-
* Converts webmapjs node structure to LayerTree
|
|
8708
|
-
* @param nodesToRecur THe WebMapJS node structure from service.getNodes();
|
|
8709
|
-
*/
|
|
8693
|
+
case 1:
|
|
8694
|
+
currentSnackbarMessages = _a.sent();
|
|
8695
|
+
if (!currentSnackbarMessages.length) return [3
|
|
8696
|
+
/*break*/
|
|
8697
|
+
, 3];
|
|
8698
|
+
return [4
|
|
8699
|
+
/*yield*/
|
|
8700
|
+
, effects.put(snackbarActions.closeSnackbar())];
|
|
8710
8701
|
|
|
8711
|
-
|
|
8702
|
+
case 2:
|
|
8703
|
+
_a.sent();
|
|
8704
|
+
|
|
8705
|
+
_a.label = 3;
|
|
8706
|
+
|
|
8707
|
+
case 3:
|
|
8708
|
+
id = "snackbar" + Date.now().toString();
|
|
8709
|
+
return [4
|
|
8710
|
+
/*yield*/
|
|
8711
|
+
, effects.put(snackbarActions.triggerOpenSnackbarBySaga({
|
|
8712
|
+
snackbarContent: {
|
|
8713
|
+
message: snackbarMessage,
|
|
8714
|
+
id: id
|
|
8715
|
+
}
|
|
8716
|
+
}))];
|
|
8717
|
+
|
|
8718
|
+
case 4:
|
|
8719
|
+
_a.sent(); // If no new snackbar is triggered cancelling this saga, hide the snackbar after X seconds
|
|
8720
|
+
|
|
8721
|
+
|
|
8722
|
+
return [4
|
|
8723
|
+
/*yield*/
|
|
8724
|
+
, effects.delay(hideTime)];
|
|
8725
|
+
|
|
8726
|
+
case 5:
|
|
8727
|
+
// If no new snackbar is triggered cancelling this saga, hide the snackbar after X seconds
|
|
8728
|
+
_a.sent();
|
|
8729
|
+
|
|
8730
|
+
return [4
|
|
8731
|
+
/*yield*/
|
|
8732
|
+
, effects.select(getCurrentSnackbarMessages)];
|
|
8733
|
+
|
|
8734
|
+
case 6:
|
|
8735
|
+
currentSnackbarMessagesOpen = _a.sent();
|
|
8736
|
+
if (!currentSnackbarMessagesOpen.length) return [3
|
|
8737
|
+
/*break*/
|
|
8738
|
+
, 8];
|
|
8739
|
+
return [4
|
|
8740
|
+
/*yield*/
|
|
8741
|
+
, effects.put(snackbarActions.closeSnackbar())];
|
|
8742
|
+
|
|
8743
|
+
case 7:
|
|
8744
|
+
_a.sent();
|
|
8745
|
+
|
|
8746
|
+
_a.label = 8;
|
|
8747
|
+
|
|
8748
|
+
case 8:
|
|
8749
|
+
return [2
|
|
8750
|
+
/*return*/
|
|
8751
|
+
];
|
|
8752
|
+
}
|
|
8753
|
+
});
|
|
8754
|
+
}
|
|
8755
|
+
function rootSaga() {
|
|
8756
|
+
return __generator(this, function (_a) {
|
|
8757
|
+
switch (_a.label) {
|
|
8758
|
+
case 0:
|
|
8759
|
+
return [4
|
|
8760
|
+
/*yield*/
|
|
8761
|
+
, effects.takeLatest(snackbarActions.openSnackbar.type, openSnackbarSaga)];
|
|
8762
|
+
|
|
8763
|
+
case 1:
|
|
8764
|
+
_a.sent();
|
|
8765
|
+
|
|
8766
|
+
return [2
|
|
8767
|
+
/*return*/
|
|
8768
|
+
];
|
|
8769
|
+
}
|
|
8770
|
+
});
|
|
8771
|
+
}
|
|
8772
|
+
|
|
8773
|
+
/* *
|
|
8774
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8775
|
+
* you may not use this file except in compliance with the License.
|
|
8776
|
+
* You may obtain a copy of the License at
|
|
8777
|
+
*
|
|
8778
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8779
|
+
*
|
|
8780
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8781
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8782
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8783
|
+
* See the License for the specific language governing permissions and
|
|
8784
|
+
* limitations under the License.
|
|
8785
|
+
*
|
|
8786
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8787
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
8788
|
+
* */
|
|
8789
|
+
var snackbarModuleConfig = {
|
|
8790
|
+
id: 'snackbar-module',
|
|
8791
|
+
reducerMap: {
|
|
8792
|
+
snackbar: reducer
|
|
8793
|
+
},
|
|
8794
|
+
sagas: [rootSaga]
|
|
8795
|
+
};
|
|
8796
|
+
|
|
8797
|
+
/* *
|
|
8798
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8799
|
+
* you may not use this file except in compliance with the License.
|
|
8800
|
+
* You may obtain a copy of the License at
|
|
8801
|
+
*
|
|
8802
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8803
|
+
*
|
|
8804
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8805
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8806
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8807
|
+
* See the License for the specific language governing permissions and
|
|
8808
|
+
* limitations under the License.
|
|
8809
|
+
*
|
|
8810
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8811
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8812
|
+
* */
|
|
8813
|
+
var coreModuleConfig = [moduleConfig, synchronizationGroupConfig, uiModuleConfig, layerSelectConfig, snackbarModuleConfig];
|
|
8814
|
+
|
|
8815
|
+
/* *
|
|
8816
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8817
|
+
* you may not use this file except in compliance with the License.
|
|
8818
|
+
* You may obtain a copy of the License at
|
|
8819
|
+
*
|
|
8820
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8821
|
+
*
|
|
8822
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8823
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8824
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8825
|
+
* See the License for the specific language governing permissions and
|
|
8826
|
+
* limitations under the License.
|
|
8827
|
+
*
|
|
8828
|
+
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8829
|
+
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
8830
|
+
* */
|
|
8831
|
+
/**
|
|
8832
|
+
* Converts webmapjs node structure to LayerTree
|
|
8833
|
+
* @param nodesToRecur THe WebMapJS node structure from service.getNodes();
|
|
8834
|
+
*/
|
|
8835
|
+
|
|
8836
|
+
var recurseNodes = function recurseNodes(nodesToRecur) {
|
|
8712
8837
|
var newLayerTreeObj = {
|
|
8713
8838
|
leaf: nodesToRecur.leaf,
|
|
8714
8839
|
name: nodesToRecur.name,
|
|
@@ -9262,25 +9387,9 @@
|
|
|
9262
9387
|
* See the License for the specific language governing permissions and
|
|
9263
9388
|
* limitations under the License.
|
|
9264
9389
|
*
|
|
9265
|
-
* Copyright
|
|
9266
|
-
* Copyright
|
|
9390
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9391
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
9267
9392
|
* */
|
|
9268
|
-
var useStyles$q = makeStyles__default["default"]({
|
|
9269
|
-
buttonDiv: {
|
|
9270
|
-
position: 'relative'
|
|
9271
|
-
},
|
|
9272
|
-
loadingButton: {
|
|
9273
|
-
position: 'absolute',
|
|
9274
|
-
top: 7,
|
|
9275
|
-
left: 7,
|
|
9276
|
-
zIndex: 1
|
|
9277
|
-
},
|
|
9278
|
-
button: {
|
|
9279
|
-
width: '24px',
|
|
9280
|
-
height: '24px',
|
|
9281
|
-
margin: '6px 0px 0px 10px'
|
|
9282
|
-
}
|
|
9283
|
-
});
|
|
9284
9393
|
|
|
9285
9394
|
var validateServiceUrl = function validateServiceUrl(url) {
|
|
9286
9395
|
if (url === '' || url === null || typeof url === 'undefined') return false;
|
|
@@ -9298,7 +9407,6 @@
|
|
|
9298
9407
|
handleClose = _a.handleClose,
|
|
9299
9408
|
_d = _a.layerType,
|
|
9300
9409
|
layerType = _d === void 0 ? LayerType.mapLayer : _d;
|
|
9301
|
-
var classes = useStyles$q();
|
|
9302
9410
|
|
|
9303
9411
|
var _e = __read(React__namespace.useState(''), 2),
|
|
9304
9412
|
serviceURL = _e[0],
|
|
@@ -9415,7 +9523,9 @@
|
|
|
9415
9523
|
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
9416
9524
|
item: true,
|
|
9417
9525
|
xs: 2,
|
|
9418
|
-
|
|
9526
|
+
sx: {
|
|
9527
|
+
position: 'relative'
|
|
9528
|
+
}
|
|
9419
9529
|
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
9420
9530
|
"data-testid": "add-service",
|
|
9421
9531
|
onClick: handleAddServiceURL,
|
|
@@ -9423,7 +9533,12 @@
|
|
|
9423
9533
|
size: "large"
|
|
9424
9534
|
}, /*#__PURE__*/React__namespace.createElement(theme.Add, null)), loading && /*#__PURE__*/React__namespace.createElement(material.CircularProgress, {
|
|
9425
9535
|
size: 35,
|
|
9426
|
-
|
|
9536
|
+
sx: {
|
|
9537
|
+
position: 'absolute',
|
|
9538
|
+
top: '7px',
|
|
9539
|
+
left: '7px',
|
|
9540
|
+
zIndex: 1
|
|
9541
|
+
}
|
|
9427
9542
|
})))), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
9428
9543
|
m: 2
|
|
9429
9544
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
@@ -9467,7 +9582,7 @@
|
|
|
9467
9582
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9468
9583
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9469
9584
|
* */
|
|
9470
|
-
var styles$
|
|
9585
|
+
var styles$4 = {
|
|
9471
9586
|
buttonDiv: {
|
|
9472
9587
|
position: 'relative'
|
|
9473
9588
|
},
|
|
@@ -9528,7 +9643,7 @@
|
|
|
9528
9643
|
onBlur: onBlurTooltip
|
|
9529
9644
|
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
9530
9645
|
onClick: handleClose,
|
|
9531
|
-
sx: styles$
|
|
9646
|
+
sx: styles$4.button,
|
|
9532
9647
|
disableRipple: true,
|
|
9533
9648
|
"data-testid": "addLayersButton",
|
|
9534
9649
|
ref: ref,
|
|
@@ -9555,12 +9670,12 @@
|
|
|
9555
9670
|
* See the License for the specific language governing permissions and
|
|
9556
9671
|
* limitations under the License.
|
|
9557
9672
|
*
|
|
9558
|
-
* Copyright
|
|
9559
|
-
* Copyright
|
|
9673
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9674
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
9560
9675
|
* */
|
|
9561
9676
|
var iconButtonSize = 30;
|
|
9562
9677
|
var totalButtons = 5;
|
|
9563
|
-
var LayerManagerColumnsLarge =
|
|
9678
|
+
var LayerManagerColumnsLarge = {
|
|
9564
9679
|
column1: {
|
|
9565
9680
|
width: iconButtonSize * 3,
|
|
9566
9681
|
display: 'flex'
|
|
@@ -9584,8 +9699,8 @@
|
|
|
9584
9699
|
columns35: {
|
|
9585
9700
|
width: "calc((100% - " + iconButtonSize * totalButtons + "px) * 0.75)"
|
|
9586
9701
|
}
|
|
9587
|
-
}
|
|
9588
|
-
var LayerManagerColumnsSmall =
|
|
9702
|
+
};
|
|
9703
|
+
var LayerManagerColumnsSmall = {
|
|
9589
9704
|
column1: {
|
|
9590
9705
|
width: iconButtonSize * 3
|
|
9591
9706
|
},
|
|
@@ -9608,7 +9723,7 @@
|
|
|
9608
9723
|
columns35: {
|
|
9609
9724
|
display: 'none'
|
|
9610
9725
|
}
|
|
9611
|
-
}
|
|
9726
|
+
};
|
|
9612
9727
|
var LayerManagerWidth;
|
|
9613
9728
|
|
|
9614
9729
|
(function (LayerManagerWidth) {
|
|
@@ -9688,10 +9803,10 @@
|
|
|
9688
9803
|
* See the License for the specific language governing permissions and
|
|
9689
9804
|
* limitations under the License.
|
|
9690
9805
|
*
|
|
9691
|
-
* Copyright
|
|
9692
|
-
* Copyright
|
|
9806
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9807
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
9693
9808
|
* */
|
|
9694
|
-
var
|
|
9809
|
+
var styles$3 = {
|
|
9695
9810
|
row: {
|
|
9696
9811
|
height: '32px'
|
|
9697
9812
|
},
|
|
@@ -9702,7 +9817,7 @@
|
|
|
9702
9817
|
fontFamily: 'Roboto',
|
|
9703
9818
|
opacity: 0.67
|
|
9704
9819
|
}
|
|
9705
|
-
}
|
|
9820
|
+
};
|
|
9706
9821
|
|
|
9707
9822
|
var DescriptionRow = function DescriptionRow(_a) {
|
|
9708
9823
|
var mapId = _a.mapId,
|
|
@@ -9715,16 +9830,15 @@
|
|
|
9715
9830
|
layerManagerWidth = _a.layerManagerWidth,
|
|
9716
9831
|
_e = _a.layerSelect,
|
|
9717
9832
|
layerSelect = _e === void 0 ? false : _e;
|
|
9718
|
-
var
|
|
9719
|
-
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
9833
|
+
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall : LayerManagerColumnsLarge;
|
|
9720
9834
|
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
9721
9835
|
container: true,
|
|
9722
9836
|
item: true,
|
|
9723
9837
|
"data-testid": "descriptionRow",
|
|
9724
|
-
|
|
9838
|
+
sx: styles$3.row
|
|
9725
9839
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
9726
9840
|
item: true,
|
|
9727
|
-
|
|
9841
|
+
sx: columnSizes.column1
|
|
9728
9842
|
}, /*#__PURE__*/React__namespace.createElement(AddLayersButton, {
|
|
9729
9843
|
preloadedServices: preloadedServices,
|
|
9730
9844
|
tooltip: tooltip,
|
|
@@ -9739,23 +9853,23 @@
|
|
|
9739
9853
|
}), layerSelect && /*#__PURE__*/React__namespace.createElement(LayerSelectButtonConnect, {
|
|
9740
9854
|
mapId: mapId
|
|
9741
9855
|
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
9742
|
-
|
|
9743
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
9744
|
-
|
|
9856
|
+
sx: columnSizes.column2
|
|
9857
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
9858
|
+
sx: styles$3.text
|
|
9745
9859
|
}, "Layer")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
9746
|
-
|
|
9747
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
9748
|
-
|
|
9860
|
+
sx: columnSizes.column3
|
|
9861
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
9862
|
+
sx: styles$3.text
|
|
9749
9863
|
}, "Style")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
9750
|
-
|
|
9751
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
9752
|
-
|
|
9864
|
+
sx: columnSizes.column4
|
|
9865
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
9866
|
+
sx: styles$3.text
|
|
9753
9867
|
}, "Opacity")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
9754
|
-
|
|
9755
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
9756
|
-
|
|
9868
|
+
sx: columnSizes.column5
|
|
9869
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
9870
|
+
sx: styles$3.text
|
|
9757
9871
|
}, "Dimensions")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
9758
|
-
|
|
9872
|
+
sx: columnSizes.column6
|
|
9759
9873
|
}));
|
|
9760
9874
|
};
|
|
9761
9875
|
|
|
@@ -9936,24 +10050,9 @@
|
|
|
9936
10050
|
* See the License for the specific language governing permissions and
|
|
9937
10051
|
* limitations under the License.
|
|
9938
10052
|
*
|
|
9939
|
-
* Copyright
|
|
9940
|
-
* Copyright
|
|
10053
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10054
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
9941
10055
|
* */
|
|
9942
|
-
var useStyles$o = makeStyles__default["default"](function (theme) {
|
|
9943
|
-
return createStyles__default["default"]({
|
|
9944
|
-
dropdownEmpty: {
|
|
9945
|
-
paddingLeft: 8,
|
|
9946
|
-
height: 32,
|
|
9947
|
-
display: 'inline-flex',
|
|
9948
|
-
alignItems: 'center'
|
|
9949
|
-
},
|
|
9950
|
-
emptyText: {
|
|
9951
|
-
fontSize: theme.palette.geowebColors.layerManager.tableRowDefaultText.fontSize,
|
|
9952
|
-
color: theme.palette.geowebColors.layerManager.tableRowDefaultText.rgba,
|
|
9953
|
-
fontWeight: 500
|
|
9954
|
-
}
|
|
9955
|
-
});
|
|
9956
|
-
});
|
|
9957
10056
|
|
|
9958
10057
|
var getRenderLayersValues = function getRenderLayersValues(layerName, layers) {
|
|
9959
10058
|
var serviceLayer = layers.find(function (l) {
|
|
@@ -9991,14 +10090,22 @@
|
|
|
9991
10090
|
layers = _c === void 0 ? [] : _c,
|
|
9992
10091
|
_d = _a.isEnabled,
|
|
9993
10092
|
isEnabled = _d === void 0 ? true : _d;
|
|
9994
|
-
var classes = useStyles$o();
|
|
9995
10093
|
|
|
9996
10094
|
if (!layers || !layers.length) {
|
|
9997
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
9998
|
-
|
|
10095
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
10096
|
+
sx: {
|
|
10097
|
+
paddingLeft: 1,
|
|
10098
|
+
height: '32px',
|
|
10099
|
+
display: 'inline-flex',
|
|
10100
|
+
alignItems: 'center'
|
|
10101
|
+
}
|
|
9999
10102
|
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
10000
10103
|
variant: "body1",
|
|
10001
|
-
|
|
10104
|
+
sx: {
|
|
10105
|
+
fontSize: 'geowebColors.layerManager.tableRowDefaultText.fontSize',
|
|
10106
|
+
color: 'geowebColors.layerManager.tableRowDefaultText.rgba',
|
|
10107
|
+
fontWeight: 500
|
|
10108
|
+
}
|
|
10002
10109
|
}, "No service available"));
|
|
10003
10110
|
}
|
|
10004
10111
|
|
|
@@ -10070,37 +10177,9 @@
|
|
|
10070
10177
|
* See the License for the specific language governing permissions and
|
|
10071
10178
|
* limitations under the License.
|
|
10072
10179
|
*
|
|
10073
|
-
* Copyright
|
|
10074
|
-
* Copyright
|
|
10180
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10181
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
10075
10182
|
* */
|
|
10076
|
-
var useStyles$n = makeStyles__default["default"](function (theme) {
|
|
10077
|
-
return {
|
|
10078
|
-
opacityDiv: {
|
|
10079
|
-
height: 'calc(100% - 5px)',
|
|
10080
|
-
width: '100%',
|
|
10081
|
-
position: 'relative',
|
|
10082
|
-
top: '2px'
|
|
10083
|
-
},
|
|
10084
|
-
opacityButton: {
|
|
10085
|
-
height: '100%',
|
|
10086
|
-
width: '100%',
|
|
10087
|
-
borderRadius: '0',
|
|
10088
|
-
minWidth: '49px'
|
|
10089
|
-
},
|
|
10090
|
-
sliderBackground: {
|
|
10091
|
-
padding: '0 0 60px 0',
|
|
10092
|
-
marginLeft: '60px',
|
|
10093
|
-
backgroundColor: theme.palette.geowebColors.background.surface,
|
|
10094
|
-
width: '82px',
|
|
10095
|
-
height: '248px',
|
|
10096
|
-
position: 'fixed',
|
|
10097
|
-
top: '-5px',
|
|
10098
|
-
boxSizing: 'initial',
|
|
10099
|
-
zIndex: 2,
|
|
10100
|
-
boxShadow: theme.shadows[8]
|
|
10101
|
-
}
|
|
10102
|
-
};
|
|
10103
|
-
});
|
|
10104
10183
|
var marks$1 = [{
|
|
10105
10184
|
value: 0,
|
|
10106
10185
|
label: '0 %'
|
|
@@ -10133,7 +10212,6 @@
|
|
|
10133
10212
|
onLayerChangeOpacity = _a.onLayerChangeOpacity,
|
|
10134
10213
|
_b = _a.isEnabled,
|
|
10135
10214
|
isEnabled = _b === void 0 ? true : _b;
|
|
10136
|
-
var classes = useStyles$n();
|
|
10137
10215
|
|
|
10138
10216
|
var _c = __read(React__namespace.useState(false), 2),
|
|
10139
10217
|
open = _c[0],
|
|
@@ -10176,10 +10254,15 @@
|
|
|
10176
10254
|
setTooltipOpen(false);
|
|
10177
10255
|
}, []);
|
|
10178
10256
|
var currentOpacityText = Math.round(currentOpacity * 100) + " %";
|
|
10179
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
10180
|
-
className: classes.opacityDiv,
|
|
10257
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
10181
10258
|
onWheel: onWheel,
|
|
10182
|
-
"data-testid": "scrollOpacity"
|
|
10259
|
+
"data-testid": "scrollOpacity",
|
|
10260
|
+
sx: {
|
|
10261
|
+
height: 'calc(100% - 5px)',
|
|
10262
|
+
width: '100%',
|
|
10263
|
+
position: 'relative',
|
|
10264
|
+
top: '2px'
|
|
10265
|
+
}
|
|
10183
10266
|
}, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
10184
10267
|
title: "Opacity: " + currentOpacityText,
|
|
10185
10268
|
sx: shared.tooltipContainerStyles(isEnabled),
|
|
@@ -10187,16 +10270,32 @@
|
|
|
10187
10270
|
open: tooltipOpen
|
|
10188
10271
|
}, /*#__PURE__*/React__namespace.createElement(material.Button, {
|
|
10189
10272
|
tabIndex: 0,
|
|
10190
|
-
className: classes.opacityButton,
|
|
10191
10273
|
onClick: onClickButton,
|
|
10192
10274
|
"data-testid": "selectOpacity",
|
|
10193
10275
|
disableRipple: true,
|
|
10194
10276
|
onMouseEnter: onMouseEnter,
|
|
10195
10277
|
onMouseLeave: onMouseLeave,
|
|
10196
10278
|
onFocus: onFocus,
|
|
10197
|
-
onBlur: onBlur
|
|
10198
|
-
|
|
10199
|
-
|
|
10279
|
+
onBlur: onBlur,
|
|
10280
|
+
style: {
|
|
10281
|
+
height: '100%',
|
|
10282
|
+
width: '100%',
|
|
10283
|
+
borderRadius: '0',
|
|
10284
|
+
minWidth: '49px'
|
|
10285
|
+
}
|
|
10286
|
+
}, currentOpacityText)), open ? /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
10287
|
+
sx: {
|
|
10288
|
+
padding: '0 0 60px 0',
|
|
10289
|
+
marginLeft: '60px',
|
|
10290
|
+
backgroundColor: 'geowebColors.background.surface',
|
|
10291
|
+
width: '82px',
|
|
10292
|
+
height: '248px',
|
|
10293
|
+
position: 'fixed',
|
|
10294
|
+
top: '-5px',
|
|
10295
|
+
boxSizing: 'initial',
|
|
10296
|
+
zIndex: 2,
|
|
10297
|
+
boxShadow: 8
|
|
10298
|
+
}
|
|
10200
10299
|
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
10201
10300
|
sx: shared.sliderHeaderStyle
|
|
10202
10301
|
}, "Opacity"), /*#__PURE__*/React__namespace.createElement(shared.CustomSlider, {
|
|
@@ -10346,26 +10445,22 @@
|
|
|
10346
10445
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10347
10446
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10348
10447
|
* */
|
|
10349
|
-
var useStyles$m = makeStyles__default["default"](function (theme) {
|
|
10350
|
-
return createStyles__default["default"]({
|
|
10351
|
-
svgIcon: {
|
|
10352
|
-
fill: function fill(_a) {
|
|
10353
|
-
var isActive = _a.isActive,
|
|
10354
|
-
isEnabled = _a.isEnabled;
|
|
10355
|
-
|
|
10356
|
-
if (isActive) {
|
|
10357
|
-
return theme.palette.common.white;
|
|
10358
|
-
}
|
|
10359
10448
|
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10449
|
+
var makeIconStyle = function makeIconStyle(isActive, isEnabled) {
|
|
10450
|
+
return {
|
|
10451
|
+
color: function color() {
|
|
10452
|
+
if (isActive) {
|
|
10453
|
+
return 'common.white';
|
|
10454
|
+
}
|
|
10363
10455
|
|
|
10364
|
-
|
|
10456
|
+
if (isEnabled) {
|
|
10457
|
+
return 'geowebColors.buttons.flat.default.color';
|
|
10365
10458
|
}
|
|
10459
|
+
|
|
10460
|
+
return 'geowebColors.buttons.flat.disabled.color';
|
|
10366
10461
|
}
|
|
10367
|
-
}
|
|
10368
|
-
}
|
|
10462
|
+
};
|
|
10463
|
+
};
|
|
10369
10464
|
|
|
10370
10465
|
var ActivateLayer = function ActivateLayer(_a) {
|
|
10371
10466
|
var _b = _a.tooltipTitle,
|
|
@@ -10375,15 +10470,12 @@
|
|
|
10375
10470
|
isActive = _c === void 0 ? false : _c,
|
|
10376
10471
|
_d = _a.isEnabled,
|
|
10377
10472
|
isEnabled = _d === void 0 ? true : _d;
|
|
10378
|
-
var
|
|
10379
|
-
isActive: isActive,
|
|
10380
|
-
isEnabled: isEnabled
|
|
10381
|
-
});
|
|
10473
|
+
var iconStyle = makeIconStyle(isActive, isEnabled);
|
|
10382
10474
|
return /*#__PURE__*/React__namespace.createElement(shared.ManagerButton, {
|
|
10383
10475
|
tooltipTitle: tooltipTitle,
|
|
10384
10476
|
onClick: onClickActivate,
|
|
10385
10477
|
icon: /*#__PURE__*/React__namespace.createElement(theme.Flag, {
|
|
10386
|
-
|
|
10478
|
+
sx: iconStyle
|
|
10387
10479
|
}),
|
|
10388
10480
|
testId: "activateLayerButton",
|
|
10389
10481
|
isActive: isActive
|
|
@@ -10403,31 +10495,9 @@
|
|
|
10403
10495
|
* See the License for the specific language governing permissions and
|
|
10404
10496
|
* limitations under the License.
|
|
10405
10497
|
*
|
|
10406
|
-
* Copyright
|
|
10407
|
-
* Copyright
|
|
10498
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10499
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
10408
10500
|
* */
|
|
10409
|
-
var useStyles$l = makeStyles__default["default"](function (theme) {
|
|
10410
|
-
return createStyles__default["default"]({
|
|
10411
|
-
row: {
|
|
10412
|
-
background: function background(isEnabled) {
|
|
10413
|
-
return isEnabled ? theme.palette.geowebColors.layerManager.tableRowDefaultCardContainer.fill : theme.palette.geowebColors.layerManager.tableRowDisabledCardContainer.fill;
|
|
10414
|
-
},
|
|
10415
|
-
border: function border(isEnabled) {
|
|
10416
|
-
return isEnabled ? theme.palette.geowebColors.layerManager.tableRowDefaultCardContainer.border : theme.palette.geowebColors.layerManager.tableRowDisabledCardContainer.border;
|
|
10417
|
-
},
|
|
10418
|
-
borderRadius: theme.shape.borderRadius,
|
|
10419
|
-
marginBottom: 4,
|
|
10420
|
-
height: 34,
|
|
10421
|
-
'&.sortable-drag': {
|
|
10422
|
-
boxShadow: theme.shadows[4] // elevation_06
|
|
10423
|
-
|
|
10424
|
-
},
|
|
10425
|
-
'&.sortable-ghost': {
|
|
10426
|
-
opacity: 0.5
|
|
10427
|
-
}
|
|
10428
|
-
}
|
|
10429
|
-
});
|
|
10430
|
-
});
|
|
10431
10501
|
|
|
10432
10502
|
var LayerRow = function LayerRow(_a) {
|
|
10433
10503
|
var layerId = _a.layerId,
|
|
@@ -10460,21 +10530,33 @@
|
|
|
10460
10530
|
layerActiveLayout = _a.layerActiveLayout,
|
|
10461
10531
|
layerManagerWidth = _a.layerManagerWidth,
|
|
10462
10532
|
dragHandle = _a.dragHandle;
|
|
10463
|
-
var
|
|
10464
|
-
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
10533
|
+
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall : LayerManagerColumnsLarge;
|
|
10465
10534
|
|
|
10466
10535
|
var onClickRow = function onClickRow() {
|
|
10467
10536
|
return onLayerRowClick(layerId);
|
|
10468
10537
|
};
|
|
10469
10538
|
|
|
10470
10539
|
return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
10471
|
-
className: classes.row,
|
|
10472
10540
|
item: true,
|
|
10473
10541
|
container: true,
|
|
10474
|
-
"data-testid": "layerRow-" + layerId
|
|
10542
|
+
"data-testid": "layerRow-" + layerId,
|
|
10543
|
+
sx: {
|
|
10544
|
+
backgroundColor: isEnabled ? 'geowebColors.layerManager.tableRowDefaultCardContainer.fill' : 'geowebColors.layerManager.tableRowDisabledCardContainer.fill',
|
|
10545
|
+
border: 1,
|
|
10546
|
+
borderColor: isEnabled ? 'geowebColors.layerManager.tableRowDefaultCardContainer.borderColor' : 'geowebColors.layerManager.tableRowDisabledCardContainer.borderColor',
|
|
10547
|
+
borderRadius: 1,
|
|
10548
|
+
marginBottom: 0.5,
|
|
10549
|
+
height: '34px',
|
|
10550
|
+
'&.sortable-drag': {
|
|
10551
|
+
boxShadow: 4
|
|
10552
|
+
},
|
|
10553
|
+
'&.sortable-ghost': {
|
|
10554
|
+
opacity: 0.5
|
|
10555
|
+
}
|
|
10556
|
+
}
|
|
10475
10557
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
10476
10558
|
item: true,
|
|
10477
|
-
|
|
10559
|
+
sx: columnSizes.column1
|
|
10478
10560
|
}, dragHandle, layerEnableLayout || /*#__PURE__*/React__default["default"].createElement(shared.EnableButton, {
|
|
10479
10561
|
isEnabled: layer.enabled,
|
|
10480
10562
|
title: layer.name,
|
|
@@ -10488,7 +10570,7 @@
|
|
|
10488
10570
|
onClickActivate: onClickRow
|
|
10489
10571
|
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
10490
10572
|
item: true,
|
|
10491
|
-
|
|
10573
|
+
sx: columnSizes.column2
|
|
10492
10574
|
}, layerServicesLayout || /*#__PURE__*/React__default["default"].createElement(RenderLayers, {
|
|
10493
10575
|
layerName: layer.name,
|
|
10494
10576
|
layers: services && layer.service && services[layer.service] && services[layer.service].layers || [],
|
|
@@ -10500,13 +10582,13 @@
|
|
|
10500
10582
|
}
|
|
10501
10583
|
})), isLayerMissing ? /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
10502
10584
|
item: true,
|
|
10503
|
-
|
|
10585
|
+
sx: columnSizes.columns35
|
|
10504
10586
|
}, /*#__PURE__*/React__default["default"].createElement(shared.AlertBanner, {
|
|
10505
10587
|
title: "This layer could not be loaded: does not exist on the server.",
|
|
10506
10588
|
isCompact: true
|
|
10507
10589
|
})) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
10508
10590
|
item: true,
|
|
10509
|
-
|
|
10591
|
+
sx: columnSizes.column3
|
|
10510
10592
|
}, layerStylesLayout || /*#__PURE__*/React__default["default"].createElement(RenderStyles, {
|
|
10511
10593
|
layerStyles: layer.styles,
|
|
10512
10594
|
currentLayerStyle: layer.style,
|
|
@@ -10518,7 +10600,7 @@
|
|
|
10518
10600
|
}
|
|
10519
10601
|
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
10520
10602
|
item: true,
|
|
10521
|
-
|
|
10603
|
+
sx: columnSizes.column4
|
|
10522
10604
|
}, layerOpacityLayout || /*#__PURE__*/React__default["default"].createElement(OpacitySelect, {
|
|
10523
10605
|
currentOpacity: layer.opacity,
|
|
10524
10606
|
onLayerChangeOpacity: function onLayerChangeOpacity(_opacity) {
|
|
@@ -10529,7 +10611,7 @@
|
|
|
10529
10611
|
}
|
|
10530
10612
|
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
10531
10613
|
item: true,
|
|
10532
|
-
|
|
10614
|
+
sx: columnSizes.column5
|
|
10533
10615
|
}, layerDimensionLayout || /*#__PURE__*/React__default["default"].createElement(DimensionSelect, {
|
|
10534
10616
|
layerId: layerId,
|
|
10535
10617
|
layerDimensions: filterNonTimeDimensions(layer.dimensions),
|
|
@@ -10547,7 +10629,7 @@
|
|
|
10547
10629
|
}
|
|
10548
10630
|
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
10549
10631
|
item: true,
|
|
10550
|
-
|
|
10632
|
+
sx: columnSizes.column6
|
|
10551
10633
|
}, layerDeleteLayout || /*#__PURE__*/React__default["default"].createElement(shared.ManagerDeleteButton, {
|
|
10552
10634
|
tooltipTitle: "Delete",
|
|
10553
10635
|
onClickDelete: function onClickDelete() {
|
|
@@ -11115,24 +11197,9 @@
|
|
|
11115
11197
|
* See the License for the specific language governing permissions and
|
|
11116
11198
|
* limitations under the License.
|
|
11117
11199
|
*
|
|
11118
|
-
* Copyright
|
|
11119
|
-
* Copyright
|
|
11200
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11201
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
11120
11202
|
* */
|
|
11121
|
-
var useStyles$k = makeStyles__default["default"](function () {
|
|
11122
|
-
return {
|
|
11123
|
-
layerRows: {
|
|
11124
|
-
width: '100%',
|
|
11125
|
-
maxHeight: 'calc(100% - 10px)',
|
|
11126
|
-
overflow: 'auto'
|
|
11127
|
-
},
|
|
11128
|
-
sortableRow: {
|
|
11129
|
-
width: '100%',
|
|
11130
|
-
cursor: function cursor(isSorting) {
|
|
11131
|
-
return isSorting ? 'grabbing' : 'inherit';
|
|
11132
|
-
}
|
|
11133
|
-
}
|
|
11134
|
-
};
|
|
11135
|
-
});
|
|
11136
11203
|
|
|
11137
11204
|
var LayerContainerRow = function LayerContainerRow(_a) {
|
|
11138
11205
|
var mapId = _a.mapId,
|
|
@@ -11189,7 +11256,6 @@
|
|
|
11189
11256
|
|
|
11190
11257
|
var isSorting = activeDragIndex !== null;
|
|
11191
11258
|
var isDragDisabled = layerIds.length === 1;
|
|
11192
|
-
var classes = useStyles$k(isSorting);
|
|
11193
11259
|
|
|
11194
11260
|
var keyPressedTrue = function keyPressedTrue(event) {
|
|
11195
11261
|
if (event.ctrlKey || event.metaKey) {
|
|
@@ -11229,8 +11295,12 @@
|
|
|
11229
11295
|
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
11230
11296
|
container: true,
|
|
11231
11297
|
item: true,
|
|
11232
|
-
|
|
11233
|
-
|
|
11298
|
+
"data-testid": "layerContainerRow",
|
|
11299
|
+
sx: {
|
|
11300
|
+
width: '100%',
|
|
11301
|
+
maxHeight: 'calc(100% - 10px)',
|
|
11302
|
+
overflow: 'auto'
|
|
11303
|
+
}
|
|
11234
11304
|
}, /*#__PURE__*/React__namespace.createElement(reactSortablejs.ReactSortable, {
|
|
11235
11305
|
tag: "div",
|
|
11236
11306
|
list: layerIds.map(function (layerId) {
|
|
@@ -11245,9 +11315,12 @@
|
|
|
11245
11315
|
direction: "vertical",
|
|
11246
11316
|
// hover props
|
|
11247
11317
|
forceFallback: true,
|
|
11248
|
-
className: classes.sortableRow,
|
|
11249
11318
|
onStart: onStart,
|
|
11250
|
-
onEnd: onEnd
|
|
11319
|
+
onEnd: onEnd,
|
|
11320
|
+
style: {
|
|
11321
|
+
width: '100%',
|
|
11322
|
+
cursor: isSorting ? 'grabbing' : 'inherit'
|
|
11323
|
+
}
|
|
11251
11324
|
}, layerIds.map(function (layerId, index) {
|
|
11252
11325
|
return /*#__PURE__*/React__namespace.createElement(LayerRowConnect, {
|
|
11253
11326
|
mapId: mapId,
|
|
@@ -11449,22 +11522,9 @@
|
|
|
11449
11522
|
* See the License for the specific language governing permissions and
|
|
11450
11523
|
* limitations under the License.
|
|
11451
11524
|
*
|
|
11452
|
-
* Copyright
|
|
11453
|
-
* Copyright
|
|
11525
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11526
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
11454
11527
|
* */
|
|
11455
|
-
var useStyles$j = makeStyles__default["default"]({
|
|
11456
|
-
layerRow: {
|
|
11457
|
-
width: '100%',
|
|
11458
|
-
height: '36px'
|
|
11459
|
-
},
|
|
11460
|
-
icon: {
|
|
11461
|
-
width: '24px',
|
|
11462
|
-
height: '24px'
|
|
11463
|
-
},
|
|
11464
|
-
addBaseLayers: {
|
|
11465
|
-
marginTop: '-2px'
|
|
11466
|
-
}
|
|
11467
|
-
});
|
|
11468
11528
|
|
|
11469
11529
|
var BaseLayerRow = function BaseLayerRow(_a) {
|
|
11470
11530
|
var mapId = _a.mapId,
|
|
@@ -11475,16 +11535,20 @@
|
|
|
11475
11535
|
layerManagerWidth = _a.layerManagerWidth,
|
|
11476
11536
|
_d = _a.tooltip,
|
|
11477
11537
|
tooltip = _d === void 0 ? '' : _d;
|
|
11478
|
-
var
|
|
11479
|
-
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
11538
|
+
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall : LayerManagerColumnsLarge;
|
|
11480
11539
|
return /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
11481
11540
|
container: true,
|
|
11482
11541
|
item: true,
|
|
11483
|
-
|
|
11484
|
-
|
|
11542
|
+
"data-testid": "baseLayerRow",
|
|
11543
|
+
sx: {
|
|
11544
|
+
width: '100%',
|
|
11545
|
+
height: '36px'
|
|
11546
|
+
}
|
|
11485
11547
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
11486
11548
|
item: true,
|
|
11487
|
-
|
|
11549
|
+
sx: __assign(__assign({}, columnSizes.column1), {
|
|
11550
|
+
marginTop: '-2px'
|
|
11551
|
+
})
|
|
11488
11552
|
}, /*#__PURE__*/React__namespace.createElement(AddLayersButton, {
|
|
11489
11553
|
preloadedServices: preloadedServices,
|
|
11490
11554
|
tooltip: tooltip,
|
|
@@ -11497,7 +11561,7 @@
|
|
|
11497
11561
|
}
|
|
11498
11562
|
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
11499
11563
|
item: true,
|
|
11500
|
-
|
|
11564
|
+
sx: columnSizes.column2
|
|
11501
11565
|
}, /*#__PURE__*/React__namespace.createElement(BaseLayersConnect, {
|
|
11502
11566
|
mapId: mapId,
|
|
11503
11567
|
preloadedAvailableBaseLayers: preloadedAvailableBaseLayers
|
|
@@ -11520,7 +11584,7 @@
|
|
|
11520
11584
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11521
11585
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11522
11586
|
* */
|
|
11523
|
-
var styles$
|
|
11587
|
+
var styles$2 = {
|
|
11524
11588
|
layerRowContainer: {
|
|
11525
11589
|
position: 'relative',
|
|
11526
11590
|
width: '100%',
|
|
@@ -11592,7 +11656,7 @@
|
|
|
11592
11656
|
source: source,
|
|
11593
11657
|
leftComponent: leftComponent
|
|
11594
11658
|
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
11595
|
-
sx: styles$
|
|
11659
|
+
sx: styles$2.layerManagerContainer
|
|
11596
11660
|
}, isLoading && /*#__PURE__*/React__namespace.createElement(material.LinearProgress, {
|
|
11597
11661
|
"data-testid": "loading-bar",
|
|
11598
11662
|
color: "secondary",
|
|
@@ -11610,7 +11674,7 @@
|
|
|
11610
11674
|
}), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
11611
11675
|
container: true,
|
|
11612
11676
|
"data-testid": "layerManagerRowContainer",
|
|
11613
|
-
sx: styles$
|
|
11677
|
+
sx: styles$2.layerRowContainer
|
|
11614
11678
|
}, /*#__PURE__*/React__namespace.createElement(DescriptionRow, {
|
|
11615
11679
|
mapId: mapId,
|
|
11616
11680
|
tooltip: showAddLayersTooltip ? 'Add layers' : '',
|
|
@@ -12806,72 +12870,9 @@
|
|
|
12806
12870
|
* See the License for the specific language governing permissions and
|
|
12807
12871
|
* limitations under the License.
|
|
12808
12872
|
*
|
|
12809
|
-
* Copyright
|
|
12810
|
-
* Copyright
|
|
12873
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
12874
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
12811
12875
|
* */
|
|
12812
|
-
var useStyles$i = makeStyles__default["default"](function (theme) {
|
|
12813
|
-
return createStyles__default["default"]({
|
|
12814
|
-
serviceChips: {
|
|
12815
|
-
width: '100%',
|
|
12816
|
-
display: 'inline-flex',
|
|
12817
|
-
alignItems: 'center',
|
|
12818
|
-
overflowX: 'visible',
|
|
12819
|
-
"float": 'left',
|
|
12820
|
-
paddingLeft: '40px',
|
|
12821
|
-
marginRight: function marginRight(_a) {
|
|
12822
|
-
var margin = _a.margin;
|
|
12823
|
-
return margin;
|
|
12824
|
-
},
|
|
12825
|
-
marginLeft: function marginLeft(_a) {
|
|
12826
|
-
var margin = _a.margin;
|
|
12827
|
-
return -margin;
|
|
12828
|
-
},
|
|
12829
|
-
maxWidth: function maxWidth(_a) {
|
|
12830
|
-
var maxWidthValue = _a.maxWidthValue;
|
|
12831
|
-
return maxWidthValue;
|
|
12832
|
-
},
|
|
12833
|
-
fontSize: '0.875rem'
|
|
12834
|
-
},
|
|
12835
|
-
scrollArrowLeft: {
|
|
12836
|
-
width: '100px',
|
|
12837
|
-
marginBottom: '-12px',
|
|
12838
|
-
height: '34px',
|
|
12839
|
-
backgroundImage: "linear-gradient(to left, rgba(0, 0, 0, 0), " + theme.palette.geowebColors.background.surfaceApp + " 51%)",
|
|
12840
|
-
cursor: 'pointer',
|
|
12841
|
-
marginRight: '-120px',
|
|
12842
|
-
paddingTop: '6px',
|
|
12843
|
-
paddingBottom: '6px',
|
|
12844
|
-
"float": 'left',
|
|
12845
|
-
zIndex: 1,
|
|
12846
|
-
position: 'relative',
|
|
12847
|
-
color: theme.palette.geowebColors.buttons.tertiary["default"].color,
|
|
12848
|
-
'&:hover': {
|
|
12849
|
-
color: theme.palette.geowebColors.buttons.tertiary.activeMouseOver.color
|
|
12850
|
-
}
|
|
12851
|
-
},
|
|
12852
|
-
serviceList: {
|
|
12853
|
-
height: '32px',
|
|
12854
|
-
marginTop: '8px',
|
|
12855
|
-
width: '100%',
|
|
12856
|
-
overflow: 'hidden'
|
|
12857
|
-
},
|
|
12858
|
-
scrollArrowRight: {
|
|
12859
|
-
width: '100px',
|
|
12860
|
-
marginBottom: '-12px',
|
|
12861
|
-
height: '34px',
|
|
12862
|
-
paddingTop: '6px',
|
|
12863
|
-
paddingBottom: '6px',
|
|
12864
|
-
backgroundImage: "linear-gradient(to right, rgba(0, 0, 0, 0), " + theme.palette.geowebColors.background.surfaceApp + " 51%)",
|
|
12865
|
-
right: '0px',
|
|
12866
|
-
position: 'fixed',
|
|
12867
|
-
cursor: 'pointer',
|
|
12868
|
-
color: theme.palette.geowebColors.buttons.tertiary["default"].color,
|
|
12869
|
-
'&:hover': {
|
|
12870
|
-
color: theme.palette.geowebColors.buttons.tertiary.activeMouseOver.color
|
|
12871
|
-
}
|
|
12872
|
-
}
|
|
12873
|
-
});
|
|
12874
|
-
});
|
|
12875
12876
|
|
|
12876
12877
|
var ServiceList = function ServiceList(_a) {
|
|
12877
12878
|
var layerSelectWidth = _a.layerSelectWidth,
|
|
@@ -12892,10 +12893,6 @@
|
|
|
12892
12893
|
var ref = React__namespace.useRef(null);
|
|
12893
12894
|
var scrollSpeed = 5;
|
|
12894
12895
|
var maxWidthValue = ref && ref.current && ref.current.scrollWidth && ref.current.scrollWidth >= layerSelectWidth - margin && ref.current.scrollWidth || layerSelectWidth - 50;
|
|
12895
|
-
var classes = useStyles$i({
|
|
12896
|
-
margin: margin,
|
|
12897
|
-
maxWidthValue: maxWidthValue
|
|
12898
|
-
});
|
|
12899
12896
|
|
|
12900
12897
|
var onMouseWheelScroll = function onMouseWheelScroll(e) {
|
|
12901
12898
|
var delta = e.deltaY;
|
|
@@ -12942,17 +12939,52 @@
|
|
|
12942
12939
|
var isAllSelected = Object.values(activeServices).every(function (activeService) {
|
|
12943
12940
|
return activeService.enabled;
|
|
12944
12941
|
});
|
|
12945
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
12946
|
-
|
|
12942
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
12943
|
+
sx: {
|
|
12944
|
+
height: '32px',
|
|
12945
|
+
marginTop: '8px',
|
|
12946
|
+
width: '100%',
|
|
12947
|
+
overflow: 'hidden'
|
|
12948
|
+
},
|
|
12947
12949
|
"data-testid": "serviceList",
|
|
12948
12950
|
onWheel: onMouseWheelScroll
|
|
12949
12951
|
}, margin !== 0 && /*#__PURE__*/React__namespace.createElement(theme.ChevronLeft, {
|
|
12950
|
-
className: classes.scrollArrowLeft,
|
|
12951
12952
|
onMouseDown: onLeftChevronPressed,
|
|
12952
12953
|
onMouseUp: onChevronMouseUp,
|
|
12953
|
-
"data-testid": "leftScrollArrow"
|
|
12954
|
-
|
|
12955
|
-
|
|
12954
|
+
"data-testid": "leftScrollArrow",
|
|
12955
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
12956
|
+
sx: function sx(theme) {
|
|
12957
|
+
return {
|
|
12958
|
+
width: '100px',
|
|
12959
|
+
marginBottom: '-12px',
|
|
12960
|
+
height: '34px',
|
|
12961
|
+
backgroundImage: "linear-gradient(to left, rgba(0, 0, 0, 0), " + theme.palette.geowebColors.background.surfaceApp + " 51%)",
|
|
12962
|
+
cursor: 'pointer',
|
|
12963
|
+
marginRight: '-120px',
|
|
12964
|
+
paddingTop: '6px',
|
|
12965
|
+
paddingBottom: '6px',
|
|
12966
|
+
"float": 'left',
|
|
12967
|
+
zIndex: 1,
|
|
12968
|
+
position: 'relative',
|
|
12969
|
+
color: 'geowebColors.buttons.tertiary.default.color',
|
|
12970
|
+
'&:hover': {
|
|
12971
|
+
color: 'geowebColors.buttons.tertiary.activeMouseOver.color'
|
|
12972
|
+
}
|
|
12973
|
+
};
|
|
12974
|
+
}
|
|
12975
|
+
}), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
12976
|
+
sx: {
|
|
12977
|
+
width: '100%',
|
|
12978
|
+
display: 'inline-flex',
|
|
12979
|
+
alignItems: 'center',
|
|
12980
|
+
overflowX: 'visible',
|
|
12981
|
+
"float": 'left',
|
|
12982
|
+
paddingLeft: '40px',
|
|
12983
|
+
marginRight: margin + "px",
|
|
12984
|
+
marginLeft: -margin + "px",
|
|
12985
|
+
maxWidth: maxWidthValue,
|
|
12986
|
+
fontSize: '0.875rem'
|
|
12987
|
+
},
|
|
12956
12988
|
ref: ref
|
|
12957
12989
|
}, activeServices && Object.keys(activeServices) && Object.keys(activeServices).length > 0 && /*#__PURE__*/React__namespace.createElement(ServiceChipConnect, {
|
|
12958
12990
|
key: "All",
|
|
@@ -12969,8 +13001,26 @@
|
|
|
12969
13001
|
isSelected: (_a = activeServices[serviceId]) === null || _a === void 0 ? void 0 : _a.enabled,
|
|
12970
13002
|
isDisabled: activeServices[serviceId] === undefined
|
|
12971
13003
|
});
|
|
12972
|
-
})), layerSelectWidth + margin < width && /*#__PURE__*/React__namespace.createElement(theme.ChevronRight
|
|
12973
|
-
|
|
13004
|
+
})), layerSelectWidth + margin < width && /*#__PURE__*/React__namespace.createElement(theme.ChevronRight // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
13005
|
+
, {
|
|
13006
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
13007
|
+
sx: function sx(theme) {
|
|
13008
|
+
return {
|
|
13009
|
+
width: '100px',
|
|
13010
|
+
marginBottom: '-12px',
|
|
13011
|
+
height: '34px',
|
|
13012
|
+
paddingTop: '6px',
|
|
13013
|
+
paddingBottom: '6px',
|
|
13014
|
+
backgroundImage: "linear-gradient(to right, rgba(0, 0, 0, 0), " + theme.palette.geowebColors.background.surfaceApp + " 51%)",
|
|
13015
|
+
right: '0px',
|
|
13016
|
+
position: 'fixed',
|
|
13017
|
+
cursor: 'pointer',
|
|
13018
|
+
color: 'geowebColors.buttons.tertiary.default.color',
|
|
13019
|
+
'&:hover': {
|
|
13020
|
+
color: 'geowebColors.buttons.tertiary.activeMouseOver.color'
|
|
13021
|
+
}
|
|
13022
|
+
};
|
|
13023
|
+
},
|
|
12974
13024
|
onMouseDown: onRightChevronPressed,
|
|
12975
13025
|
onMouseUp: onChevronMouseUp,
|
|
12976
13026
|
"data-testid": "rightScrollArrow"
|
|
@@ -13021,7 +13071,7 @@
|
|
|
13021
13071
|
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
13022
13072
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
13023
13073
|
* */
|
|
13024
|
-
var styles = {
|
|
13074
|
+
var styles$1 = {
|
|
13025
13075
|
servicesContainer: {
|
|
13026
13076
|
width: '300px',
|
|
13027
13077
|
maxHeight: '380px',
|
|
@@ -13085,10 +13135,10 @@
|
|
|
13085
13135
|
};
|
|
13086
13136
|
|
|
13087
13137
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
13088
|
-
sx: styles.servicesContainer,
|
|
13138
|
+
sx: styles$1.servicesContainer,
|
|
13089
13139
|
"data-testid": "ServiceDialog"
|
|
13090
13140
|
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
13091
|
-
sx: styles.header
|
|
13141
|
+
sx: styles$1.header
|
|
13092
13142
|
}, "Services"), /*#__PURE__*/React__namespace.createElement(material.List, {
|
|
13093
13143
|
disablePadding: true
|
|
13094
13144
|
}, Object.keys(services).map(function (serviceId) {
|
|
@@ -13134,11 +13184,11 @@
|
|
|
13134
13184
|
"data-testid": "removeServiceButton"
|
|
13135
13185
|
}, /*#__PURE__*/React__namespace.createElement(theme.Delete, null))))));
|
|
13136
13186
|
})), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
13137
|
-
sx: styles.footer
|
|
13187
|
+
sx: styles$1.footer
|
|
13138
13188
|
}, /*#__PURE__*/React__namespace.createElement(material.Button, {
|
|
13139
13189
|
onClick: openAddService,
|
|
13140
13190
|
"data-testid": "openAddServiceButton",
|
|
13141
|
-
sx: styles.button,
|
|
13191
|
+
sx: styles$1.button,
|
|
13142
13192
|
variant: "tertiary",
|
|
13143
13193
|
startIcon: /*#__PURE__*/React__namespace.createElement(theme.Add, null)
|
|
13144
13194
|
}, "Add a new service"))), addServiceIsOpen && /*#__PURE__*/React__namespace.createElement(ServicePopupConnect, {
|
|
@@ -13225,28 +13275,9 @@
|
|
|
13225
13275
|
* See the License for the specific language governing permissions and
|
|
13226
13276
|
* limitations under the License.
|
|
13227
13277
|
*
|
|
13228
|
-
* Copyright
|
|
13229
|
-
* Copyright
|
|
13278
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
13279
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
13230
13280
|
* */
|
|
13231
|
-
var useStyles$h = makeStyles__default["default"]({
|
|
13232
|
-
serviceList: {
|
|
13233
|
-
height: '48px'
|
|
13234
|
-
},
|
|
13235
|
-
keywordFilterButton: {
|
|
13236
|
-
"float": 'left',
|
|
13237
|
-
position: 'absolute',
|
|
13238
|
-
margin: '12px 0 0 8px',
|
|
13239
|
-
zIndex: 2
|
|
13240
|
-
},
|
|
13241
|
-
serviceOptionsButton: {
|
|
13242
|
-
position: 'absolute',
|
|
13243
|
-
margin: '12px 0 0 calc(100% - 36px)',
|
|
13244
|
-
zIndex: 2
|
|
13245
|
-
},
|
|
13246
|
-
layerSelectContainer: {
|
|
13247
|
-
padding: '0 8px'
|
|
13248
|
-
}
|
|
13249
|
-
});
|
|
13250
13281
|
|
|
13251
13282
|
var LayerSelect = function LayerSelect(_a) {
|
|
13252
13283
|
var mapId = _a.mapId,
|
|
@@ -13261,7 +13292,6 @@
|
|
|
13261
13292
|
order = _d === void 0 ? 0 : _d,
|
|
13262
13293
|
_e = _a.source,
|
|
13263
13294
|
source = _e === void 0 ? 'module' : _e;
|
|
13264
|
-
var classes = useStyles$h();
|
|
13265
13295
|
|
|
13266
13296
|
var _f = __read(React__namespace.useState(500), 2),
|
|
13267
13297
|
height = _f[0],
|
|
@@ -13299,22 +13329,35 @@
|
|
|
13299
13329
|
onMouseDown: onMouseDown,
|
|
13300
13330
|
order: order,
|
|
13301
13331
|
source: source
|
|
13302
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
13303
|
-
|
|
13332
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
13333
|
+
sx: {
|
|
13304
13334
|
padding: '6px'
|
|
13305
13335
|
}
|
|
13306
|
-
}, /*#__PURE__*/React__namespace.createElement(SearchFieldConnect, null)), /*#__PURE__*/React__namespace.createElement(
|
|
13307
|
-
|
|
13336
|
+
}, /*#__PURE__*/React__namespace.createElement(SearchFieldConnect, null)), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
13337
|
+
sx: {
|
|
13338
|
+
"float": 'left',
|
|
13339
|
+
position: 'absolute',
|
|
13340
|
+
margin: '12px 0 0 8px',
|
|
13341
|
+
zIndex: 2
|
|
13342
|
+
}
|
|
13308
13343
|
}, /*#__PURE__*/React__namespace.createElement(KeywordFilterButtonConnect, {
|
|
13309
13344
|
mapId: mapId
|
|
13310
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
13311
|
-
|
|
13312
|
-
|
|
13313
|
-
|
|
13345
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
13346
|
+
sx: {
|
|
13347
|
+
position: 'absolute',
|
|
13348
|
+
margin: '12px 0 0 calc(100% - 36px)',
|
|
13349
|
+
zIndex: 2
|
|
13350
|
+
}
|
|
13351
|
+
}, /*#__PURE__*/React__namespace.createElement(ServiceOptionsButton, null)), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
13352
|
+
sx: {
|
|
13353
|
+
height: '48px'
|
|
13354
|
+
}
|
|
13314
13355
|
}, /*#__PURE__*/React__namespace.createElement(ServiceListConnect, {
|
|
13315
13356
|
layerSelectWidth: width
|
|
13316
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
13317
|
-
|
|
13357
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
13358
|
+
sx: {
|
|
13359
|
+
padding: '0 8px'
|
|
13360
|
+
}
|
|
13318
13361
|
}, /*#__PURE__*/React__namespace.createElement(LayerListConnect, {
|
|
13319
13362
|
mapId: mapId,
|
|
13320
13363
|
layerSelectHeight: height
|
|
@@ -13334,47 +13377,14 @@
|
|
|
13334
13377
|
* See the License for the specific language governing permissions and
|
|
13335
13378
|
* limitations under the License.
|
|
13336
13379
|
*
|
|
13337
|
-
* Copyright
|
|
13338
|
-
* Copyright
|
|
13380
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
13381
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
13339
13382
|
* */
|
|
13340
|
-
var useStyles$g = makeStyles__default["default"](function (theme) {
|
|
13341
|
-
return createStyles__default["default"]({
|
|
13342
|
-
listItem: {
|
|
13343
|
-
width: '100%',
|
|
13344
|
-
minWidth: '300px',
|
|
13345
|
-
padding: '0px',
|
|
13346
|
-
paddingLeft: '10px',
|
|
13347
|
-
paddingRight: '50px',
|
|
13348
|
-
fontSize: '12px'
|
|
13349
|
-
},
|
|
13350
|
-
onlyByttonText: {
|
|
13351
|
-
color: theme.palette.geowebColors.buttons.primary["default"].fill,
|
|
13352
|
-
fontSize: '14px',
|
|
13353
|
-
fontWeight: 500
|
|
13354
|
-
},
|
|
13355
|
-
checkbox: {
|
|
13356
|
-
paddingTop: '6px',
|
|
13357
|
-
paddingBottom: '7px',
|
|
13358
|
-
'&&:hover': {
|
|
13359
|
-
backgroundColor: 'transparent'
|
|
13360
|
-
}
|
|
13361
|
-
},
|
|
13362
|
-
listItemIcon: {
|
|
13363
|
-
minWidth: '42px'
|
|
13364
|
-
},
|
|
13365
|
-
listItemText: {
|
|
13366
|
-
textOverflow: 'ellipsis',
|
|
13367
|
-
whiteSpace: 'nowrap',
|
|
13368
|
-
overflow: 'hidden'
|
|
13369
|
-
}
|
|
13370
|
-
});
|
|
13371
|
-
});
|
|
13372
13383
|
|
|
13373
13384
|
var FilterListItem = function FilterListItem(_a) {
|
|
13374
13385
|
var keyword = _a.keyword,
|
|
13375
13386
|
toggleKeywords = _a.toggleKeywords,
|
|
13376
13387
|
enableOnlyOneKeyword = _a.enableOnlyOneKeyword;
|
|
13377
|
-
var classes = useStyles$g();
|
|
13378
13388
|
|
|
13379
13389
|
var _b = __read(React__namespace.useState(false), 2),
|
|
13380
13390
|
hovering = _b[0],
|
|
@@ -13403,19 +13413,38 @@
|
|
|
13403
13413
|
onBlur: handleMouseLeave,
|
|
13404
13414
|
"data-testid": "filterResultListItem"
|
|
13405
13415
|
}, /*#__PURE__*/React__namespace.createElement(material.ListItem, {
|
|
13406
|
-
|
|
13416
|
+
sx: {
|
|
13417
|
+
width: '100%',
|
|
13418
|
+
minWidth: '300px',
|
|
13419
|
+
padding: '0px',
|
|
13420
|
+
paddingLeft: '10px',
|
|
13421
|
+
paddingRight: '50px',
|
|
13422
|
+
fontSize: '12px'
|
|
13423
|
+
}
|
|
13407
13424
|
}, /*#__PURE__*/React__namespace.createElement(material.ListItemIcon, {
|
|
13408
|
-
|
|
13425
|
+
sx: {
|
|
13426
|
+
minWidth: '42px'
|
|
13427
|
+
}
|
|
13409
13428
|
}, /*#__PURE__*/React__namespace.createElement(material.Checkbox, {
|
|
13410
13429
|
color: "secondary",
|
|
13411
13430
|
checked: keyword.checked,
|
|
13412
13431
|
onChange: function onChange() {
|
|
13413
13432
|
return toggleCheckbox(keyword.id);
|
|
13414
13433
|
},
|
|
13415
|
-
|
|
13434
|
+
sx: {
|
|
13435
|
+
paddingTop: '6px',
|
|
13436
|
+
paddingBottom: '7px',
|
|
13437
|
+
'&&:hover': {
|
|
13438
|
+
backgroundColor: 'transparent'
|
|
13439
|
+
}
|
|
13440
|
+
}
|
|
13416
13441
|
})), /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
13417
13442
|
variant: "body2",
|
|
13418
|
-
|
|
13443
|
+
sx: {
|
|
13444
|
+
textOverflow: 'ellipsis',
|
|
13445
|
+
whiteSpace: 'nowrap',
|
|
13446
|
+
overflow: 'hidden'
|
|
13447
|
+
}
|
|
13419
13448
|
}, keyword.id), hovering ? /*#__PURE__*/React__namespace.createElement(material.ListItemSecondaryAction, null, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
13420
13449
|
style: {
|
|
13421
13450
|
backgroundColor: 'transparent'
|
|
@@ -13427,7 +13456,11 @@
|
|
|
13427
13456
|
},
|
|
13428
13457
|
"data-testid": "onlyButton"
|
|
13429
13458
|
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
13430
|
-
|
|
13459
|
+
sx: {
|
|
13460
|
+
color: 'geowebColors.buttons.primary.default.fill',
|
|
13461
|
+
fontSize: '14px',
|
|
13462
|
+
fontWeight: 500
|
|
13463
|
+
}
|
|
13431
13464
|
}, "ONLY"))) : null));
|
|
13432
13465
|
}
|
|
13433
13466
|
|
|
@@ -13530,26 +13563,9 @@
|
|
|
13530
13563
|
* See the License for the specific language governing permissions and
|
|
13531
13564
|
* limitations under the License.
|
|
13532
13565
|
*
|
|
13533
|
-
* Copyright
|
|
13534
|
-
* Copyright
|
|
13566
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
13567
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
13535
13568
|
* */
|
|
13536
|
-
var useStyles$f = makeStyles__default["default"](function (theme) {
|
|
13537
|
-
return createStyles__default["default"]({
|
|
13538
|
-
selectAll: {
|
|
13539
|
-
padding: '15px',
|
|
13540
|
-
paddingLeft: '20px'
|
|
13541
|
-
},
|
|
13542
|
-
"switch": {
|
|
13543
|
-
padding: '15px'
|
|
13544
|
-
},
|
|
13545
|
-
selectAllContainer: {
|
|
13546
|
-
backgroundColor: theme.palette.background.paper,
|
|
13547
|
-
position: 'sticky',
|
|
13548
|
-
top: 0,
|
|
13549
|
-
zIndex: 100
|
|
13550
|
-
}
|
|
13551
|
-
});
|
|
13552
|
-
});
|
|
13553
13569
|
|
|
13554
13570
|
var KeywordFilterResults = function KeywordFilterResults(_a) {
|
|
13555
13571
|
var allKeywordIds = _a.allKeywordIds,
|
|
@@ -13565,7 +13581,6 @@
|
|
|
13565
13581
|
order = _d === void 0 ? 0 : _d,
|
|
13566
13582
|
_e = _a.source,
|
|
13567
13583
|
source = _e === void 0 ? 'module' : _e;
|
|
13568
|
-
var classes = useStyles$f();
|
|
13569
13584
|
return /*#__PURE__*/React__namespace.createElement(shared.ToolContainerDraggable, {
|
|
13570
13585
|
title: showTitle ? "Filter Results " + mapId : 'Filter Results',
|
|
13571
13586
|
"data-testid": "keywordFilterResults",
|
|
@@ -13588,21 +13603,31 @@
|
|
|
13588
13603
|
xs: 12,
|
|
13589
13604
|
justifyContent: "space-between",
|
|
13590
13605
|
alignItems: "center",
|
|
13591
|
-
|
|
13606
|
+
sx: {
|
|
13607
|
+
backgroundColor: 'background.paper',
|
|
13608
|
+
position: 'sticky',
|
|
13609
|
+
top: 0,
|
|
13610
|
+
zIndex: 100
|
|
13611
|
+
}
|
|
13592
13612
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13593
13613
|
container: true,
|
|
13594
13614
|
item: true,
|
|
13595
13615
|
xs: 6,
|
|
13596
13616
|
justifyContent: "flex-start",
|
|
13597
13617
|
alignItems: "center",
|
|
13598
|
-
|
|
13618
|
+
sx: {
|
|
13619
|
+
padding: '15px',
|
|
13620
|
+
paddingLeft: '20px'
|
|
13621
|
+
}
|
|
13599
13622
|
}, "Select all"), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
13600
13623
|
container: true,
|
|
13601
13624
|
item: true,
|
|
13602
13625
|
xs: 6,
|
|
13603
13626
|
justifyContent: "flex-end",
|
|
13604
13627
|
alignContent: "center",
|
|
13605
|
-
|
|
13628
|
+
sx: {
|
|
13629
|
+
padding: '15px'
|
|
13630
|
+
}
|
|
13606
13631
|
}, /*#__PURE__*/React__namespace.createElement(KeywordFilterSelectAllSwitchConnect, null))), /*#__PURE__*/React__namespace.createElement(material.List, {
|
|
13607
13632
|
dense: true,
|
|
13608
13633
|
style: {
|
|
@@ -13989,15 +14014,10 @@
|
|
|
13989
14014
|
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
13990
14015
|
placement: placement,
|
|
13991
14016
|
title: title
|
|
13992
|
-
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
13993
|
-
component: "span",
|
|
13994
|
-
sx: {
|
|
13995
|
-
marginBottom: '8px'
|
|
13996
|
-
}
|
|
13997
14017
|
}, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, __assign({
|
|
13998
14018
|
onClick: onClick,
|
|
13999
14019
|
active: isActive
|
|
14000
|
-
}, props), children))
|
|
14020
|
+
}, props), children));
|
|
14001
14021
|
};
|
|
14002
14022
|
|
|
14003
14023
|
/* *
|
|
@@ -14099,37 +14119,30 @@
|
|
|
14099
14119
|
* See the License for the specific language governing permissions and
|
|
14100
14120
|
* limitations under the License.
|
|
14101
14121
|
*
|
|
14102
|
-
* Copyright
|
|
14103
|
-
* Copyright
|
|
14122
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
14123
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
14104
14124
|
* */
|
|
14105
|
-
|
|
14106
|
-
|
|
14107
|
-
|
|
14108
|
-
|
|
14109
|
-
|
|
14110
|
-
|
|
14111
|
-
|
|
14112
|
-
wrapper: {
|
|
14125
|
+
|
|
14126
|
+
var MapControls = function MapControls(_a) {
|
|
14127
|
+
var children = _a.children,
|
|
14128
|
+
props = __rest(_a, ["children"]);
|
|
14129
|
+
|
|
14130
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, __assign({
|
|
14131
|
+
sx: {
|
|
14113
14132
|
position: 'absolute',
|
|
14114
14133
|
overflow: 'visible',
|
|
14115
14134
|
display: 'block',
|
|
14116
14135
|
left: 0,
|
|
14117
|
-
margin:
|
|
14136
|
+
margin: 1,
|
|
14118
14137
|
zIndex: 50,
|
|
14119
|
-
top:
|
|
14138
|
+
top: '96px'
|
|
14120
14139
|
}
|
|
14121
|
-
};
|
|
14122
|
-
});
|
|
14123
|
-
|
|
14124
|
-
var MapControls = function MapControls(_a) {
|
|
14125
|
-
var children = _a.children,
|
|
14126
|
-
props = __rest(_a, ["children"]);
|
|
14127
|
-
|
|
14128
|
-
var classes = useStyles$e();
|
|
14129
|
-
return /*#__PURE__*/React__namespace.createElement("div", __assign({
|
|
14130
|
-
className: classes.wrapper
|
|
14131
14140
|
}, props), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
14132
|
-
|
|
14141
|
+
sx: {
|
|
14142
|
+
'& > button': {
|
|
14143
|
+
marginBottom: 1
|
|
14144
|
+
}
|
|
14145
|
+
},
|
|
14133
14146
|
container: true,
|
|
14134
14147
|
direction: "column"
|
|
14135
14148
|
}, children));
|
|
@@ -14261,31 +14274,16 @@
|
|
|
14261
14274
|
* See the License for the specific language governing permissions and
|
|
14262
14275
|
* limitations under the License.
|
|
14263
14276
|
*
|
|
14264
|
-
* Copyright
|
|
14265
|
-
* Copyright
|
|
14277
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
14278
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
14266
14279
|
* */
|
|
14267
|
-
var
|
|
14280
|
+
var SmallFontSlider = material.styled(material.Slider)(function () {
|
|
14268
14281
|
return {
|
|
14269
|
-
|
|
14270
|
-
|
|
14271
|
-
margin: '10px',
|
|
14272
|
-
marginLeft: '-5px',
|
|
14273
|
-
minWidth: 120,
|
|
14274
|
-
fontSize: '90%'
|
|
14275
|
-
},
|
|
14276
|
-
layerName: {
|
|
14277
|
-
paddingLeft: '10px',
|
|
14278
|
-
maxWidth: 130,
|
|
14279
|
-
overflow: 'hidden',
|
|
14280
|
-
textOverflow: 'ellipsis'
|
|
14282
|
+
'& .MuiSlider-markLabel': {
|
|
14283
|
+
fontSize: '80%'
|
|
14281
14284
|
}
|
|
14282
14285
|
};
|
|
14283
14286
|
});
|
|
14284
|
-
var SmallFontSlider = withStyles__default["default"]({
|
|
14285
|
-
markLabel: {
|
|
14286
|
-
fontSize: '80%'
|
|
14287
|
-
}
|
|
14288
|
-
})(material.Slider);
|
|
14289
14287
|
|
|
14290
14288
|
var DimensionSelectSlider = function DimensionSelectSlider(_a) {
|
|
14291
14289
|
var marks = _a.marks,
|
|
@@ -14301,7 +14299,6 @@
|
|
|
14301
14299
|
_f = _a.alertColor,
|
|
14302
14300
|
alertColor = _f === void 0 ? 'red' : _f,
|
|
14303
14301
|
onChangeDimensionValue = _a.onChangeDimensionValue;
|
|
14304
|
-
var classes = useStyles$d();
|
|
14305
14302
|
|
|
14306
14303
|
var _g = __read(React.useState(0), 2),
|
|
14307
14304
|
currentIndex = _g[0],
|
|
@@ -14329,9 +14326,15 @@
|
|
|
14329
14326
|
var sliderValue = managedValue !== null ? values.findIndex(function (v) {
|
|
14330
14327
|
return v === managedValue;
|
|
14331
14328
|
}) : currentIndex;
|
|
14332
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(
|
|
14333
|
-
|
|
14334
|
-
|
|
14329
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
14330
|
+
"data-testid": "slider-dimensionSelect",
|
|
14331
|
+
sx: {
|
|
14332
|
+
height: '320px',
|
|
14333
|
+
margin: '10px',
|
|
14334
|
+
marginLeft: '-5px',
|
|
14335
|
+
minWidth: 120,
|
|
14336
|
+
fontSize: '90%'
|
|
14337
|
+
}
|
|
14335
14338
|
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
14336
14339
|
component: "span",
|
|
14337
14340
|
m: 1
|
|
@@ -14356,9 +14359,14 @@
|
|
|
14356
14359
|
title: layerName
|
|
14357
14360
|
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
14358
14361
|
variant: "body2",
|
|
14359
|
-
|
|
14360
|
-
|
|
14361
|
-
|
|
14362
|
+
sx: {
|
|
14363
|
+
paddingLeft: '10px',
|
|
14364
|
+
maxWidth: 130,
|
|
14365
|
+
overflow: 'hidden',
|
|
14366
|
+
textOverflow: 'ellipsis'
|
|
14367
|
+
}
|
|
14368
|
+
}, layerName)));
|
|
14369
|
+
};
|
|
14362
14370
|
|
|
14363
14371
|
/* *
|
|
14364
14372
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -14830,6 +14838,8 @@
|
|
|
14830
14838
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
14831
14839
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
14832
14840
|
* */
|
|
14841
|
+
var titleOn = 'Auto update on';
|
|
14842
|
+
var titleOff = 'Auto update off';
|
|
14833
14843
|
|
|
14834
14844
|
var AutoUpdateButton = function AutoUpdateButton(_a) {
|
|
14835
14845
|
var _b = _a.toggleAutoUpdate,
|
|
@@ -14841,10 +14851,9 @@
|
|
|
14841
14851
|
_d = _a.disabled,
|
|
14842
14852
|
disabled = _d === void 0 ? false : _d;
|
|
14843
14853
|
return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
14844
|
-
title: isAutoUpdating ?
|
|
14845
|
-
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
14854
|
+
title: isAutoUpdating ? titleOn : titleOff,
|
|
14846
14855
|
"data-testid": "autoUpdateButtonTooltip"
|
|
14847
|
-
}, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
14856
|
+
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
14848
14857
|
active: isAutoUpdating,
|
|
14849
14858
|
disabled: disabled,
|
|
14850
14859
|
onClick: function onClick() {
|
|
@@ -14871,32 +14880,14 @@
|
|
|
14871
14880
|
* See the License for the specific language governing permissions and
|
|
14872
14881
|
* limitations under the License.
|
|
14873
14882
|
*
|
|
14874
|
-
* Copyright
|
|
14875
|
-
* Copyright
|
|
14883
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
14884
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
14876
14885
|
* */
|
|
14877
|
-
var
|
|
14878
|
-
return {
|
|
14879
|
-
speedButtonDiv: {
|
|
14880
|
-
height: '24px',
|
|
14881
|
-
width: '24px',
|
|
14882
|
-
position: 'relative'
|
|
14883
|
-
},
|
|
14884
|
-
sliderBackground: {
|
|
14885
|
-
padding: '0 0 60px 0',
|
|
14886
|
-
backgroundColor: theme.palette.geowebColors.background.surface,
|
|
14887
|
-
width: '95px',
|
|
14888
|
-
height: '150px',
|
|
14889
|
-
position: 'absolute',
|
|
14890
|
-
bottom: '34px',
|
|
14891
|
-
left: '-18px'
|
|
14892
|
-
}
|
|
14893
|
-
};
|
|
14894
|
-
});
|
|
14886
|
+
var speedTooltipTitle = 'Speed';
|
|
14895
14887
|
|
|
14896
14888
|
var SpeedButton = function SpeedButton(_a) {
|
|
14897
14889
|
var animationDelay = _a.animationDelay,
|
|
14898
14890
|
setMapAnimationDelay = _a.setMapAnimationDelay;
|
|
14899
|
-
var classes = useStyles$c();
|
|
14900
14891
|
|
|
14901
14892
|
var _b = __read(React__namespace.useState(false), 2),
|
|
14902
14893
|
open = _b[0],
|
|
@@ -14948,18 +14939,29 @@
|
|
|
14948
14939
|
};
|
|
14949
14940
|
|
|
14950
14941
|
var text = marks[currentValue].text;
|
|
14951
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
14952
|
-
|
|
14942
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
14943
|
+
sx: {
|
|
14944
|
+
height: '24px',
|
|
14945
|
+
width: '24px',
|
|
14946
|
+
position: 'relative'
|
|
14947
|
+
}
|
|
14953
14948
|
}, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
14954
|
-
title:
|
|
14955
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
14949
|
+
title: speedTooltipTitle
|
|
14950
|
+
}, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
14956
14951
|
onClick: onClickButton,
|
|
14957
14952
|
active: true,
|
|
14958
14953
|
"data-testid": "speedButton"
|
|
14959
14954
|
}, /*#__PURE__*/React__namespace.createElement(theme.TextIcon, {
|
|
14960
14955
|
text: text
|
|
14961
|
-
})))
|
|
14962
|
-
|
|
14956
|
+
}))), open ? /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
14957
|
+
sx: {
|
|
14958
|
+
padding: '0 0 60px 0',
|
|
14959
|
+
backgroundColor: 'geowebColors.background.surface',
|
|
14960
|
+
width: '95px',
|
|
14961
|
+
height: '150px',
|
|
14962
|
+
position: 'absolute',
|
|
14963
|
+
bottom: '35px'
|
|
14964
|
+
}
|
|
14963
14965
|
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
14964
14966
|
sx: shared.sliderHeaderStyle
|
|
14965
14967
|
}, "Speed"), /*#__PURE__*/React__namespace.createElement(shared.CustomSlider, {
|
|
@@ -14998,12 +15000,6 @@
|
|
|
14998
15000
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
14999
15001
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
15000
15002
|
* */
|
|
15001
|
-
var timestepAutoSwitchActive = {
|
|
15002
|
-
title: 'Timestep Auto on'
|
|
15003
|
-
};
|
|
15004
|
-
var timestepAutoSwitchInactive = {
|
|
15005
|
-
title: 'Timestep Auto off'
|
|
15006
|
-
};
|
|
15007
15003
|
var timeStepMarks = [{
|
|
15008
15004
|
value: 1,
|
|
15009
15005
|
label: '1 min',
|
|
@@ -15110,34 +15106,7 @@
|
|
|
15110
15106
|
timeStepValue: 5256000,
|
|
15111
15107
|
text: '10y'
|
|
15112
15108
|
}];
|
|
15113
|
-
var
|
|
15114
|
-
return {
|
|
15115
|
-
timeStepDiv: {
|
|
15116
|
-
width: '58px',
|
|
15117
|
-
height: '24px',
|
|
15118
|
-
position: 'relative'
|
|
15119
|
-
},
|
|
15120
|
-
sliderBackground: {
|
|
15121
|
-
backgroundColor: theme.palette.geowebColors.background.surface,
|
|
15122
|
-
width: '110px',
|
|
15123
|
-
height: '350px',
|
|
15124
|
-
padding: '0 0 83px 0',
|
|
15125
|
-
position: 'absolute',
|
|
15126
|
-
bottom: '34px'
|
|
15127
|
-
},
|
|
15128
|
-
timestepAutoText: {
|
|
15129
|
-
fontFamily: 'Roboto-Black, Roboto',
|
|
15130
|
-
fontSize: 12,
|
|
15131
|
-
color: theme.palette.geowebColors.typographyAndIcons.text
|
|
15132
|
-
},
|
|
15133
|
-
timestepAutoTextOff: {
|
|
15134
|
-
fontFamily: 'Roboto-Black, Roboto',
|
|
15135
|
-
fontSize: 12,
|
|
15136
|
-
color: theme.palette.geowebColors.typographyAndIcons.text
|
|
15137
|
-
},
|
|
15138
|
-
disabled: {}
|
|
15139
|
-
};
|
|
15140
|
-
});
|
|
15109
|
+
var timeStepTitle = 'Time step';
|
|
15141
15110
|
|
|
15142
15111
|
var TimeStepButton = function TimeStepButton(_a) {
|
|
15143
15112
|
var timeStep = _a.timeStep,
|
|
@@ -15150,112 +15119,90 @@
|
|
|
15150
15119
|
_d = _a.onToggleTimestepAuto,
|
|
15151
15120
|
onToggleTimestepAuto = _d === void 0 ? function () {
|
|
15152
15121
|
return null;
|
|
15153
|
-
} : _d
|
|
15154
|
-
|
|
15155
|
-
|
|
15156
|
-
var _e = __read(React__namespace.useState(false), 2),
|
|
15157
|
-
open = _e[0],
|
|
15158
|
-
setOpen = _e[1];
|
|
15159
|
-
|
|
15160
|
-
var onClickButton = function onClickButton() {
|
|
15161
|
-
setOpen(!open);
|
|
15162
|
-
};
|
|
15163
|
-
|
|
15164
|
-
var timestepAutoSwitch = !isTimestepAuto ? timestepAutoSwitchInactive : timestepAutoSwitchActive;
|
|
15165
|
-
var timestepAutoTextStyle = !isTimestepAuto ? classes.timestepAutoText : classes.timestepAutoTextOff;
|
|
15166
|
-
var disabledSlider = disabled || isTimestepAuto;
|
|
15122
|
+
} : _d,
|
|
15123
|
+
_e = _a.isOpenByDefault,
|
|
15124
|
+
isOpenByDefault = _e === void 0 ? false : _e;
|
|
15167
15125
|
var timeStepFromLayer = getActiveLayerTimeStep(timeDimension) || timeStep;
|
|
15168
15126
|
var currentMark = timeStepMarks.find(function (mark) {
|
|
15169
15127
|
return mark.timeStepValue === timeStep;
|
|
15170
15128
|
});
|
|
15171
|
-
|
|
15172
|
-
|
|
15173
|
-
|
|
15174
|
-
|
|
15175
|
-
var getTimeStepValue = function getTimeStepValue(value) {
|
|
15176
|
-
return timeStepMarks[Math.round(value - 1)].timeStepValue;
|
|
15177
|
-
};
|
|
15178
|
-
|
|
15179
|
-
var onChangeSlider = function onChangeSlider(event, value) {
|
|
15180
|
-
var newValue = getTimeStepValue(value);
|
|
15181
|
-
|
|
15182
|
-
if (event.type !== 'keydown') {
|
|
15183
|
-
onChangeTimeStep(newValue, MapActionOrigin.map);
|
|
15129
|
+
React__default["default"].useEffect(function () {
|
|
15130
|
+
if (isTimestepAuto) {
|
|
15131
|
+
onChangeTimeStep(timeStepFromLayer);
|
|
15184
15132
|
}
|
|
15185
|
-
};
|
|
15186
|
-
|
|
15187
|
-
var onKeyDown = function onKeyDown(event) {
|
|
15188
|
-
// disable default Slider behavior
|
|
15189
|
-
event.stopPropagation();
|
|
15190
|
-
event.preventDefault(); // custom logic
|
|
15133
|
+
}, [timeStepFromLayer, isTimestepAuto, onChangeTimeStep]);
|
|
15191
15134
|
|
|
15192
|
-
|
|
15193
|
-
|
|
15194
|
-
|
|
15135
|
+
var _f = __read(React__default["default"].useState(null), 2),
|
|
15136
|
+
anchorRef = _f[0],
|
|
15137
|
+
setAnchorRef = _f[1];
|
|
15195
15138
|
|
|
15196
|
-
|
|
15139
|
+
var _g = __read(React__default["default"].useState(false), 2),
|
|
15140
|
+
open = _g[0],
|
|
15141
|
+
setOpen = _g[1];
|
|
15197
15142
|
|
|
15198
|
-
|
|
15199
|
-
|
|
15143
|
+
React__default["default"].useEffect(function () {
|
|
15144
|
+
if (anchorRef && isOpenByDefault) {
|
|
15145
|
+
setOpen(true);
|
|
15200
15146
|
}
|
|
15201
|
-
};
|
|
15202
|
-
|
|
15203
|
-
|
|
15204
|
-
|
|
15205
|
-
onChangeTimeStep(timeStepFromLayer);
|
|
15147
|
+
}, [anchorRef, isOpenByDefault]);
|
|
15148
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
15149
|
+
onKeyDown: function onKeyDown(event) {
|
|
15150
|
+
event.stopPropagation();
|
|
15206
15151
|
}
|
|
15207
|
-
}, [
|
|
15208
|
-
|
|
15209
|
-
|
|
15210
|
-
|
|
15211
|
-
|
|
15212
|
-
|
|
15152
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
|
|
15153
|
+
title: timeStepTitle
|
|
15154
|
+
}, /*#__PURE__*/React__default["default"].createElement(shared.ToolButton, {
|
|
15155
|
+
onClick: function onClick() {
|
|
15156
|
+
setOpen(true);
|
|
15157
|
+
},
|
|
15158
|
+
ref: setAnchorRef,
|
|
15213
15159
|
active: true,
|
|
15214
|
-
onClick: onClickButton,
|
|
15215
|
-
"data-testid": "timeStepButton",
|
|
15216
15160
|
width: "58px"
|
|
15217
|
-
}, /*#__PURE__*/
|
|
15218
|
-
text: currentMark
|
|
15219
|
-
|
|
15220
|
-
|
|
15221
|
-
|
|
15222
|
-
|
|
15223
|
-
|
|
15224
|
-
|
|
15225
|
-
|
|
15226
|
-
orientation: "vertical",
|
|
15227
|
-
value: value,
|
|
15228
|
-
step: null,
|
|
15229
|
-
min: min,
|
|
15230
|
-
max: max,
|
|
15231
|
-
marks: timeStepMarks,
|
|
15232
|
-
disabled: disabledSlider,
|
|
15233
|
-
onChange: onChangeSlider,
|
|
15234
|
-
onKeyDown: onKeyDown,
|
|
15235
|
-
shouldAutoFocus: true
|
|
15236
|
-
}), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
15237
|
-
title: timestepAutoSwitch.title
|
|
15238
|
-
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
15239
|
-
"data-testid": "timestepAutoSwitchTooltip"
|
|
15240
|
-
}, /*#__PURE__*/React__namespace.createElement(material.FormControlLabel, {
|
|
15241
|
-
control: /*#__PURE__*/React__namespace.createElement(material.Switch, {
|
|
15242
|
-
checked: isTimestepAuto,
|
|
15243
|
-
onChange: function onChange() {
|
|
15244
|
-
return onToggleTimestepAuto();
|
|
15245
|
-
},
|
|
15246
|
-
disabled: disabled,
|
|
15247
|
-
id: "timestepAutoSwitch",
|
|
15248
|
-
disableRipple: true,
|
|
15161
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.FastForward, null), /*#__PURE__*/React__default["default"].createElement(theme.TextIcon, {
|
|
15162
|
+
text: currentMark === null || currentMark === void 0 ? void 0 : currentMark.text
|
|
15163
|
+
}))), /*#__PURE__*/React__default["default"].createElement(material.Menu, {
|
|
15164
|
+
anchorEl: anchorRef,
|
|
15165
|
+
open: open,
|
|
15166
|
+
onClose: function onClose() {
|
|
15167
|
+
return setOpen(false);
|
|
15168
|
+
},
|
|
15169
|
+
BackdropProps: {
|
|
15249
15170
|
sx: {
|
|
15250
|
-
|
|
15171
|
+
backgroundColor: 'transparent'
|
|
15251
15172
|
}
|
|
15252
|
-
}
|
|
15253
|
-
|
|
15254
|
-
|
|
15255
|
-
|
|
15256
|
-
|
|
15173
|
+
},
|
|
15174
|
+
anchorOrigin: {
|
|
15175
|
+
vertical: 'top',
|
|
15176
|
+
horizontal: 'center'
|
|
15177
|
+
},
|
|
15178
|
+
transformOrigin: {
|
|
15179
|
+
vertical: 'bottom',
|
|
15180
|
+
horizontal: 'center'
|
|
15257
15181
|
}
|
|
15258
|
-
}
|
|
15182
|
+
}, timeStepMarks.sort(function (a, b) {
|
|
15183
|
+
return b.timeStepValue - a.timeStepValue;
|
|
15184
|
+
}).map(function (time) {
|
|
15185
|
+
return /*#__PURE__*/React__default["default"].createElement(material.MenuItem, {
|
|
15186
|
+
onClick: function onClick() {
|
|
15187
|
+
if (isTimestepAuto) {
|
|
15188
|
+
onToggleTimestepAuto();
|
|
15189
|
+
}
|
|
15190
|
+
|
|
15191
|
+
onChangeTimeStep(time.timeStepValue, MapActionOrigin.map);
|
|
15192
|
+
setOpen(false);
|
|
15193
|
+
},
|
|
15194
|
+
key: time.timeStepValue,
|
|
15195
|
+
selected: (currentMark === null || currentMark === void 0 ? void 0 : currentMark.timeStepValue) === time.timeStepValue,
|
|
15196
|
+
disabled: disabled
|
|
15197
|
+
}, time.label);
|
|
15198
|
+
}), /*#__PURE__*/React__default["default"].createElement(material.MenuItem, {
|
|
15199
|
+
onClick: function onClick() {
|
|
15200
|
+
onToggleTimestepAuto();
|
|
15201
|
+
setOpen(false);
|
|
15202
|
+
},
|
|
15203
|
+
selected: isTimestepAuto,
|
|
15204
|
+
disabled: disabled
|
|
15205
|
+
}, "Auto")));
|
|
15259
15206
|
};
|
|
15260
15207
|
|
|
15261
15208
|
/* *
|
|
@@ -15271,20 +15218,19 @@
|
|
|
15271
15218
|
* See the License for the specific language governing permissions and
|
|
15272
15219
|
* limitations under the License.
|
|
15273
15220
|
*
|
|
15274
|
-
* Copyright
|
|
15275
|
-
* Copyright
|
|
15221
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
15222
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
15276
15223
|
* */
|
|
15277
|
-
var OptionsPopOver =
|
|
15224
|
+
var OptionsPopOver = material.styled(material.Popover)(function (_a) {
|
|
15225
|
+
var theme = _a.theme;
|
|
15278
15226
|
return {
|
|
15279
|
-
|
|
15280
|
-
|
|
15281
|
-
padding: '8px',
|
|
15282
|
-
borderRadius: '0',
|
|
15227
|
+
'& .MuiPaper-root': {
|
|
15228
|
+
padding: '5px',
|
|
15283
15229
|
overflow: 'visible',
|
|
15284
15230
|
backgroundColor: theme.palette.geowebColors.background.surface
|
|
15285
15231
|
}
|
|
15286
15232
|
};
|
|
15287
|
-
})
|
|
15233
|
+
});
|
|
15288
15234
|
|
|
15289
15235
|
var OptionsMenuButton = function OptionsMenuButton(_a) {
|
|
15290
15236
|
var autoUpdateBtn = _a.autoUpdateBtn,
|
|
@@ -15306,7 +15252,8 @@
|
|
|
15306
15252
|
var open = Boolean(anchorEl);
|
|
15307
15253
|
var id = open ? 'simple-popover' : undefined;
|
|
15308
15254
|
return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
15309
|
-
title: "
|
|
15255
|
+
title: "Animation options",
|
|
15256
|
+
placement: "bottom"
|
|
15310
15257
|
}, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
|
|
15311
15258
|
onClick: onClickButton,
|
|
15312
15259
|
"data-testid": "optionsMenuButton",
|
|
@@ -15320,7 +15267,7 @@
|
|
|
15320
15267
|
anchorEl: anchorEl,
|
|
15321
15268
|
onClose: handleClose,
|
|
15322
15269
|
anchorOrigin: {
|
|
15323
|
-
vertical:
|
|
15270
|
+
vertical: -5,
|
|
15324
15271
|
horizontal: 'left'
|
|
15325
15272
|
},
|
|
15326
15273
|
transformOrigin: {
|
|
@@ -15368,53 +15315,18 @@
|
|
|
15368
15315
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
15369
15316
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
15370
15317
|
* */
|
|
15371
|
-
var useStyles$a = makeStyles__default["default"]({
|
|
15372
|
-
buttonContainerBig: {
|
|
15373
|
-
padding: '20px 0px 0px 12px',
|
|
15374
|
-
width: '210px'
|
|
15375
|
-
},
|
|
15376
|
-
buttonContainerSmall: {
|
|
15377
|
-
padding: '20px 0px 0px 12px',
|
|
15378
|
-
width: '80px'
|
|
15379
|
-
}
|
|
15380
|
-
});
|
|
15381
15318
|
|
|
15382
15319
|
var TimeSliderButtons = function TimeSliderButtons(_a) {
|
|
15383
|
-
var
|
|
15384
|
-
|
|
15385
|
-
playBtn = _a.playBtn,
|
|
15386
|
-
speedBtn = _a.speedBtn,
|
|
15387
|
-
timeStepBtn = _a.timeStepBtn;
|
|
15388
|
-
var classes = useStyles$a();
|
|
15389
|
-
var matches = material.useMediaQuery('(min-width:600px)');
|
|
15320
|
+
var optionsMenuBtn = _a.optionsMenuBtn,
|
|
15321
|
+
playBtn = _a.playBtn;
|
|
15390
15322
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
15391
15323
|
"data-testid": "timeSliderButtons"
|
|
15392
|
-
},
|
|
15324
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
15393
15325
|
container: true,
|
|
15394
15326
|
spacing: 2,
|
|
15395
|
-
|
|
15396
|
-
|
|
15397
|
-
item: true
|
|
15398
|
-
}, timeStepBtn || /*#__PURE__*/React__namespace.createElement(TimeStepButton, {
|
|
15399
|
-
timeStep: 5,
|
|
15400
|
-
onChangeTimeStep: function onChangeTimeStep() {
|
|
15401
|
-
return null;
|
|
15402
|
-
}
|
|
15403
|
-
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
15404
|
-
item: true
|
|
15405
|
-
}, speedBtn || /*#__PURE__*/React__namespace.createElement(SpeedButton, {
|
|
15406
|
-
animationDelay: defaultAnimationDelayAtStart,
|
|
15407
|
-
setMapAnimationDelay: function setMapAnimationDelay() {
|
|
15408
|
-
return null;
|
|
15327
|
+
sx: {
|
|
15328
|
+
padding: '20px 0px 0px 16px'
|
|
15409
15329
|
}
|
|
15410
|
-
})), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
15411
|
-
item: true
|
|
15412
|
-
}, autoUpdateBtn || /*#__PURE__*/React__namespace.createElement(AutoUpdateButton, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
15413
|
-
item: true
|
|
15414
|
-
}, playBtn || /*#__PURE__*/React__namespace.createElement(PlayButton, null))) : /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
15415
|
-
container: true,
|
|
15416
|
-
spacing: 1,
|
|
15417
|
-
className: classes.buttonContainerSmall
|
|
15418
15330
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
15419
15331
|
item: true
|
|
15420
15332
|
}, optionsMenuBtn || /*#__PURE__*/React__namespace.createElement(OptionsMenuButton, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
@@ -16125,14 +16037,9 @@
|
|
|
16125
16037
|
* See the License for the specific language governing permissions and
|
|
16126
16038
|
* limitations under the License.
|
|
16127
16039
|
*
|
|
16128
|
-
* Copyright
|
|
16129
|
-
* Copyright
|
|
16040
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
16041
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
16130
16042
|
* */
|
|
16131
|
-
var useStyles$9 = makeStyles__default["default"]({
|
|
16132
|
-
timeSliderLegend: {
|
|
16133
|
-
height: '50px'
|
|
16134
|
-
}
|
|
16135
|
-
});
|
|
16136
16043
|
|
|
16137
16044
|
var getNextSecondsPerPxValue = function getNextSecondsPerPxValue(direction, oldSecondsPerPx, dataScaleToSecondsPerPx) {
|
|
16138
16045
|
var fullSecondsPerPxValues = secondsPerPxValues(dataScaleToSecondsPerPx);
|
|
@@ -16171,7 +16078,6 @@
|
|
|
16171
16078
|
onSetNewDate = _a.onSetNewDate,
|
|
16172
16079
|
onSetCenterTime = _a.onSetCenterTime,
|
|
16173
16080
|
onZoom = _a.onZoom;
|
|
16174
|
-
var classes = useStyles$9();
|
|
16175
16081
|
|
|
16176
16082
|
var _e = __read(useCanvasTarget('mousedown'), 2),
|
|
16177
16083
|
isAllowedCanvasNodePointed = _e[0],
|
|
@@ -16245,9 +16151,11 @@
|
|
|
16245
16151
|
throttledZoom(newSecondsPerPx, newCenterTime);
|
|
16246
16152
|
};
|
|
16247
16153
|
|
|
16248
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
16249
|
-
|
|
16250
|
-
|
|
16154
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
16155
|
+
"data-testid": "timeSliderLegend",
|
|
16156
|
+
sx: {
|
|
16157
|
+
height: '50px'
|
|
16158
|
+
}
|
|
16251
16159
|
}, /*#__PURE__*/React__namespace.createElement(CanvasComponent, {
|
|
16252
16160
|
ref: node,
|
|
16253
16161
|
onMouseMove: function onMouseMove(x, y, event, width) {
|
|
@@ -16316,31 +16224,12 @@
|
|
|
16316
16224
|
* See the License for the specific language governing permissions and
|
|
16317
16225
|
* limitations under the License.
|
|
16318
16226
|
*
|
|
16319
|
-
* Copyright
|
|
16320
|
-
* Copyright
|
|
16227
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
16228
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
16321
16229
|
* */
|
|
16322
16230
|
var scaleSliderOtherSettings = {
|
|
16323
16231
|
LEFT_PADDING: '10%'
|
|
16324
16232
|
};
|
|
16325
|
-
var useStyles$8 = makeStyles__default["default"](function (theme) {
|
|
16326
|
-
return {
|
|
16327
|
-
Background: {
|
|
16328
|
-
backgroundColor: theme.palette.geowebColors.background.surface,
|
|
16329
|
-
width: '229px',
|
|
16330
|
-
height: '40px',
|
|
16331
|
-
paddingTop: '4px',
|
|
16332
|
-
paddingBottom: '7px',
|
|
16333
|
-
boxSizing: 'content-box'
|
|
16334
|
-
},
|
|
16335
|
-
ScaleText: {
|
|
16336
|
-
width: '67px',
|
|
16337
|
-
height: '15px',
|
|
16338
|
-
padding: '0px 10px 0 8px',
|
|
16339
|
-
color: theme.palette.geowebColors.typographyAndIcons.text,
|
|
16340
|
-
font: theme.palette.geowebColors.timeSlider.timeScaleText.fontSize + "px Roboto"
|
|
16341
|
-
}
|
|
16342
|
-
};
|
|
16343
|
-
});
|
|
16344
16233
|
|
|
16345
16234
|
var thumbComponent = function thumbComponent(props) {
|
|
16346
16235
|
var children = props.children,
|
|
@@ -16395,14 +16284,15 @@
|
|
|
16395
16284
|
return valueNew;
|
|
16396
16285
|
};
|
|
16397
16286
|
|
|
16398
|
-
var GeoWebScaleSlider =
|
|
16287
|
+
var GeoWebScaleSlider = material.styled(material.Slider)(function (_a) {
|
|
16288
|
+
var theme = _a.theme;
|
|
16399
16289
|
return {
|
|
16400
|
-
root: {
|
|
16290
|
+
'&.MuiSlider-root': {
|
|
16401
16291
|
height: 4,
|
|
16402
16292
|
width: 167,
|
|
16403
16293
|
margin: "0 0 18px " + scaleSliderOtherSettings.LEFT_PADDING
|
|
16404
16294
|
},
|
|
16405
|
-
thumb: {
|
|
16295
|
+
'& .MuiSlider-thumb': {
|
|
16406
16296
|
backgroundColor: 'rgba(0,0,0,0)',
|
|
16407
16297
|
marginTop: 0,
|
|
16408
16298
|
width: 12,
|
|
@@ -16415,46 +16305,46 @@
|
|
|
16415
16305
|
display: 'none'
|
|
16416
16306
|
}
|
|
16417
16307
|
},
|
|
16418
|
-
valueLabel: {
|
|
16308
|
+
'& .MuiSlider-valueLabel': {
|
|
16419
16309
|
left: '20px'
|
|
16420
16310
|
},
|
|
16421
|
-
rail: {
|
|
16311
|
+
'& .MuiSlider-rail': {
|
|
16422
16312
|
color: theme.palette.geowebColors.timeSlider.timeScaleHorizontalScale.fill,
|
|
16423
16313
|
height: 4,
|
|
16424
16314
|
width: 170,
|
|
16425
16315
|
borderRadius: 4.5,
|
|
16426
16316
|
opacity: theme.palette.geowebColors.timeSlider.timeScaleHorizontalScale.opacity
|
|
16427
16317
|
},
|
|
16428
|
-
mark: {
|
|
16318
|
+
'& .MuiSlider-mark': {
|
|
16429
16319
|
backgroundColor: theme.palette.geowebColors.timeSlider.timeScaleTimeIndicators.fill,
|
|
16430
16320
|
height: 6,
|
|
16431
16321
|
width: 2,
|
|
16432
|
-
marginTop: -9
|
|
16433
|
-
|
|
16434
|
-
|
|
16435
|
-
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
|
|
16322
|
+
marginTop: -9,
|
|
16323
|
+
'&.MuiSlider-markActive': {
|
|
16324
|
+
backgroundColor: theme.palette.geowebColors.timeSlider.timeScaleTimeIndicatorsActive.fill,
|
|
16325
|
+
height: 6,
|
|
16326
|
+
width: 2,
|
|
16327
|
+
marginTop: -9
|
|
16328
|
+
}
|
|
16439
16329
|
},
|
|
16440
16330
|
'@media (max-width: 585px)': {
|
|
16441
|
-
root: {
|
|
16331
|
+
'&.MuiSlider-root': {
|
|
16442
16332
|
width: 110
|
|
16443
16333
|
},
|
|
16444
|
-
rail: {
|
|
16334
|
+
'& .MuiSlider-rail': {
|
|
16445
16335
|
width: 110
|
|
16446
16336
|
}
|
|
16447
16337
|
},
|
|
16448
16338
|
'@media (max-width: 395px)': {
|
|
16449
|
-
root: {
|
|
16339
|
+
'&.MuiSlider-root': {
|
|
16450
16340
|
width: 60
|
|
16451
16341
|
},
|
|
16452
|
-
rail: {
|
|
16342
|
+
'& .MuiSlider-rail': {
|
|
16453
16343
|
width: 60
|
|
16454
16344
|
}
|
|
16455
16345
|
}
|
|
16456
16346
|
};
|
|
16457
|
-
})
|
|
16347
|
+
});
|
|
16458
16348
|
var RAIL_GUTTER_OFFSET = 0.4;
|
|
16459
16349
|
|
|
16460
16350
|
var TimeSliderScaleSlider = function TimeSliderScaleSlider(_a) {
|
|
@@ -16465,7 +16355,6 @@
|
|
|
16465
16355
|
secondsPerPx = _a.secondsPerPx,
|
|
16466
16356
|
selectedTime = _a.selectedTime,
|
|
16467
16357
|
onChangeTimeSliderScale = _a.onChangeTimeSliderScale;
|
|
16468
|
-
var classes = useStyles$8();
|
|
16469
16358
|
var min = 0;
|
|
16470
16359
|
var max = marks.length - 1;
|
|
16471
16360
|
var value = marks.findIndex(function (mark) {
|
|
@@ -16509,12 +16398,25 @@
|
|
|
16509
16398
|
var scaleTextPadding = {
|
|
16510
16399
|
paddingLeft: paddingLeft
|
|
16511
16400
|
};
|
|
16512
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
16513
|
-
|
|
16514
|
-
|
|
16515
|
-
|
|
16401
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
16402
|
+
"data-testid": "scaleSlider",
|
|
16403
|
+
sx: {
|
|
16404
|
+
backgroundColor: 'geowebColors.background.surface',
|
|
16405
|
+
width: '229px',
|
|
16406
|
+
height: '40px',
|
|
16407
|
+
paddingTop: '4px',
|
|
16408
|
+
paddingBottom: '7px',
|
|
16409
|
+
boxSizing: 'content-box'
|
|
16410
|
+
}
|
|
16411
|
+
}, /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
16516
16412
|
"data-testid": "scaleSliderText",
|
|
16517
|
-
|
|
16413
|
+
sx: {
|
|
16414
|
+
width: '67px',
|
|
16415
|
+
height: '15px',
|
|
16416
|
+
padding: '0px 10px 0 8px',
|
|
16417
|
+
color: 'geowebColors.typographyAndIcons.text',
|
|
16418
|
+
font: '12px Roboto'
|
|
16419
|
+
},
|
|
16518
16420
|
style: scaleTextPadding
|
|
16519
16421
|
}, text)), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(GeoWebScaleSlider, {
|
|
16520
16422
|
"data-testid": "scaleSliderSlider",
|
|
@@ -16737,20 +16639,9 @@
|
|
|
16737
16639
|
* See the License for the specific language governing permissions and
|
|
16738
16640
|
* limitations under the License.
|
|
16739
16641
|
*
|
|
16740
|
-
* Copyright
|
|
16741
|
-
* Copyright
|
|
16642
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
16643
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
16742
16644
|
* */
|
|
16743
|
-
var useStyles$7 = makeStyles__default["default"]({
|
|
16744
|
-
timeSliderRail: {
|
|
16745
|
-
'& div': {
|
|
16746
|
-
outline: 'none'
|
|
16747
|
-
},
|
|
16748
|
-
height: '45px',
|
|
16749
|
-
'& canvas': {
|
|
16750
|
-
display: 'block'
|
|
16751
|
-
}
|
|
16752
|
-
}
|
|
16753
|
-
});
|
|
16754
16645
|
|
|
16755
16646
|
var setPreviousTimeStep = function setPreviousTimeStep(timeStep, curTime, dataStartTime, onSetNewDate) {
|
|
16756
16647
|
var prevTimeStep = moment__default["default"].utc(curTime).subtract(timeStep, 'm').toISOString();
|
|
@@ -16789,7 +16680,6 @@
|
|
|
16789
16680
|
onSetAnimationEndTime = _a.onSetAnimationEndTime,
|
|
16790
16681
|
onSetNewDate = _a.onSetNewDate,
|
|
16791
16682
|
onSetCenterTime = _a.onSetCenterTime;
|
|
16792
|
-
var classes = useStyles$7();
|
|
16793
16683
|
var ZOOM_RATIO = 1.1;
|
|
16794
16684
|
|
|
16795
16685
|
var zoomOut = function zoomOut(relativeX) {
|
|
@@ -16997,12 +16887,20 @@
|
|
|
16997
16887
|
|
|
16998
16888
|
}, [selectedTimeUnix]);
|
|
16999
16889
|
var theme = material.useTheme();
|
|
17000
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
17001
|
-
className: classes.timeSliderRail,
|
|
16890
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
17002
16891
|
style: {
|
|
17003
16892
|
cursor: cursorStyle
|
|
17004
16893
|
},
|
|
17005
|
-
"data-testid": "timeSliderRail"
|
|
16894
|
+
"data-testid": "timeSliderRail",
|
|
16895
|
+
sx: {
|
|
16896
|
+
'& div': {
|
|
16897
|
+
outline: 'none'
|
|
16898
|
+
},
|
|
16899
|
+
height: '45px',
|
|
16900
|
+
'& canvas': {
|
|
16901
|
+
display: 'block'
|
|
16902
|
+
}
|
|
16903
|
+
}
|
|
17006
16904
|
}, /*#__PURE__*/React__namespace.createElement(CanvasComponent, {
|
|
17007
16905
|
ref: node,
|
|
17008
16906
|
onMouseDown: onMouseDown,
|
|
@@ -17059,19 +16957,9 @@
|
|
|
17059
16957
|
* See the License for the specific language governing permissions and
|
|
17060
16958
|
* limitations under the License.
|
|
17061
16959
|
*
|
|
17062
|
-
* Copyright
|
|
17063
|
-
* Copyright
|
|
16960
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
16961
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
17064
16962
|
* */
|
|
17065
|
-
var useStyles$6 = makeStyles__default["default"]({
|
|
17066
|
-
container: {
|
|
17067
|
-
display: 'grid',
|
|
17068
|
-
gridTemplateColumns: 'minmax(100px, 210px) minmax(66%, 1fr)',
|
|
17069
|
-
gridTemplateRows: '50px'
|
|
17070
|
-
},
|
|
17071
|
-
scaleSlider: {
|
|
17072
|
-
height: '50px'
|
|
17073
|
-
}
|
|
17074
|
-
});
|
|
17075
16963
|
|
|
17076
16964
|
var useTimeSliderKeyBoardControl = function useTimeSliderKeyBoardControl(mapIsActive, isVisible, onToggleTimeSlider) {
|
|
17077
16965
|
React__namespace.useEffect(function () {
|
|
@@ -17108,12 +16996,15 @@
|
|
|
17108
16996
|
isVisible = _c === void 0 ? true : _c,
|
|
17109
16997
|
_d = _a.onToggleTimeSlider,
|
|
17110
16998
|
onToggleTimeSlider = _d === void 0 ? function () {} : _d;
|
|
17111
|
-
var styles = useStyles$6();
|
|
17112
16999
|
useTimeSliderKeyBoardControl(mapIsActive, isVisible, onToggleTimeSlider);
|
|
17113
17000
|
return isVisible ? /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
17114
17001
|
container: true,
|
|
17115
|
-
|
|
17116
|
-
|
|
17002
|
+
"data-testid": "timeSlider",
|
|
17003
|
+
sx: {
|
|
17004
|
+
display: 'grid',
|
|
17005
|
+
gridTemplateColumns: 'minmax(100px, 210px) minmax(66%, 1fr)',
|
|
17006
|
+
gridTemplateRows: '50px'
|
|
17007
|
+
}
|
|
17117
17008
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
17118
17009
|
item: true
|
|
17119
17010
|
}, " ", buttons || /*#__PURE__*/React__namespace.createElement(TimeSliderButtons, null), " "), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
@@ -17123,7 +17014,9 @@
|
|
|
17123
17014
|
mapIsActive: mapIsActive
|
|
17124
17015
|
})), ' '), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
17125
17016
|
item: true,
|
|
17126
|
-
|
|
17017
|
+
sx: {
|
|
17018
|
+
height: '50px'
|
|
17019
|
+
}
|
|
17127
17020
|
}, scaleSlider || /*#__PURE__*/React__namespace.createElement(TimeSliderScaleSlider, __assign({}, defaultProps, {
|
|
17128
17021
|
selectedTime: defaultProps.selectedTime.unix(),
|
|
17129
17022
|
timeSliderScale: Scale.Hour,
|
|
@@ -17352,20 +17245,11 @@
|
|
|
17352
17245
|
var TimeSliderButtonsConnect = function TimeSliderButtonsConnect(_a) {
|
|
17353
17246
|
var mapId = _a.mapId;
|
|
17354
17247
|
return /*#__PURE__*/React__namespace.createElement(TimeSliderButtons, {
|
|
17355
|
-
autoUpdateBtn: /*#__PURE__*/React__namespace.createElement(AutoUpdateButtonConnect, {
|
|
17356
|
-
mapId: mapId
|
|
17357
|
-
}),
|
|
17358
17248
|
optionsMenuBtn: /*#__PURE__*/React__namespace.createElement(OptionsMenuButtonConnect, {
|
|
17359
17249
|
mapId: mapId
|
|
17360
17250
|
}),
|
|
17361
17251
|
playBtn: /*#__PURE__*/React__namespace.createElement(PlayButtonConnect, {
|
|
17362
17252
|
mapId: mapId
|
|
17363
|
-
}),
|
|
17364
|
-
speedBtn: /*#__PURE__*/React__namespace.createElement(SpeedButtonConnect, {
|
|
17365
|
-
mapId: mapId
|
|
17366
|
-
}),
|
|
17367
|
-
timeStepBtn: /*#__PURE__*/React__namespace.createElement(TimeStepButtonComponent, {
|
|
17368
|
-
mapId: mapId
|
|
17369
17253
|
})
|
|
17370
17254
|
});
|
|
17371
17255
|
};
|
|
@@ -17830,34 +17714,30 @@
|
|
|
17830
17714
|
* See the License for the specific language governing permissions and
|
|
17831
17715
|
* limitations under the License.
|
|
17832
17716
|
*
|
|
17833
|
-
* Copyright
|
|
17834
|
-
* Copyright
|
|
17717
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
17718
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
17835
17719
|
* */
|
|
17836
|
-
var useStyles$5 = makeStyles__default["default"]({
|
|
17837
|
-
MapViewLayer: {
|
|
17838
|
-
width: '100%',
|
|
17839
|
-
padding: '2px',
|
|
17840
|
-
margin: 0,
|
|
17841
|
-
wordWrap: 'break-word',
|
|
17842
|
-
border: '1px solid rgba(0, 0, 0, 0.5)',
|
|
17843
|
-
lineHeight: '14px',
|
|
17844
|
-
fontSize: '10px',
|
|
17845
|
-
background: 'rgba(255, 255, 255, 0.5)',
|
|
17846
|
-
display: 'none'
|
|
17847
|
-
}
|
|
17848
|
-
});
|
|
17849
17720
|
|
|
17850
17721
|
var MapViewLayer = function MapViewLayer(props) {
|
|
17851
17722
|
var id = props.id;
|
|
17852
|
-
|
|
17853
|
-
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
17723
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
17854
17724
|
"data-testid": "mapViewLayer",
|
|
17855
|
-
|
|
17856
|
-
|
|
17857
|
-
|
|
17858
|
-
|
|
17859
|
-
|
|
17860
|
-
|
|
17725
|
+
sx: {
|
|
17726
|
+
width: '100%',
|
|
17727
|
+
padding: '2px',
|
|
17728
|
+
margin: 0,
|
|
17729
|
+
wordWrap: 'break-word',
|
|
17730
|
+
border: '1px solid rgba(0, 0, 0, 0.5)',
|
|
17731
|
+
lineHeight: '14px',
|
|
17732
|
+
fontSize: '10px',
|
|
17733
|
+
background: 'rgba(255, 255, 255, 0.5)',
|
|
17734
|
+
display: 'none'
|
|
17735
|
+
}
|
|
17736
|
+
}, /*#__PURE__*/React__namespace.createElement("div", null, id), /*#__PURE__*/React__namespace.createElement("div", {
|
|
17737
|
+
// eslint-disable-next-line react/no-danger
|
|
17738
|
+
dangerouslySetInnerHTML: {
|
|
17739
|
+
__html: JSON.stringify(props, null, '--').replace(new RegExp('\\n', 'g'), '<br/>')
|
|
17740
|
+
}
|
|
17861
17741
|
}));
|
|
17862
17742
|
};
|
|
17863
17743
|
|
|
@@ -19150,12 +19030,12 @@
|
|
|
19150
19030
|
|
|
19151
19031
|
if (onHoverFeature) {
|
|
19152
19032
|
var handleMouseStoppedTimer = function handleMouseStoppedTimer() {
|
|
19153
|
-
var result = checkHoverFeatures(_this.geojson, mouseX, mouseY, function (coordinates) {
|
|
19033
|
+
var result = checkHoverFeatures(_this.geojson, _this.mouseX, _this.mouseY, function (coordinates) {
|
|
19154
19034
|
return _this.convertGeoCoordsToScreenCoords(coordinates);
|
|
19155
19035
|
});
|
|
19156
19036
|
|
|
19157
19037
|
if (result) {
|
|
19158
|
-
|
|
19038
|
+
_this.featureEvent = {
|
|
19159
19039
|
coordinateIndexInFeature: result.coordinateIndexInFeature,
|
|
19160
19040
|
featureIndex: result.featureIndex,
|
|
19161
19041
|
mouseX: mouseX,
|
|
@@ -19163,8 +19043,13 @@
|
|
|
19163
19043
|
isInEditMode: isInEditMode,
|
|
19164
19044
|
feature: result.feature
|
|
19165
19045
|
};
|
|
19166
|
-
onHoverFeature(featureEvent);
|
|
19046
|
+
onHoverFeature(_this.featureEvent);
|
|
19047
|
+
} else {
|
|
19048
|
+
_this.featureEvent = undefined;
|
|
19167
19049
|
}
|
|
19050
|
+
|
|
19051
|
+
var webmapjs = _this.props.webmapjs;
|
|
19052
|
+
webmapjs && webmapjs.draw('AdagucMapDraw::onHoverFeature');
|
|
19168
19053
|
};
|
|
19169
19054
|
|
|
19170
19055
|
window.clearTimeout(this.mouseStoppedTimer);
|
|
@@ -20277,6 +20162,7 @@
|
|
|
20277
20162
|
var drawMarkerByDefault = !featureProperties || !featureProperties.imageURL || !featureProperties.drawFunction;
|
|
20278
20163
|
|
|
20279
20164
|
if (featureProperties.drawFunction) {
|
|
20165
|
+
var isHovered = this.featureEvent && this.featureEvent.feature === feature;
|
|
20280
20166
|
featureProperties.drawFunction({
|
|
20281
20167
|
context: ctx,
|
|
20282
20168
|
featureIndex: featureIndex,
|
|
@@ -20286,7 +20172,8 @@
|
|
|
20286
20172
|
isInEditMode: isInEditMode,
|
|
20287
20173
|
feature: feature,
|
|
20288
20174
|
mouseX: this.mouseX,
|
|
20289
|
-
mouseY: this.mouseY
|
|
20175
|
+
mouseY: this.mouseY,
|
|
20176
|
+
isHovered: isHovered
|
|
20290
20177
|
});
|
|
20291
20178
|
} else if (drawStyledMarker || drawMarkerByDefault) {
|
|
20292
20179
|
this.drawMarker(ctx, _coord, selected, middle, isInEditMode, featureProperties);
|
|
@@ -21550,22 +21437,9 @@
|
|
|
21550
21437
|
* See the License for the specific language governing permissions and
|
|
21551
21438
|
* limitations under the License.
|
|
21552
21439
|
*
|
|
21553
|
-
* Copyright
|
|
21554
|
-
* Copyright
|
|
21440
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
21441
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
21555
21442
|
* */
|
|
21556
|
-
var useStyles$4 = makeStyles__default["default"](function () {
|
|
21557
|
-
return {
|
|
21558
|
-
mapTimeContainer: {
|
|
21559
|
-
zIndex: 10,
|
|
21560
|
-
justifySelf: 'center',
|
|
21561
|
-
bottom: 12,
|
|
21562
|
-
position: 'absolute'
|
|
21563
|
-
},
|
|
21564
|
-
mapTimeText: {
|
|
21565
|
-
fontWeight: 500
|
|
21566
|
-
}
|
|
21567
|
-
};
|
|
21568
|
-
});
|
|
21569
21443
|
var getTimeDimension = function getTimeDimension(dimensions) {
|
|
21570
21444
|
return dimensions.find(function (dimension) {
|
|
21571
21445
|
return dimension.name === 'time' && dimension.currentValue !== undefined;
|
|
@@ -21580,7 +21454,6 @@
|
|
|
21580
21454
|
var dimensions = _a.dimensions,
|
|
21581
21455
|
_b = _a.timeFormat,
|
|
21582
21456
|
timeFormat = _b === void 0 ? defaultTimeFormat : _b;
|
|
21583
|
-
var classes = useStyles$4();
|
|
21584
21457
|
var timeDimension = getTimeDimension(dimensions);
|
|
21585
21458
|
|
|
21586
21459
|
if (!timeDimension) {
|
|
@@ -21588,12 +21461,19 @@
|
|
|
21588
21461
|
}
|
|
21589
21462
|
|
|
21590
21463
|
var mapTime = formatTime(timeDimension.currentValue, timeFormat);
|
|
21591
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
21464
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
21592
21465
|
"data-testid": "map-time",
|
|
21593
|
-
|
|
21466
|
+
sx: {
|
|
21467
|
+
zIndex: 10,
|
|
21468
|
+
justifySelf: 'center',
|
|
21469
|
+
bottom: '12px',
|
|
21470
|
+
position: 'absolute'
|
|
21471
|
+
}
|
|
21594
21472
|
}, /*#__PURE__*/React__namespace.createElement(material.Box, null, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
21595
21473
|
variant: "caption",
|
|
21596
|
-
|
|
21474
|
+
sx: {
|
|
21475
|
+
fontWeight: 500
|
|
21476
|
+
}
|
|
21597
21477
|
}, mapTime)));
|
|
21598
21478
|
};
|
|
21599
21479
|
|
|
@@ -21610,24 +21490,9 @@
|
|
|
21610
21490
|
* See the License for the specific language governing permissions and
|
|
21611
21491
|
* limitations under the License.
|
|
21612
21492
|
*
|
|
21613
|
-
* Copyright
|
|
21614
|
-
* Copyright
|
|
21493
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
21494
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
21615
21495
|
* */
|
|
21616
|
-
var useStyles$3 = makeStyles__default["default"](function () {
|
|
21617
|
-
return {
|
|
21618
|
-
mapViewContainer: {
|
|
21619
|
-
display: 'grid',
|
|
21620
|
-
width: '100%',
|
|
21621
|
-
height: '100%',
|
|
21622
|
-
position: 'relative',
|
|
21623
|
-
overflow: 'hidden'
|
|
21624
|
-
},
|
|
21625
|
-
mapView: {
|
|
21626
|
-
gridColumnStart: 1,
|
|
21627
|
-
gridRowStart: 1
|
|
21628
|
-
}
|
|
21629
|
-
};
|
|
21630
|
-
});
|
|
21631
21496
|
|
|
21632
21497
|
var MapView = function MapView(_a) {
|
|
21633
21498
|
var children = _a.children,
|
|
@@ -21640,11 +21505,16 @@
|
|
|
21640
21505
|
// rest props
|
|
21641
21506
|
props = __rest(_a, ["children", "controls", "displayTimeInMap"]);
|
|
21642
21507
|
|
|
21643
|
-
var classes = useStyles$3();
|
|
21644
21508
|
var dimensions = props.dimensions;
|
|
21645
21509
|
var adagucRef = React__namespace.useRef(null);
|
|
21646
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
21647
|
-
|
|
21510
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
21511
|
+
sx: {
|
|
21512
|
+
display: 'grid',
|
|
21513
|
+
width: '100%',
|
|
21514
|
+
height: '100%',
|
|
21515
|
+
position: 'relative',
|
|
21516
|
+
overflow: 'hidden'
|
|
21517
|
+
}
|
|
21648
21518
|
}, controls && controls.zoomControls && /*#__PURE__*/React__namespace.createElement(MapControls, {
|
|
21649
21519
|
style: {
|
|
21650
21520
|
top: 0,
|
|
@@ -21660,8 +21530,11 @@
|
|
|
21660
21530
|
onZoomReset: function onZoomReset() {
|
|
21661
21531
|
return adagucRef.current.zoomToLayer(adagucRef.current.getActiveLayer());
|
|
21662
21532
|
}
|
|
21663
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
21664
|
-
|
|
21533
|
+
})), /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
21534
|
+
sx: {
|
|
21535
|
+
gridColumnStart: 1,
|
|
21536
|
+
gridRowStart: 1
|
|
21537
|
+
}
|
|
21665
21538
|
}, /*#__PURE__*/React__namespace.createElement(ReactMapView, __assign({}, props, {
|
|
21666
21539
|
onRegisterAdaguc: function onRegisterAdaguc(adaguc) {
|
|
21667
21540
|
adagucRef.current = adaguc;
|
|
@@ -21673,6 +21546,217 @@
|
|
|
21673
21546
|
}));
|
|
21674
21547
|
};
|
|
21675
21548
|
|
|
21549
|
+
/* *
|
|
21550
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21551
|
+
* you may not use this file except in compliance with the License.
|
|
21552
|
+
* You may obtain a copy of the License at
|
|
21553
|
+
*
|
|
21554
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
21555
|
+
*
|
|
21556
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
21557
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
21558
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21559
|
+
* See the License for the specific language governing permissions and
|
|
21560
|
+
* limitations under the License.
|
|
21561
|
+
*
|
|
21562
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
21563
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
21564
|
+
* */
|
|
21565
|
+
var useTouchZoomPan = function useTouchZoomPan(mapIsActive, mapId) {
|
|
21566
|
+
var _a = __read(React__namespace.useState(0), 2),
|
|
21567
|
+
firstTouchX = _a[0],
|
|
21568
|
+
setFirstTouchX = _a[1];
|
|
21569
|
+
|
|
21570
|
+
var _b = __read(React__namespace.useState(0), 2),
|
|
21571
|
+
firstTouchY = _b[0],
|
|
21572
|
+
setFirstTouchY = _b[1];
|
|
21573
|
+
|
|
21574
|
+
var _c = __read(React__namespace.useState(0), 2),
|
|
21575
|
+
secondTouchX = _c[0],
|
|
21576
|
+
setSecondTouchX = _c[1];
|
|
21577
|
+
|
|
21578
|
+
var _d = __read(React__namespace.useState(0), 2),
|
|
21579
|
+
secondTouchY = _d[0],
|
|
21580
|
+
setSecondTouchY = _d[1];
|
|
21581
|
+
|
|
21582
|
+
var _e = __read(React__namespace.useState(0), 2),
|
|
21583
|
+
prevDist = _e[0],
|
|
21584
|
+
setPrevDist = _e[1];
|
|
21585
|
+
|
|
21586
|
+
var isPanning = function isPanning(touches) {
|
|
21587
|
+
return (touches === null || touches === void 0 ? void 0 : touches.length) === 1;
|
|
21588
|
+
};
|
|
21589
|
+
|
|
21590
|
+
var isZooming = function isZooming(touches) {
|
|
21591
|
+
return (touches === null || touches === void 0 ? void 0 : touches.length) === 2;
|
|
21592
|
+
};
|
|
21593
|
+
|
|
21594
|
+
var isValidMap = React__namespace.useCallback(function (map, event) {
|
|
21595
|
+
var target = event.target;
|
|
21596
|
+
return map && target.tagName !== 'INPUT' && mapIsActive;
|
|
21597
|
+
}, [mapIsActive]);
|
|
21598
|
+
|
|
21599
|
+
var distance = function distance(x1, y1, x2, y2) {
|
|
21600
|
+
var dx = x1 - x2;
|
|
21601
|
+
var dy = y1 - y2;
|
|
21602
|
+
return Math.sqrt(dx * dx + dy * dy);
|
|
21603
|
+
};
|
|
21604
|
+
|
|
21605
|
+
var handleStart = React__namespace.useCallback(function (event) {
|
|
21606
|
+
var map = getWMJSMapById(mapId);
|
|
21607
|
+
if (!isValidMap(map, event)) return;
|
|
21608
|
+
var targetTouches = event.targetTouches;
|
|
21609
|
+
var firstTouch = targetTouches === null || targetTouches === void 0 ? void 0 : targetTouches.item(0);
|
|
21610
|
+
setFirstTouchX(firstTouch === null || firstTouch === void 0 ? void 0 : firstTouch.clientX);
|
|
21611
|
+
setFirstTouchY(firstTouch === null || firstTouch === void 0 ? void 0 : firstTouch.clientY);
|
|
21612
|
+
|
|
21613
|
+
if (isZooming(targetTouches)) {
|
|
21614
|
+
var secondTouch = targetTouches === null || targetTouches === void 0 ? void 0 : targetTouches.item(1);
|
|
21615
|
+
setSecondTouchX(secondTouch === null || secondTouch === void 0 ? void 0 : secondTouch.clientX);
|
|
21616
|
+
setSecondTouchY(secondTouch === null || secondTouch === void 0 ? void 0 : secondTouch.clientY);
|
|
21617
|
+
}
|
|
21618
|
+
}, [isValidMap, mapId]);
|
|
21619
|
+
var handleMove = React__namespace.useCallback(function (event) {
|
|
21620
|
+
var map = getWMJSMapById(mapId);
|
|
21621
|
+
if (!isValidMap(map, event)) return;
|
|
21622
|
+
event.preventDefault();
|
|
21623
|
+
var targetTouches = event.targetTouches;
|
|
21624
|
+
var firstTouch = targetTouches === null || targetTouches === void 0 ? void 0 : targetTouches.item(0);
|
|
21625
|
+
var firstX = firstTouch === null || firstTouch === void 0 ? void 0 : firstTouch.clientX;
|
|
21626
|
+
var firstY = firstTouch === null || firstTouch === void 0 ? void 0 : firstTouch.clientY;
|
|
21627
|
+
var elemWidth = firstTouch.target.clientWidth;
|
|
21628
|
+
var elemHeight = firstTouch.target.clientHeight;
|
|
21629
|
+
var distanceEps = TOUCH_PAN_STEP_PERCENTAGE * Math.min(elemWidth, elemHeight);
|
|
21630
|
+
|
|
21631
|
+
if (isPanning(targetTouches)) {
|
|
21632
|
+
// Pan with a one-point touch
|
|
21633
|
+
var dist = distance(firstTouchX, firstTouchY, firstX, firstY);
|
|
21634
|
+
|
|
21635
|
+
if (dist > distanceEps) {
|
|
21636
|
+
var distX = firstX - firstTouchX;
|
|
21637
|
+
var distY = firstY - firstTouchY;
|
|
21638
|
+
var unitDirX = distX / dist;
|
|
21639
|
+
var unitDirY = -distY / dist;
|
|
21640
|
+
setFirstTouchX(firstX);
|
|
21641
|
+
setFirstTouchY(firstY);
|
|
21642
|
+
map.mapPanPercentage(unitDirX * TOUCH_PAN_STEP_PERCENTAGE, unitDirY * TOUCH_PAN_STEP_PERCENTAGE);
|
|
21643
|
+
}
|
|
21644
|
+
} else if (isZooming(targetTouches)) {
|
|
21645
|
+
// Zoom with a two-point "pinch" touch
|
|
21646
|
+
setFirstTouchX(firstX);
|
|
21647
|
+
setFirstTouchY(firstY);
|
|
21648
|
+
var secondTouch = targetTouches === null || targetTouches === void 0 ? void 0 : targetTouches.item(1);
|
|
21649
|
+
setSecondTouchX(secondTouch === null || secondTouch === void 0 ? void 0 : secondTouch.clientX);
|
|
21650
|
+
setSecondTouchY(secondTouch === null || secondTouch === void 0 ? void 0 : secondTouch.clientY);
|
|
21651
|
+
var dist = distance(firstTouchX, firstTouchY, secondTouchX, secondTouchY);
|
|
21652
|
+
|
|
21653
|
+
if (Math.abs(dist - prevDist) > distanceEps) {
|
|
21654
|
+
if (dist < prevDist) {
|
|
21655
|
+
map.zoomOut();
|
|
21656
|
+
} else if (dist > prevDist) {
|
|
21657
|
+
map.zoomIn(1);
|
|
21658
|
+
}
|
|
21659
|
+
|
|
21660
|
+
setPrevDist(dist);
|
|
21661
|
+
}
|
|
21662
|
+
}
|
|
21663
|
+
}, [firstTouchX, firstTouchY, isValidMap, mapId, prevDist, secondTouchX, secondTouchY]);
|
|
21664
|
+
var handleEnd = React__namespace.useCallback(function () {}, []);
|
|
21665
|
+
React__namespace.useEffect(function () {
|
|
21666
|
+
document.addEventListener('touchstart', handleStart, {
|
|
21667
|
+
passive: false
|
|
21668
|
+
});
|
|
21669
|
+
document.addEventListener('touchmove', handleMove, {
|
|
21670
|
+
passive: false
|
|
21671
|
+
});
|
|
21672
|
+
document.addEventListener('touchend', handleEnd, {
|
|
21673
|
+
passive: false
|
|
21674
|
+
});
|
|
21675
|
+
return function () {
|
|
21676
|
+
document.removeEventListener('touchstart', handleStart);
|
|
21677
|
+
document.removeEventListener('touchmove', handleMove);
|
|
21678
|
+
document.removeEventListener('touchend', handleEnd);
|
|
21679
|
+
};
|
|
21680
|
+
}, [firstTouchX, firstTouchY, secondTouchX, secondTouchY, mapId, mapIsActive, prevDist, handleStart, handleMove, handleEnd]);
|
|
21681
|
+
};
|
|
21682
|
+
var TOUCH_PAN_STEP_PERCENTAGE = 0.02;
|
|
21683
|
+
|
|
21684
|
+
/* *
|
|
21685
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21686
|
+
* you may not use this file except in compliance with the License.
|
|
21687
|
+
* You may obtain a copy of the License at
|
|
21688
|
+
*
|
|
21689
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
21690
|
+
*
|
|
21691
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
21692
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
21693
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21694
|
+
* See the License for the specific language governing permissions and
|
|
21695
|
+
* limitations under the License.
|
|
21696
|
+
*
|
|
21697
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
21698
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
21699
|
+
* */
|
|
21700
|
+
var useKeyboardZoomAndPan = function useKeyboardZoomAndPan(mapIsActive, mapId) {
|
|
21701
|
+
React__namespace.useEffect(function () {
|
|
21702
|
+
var keysPressedDown = {};
|
|
21703
|
+
|
|
21704
|
+
var handleKeyPress = function handleKeyPress(event) {
|
|
21705
|
+
var target = event.target;
|
|
21706
|
+
var map = getWMJSMapById(mapId);
|
|
21707
|
+
|
|
21708
|
+
if (map && target.tagName !== 'INPUT' && mapIsActive) {
|
|
21709
|
+
var key = event.key,
|
|
21710
|
+
type = event.type;
|
|
21711
|
+
keysPressedDown[key] = type === 'keydown';
|
|
21712
|
+
|
|
21713
|
+
if (keysPressedDown['+']) {
|
|
21714
|
+
map.zoomIn(1);
|
|
21715
|
+
} else if (keysPressedDown['-']) {
|
|
21716
|
+
map.zoomOut();
|
|
21717
|
+
}
|
|
21718
|
+
|
|
21719
|
+
var arrowRight = keysPressedDown['ArrowRight'];
|
|
21720
|
+
var arrowLeft = keysPressedDown['ArrowLeft'];
|
|
21721
|
+
var arrowUp = keysPressedDown['ArrowUp'];
|
|
21722
|
+
var arrowDown = keysPressedDown['ArrowDown'];
|
|
21723
|
+
var control = keysPressedDown['Control'];
|
|
21724
|
+
|
|
21725
|
+
if (!control && (arrowRight || arrowLeft || arrowUp || arrowDown)) {
|
|
21726
|
+
var x = 0;
|
|
21727
|
+
var y = 0;
|
|
21728
|
+
|
|
21729
|
+
if (arrowRight) {
|
|
21730
|
+
x -= PAN_STEP_PERCENTAGE;
|
|
21731
|
+
}
|
|
21732
|
+
|
|
21733
|
+
if (arrowLeft) {
|
|
21734
|
+
x += PAN_STEP_PERCENTAGE;
|
|
21735
|
+
}
|
|
21736
|
+
|
|
21737
|
+
if (arrowUp) {
|
|
21738
|
+
y -= PAN_STEP_PERCENTAGE;
|
|
21739
|
+
}
|
|
21740
|
+
|
|
21741
|
+
if (arrowDown) {
|
|
21742
|
+
y += PAN_STEP_PERCENTAGE;
|
|
21743
|
+
}
|
|
21744
|
+
|
|
21745
|
+
map.mapPanPercentage(x, y);
|
|
21746
|
+
}
|
|
21747
|
+
}
|
|
21748
|
+
};
|
|
21749
|
+
|
|
21750
|
+
document.addEventListener('keydown', handleKeyPress);
|
|
21751
|
+
document.addEventListener('keyup', handleKeyPress);
|
|
21752
|
+
return function () {
|
|
21753
|
+
document.removeEventListener('keydown', handleKeyPress);
|
|
21754
|
+
document.removeEventListener('keyup', handleKeyPress);
|
|
21755
|
+
};
|
|
21756
|
+
}, [mapIsActive, mapId]);
|
|
21757
|
+
};
|
|
21758
|
+
var PAN_STEP_PERCENTAGE = 0.02;
|
|
21759
|
+
|
|
21676
21760
|
/* *
|
|
21677
21761
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21678
21762
|
* you may not use this file except in compliance with the License.
|
|
@@ -21789,7 +21873,14 @@
|
|
|
21789
21873
|
var setSelectedFeature = React__namespace.useCallback(function (payload) {
|
|
21790
21874
|
dispatch(mapActions$1.setSelectedFeature(payload));
|
|
21791
21875
|
}, [dispatch]);
|
|
21792
|
-
|
|
21876
|
+
var activeWindowId = reactRedux.useSelector(getActiveWindowId);
|
|
21877
|
+
|
|
21878
|
+
var isActiveWindowId = function isActiveWindowId() {
|
|
21879
|
+
return activeWindowId === mapId;
|
|
21880
|
+
};
|
|
21881
|
+
|
|
21882
|
+
useKeyboardZoomAndPan(isActiveWindowId(), mapId);
|
|
21883
|
+
useTouchZoomPan(isActiveWindowId(), mapId);
|
|
21793
21884
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
21794
21885
|
style: {
|
|
21795
21886
|
height: '100%'
|
|
@@ -21885,69 +21976,6 @@
|
|
|
21885
21976
|
}), children));
|
|
21886
21977
|
};
|
|
21887
21978
|
|
|
21888
|
-
var useKeyboardZoomAndPan = function useKeyboardZoomAndPan(mapId) {
|
|
21889
|
-
var activeWindowId = reactRedux.useSelector(getActiveWindowId);
|
|
21890
|
-
var mapIsActive = activeWindowId === mapId;
|
|
21891
|
-
React__namespace.useEffect(function () {
|
|
21892
|
-
var keysPressedDown = {};
|
|
21893
|
-
|
|
21894
|
-
var handleKeyPress = function handleKeyPress(event) {
|
|
21895
|
-
var target = event.target;
|
|
21896
|
-
var map = getWMJSMapById(mapId);
|
|
21897
|
-
|
|
21898
|
-
if (map && target.tagName !== 'INPUT' && mapIsActive) {
|
|
21899
|
-
var key = event.key,
|
|
21900
|
-
type = event.type;
|
|
21901
|
-
keysPressedDown[key] = type === 'keydown';
|
|
21902
|
-
|
|
21903
|
-
if (keysPressedDown['+']) {
|
|
21904
|
-
map.zoomIn(1);
|
|
21905
|
-
} else if (keysPressedDown['-']) {
|
|
21906
|
-
map.zoomOut();
|
|
21907
|
-
}
|
|
21908
|
-
|
|
21909
|
-
var arrowRight = keysPressedDown['ArrowRight'];
|
|
21910
|
-
var arrowLeft = keysPressedDown['ArrowLeft'];
|
|
21911
|
-
var arrowUp = keysPressedDown['ArrowUp'];
|
|
21912
|
-
var arrowDown = keysPressedDown['ArrowDown'];
|
|
21913
|
-
var control = keysPressedDown['Control'];
|
|
21914
|
-
|
|
21915
|
-
if (!control && (arrowRight || arrowLeft || arrowUp || arrowDown)) {
|
|
21916
|
-
var x = 0;
|
|
21917
|
-
var y = 0;
|
|
21918
|
-
|
|
21919
|
-
if (arrowRight) {
|
|
21920
|
-
x -= PAN_STEP_PERCENTAGE;
|
|
21921
|
-
}
|
|
21922
|
-
|
|
21923
|
-
if (arrowLeft) {
|
|
21924
|
-
x += PAN_STEP_PERCENTAGE;
|
|
21925
|
-
}
|
|
21926
|
-
|
|
21927
|
-
if (arrowUp) {
|
|
21928
|
-
y -= PAN_STEP_PERCENTAGE;
|
|
21929
|
-
}
|
|
21930
|
-
|
|
21931
|
-
if (arrowDown) {
|
|
21932
|
-
y += PAN_STEP_PERCENTAGE;
|
|
21933
|
-
}
|
|
21934
|
-
|
|
21935
|
-
map.mapPanPercentage(x, y);
|
|
21936
|
-
}
|
|
21937
|
-
}
|
|
21938
|
-
};
|
|
21939
|
-
|
|
21940
|
-
document.addEventListener('keydown', handleKeyPress);
|
|
21941
|
-
document.addEventListener('keyup', handleKeyPress);
|
|
21942
|
-
return function () {
|
|
21943
|
-
document.removeEventListener('keydown', handleKeyPress);
|
|
21944
|
-
document.removeEventListener('keyup', handleKeyPress);
|
|
21945
|
-
};
|
|
21946
|
-
}, [mapIsActive, mapId]);
|
|
21947
|
-
};
|
|
21948
|
-
|
|
21949
|
-
var PAN_STEP_PERCENTAGE = 0.02;
|
|
21950
|
-
|
|
21951
21979
|
/* *
|
|
21952
21980
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21953
21981
|
* you may not use this file except in compliance with the License.
|
|
@@ -22167,20 +22195,20 @@
|
|
|
22167
22195
|
* See the License for the specific language governing permissions and
|
|
22168
22196
|
* limitations under the License.
|
|
22169
22197
|
*
|
|
22170
|
-
* Copyright
|
|
22171
|
-
* Copyright
|
|
22198
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
22199
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
22172
22200
|
* */
|
|
22173
|
-
|
|
22201
|
+
|
|
22202
|
+
var mapBoxStyle = function mapBoxStyle(theme) {
|
|
22174
22203
|
return {
|
|
22175
|
-
|
|
22176
|
-
|
|
22177
|
-
|
|
22178
|
-
|
|
22179
|
-
border: "1px solid " + theme.palette.geowebColors.typographyAndIcons.iconLinkDisabled
|
|
22180
|
-
}
|
|
22204
|
+
boxSizing: 'border-box',
|
|
22205
|
+
"float": 'left',
|
|
22206
|
+
'& .MapViewComponent': {
|
|
22207
|
+
border: "1px solid " + theme.palette.geowebColors.typographyAndIcons.iconLinkDisabled
|
|
22181
22208
|
}
|
|
22182
22209
|
};
|
|
22183
|
-
}
|
|
22210
|
+
};
|
|
22211
|
+
|
|
22184
22212
|
var MultiMapViewConnect = function MultiMapViewConnect(_a) {
|
|
22185
22213
|
var maps = _a.maps,
|
|
22186
22214
|
rows = _a.rows,
|
|
@@ -22191,7 +22219,6 @@
|
|
|
22191
22219
|
showZoomControls = _c === void 0 ? true : _c,
|
|
22192
22220
|
_d = _a.multiLegend,
|
|
22193
22221
|
multiLegend = _d === void 0 ? false : _d;
|
|
22194
|
-
var classes = useStyles$2();
|
|
22195
22222
|
var dispatch = reactRedux.useDispatch();
|
|
22196
22223
|
var syncGroupAddTarget = React__default["default"].useCallback(function (payload) {
|
|
22197
22224
|
dispatch(genericActions.syncGroupAddTarget(payload));
|
|
@@ -22236,10 +22263,10 @@
|
|
|
22236
22263
|
multiLegend: multiLegend
|
|
22237
22264
|
}), maps.map(function (map, mapIndex) {
|
|
22238
22265
|
var mapId = map.id;
|
|
22239
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
22240
|
-
className: classes.box,
|
|
22266
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
22241
22267
|
key: mapId,
|
|
22242
|
-
style: mapStyle
|
|
22268
|
+
style: mapStyle,
|
|
22269
|
+
sx: mapBoxStyle
|
|
22243
22270
|
}, /*#__PURE__*/React__default["default"].createElement(ConfigurableMapConnect, {
|
|
22244
22271
|
title: map.title,
|
|
22245
22272
|
id: mapId,
|
|
@@ -22561,18 +22588,32 @@
|
|
|
22561
22588
|
* See the License for the specific language governing permissions and
|
|
22562
22589
|
* limitations under the License.
|
|
22563
22590
|
*
|
|
22564
|
-
* Copyright
|
|
22565
|
-
* Copyright
|
|
22591
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
22592
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
22566
22593
|
* */
|
|
22594
|
+
var styles = {
|
|
22595
|
+
listItem: {
|
|
22596
|
+
width: '80%',
|
|
22597
|
+
borderRadius: '5px'
|
|
22598
|
+
},
|
|
22599
|
+
isActive: {
|
|
22600
|
+
color: 'geowebColors.typographyAndIcons.icon'
|
|
22601
|
+
},
|
|
22602
|
+
checkboxIsActive: {
|
|
22603
|
+
color: 'geowebColors.typographyAndIcons.iconLinkActive'
|
|
22604
|
+
},
|
|
22605
|
+
isDisabled: {
|
|
22606
|
+
color: 'geowebColors.typographyAndIcons.iconLinkDisabled'
|
|
22607
|
+
}
|
|
22608
|
+
};
|
|
22567
22609
|
var SyncGroupListItem = function SyncGroupListItem(_a) {
|
|
22568
22610
|
var viewStateData = _a.viewStateData,
|
|
22569
22611
|
groupId = _a.groupId,
|
|
22570
22612
|
selected = _a.selected,
|
|
22571
22613
|
sourcesById = _a.sourcesById,
|
|
22572
22614
|
handleToggle = _a.handleToggle;
|
|
22573
|
-
|
|
22574
|
-
|
|
22575
|
-
className: classes.listItem
|
|
22615
|
+
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
22616
|
+
sx: styles.listItem
|
|
22576
22617
|
}, sourcesById.map(function (source) {
|
|
22577
22618
|
var isChecked = selected.includes(source.id); // Check if checkbox is checked in another group
|
|
22578
22619
|
|
|
@@ -22586,7 +22627,7 @@
|
|
|
22586
22627
|
onClick: function onClick() {
|
|
22587
22628
|
return handleToggle(source.id);
|
|
22588
22629
|
},
|
|
22589
|
-
|
|
22630
|
+
sx: styles.listItem
|
|
22590
22631
|
}, /*#__PURE__*/React__namespace.createElement(material.ListItemIcon, null, /*#__PURE__*/React__namespace.createElement(material.Checkbox, {
|
|
22591
22632
|
edge: "start",
|
|
22592
22633
|
checked: isChecked,
|
|
@@ -22595,30 +22636,13 @@
|
|
|
22595
22636
|
inputProps: {
|
|
22596
22637
|
'aria-labelledby': source.name
|
|
22597
22638
|
},
|
|
22598
|
-
|
|
22639
|
+
sx: isNotCheckedElseWhere ? styles.checkboxIsActive : styles.isDisabled,
|
|
22599
22640
|
color: "default"
|
|
22600
22641
|
})), /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
22601
|
-
|
|
22642
|
+
sx: isNotCheckedElseWhere ? styles.isActive : styles.isDisabled
|
|
22602
22643
|
}, source.name));
|
|
22603
22644
|
}));
|
|
22604
22645
|
};
|
|
22605
|
-
var useStyles$1 = makeStyles__default["default"](function (theme) {
|
|
22606
|
-
return createStyles__default["default"]({
|
|
22607
|
-
listItem: {
|
|
22608
|
-
width: '80%',
|
|
22609
|
-
borderRadius: '5px'
|
|
22610
|
-
},
|
|
22611
|
-
isActive: {
|
|
22612
|
-
color: theme.palette.geowebColors.typographyAndIcons.icon
|
|
22613
|
-
},
|
|
22614
|
-
checkboxIsActive: {
|
|
22615
|
-
color: theme.palette.geowebColors.typographyAndIcons.iconLinkActive
|
|
22616
|
-
},
|
|
22617
|
-
isDisabled: {
|
|
22618
|
-
color: theme.palette.geowebColors.typographyAndIcons.iconLinkDisabled
|
|
22619
|
-
}
|
|
22620
|
-
});
|
|
22621
|
-
});
|
|
22622
22646
|
|
|
22623
22647
|
/* *
|
|
22624
22648
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -22633,8 +22657,8 @@
|
|
|
22633
22657
|
* See the License for the specific language governing permissions and
|
|
22634
22658
|
* limitations under the License.
|
|
22635
22659
|
*
|
|
22636
|
-
* Copyright
|
|
22637
|
-
* Copyright
|
|
22660
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
22661
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
22638
22662
|
* */
|
|
22639
22663
|
var SyncGroupList = function SyncGroupList(_a) {
|
|
22640
22664
|
var viewStateData = _a.viewStateData,
|
|
@@ -22642,15 +22666,26 @@
|
|
|
22642
22666
|
_handleToggle = _a.handleToggle,
|
|
22643
22667
|
addNewGroup = _a.addNewGroup,
|
|
22644
22668
|
removeGroup = _a.removeGroup;
|
|
22645
|
-
var classes = useStyles();
|
|
22646
22669
|
return /*#__PURE__*/React__namespace.createElement(material.List, {
|
|
22647
22670
|
disablePadding: true
|
|
22648
22671
|
}, viewStateData.groups.map(function (groupObject, index) {
|
|
22649
22672
|
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
22650
22673
|
key: groupObject.id,
|
|
22651
|
-
|
|
22652
|
-
|
|
22653
|
-
|
|
22674
|
+
sx: __assign({}, index !== 0 && {
|
|
22675
|
+
backgroundColor: 'geowebColors.syncGroups.drawerOpen.fill',
|
|
22676
|
+
boxShadow: 'inset 0px 7px 7px -7px, inset 0px -7px 7px -7px',
|
|
22677
|
+
color: '#000000'
|
|
22678
|
+
})
|
|
22679
|
+
}, /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
22680
|
+
sx: {
|
|
22681
|
+
display: 'flex',
|
|
22682
|
+
flexDirection: 'row',
|
|
22683
|
+
justifyContent: 'space-between',
|
|
22684
|
+
alignItems: 'center',
|
|
22685
|
+
color: 'geowebColors.typographyAndIcons.text',
|
|
22686
|
+
paddingLeft: '15px',
|
|
22687
|
+
paddingTop: '10px'
|
|
22688
|
+
}
|
|
22654
22689
|
}, /*#__PURE__*/React__namespace.createElement(material.Typography, null, title), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
22655
22690
|
title: index === 0 ? 'Add new group to list' : 'Remove group from list'
|
|
22656
22691
|
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
@@ -22675,24 +22710,6 @@
|
|
|
22675
22710
|
}));
|
|
22676
22711
|
}));
|
|
22677
22712
|
};
|
|
22678
|
-
var useStyles = makeStyles__default["default"](function (theme) {
|
|
22679
|
-
return createStyles__default["default"]({
|
|
22680
|
-
syncGroupHeader: {
|
|
22681
|
-
display: 'flex',
|
|
22682
|
-
flexDirection: 'row',
|
|
22683
|
-
justifyContent: 'space-between',
|
|
22684
|
-
alignItems: 'center',
|
|
22685
|
-
color: theme.palette.geowebColors.typographyAndIcons.text,
|
|
22686
|
-
paddingLeft: '15px',
|
|
22687
|
-
paddingTop: '10px'
|
|
22688
|
-
},
|
|
22689
|
-
childListItem: {
|
|
22690
|
-
backgroundColor: theme.palette.geowebColors.syncGroups.drawerOpen.fill,
|
|
22691
|
-
boxShadow: 'inset 0px 7px 7px -7px, inset 0px -7px 7px -7px',
|
|
22692
|
-
color: '#000000'
|
|
22693
|
-
}
|
|
22694
|
-
});
|
|
22695
|
-
});
|
|
22696
22713
|
|
|
22697
22714
|
/* *
|
|
22698
22715
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -23141,6 +23158,90 @@
|
|
|
23141
23158
|
}, children)));
|
|
23142
23159
|
};
|
|
23143
23160
|
|
|
23161
|
+
/* *
|
|
23162
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
23163
|
+
* you may not use this file except in compliance with the License.
|
|
23164
|
+
* You may obtain a copy of the License at
|
|
23165
|
+
*
|
|
23166
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23167
|
+
*
|
|
23168
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
23169
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
23170
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23171
|
+
* See the License for the specific language governing permissions and
|
|
23172
|
+
* limitations under the License.
|
|
23173
|
+
*
|
|
23174
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
23175
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
23176
|
+
* */
|
|
23177
|
+
var SnackbarWrapper = function SnackbarWrapper(_a) {
|
|
23178
|
+
var children = _a.children,
|
|
23179
|
+
isOpen = _a.isOpen,
|
|
23180
|
+
onCloseSnackbar = _a.onCloseSnackbar,
|
|
23181
|
+
id = _a.id,
|
|
23182
|
+
props = __rest(_a, ["children", "isOpen", "onCloseSnackbar", "id"]);
|
|
23183
|
+
|
|
23184
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, children, /*#__PURE__*/React__namespace.createElement(material.Snackbar, __assign({
|
|
23185
|
+
"data-testid": "snackbarComponent",
|
|
23186
|
+
open: isOpen,
|
|
23187
|
+
onClose: onCloseSnackbar,
|
|
23188
|
+
autoHideDuration: null,
|
|
23189
|
+
key: id,
|
|
23190
|
+
ClickAwayListenerProps: {
|
|
23191
|
+
mouseEvent: false
|
|
23192
|
+
},
|
|
23193
|
+
action: /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
23194
|
+
"aria-label": "close",
|
|
23195
|
+
"data-testid": "snackbarCloseButton",
|
|
23196
|
+
onClick: onCloseSnackbar,
|
|
23197
|
+
sx: {
|
|
23198
|
+
color: 'geowebColors.snackbar.action',
|
|
23199
|
+
'&:hover': {
|
|
23200
|
+
backgroundColor: 'geowebColors.snackbar.actionHover.rgba'
|
|
23201
|
+
}
|
|
23202
|
+
}
|
|
23203
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.Close, null))
|
|
23204
|
+
}, props)));
|
|
23205
|
+
};
|
|
23206
|
+
|
|
23207
|
+
/* *
|
|
23208
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
23209
|
+
* you may not use this file except in compliance with the License.
|
|
23210
|
+
* You may obtain a copy of the License at
|
|
23211
|
+
*
|
|
23212
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23213
|
+
*
|
|
23214
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
23215
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
23216
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23217
|
+
* See the License for the specific language governing permissions and
|
|
23218
|
+
* limitations under the License.
|
|
23219
|
+
*
|
|
23220
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
23221
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
23222
|
+
* */
|
|
23223
|
+
var SnackbarWrapperConnect = function SnackbarWrapperConnect(_a) {
|
|
23224
|
+
var props = __rest(_a, []);
|
|
23225
|
+
|
|
23226
|
+
var dispatch = reactRedux.useDispatch();
|
|
23227
|
+
|
|
23228
|
+
var onCloseSnackbar = function onCloseSnackbar() {
|
|
23229
|
+
dispatch(snackbarActions.closeSnackbar());
|
|
23230
|
+
};
|
|
23231
|
+
|
|
23232
|
+
var currentSnackbarMessage = reactRedux.useSelector(function (store) {
|
|
23233
|
+
return getFirstSnackbarMessage(store);
|
|
23234
|
+
});
|
|
23235
|
+
return /*#__PURE__*/React__namespace.createElement(reduxDynamicModules.DynamicModuleLoader, {
|
|
23236
|
+
modules: [snackbarModuleConfig]
|
|
23237
|
+
}, /*#__PURE__*/React__namespace.createElement(SnackbarWrapper, __assign({
|
|
23238
|
+
isOpen: !!currentSnackbarMessage,
|
|
23239
|
+
onCloseSnackbar: onCloseSnackbar,
|
|
23240
|
+
message: currentSnackbarMessage ? currentSnackbarMessage.message : '',
|
|
23241
|
+
id: currentSnackbarMessage ? currentSnackbarMessage.id : ''
|
|
23242
|
+
}, props)));
|
|
23243
|
+
};
|
|
23244
|
+
|
|
23144
23245
|
/* *
|
|
23145
23246
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
23146
23247
|
* you may not use this file except in compliance with the License.
|
|
@@ -23158,7 +23259,9 @@
|
|
|
23158
23259
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
23159
23260
|
* */
|
|
23160
23261
|
var MapWarningProperties = function MapWarningProperties(_a) {
|
|
23161
|
-
var selectedFeatureProperties = _a.selectedFeatureProperties
|
|
23262
|
+
var selectedFeatureProperties = _a.selectedFeatureProperties,
|
|
23263
|
+
languageIndex = _a.languageIndex;
|
|
23264
|
+
var language = languageIndex || 0;
|
|
23162
23265
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23163
23266
|
"data-testid": "map-warning-properties",
|
|
23164
23267
|
style: {
|
|
@@ -23177,13 +23280,13 @@
|
|
|
23177
23280
|
"data-testid": "map-warning-properties-title"
|
|
23178
23281
|
}, selectedFeatureProperties.areaDesc), selectedFeatureProperties.areaDesc && /*#__PURE__*/React__default["default"].createElement("pre", {
|
|
23179
23282
|
"data-testid": "map-warning-properties-row"
|
|
23180
|
-
}, "event: ", selectedFeatureProperties.languages[
|
|
23283
|
+
}, "event: ", selectedFeatureProperties.languages[language].event), selectedFeatureProperties.onset && /*#__PURE__*/React__default["default"].createElement("pre", {
|
|
23181
23284
|
"data-testid": "map-warning-properties-row"
|
|
23182
23285
|
}, "Sent:", ' ', moment__default["default"].utc(selectedFeatureProperties.onset).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.expires && /*#__PURE__*/React__default["default"].createElement("pre", {
|
|
23183
23286
|
"data-testid": "map-warning-properties-row"
|
|
23184
|
-
}, "Expires:", ' ', moment__default["default"].utc(selectedFeatureProperties.expires).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.languages[
|
|
23287
|
+
}, "Expires:", ' ', moment__default["default"].utc(selectedFeatureProperties.expires).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.languages[language].senderName && /*#__PURE__*/React__default["default"].createElement("pre", {
|
|
23185
23288
|
"data-testid": "map-warning-properties-row"
|
|
23186
|
-
}, "Sender: ", selectedFeatureProperties.languages[
|
|
23289
|
+
}, "Sender: ", selectedFeatureProperties.languages[language].senderName), selectedFeatureProperties.identifier && /*#__PURE__*/React__default["default"].createElement("pre", {
|
|
23187
23290
|
"data-testid": "map-warning-properties-row"
|
|
23188
23291
|
}, "Identifier: ", selectedFeatureProperties.identifier));
|
|
23189
23292
|
};
|
|
@@ -23225,6 +23328,7 @@
|
|
|
23225
23328
|
exports.MultiMapViewConnect = MultiMapViewConnect;
|
|
23226
23329
|
exports.ReactMapView = ReactMapView;
|
|
23227
23330
|
exports.ReactMapViewLayer = ReactMapViewLayer;
|
|
23331
|
+
exports.SnackbarWrapperConnect = SnackbarWrapperConnect;
|
|
23228
23332
|
exports.SyncGroupViewerConnect = SyncGroupViewerConnect;
|
|
23229
23333
|
exports.SyncGroups = index;
|
|
23230
23334
|
exports.TimeSliderConnect = TimeSliderConnect;
|
|
@@ -23235,9 +23339,7 @@
|
|
|
23235
23339
|
exports.dateFormat = dateFormat;
|
|
23236
23340
|
exports.defaultBbox = defaultBbox;
|
|
23237
23341
|
exports.defaultConfigurations = defaultConfigurations;
|
|
23238
|
-
exports.filterBaseLayers = filterBaseLayers;
|
|
23239
23342
|
exports.filterLayers = filterLayers;
|
|
23240
|
-
exports.filterMapLayers = filterMapLayers;
|
|
23241
23343
|
exports.filterMapPresets = filterMapPresets;
|
|
23242
23344
|
exports.filterNonTimeDimensions = filterNonTimeDimensions;
|
|
23243
23345
|
exports.filterServices = filterServices;
|
|
@@ -23245,7 +23347,7 @@
|
|
|
23245
23347
|
exports.generateMapId = generateMapId;
|
|
23246
23348
|
exports.generateTimesliderId = generateTimesliderId;
|
|
23247
23349
|
exports.getFirstTimeStepForLayerId = getFirstTimeStepForLayerId;
|
|
23248
|
-
exports.
|
|
23350
|
+
exports.getInitialAppPresets = getInitialAppPresets;
|
|
23249
23351
|
exports.getLastTimeStepForLayerId = getLastTimeStepForLayerId;
|
|
23250
23352
|
exports.getNextTimeStepForLayerId = getNextTimeStepForLayerId;
|
|
23251
23353
|
exports.getPreviousTimeStepForLayerId = getPreviousTimeStepForLayerId;
|
|
@@ -23254,16 +23356,19 @@
|
|
|
23254
23356
|
exports.getWMJSTimeDimensionForLayerId = getWMJSTimeDimensionForLayerId;
|
|
23255
23357
|
exports.getWMLayerById = getWMLayerById;
|
|
23256
23358
|
exports.layerActions = layerActions;
|
|
23257
|
-
exports.layerReducer = reducer$
|
|
23359
|
+
exports.layerReducer = reducer$6;
|
|
23258
23360
|
exports.mapActions = mapActions;
|
|
23259
23361
|
exports.mapModuleConfig = moduleConfig;
|
|
23260
23362
|
exports.mapSelectors = selectors;
|
|
23261
23363
|
exports.mapTypes = types$2;
|
|
23262
23364
|
exports.mapUtils = utils;
|
|
23365
|
+
exports.parseBoolean = parseBoolean;
|
|
23366
|
+
exports.parseLayer = parseLayer;
|
|
23263
23367
|
exports.publicLayers = publicLayers;
|
|
23264
23368
|
exports.publicServices = publicServices;
|
|
23265
23369
|
exports.registerWMJSMap = registerWMJSMap;
|
|
23266
23370
|
exports.registerWMLayer = registerWMLayer;
|
|
23371
|
+
exports.snackbarActions = snackbarActions;
|
|
23267
23372
|
exports.store = store;
|
|
23268
23373
|
exports.syncGroupActions = genericActions;
|
|
23269
23374
|
exports.synchronizationGroupModuleConfig = synchronizationGroupConfig;
|
|
@@ -23273,7 +23378,6 @@
|
|
|
23273
23378
|
exports.uiModuleConfig = uiModuleConfig;
|
|
23274
23379
|
exports.uiSelectors = selectors$1;
|
|
23275
23380
|
exports.uiTypes = types;
|
|
23276
|
-
exports.useStyles = useStyles$2;
|
|
23277
23381
|
|
|
23278
23382
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
23279
23383
|
|