@opengeoweb/workspace 6.0.4 → 6.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 +410 -312
- package/package.json +12 -11
- package/src/lib/components/MapPresetsFormDialog/MapPresetsFormDialog.stories.d.ts +8 -0
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.d.ts +1 -0
- package/src/lib/components/WorkspaceTab/WorkspaceTabConnect.integration.spec.d.ts +1 -0
- package/src/lib/store/viewPresets/types.d.ts +1 -1
- package/src/lib/store/viewPresets/utils.d.ts +1 -0
- package/src/lib/store/workspace/selectors.d.ts +3 -15
- package/src/lib/store/workspaceList/types.d.ts +2 -1
package/index.esm.js
CHANGED
|
@@ -19945,9 +19945,204 @@ var PresetAction;
|
|
|
19945
19945
|
PresetAction["SAVE"] = "Save";
|
|
19946
19946
|
PresetAction["SAVE_AS"] = "Save as";
|
|
19947
19947
|
PresetAction["SHARE"] = "Share";
|
|
19948
|
-
PresetAction["
|
|
19948
|
+
PresetAction["EDIT"] = "Edit";
|
|
19949
19949
|
})(PresetAction || (PresetAction = {}));
|
|
19950
19950
|
|
|
19951
|
+
/* *
|
|
19952
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
19953
|
+
* you may not use this file except in compliance with the License.
|
|
19954
|
+
* You may obtain a copy of the License at
|
|
19955
|
+
*
|
|
19956
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
19957
|
+
*
|
|
19958
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19959
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19960
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19961
|
+
* See the License for the specific language governing permissions and
|
|
19962
|
+
* limitations under the License.
|
|
19963
|
+
*
|
|
19964
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
19965
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
19966
|
+
* */
|
|
19967
|
+
var getCleanSearchQuery = function getCleanSearchQuery(searchQuery) {
|
|
19968
|
+
return searchQuery.trim().split(/\s+/).join();
|
|
19969
|
+
};
|
|
19970
|
+
|
|
19971
|
+
/* *
|
|
19972
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
19973
|
+
* you may not use this file except in compliance with the License.
|
|
19974
|
+
* You may obtain a copy of the License at
|
|
19975
|
+
*
|
|
19976
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
19977
|
+
*
|
|
19978
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19979
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19980
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19981
|
+
* See the License for the specific language governing permissions and
|
|
19982
|
+
* limitations under the License.
|
|
19983
|
+
*
|
|
19984
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
19985
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
19986
|
+
* */
|
|
19987
|
+
var MAPPRESET_ACTIVE_TITLE = 'New map preset';
|
|
19988
|
+
var MAPPRESET_DIALOG_TITLE_SAVE_AS = 'Save map preset as';
|
|
19989
|
+
var MAPPRESET_DIALOG_TITLE_DELETE = 'Delete map preset';
|
|
19990
|
+
var MAPPRESET_DIALOG_TITLE_EDIT = 'Edit map preset';
|
|
19991
|
+
var getSnackbarMessage$1 = function getSnackbarMessage(action, title) {
|
|
19992
|
+
// Trim and add quotes
|
|
19993
|
+
var trimmedTitle = "\"".concat(title.trim(), "\"");
|
|
19994
|
+
switch (action) {
|
|
19995
|
+
case PresetAction.DELETE:
|
|
19996
|
+
return "Map preset ".concat(trimmedTitle, " successfully deleted");
|
|
19997
|
+
case PresetAction.SAVE_AS:
|
|
19998
|
+
return "New map preset ".concat(trimmedTitle, " successfully saved");
|
|
19999
|
+
case PresetAction.EDIT:
|
|
20000
|
+
return "Map preset ".concat(trimmedTitle, " successfully edited");
|
|
20001
|
+
default:
|
|
20002
|
+
return "Map preset ".concat(trimmedTitle, " successfully saved");
|
|
20003
|
+
}
|
|
20004
|
+
};
|
|
20005
|
+
var getPresetsApi = function getPresetsApi() {
|
|
20006
|
+
return getApi(API_NAME);
|
|
20007
|
+
};
|
|
20008
|
+
var emptyMapViewPreset = {
|
|
20009
|
+
componentType: 'Map',
|
|
20010
|
+
keywords: '',
|
|
20011
|
+
scope: 'user',
|
|
20012
|
+
title: '',
|
|
20013
|
+
initialProps: {
|
|
20014
|
+
mapPreset: {}
|
|
20015
|
+
}
|
|
20016
|
+
};
|
|
20017
|
+
// Returns object of applied user filters such as scope/search etc
|
|
20018
|
+
// If all filter chips are selected, an empty string is returned for that filter which is interpreted in the BE as "return all" _
|
|
20019
|
+
var constructFilterParams$1 = function constructFilterParams(filters, searchQuery) {
|
|
20020
|
+
// get filters
|
|
20021
|
+
var isAllSelectedForFilters = filters.every(function (filter) {
|
|
20022
|
+
return filter.isSelected;
|
|
20023
|
+
});
|
|
20024
|
+
// If all filters are selected, ensure we return nothing for scope
|
|
20025
|
+
var _ref = isAllSelectedForFilters ? {
|
|
20026
|
+
scope: []
|
|
20027
|
+
} : filters.reduce(function (filterList, filter) {
|
|
20028
|
+
if (filter.isSelected && filter.type === 'scope') {
|
|
20029
|
+
return Object.assign(Object.assign({}, filter), {
|
|
20030
|
+
scope: filterList.scope.concat(filter.id)
|
|
20031
|
+
});
|
|
20032
|
+
}
|
|
20033
|
+
return filterList;
|
|
20034
|
+
}, {
|
|
20035
|
+
scope: []
|
|
20036
|
+
}),
|
|
20037
|
+
scope = _ref.scope;
|
|
20038
|
+
// get search
|
|
20039
|
+
var search = getCleanSearchQuery(searchQuery);
|
|
20040
|
+
return Object.assign(Object.assign({}, scope.length && {
|
|
20041
|
+
scope: scope.toString()
|
|
20042
|
+
}), search.length && {
|
|
20043
|
+
search: search
|
|
20044
|
+
});
|
|
20045
|
+
};
|
|
20046
|
+
|
|
20047
|
+
/* *
|
|
20048
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
20049
|
+
* you may not use this file except in compliance with the License.
|
|
20050
|
+
* You may obtain a copy of the License at
|
|
20051
|
+
*
|
|
20052
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
20053
|
+
*
|
|
20054
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
20055
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20056
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20057
|
+
* See the License for the specific language governing permissions and
|
|
20058
|
+
* limitations under the License.
|
|
20059
|
+
*
|
|
20060
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
20061
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
20062
|
+
* */
|
|
20063
|
+
var getSnackbarMessage = function getSnackbarMessage(action, title) {
|
|
20064
|
+
// Trim and add quotes
|
|
20065
|
+
var trimmedTitle = "\"".concat(title.trim(), "\"");
|
|
20066
|
+
switch (action) {
|
|
20067
|
+
case WorkspacePresetAction.SAVE_ALL:
|
|
20068
|
+
return "Workspace ".concat(trimmedTitle, " and underlying viewpresets successfully saved");
|
|
20069
|
+
case WorkspacePresetAction.DELETE:
|
|
20070
|
+
return "Workspace ".concat(trimmedTitle, " successfully deleted");
|
|
20071
|
+
case WorkspacePresetAction.DUPLICATE:
|
|
20072
|
+
return "Workspace ".concat(trimmedTitle, " successfully saved");
|
|
20073
|
+
case WorkspacePresetAction.EDIT:
|
|
20074
|
+
return "Workspace ".concat(trimmedTitle, " successfully edited");
|
|
20075
|
+
default:
|
|
20076
|
+
return "Workspace ".concat(trimmedTitle, " successfully saved");
|
|
20077
|
+
}
|
|
20078
|
+
};
|
|
20079
|
+
var emptyMapWorkspace = {
|
|
20080
|
+
title: 'New workspace',
|
|
20081
|
+
scope: 'system',
|
|
20082
|
+
"abstract": '',
|
|
20083
|
+
views: {
|
|
20084
|
+
allIds: ['1_screen'],
|
|
20085
|
+
byId: {
|
|
20086
|
+
'1_screen': {
|
|
20087
|
+
title: MAPPRESET_ACTIVE_TITLE,
|
|
20088
|
+
componentType: 'Map',
|
|
20089
|
+
initialProps: {
|
|
20090
|
+
mapPreset: {
|
|
20091
|
+
layers: [],
|
|
20092
|
+
proj: {
|
|
20093
|
+
bbox: {
|
|
20094
|
+
left: 58703.6377,
|
|
20095
|
+
bottom: 6408480.4514,
|
|
20096
|
+
right: 3967387.5161,
|
|
20097
|
+
top: 11520588.9031
|
|
20098
|
+
},
|
|
20099
|
+
srs: 'EPSG:3857'
|
|
20100
|
+
},
|
|
20101
|
+
shouldShowLayerManager: true,
|
|
20102
|
+
dockedLayerManagerSize: 'sizeSmall'
|
|
20103
|
+
},
|
|
20104
|
+
syncGroupsIds: []
|
|
20105
|
+
}
|
|
20106
|
+
}
|
|
20107
|
+
}
|
|
20108
|
+
},
|
|
20109
|
+
mosaicNode: '1_screen',
|
|
20110
|
+
viewType: 'singleWindow'
|
|
20111
|
+
};
|
|
20112
|
+
var constructFilterParams = function constructFilterParams(filters, searchQuery) {
|
|
20113
|
+
// get filters
|
|
20114
|
+
var _filters$reduce = filters.reduce(function (filterList, filter) {
|
|
20115
|
+
if (filter.isSelected && filter.type === 'scope') {
|
|
20116
|
+
return Object.assign(Object.assign({}, filter), {
|
|
20117
|
+
scope: filterList.scope.concat(filter.id)
|
|
20118
|
+
});
|
|
20119
|
+
}
|
|
20120
|
+
return filterList;
|
|
20121
|
+
}, {
|
|
20122
|
+
scope: []
|
|
20123
|
+
}),
|
|
20124
|
+
scope = _filters$reduce.scope;
|
|
20125
|
+
// get search
|
|
20126
|
+
var search = getCleanSearchQuery(searchQuery);
|
|
20127
|
+
return Object.assign(Object.assign({}, scope.length && {
|
|
20128
|
+
scope: scope.toString()
|
|
20129
|
+
}), search.length && {
|
|
20130
|
+
search: search
|
|
20131
|
+
});
|
|
20132
|
+
};
|
|
20133
|
+
// TODO: better to use a lib for this. Currently this is only used in workspace 'save all', and will probably be replaced by a backend solution
|
|
20134
|
+
// https://stackoverflow.com/questions/6248666/how-to-generate-short-uid-like-ax4j9z-in-js
|
|
20135
|
+
var generateUID = function generateUID() {
|
|
20136
|
+
var firstPart = Math.random() * 46656 || 0;
|
|
20137
|
+
var secondPart = Math.random() * 46656 || 0;
|
|
20138
|
+
var firstPartCombined = "000".concat(firstPart.toString(36)).slice(-3);
|
|
20139
|
+
var secondPartCombined = "000".concat(secondPart.toString(36)).slice(-3);
|
|
20140
|
+
return firstPartCombined + secondPartCombined;
|
|
20141
|
+
};
|
|
20142
|
+
var getGeneratedViewPresetTitle = function getGeneratedViewPresetTitle(workspaceTitle, uid) {
|
|
20143
|
+
return "".concat(workspaceTitle, " - viewpreset ").concat(uid);
|
|
20144
|
+
};
|
|
20145
|
+
|
|
19951
20146
|
/* *
|
|
19952
20147
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
19953
20148
|
* you may not use this file except in compliance with the License.
|
|
@@ -20133,6 +20328,19 @@ var slice$2 = createSlice({
|
|
|
20133
20328
|
if (action.payload.action === WorkspacePresetAction.SAVE) {
|
|
20134
20329
|
draft.hasChanges = false;
|
|
20135
20330
|
}
|
|
20331
|
+
if (action.payload.action === WorkspacePresetAction.EDIT) {
|
|
20332
|
+
draft.title = action.payload.title;
|
|
20333
|
+
draft["abstract"] = action.payload["abstract"];
|
|
20334
|
+
}
|
|
20335
|
+
// If current selected workspace is deleted
|
|
20336
|
+
// Remove the id, rename to empty workspace and set it has changes
|
|
20337
|
+
if (action.payload.action === WorkspacePresetAction.DELETE && action.payload.workspaceId === draft.id) {
|
|
20338
|
+
delete draft.id;
|
|
20339
|
+
draft.title = emptyMapWorkspace.title;
|
|
20340
|
+
draft["abstract"] = emptyMapWorkspace["abstract"];
|
|
20341
|
+
draft.scope = emptyMapWorkspace.scope;
|
|
20342
|
+
draft.hasChanges = true;
|
|
20343
|
+
}
|
|
20136
20344
|
}).addCase(viewPresetActions.fetchedViewPreset, function (draft, action) {
|
|
20137
20345
|
var _action$payload3 = action.payload,
|
|
20138
20346
|
panelId = _action$payload3.panelId,
|
|
@@ -20258,99 +20466,6 @@ var getViewPresetListFilterResultsForView = createSelector(getViewPresetById, fu
|
|
|
20258
20466
|
return Object.values(filteredResults.entities);
|
|
20259
20467
|
});
|
|
20260
20468
|
|
|
20261
|
-
/* *
|
|
20262
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
20263
|
-
* you may not use this file except in compliance with the License.
|
|
20264
|
-
* You may obtain a copy of the License at
|
|
20265
|
-
*
|
|
20266
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
20267
|
-
*
|
|
20268
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
20269
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20270
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20271
|
-
* See the License for the specific language governing permissions and
|
|
20272
|
-
* limitations under the License.
|
|
20273
|
-
*
|
|
20274
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
20275
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
20276
|
-
* */
|
|
20277
|
-
var getCleanSearchQuery = function getCleanSearchQuery(searchQuery) {
|
|
20278
|
-
return searchQuery.trim().split(/\s+/).join();
|
|
20279
|
-
};
|
|
20280
|
-
|
|
20281
|
-
/* *
|
|
20282
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
20283
|
-
* you may not use this file except in compliance with the License.
|
|
20284
|
-
* You may obtain a copy of the License at
|
|
20285
|
-
*
|
|
20286
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
20287
|
-
*
|
|
20288
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
20289
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20290
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20291
|
-
* See the License for the specific language governing permissions and
|
|
20292
|
-
* limitations under the License.
|
|
20293
|
-
*
|
|
20294
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
20295
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
20296
|
-
* */
|
|
20297
|
-
var MAPPRESET_ACTIVE_TITLE = 'New map preset';
|
|
20298
|
-
var MAPPRESET_DIALOG_TITLE_SAVE_AS = 'Save map preset as';
|
|
20299
|
-
var MAPPRESET_DIALOG_TITLE_DELETE = 'Delete map preset';
|
|
20300
|
-
var getSnackbarMessage$1 = function getSnackbarMessage(action, title) {
|
|
20301
|
-
// Trim and add quotes
|
|
20302
|
-
var trimmedTitle = "\"".concat(title.trim(), "\"");
|
|
20303
|
-
switch (action) {
|
|
20304
|
-
case PresetAction.DELETE:
|
|
20305
|
-
return "Map preset ".concat(trimmedTitle, " successfully deleted");
|
|
20306
|
-
case PresetAction.SAVE_AS:
|
|
20307
|
-
return "New map preset ".concat(trimmedTitle, " successfully saved");
|
|
20308
|
-
default:
|
|
20309
|
-
return "Map preset ".concat(trimmedTitle, " successfully saved");
|
|
20310
|
-
}
|
|
20311
|
-
};
|
|
20312
|
-
var getPresetsApi = function getPresetsApi() {
|
|
20313
|
-
return getApi(API_NAME);
|
|
20314
|
-
};
|
|
20315
|
-
var emptyMapViewPreset = {
|
|
20316
|
-
componentType: 'Map',
|
|
20317
|
-
keywords: '',
|
|
20318
|
-
scope: 'user',
|
|
20319
|
-
title: '',
|
|
20320
|
-
initialProps: {
|
|
20321
|
-
mapPreset: {}
|
|
20322
|
-
}
|
|
20323
|
-
};
|
|
20324
|
-
// Returns object of applied user filters such as scope/search etc
|
|
20325
|
-
// If all filter chips are selected, an empty string is returned for that filter which is interpreted in the BE as "return all" _
|
|
20326
|
-
var constructFilterParams$1 = function constructFilterParams(filters, searchQuery) {
|
|
20327
|
-
// get filters
|
|
20328
|
-
var isAllSelectedForFilters = filters.every(function (filter) {
|
|
20329
|
-
return filter.isSelected;
|
|
20330
|
-
});
|
|
20331
|
-
// If all filters are selected, ensure we return nothing for scope
|
|
20332
|
-
var _ref = isAllSelectedForFilters ? {
|
|
20333
|
-
scope: []
|
|
20334
|
-
} : filters.reduce(function (filterList, filter) {
|
|
20335
|
-
if (filter.isSelected && filter.type === 'scope') {
|
|
20336
|
-
return Object.assign(Object.assign({}, filter), {
|
|
20337
|
-
scope: filterList.scope.concat(filter.id)
|
|
20338
|
-
});
|
|
20339
|
-
}
|
|
20340
|
-
return filterList;
|
|
20341
|
-
}, {
|
|
20342
|
-
scope: []
|
|
20343
|
-
}),
|
|
20344
|
-
scope = _ref.scope;
|
|
20345
|
-
// get search
|
|
20346
|
-
var search = getCleanSearchQuery(searchQuery);
|
|
20347
|
-
return Object.assign(Object.assign({}, scope.length && {
|
|
20348
|
-
scope: scope.toString()
|
|
20349
|
-
}), search.length && {
|
|
20350
|
-
search: search
|
|
20351
|
-
});
|
|
20352
|
-
};
|
|
20353
|
-
|
|
20354
20469
|
/* *
|
|
20355
20470
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
20356
20471
|
* you may not use this file except in compliance with the License.
|
|
@@ -20486,6 +20601,10 @@ var getWorkspaceData = createSelector(getWorkspaceState, getViewPresetsStore, ge
|
|
|
20486
20601
|
"abstract": store["abstract"],
|
|
20487
20602
|
mosaicNode: store.mosaicNode
|
|
20488
20603
|
};
|
|
20604
|
+
}, {
|
|
20605
|
+
memoizeOptions: {
|
|
20606
|
+
resultEqualityCheck: lodash.exports.isEqual
|
|
20607
|
+
}
|
|
20489
20608
|
});
|
|
20490
20609
|
var getViewPresetToSendToBackend = createSelector(getViewById, mapSelectors.getMapPreset, syncGroupsSelectors.getAllTargetGroupsForSource, function (workspaceView, mapPreset, syncGroupsIds) {
|
|
20491
20610
|
var title = (workspaceView === null || workspaceView === void 0 ? void 0 : workspaceView.title) || MAPPRESET_ACTIVE_TITLE;
|
|
@@ -21305,7 +21424,7 @@ var workspacePresetsList = [
|
|
|
21305
21424
|
title: "Radar",
|
|
21306
21425
|
date: "2022-06-01T12:34:27.787184",
|
|
21307
21426
|
scope: "user",
|
|
21308
|
-
abstract: "",
|
|
21427
|
+
abstract: "Some abstract",
|
|
21309
21428
|
viewType: "singleWindow"
|
|
21310
21429
|
},
|
|
21311
21430
|
{
|
|
@@ -23700,103 +23819,6 @@ var WorkspaceListErrorType;
|
|
|
23700
23819
|
WorkspaceListErrorType["GENERIC"] = "GENERIC";
|
|
23701
23820
|
})(WorkspaceListErrorType || (WorkspaceListErrorType = {}));
|
|
23702
23821
|
|
|
23703
|
-
/* *
|
|
23704
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
23705
|
-
* you may not use this file except in compliance with the License.
|
|
23706
|
-
* You may obtain a copy of the License at
|
|
23707
|
-
*
|
|
23708
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23709
|
-
*
|
|
23710
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
23711
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
23712
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23713
|
-
* See the License for the specific language governing permissions and
|
|
23714
|
-
* limitations under the License.
|
|
23715
|
-
*
|
|
23716
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
23717
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
23718
|
-
* */
|
|
23719
|
-
var getSnackbarMessage = function getSnackbarMessage(action, title) {
|
|
23720
|
-
// Trim and add quotes
|
|
23721
|
-
var trimmedTitle = "\"".concat(title.trim(), "\"");
|
|
23722
|
-
switch (action) {
|
|
23723
|
-
case WorkspacePresetAction.SAVE_ALL:
|
|
23724
|
-
return "Workspace ".concat(trimmedTitle, " and underlying viewpresets successfully saved");
|
|
23725
|
-
case WorkspacePresetAction.DELETE:
|
|
23726
|
-
return "Workspace ".concat(trimmedTitle, " successfully deleted");
|
|
23727
|
-
case WorkspacePresetAction.DUPLICATE:
|
|
23728
|
-
return "Workspace ".concat(trimmedTitle, " successfully saved");
|
|
23729
|
-
default:
|
|
23730
|
-
return "Workspace ".concat(trimmedTitle, " successfully saved");
|
|
23731
|
-
}
|
|
23732
|
-
};
|
|
23733
|
-
var emptyMapWorkspace = {
|
|
23734
|
-
title: 'New workspace',
|
|
23735
|
-
scope: 'system',
|
|
23736
|
-
"abstract": '',
|
|
23737
|
-
views: {
|
|
23738
|
-
allIds: ['1_screen'],
|
|
23739
|
-
byId: {
|
|
23740
|
-
'1_screen': {
|
|
23741
|
-
title: MAPPRESET_ACTIVE_TITLE,
|
|
23742
|
-
componentType: 'Map',
|
|
23743
|
-
initialProps: {
|
|
23744
|
-
mapPreset: {
|
|
23745
|
-
layers: [],
|
|
23746
|
-
proj: {
|
|
23747
|
-
bbox: {
|
|
23748
|
-
left: 58703.6377,
|
|
23749
|
-
bottom: 6408480.4514,
|
|
23750
|
-
right: 3967387.5161,
|
|
23751
|
-
top: 11520588.9031
|
|
23752
|
-
},
|
|
23753
|
-
srs: 'EPSG:3857'
|
|
23754
|
-
},
|
|
23755
|
-
shouldShowLayerManager: true,
|
|
23756
|
-
dockedLayerManagerSize: 'sizeSmall'
|
|
23757
|
-
},
|
|
23758
|
-
syncGroupsIds: []
|
|
23759
|
-
}
|
|
23760
|
-
}
|
|
23761
|
-
}
|
|
23762
|
-
},
|
|
23763
|
-
mosaicNode: '1_screen',
|
|
23764
|
-
viewType: 'singleWindow'
|
|
23765
|
-
};
|
|
23766
|
-
var constructFilterParams = function constructFilterParams(filters, searchQuery) {
|
|
23767
|
-
// get filters
|
|
23768
|
-
var _filters$reduce = filters.reduce(function (filterList, filter) {
|
|
23769
|
-
if (filter.isSelected && filter.type === 'scope') {
|
|
23770
|
-
return Object.assign(Object.assign({}, filter), {
|
|
23771
|
-
scope: filterList.scope.concat(filter.id)
|
|
23772
|
-
});
|
|
23773
|
-
}
|
|
23774
|
-
return filterList;
|
|
23775
|
-
}, {
|
|
23776
|
-
scope: []
|
|
23777
|
-
}),
|
|
23778
|
-
scope = _filters$reduce.scope;
|
|
23779
|
-
// get search
|
|
23780
|
-
var search = getCleanSearchQuery(searchQuery);
|
|
23781
|
-
return Object.assign(Object.assign({}, scope.length && {
|
|
23782
|
-
scope: scope.toString()
|
|
23783
|
-
}), search.length && {
|
|
23784
|
-
search: search
|
|
23785
|
-
});
|
|
23786
|
-
};
|
|
23787
|
-
// TODO: better to use a lib for this. Currently this is only used in workspace 'save all', and will probably be replaced by a backend solution
|
|
23788
|
-
// https://stackoverflow.com/questions/6248666/how-to-generate-short-uid-like-ax4j9z-in-js
|
|
23789
|
-
var generateUID = function generateUID() {
|
|
23790
|
-
var firstPart = Math.random() * 46656 || 0;
|
|
23791
|
-
var secondPart = Math.random() * 46656 || 0;
|
|
23792
|
-
var firstPartCombined = "000".concat(firstPart.toString(36)).slice(-3);
|
|
23793
|
-
var secondPartCombined = "000".concat(secondPart.toString(36)).slice(-3);
|
|
23794
|
-
return firstPartCombined + secondPartCombined;
|
|
23795
|
-
};
|
|
23796
|
-
var getGeneratedViewPresetTitle = function getGeneratedViewPresetTitle(workspaceTitle, uid) {
|
|
23797
|
-
return "".concat(workspaceTitle, " - viewpreset ").concat(uid);
|
|
23798
|
-
};
|
|
23799
|
-
|
|
23800
23822
|
/* *
|
|
23801
23823
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
23802
23824
|
* you may not use this file except in compliance with the License.
|
|
@@ -23903,7 +23925,7 @@ function fetchWorkspaceListSaga(_ref) {
|
|
|
23903
23925
|
function onSuccessWorkspacePresetsActionSaga(_ref2) {
|
|
23904
23926
|
var payload = _ref2.payload;
|
|
23905
23927
|
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
23906
|
-
var action, workspaceId, title,
|
|
23928
|
+
var action, workspaceId, title, workspaceFilters, searchQuery;
|
|
23907
23929
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
23908
23930
|
while (1) switch (_context2.prev = _context2.next) {
|
|
23909
23931
|
case 0:
|
|
@@ -23913,44 +23935,35 @@ function onSuccessWorkspacePresetsActionSaga(_ref2) {
|
|
|
23913
23935
|
message: getSnackbarMessage(action, title)
|
|
23914
23936
|
}));
|
|
23915
23937
|
case 3:
|
|
23916
|
-
|
|
23917
|
-
|
|
23918
|
-
case 5:
|
|
23919
|
-
selectedWorkspace = _context2.sent;
|
|
23920
|
-
if (!(action === WorkspacePresetAction.DELETE && workspaceId === (selectedWorkspace === null || selectedWorkspace === void 0 ? void 0 : selectedWorkspace.id))) {
|
|
23921
|
-
_context2.next = 11;
|
|
23938
|
+
if (!(action === WorkspacePresetAction.DELETE && payload.currentActiveWorkspaceId && workspaceId === payload.currentActiveWorkspaceId)) {
|
|
23939
|
+
_context2.next = 6;
|
|
23922
23940
|
break;
|
|
23923
23941
|
}
|
|
23924
|
-
_context2.next =
|
|
23942
|
+
_context2.next = 6;
|
|
23925
23943
|
return put(routerActions.navigateToUrl({
|
|
23926
23944
|
url: getWorkspaceRouteUrl()
|
|
23927
23945
|
}));
|
|
23928
|
-
case
|
|
23929
|
-
_context2.next = 11;
|
|
23930
|
-
return put(workspaceActions.changePreset({
|
|
23931
|
-
workspacePreset: emptyMapWorkspace
|
|
23932
|
-
}));
|
|
23933
|
-
case 11:
|
|
23946
|
+
case 6:
|
|
23934
23947
|
if (!(action === WorkspacePresetAction.SAVE_AS)) {
|
|
23935
|
-
_context2.next =
|
|
23948
|
+
_context2.next = 9;
|
|
23936
23949
|
break;
|
|
23937
23950
|
}
|
|
23938
|
-
_context2.next =
|
|
23951
|
+
_context2.next = 9;
|
|
23939
23952
|
return put(routerActions.navigateToUrl({
|
|
23940
23953
|
url: getWorkspaceRouteUrl(workspaceId)
|
|
23941
23954
|
}));
|
|
23942
|
-
case
|
|
23943
|
-
_context2.next =
|
|
23955
|
+
case 9:
|
|
23956
|
+
_context2.next = 11;
|
|
23944
23957
|
return select(getWorkspaceListFilters);
|
|
23945
|
-
case
|
|
23958
|
+
case 11:
|
|
23946
23959
|
workspaceFilters = _context2.sent;
|
|
23947
|
-
_context2.next =
|
|
23960
|
+
_context2.next = 14;
|
|
23948
23961
|
return select(getWorkspaceListSearchQuery);
|
|
23949
|
-
case
|
|
23962
|
+
case 14:
|
|
23950
23963
|
searchQuery = _context2.sent;
|
|
23951
|
-
_context2.next =
|
|
23964
|
+
_context2.next = 17;
|
|
23952
23965
|
return call(fetchWorkspaceListSaga, workspaceListActions.fetchWorkspaceList(constructFilterParams(workspaceFilters, searchQuery)));
|
|
23953
|
-
case
|
|
23966
|
+
case 17:
|
|
23954
23967
|
case "end":
|
|
23955
23968
|
return _context2.stop();
|
|
23956
23969
|
}
|
|
@@ -24040,7 +24053,7 @@ function saveAllViewPresetSaga(viewPresetEntity, workspaceTitle) {
|
|
|
24040
24053
|
function submitFormWorkspaceDialogSaga(_ref3) {
|
|
24041
24054
|
var payload = _ref3.payload;
|
|
24042
24055
|
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
24043
|
-
var workspaceApi, presetId, presetAction, data, newId, isNewWorkspace, _ref4, presetToDuplicate, fullPreset, _newId, workspace, isNew, workspaceId, views, savedViewPresetResult, errorMessage, workspaceData, newWorkspace, message;
|
|
24056
|
+
var workspaceApi, presetId, presetAction, data, newId, isNewWorkspace, _ref4, presetToDuplicate, fullPreset, _newId, selectedWorkspace, _yield$call2, originalData, workspaceDataNewTitle, workspace, isNew, workspaceId, views, savedViewPresetResult, errorMessage, workspaceData, newWorkspace, message;
|
|
24044
24057
|
return _regeneratorRuntime().wrap(function _callee3$(_context4) {
|
|
24045
24058
|
while (1) switch (_context4.prev = _context4.next) {
|
|
24046
24059
|
case 0:
|
|
@@ -24100,65 +24113,94 @@ function submitFormWorkspaceDialogSaga(_ref3) {
|
|
|
24100
24113
|
}));
|
|
24101
24114
|
case 28:
|
|
24102
24115
|
if (!(presetAction === WorkspacePresetAction.DELETE)) {
|
|
24103
|
-
_context4.next =
|
|
24116
|
+
_context4.next = 36;
|
|
24104
24117
|
break;
|
|
24105
24118
|
}
|
|
24106
24119
|
_context4.next = 31;
|
|
24107
24120
|
return call(workspaceApi.deleteWorkspacePreset, presetId);
|
|
24108
24121
|
case 31:
|
|
24109
24122
|
_context4.next = 33;
|
|
24123
|
+
return select(getWorkspaceState);
|
|
24124
|
+
case 33:
|
|
24125
|
+
selectedWorkspace = _context4.sent;
|
|
24126
|
+
_context4.next = 36;
|
|
24110
24127
|
return put(workspaceListActions.onSuccessWorkspacePresetAction({
|
|
24111
24128
|
workspaceId: presetId,
|
|
24112
24129
|
action: presetAction,
|
|
24113
|
-
title: data.title
|
|
24130
|
+
title: data.title,
|
|
24131
|
+
currentActiveWorkspaceId: selectedWorkspace.id
|
|
24114
24132
|
}));
|
|
24115
|
-
case
|
|
24133
|
+
case 36:
|
|
24134
|
+
if (!(presetAction === WorkspacePresetAction.EDIT)) {
|
|
24135
|
+
_context4.next = 46;
|
|
24136
|
+
break;
|
|
24137
|
+
}
|
|
24138
|
+
_context4.next = 39;
|
|
24139
|
+
return call(workspaceApi.getWorkspacePreset, presetId);
|
|
24140
|
+
case 39:
|
|
24141
|
+
_yield$call2 = _context4.sent;
|
|
24142
|
+
originalData = _yield$call2.data;
|
|
24143
|
+
workspaceDataNewTitle = Object.assign(Object.assign({}, originalData), {
|
|
24144
|
+
title: data.title,
|
|
24145
|
+
"abstract": data["abstract"]
|
|
24146
|
+
});
|
|
24147
|
+
_context4.next = 44;
|
|
24148
|
+
return call(workspaceApi.saveWorkspacePreset, presetId, workspaceDataNewTitle);
|
|
24149
|
+
case 44:
|
|
24150
|
+
_context4.next = 46;
|
|
24151
|
+
return put(workspaceListActions.onSuccessWorkspacePresetAction({
|
|
24152
|
+
workspaceId: presetId,
|
|
24153
|
+
action: presetAction,
|
|
24154
|
+
title: data.title,
|
|
24155
|
+
"abstract": data["abstract"]
|
|
24156
|
+
}));
|
|
24157
|
+
case 46:
|
|
24116
24158
|
if (!(presetAction === WorkspacePresetAction.SAVE_ALL)) {
|
|
24117
|
-
_context4.next =
|
|
24159
|
+
_context4.next = 79;
|
|
24118
24160
|
break;
|
|
24119
24161
|
}
|
|
24120
|
-
_context4.next =
|
|
24162
|
+
_context4.next = 49;
|
|
24121
24163
|
return select(getWorkspaceState);
|
|
24122
|
-
case
|
|
24164
|
+
case 49:
|
|
24123
24165
|
workspace = _context4.sent;
|
|
24124
24166
|
// first save a new workspace to make sure we have an unique title
|
|
24125
24167
|
isNew = !workspace.scope || workspace.scope === 'system';
|
|
24126
24168
|
if (!isNew) {
|
|
24127
|
-
_context4.next =
|
|
24169
|
+
_context4.next = 57;
|
|
24128
24170
|
break;
|
|
24129
24171
|
}
|
|
24130
|
-
_context4.next =
|
|
24172
|
+
_context4.next = 54;
|
|
24131
24173
|
return call(workspaceApi.saveWorkspacePresetAs, data);
|
|
24132
|
-
case
|
|
24174
|
+
case 54:
|
|
24133
24175
|
_context4.t1 = _context4.sent;
|
|
24134
|
-
_context4.next =
|
|
24176
|
+
_context4.next = 58;
|
|
24135
24177
|
break;
|
|
24136
|
-
case
|
|
24178
|
+
case 57:
|
|
24137
24179
|
_context4.t1 = data.id;
|
|
24138
|
-
case
|
|
24180
|
+
case 58:
|
|
24139
24181
|
workspaceId = _context4.t1;
|
|
24140
|
-
_context4.next =
|
|
24182
|
+
_context4.next = 61;
|
|
24141
24183
|
return select(getViewPresets);
|
|
24142
|
-
case
|
|
24184
|
+
case 61:
|
|
24143
24185
|
views = _context4.sent;
|
|
24144
|
-
_context4.next =
|
|
24186
|
+
_context4.next = 64;
|
|
24145
24187
|
return all(views.map(function (view) {
|
|
24146
24188
|
return call(saveAllViewPresetSaga, view, data.title);
|
|
24147
24189
|
}));
|
|
24148
|
-
case
|
|
24190
|
+
case 64:
|
|
24149
24191
|
savedViewPresetResult = _context4.sent;
|
|
24150
24192
|
errorMessage = savedViewPresetResult.find(function (viewPresetResult) {
|
|
24151
24193
|
return typeof viewPresetResult === 'string';
|
|
24152
24194
|
});
|
|
24153
24195
|
if (!errorMessage) {
|
|
24154
|
-
_context4.next =
|
|
24196
|
+
_context4.next = 68;
|
|
24155
24197
|
break;
|
|
24156
24198
|
}
|
|
24157
24199
|
throw new Error(errorMessage);
|
|
24158
|
-
case
|
|
24159
|
-
_context4.next =
|
|
24200
|
+
case 68:
|
|
24201
|
+
_context4.next = 70;
|
|
24160
24202
|
return select(getWorkspaceData);
|
|
24161
|
-
case
|
|
24203
|
+
case 70:
|
|
24162
24204
|
workspaceData = _context4.sent;
|
|
24163
24205
|
newWorkspace = Object.assign(Object.assign({}, workspaceData), {
|
|
24164
24206
|
id: workspaceId,
|
|
@@ -24166,44 +24208,44 @@ function submitFormWorkspaceDialogSaga(_ref3) {
|
|
|
24166
24208
|
title: data.title,
|
|
24167
24209
|
"abstract": data["abstract"]
|
|
24168
24210
|
});
|
|
24169
|
-
_context4.next =
|
|
24211
|
+
_context4.next = 74;
|
|
24170
24212
|
return call(workspaceApi.saveWorkspacePreset, workspaceId, newWorkspace);
|
|
24171
|
-
case
|
|
24172
|
-
_context4.next =
|
|
24213
|
+
case 74:
|
|
24214
|
+
_context4.next = 76;
|
|
24173
24215
|
return put(workspaceListActions.onSuccessWorkspacePresetAction({
|
|
24174
24216
|
action: WorkspacePresetAction.SAVE_ALL,
|
|
24175
24217
|
workspaceId: workspaceId,
|
|
24176
24218
|
title: newWorkspace.title,
|
|
24177
24219
|
"abstract": newWorkspace["abstract"]
|
|
24178
24220
|
}));
|
|
24179
|
-
case
|
|
24221
|
+
case 76:
|
|
24180
24222
|
if (!isNew) {
|
|
24181
|
-
_context4.next =
|
|
24223
|
+
_context4.next = 79;
|
|
24182
24224
|
break;
|
|
24183
24225
|
}
|
|
24184
|
-
_context4.next =
|
|
24226
|
+
_context4.next = 79;
|
|
24185
24227
|
return put(routerActions.navigateToUrl({
|
|
24186
24228
|
url: getWorkspaceRouteUrl(workspaceId)
|
|
24187
24229
|
}));
|
|
24188
|
-
case
|
|
24189
|
-
_context4.next =
|
|
24230
|
+
case 79:
|
|
24231
|
+
_context4.next = 86;
|
|
24190
24232
|
break;
|
|
24191
|
-
case
|
|
24192
|
-
_context4.prev =
|
|
24233
|
+
case 81:
|
|
24234
|
+
_context4.prev = 81;
|
|
24193
24235
|
_context4.t2 = _context4["catch"](3);
|
|
24194
24236
|
message = isAxiosError(_context4.t2) ? getAxiosErrorMessage(_context4.t2) : _context4.t2.message;
|
|
24195
|
-
_context4.next =
|
|
24237
|
+
_context4.next = 86;
|
|
24196
24238
|
return put(workspaceListActions.onErrorWorkspacePresetAction({
|
|
24197
24239
|
error: {
|
|
24198
24240
|
type: WorkspaceListErrorType.GENERIC,
|
|
24199
24241
|
message: message
|
|
24200
24242
|
}
|
|
24201
24243
|
}));
|
|
24202
|
-
case
|
|
24244
|
+
case 86:
|
|
24203
24245
|
case "end":
|
|
24204
24246
|
return _context4.stop();
|
|
24205
24247
|
}
|
|
24206
|
-
}, _callee3, null, [[3,
|
|
24248
|
+
}, _callee3, null, [[3, 81]]);
|
|
24207
24249
|
})();
|
|
24208
24250
|
}
|
|
24209
24251
|
function rootSaga$1() {
|
|
@@ -24460,32 +24502,36 @@ function onSuccessViewPresetActionSaga(_ref4) {
|
|
|
24460
24502
|
filterParams: constructFilterParams$1(viewPresetFilters, viewPresetSearchQuery)
|
|
24461
24503
|
}));
|
|
24462
24504
|
case 18:
|
|
24463
|
-
|
|
24505
|
+
if (!(action !== PresetAction.EDIT)) {
|
|
24506
|
+
_context5.next = 21;
|
|
24507
|
+
break;
|
|
24508
|
+
}
|
|
24509
|
+
_context5.next = 21;
|
|
24464
24510
|
return put(viewPresetActions.setViewPresetHasChanges({
|
|
24465
24511
|
panelId: panelId,
|
|
24466
24512
|
hasChanges: false
|
|
24467
24513
|
}));
|
|
24468
|
-
case
|
|
24514
|
+
case 21:
|
|
24469
24515
|
if (!(action === PresetAction.SAVE_AS && viewPresetId)) {
|
|
24470
|
-
_context5.next =
|
|
24516
|
+
_context5.next = 24;
|
|
24471
24517
|
break;
|
|
24472
24518
|
}
|
|
24473
|
-
_context5.next =
|
|
24519
|
+
_context5.next = 24;
|
|
24474
24520
|
return put(viewPresetActions.setActiveViewPresetId({
|
|
24475
24521
|
panelId: panelId,
|
|
24476
24522
|
viewPresetId: viewPresetId
|
|
24477
24523
|
}));
|
|
24478
|
-
case
|
|
24479
|
-
_context5.next =
|
|
24524
|
+
case 24:
|
|
24525
|
+
_context5.next = 28;
|
|
24480
24526
|
break;
|
|
24481
|
-
case
|
|
24482
|
-
_context5.prev =
|
|
24527
|
+
case 26:
|
|
24528
|
+
_context5.prev = 26;
|
|
24483
24529
|
_context5.t0 = _context5["catch"](1);
|
|
24484
|
-
case
|
|
24530
|
+
case 28:
|
|
24485
24531
|
case "end":
|
|
24486
24532
|
return _context5.stop();
|
|
24487
24533
|
}
|
|
24488
|
-
}, _callee4, null, [[1,
|
|
24534
|
+
}, _callee4, null, [[1, 26]]);
|
|
24489
24535
|
})();
|
|
24490
24536
|
}
|
|
24491
24537
|
function rootSaga() {
|
|
@@ -32449,22 +32495,6 @@ var FixedSizeList = /*#__PURE__*/createListComponent({
|
|
|
32449
32495
|
}
|
|
32450
32496
|
});
|
|
32451
32497
|
|
|
32452
|
-
/* *
|
|
32453
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
32454
|
-
* you may not use this file except in compliance with the License.
|
|
32455
|
-
* You may obtain a copy of the License at
|
|
32456
|
-
*
|
|
32457
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
32458
|
-
*
|
|
32459
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
32460
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
32461
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
32462
|
-
* See the License for the specific language governing permissions and
|
|
32463
|
-
* limitations under the License.
|
|
32464
|
-
*
|
|
32465
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
32466
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
32467
|
-
* */
|
|
32468
32498
|
var WORKSPACE_SELECT_LIST_ROW_HEIGHT = 46;
|
|
32469
32499
|
var getPresetIcon = function getPresetIcon(preset) {
|
|
32470
32500
|
switch (preset.viewType) {
|
|
@@ -32499,12 +32529,17 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
|
|
|
32499
32529
|
var onDuplicate = function onDuplicate() {
|
|
32500
32530
|
onClickWorkspacePresetOption(workspacePreset.id, WorkspacePresetAction.DUPLICATE, workspacePreset);
|
|
32501
32531
|
};
|
|
32502
|
-
|
|
32503
|
-
|
|
32504
|
-
|
|
32505
|
-
|
|
32506
|
-
|
|
32507
|
-
|
|
32532
|
+
var onEdit = function onEdit() {
|
|
32533
|
+
onClickWorkspacePresetOption(workspacePreset.id, WorkspacePresetAction.EDIT, workspacePreset);
|
|
32534
|
+
};
|
|
32535
|
+
var editTitle = testIdPrefix === 'viewpreset' ? 'Edit (name)' : 'Edit (name and abstract)';
|
|
32536
|
+
var menuItems = [{
|
|
32537
|
+
text: 'Duplicate',
|
|
32538
|
+
action: onDuplicate
|
|
32539
|
+
}].concat(_toConsumableArray$1(workspacePreset.scope === 'user' ? [{
|
|
32540
|
+
text: editTitle,
|
|
32541
|
+
action: onEdit
|
|
32542
|
+
}] : []));
|
|
32508
32543
|
return /*#__PURE__*/React__default.createElement(ListItem, {
|
|
32509
32544
|
disablePadding: true,
|
|
32510
32545
|
sx: {
|
|
@@ -32560,15 +32595,7 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
|
|
|
32560
32595
|
}, /*#__PURE__*/React__default.createElement(ToggleMenu, {
|
|
32561
32596
|
buttonTestId: "".concat(testIdPrefix, "-listOptionsButton"),
|
|
32562
32597
|
menuPosition: "right",
|
|
32563
|
-
menuItems:
|
|
32564
|
-
text: 'Duplicate',
|
|
32565
|
-
action: onDuplicate
|
|
32566
|
-
}
|
|
32567
|
-
// {
|
|
32568
|
-
// text: 'Edit (name & meta)',
|
|
32569
|
-
// action: onEdit,
|
|
32570
|
-
// },
|
|
32571
|
-
],
|
|
32598
|
+
menuItems: menuItems,
|
|
32572
32599
|
menuTitle: "Options",
|
|
32573
32600
|
isDefaultOpen: isOptionsMenuOpen
|
|
32574
32601
|
}), workspacePreset.scope === 'user' && /*#__PURE__*/React__default.createElement(CustomIconButton, {
|
|
@@ -32914,7 +32941,8 @@ var WorkspaceSelectList = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
32914
32941
|
}, /*#__PURE__*/React.createElement(FixedSizeList, {
|
|
32915
32942
|
height: listHeight,
|
|
32916
32943
|
itemCount: items.length,
|
|
32917
|
-
itemSize: rowHeight
|
|
32944
|
+
itemSize: rowHeight,
|
|
32945
|
+
width: "100%"
|
|
32918
32946
|
}, function (_ref2) {
|
|
32919
32947
|
var index = _ref2.index,
|
|
32920
32948
|
style = _ref2.style;
|
|
@@ -32973,7 +33001,9 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
|
|
|
32973
33001
|
});
|
|
32974
33002
|
var lastViewPresetListSearchQuery = usePrevious(viewPresetListSearchQuery);
|
|
32975
33003
|
var relatedSyncGroupIds = useSelector(function (store) {
|
|
32976
|
-
return syncGroupsSelectors.getAllTargetGroupsForSource(store,
|
|
33004
|
+
return syncGroupsSelectors.getAllTargetGroupsForSource(store, {
|
|
33005
|
+
sourceId: panelId
|
|
33006
|
+
});
|
|
32977
33007
|
});
|
|
32978
33008
|
var errorViewPresetsList = useSelector(function (store) {
|
|
32979
33009
|
return getViewPresetListError(store, panelId);
|
|
@@ -33028,9 +33058,20 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
|
|
|
33028
33058
|
});
|
|
33029
33059
|
break;
|
|
33030
33060
|
}
|
|
33031
|
-
|
|
33032
|
-
|
|
33033
|
-
|
|
33061
|
+
case WorkspacePresetAction.EDIT:
|
|
33062
|
+
{
|
|
33063
|
+
var presetTitle = (preset === null || preset === void 0 ? void 0 : preset.title) || '';
|
|
33064
|
+
openViewPresetsDialog({
|
|
33065
|
+
title: MAPPRESET_DIALOG_TITLE_EDIT,
|
|
33066
|
+
action: PresetAction.EDIT,
|
|
33067
|
+
panelId: panelId,
|
|
33068
|
+
viewPresetId: presetId,
|
|
33069
|
+
formValues: {
|
|
33070
|
+
title: presetTitle
|
|
33071
|
+
}
|
|
33072
|
+
});
|
|
33073
|
+
break;
|
|
33074
|
+
}
|
|
33034
33075
|
// case WorkspacePresetAction.SAVE: {
|
|
33035
33076
|
// break;
|
|
33036
33077
|
// }
|
|
@@ -33206,6 +33247,7 @@ var WorkspaceOptions = function WorkspaceOptions(_ref) {
|
|
|
33206
33247
|
setAnchorEl(document.getElementById(id));
|
|
33207
33248
|
}
|
|
33208
33249
|
}, [isDefaultOpen, id]);
|
|
33250
|
+
var editTitle = id === 'viewpreset-options-toolbutton' ? 'Edit (name)' : 'Edit (name and abstract)';
|
|
33209
33251
|
var options = [{
|
|
33210
33252
|
title: 'Save',
|
|
33211
33253
|
callback: handleSave
|
|
@@ -33216,7 +33258,7 @@ var WorkspaceOptions = function WorkspaceOptions(_ref) {
|
|
|
33216
33258
|
title: 'Save (incl. viewpresets)',
|
|
33217
33259
|
callback: handleSaveAll
|
|
33218
33260
|
}] : []), [{
|
|
33219
|
-
title:
|
|
33261
|
+
title: editTitle,
|
|
33220
33262
|
callback: handleEdit
|
|
33221
33263
|
}, {
|
|
33222
33264
|
title: 'Delete',
|
|
@@ -33404,6 +33446,22 @@ var WorkspaceViewTitleConnect = function WorkspaceViewTitleConnect(_ref) {
|
|
|
33404
33446
|
}
|
|
33405
33447
|
});
|
|
33406
33448
|
};
|
|
33449
|
+
var onEdit = function onEdit() {
|
|
33450
|
+
var formTitle = activeMapPresetId ? title : '';
|
|
33451
|
+
openViewPresetsDialog({
|
|
33452
|
+
title: MAPPRESET_DIALOG_TITLE_EDIT,
|
|
33453
|
+
action: PresetAction.EDIT,
|
|
33454
|
+
panelId: panelId,
|
|
33455
|
+
viewPresetId: activeMapPresetId,
|
|
33456
|
+
formValues: {
|
|
33457
|
+
title: formTitle,
|
|
33458
|
+
initialProps: {
|
|
33459
|
+
mapPreset: currentMapPreset,
|
|
33460
|
+
syncGroupsIds: relatedSyncGroupIds
|
|
33461
|
+
}
|
|
33462
|
+
}
|
|
33463
|
+
});
|
|
33464
|
+
};
|
|
33407
33465
|
var isNewActive = activeMapPresetId === '';
|
|
33408
33466
|
var title = (workspaceView === null || workspaceView === void 0 ? void 0 : workspaceView.title) || MAPPRESET_ACTIVE_TITLE;
|
|
33409
33467
|
var viewScope = workspaceView === null || workspaceView === void 0 ? void 0 : workspaceView.scope;
|
|
@@ -33415,6 +33473,7 @@ var WorkspaceViewTitleConnect = function WorkspaceViewTitleConnect(_ref) {
|
|
|
33415
33473
|
handleSave: viewScope === 'user' ? onSave : undefined,
|
|
33416
33474
|
handleDelete: viewScope === 'user' ? onDelete : undefined,
|
|
33417
33475
|
handleSaveAs: onSaveAs,
|
|
33476
|
+
handleEdit: viewScope === 'user' ? onEdit : undefined,
|
|
33418
33477
|
id: "viewpreset-options-toolbutton"
|
|
33419
33478
|
});
|
|
33420
33479
|
};
|
|
@@ -37450,9 +37509,19 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect() {
|
|
|
37450
37509
|
});
|
|
37451
37510
|
break;
|
|
37452
37511
|
}
|
|
37453
|
-
|
|
37454
|
-
|
|
37455
|
-
|
|
37512
|
+
case WorkspacePresetAction.EDIT:
|
|
37513
|
+
{
|
|
37514
|
+
setWorkspaceActionDialogOptions({
|
|
37515
|
+
action: workspaceAction,
|
|
37516
|
+
presetId: presetId,
|
|
37517
|
+
formValues: {
|
|
37518
|
+
title: presetTitle,
|
|
37519
|
+
"abstract": affectedPreset["abstract"],
|
|
37520
|
+
scope: 'user'
|
|
37521
|
+
}
|
|
37522
|
+
});
|
|
37523
|
+
break;
|
|
37524
|
+
}
|
|
37456
37525
|
// case WorkspacePresetAction.SAVE: {
|
|
37457
37526
|
// break;
|
|
37458
37527
|
// }
|
|
@@ -37738,6 +37807,13 @@ var WorkspaceOptionsConnect = function WorkspaceOptionsConnect(_ref) {
|
|
|
37738
37807
|
workspace: workspaceData
|
|
37739
37808
|
}));
|
|
37740
37809
|
}, [dispatch, workspaceData]);
|
|
37810
|
+
var onEdit = function onEdit() {
|
|
37811
|
+
setWorkspaceActionDialogOptions({
|
|
37812
|
+
action: WorkspacePresetAction.EDIT,
|
|
37813
|
+
presetId: workspaceId,
|
|
37814
|
+
formValues: Object.assign({}, workspaceData)
|
|
37815
|
+
});
|
|
37816
|
+
};
|
|
37741
37817
|
var fullTitle = getTitle(title, hasChanges, workspaceId);
|
|
37742
37818
|
return /*#__PURE__*/React.createElement(WorkspaceOptions, {
|
|
37743
37819
|
hasChanges: hasChanges,
|
|
@@ -37747,6 +37823,7 @@ var WorkspaceOptionsConnect = function WorkspaceOptionsConnect(_ref) {
|
|
|
37747
37823
|
handleSaveAs: onSaveAs,
|
|
37748
37824
|
handleSaveAll: onSaveAll,
|
|
37749
37825
|
handleSave: workspaceScope === 'user' ? onSave : undefined,
|
|
37826
|
+
handleEdit: workspaceScope === 'user' ? onEdit : undefined,
|
|
37750
37827
|
isDisabled: !viewIds.length || !isLoggedIn
|
|
37751
37828
|
});
|
|
37752
37829
|
};
|
|
@@ -37873,7 +37950,7 @@ var WorkspacePresetsForm = function WorkspacePresetsForm(_ref) {
|
|
|
37873
37950
|
event.preventDefault();
|
|
37874
37951
|
onSubmit();
|
|
37875
37952
|
};
|
|
37876
|
-
var hasFormInput = action === WorkspacePresetAction.DUPLICATE || action === WorkspacePresetAction.SAVE_AS || action === WorkspacePresetAction.SAVE_ALL;
|
|
37953
|
+
var hasFormInput = action === WorkspacePresetAction.DUPLICATE || action === WorkspacePresetAction.SAVE_AS || action === WorkspacePresetAction.SAVE_ALL || action === WorkspacePresetAction.EDIT;
|
|
37877
37954
|
// disable form inputs for 'Save (incl. viewpresets)' existing workspace preset
|
|
37878
37955
|
var isDisabled = action === WorkspacePresetAction.SAVE_ALL && formValues.id !== undefined && formValues.id !== '' && formValues.scope === 'user';
|
|
37879
37956
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, Boolean(error) && /*#__PURE__*/React__default.createElement(Box$2, {
|
|
@@ -37949,6 +38026,7 @@ var DIALOG_TITLE_DELETE = 'Delete workspace';
|
|
|
37949
38026
|
var DIALOG_TITLE_DUPLICATE = 'Duplicate';
|
|
37950
38027
|
var DIALOG_BUTTON_SAVE = 'Save';
|
|
37951
38028
|
var DIALOG_BUTTON_DELETE = 'Delete';
|
|
38029
|
+
var DIALOG_BUTTON_EDIT = 'Edit (name and abstract)';
|
|
37952
38030
|
var getDialogTitle = function getDialogTitle(action) {
|
|
37953
38031
|
switch (action) {
|
|
37954
38032
|
case WorkspacePresetAction.DELETE:
|
|
@@ -37963,6 +38041,10 @@ var getDialogTitle = function getDialogTitle(action) {
|
|
|
37963
38041
|
{
|
|
37964
38042
|
return DIALOG_TITLE_SAVE_ALL;
|
|
37965
38043
|
}
|
|
38044
|
+
case WorkspacePresetAction.EDIT:
|
|
38045
|
+
{
|
|
38046
|
+
return DIALOG_BUTTON_EDIT;
|
|
38047
|
+
}
|
|
37966
38048
|
default:
|
|
37967
38049
|
{
|
|
37968
38050
|
return DIALOG_TITLE_SAVE_AS;
|
|
@@ -38166,7 +38248,7 @@ var MapPresetsForm = function MapPresetsForm(_ref) {
|
|
|
38166
38248
|
}
|
|
38167
38249
|
}, /*#__PURE__*/React__default.createElement(AlertBanner, {
|
|
38168
38250
|
title: error
|
|
38169
|
-
})), action === PresetAction.SAVE_AS && /*#__PURE__*/React__default.createElement("form", {
|
|
38251
|
+
})), (action === PresetAction.SAVE_AS || action === PresetAction.EDIT) && /*#__PURE__*/React__default.createElement("form", {
|
|
38170
38252
|
"data-testid": "map-preset-form",
|
|
38171
38253
|
onSubmit: onSubmitForm
|
|
38172
38254
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormTextField, {
|
|
@@ -38242,7 +38324,7 @@ var MapPresetsFormDialog = function MapPresetsFormDialog(_ref) {
|
|
|
38242
38324
|
var confirmLabel = getConfirmLabel(action);
|
|
38243
38325
|
var onFormSubmit = function onFormSubmit(newFormValues) {
|
|
38244
38326
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
38245
|
-
var newId, message;
|
|
38327
|
+
var newId, _yield$api$getViewPre, originalViewPreset, viewPresetEdited, message;
|
|
38246
38328
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
38247
38329
|
while (1) switch (_context.prev = _context.next) {
|
|
38248
38330
|
case 0:
|
|
@@ -38250,7 +38332,7 @@ var MapPresetsFormDialog = function MapPresetsFormDialog(_ref) {
|
|
|
38250
38332
|
setError(null);
|
|
38251
38333
|
setIsLoading(true);
|
|
38252
38334
|
_context.t0 = action;
|
|
38253
|
-
_context.next = _context.t0 === PresetAction.SAVE_AS ? 6 : _context.t0 === PresetAction.DELETE ? 13 : 19;
|
|
38335
|
+
_context.next = _context.t0 === PresetAction.SAVE_AS ? 6 : _context.t0 === PresetAction.DELETE ? 13 : _context.t0 === PresetAction.EDIT ? 19 : 30;
|
|
38254
38336
|
break;
|
|
38255
38337
|
case 6:
|
|
38256
38338
|
_context.next = 8;
|
|
@@ -38260,7 +38342,7 @@ var MapPresetsFormDialog = function MapPresetsFormDialog(_ref) {
|
|
|
38260
38342
|
setIsLoading(false);
|
|
38261
38343
|
onClose();
|
|
38262
38344
|
onSuccess(action, newId, newFormValues.title);
|
|
38263
|
-
return _context.abrupt("break",
|
|
38345
|
+
return _context.abrupt("break", 31);
|
|
38264
38346
|
case 13:
|
|
38265
38347
|
_context.next = 15;
|
|
38266
38348
|
return api.deleteViewPreset(viewPresetId);
|
|
@@ -38268,23 +38350,39 @@ var MapPresetsFormDialog = function MapPresetsFormDialog(_ref) {
|
|
|
38268
38350
|
setIsLoading(false);
|
|
38269
38351
|
onClose();
|
|
38270
38352
|
onSuccess(action, viewPresetId, newFormValues.title);
|
|
38271
|
-
return _context.abrupt("break",
|
|
38353
|
+
return _context.abrupt("break", 31);
|
|
38272
38354
|
case 19:
|
|
38273
|
-
|
|
38274
|
-
|
|
38275
|
-
|
|
38355
|
+
_context.next = 21;
|
|
38356
|
+
return api.getViewPreset(viewPresetId);
|
|
38357
|
+
case 21:
|
|
38358
|
+
_yield$api$getViewPre = _context.sent;
|
|
38359
|
+
originalViewPreset = _yield$api$getViewPre.data;
|
|
38360
|
+
viewPresetEdited = Object.assign(Object.assign({}, originalViewPreset), {
|
|
38361
|
+
title: newFormValues.title
|
|
38362
|
+
});
|
|
38363
|
+
_context.next = 26;
|
|
38364
|
+
return api.saveViewPreset(viewPresetId, viewPresetEdited);
|
|
38365
|
+
case 26:
|
|
38366
|
+
setIsLoading(false);
|
|
38367
|
+
onClose();
|
|
38368
|
+
onSuccess(action, viewPresetId, newFormValues.title);
|
|
38369
|
+
return _context.abrupt("break", 31);
|
|
38370
|
+
case 30:
|
|
38371
|
+
return _context.abrupt("break", 31);
|
|
38372
|
+
case 31:
|
|
38373
|
+
_context.next = 38;
|
|
38276
38374
|
break;
|
|
38277
|
-
case
|
|
38278
|
-
_context.prev =
|
|
38375
|
+
case 33:
|
|
38376
|
+
_context.prev = 33;
|
|
38279
38377
|
_context.t1 = _context["catch"](0);
|
|
38280
38378
|
setIsLoading(false);
|
|
38281
38379
|
message = isAxiosError(_context.t1) ? getAxiosErrorMessage(_context.t1) : _context.t1.message;
|
|
38282
38380
|
setError(message);
|
|
38283
|
-
case
|
|
38381
|
+
case 38:
|
|
38284
38382
|
case "end":
|
|
38285
38383
|
return _context.stop();
|
|
38286
38384
|
}
|
|
38287
|
-
}, _callee, null, [[0,
|
|
38385
|
+
}, _callee, null, [[0, 33]]);
|
|
38288
38386
|
}));
|
|
38289
38387
|
};
|
|
38290
38388
|
var onSubmit = function onSubmit() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/workspace",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "GeoWeb Workspace library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -15,16 +15,17 @@
|
|
|
15
15
|
"@emotion/react": "11.11.1",
|
|
16
16
|
"@mui/material": "5.12.0",
|
|
17
17
|
"@mui/system": "5.14.5",
|
|
18
|
-
"@opengeoweb/api": "6.0
|
|
19
|
-
"@opengeoweb/authentication": "6.0
|
|
20
|
-
"@opengeoweb/core": "6.0
|
|
21
|
-
"@opengeoweb/form-fields": "6.0
|
|
22
|
-
"@opengeoweb/shared": "6.0
|
|
23
|
-
"@opengeoweb/sigmet-airmet": "6.0
|
|
24
|
-
"@opengeoweb/store": "6.0
|
|
25
|
-
"@opengeoweb/taf": "6.0
|
|
26
|
-
"@opengeoweb/theme": "6.0
|
|
27
|
-
"@opengeoweb/timeseries": "6.0
|
|
18
|
+
"@opengeoweb/api": "6.1.0",
|
|
19
|
+
"@opengeoweb/authentication": "6.1.0",
|
|
20
|
+
"@opengeoweb/core": "6.1.0",
|
|
21
|
+
"@opengeoweb/form-fields": "6.1.0",
|
|
22
|
+
"@opengeoweb/shared": "6.1.0",
|
|
23
|
+
"@opengeoweb/sigmet-airmet": "6.1.0",
|
|
24
|
+
"@opengeoweb/store": "6.1.0",
|
|
25
|
+
"@opengeoweb/taf": "6.1.0",
|
|
26
|
+
"@opengeoweb/theme": "6.1.0",
|
|
27
|
+
"@opengeoweb/timeseries": "6.1.0",
|
|
28
|
+
"@opengeoweb/webmap": "6.1.0",
|
|
28
29
|
"@redux-eggs/core": "2.2.0",
|
|
29
30
|
"@redux-eggs/redux-toolkit": "2.2.0",
|
|
30
31
|
"@redux-eggs/saga-extension": "2.2.0",
|
|
@@ -19,5 +19,13 @@ export declare const DeleteDemoDarkTheme: {
|
|
|
19
19
|
(): React.ReactElement;
|
|
20
20
|
storyName: string;
|
|
21
21
|
};
|
|
22
|
+
export declare const EditDemoLightTheme: {
|
|
23
|
+
(): React.ReactElement;
|
|
24
|
+
storyName: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const EditDemoDarkTheme: {
|
|
27
|
+
(): React.ReactElement;
|
|
28
|
+
storyName: string;
|
|
29
|
+
};
|
|
22
30
|
export declare const SaveAsWithError: () => React.ReactElement;
|
|
23
31
|
export declare const DeleteWithError: () => React.ReactElement;
|
|
@@ -7,6 +7,7 @@ export declare const DIALOG_TITLE_DELETE = "Delete workspace";
|
|
|
7
7
|
export declare const DIALOG_TITLE_DUPLICATE = "Duplicate";
|
|
8
8
|
export declare const DIALOG_BUTTON_SAVE = "Save";
|
|
9
9
|
export declare const DIALOG_BUTTON_DELETE = "Delete";
|
|
10
|
+
export declare const DIALOG_BUTTON_EDIT = "Edit (name and abstract)";
|
|
10
11
|
export declare const getDialogTitle: (action: WorkspacePresetAction) => string;
|
|
11
12
|
export declare const getConfirmLabel: (action: WorkspacePresetAction) => string;
|
|
12
13
|
export interface WorkspacePresetsFormDialogProps {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,6 +4,7 @@ import { FetchViewPresetsListParams } from '../viewPresetsList/types';
|
|
|
4
4
|
export declare const MAPPRESET_ACTIVE_TITLE = "New map preset";
|
|
5
5
|
export declare const MAPPRESET_DIALOG_TITLE_SAVE_AS = "Save map preset as";
|
|
6
6
|
export declare const MAPPRESET_DIALOG_TITLE_DELETE = "Delete map preset";
|
|
7
|
+
export declare const MAPPRESET_DIALOG_TITLE_EDIT = "Edit map preset";
|
|
7
8
|
export declare const getSnackbarMessage: (action: PresetAction, title: string) => string;
|
|
8
9
|
export declare const getPresetsApi: () => PresetsApi;
|
|
9
10
|
export declare const emptyMapViewPreset: {
|
|
@@ -142,7 +142,9 @@ export declare const getWorkspaceData: ((state: AppStore & import("@opengeoweb/s
|
|
|
142
142
|
}> & {
|
|
143
143
|
clearCache: () => void;
|
|
144
144
|
};
|
|
145
|
-
export declare const getViewPresetToSendToBackend: ((state:
|
|
145
|
+
export declare const getViewPresetToSendToBackend: ((state: AppStore & import("@opengeoweb/store").CoreAppStore, viewId: string | (string & {
|
|
146
|
+
sourceId: string;
|
|
147
|
+
})) => {
|
|
146
148
|
id: string | undefined;
|
|
147
149
|
scope: import("./types").PresetScope;
|
|
148
150
|
title: string;
|
|
@@ -150,13 +152,6 @@ export declare const getViewPresetToSendToBackend: ((state: any, viewId: string)
|
|
|
150
152
|
mapPreset: import("dist/libs/store/src/store/mapStore/types").MapPreset;
|
|
151
153
|
syncGroupsIds: string[];
|
|
152
154
|
};
|
|
153
|
-
/**
|
|
154
|
-
* Gets view from workspace state
|
|
155
|
-
*
|
|
156
|
-
* @param {object} store store: object - Store object
|
|
157
|
-
* @param {string} viewId viewId: string - view id
|
|
158
|
-
* @returns {object} returnType: WorkspaceViewType
|
|
159
|
-
*/
|
|
160
155
|
componentType: "Map";
|
|
161
156
|
keywords: string;
|
|
162
157
|
}) & import("reselect").OutputSelectorFields<(args_0: WorkspaceViewType | undefined, args_1: import("dist/libs/store/src/store/mapStore/types").MapPreset, args_2: string[]) => {
|
|
@@ -167,13 +162,6 @@ export declare const getViewPresetToSendToBackend: ((state: any, viewId: string)
|
|
|
167
162
|
mapPreset: import("dist/libs/store/src/store/mapStore/types").MapPreset;
|
|
168
163
|
syncGroupsIds: string[];
|
|
169
164
|
};
|
|
170
|
-
/**
|
|
171
|
-
* Gets view from workspace state
|
|
172
|
-
*
|
|
173
|
-
* @param {object} store store: object - Store object
|
|
174
|
-
* @param {string} viewId viewId: string - view id
|
|
175
|
-
* @returns {object} returnType: WorkspaceViewType
|
|
176
|
-
*/
|
|
177
165
|
componentType: "Map";
|
|
178
166
|
keywords: string;
|
|
179
167
|
}, {
|
|
@@ -61,13 +61,14 @@ export type OpenWorkspaceActionDialogPayload = WorkspaceActionDialogType;
|
|
|
61
61
|
export interface SubmitFormWorkspaceActionDialogPayload {
|
|
62
62
|
presetAction: WorkspacePresetAction;
|
|
63
63
|
presetId: string;
|
|
64
|
-
data: WorkspacePreset;
|
|
64
|
+
data: WorkspacePreset | WorkspacePresetFromBE;
|
|
65
65
|
}
|
|
66
66
|
export interface OnSuccesWorkspacePresetActionPayload {
|
|
67
67
|
workspaceId: string;
|
|
68
68
|
action: WorkspacePresetAction;
|
|
69
69
|
title: string;
|
|
70
70
|
abstract?: string;
|
|
71
|
+
currentActiveWorkspaceId?: string;
|
|
71
72
|
}
|
|
72
73
|
export interface OnErrorWorkspacePresetActionPayload {
|
|
73
74
|
error: WorkspaceListError;
|