@opengeoweb/workspace 9.6.0 → 9.8.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
CHANGED
|
@@ -12,6 +12,9 @@ import { ThemeWrapper, lightTheme, SplitVertical, SplitHorizontal, Expand, UnExp
|
|
|
12
12
|
import { Provider, useDispatch, useSelector } from 'react-redux';
|
|
13
13
|
import { timeSeriesModuleConfig } from '@opengeoweb/timeseries';
|
|
14
14
|
import { AuthenticationProvider, useAuthenticationContext } from '@opengeoweb/authentication';
|
|
15
|
+
import { createStore } from '@redux-eggs/redux-toolkit';
|
|
16
|
+
import { getSagaExtension } from '@redux-eggs/saga-extension';
|
|
17
|
+
import { produce } from 'immer';
|
|
15
18
|
import { LinearProgress, Typography, ListItem, ListItemButton, ListItemIcon, ListItemText, Grid, useTheme, Chip, Stack, debounce as debounce$1, TextField, InputAdornment, Box, Backdrop, Menu, ListSubheader, MenuItem, Tabs } from '@mui/material';
|
|
16
19
|
import 'react-mosaic-component/react-mosaic-component.css';
|
|
17
20
|
import { FixedSizeList } from 'react-window';
|
|
@@ -792,6 +795,21 @@ var getErrorMessage = function getErrorMessage(error) {
|
|
|
792
795
|
return suffix ? "".concat(prefix, ": ").concat(suffix) : prefix;
|
|
793
796
|
};
|
|
794
797
|
|
|
798
|
+
var ViewPresetType;
|
|
799
|
+
(function (ViewPresetType) {
|
|
800
|
+
ViewPresetType["PRESET_DETAIL"] = "PRESET_DETAIL";
|
|
801
|
+
ViewPresetType["PRESET_LIST"] = "PRESET_LIST";
|
|
802
|
+
})(ViewPresetType || (ViewPresetType = {}));
|
|
803
|
+
var PresetAction;
|
|
804
|
+
(function (PresetAction) {
|
|
805
|
+
PresetAction["OPEN"] = "Open";
|
|
806
|
+
PresetAction["DELETE"] = "Delete";
|
|
807
|
+
PresetAction["SAVE"] = "Save";
|
|
808
|
+
PresetAction["SAVE_AS"] = "Save as";
|
|
809
|
+
PresetAction["SHARE"] = "Share";
|
|
810
|
+
PresetAction["EDIT"] = "Edit";
|
|
811
|
+
})(PresetAction || (PresetAction = {}));
|
|
812
|
+
|
|
795
813
|
var viewPresetsListFilterOptions = [{
|
|
796
814
|
label: 'My presets',
|
|
797
815
|
id: 'user',
|
|
@@ -1077,11 +1095,25 @@ var slice$2 = createSlice({
|
|
|
1077
1095
|
}
|
|
1078
1096
|
},
|
|
1079
1097
|
extraReducers: function extraReducers(builder) {
|
|
1098
|
+
builder.addCase(mapActions.setMapPresetError, function (draft, action) {
|
|
1099
|
+
var _action$payload11 = action.payload,
|
|
1100
|
+
mapId = _action$payload11.mapId,
|
|
1101
|
+
error = _action$payload11.error;
|
|
1102
|
+
var entity = draft.entities[mapId];
|
|
1103
|
+
if (entity) {
|
|
1104
|
+
entity.error = {
|
|
1105
|
+
message: error,
|
|
1106
|
+
type: ViewPresetType.PRESET_DETAIL
|
|
1107
|
+
};
|
|
1108
|
+
entity.isFetching = false;
|
|
1109
|
+
viewPresetsAdapter.setOne(draft, entity);
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1080
1112
|
syncGroupChangeActions.map(function (syncGroupAction) {
|
|
1081
1113
|
return builder.addCase(syncGroupAction, function (draft, action) {
|
|
1082
|
-
var _action$
|
|
1083
|
-
origin = _action$
|
|
1084
|
-
targetId = _action$
|
|
1114
|
+
var _action$payload12 = action.payload,
|
|
1115
|
+
origin = _action$payload12.origin,
|
|
1116
|
+
targetId = _action$payload12.targetId;
|
|
1085
1117
|
if (origin === 'user') {
|
|
1086
1118
|
var entity = draft.entities[targetId];
|
|
1087
1119
|
if (entity) {
|
|
@@ -1093,9 +1125,9 @@ var slice$2 = createSlice({
|
|
|
1093
1125
|
});
|
|
1094
1126
|
mapPresetChangeActions.map(function (mapPresetAction) {
|
|
1095
1127
|
return builder.addCase(mapPresetAction, function (draft, action) {
|
|
1096
|
-
var _action$
|
|
1097
|
-
mapId = _action$
|
|
1098
|
-
origin = _action$
|
|
1128
|
+
var _action$payload13 = action.payload,
|
|
1129
|
+
mapId = _action$payload13.mapId,
|
|
1130
|
+
origin = _action$payload13.origin;
|
|
1099
1131
|
var isChangeOriginSupported = supportedChangeOrigins.indexOf(origin) >= 0;
|
|
1100
1132
|
if (isChangeOriginSupported && mapId) {
|
|
1101
1133
|
var entity = draft.entities[mapId];
|
|
@@ -1111,21 +1143,6 @@ var slice$2 = createSlice({
|
|
|
1111
1143
|
var reducer$2 = slice$2.reducer;
|
|
1112
1144
|
var viewPresetActions = slice$2.actions;
|
|
1113
1145
|
|
|
1114
|
-
var ViewPresetType;
|
|
1115
|
-
(function (ViewPresetType) {
|
|
1116
|
-
ViewPresetType["PRESET_DETAIL"] = "PRESET_DETAIL";
|
|
1117
|
-
ViewPresetType["PRESET_LIST"] = "PRESET_LIST";
|
|
1118
|
-
})(ViewPresetType || (ViewPresetType = {}));
|
|
1119
|
-
var PresetAction;
|
|
1120
|
-
(function (PresetAction) {
|
|
1121
|
-
PresetAction["OPEN"] = "Open";
|
|
1122
|
-
PresetAction["DELETE"] = "Delete";
|
|
1123
|
-
PresetAction["SAVE"] = "Save";
|
|
1124
|
-
PresetAction["SAVE_AS"] = "Save as";
|
|
1125
|
-
PresetAction["SHARE"] = "Share";
|
|
1126
|
-
PresetAction["EDIT"] = "Edit";
|
|
1127
|
-
})(PresetAction || (PresetAction = {}));
|
|
1128
|
-
|
|
1129
1146
|
/* *
|
|
1130
1147
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1131
1148
|
* you may not use this file except in compliance with the License.
|
|
@@ -5103,6 +5120,36 @@ var workspaceModuleConfig = {
|
|
|
5103
5120
|
sagas: [workspaceSaga, rootSaga$1, rootSaga]
|
|
5104
5121
|
};
|
|
5105
5122
|
|
|
5123
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
5124
|
+
var devToolsStateSanitizer = {
|
|
5125
|
+
stateSanitizer: function stateSanitizer(state) {
|
|
5126
|
+
return produce(state, function (draftState) {
|
|
5127
|
+
// @ts-ignore
|
|
5128
|
+
if (state['services']) {
|
|
5129
|
+
// @ts-ignore
|
|
5130
|
+
Object.values(state['services'].byId).forEach(function (service) {
|
|
5131
|
+
// @ts-ignore
|
|
5132
|
+
draftState['services'].byId[service.id].layers =
|
|
5133
|
+
// @ts-ignore
|
|
5134
|
+
service.layers.length;
|
|
5135
|
+
});
|
|
5136
|
+
}
|
|
5137
|
+
});
|
|
5138
|
+
}
|
|
5139
|
+
};
|
|
5140
|
+
var store = createStore({
|
|
5141
|
+
extensions: [getSagaExtension({})],
|
|
5142
|
+
defaultMiddlewareOptions: {
|
|
5143
|
+
serializableCheck: {
|
|
5144
|
+
warnAfter: 128
|
|
5145
|
+
},
|
|
5146
|
+
immutableCheck: {
|
|
5147
|
+
warnAfter: 128
|
|
5148
|
+
}
|
|
5149
|
+
},
|
|
5150
|
+
devTools: devToolsStateSanitizer
|
|
5151
|
+
});
|
|
5152
|
+
|
|
5106
5153
|
var WorkspaceThemeProvider = function WorkspaceThemeProvider(_ref) {
|
|
5107
5154
|
var children = _ref.children,
|
|
5108
5155
|
_ref$theme = _ref.theme,
|
|
@@ -5135,7 +5182,8 @@ var defaultAuthConfig = {
|
|
|
5135
5182
|
};
|
|
5136
5183
|
var WorkspaceWrapperProviderWithStore = function WorkspaceWrapperProviderWithStore(_ref3) {
|
|
5137
5184
|
var children = _ref3.children,
|
|
5138
|
-
store = _ref3.store,
|
|
5185
|
+
_ref3$store = _ref3.store,
|
|
5186
|
+
store$1 = _ref3$store === void 0 ? store : _ref3$store,
|
|
5139
5187
|
_ref3$createApi = _ref3.createApi,
|
|
5140
5188
|
createApi$1 = _ref3$createApi === void 0 ? createApi : _ref3$createApi,
|
|
5141
5189
|
theme = _ref3.theme,
|
|
@@ -5147,7 +5195,7 @@ var WorkspaceWrapperProviderWithStore = function WorkspaceWrapperProviderWithSto
|
|
|
5147
5195
|
createApi: createApi$1,
|
|
5148
5196
|
name: API_NAME
|
|
5149
5197
|
}, /*#__PURE__*/React__default.createElement(Provider, {
|
|
5150
|
-
store: store
|
|
5198
|
+
store: store$1
|
|
5151
5199
|
}, /*#__PURE__*/React__default.createElement(WorkspaceWrapperProvider, {
|
|
5152
5200
|
theme: theme
|
|
5153
5201
|
}, /*#__PURE__*/React__default.createElement(SnackbarWrapperConnect, null, /*#__PURE__*/React__default.createElement(ConfirmationServiceProvider, null, children))))));
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { ThemeProviderProps } from '@opengeoweb/theme';
|
|
|
3
3
|
import { Store } from '@reduxjs/toolkit';
|
|
4
4
|
import { AuthenticationDefaultStateProps } from '@opengeoweb/authentication';
|
|
5
5
|
interface WorkspaceWrapperProviderWithStoreProps extends ThemeProviderProps {
|
|
6
|
-
store
|
|
6
|
+
store?: Store;
|
|
7
7
|
createApi?: () => void;
|
|
8
8
|
auth?: AuthenticationDefaultStateProps;
|
|
9
9
|
}
|