@opengeoweb/workspace 9.7.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
@@ -795,6 +795,21 @@ var getErrorMessage = function getErrorMessage(error) {
795
795
  return suffix ? "".concat(prefix, ": ").concat(suffix) : prefix;
796
796
  };
797
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
+
798
813
  var viewPresetsListFilterOptions = [{
799
814
  label: 'My presets',
800
815
  id: 'user',
@@ -1080,11 +1095,25 @@ var slice$2 = createSlice({
1080
1095
  }
1081
1096
  },
1082
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
+ });
1083
1112
  syncGroupChangeActions.map(function (syncGroupAction) {
1084
1113
  return builder.addCase(syncGroupAction, function (draft, action) {
1085
- var _action$payload11 = action.payload,
1086
- origin = _action$payload11.origin,
1087
- targetId = _action$payload11.targetId;
1114
+ var _action$payload12 = action.payload,
1115
+ origin = _action$payload12.origin,
1116
+ targetId = _action$payload12.targetId;
1088
1117
  if (origin === 'user') {
1089
1118
  var entity = draft.entities[targetId];
1090
1119
  if (entity) {
@@ -1096,9 +1125,9 @@ var slice$2 = createSlice({
1096
1125
  });
1097
1126
  mapPresetChangeActions.map(function (mapPresetAction) {
1098
1127
  return builder.addCase(mapPresetAction, function (draft, action) {
1099
- var _action$payload12 = action.payload,
1100
- mapId = _action$payload12.mapId,
1101
- origin = _action$payload12.origin;
1128
+ var _action$payload13 = action.payload,
1129
+ mapId = _action$payload13.mapId,
1130
+ origin = _action$payload13.origin;
1102
1131
  var isChangeOriginSupported = supportedChangeOrigins.indexOf(origin) >= 0;
1103
1132
  if (isChangeOriginSupported && mapId) {
1104
1133
  var entity = draft.entities[mapId];
@@ -1114,21 +1143,6 @@ var slice$2 = createSlice({
1114
1143
  var reducer$2 = slice$2.reducer;
1115
1144
  var viewPresetActions = slice$2.actions;
1116
1145
 
1117
- var ViewPresetType;
1118
- (function (ViewPresetType) {
1119
- ViewPresetType["PRESET_DETAIL"] = "PRESET_DETAIL";
1120
- ViewPresetType["PRESET_LIST"] = "PRESET_LIST";
1121
- })(ViewPresetType || (ViewPresetType = {}));
1122
- var PresetAction;
1123
- (function (PresetAction) {
1124
- PresetAction["OPEN"] = "Open";
1125
- PresetAction["DELETE"] = "Delete";
1126
- PresetAction["SAVE"] = "Save";
1127
- PresetAction["SAVE_AS"] = "Save as";
1128
- PresetAction["SHARE"] = "Share";
1129
- PresetAction["EDIT"] = "Edit";
1130
- })(PresetAction || (PresetAction = {}));
1131
-
1132
1146
  /* *
1133
1147
  * Licensed under the Apache License, Version 2.0 (the "License");
1134
1148
  * you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/workspace",
3
- "version": "9.7.0",
3
+ "version": "9.8.0",
4
4
  "description": "GeoWeb Workspace library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -19,3 +19,4 @@ export declare const SaveViewPresetError: {
19
19
  (): React.ReactElement;
20
20
  storyName: string;
21
21
  };
22
+ export declare const MissingProjectionError: () => React.ReactElement;