@opengeoweb/workspace 9.36.0 → 10.0.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/README.md
CHANGED
|
@@ -24,6 +24,6 @@ import {
|
|
|
24
24
|
|
|
25
25
|
Run `nx test workspace` to execute the unit tests via [Jest](https://jestjs.io).
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
### TypeScript Documentation
|
|
28
28
|
|
|
29
|
-
https://opengeoweb.gitlab.io/opengeoweb/docs/workspace/
|
|
29
|
+
- [TypeScript Docs](https://opengeoweb.gitlab.io/opengeoweb/typescript-docs/workspace/)
|
package/index.esm.js
CHANGED
|
@@ -4,14 +4,16 @@ import { createApiInstance, createNonAuthApiInstance, getApi, createFakeApiInsta
|
|
|
4
4
|
import _, { chunk, cloneDeep, pick, isEmpty, isEqual, isString } from 'lodash';
|
|
5
5
|
import { getLeaves, MosaicContext, getAndAssertNodeAtPathExists, createBalancedTreeFromLeaves, MosaicWindow, Mosaic } from 'react-mosaic-component';
|
|
6
6
|
import { timeSeriesActions, TimeSeriesTypes, timeSeriesSelectors, timeSeriesReducersMap, timeSeriesMiddlewares } from '@opengeoweb/timeseries';
|
|
7
|
+
import { publicWarningActions, WARN_NAMESPACE, warningsTranslations, publicWarningsSelectors } from '@opengeoweb/warnings';
|
|
7
8
|
import { PROJECTION, getAxiosErrorMessage, isAxiosAuthError, isAxiosError as isAxiosError$1, SHARED_NAMESPACE, sharedTranslations, ConfirmationServiceProvider, CustomIconButton, useConfirmationDialog, AlertBanner, CustomTooltip, SearchHighlight, ToggleMenu, DEFAULT_FILTER_HEIGHT, usePrevious, Filter, Resizable, ToolContainer, renderCounter, CustomToggleButton, ConfirmationDialog } from '@opengeoweb/shared';
|
|
8
9
|
import { snackbarTypes, snackbarActions, snackbarReducersMap, snackbarMiddlewares, SnackbarWrapperConnect } from '@opengeoweb/snackbar';
|
|
9
10
|
import { isAxiosError } from 'axios';
|
|
10
11
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
|
-
import { ThemeWrapper, lightTheme, Link, LinkOff, SplitVertical, SplitHorizontal, Expand, UnExpand, Close, Delete, Preset, PresetWorkspace, PresetTiles, CloudLoading, CloudIdle, WebAssetOff, Exclamation } from '@opengeoweb/theme';
|
|
12
|
+
import { ThemeWrapper, lightTheme, Link, LinkOff, SplitVertical, SplitHorizontal, Expand, UnExpand, Close, Delete, Preset, PresetWorkspace, PresetTiles, BackdropStyle, BackdropElement, CloudLoading, CloudIdle, WebAssetOff, Exclamation } from '@opengeoweb/theme';
|
|
12
13
|
import { Provider, useDispatch, useSelector, useStore, shallowEqual } from 'react-redux';
|
|
13
14
|
import { initReactI18next, useTranslation, I18nextProvider } from 'react-i18next';
|
|
14
15
|
import { AuthenticationProvider, useAuthenticationContext, GEOWEB_ROLE_PRESETS_ADMIN } from '@opengeoweb/authentication';
|
|
16
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
15
17
|
import i18n from 'i18next';
|
|
16
18
|
import { WEBMAP_REACT_NAMESPACE, webmapReactTranslations } from '@opengeoweb/webmap-react';
|
|
17
19
|
import { CORE_NAMESPACE, coreTranslations } from '@opengeoweb/core';
|
|
@@ -1101,6 +1103,7 @@ var viewPresetsAdapter = createEntityAdapter({
|
|
|
1101
1103
|
}
|
|
1102
1104
|
});
|
|
1103
1105
|
var initialState$2 = viewPresetsAdapter.getInitialState();
|
|
1106
|
+
var warningsPresetChangeActions = [publicWarningActions.setWarningFilters];
|
|
1104
1107
|
var syncGroupChangeActions = [syncGroupsActions.syncGroupRemoveTarget, syncGroupsActions.syncGroupAddTarget];
|
|
1105
1108
|
var mapPresetChangeActions = [layerActions.setBaseLayers, layerActions.layerDelete, layerActions.addLayer, layerActions.duplicateMapLayer, layerActions.layerChangeEnabled, layerActions.layerChangeName, layerActions.layerChangeStyle, layerActions.layerChangeOpacity, layerActions.layerChangeDimension, mapStoreActions.layerMoveLayer, mapStoreActions.setAutoLayerId, mapStoreActions.toggleAutoUpdate, mapStoreActions.mapStartAnimation, mapStoreActions.mapStopAnimation, mapStoreActions.toggleTimeSliderIsVisible, mapStoreActions.setTimeStep, mapStoreActions.setAnimationDelay, mapStoreActions.toggleTimestepAuto, mapStoreActions.setAnimationStartTime, mapStoreActions.setAnimationEndTime, uiActions.setActiveMapIdForDialog, uiActions.setToggleOpenDialog, genericActions.setBbox, mapActions.setBbox];
|
|
1106
1109
|
var timeSeriesPresetChangeActions = [timeSeriesActions.addParameter, timeSeriesActions.addPlot, timeSeriesActions.deleteParameter, timeSeriesActions.deletePlot, timeSeriesActions.moveParameter, timeSeriesActions.movePlot, timeSeriesActions.toggleParameter, timeSeriesActions.togglePlot, timeSeriesActions.patchParameter, timeSeriesActions.updateTitle];
|
|
@@ -1399,14 +1402,28 @@ var slice$2 = createSlice({
|
|
|
1399
1402
|
});
|
|
1400
1403
|
}
|
|
1401
1404
|
});
|
|
1402
|
-
|
|
1403
|
-
return builder.addCase(
|
|
1405
|
+
warningsPresetChangeActions.map(function (warningsAction) {
|
|
1406
|
+
return builder.addCase(warningsAction, function (draft, action) {
|
|
1404
1407
|
var _action$payload13 = action.payload,
|
|
1405
1408
|
origin = _action$payload13.origin,
|
|
1406
|
-
|
|
1409
|
+
panelId = _action$payload13.panelId;
|
|
1410
|
+
if (origin === 'user' && panelId) {
|
|
1411
|
+
var entity = draft.entities[panelId];
|
|
1412
|
+
if (entity && !(entity != null && entity.hasChanges)) {
|
|
1413
|
+
entity.hasChanges = true;
|
|
1414
|
+
viewPresetsAdapter.setOne(draft, entity);
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
});
|
|
1418
|
+
});
|
|
1419
|
+
syncGroupChangeActions.map(function (syncGroupAction) {
|
|
1420
|
+
return builder.addCase(syncGroupAction, function (draft, action) {
|
|
1421
|
+
var _action$payload14 = action.payload,
|
|
1422
|
+
origin = _action$payload14.origin,
|
|
1423
|
+
targetId = _action$payload14.targetId;
|
|
1407
1424
|
if (origin === 'user') {
|
|
1408
1425
|
var entity = draft.entities[targetId];
|
|
1409
|
-
if (entity) {
|
|
1426
|
+
if (entity && !(entity != null && entity.hasChanges)) {
|
|
1410
1427
|
entity.hasChanges = true;
|
|
1411
1428
|
viewPresetsAdapter.setOne(draft, entity);
|
|
1412
1429
|
}
|
|
@@ -1415,9 +1432,9 @@ var slice$2 = createSlice({
|
|
|
1415
1432
|
});
|
|
1416
1433
|
mapPresetChangeActions.map(function (mapPresetAction) {
|
|
1417
1434
|
return builder.addCase(mapPresetAction, function (draft, action) {
|
|
1418
|
-
var _action$
|
|
1419
|
-
mapId = _action$
|
|
1420
|
-
origin = _action$
|
|
1435
|
+
var _action$payload15 = action.payload,
|
|
1436
|
+
mapId = _action$payload15.mapId,
|
|
1437
|
+
origin = _action$payload15.origin;
|
|
1421
1438
|
var isChangeOriginSupported = supportedMapActionOrigins.indexOf(origin) >= 0;
|
|
1422
1439
|
if (isChangeOriginSupported && mapId) {
|
|
1423
1440
|
var entity = draft.entities[mapId];
|
|
@@ -1430,9 +1447,9 @@ var slice$2 = createSlice({
|
|
|
1430
1447
|
});
|
|
1431
1448
|
timeSeriesPresetChangeActions.map(function (timeSeriesPresetAction) {
|
|
1432
1449
|
return builder.addCase(timeSeriesPresetAction, function (draft, action) {
|
|
1433
|
-
var _action$
|
|
1434
|
-
panelId = _action$
|
|
1435
|
-
origin = _action$
|
|
1450
|
+
var _action$payload16 = action.payload,
|
|
1451
|
+
panelId = _action$payload16.panelId,
|
|
1452
|
+
origin = _action$payload16.origin;
|
|
1436
1453
|
var isChangeOriginSupported = supportedTimeSeriesActionOrigins.indexOf(origin) >= 0;
|
|
1437
1454
|
var changesRelevantProperties = timeSeriesPresetAction.type === timeSeriesActions.patchParameter.type ? Object.keys(action.payload.parameter).filter(function (key) {
|
|
1438
1455
|
return key !== 'id' && key !== 'instanceId';
|
|
@@ -2101,7 +2118,8 @@ var emptyViewPreset = function emptyViewPreset(componentType) {
|
|
|
2101
2118
|
MultiMap: undefined,
|
|
2102
2119
|
ModelRunInterval: undefined,
|
|
2103
2120
|
HarmonieTempAndPrecipPreset: undefined,
|
|
2104
|
-
TimeSlider: undefined
|
|
2121
|
+
TimeSlider: undefined,
|
|
2122
|
+
WarningList: undefined
|
|
2105
2123
|
};
|
|
2106
2124
|
return {
|
|
2107
2125
|
componentType: actualComponentType,
|
|
@@ -5072,38 +5090,119 @@ workspaceListener.startListening({
|
|
|
5072
5090
|
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
5073
5091
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5074
5092
|
* */
|
|
5075
|
-
var
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5093
|
+
var WorkspaceListErrorCategory;
|
|
5094
|
+
(function (WorkspaceListErrorCategory) {
|
|
5095
|
+
WorkspaceListErrorCategory["AUTH"] = "AUTH";
|
|
5096
|
+
WorkspaceListErrorCategory["GENERIC"] = "GENERIC";
|
|
5097
|
+
})(WorkspaceListErrorCategory || (WorkspaceListErrorCategory = {}));
|
|
5098
|
+
var WorkspaceListErrorType;
|
|
5099
|
+
(function (WorkspaceListErrorType) {
|
|
5100
|
+
WorkspaceListErrorType["TRANSLATABLE_ERROR"] = "TRANSLATABLE_ERROR";
|
|
5101
|
+
WorkspaceListErrorType["VERBATIM_ERROR"] = "VERBATIM_ERROR";
|
|
5102
|
+
})(WorkspaceListErrorType || (WorkspaceListErrorType = {}));
|
|
5103
|
+
|
|
5104
|
+
/* *
|
|
5105
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5106
|
+
* you may not use this file except in compliance with the License.
|
|
5107
|
+
* You may obtain a copy of the License at
|
|
5108
|
+
*
|
|
5109
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5110
|
+
*
|
|
5111
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5112
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5113
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5114
|
+
* See the License for the specific language governing permissions and
|
|
5115
|
+
* limitations under the License.
|
|
5116
|
+
*
|
|
5117
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5118
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
5119
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5120
|
+
* */
|
|
5121
|
+
var getWorkspaceListStore = function getWorkspaceListStore(store) {
|
|
5122
|
+
if (store && store.workspaceList) {
|
|
5123
|
+
return store.workspaceList;
|
|
5103
5124
|
}
|
|
5125
|
+
return null;
|
|
5126
|
+
};
|
|
5127
|
+
var selectors = workspaceListAdapter.getSelectors(function (state) {
|
|
5128
|
+
var _state$workspaceList;
|
|
5129
|
+
return (_state$workspaceList = state == null ? void 0 : state.workspaceList) != null ? _state$workspaceList : {
|
|
5130
|
+
entities: {},
|
|
5131
|
+
ids: []
|
|
5132
|
+
};
|
|
5104
5133
|
});
|
|
5105
|
-
var
|
|
5106
|
-
|
|
5134
|
+
var getWorkspaceList = selectors.selectAll;
|
|
5135
|
+
var getIsWorkspaceListFetching = createSelector(getWorkspaceListStore, function (store) {
|
|
5136
|
+
return store;
|
|
5137
|
+
}, function (state) {
|
|
5138
|
+
return (state == null ? void 0 : state.isFetching) || false;
|
|
5139
|
+
}, selectorMemoizationOptions);
|
|
5140
|
+
var getWorkspaceDialogIsSaved = createSelector(getWorkspaceListStore, function (store) {
|
|
5141
|
+
return store;
|
|
5142
|
+
}, function (state) {
|
|
5143
|
+
var _state$workspaceActio;
|
|
5144
|
+
return (state == null || (_state$workspaceActio = state.workspaceActionDialog) == null ? void 0 : _state$workspaceActio.hasSaved) || false;
|
|
5145
|
+
}, selectorMemoizationOptions);
|
|
5146
|
+
var getWorkspaceListError = createSelector(getWorkspaceListStore, function (store) {
|
|
5147
|
+
return store;
|
|
5148
|
+
}, function (state) {
|
|
5149
|
+
return (state == null ? void 0 : state.error) || undefined;
|
|
5150
|
+
}, selectorMemoizationOptions);
|
|
5151
|
+
var getWorkspaceActionDialogDetails = createSelector(getWorkspaceListStore, getWorkspaceState, getViewPresetsStore, function (workspaceListState, workspaceState, viewpresetState) {
|
|
5152
|
+
var dialog = (workspaceListState == null ? void 0 : workspaceListState.workspaceActionDialog) || false;
|
|
5153
|
+
if (dialog) {
|
|
5154
|
+
var _dialog$formValues$vi;
|
|
5155
|
+
var views = (_dialog$formValues$vi = dialog.formValues.views) == null ? void 0 : _dialog$formValues$vi.map(function (view) {
|
|
5156
|
+
var workspaceView = workspaceState.views.byId[view.mosaicNodeId];
|
|
5157
|
+
var viewComplete = viewpresetState.entities[view.mosaicNodeId];
|
|
5158
|
+
return {
|
|
5159
|
+
mosaicNodeId: view.mosaicNodeId,
|
|
5160
|
+
viewPresetId: (viewComplete == null ? void 0 : viewComplete.activeViewPresetId) || view.viewPresetId,
|
|
5161
|
+
isSelected: view.isSelected,
|
|
5162
|
+
title: view.title || workspaceView.title,
|
|
5163
|
+
error: viewComplete == null ? void 0 : viewComplete.error,
|
|
5164
|
+
isFetching: viewComplete == null ? void 0 : viewComplete.isFetching,
|
|
5165
|
+
hasChanges: viewComplete == null ? void 0 : viewComplete.hasChanges,
|
|
5166
|
+
scope: view.scope
|
|
5167
|
+
};
|
|
5168
|
+
});
|
|
5169
|
+
return Object.assign({}, dialog, {
|
|
5170
|
+
formValues: Object.assign({}, dialog.formValues, views && {
|
|
5171
|
+
views: views
|
|
5172
|
+
})
|
|
5173
|
+
});
|
|
5174
|
+
}
|
|
5175
|
+
return dialog;
|
|
5176
|
+
}, selectorMemoizationOptions);
|
|
5177
|
+
var getIsWorkspaceListDialogOpen = createSelector(getWorkspaceListStore, function (store) {
|
|
5178
|
+
return store;
|
|
5179
|
+
}, function (state) {
|
|
5180
|
+
return (state == null ? void 0 : state.isWorkspaceListDialogOpen) || false;
|
|
5181
|
+
}, selectorMemoizationOptions);
|
|
5182
|
+
var getWorkspaceListFilters = createSelector(function (store) {
|
|
5183
|
+
return getWorkspaceListStore(store);
|
|
5184
|
+
}, function (_store, scope) {
|
|
5185
|
+
return scope;
|
|
5186
|
+
}, function (state, scope) {
|
|
5187
|
+
var filters = (state == null ? void 0 : state.workspaceListFilters) || [];
|
|
5188
|
+
// no filters for system presets for now
|
|
5189
|
+
if (scope === 'system') {
|
|
5190
|
+
return filters.reduce(function (list, filter) {
|
|
5191
|
+
if (filter.id === 'system') {
|
|
5192
|
+
return list.concat(Object.assign({}, filter, {
|
|
5193
|
+
isDisabled: true
|
|
5194
|
+
}));
|
|
5195
|
+
}
|
|
5196
|
+
return list;
|
|
5197
|
+
}, []);
|
|
5198
|
+
}
|
|
5199
|
+
return filters;
|
|
5200
|
+
}, selectorMemoizationOptions);
|
|
5201
|
+
var getWorkspaceListSearchQuery = createSelector(getWorkspaceListStore, function (store) {
|
|
5202
|
+
return store;
|
|
5203
|
+
}, function (state) {
|
|
5204
|
+
return (state == null ? void 0 : state.searchQuery) || '';
|
|
5205
|
+
}, selectorMemoizationOptions);
|
|
5107
5206
|
|
|
5108
5207
|
var processError = function processError(error, component, errorMessageKey) {
|
|
5109
5208
|
var message = isAxiosError(error) ? getAxiosErrorMessage(error) : errorMessageKey;
|
|
@@ -5407,137 +5506,6 @@ viewPresetsListener.startListening({
|
|
|
5407
5506
|
}()
|
|
5408
5507
|
});
|
|
5409
5508
|
|
|
5410
|
-
/* *
|
|
5411
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5412
|
-
* you may not use this file except in compliance with the License.
|
|
5413
|
-
* You may obtain a copy of the License at
|
|
5414
|
-
*
|
|
5415
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5416
|
-
*
|
|
5417
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
5418
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5419
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5420
|
-
* See the License for the specific language governing permissions and
|
|
5421
|
-
* limitations under the License.
|
|
5422
|
-
*
|
|
5423
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5424
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
5425
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5426
|
-
* */
|
|
5427
|
-
var WorkspaceListErrorCategory;
|
|
5428
|
-
(function (WorkspaceListErrorCategory) {
|
|
5429
|
-
WorkspaceListErrorCategory["AUTH"] = "AUTH";
|
|
5430
|
-
WorkspaceListErrorCategory["GENERIC"] = "GENERIC";
|
|
5431
|
-
})(WorkspaceListErrorCategory || (WorkspaceListErrorCategory = {}));
|
|
5432
|
-
var WorkspaceListErrorType;
|
|
5433
|
-
(function (WorkspaceListErrorType) {
|
|
5434
|
-
WorkspaceListErrorType["TRANSLATABLE_ERROR"] = "TRANSLATABLE_ERROR";
|
|
5435
|
-
WorkspaceListErrorType["VERBATIM_ERROR"] = "VERBATIM_ERROR";
|
|
5436
|
-
})(WorkspaceListErrorType || (WorkspaceListErrorType = {}));
|
|
5437
|
-
|
|
5438
|
-
/* *
|
|
5439
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5440
|
-
* you may not use this file except in compliance with the License.
|
|
5441
|
-
* You may obtain a copy of the License at
|
|
5442
|
-
*
|
|
5443
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5444
|
-
*
|
|
5445
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
5446
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5447
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5448
|
-
* See the License for the specific language governing permissions and
|
|
5449
|
-
* limitations under the License.
|
|
5450
|
-
*
|
|
5451
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5452
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
5453
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5454
|
-
* */
|
|
5455
|
-
var getWorkspaceListStore = function getWorkspaceListStore(store) {
|
|
5456
|
-
if (store && store.workspaceList) {
|
|
5457
|
-
return store.workspaceList;
|
|
5458
|
-
}
|
|
5459
|
-
return null;
|
|
5460
|
-
};
|
|
5461
|
-
var selectors = workspaceListAdapter.getSelectors(function (state) {
|
|
5462
|
-
var _state$workspaceList;
|
|
5463
|
-
return (_state$workspaceList = state == null ? void 0 : state.workspaceList) != null ? _state$workspaceList : {
|
|
5464
|
-
entities: {},
|
|
5465
|
-
ids: []
|
|
5466
|
-
};
|
|
5467
|
-
});
|
|
5468
|
-
var getWorkspaceList = selectors.selectAll;
|
|
5469
|
-
var getIsWorkspaceListFetching = createSelector(getWorkspaceListStore, function (store) {
|
|
5470
|
-
return store;
|
|
5471
|
-
}, function (state) {
|
|
5472
|
-
return (state == null ? void 0 : state.isFetching) || false;
|
|
5473
|
-
}, selectorMemoizationOptions);
|
|
5474
|
-
var getWorkspaceDialogIsSaved = createSelector(getWorkspaceListStore, function (store) {
|
|
5475
|
-
return store;
|
|
5476
|
-
}, function (state) {
|
|
5477
|
-
var _state$workspaceActio;
|
|
5478
|
-
return (state == null || (_state$workspaceActio = state.workspaceActionDialog) == null ? void 0 : _state$workspaceActio.hasSaved) || false;
|
|
5479
|
-
}, selectorMemoizationOptions);
|
|
5480
|
-
var getWorkspaceListError = createSelector(getWorkspaceListStore, function (store) {
|
|
5481
|
-
return store;
|
|
5482
|
-
}, function (state) {
|
|
5483
|
-
return (state == null ? void 0 : state.error) || undefined;
|
|
5484
|
-
}, selectorMemoizationOptions);
|
|
5485
|
-
var getWorkspaceActionDialogDetails = createSelector(getWorkspaceListStore, getWorkspaceState, getViewPresetsStore, function (workspaceListState, workspaceState, viewpresetState) {
|
|
5486
|
-
var dialog = (workspaceListState == null ? void 0 : workspaceListState.workspaceActionDialog) || false;
|
|
5487
|
-
if (dialog) {
|
|
5488
|
-
var _dialog$formValues$vi;
|
|
5489
|
-
var views = (_dialog$formValues$vi = dialog.formValues.views) == null ? void 0 : _dialog$formValues$vi.map(function (view) {
|
|
5490
|
-
var workspaceView = workspaceState.views.byId[view.mosaicNodeId];
|
|
5491
|
-
var viewComplete = viewpresetState.entities[view.mosaicNodeId];
|
|
5492
|
-
return {
|
|
5493
|
-
mosaicNodeId: view.mosaicNodeId,
|
|
5494
|
-
viewPresetId: (viewComplete == null ? void 0 : viewComplete.activeViewPresetId) || view.viewPresetId,
|
|
5495
|
-
isSelected: view.isSelected,
|
|
5496
|
-
title: view.title || workspaceView.title,
|
|
5497
|
-
error: viewComplete == null ? void 0 : viewComplete.error,
|
|
5498
|
-
isFetching: viewComplete == null ? void 0 : viewComplete.isFetching,
|
|
5499
|
-
hasChanges: viewComplete == null ? void 0 : viewComplete.hasChanges,
|
|
5500
|
-
scope: view.scope
|
|
5501
|
-
};
|
|
5502
|
-
});
|
|
5503
|
-
return Object.assign({}, dialog, {
|
|
5504
|
-
formValues: Object.assign({}, dialog.formValues, views && {
|
|
5505
|
-
views: views
|
|
5506
|
-
})
|
|
5507
|
-
});
|
|
5508
|
-
}
|
|
5509
|
-
return dialog;
|
|
5510
|
-
}, selectorMemoizationOptions);
|
|
5511
|
-
var getIsWorkspaceListDialogOpen = createSelector(getWorkspaceListStore, function (store) {
|
|
5512
|
-
return store;
|
|
5513
|
-
}, function (state) {
|
|
5514
|
-
return (state == null ? void 0 : state.isWorkspaceListDialogOpen) || false;
|
|
5515
|
-
}, selectorMemoizationOptions);
|
|
5516
|
-
var getWorkspaceListFilters = createSelector(function (store) {
|
|
5517
|
-
return getWorkspaceListStore(store);
|
|
5518
|
-
}, function (_store, scope) {
|
|
5519
|
-
return scope;
|
|
5520
|
-
}, function (state, scope) {
|
|
5521
|
-
var filters = (state == null ? void 0 : state.workspaceListFilters) || [];
|
|
5522
|
-
// no filters for system presets for now
|
|
5523
|
-
if (scope === 'system') {
|
|
5524
|
-
return filters.reduce(function (list, filter) {
|
|
5525
|
-
if (filter.id === 'system') {
|
|
5526
|
-
return list.concat(Object.assign({}, filter, {
|
|
5527
|
-
isDisabled: true
|
|
5528
|
-
}));
|
|
5529
|
-
}
|
|
5530
|
-
return list;
|
|
5531
|
-
}, []);
|
|
5532
|
-
}
|
|
5533
|
-
return filters;
|
|
5534
|
-
}, selectorMemoizationOptions);
|
|
5535
|
-
var getWorkspaceListSearchQuery = createSelector(getWorkspaceListStore, function (store) {
|
|
5536
|
-
return store;
|
|
5537
|
-
}, function (state) {
|
|
5538
|
-
return (state == null ? void 0 : state.searchQuery) || '';
|
|
5539
|
-
}, selectorMemoizationOptions);
|
|
5540
|
-
|
|
5541
5509
|
var emptyWorkspaceBEData = Object.assign({}, getEmptyMapWorkspace(), {
|
|
5542
5510
|
views: [{
|
|
5543
5511
|
mosaicNodeId: '1_screen',
|
|
@@ -5893,6 +5861,99 @@ workspaceListListener.startListening({
|
|
|
5893
5861
|
}()
|
|
5894
5862
|
});
|
|
5895
5863
|
|
|
5864
|
+
/* *
|
|
5865
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5866
|
+
* you may not use this file except in compliance with the License.
|
|
5867
|
+
* You may obtain a copy of the License at
|
|
5868
|
+
*
|
|
5869
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5870
|
+
*
|
|
5871
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5872
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5873
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5874
|
+
* See the License for the specific language governing permissions and
|
|
5875
|
+
* limitations under the License.
|
|
5876
|
+
*
|
|
5877
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5878
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
5879
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5880
|
+
* */
|
|
5881
|
+
var viewPresetsListAdapter = createEntityAdapter();
|
|
5882
|
+
var initialState = viewPresetsListAdapter.getInitialState();
|
|
5883
|
+
var slice = createSlice({
|
|
5884
|
+
initialState: initialState,
|
|
5885
|
+
name: 'viewPresetsList',
|
|
5886
|
+
reducers: {},
|
|
5887
|
+
extraReducers: function extraReducers(builder) {
|
|
5888
|
+
builder.addCase(viewPresetActions.fetchedInitialViewPresets, function (draft, action) {
|
|
5889
|
+
var viewPresets = action.payload.viewPresets;
|
|
5890
|
+
if (!viewPresets || !viewPresets.length) {
|
|
5891
|
+
viewPresetsListAdapter.removeAll(draft);
|
|
5892
|
+
return;
|
|
5893
|
+
}
|
|
5894
|
+
viewPresetsListAdapter.setAll(draft, action.payload.viewPresets);
|
|
5895
|
+
}).addCase(viewPresetActions.fetchedViewPresets, function (draft, action) {
|
|
5896
|
+
var _action$payload = action.payload,
|
|
5897
|
+
viewPresets = _action$payload.viewPresets,
|
|
5898
|
+
filterParams = _action$payload.filterParams;
|
|
5899
|
+
// If there are filter params applied, don't do anything, these results are put in the specific panel filterResults
|
|
5900
|
+
if (Object.keys(filterParams).length !== 0) {
|
|
5901
|
+
return;
|
|
5902
|
+
}
|
|
5903
|
+
if (!viewPresets || !viewPresets.length) {
|
|
5904
|
+
viewPresetsListAdapter.removeAll(draft);
|
|
5905
|
+
return;
|
|
5906
|
+
}
|
|
5907
|
+
viewPresetsListAdapter.setAll(draft, action.payload.viewPresets);
|
|
5908
|
+
});
|
|
5909
|
+
}
|
|
5910
|
+
});
|
|
5911
|
+
var reducer = slice.reducer;
|
|
5912
|
+
slice.actions;
|
|
5913
|
+
|
|
5914
|
+
/* *
|
|
5915
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5916
|
+
* you may not use this file except in compliance with the License.
|
|
5917
|
+
* You may obtain a copy of the License at
|
|
5918
|
+
*
|
|
5919
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5920
|
+
*
|
|
5921
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5922
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5923
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5924
|
+
* See the License for the specific language governing permissions and
|
|
5925
|
+
* limitations under the License.
|
|
5926
|
+
*
|
|
5927
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5928
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
5929
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5930
|
+
* */
|
|
5931
|
+
// Used to retrieve the unfiltered, general view preset list.
|
|
5932
|
+
// To ensure you retrieve the view preset list specific for your view, use getFilteredViewPresetListForView
|
|
5933
|
+
var _viewPresetsListAdapt = viewPresetsListAdapter.getSelectors(function (state) {
|
|
5934
|
+
var _state$viewPresetsLis;
|
|
5935
|
+
return (_state$viewPresetsLis = state == null ? void 0 : state.viewPresetsList) != null ? _state$viewPresetsLis : {
|
|
5936
|
+
entities: {},
|
|
5937
|
+
ids: []
|
|
5938
|
+
};
|
|
5939
|
+
}),
|
|
5940
|
+
getViewPresetsList = _viewPresetsListAdapt.selectAll;
|
|
5941
|
+
_viewPresetsListAdapt.selectById;
|
|
5942
|
+
var getFilteredViewPresetListForView = createSelector(getViewPresetsList, getViewPresetListFilterResultsForView, getViewPresetListFiltersForView, getViewPresetListSearchQueryForView, function (fullViewPresetsList, filteredResults, appliedFilters, searchQuery) {
|
|
5943
|
+
// If we have a filtered results list, use this, otherwise fall back to the general unfiltered view presets list
|
|
5944
|
+
// If all filters are set to true we are not filtering
|
|
5945
|
+
var filtersApplied = !appliedFilters.every(function (filter) {
|
|
5946
|
+
return filter.isSelected;
|
|
5947
|
+
});
|
|
5948
|
+
if (filtersApplied || searchQuery !== '') {
|
|
5949
|
+
return filteredResults;
|
|
5950
|
+
}
|
|
5951
|
+
return fullViewPresetsList != null ? fullViewPresetsList : {
|
|
5952
|
+
entities: {},
|
|
5953
|
+
ids: []
|
|
5954
|
+
};
|
|
5955
|
+
}, selectorMemoizationOptions);
|
|
5956
|
+
|
|
5896
5957
|
/* *
|
|
5897
5958
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5898
5959
|
* you may not use this file except in compliance with the License.
|
|
@@ -5950,10 +6011,10 @@ var initWorkspaceTestI18n = function initWorkspaceTestI18n() {
|
|
|
5950
6011
|
escapeValue: false
|
|
5951
6012
|
},
|
|
5952
6013
|
resources: {
|
|
5953
|
-
en: (_en = {}, _en[WORKSPACE_NAMESPACE] = workspaceTranslations.en, _en[SHARED_NAMESPACE] = sharedTranslations.en, _en[CORE_NAMESPACE] = coreTranslations.en, _en[WEBMAP_REACT_NAMESPACE] = webmapReactTranslations.en, _en[FORM_FIELDS_NAMESPACE] = formFieldsTranslations.en, _en),
|
|
5954
|
-
fi: (_fi = {}, _fi[WORKSPACE_NAMESPACE] = workspaceTranslations.fi, _fi[SHARED_NAMESPACE] = sharedTranslations.fi, _fi[CORE_NAMESPACE] = coreTranslations.fi, _fi[WEBMAP_REACT_NAMESPACE] = webmapReactTranslations.fi, _fi[FORM_FIELDS_NAMESPACE] = formFieldsTranslations.fi, _fi),
|
|
5955
|
-
no: (_no = {}, _no[WORKSPACE_NAMESPACE] = workspaceTranslations.no, _no[SHARED_NAMESPACE] = sharedTranslations.no, _no[CORE_NAMESPACE] = coreTranslations.no, _no[WEBMAP_REACT_NAMESPACE] = webmapReactTranslations.no, _no[FORM_FIELDS_NAMESPACE] = formFieldsTranslations.no, _no),
|
|
5956
|
-
nl: (_nl = {}, _nl[WORKSPACE_NAMESPACE] = workspaceTranslations.nl, _nl[SHARED_NAMESPACE] = sharedTranslations.nl, _nl[CORE_NAMESPACE] = coreTranslations.nl, _nl[WEBMAP_REACT_NAMESPACE] = webmapReactTranslations.nl, _nl[FORM_FIELDS_NAMESPACE] = formFieldsTranslations.nl, _nl)
|
|
6014
|
+
en: (_en = {}, _en[WORKSPACE_NAMESPACE] = workspaceTranslations.en, _en[SHARED_NAMESPACE] = sharedTranslations.en, _en[CORE_NAMESPACE] = coreTranslations.en, _en[WEBMAP_REACT_NAMESPACE] = webmapReactTranslations.en, _en[FORM_FIELDS_NAMESPACE] = formFieldsTranslations.en, _en[WARN_NAMESPACE] = warningsTranslations.en, _en),
|
|
6015
|
+
fi: (_fi = {}, _fi[WORKSPACE_NAMESPACE] = workspaceTranslations.fi, _fi[SHARED_NAMESPACE] = sharedTranslations.fi, _fi[CORE_NAMESPACE] = coreTranslations.fi, _fi[WEBMAP_REACT_NAMESPACE] = webmapReactTranslations.fi, _fi[FORM_FIELDS_NAMESPACE] = formFieldsTranslations.fi, _fi[WARN_NAMESPACE] = warningsTranslations.fi, _fi),
|
|
6016
|
+
no: (_no = {}, _no[WORKSPACE_NAMESPACE] = workspaceTranslations.no, _no[SHARED_NAMESPACE] = sharedTranslations.no, _no[CORE_NAMESPACE] = coreTranslations.no, _no[WEBMAP_REACT_NAMESPACE] = webmapReactTranslations.no, _no[FORM_FIELDS_NAMESPACE] = formFieldsTranslations.no, _no[WARN_NAMESPACE] = warningsTranslations.no, _no),
|
|
6017
|
+
nl: (_nl = {}, _nl[WORKSPACE_NAMESPACE] = workspaceTranslations.nl, _nl[SHARED_NAMESPACE] = sharedTranslations.nl, _nl[CORE_NAMESPACE] = coreTranslations.nl, _nl[WEBMAP_REACT_NAMESPACE] = webmapReactTranslations.nl, _nl[FORM_FIELDS_NAMESPACE] = formFieldsTranslations.nl, _nl[WARN_NAMESPACE] = warningsTranslations.nl, _nl)
|
|
5957
6018
|
}
|
|
5958
6019
|
});
|
|
5959
6020
|
};
|
|
@@ -6008,6 +6069,13 @@ var createTestWorkspaceStore = function createTestWorkspaceStore() {
|
|
|
6008
6069
|
return store;
|
|
6009
6070
|
};
|
|
6010
6071
|
|
|
6072
|
+
var queryClient = new QueryClient({
|
|
6073
|
+
defaultOptions: {
|
|
6074
|
+
queries: {
|
|
6075
|
+
retry: false
|
|
6076
|
+
}
|
|
6077
|
+
}
|
|
6078
|
+
});
|
|
6011
6079
|
var WorkspaceThemeProvider = function WorkspaceThemeProvider(_ref) {
|
|
6012
6080
|
var children = _ref.children,
|
|
6013
6081
|
_ref$theme = _ref.theme,
|
|
@@ -6050,16 +6118,19 @@ var WorkspaceWrapperProviderWithStore = function WorkspaceWrapperProviderWithSto
|
|
|
6050
6118
|
return jsx(WorkspaceI18nProvider, {
|
|
6051
6119
|
children: jsx(AuthenticationProvider, {
|
|
6052
6120
|
value: auth,
|
|
6053
|
-
children: jsx(
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
children: jsx(
|
|
6059
|
-
|
|
6060
|
-
children: jsx(
|
|
6061
|
-
|
|
6062
|
-
|
|
6121
|
+
children: jsx(QueryClientProvider, {
|
|
6122
|
+
client: queryClient,
|
|
6123
|
+
children: jsx(ApiProvider, {
|
|
6124
|
+
createApi: createApi$1,
|
|
6125
|
+
name: API_NAME,
|
|
6126
|
+
children: jsx(Provider, {
|
|
6127
|
+
store: store,
|
|
6128
|
+
children: jsx(WorkspaceThemeProvider, {
|
|
6129
|
+
theme: theme,
|
|
6130
|
+
children: jsx(SnackbarWrapperConnect, {
|
|
6131
|
+
children: jsx(ConfirmationServiceProvider, {
|
|
6132
|
+
children: children
|
|
6133
|
+
})
|
|
6063
6134
|
})
|
|
6064
6135
|
})
|
|
6065
6136
|
})
|
|
@@ -6471,49 +6542,6 @@ var closeTimeSeriesDialogsWhenChangingPreset = function closeTimeSeriesDialogsWh
|
|
|
6471
6542
|
}
|
|
6472
6543
|
};
|
|
6473
6544
|
|
|
6474
|
-
/* *
|
|
6475
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6476
|
-
* you may not use this file except in compliance with the License.
|
|
6477
|
-
* You may obtain a copy of the License at
|
|
6478
|
-
*
|
|
6479
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6480
|
-
*
|
|
6481
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
6482
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6483
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6484
|
-
* See the License for the specific language governing permissions and
|
|
6485
|
-
* limitations under the License.
|
|
6486
|
-
*
|
|
6487
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6488
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
6489
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6490
|
-
* */
|
|
6491
|
-
// Used to retrieve the unfiltered, general view preset list.
|
|
6492
|
-
// To ensure you retrieve the view preset list specific for your view, use getFilteredViewPresetListForView
|
|
6493
|
-
var _viewPresetsListAdapt = viewPresetsListAdapter.getSelectors(function (state) {
|
|
6494
|
-
var _state$viewPresetsLis;
|
|
6495
|
-
return (_state$viewPresetsLis = state == null ? void 0 : state.viewPresetsList) != null ? _state$viewPresetsLis : {
|
|
6496
|
-
entities: {},
|
|
6497
|
-
ids: []
|
|
6498
|
-
};
|
|
6499
|
-
}),
|
|
6500
|
-
getViewPresetsList = _viewPresetsListAdapt.selectAll;
|
|
6501
|
-
_viewPresetsListAdapt.selectById;
|
|
6502
|
-
var getFilteredViewPresetListForView = createSelector(getViewPresetsList, getViewPresetListFilterResultsForView, getViewPresetListFiltersForView, getViewPresetListSearchQueryForView, function (fullViewPresetsList, filteredResults, appliedFilters, searchQuery) {
|
|
6503
|
-
// If we have a filtered results list, use this, otherwise fall back to the general unfiltered view presets list
|
|
6504
|
-
// If all filters are set to true we are not filtering
|
|
6505
|
-
var filtersApplied = !appliedFilters.every(function (filter) {
|
|
6506
|
-
return filter.isSelected;
|
|
6507
|
-
});
|
|
6508
|
-
if (filtersApplied || searchQuery !== '') {
|
|
6509
|
-
return filteredResults;
|
|
6510
|
-
}
|
|
6511
|
-
return fullViewPresetsList != null ? fullViewPresetsList : {
|
|
6512
|
-
entities: {},
|
|
6513
|
-
ids: []
|
|
6514
|
-
};
|
|
6515
|
-
}, selectorMemoizationOptions);
|
|
6516
|
-
|
|
6517
6545
|
var WORKSPACE_SELECT_LIST_ROW_HEIGHT = 46;
|
|
6518
6546
|
var getPresetIcon = function getPresetIcon(preset) {
|
|
6519
6547
|
switch (preset.viewType) {
|
|
@@ -6744,6 +6772,9 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
|
|
|
6744
6772
|
var currentTimeSeriesPreset = useSelector(function (store) {
|
|
6745
6773
|
return timeSeriesSelectors.getTimeSeriesPreset(store);
|
|
6746
6774
|
});
|
|
6775
|
+
var currentWarningsPreset = useSelector(function (store) {
|
|
6776
|
+
return publicWarningsSelectors.getWarningsPresetById(store, panelId);
|
|
6777
|
+
});
|
|
6747
6778
|
var viewPresetListFilters = useSelector(function (store) {
|
|
6748
6779
|
return getViewPresetListFiltersForView(store, panelId, scope);
|
|
6749
6780
|
});
|
|
@@ -6791,6 +6822,8 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
|
|
|
6791
6822
|
}, [dispatch, panelId, viewPresetListFilters, viewPresetListSearchQuery]);
|
|
6792
6823
|
var constructInitialProps = function constructInitialProps() {
|
|
6793
6824
|
switch (viewComponentType) {
|
|
6825
|
+
case 'WarningList':
|
|
6826
|
+
return currentWarningsPreset;
|
|
6794
6827
|
case 'TimeSeries':
|
|
6795
6828
|
return currentTimeSeriesPreset;
|
|
6796
6829
|
case 'Map':
|
|
@@ -6991,17 +7024,17 @@ var ViewPresetMenu = function ViewPresetMenu(_ref) {
|
|
|
6991
7024
|
renderCounter.count(ViewPresetMenu.name);
|
|
6992
7025
|
return hideBackdrop ?
|
|
6993
7026
|
// Enable hiding backdrop from snapshot tests
|
|
6994
|
-
toolContainer :
|
|
7027
|
+
toolContainer : jsxs(Backdrop, {
|
|
6995
7028
|
"data-testid": "viewpresetMenuBackdrop",
|
|
6996
7029
|
open: true,
|
|
6997
|
-
sx: {
|
|
7030
|
+
sx: Object.assign({
|
|
6998
7031
|
'&.MuiBackdrop-root': {
|
|
6999
7032
|
position: 'absolute',
|
|
7000
7033
|
zIndex: 1002
|
|
7001
7034
|
}
|
|
7002
|
-
},
|
|
7035
|
+
}, BackdropStyle()),
|
|
7003
7036
|
onClick: closeMenu,
|
|
7004
|
-
children: toolContainer
|
|
7037
|
+
children: [BackdropElement(), toolContainer]
|
|
7005
7038
|
});
|
|
7006
7039
|
};
|
|
7007
7040
|
|
|
@@ -7241,8 +7274,13 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
|
|
|
7241
7274
|
viewPresetDialog: viewPresetDialogOptions
|
|
7242
7275
|
}));
|
|
7243
7276
|
}, [dispatch]);
|
|
7277
|
+
var currentWarningsPreset = useSelector(function (store) {
|
|
7278
|
+
return publicWarningsSelectors.getWarningsPresetById(store, panelId);
|
|
7279
|
+
});
|
|
7244
7280
|
var constructInitialProps = React.useCallback(function () {
|
|
7245
7281
|
switch (viewComponentType) {
|
|
7282
|
+
case 'WarningList':
|
|
7283
|
+
return currentWarningsPreset;
|
|
7246
7284
|
case 'TimeSeries':
|
|
7247
7285
|
return timeSeriesSelectors.getTimeSeriesPreset(store.getState());
|
|
7248
7286
|
case 'Map':
|
|
@@ -7253,7 +7291,7 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
|
|
|
7253
7291
|
default:
|
|
7254
7292
|
return undefined;
|
|
7255
7293
|
}
|
|
7256
|
-
}, [panelId, relatedSyncGroupIds, store, viewComponentType]);
|
|
7294
|
+
}, [currentWarningsPreset, panelId, relatedSyncGroupIds, store, viewComponentType]);
|
|
7257
7295
|
var onSave = React.useCallback(function () {
|
|
7258
7296
|
dispatch(viewPresetActions.saveViewPreset({
|
|
7259
7297
|
panelId: panelId,
|
|
@@ -7905,16 +7943,16 @@ var WorkspaceMenu = function WorkspaceMenu(_ref) {
|
|
|
7905
7943
|
});
|
|
7906
7944
|
return hideBackdrop ?
|
|
7907
7945
|
// Enable hiding backdrop from snapshot tests
|
|
7908
|
-
toolContainer :
|
|
7946
|
+
toolContainer : jsxs(Backdrop, {
|
|
7909
7947
|
"data-testid": "workspaceMenuBackdrop",
|
|
7910
7948
|
open: true,
|
|
7911
|
-
sx: {
|
|
7949
|
+
sx: Object.assign({
|
|
7912
7950
|
'&.MuiBackdrop-root': {
|
|
7913
7951
|
top: '40px'
|
|
7914
7952
|
}
|
|
7915
|
-
},
|
|
7953
|
+
}, BackdropStyle()),
|
|
7916
7954
|
onClick: closeMenu,
|
|
7917
|
-
children: toolContainer
|
|
7955
|
+
children: [BackdropElement(), toolContainer]
|
|
7918
7956
|
});
|
|
7919
7957
|
};
|
|
7920
7958
|
|
|
@@ -9077,4 +9115,4 @@ var WorkspaceDetail = function WorkspaceDetail(_ref) {
|
|
|
9077
9115
|
});
|
|
9078
9116
|
};
|
|
9079
9117
|
|
|
9080
|
-
export { ComponentsLookUpWrapper, DemoWrapper, PresetAction, ViewPresetErrorComponent, ViewPresetErrorType, WORKSPACE_NAMESPACE, WorkspaceDetail, WorkspaceErrorType, WorkspaceI18nProvider, WorkspaceModuleProvider, WorkspacePresetAction, WorkspaceTopBar, WorkspaceViewConnect, WorkspaceWrapperProviderWithStore, workspaceActions as actions, createBalancedMosaicNode, createCustomEmptyMapWorkspace, defaultAuthConfig, getEmptyMapWorkspace, getWorkspaceRouteUrl, selectors$1 as selectors, viewPresetActions, workspaceListActions, workspaceListener, workspaceModuleConfig, reducer$1 as workspaceReducer, routes as workspaceRoutes, workspaceTranslations };
|
|
9118
|
+
export { ComponentsLookUpWrapper, DemoWrapper, PresetAction, ViewPresetErrorComponent, ViewPresetErrorType, WORKSPACE_NAMESPACE, WorkspaceDetail, WorkspaceErrorType, WorkspaceI18nProvider, WorkspaceModuleProvider, WorkspacePresetAction, WorkspaceTopBar, WorkspaceViewConnect, WorkspaceWrapperProviderWithStore, workspaceActions as actions, createBalancedMosaicNode, createCustomEmptyMapWorkspace, defaultAuthConfig, getEmptyMapWorkspace, getWorkspaceRouteUrl, selectors$1 as selectors, viewPresetActions, reducer as viewPresetsListReducer, viewPresetsListener, reducer$2 as viewPresetsReducer, workspaceListActions, workspaceListListener, reducer$3 as workspaceListReducer, workspaceListener, workspaceModuleConfig, reducer$1 as workspaceReducer, routes as workspaceRoutes, workspaceTranslations };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/workspace",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "GeoWeb Workspace library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"i18next": "^23.11.5",
|
|
34
34
|
"react-i18next": "^15.1.1",
|
|
35
35
|
"@mui/material": "^6.1.1",
|
|
36
|
-
"@opengeoweb/webmap-react": "*"
|
|
36
|
+
"@opengeoweb/webmap-react": "*",
|
|
37
|
+
"@tanstack/react-query": "^5.62.7"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
40
|
"react": "18",
|
package/src/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import workspaceTranslations from '../locales/workspace.json';
|
|
2
2
|
import { workspaceListener } from './lib/store/workspace/listener';
|
|
3
3
|
export { workspaceListener };
|
|
4
|
+
export { workspaceListListener } from './lib/store/workspaceList/listener';
|
|
5
|
+
export { viewPresetsListener } from './lib/store/viewPresets/listener';
|
|
4
6
|
export { workspaceActions as actions, reducer as workspaceReducer, } from './lib/store/workspace/reducer';
|
|
5
|
-
export { workspaceListActions } from './lib/store/workspaceList/reducer';
|
|
6
|
-
export { viewPresetActions } from './lib/store/viewPresets';
|
|
7
|
+
export { workspaceListActions, reducer as workspaceListReducer, } from './lib/store/workspaceList/reducer';
|
|
8
|
+
export { viewPresetActions, reducer as viewPresetsReducer, } from './lib/store/viewPresets';
|
|
9
|
+
export { reducer as viewPresetsListReducer } from './lib/store/viewPresetsList';
|
|
7
10
|
export * as selectors from './lib/store/workspace/selectors';
|
|
8
11
|
export { default as workspaceModuleConfig } from './lib/store/config';
|
|
9
12
|
export * from './lib/store/workspace/types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { viewPresetActions } from './reducer';
|
|
1
|
+
export { viewPresetActions, reducer } from './reducer';
|
|
2
2
|
export * as viewPresetSelectors from './selectors';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { InitialProps, SupportedComponentTypes } from '@opengeoweb/core';
|
|
2
2
|
import { SupportedComponentTypes as SupportedTimeSeriesComponentTypes } from '@opengeoweb/timeseries';
|
|
3
3
|
import { EntityState } from '@reduxjs/toolkit';
|
|
4
|
+
import { WarningListComponentType } from '@opengeoweb/warnings';
|
|
4
5
|
import { FetchViewPresetsListParams, PresetScope, ViewPresetListItem } from '../viewPresetsList/types';
|
|
5
6
|
import { WorkspaceViewPresetComponentsLookupType } from '../workspace/types';
|
|
6
|
-
export type WorkspaceSupportedComponentTypes = SupportedComponentTypes | SupportedTimeSeriesComponentTypes | WorkspaceViewPresetComponentsLookupType;
|
|
7
|
+
export type WorkspaceSupportedComponentTypes = SupportedComponentTypes | SupportedTimeSeriesComponentTypes | WarningListComponentType | WorkspaceViewPresetComponentsLookupType;
|
|
7
8
|
export interface ViewPreset {
|
|
8
9
|
id?: string;
|
|
9
10
|
title: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { viewPresetsListActions } from './reducer';
|
|
1
|
+
export { viewPresetsListActions, reducer } from './reducer';
|
|
2
2
|
export * as viewPresetsListSelectors from './selectors';
|