@opengeoweb/workspace 16.0.0 → 17.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.
Files changed (164) hide show
  1. package/index.esm.js +1604 -570
  2. package/package.json +19 -19
  3. package/index.esm.css +0 -37
  4. package/src/index.d.ts +0 -23
  5. package/src/lib/Workspace.stories.d.ts +0 -14
  6. package/src/lib/WorkspaceAdmin.stories.d.ts +0 -16
  7. package/src/lib/api/types.d.ts +0 -2
  8. package/src/lib/api/utils.d.ts +0 -5
  9. package/src/lib/api/viewpreset-api/api.d.ts +0 -9
  10. package/src/lib/api/viewpreset-api/fakeApi/fakeApi.d.ts +0 -1
  11. package/src/lib/api/viewpreset-api/fakeApi/mockData.d.ts +0 -84
  12. package/src/lib/api/viewpreset-api/hooks.d.ts +0 -16
  13. package/src/lib/api/viewpreset-api/queryOptions.d.ts +0 -42
  14. package/src/lib/api/workspace-api/api.d.ts +0 -12
  15. package/src/lib/api/workspace-api/fakeApi/fakeApi.d.ts +0 -1
  16. package/src/lib/api/workspace-api/fakeApi/mockData.d.ts +0 -13
  17. package/src/lib/api/workspace-api/hooks.d.ts +0 -15
  18. package/src/lib/api/workspace-api/queryOptions.d.ts +0 -42
  19. package/src/lib/components/ComponentsLookUpWrapper/ComponentsLookUpWrapper.d.ts +0 -12
  20. package/src/lib/components/ComponentsLookUpWrapper/ComponentsLookUpWrapper.spec.d.ts +0 -1
  21. package/src/lib/components/ComponentsLookUpWrapper/index.d.ts +0 -1
  22. package/src/lib/components/DefaultComponentsLookUp/DefaultComponentsLookUp.d.ts +0 -17
  23. package/src/lib/components/DefaultComponentsLookUp/DefaultComponentsLookUp.spec.d.ts +0 -1
  24. package/src/lib/components/DefaultComponentsLookUp/index.d.ts +0 -1
  25. package/src/lib/components/LabelsPanel/PresetLabelsPanel.d.ts +0 -14
  26. package/src/lib/components/LabelsPanel/PresetLabelsPanel.spec.d.ts +0 -1
  27. package/src/lib/components/LabelsPanel/PresetsLabelsPanelWrapper.d.ts +0 -11
  28. package/src/lib/components/LabelsPanel/PresetsLabelsPanelWrapper.spec.d.ts +0 -1
  29. package/src/lib/components/PastePresetDialog/PastePresetDialog.d.ts +0 -8
  30. package/src/lib/components/PastePresetDialog/index.d.ts +0 -2
  31. package/src/lib/components/Providers/Providers.d.ts +0 -30
  32. package/src/lib/components/Providers/index.d.ts +0 -1
  33. package/src/lib/components/ViewPresetMenu/ViewPresetMenu.d.ts +0 -9
  34. package/src/lib/components/ViewPresetMenu/ViewPresetMenu.spec.d.ts +0 -1
  35. package/src/lib/components/ViewPresetMenu/ViewPresetMenu.stories.d.ts +0 -10
  36. package/src/lib/components/ViewPresetMenu/ViewPresetMenuListConnect.d.ts +0 -9
  37. package/src/lib/components/ViewPresetMenu/ViewPresetMenuListConnect.spec.d.ts +0 -1
  38. package/src/lib/components/ViewPresetMenu/ViewPresetsError.stories.d.ts +0 -61
  39. package/src/lib/components/ViewPresetMenu/index.d.ts +0 -1
  40. package/src/lib/components/ViewPresetsFormDialog/ViewPresetsForm.d.ts +0 -19
  41. package/src/lib/components/ViewPresetsFormDialog/ViewPresetsForm.spec.d.ts +0 -1
  42. package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialog.d.ts +0 -20
  43. package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialog.spec.d.ts +0 -1
  44. package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialog.stories.d.ts +0 -31
  45. package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialogConnect.d.ts +0 -6
  46. package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialogConnect.spec.d.ts +0 -1
  47. package/src/lib/components/ViewPresetsFormDialog/index.d.ts +0 -1
  48. package/src/lib/components/WorkspaceDetail/WorkspaceDetail.d.ts +0 -10
  49. package/src/lib/components/WorkspaceDetail/WorkspaceDetail.spec.d.ts +0 -1
  50. package/src/lib/components/WorkspaceDetail/WorkspaceDetail.stories.d.ts +0 -18
  51. package/src/lib/components/WorkspaceDetail/WorkspaceDetailError.stories.d.ts +0 -31
  52. package/src/lib/components/WorkspaceDetail/index.d.ts +0 -1
  53. package/src/lib/components/WorkspaceMenu/WorkspaceMenu.d.ts +0 -7
  54. package/src/lib/components/WorkspaceMenu/WorkspaceMenu.spec.d.ts +0 -1
  55. package/src/lib/components/WorkspaceMenu/WorkspaceMenu.stories.d.ts +0 -10
  56. package/src/lib/components/WorkspaceMenu/WorkspaceMenuButton.d.ts +0 -12
  57. package/src/lib/components/WorkspaceMenu/WorkspaceMenuButton.spec.d.ts +0 -1
  58. package/src/lib/components/WorkspaceMenu/WorkspaceMenuButton.stories.d.ts +0 -7
  59. package/src/lib/components/WorkspaceMenu/WorkspaceMenuButtonConnect.d.ts +0 -8
  60. package/src/lib/components/WorkspaceMenu/WorkspaceMenuButtonConnect.spec.d.ts +0 -1
  61. package/src/lib/components/WorkspaceMenu/index.d.ts +0 -1
  62. package/src/lib/components/WorkspaceOptions/WorkspaceOptions.d.ts +0 -19
  63. package/src/lib/components/WorkspaceOptions/WorkspaceOptions.spec.d.ts +0 -1
  64. package/src/lib/components/WorkspaceOptions/WorkspaceOptions.stories.d.ts +0 -10
  65. package/src/lib/components/WorkspaceOptions/WorkspaceOptionsConnect.d.ts +0 -6
  66. package/src/lib/components/WorkspaceOptions/WorkspaceOptionsConnect.spec.d.ts +0 -1
  67. package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsForm.d.ts +0 -26
  68. package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsForm.spec.d.ts +0 -1
  69. package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.d.ts +0 -17
  70. package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.spec.d.ts +0 -1
  71. package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.stories.d.ts +0 -27
  72. package/src/lib/components/WorkspaceSelectList/WorkspaceMenuLabelsWrapper.d.ts +0 -9
  73. package/src/lib/components/WorkspaceSelectList/WorkspaceMenuLabelsWrapper.spec.d.ts +0 -1
  74. package/src/lib/components/WorkspaceSelectList/WorkspacePresetInfo.d.ts +0 -11
  75. package/src/lib/components/WorkspaceSelectList/WorkspacePresetInfo.spec.d.ts +0 -1
  76. package/src/lib/components/WorkspaceSelectList/WorkspacePresetInfo.stories.d.ts +0 -10
  77. package/src/lib/components/WorkspaceSelectList/WorkspaceSelectList.d.ts +0 -19
  78. package/src/lib/components/WorkspaceSelectList/WorkspaceSelectList.spec.d.ts +0 -1
  79. package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListConnect.d.ts +0 -7
  80. package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListConnect.spec.d.ts +0 -1
  81. package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListError.stories.d.ts +0 -14
  82. package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListRow.d.ts +0 -20
  83. package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListRow.spec.d.ts +0 -1
  84. package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListRow.stories.d.ts +0 -8
  85. package/src/lib/components/WorkspaceTab/WorkspaceTab.d.ts +0 -8
  86. package/src/lib/components/WorkspaceTab/WorkspaceTab.spec.d.ts +0 -1
  87. package/src/lib/components/WorkspaceTab/WorkspaceTabConnect.d.ts +0 -7
  88. package/src/lib/components/WorkspaceTab/WorkspaceTabConnect.integration.spec.d.ts +0 -1
  89. package/src/lib/components/WorkspaceTab/WorkspaceTabConnect.spec.d.ts +0 -1
  90. package/src/lib/components/WorkspaceTab/index.d.ts +0 -1
  91. package/src/lib/components/WorkspaceTopBar/WorkspaceTopBar.d.ts +0 -7
  92. package/src/lib/components/WorkspaceTopBar/WorkspaceTopBar.spec.d.ts +0 -1
  93. package/src/lib/components/WorkspaceTopBar/WorkspaceTopBar.stories.d.ts +0 -11
  94. package/src/lib/components/WorkspaceTopBar/index.d.ts +0 -1
  95. package/src/lib/components/WorkspaceView/LinkMenu/LinkMenuConnect.d.ts +0 -6
  96. package/src/lib/components/WorkspaceView/LinkMenu/LinkMenuConnect.spec.d.ts +0 -1
  97. package/src/lib/components/WorkspaceView/LoadingIndicator/LoadingIndicatorConnect.d.ts +0 -6
  98. package/src/lib/components/WorkspaceView/LoadingIndicator/LoadingIndicatorConnect.spec.d.ts +0 -1
  99. package/src/lib/components/WorkspaceView/SplitButtonsConnect.d.ts +0 -10
  100. package/src/lib/components/WorkspaceView/SplitButtonsConnect.spec.d.ts +0 -1
  101. package/src/lib/components/WorkspaceView/WorkSpaceView.stories.d.ts +0 -9
  102. package/src/lib/components/WorkspaceView/WorkspaceControls.d.ts +0 -11
  103. package/src/lib/components/WorkspaceView/WorkspaceControls.spec.d.ts +0 -1
  104. package/src/lib/components/WorkspaceView/WorkspaceTileConnect.d.ts +0 -12
  105. package/src/lib/components/WorkspaceView/WorkspaceTileConnect.spec.d.ts +0 -1
  106. package/src/lib/components/WorkspaceView/WorkspaceView.d.ts +0 -16
  107. package/src/lib/components/WorkspaceView/WorkspaceView.spec.d.ts +0 -1
  108. package/src/lib/components/WorkspaceView/WorkspaceViewConnect.d.ts +0 -7
  109. package/src/lib/components/WorkspaceView/WorkspaceViewConnect.spec.d.ts +0 -1
  110. package/src/lib/components/WorkspaceView/helpers.d.ts +0 -5
  111. package/src/lib/components/WorkspaceView/helpers.spec.d.ts +0 -1
  112. package/src/lib/components/WorkspaceView/index.d.ts +0 -2
  113. package/src/lib/components/WorkspaceViewTitle/WorkspaceViewTitleConnect.d.ts +0 -11
  114. package/src/lib/components/WorkspaceViewTitle/WorkspaceViewTitleConnect.spec.d.ts +0 -1
  115. package/src/lib/hooks/useFetchViewPresets.d.ts +0 -1
  116. package/src/lib/hooks/useResetFiltersOnRoleChange.d.ts +0 -5
  117. package/src/lib/store/index.d.ts +0 -1
  118. package/src/lib/store/store.d.ts +0 -20
  119. package/src/lib/store/types.d.ts +0 -13
  120. package/src/lib/store/viewPresets/index.d.ts +0 -2
  121. package/src/lib/store/viewPresets/listener.d.ts +0 -5
  122. package/src/lib/store/viewPresets/listener.spec.d.ts +0 -1
  123. package/src/lib/store/viewPresets/reducer.d.ts +0 -36
  124. package/src/lib/store/viewPresets/reducer.spec.d.ts +0 -1
  125. package/src/lib/store/viewPresets/selectors.d.ts +0 -640
  126. package/src/lib/store/viewPresets/selectors.spec.d.ts +0 -1
  127. package/src/lib/store/viewPresets/types.d.ts +0 -180
  128. package/src/lib/store/viewPresets/utils.d.ts +0 -5
  129. package/src/lib/store/viewPresets/utils.spec.d.ts +0 -1
  130. package/src/lib/store/workspace/index.d.ts +0 -1
  131. package/src/lib/store/workspace/listener.d.ts +0 -5
  132. package/src/lib/store/workspace/listener.spec.d.ts +0 -1
  133. package/src/lib/store/workspace/reducer.d.ts +0 -22
  134. package/src/lib/store/workspace/reducer.spec.d.ts +0 -1
  135. package/src/lib/store/workspace/selectors.d.ts +0 -517
  136. package/src/lib/store/workspace/selectors.spec.d.ts +0 -1
  137. package/src/lib/store/workspace/types.d.ts +0 -202
  138. package/src/lib/store/workspace/utils.d.ts +0 -28
  139. package/src/lib/store/workspace/utils.spec.d.ts +0 -1
  140. package/src/lib/store/workspaceList/index.d.ts +0 -2
  141. package/src/lib/store/workspaceList/listener.d.ts +0 -4
  142. package/src/lib/store/workspaceList/listener.spec.d.ts +0 -1
  143. package/src/lib/store/workspaceList/reducer.d.ts +0 -45
  144. package/src/lib/store/workspaceList/reducer.spec.d.ts +0 -1
  145. package/src/lib/store/workspaceList/selectors.d.ts +0 -416
  146. package/src/lib/store/workspaceList/selectors.spec.d.ts +0 -1
  147. package/src/lib/store/workspaceList/types.d.ts +0 -137
  148. package/src/lib/store/workspaceList/utils.d.ts +0 -16
  149. package/src/lib/store/workspaceList/utils.spec.d.ts +0 -1
  150. package/src/lib/storyUtils/ActionsExampleComponent.d.ts +0 -6
  151. package/src/lib/storyUtils/StoryWrapper.d.ts +0 -18
  152. package/src/lib/storyUtils/componentsLookUp.d.ts +0 -8
  153. package/src/lib/storyUtils/componentsLookUp.stories.d.ts +0 -25
  154. package/src/lib/storyUtils/useFirstTimeError.d.ts +0 -4
  155. package/src/lib/storyUtils/useFirstTimeError.spec.d.ts +0 -1
  156. package/src/lib/utils/clipboardUtils.d.ts +0 -23
  157. package/src/lib/utils/clipboardUtils.spec.d.ts +0 -1
  158. package/src/lib/utils/fakeApi.stories.d.ts +0 -14
  159. package/src/lib/utils/i18n.d.ts +0 -7
  160. package/src/lib/utils/labels.config.d.ts +0 -3
  161. package/src/lib/utils/routes.d.ts +0 -8
  162. package/src/lib/utils/routes.spec.d.ts +0 -1
  163. package/src/lib/utils/utils.d.ts +0 -9
  164. package/src/lib/utils/utils.spec.d.ts +0 -1
package/index.esm.js CHANGED
@@ -5,12 +5,12 @@ import { timeSeriesActions, TimeSeriesTypes, timeSeriesSelectors, timeSeriesRedu
5
5
  import { chunk, cloneDeep, union, pick, isEqual, isString } from 'lodash';
6
6
  import { getLeaves, createBalancedTreeFromLeaves, MosaicContext, getAndAssertNodeAtPathExists, MosaicWindow, Mosaic } from 'react-mosaic-component';
7
7
  import { queryOptions, useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
8
- import { sessionStorageProvider, getAxiosErrorMessage, isAxiosError, isAuthError, isAxiosAuthError, safelyInitI18nForTestsAndStories, sharedTranslations, SHARED_NAMESPACE, ConfirmationServiceProvider, CustomIconButton, useConfirmationDialog, usePrevious, AlertBanner, CustomAccordion, CustomTooltip, dateUtils, SystemScope, SearchHighlight, ToggleMenu, SearchField, Filter, LastUpdateTime, renderCounter, CustomDialog, ToolContainer, CustomToggleButton, ConfirmationButtons } from '@opengeoweb/shared';
8
+ import { sessionStorageProvider, isAxiosError, getAxiosErrorMessage, isAuthError, isAxiosAuthError, SHARED_NAMESPACE, safelyInitI18nForTestsAndStories, sharedTranslations, ConfirmationServiceProvider, CustomIconButton, useConfirmationDialog, usePrevious, AlertBanner, CustomAccordion, CustomTooltip, dateUtils, SystemScope, SearchHighlight, ToggleMenu, SearchField, Filter, LastUpdateTime, renderCounter, CustomDialog, ToolContainer, CustomToggleButton, ConfirmationButtons } from '@opengeoweb/shared';
9
9
  import { soundingsActions, SoundingsTypes, soundingsSelectors, soundingsReducer } from '@opengeoweb/soundings';
10
10
  import { warningsFiltersActions, publicWarningsSelectors, warningsTranslations, WARN_NAMESPACE } from '@opengeoweb/warnings';
11
11
  import { snackbarTypes, snackbarActions, snackbarListener, snackbarReducer, SnackbarWrapperConnect } from '@opengeoweb/snackbar';
12
12
  import { isAxiosError as isAxiosError$1 } from 'axios';
13
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
+ import React, { useEffect, useCallback } from 'react';
14
14
  import { useTranslation, I18nextProvider } from 'react-i18next';
15
15
  import { Provider, useDispatch, useSelector, useStore, shallowEqual } from 'react-redux';
16
16
  import { AuthenticationProvider, useAuthenticationContext, GEOWEB_ROLE_PRESETS_ADMIN } from '@opengeoweb/authentication';
@@ -19,7 +19,7 @@ import i18n from 'i18next';
19
19
  import { coreTranslations, CORE_NAMESPACE, LoadingIndicatorProgressBar } from '@opengeoweb/core';
20
20
  import { formFieldsTranslations, FORM_FIELDS_NAMESPACE, ReactHookFormHiddenInput, ReactHookFormTextField, ReactHookFormProvider, defaultFormOptions } from '@opengeoweb/form-fields';
21
21
  import { webmapReactTranslations, WEBMAP_REACT_NAMESPACE } from '@opengeoweb/webmap-react';
22
- import React, { useEffect, useCallback } from 'react';
22
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
23
23
  import { Menu, Typography, List, ListItem, ListItemButton, ListItemIcon, Checkbox, ListItemText, MenuItem, useTheme, Box, LinearProgress, Button, Stack, FormControlLabel, Chip, Popper, ClickAwayListener, Paper, IconButton, Collapse, Divider, Grid, TextField, ListSubheader, Tabs } from '@mui/material';
24
24
  import 'react-mosaic-component/react-mosaic-component.css';
25
25
  import { useFormContext, useWatch, useForm, FormProvider } from 'react-hook-form';
@@ -909,6 +909,7 @@ function _regeneratorRuntime() {
909
909
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
910
910
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
911
911
  * */
912
+
912
913
  var getViewPresetState = function getViewPresetState(viewPresetId, mosaicNodeId, state) {
913
914
  var titlePrefix = state === 'loading' ? 'Loading' : 'Error';
914
915
  var componentType = state === 'loading' ? 'ViewLoading' : 'ViewError';
@@ -970,6 +971,7 @@ var getSyncGroups = function getSyncGroups(syncGroups) {
970
971
  type: syncGroup.type
971
972
  };
972
973
  });
974
+
973
975
  // Only add a default sync group for a type that is not used yet
974
976
  defaultSyncGroups.forEach(function (defaultSyncGroup) {
975
977
  return presetSyncGroups.findIndex(function (presetSyncGroup) {
@@ -991,6 +993,7 @@ var getViewType$1 = function getViewType(numViews, firstViewComponentType) {
991
993
  // no views
992
994
  return undefined;
993
995
  };
996
+
994
997
  /**
995
998
  * Get all view ids from the mosaicnode state
996
999
  * @param mNode MosaicNode state
@@ -1031,6 +1034,284 @@ var toViewsArray = function toViewsArray(wsViews) {
1031
1034
  });
1032
1035
  };
1033
1036
 
1037
+ var workspacePresetsFallback = [
1038
+ {
1039
+ id: "newSplitMap2x1Workspace",
1040
+ title: "Two maps",
1041
+ scope: "system",
1042
+ abstract: "",
1043
+ viewType: "multiWindow",
1044
+ views: [
1045
+ {
1046
+ mosaicNodeId: "left-map",
1047
+ componentType: "Map",
1048
+ initialProps: {
1049
+ mapPreset: {
1050
+ layers: [
1051
+ ],
1052
+ proj: {
1053
+ bbox: {
1054
+ left: -2782987.27,
1055
+ bottom: 3503549.84,
1056
+ right: 5009377.09,
1057
+ top: 11753184.62
1058
+ },
1059
+ srs: "EPSG:3857"
1060
+ },
1061
+ showTimeSlider: false,
1062
+ displayMapPin: false,
1063
+ shouldShowZoomControls: true
1064
+ },
1065
+ syncGroupsIds: [
1066
+ ]
1067
+ },
1068
+ title: "Map A"
1069
+ },
1070
+ {
1071
+ mosaicNodeId: "right-map",
1072
+ componentType: "Map",
1073
+ initialProps: {
1074
+ mapPreset: {
1075
+ layers: [
1076
+ ],
1077
+ proj: {
1078
+ bbox: {
1079
+ left: -2782987.27,
1080
+ bottom: 3503549.84,
1081
+ right: 5009377.09,
1082
+ top: 11753184.62
1083
+ },
1084
+ srs: "EPSG:3857"
1085
+ },
1086
+ showTimeSlider: false,
1087
+ displayMapPin: false,
1088
+ shouldShowZoomControls: true
1089
+ },
1090
+ syncGroupsIds: [
1091
+ ]
1092
+ },
1093
+ title: "Map B"
1094
+ }
1095
+ ],
1096
+ syncGroups: [
1097
+ ],
1098
+ mosaicNode: {
1099
+ direction: "row",
1100
+ first: "left-map",
1101
+ second: "right-map",
1102
+ splitPercentage: 50
1103
+ }
1104
+ },
1105
+ {
1106
+ id: "timeSeriesWorkspace",
1107
+ title: "Timeseries",
1108
+ scope: "system",
1109
+ abstract: "",
1110
+ viewType: "multiWindow",
1111
+ views: [
1112
+ {
1113
+ mosaicNodeId: "timeseries-map",
1114
+ componentType: "Map",
1115
+ initialProps: {
1116
+ mapPreset: {
1117
+ layers: [
1118
+ ],
1119
+ proj: {
1120
+ bbox: {
1121
+ left: -2782987.27,
1122
+ bottom: 3503549.84,
1123
+ right: 5009377.09,
1124
+ top: 11753184.62
1125
+ },
1126
+ srs: "EPSG:3857"
1127
+ },
1128
+ showTimeSlider: true,
1129
+ displayMapPin: true,
1130
+ shouldShowZoomControls: true
1131
+ },
1132
+ syncGroupsIds: [
1133
+ "Area_TimeSeries",
1134
+ "Time_TimeSeries"
1135
+ ]
1136
+ },
1137
+ title: "Map"
1138
+ },
1139
+ {
1140
+ mosaicNodeId: "timeseries-panel",
1141
+ componentType: "TimeSeries",
1142
+ initialProps: {
1143
+ plotPreset: {
1144
+ mapId: "timeseries-map",
1145
+ plots: [
1146
+ ],
1147
+ parameters: [
1148
+ ]
1149
+ },
1150
+ services: [
1151
+ ]
1152
+ },
1153
+ title: "Timeseries"
1154
+ }
1155
+ ],
1156
+ syncGroups: [
1157
+ {
1158
+ id: "Area_TimeSeries",
1159
+ type: "SYNCGROUPS_TYPE_SETBBOX"
1160
+ },
1161
+ {
1162
+ id: "Time_TimeSeries",
1163
+ type: "SYNCGROUPS_TYPE_SETTIME"
1164
+ }
1165
+ ],
1166
+ linking: {
1167
+ "timeseries-panel": [
1168
+ "timeseries-map"
1169
+ ]
1170
+ },
1171
+ mosaicNode: {
1172
+ direction: "row",
1173
+ first: "timeseries-map",
1174
+ second: "timeseries-panel",
1175
+ splitPercentage: 50
1176
+ }
1177
+ },
1178
+ {
1179
+ id: "soundingWorkspace",
1180
+ title: "Soundings",
1181
+ scope: "system",
1182
+ abstract: "Vertical profile observations",
1183
+ viewType: "multiWindow",
1184
+ views: [
1185
+ {
1186
+ mosaicNodeId: "sounding-map",
1187
+ componentType: "Map",
1188
+ initialProps: {
1189
+ mapPreset: {
1190
+ layers: [
1191
+ ],
1192
+ proj: {
1193
+ bbox: {
1194
+ left: -2782987.27,
1195
+ bottom: 3503549.84,
1196
+ right: 5009377.09,
1197
+ top: 11753184.62
1198
+ },
1199
+ srs: "EPSG:3857"
1200
+ },
1201
+ showTimeSlider: true,
1202
+ displayMapPin: true,
1203
+ shouldShowZoomControls: true
1204
+ },
1205
+ syncGroupsIds: [
1206
+ "Area_Sounding",
1207
+ "Time_Sounding"
1208
+ ]
1209
+ },
1210
+ title: "Map"
1211
+ },
1212
+ {
1213
+ mosaicNodeId: "sounding-panel",
1214
+ componentType: "Soundings",
1215
+ initialProps: {
1216
+ selectedSources: {
1217
+ },
1218
+ selectedLocations: {
1219
+ }
1220
+ },
1221
+ title: "Sounding"
1222
+ }
1223
+ ],
1224
+ syncGroups: [
1225
+ {
1226
+ id: "Area_Sounding",
1227
+ type: "SYNCGROUPS_TYPE_SETBBOX"
1228
+ },
1229
+ {
1230
+ id: "Time_Sounding",
1231
+ type: "SYNCGROUPS_TYPE_SETTIME"
1232
+ }
1233
+ ],
1234
+ linking: {
1235
+ "sounding-panel": [
1236
+ "sounding-map"
1237
+ ]
1238
+ },
1239
+ mosaicNode: {
1240
+ direction: "row",
1241
+ first: "sounding-map",
1242
+ second: "sounding-panel",
1243
+ splitPercentage: 50
1244
+ }
1245
+ },
1246
+ {
1247
+ id: "capWarningsWorkspace",
1248
+ title: "Cap warnings",
1249
+ scope: "system",
1250
+ abstract: "",
1251
+ viewType: "multiWindow",
1252
+ views: [
1253
+ {
1254
+ mosaicNodeId: "cap-map",
1255
+ componentType: "CapWarningMap",
1256
+ initialProps: {
1257
+ mapPreset: {
1258
+ layers: [
1259
+ ],
1260
+ proj: {
1261
+ bbox: {
1262
+ left: -2782987.27,
1263
+ bottom: 3503549.84,
1264
+ right: 5009377.09,
1265
+ top: 11753184.62
1266
+ },
1267
+ srs: "EPSG:3857"
1268
+ }
1269
+ },
1270
+ geoJson: {
1271
+ type: "FeatureCollection",
1272
+ features: [
1273
+ ]
1274
+ }
1275
+ },
1276
+ title: "CAP warnings map"
1277
+ },
1278
+ {
1279
+ mosaicNodeId: "cap-list",
1280
+ componentType: "CapWarningList",
1281
+ initialProps: {
1282
+ mapPreset: {
1283
+ layers: [
1284
+ ],
1285
+ proj: {
1286
+ bbox: {
1287
+ left: -2782987.27,
1288
+ bottom: 3503549.84,
1289
+ right: 5009377.09,
1290
+ top: 11753184.62
1291
+ },
1292
+ srs: "EPSG:3857"
1293
+ }
1294
+ },
1295
+ geoJson: {
1296
+ type: "FeatureCollection",
1297
+ features: [
1298
+ ]
1299
+ }
1300
+ },
1301
+ title: "CAP warnings list"
1302
+ }
1303
+ ],
1304
+ syncGroups: [
1305
+ ],
1306
+ mosaicNode: {
1307
+ direction: "row",
1308
+ first: "cap-map",
1309
+ second: "cap-list",
1310
+ splitPercentage: 50
1311
+ }
1312
+ }
1313
+ ];
1314
+
1034
1315
  /* *
1035
1316
  * Licensed under the Apache License, Version 2.0 (the "License");
1036
1317
  * you may not use this file except in compliance with the License.
@@ -1048,6 +1329,14 @@ var toViewsArray = function toViewsArray(wsViews) {
1048
1329
  * Copyright 2026 - Finnish Meteorological Institute (FMI)
1049
1330
  * Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
1050
1331
  * */
1332
+
1333
+
1334
+ /*
1335
+ configureLibraryDefaults([LIB_KEY], {
1336
+ staleTime: 5 * 60 * 1000,
1337
+ });
1338
+ */
1339
+
1051
1340
  var LIB_KEY = 'workspace-lib';
1052
1341
  var getPresetBaseUrl = function getPresetBaseUrl() {
1053
1342
  var config = sessionStorageProvider.getConfig();
@@ -1056,6 +1345,46 @@ var getPresetBaseUrl = function getPresetBaseUrl() {
1056
1345
  var getIdFromUrl = function getIdFromUrl(url) {
1057
1346
  return url && /[^/]+$/.exec(url)[0];
1058
1347
  };
1348
+ var ERROR_NOT_FOUND$1 = 'Request failed with status code 400';
1349
+ var hasNoPresetBackend = function hasNoPresetBackend() {
1350
+ return !getPresetBaseUrl() && process.env.NODE_ENV !== 'test';
1351
+ };
1352
+ var extractWorkspacePresetFromJSON = function extractWorkspacePresetFromJSON(workspacePresetId) {
1353
+ var preset = workspacePresetsFallback.find(function (element) {
1354
+ return element.id === workspacePresetId;
1355
+ });
1356
+ if (!preset) {
1357
+ throw new Error(ERROR_NOT_FOUND$1);
1358
+ }
1359
+ return preset;
1360
+ };
1361
+ var filterWorkspacePresetList = function filterWorkspacePresetList(params) {
1362
+ var list = workspacePresetsFallback.map(function (preset) {
1363
+ var _preset$abstract;
1364
+ return {
1365
+ id: preset.id,
1366
+ title: preset.title,
1367
+ scope: preset.scope,
1368
+ viewType: preset.viewType,
1369
+ "abstract": (_preset$abstract = preset["abstract"]) != null ? _preset$abstract : '',
1370
+ description: preset.description,
1371
+ username: preset.username
1372
+ };
1373
+ });
1374
+ if (!params) {
1375
+ return list;
1376
+ }
1377
+ return list.filter(function (preset) {
1378
+ if (params.scope && preset.scope !== params.scope) {
1379
+ return false;
1380
+ }
1381
+ if (params.search) {
1382
+ var query = params.search.toLowerCase();
1383
+ return preset.title.toLowerCase().includes(query) || preset["abstract"].toLowerCase().includes(query);
1384
+ }
1385
+ return true;
1386
+ });
1387
+ };
1059
1388
 
1060
1389
  var getViewPreset = /*#__PURE__*/function () {
1061
1390
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(viewpresetId, auth) {
@@ -1258,7 +1587,9 @@ var viewpresetQueryOptions = {
1258
1587
  return _queryFn2.apply(this, arguments);
1259
1588
  }
1260
1589
  return queryFn;
1261
- }()
1590
+ }(),
1591
+ staleTime: 2 * 60 * 1000,
1592
+ refetchOnMount: true
1262
1593
  });
1263
1594
  },
1264
1595
  saveViewPreset: function saveViewPreset$1(id, data, credentials) {
@@ -1326,6 +1657,7 @@ var viewpresetQueryOptions = {
1326
1657
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
1327
1658
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1328
1659
  * */
1660
+
1329
1661
  var routes = {
1330
1662
  root: '/',
1331
1663
  workspace: '/workspace',
@@ -1352,8 +1684,10 @@ var getWorkspaceRouteUrl = function getWorkspaceRouteUrl(workspaceId) {
1352
1684
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
1353
1685
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1354
1686
  * */
1355
- var WorkspacePresetAction;
1356
- (function (WorkspacePresetAction) {
1687
+
1688
+ // should be extracted from storing preset
1689
+
1690
+ var WorkspacePresetAction = /*#__PURE__*/function (WorkspacePresetAction) {
1357
1691
  WorkspacePresetAction["DELETE"] = "DELETE";
1358
1692
  WorkspacePresetAction["EDIT"] = "EDIT";
1359
1693
  WorkspacePresetAction["SAVE"] = "SAVE";
@@ -1367,37 +1701,75 @@ var WorkspacePresetAction;
1367
1701
  WorkspacePresetAction["OPEN_TAB"] = "OPEN_TAB";
1368
1702
  WorkspacePresetAction["EDIT_TITLE"] = "EDIT_TITLE";
1369
1703
  WorkspacePresetAction["COPY_TO_CLIPBOARD"] = "COPY_TO_CLIPBOARD";
1370
- })(WorkspacePresetAction || (WorkspacePresetAction = {}));
1371
- var WorkspaceErrorType;
1372
- (function (WorkspaceErrorType) {
1704
+ return WorkspacePresetAction;
1705
+ }({});
1706
+
1707
+ // actions
1708
+
1709
+ // base WorkspaceComponentLookupPayload type. This can be extended in libraries to make it more specific
1710
+
1711
+ // Workspaces
1712
+
1713
+ var WorkspaceErrorType = /*#__PURE__*/function (WorkspaceErrorType) {
1373
1714
  WorkspaceErrorType["NOT_FOUND"] = "NOT_FOUND";
1374
1715
  WorkspaceErrorType["GENERIC"] = "GENERIC";
1375
1716
  WorkspaceErrorType["SAVE"] = "SAVE";
1376
- })(WorkspaceErrorType || (WorkspaceErrorType = {}));
1717
+ return WorkspaceErrorType;
1718
+ }({});
1719
+
1720
+ /* *
1721
+ * Licensed under the Apache License, Version 2.0 (the "License");
1722
+ * you may not use this file except in compliance with the License.
1723
+ * You may obtain a copy of the License at
1724
+ *
1725
+ * http://www.apache.org/licenses/LICENSE-2.0
1726
+ *
1727
+ * Unless required by applicable law or agreed to in writing, software
1728
+ * distributed under the License is distributed on an "AS IS" BASIS,
1729
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1730
+ * See the License for the specific language governing permissions and
1731
+ * limitations under the License.
1732
+ *
1733
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1734
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
1735
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1736
+ * */
1377
1737
 
1378
1738
  var AVIATION_COMPONENT_TYPES = ['AirmetModule', 'SigmetModule'];
1379
1739
  var CAP_COMPONENT_TYPES = ['CapWarningList', 'CapWarningMap'];
1380
1740
  // 1) Map-like components
1381
1741
  var SUPPORTED_COMPONENT_TYPES = ['Map', 'MultiMap', 'ModelRunInterval', 'HarmonieTempAndPrecipPreset', 'TimeSlider'];
1742
+
1743
+ // If you can change the existing type, do this:
1744
+ // export type SupportedComponentTypes = (typeof SUPPORTED_COMPONENT_TYPES)[number];
1745
+
1746
+ // If you *must* keep the old type definition, just ensure it matches the array:
1747
+
1382
1748
  // 2) TimeSeries components
1383
1749
  var SUPPORTED_TIMESERIES_COMPONENT_TYPES = ['TimeSeries'];
1750
+
1751
+ // Same note as above:
1752
+
1384
1753
  // or keep your old union type if it already exists
1754
+
1385
1755
  // 3) Warning list components
1386
- var WARNING_LIST_COMPONENT_TYPES = ['WarningList', 'MaritimeWarnings'];
1756
+ var WARNING_LIST_COMPONENT_TYPES = ['WarningList', 'MaritimeWarnings', 'WarningsTimeline'];
1387
1757
  // TODO: expand it and move to a more centralized place
1388
1758
  var ALL_COMPONENT_TYPES = [].concat(SUPPORTED_COMPONENT_TYPES, SUPPORTED_TIMESERIES_COMPONENT_TYPES, WARNING_LIST_COMPONENT_TYPES, AVIATION_COMPONENT_TYPES, CAP_COMPONENT_TYPES, ['TafModule', 'TrajksModule', 'SpaceweatherModule']);
1389
- var ViewPresetErrorComponent;
1390
- (function (ViewPresetErrorComponent) {
1759
+
1760
+ // ViewPreset coming from BE
1761
+
1762
+ var ViewPresetErrorComponent = /*#__PURE__*/function (ViewPresetErrorComponent) {
1391
1763
  ViewPresetErrorComponent["PRESET_DETAIL"] = "PRESET_DETAIL";
1392
1764
  ViewPresetErrorComponent["PRESET_LIST"] = "PRESET_LIST";
1393
- })(ViewPresetErrorComponent || (ViewPresetErrorComponent = {}));
1394
- var ViewPresetErrorType;
1395
- (function (ViewPresetErrorType) {
1765
+ return ViewPresetErrorComponent;
1766
+ }({});
1767
+ var ViewPresetErrorType = /*#__PURE__*/function (ViewPresetErrorType) {
1396
1768
  ViewPresetErrorType["AUTH"] = "AUTH";
1397
1769
  ViewPresetErrorType["GENERIC"] = "GENERIC";
1398
- })(ViewPresetErrorType || (ViewPresetErrorType = {}));
1399
- var PresetAction;
1400
- (function (PresetAction) {
1770
+ return ViewPresetErrorType;
1771
+ }({});
1772
+ var PresetAction = /*#__PURE__*/function (PresetAction) {
1401
1773
  PresetAction["OPEN"] = "Open";
1402
1774
  PresetAction["DELETE"] = "Delete";
1403
1775
  PresetAction["SAVE"] = "Save";
@@ -1405,7 +1777,18 @@ var PresetAction;
1405
1777
  PresetAction["SHARE"] = "Share";
1406
1778
  PresetAction["EDIT"] = "Edit";
1407
1779
  PresetAction["RESET"] = "Reset";
1408
- })(PresetAction || (PresetAction = {}));
1780
+ return PresetAction;
1781
+ }({});
1782
+
1783
+ // actions
1784
+
1785
+ // list api request actions
1786
+
1787
+ // detail api request actions
1788
+
1789
+ // map actions
1790
+
1791
+ // dialog options
1409
1792
 
1410
1793
  /* *
1411
1794
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1424,22 +1807,23 @@ var PresetAction;
1424
1807
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
1425
1808
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1426
1809
  * */
1427
- var WorkspaceListErrorCategory;
1428
- (function (WorkspaceListErrorCategory) {
1810
+
1811
+ var WorkspaceListErrorCategory = /*#__PURE__*/function (WorkspaceListErrorCategory) {
1429
1812
  WorkspaceListErrorCategory["AUTH"] = "AUTH";
1430
1813
  WorkspaceListErrorCategory["GENERIC"] = "GENERIC";
1431
- })(WorkspaceListErrorCategory || (WorkspaceListErrorCategory = {}));
1432
- var WorkspaceListErrorType;
1433
- (function (WorkspaceListErrorType) {
1814
+ return WorkspaceListErrorCategory;
1815
+ }({});
1816
+ var WorkspaceListErrorType = /*#__PURE__*/function (WorkspaceListErrorType) {
1434
1817
  WorkspaceListErrorType["TRANSLATABLE_ERROR"] = "TRANSLATABLE_ERROR";
1435
1818
  WorkspaceListErrorType["VERBATIM_ERROR"] = "VERBATIM_ERROR";
1436
- })(WorkspaceListErrorType || (WorkspaceListErrorType = {}));
1437
- var PresetFilterType;
1438
- (function (PresetFilterType) {
1819
+ return WorkspaceListErrorType;
1820
+ }({});
1821
+ var PresetFilterType = /*#__PURE__*/function (PresetFilterType) {
1439
1822
  PresetFilterType["personal"] = "personal";
1440
1823
  PresetFilterType["shared"] = "shared";
1441
1824
  PresetFilterType["system"] = "system";
1442
- })(PresetFilterType || (PresetFilterType = {}));
1825
+ return PresetFilterType;
1826
+ }({});
1443
1827
 
1444
1828
  /* *
1445
1829
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1458,6 +1842,7 @@ var PresetFilterType;
1458
1842
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
1459
1843
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1460
1844
  * */
1845
+
1461
1846
  var personalFilterState = {
1462
1847
  label: 'shared-filter-my-presets',
1463
1848
  id: PresetFilterType.personal,
@@ -1640,6 +2025,7 @@ var workspaceListReducer = slice$2.reducer,
1640
2025
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
1641
2026
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1642
2027
  * */
2028
+
1643
2029
  var viewPresetsListFilterOptions = [{
1644
2030
  label: 'shared-filter-my-view-presets',
1645
2031
  id: PresetFilterType.personal,
@@ -1663,12 +2049,12 @@ var viewPresetsAdapter = createEntityAdapter({
1663
2049
  }
1664
2050
  });
1665
2051
  var initialState$1 = viewPresetsAdapter.getInitialState();
1666
- var warningsPresetChangeActions = [warningsFiltersActions.setWarningFilters];
2052
+ var warningsPresetChangeActions = [warningsFiltersActions.setWarningFilters, warningsFiltersActions.setExpandedSectionsForPanel];
1667
2053
  var syncGroupChangeActions = [syncGroupsActions.syncGroupRemoveTarget, syncGroupsActions.syncGroupAddTarget];
1668
- var mapPresetChangeActions = [layerActions.setBaseLayers, layerActions.layerDelete, layerActions.addLayer, layerActions.duplicateMapLayer, layerActions.layerChangeEnabled, layerActions.layerChangeName, layerActions.layerChangeStyle, layerActions.layerChangeOpacity, layerActions.layerChangeDimension, layerActions.layerChangeAcceptanceTime, mapActions.layerMoveLayer, mapActions.setAutoLayerId, mapActions.setAutoTimestepLayerId, mapActions.setAutoUpdateLayerId, mapActions.toggleAutoUpdate, mapActions.mapStartAnimation, mapActions.mapStopAnimation, mapActions.toggleTimeSliderIsVisible, mapActions.setTimeStep, mapActions.setTimeSliderSpan, mapActions.toggleTimeSpanAuto, mapActions.setAnimationDelay, mapActions.toggleTimestepAuto, mapActions.setAnimationStartTime, mapActions.setAnimationEndTime, mapActions.changeOverlayer, uiActions.setActiveMapIdForDialog, uiActions.setToggleOpenDialog, genericActions.setBbox, mapActions.setBbox, mapActions.toggleClock, mapActions.toggleClockOptions, mapActions.setClockPositionSize, mapActions.setDockedLayerManagerSize, mapActions.setDockedLayerManagerPosition, mapActions.setDockedLayerManagerDimensions];
2054
+ var mapPresetChangeActions = [layerActions.setBaseLayers, layerActions.layerDelete, layerActions.addLayer, layerActions.duplicateMapLayer, layerActions.layerChangeEnabled, layerActions.layerChangeName, layerActions.layerChangeStyle, layerActions.layerChangeOpacity, layerActions.layerChangeDimension, layerActions.layerChangeAcceptanceTime, layerActions.SetLayerLegendVisibilityPayload, mapActions.layerMoveLayer, mapActions.setAutoLayerId, mapActions.setAutoTimestepLayerId, mapActions.setAutoUpdateLayerId, mapActions.toggleAutoUpdate, mapActions.mapStartAnimation, mapActions.mapStopAnimation, mapActions.toggleTimeSliderIsVisible, mapActions.setTimeStep, mapActions.setTimeSliderSpan, mapActions.toggleTimeSpanAuto, mapActions.setAnimationDelay, mapActions.toggleTimestepAuto, mapActions.setAnimationStartTime, mapActions.setAnimationEndTime, mapActions.changeOverlayer, uiActions.setActiveMapIdForDialog, uiActions.setToggleOpenDialog, genericActions.setBbox, mapActions.setBbox, mapActions.toggleClock, mapActions.toggleClockOptions, mapActions.setClockPositionSize, mapActions.setDockedLayerManagerSize, mapActions.setDockedLayerManagerPosition, mapActions.setDockedLayerManagerDimensions];
1669
2055
  var timeSeriesPresetChangeActions = [timeSeriesActions.addParameter, timeSeriesActions.addPlot, timeSeriesActions.deleteParameter, timeSeriesActions.deletePlot, timeSeriesActions.moveParameter, timeSeriesActions.movePlot, timeSeriesActions.toggleParameter, timeSeriesActions.togglePlot, timeSeriesActions.patchParameter, timeSeriesActions.updateTitle];
1670
2056
  var soundingsChangeActions = [soundingsActions.updateSelectedSource, soundingsActions.updateSelectedLocation, soundingsActions.updateSelectedTime, soundingsActions.updateDiagramType, soundingsActions.toggleLocationMarkers, soundingsActions.changeSoundingPanelOrder, soundingsActions.toggleSoundingPanelVisibility];
1671
- var supportedMapActionOrigins = [layerTypes.LayerActionOrigin.layerManager, layerTypes.LayerActionOrigin.wmsLoader, mapEnums.MapActionOrigin.map];
2057
+ var supportedMapActionOrigins = [layerTypes.LayerActionOrigin.layerManager, layerTypes.LayerActionOrigin.legend, layerTypes.LayerActionOrigin.wmsLoader, mapEnums.MapActionOrigin.map];
1672
2058
  var supportedTimeSeriesActionOrigins = [TimeSeriesTypes.TimeSeriesActionOrigin.timeSeriesManager, TimeSeriesTypes.TimeSeriesActionOrigin.timeSeriesSelect];
1673
2059
  var supportedSoundingsActionOrigins = [SoundingsTypes.SoundingsActionOrigin.soundingsComponent, SoundingsTypes.SoundingsActionOrigin.soundingsManager];
1674
2060
  var slice$1 = createSlice({
@@ -1968,6 +2354,7 @@ var slice$1 = createSlice({
1968
2354
  var entity = draft.entities[panelId];
1969
2355
  if (entity) {
1970
2356
  entity.hasChanges = false;
2357
+ entity.activeViewPresetId = '';
1971
2358
  viewPresetsAdapter.setOne(draft, entity);
1972
2359
  }
1973
2360
  });
@@ -1977,6 +2364,8 @@ var slice$1 = createSlice({
1977
2364
  if (entity) {
1978
2365
  // eslint-disable-next-line no-param-reassign
1979
2366
  entity.hasChanges = false;
2367
+ // eslint-disable-next-line no-param-reassign
2368
+ entity.activeViewPresetId = '';
1980
2369
  viewPresetsAdapter.setOne(draft, entity);
1981
2370
  }
1982
2371
  });
@@ -2030,9 +2419,15 @@ var slice$1 = createSlice({
2030
2419
  panelId = _action$payload17.panelId,
2031
2420
  origin = _action$payload17.origin;
2032
2421
  var isChangeOriginSupported = supportedTimeSeriesActionOrigins.includes(origin);
2033
- var changesRelevantProperties = timeSeriesPresetAction.type === timeSeriesActions.patchParameter.type ? Object.keys(action.payload.parameter).filter(function (key) {
2034
- return key !== 'id' && key !== 'instanceId';
2035
- }).length > 0 : true;
2422
+ var changesRelevantProperties = timeSeriesPresetAction.type === timeSeriesActions.patchParameter.type ? function () {
2423
+ var _ref = action.payload,
2424
+ parameter = _ref.parameter;
2425
+ var hasRelevantNonReferenceTimeChanges = Object.keys(parameter).filter(function (key) {
2426
+ return key !== 'id' && key !== 'instanceId';
2427
+ }).length > 0;
2428
+ var hasRelativeReferenceTimeChange = /^latest(?:-\d+)?$/.test(parameter.instanceId || '');
2429
+ return hasRelevantNonReferenceTimeChanges || hasRelativeReferenceTimeChange;
2430
+ }() : true;
2036
2431
  if (changesRelevantProperties && isChangeOriginSupported && panelId) {
2037
2432
  var entity = draft.entities[panelId];
2038
2433
  if (entity && !(entity != null && entity.hasChanges)) {
@@ -2079,6 +2474,7 @@ var viewPresetsReducer = slice$1.reducer,
2079
2474
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
2080
2475
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2081
2476
  * */
2477
+
2082
2478
  var getCleanSearchQuery = function getCleanSearchQuery(searchQuery) {
2083
2479
  return searchQuery.trim().split(/\s+/).join();
2084
2480
  };
@@ -2202,6 +2598,7 @@ var filterAndSortPresets = function filterAndSortPresets(presets, selectedFilter
2202
2598
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
2203
2599
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2204
2600
  * */
2601
+
2205
2602
  var getSnackbarMessage$1 = function getSnackbarMessage(action, title, is_shared) {
2206
2603
  // Trim and add quotes
2207
2604
  var trimmedTitle = title.trim();
@@ -2348,6 +2745,24 @@ var constructFilterParams = function constructFilterParams(filters, searchQuery)
2348
2745
  });
2349
2746
  };
2350
2747
 
2748
+ /* *
2749
+ * Licensed under the Apache License, Version 2.0 (the "License");
2750
+ * you may not use this file except in compliance with the License.
2751
+ * You may obtain a copy of the License at
2752
+ *
2753
+ * http://www.apache.org/licenses/LICENSE-2.0
2754
+ *
2755
+ * Unless required by applicable law or agreed to in writing, software
2756
+ * distributed under the License is distributed on an "AS IS" BASIS,
2757
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2758
+ * See the License for the specific language governing permissions and
2759
+ * limitations under the License.
2760
+ *
2761
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2762
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
2763
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2764
+ * */
2765
+
2351
2766
  var initialState = {
2352
2767
  id: '',
2353
2768
  title: '',
@@ -2386,6 +2801,7 @@ var slice = createSlice({
2386
2801
  });
2387
2802
  delete draft.views.byId[id];
2388
2803
  draft.hasChanges = true;
2804
+
2389
2805
  // Determine new viewType
2390
2806
  var firstViewId = draft.views.allIds[0];
2391
2807
  var viewComponentType = draft.views.byId[firstViewId] !== undefined ? draft.views.byId[firstViewId].componentType : '';
@@ -2399,6 +2815,7 @@ var slice = createSlice({
2399
2815
  updateWorkspaceViews: function updateWorkspaceViews(draft, action) {
2400
2816
  draft.mosaicNode = action.payload.mosaicNode;
2401
2817
  var mosaicViewIds = makeListOfViewIds(action.payload.mosaicNode);
2818
+
2402
2819
  /* Delete all view id's which are still in the redux state but not in the mosaic */
2403
2820
  draft.views.allIds.forEach(function (id) {
2404
2821
  if (!mosaicViewIds.includes(id)) {
@@ -2409,6 +2826,7 @@ var slice = createSlice({
2409
2826
  }
2410
2827
  });
2411
2828
  draft.hasChanges = true;
2829
+
2412
2830
  // Determine new viewType
2413
2831
  var firstViewId = draft.views.allIds[0];
2414
2832
  var viewComponentType = draft.views.byId[firstViewId] !== undefined ? draft.views.byId[firstViewId].componentType : '';
@@ -2450,6 +2868,7 @@ var slice = createSlice({
2450
2868
  return draft;
2451
2869
  }
2452
2870
  var newViews = cloneDeep(action.payload.workspacePreset.views);
2871
+
2453
2872
  // check if any viewIds are duplicate within the selected preset
2454
2873
  var duplicateIdWithinPreset = newViews.allIds.filter(function (item, index) {
2455
2874
  return newViews.allIds.indexOf(item) !== index;
@@ -2563,14 +2982,22 @@ var slice = createSlice({
2563
2982
  extraReducers: function extraReducers(builder) {
2564
2983
  builder.addCase(workspaceListActions.onSuccessWorkspacePresetAction, function (draft, action) {
2565
2984
  if (action.payload.action === WorkspacePresetAction.SAVE_AS || action.payload.action === WorkspacePresetAction.SAVE_SYSTEM_PRESET || action.payload.action === WorkspacePresetAction.SAVE_SYSTEM_PRESET_AS || action.payload.action === WorkspacePresetAction.SAVE) {
2985
+ var scope = action.payload.scope || 'user';
2986
+ var username = 'username' in action.payload && typeof action.payload.username === 'string' ? action.payload.username : undefined;
2566
2987
  draft.id = action.payload.workspaceId;
2567
2988
  draft.title = action.payload.title;
2568
2989
  draft["abstract"] = action.payload["abstract"];
2569
2990
  draft.description = action.payload.description;
2570
2991
  draft.labels = action.payload.labels;
2571
2992
  draft.hasChanges = false;
2572
- draft.scope = action.payload.scope || 'user';
2573
- draft.username = 'username' in action.payload && typeof action.payload.username === 'string' ? action.payload.username : undefined;
2993
+ draft.scope = scope;
2994
+ draft.username = username;
2995
+
2996
+ // Update all views to contain the correct username and scope
2997
+ draft.views.allIds.forEach(function (viewId) {
2998
+ draft.views.byId[viewId].scope = scope;
2999
+ draft.views.byId[viewId].username = username;
3000
+ });
2574
3001
  }
2575
3002
  if ((action.payload.action === WorkspacePresetAction.EDIT || action.payload.action === WorkspacePresetAction.EDIT_TITLE) && action.payload.workspaceId === draft.id) {
2576
3003
  var _draft$views;
@@ -2621,7 +3048,8 @@ var slice = createSlice({
2621
3048
  presetAction = _action$payload5.action,
2622
3049
  scope = _action$payload5.scope,
2623
3050
  _abstract = _action$payload5["abstract"],
2624
- labels = _action$payload5.labels;
3051
+ labels = _action$payload5.labels,
3052
+ username = _action$payload5.username;
2625
3053
  // If preset is not the active/selected one
2626
3054
  var shouldSkipInactivePresetUpdate = activeViewPresetId !== undefined && activeViewPresetId !== action.payload.viewPresetId && (presetAction === PresetAction.EDIT || presetAction === PresetAction.SHARE || presetAction === PresetAction.SAVE_AS && action.payload.shouldSetActiveViewPreset === false);
2627
3055
  if (shouldSkipInactivePresetUpdate) {
@@ -2634,6 +3062,7 @@ var slice = createSlice({
2634
3062
  entity["abstract"] = _abstract;
2635
3063
  entity.description = action.payload.description;
2636
3064
  entity.labels = labels;
3065
+ entity.username = username;
2637
3066
  }
2638
3067
  });
2639
3068
  workspacePresetChangeActions.map(function (action) {
@@ -2644,16 +3073,18 @@ var slice = createSlice({
2644
3073
  var isUserOrigin = isSyncGroupAction && ((_payload$payload2 = payload.payload) == null ? void 0 : _payload$payload2.origin) === 'user';
2645
3074
  var hasChanges = !isResetViewPreset && !isSyncGroupAction || isUserOrigin;
2646
3075
  draft.hasChanges = hasChanges;
3076
+
2647
3077
  // reset title and scope when setting empty activeViewPresetId
2648
3078
  if (action.type === viewPresetActions.setActiveViewPresetId.type) {
2649
- var _payload$payload3 = payload.payload,
2650
- panelId = _payload$payload3.panelId,
2651
- viewPresetId = _payload$payload3.viewPresetId;
3079
+ var _ref = payload.payload,
3080
+ panelId = _ref.panelId,
3081
+ viewPresetId = _ref.viewPresetId;
2652
3082
  var entity = draft.views.byId[panelId];
2653
3083
  if (entity && viewPresetId === '') {
2654
3084
  entity.title = '';
2655
3085
  entity.scope = 'system';
2656
3086
  entity["abstract"] = '';
3087
+ entity.username = '';
2657
3088
  entity.labels = undefined;
2658
3089
  }
2659
3090
  }
@@ -2681,6 +3112,7 @@ var workspaceActions = Object.assign({}, slice.actions);
2681
3112
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
2682
3113
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2683
3114
  * */
3115
+
2684
3116
  var getSnackbarMessage = function getSnackbarMessage(action, title, is_shared) {
2685
3117
  // Trim and add quotes
2686
3118
  var trimmedTitle = title.trim();
@@ -2761,7 +3193,8 @@ var emptyViewPreset = function emptyViewPreset(componentType) {
2761
3193
  HarmonieTempAndPrecipPreset: undefined,
2762
3194
  TimeSlider: undefined,
2763
3195
  WarningList: undefined,
2764
- MaritimeWarnings: undefined
3196
+ MaritimeWarnings: undefined,
3197
+ WarningsTimeline: undefined
2765
3198
  };
2766
3199
  return {
2767
3200
  componentType: actualComponentType,
@@ -2789,10 +3222,12 @@ var emptyViewPreset = function emptyViewPreset(componentType) {
2789
3222
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
2790
3223
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2791
3224
  * */
3225
+
2792
3226
  var getWorkspaceState = function getWorkspaceState(store) {
2793
3227
  var _store$workspace;
2794
3228
  return (_store$workspace = store == null ? void 0 : store.workspace) != null ? _store$workspace : initialState;
2795
3229
  };
3230
+
2796
3231
  /**
2797
3232
  * Gets component types from the views used in the workspace
2798
3233
  *
@@ -2809,6 +3244,7 @@ var getComponentTypesFromActiveViews = createSelector([function (state) {
2809
3244
  });
2810
3245
  return componentTypes;
2811
3246
  });
3247
+
2812
3248
  /**
2813
3249
  * Gets mosaicNode from workspace state
2814
3250
  *
@@ -2822,6 +3258,7 @@ var getWorkspaceId = function getWorkspaceId(store) {
2822
3258
  var _getWorkspaceState;
2823
3259
  return (_getWorkspaceState = getWorkspaceState(store)) == null ? void 0 : _getWorkspaceState.id;
2824
3260
  };
3261
+
2825
3262
  /**
2826
3263
  * Gets view from workspace state
2827
3264
  *
@@ -2838,6 +3275,7 @@ var getViewById = createSelector(getWorkspaceState, function (store, viewId) {
2838
3275
  var getViewsById = createSelector(getWorkspaceState, function (store) {
2839
3276
  return store.views.byId;
2840
3277
  });
3278
+
2841
3279
  /**
2842
3280
  * Gets all view ids
2843
3281
  *
@@ -2847,6 +3285,7 @@ var getViewsById = createSelector(getWorkspaceState, function (store) {
2847
3285
  var getViewIds = createSelector(getWorkspaceState, function (store) {
2848
3286
  return store.views.allIds || [];
2849
3287
  }, selectorMemoizationOptions);
3288
+
2850
3289
  /**
2851
3290
  * Gets getShouldPreventClose from workspace state
2852
3291
  *
@@ -2878,6 +3317,7 @@ var hasWorkspaceChanges = createSelector(getWorkspaceState, function (store) {
2878
3317
  var _store$hasChanges;
2879
3318
  return (_store$hasChanges = store == null ? void 0 : store.hasChanges) != null ? _store$hasChanges : false;
2880
3319
  }, selectorMemoizationOptions);
3320
+
2881
3321
  /**
2882
3322
  * Gets selected viewType
2883
3323
  *
@@ -2888,6 +3328,7 @@ var getViewType = createSelector(getWorkspaceState, function (store) {
2888
3328
  var _store$viewType;
2889
3329
  return (_store$viewType = store == null ? void 0 : store.viewType) != null ? _store$viewType : '';
2890
3330
  }, selectorMemoizationOptions);
3331
+
2891
3332
  /**
2892
3333
  * Gets selected workspace scope
2893
3334
  *
@@ -2898,6 +3339,7 @@ var getSelectedWorkspaceScope = createSelector(getWorkspaceState, function (stor
2898
3339
  var _store$scope;
2899
3340
  return (_store$scope = store == null ? void 0 : store.scope) != null ? _store$scope : 'system';
2900
3341
  }, selectorMemoizationOptions);
3342
+
2901
3343
  /**
2902
3344
  * Gets workspace data to send to the backend
2903
3345
  *
@@ -2941,8 +3383,8 @@ var getWorkspaceData = createSelector(getWorkspaceState, genericSelectors.getSyn
2941
3383
  };
2942
3384
  }, selectorMemoizationOptions);
2943
3385
  var getViewComponentType = createSelector(getViewById, function (store) {
2944
- var _store$componentType;
2945
- return (_store$componentType = store == null ? void 0 : store.componentType) != null ? _store$componentType : 'Map';
3386
+ var _ref;
3387
+ return (_ref = store == null ? void 0 : store.componentType) != null ? _ref : 'Map';
2946
3388
  }, selectorMemoizationOptions);
2947
3389
  var getViewPresetToSendToBackend = createSelector(getViewById, getViewComponentType, mapSelectors.getMapPreset, syncGroupsSelectors.getAllTargetGroupsForSource, timeSeriesSelectors.getTimeSeriesPreset, publicWarningsSelectors.getWarningsPresetById, mapSelectors.getMultiMapInitialProps, mapSelectors.getTimeSliderInitialProps, function (store, panelId) {
2948
3390
  return soundingsSelectors.getSoundingsPreset(store, panelId);
@@ -2968,6 +3410,7 @@ var getViewPresetToSendToBackend = createSelector(getViewById, getViewComponentT
2968
3410
  Map: defaultInitialProps,
2969
3411
  TimeSeries: timeSeriesPreset,
2970
3412
  WarningList: warningsPreset,
3413
+ WarningsTimeline: warningsPreset,
2971
3414
  MultiMap: multiMapPreset != null ? multiMapPreset : defaultInitialProps,
2972
3415
  HarmonieTempAndPrecipPreset: harmonieProps != null && harmonieProps.layers ? {
2973
3416
  layers: harmonieProps.layers
@@ -3021,6 +3464,7 @@ var selectors$2 = /*#__PURE__*/Object.freeze({
3021
3464
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
3022
3465
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3023
3466
  * */
3467
+
3024
3468
  var getViewPresetsStore = function getViewPresetsStore(store) {
3025
3469
  if (store != null && store.viewPresets) {
3026
3470
  return store.viewPresets;
@@ -3099,6 +3543,7 @@ var getViewPresetListFiltersForView = createSelector(getViewPresetById, function
3099
3543
  });
3100
3544
  });
3101
3545
  }
3546
+
3102
3547
  // Regular users
3103
3548
  return filters.map(function (filter) {
3104
3549
  return Object.assign({}, filter, {
@@ -3111,6 +3556,7 @@ var getViewPresetListSearchQueryForView = createSelector(getViewPresetById, func
3111
3556
  }, function (viewPreset) {
3112
3557
  return (viewPreset == null ? void 0 : viewPreset.searchQuery) || '';
3113
3558
  }, selectorMemoizationOptions);
3559
+
3114
3560
  // Used to retrieve the filtered view preset list for your view - if no filters/search applied it will be empty
3115
3561
  // To ensure you retrieve the view preset list specific for your view (incl and excl filters), use getFilteredViewPresetListForView
3116
3562
  createSelector(getViewPresetById, function (viewPresetById) {
@@ -3141,17 +3587,51 @@ var getViewPresetLabelFilters = createSelector(getViewPresetById, function (_sto
3141
3587
  * Copyright 2025 - Finnish Meteorological Institute (FMI)
3142
3588
  * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
3143
3589
  * */
3590
+
3144
3591
  var ERROR_NOT_FOUND = 'Request failed with status code 400';
3145
3592
 
3593
+ /* *
3594
+ * Licensed under the Apache License, Version 2.0 (the "License");
3595
+ * you may not use this file except in compliance with the License.
3596
+ * You may obtain a copy of the License at
3597
+ *
3598
+ * http://www.apache.org/licenses/LICENSE-2.0
3599
+ *
3600
+ * Unless required by applicable law or agreed to in writing, software
3601
+ * distributed under the License is distributed on an "AS IS" BASIS,
3602
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3603
+ * See the License for the specific language governing permissions and
3604
+ * limitations under the License.
3605
+ *
3606
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3607
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
3608
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
3609
+ * */
3610
+
3611
+ var LABELS_CONFIG_DEFAULT = {
3612
+ purpose: ['Aviation', 'Monitor', 'Public', 'Maritime', 'Warning', 'Media', 'Nowcasting (0–12h)'],
3613
+ parameters: ['Pressure', 'Temperature', 'Wind', 'Humidity', 'Water vapour', 'Visibility', 'Geopotential', 'Snow', 'Cloud', 'Waves', 'Index', 'Precipitation'],
3614
+ phenomena: ['Turbulence', 'MTW', 'CAT', 'Icing', 'Freezing rain', 'FlashFlood', 'Wind gust', 'Rain', 'Snow', 'Road ice', 'Lightning strike', 'Drifting snow', 'Wave height + water level', 'Forest fire', 'Polar Low', 'Heat wave', 'Gale warning'],
3615
+ viewType: [].concat(ALL_COMPONENT_TYPES),
3616
+ dataType: ['observation', 'forecast', 'archive'],
3617
+ dataSource: ['Meps', 'Arome Arctic', 'Ecmwf', 'Ensemble', 'AIFS', 'BRIS', 'radar', 'satellite', 'synop']
3618
+ };
3619
+
3146
3620
  var getWorkspaceLabelsConfig = /*#__PURE__*/function () {
3147
3621
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(auth) {
3148
3622
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3149
3623
  while (1) switch (_context.prev = _context.next) {
3150
3624
  case 0:
3625
+ if (!hasNoPresetBackend()) {
3626
+ _context.next = 2;
3627
+ break;
3628
+ }
3629
+ return _context.abrupt("return", LABELS_CONFIG_DEFAULT);
3630
+ case 2:
3151
3631
  return _context.abrupt("return", fetch(getPresetBaseUrl() + "/workspace-labels-config", {
3152
3632
  headers: getHeaders(auth)
3153
3633
  }).then(handleResponse));
3154
- case 1:
3634
+ case 3:
3155
3635
  case "end":
3156
3636
  return _context.stop();
3157
3637
  }
@@ -3166,10 +3646,16 @@ var getWorkspacePreset = /*#__PURE__*/function () {
3166
3646
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3167
3647
  while (1) switch (_context2.prev = _context2.next) {
3168
3648
  case 0:
3649
+ if (!hasNoPresetBackend()) {
3650
+ _context2.next = 2;
3651
+ break;
3652
+ }
3653
+ return _context2.abrupt("return", extractWorkspacePresetFromJSON(workspaceId));
3654
+ case 2:
3169
3655
  return _context2.abrupt("return", fetch(getPresetBaseUrl() + "/workspacepreset/" + workspaceId, {
3170
3656
  headers: getHeaders(auth)
3171
3657
  }).then(handleResponse));
3172
- case 1:
3658
+ case 3:
3173
3659
  case "end":
3174
3660
  return _context2.stop();
3175
3661
  }
@@ -3185,6 +3671,12 @@ var getWorkspacePresets = /*#__PURE__*/function () {
3185
3671
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3186
3672
  while (1) switch (_context3.prev = _context3.next) {
3187
3673
  case 0:
3674
+ if (!hasNoPresetBackend()) {
3675
+ _context3.next = 2;
3676
+ break;
3677
+ }
3678
+ return _context3.abrupt("return", filterWorkspacePresetList(params));
3679
+ case 2:
3188
3680
  presetsUrl = getPresetBaseUrl() + "/workspacepreset";
3189
3681
  searchParams = new URLSearchParams();
3190
3682
  if (params) {
@@ -3201,7 +3693,7 @@ var getWorkspacePresets = /*#__PURE__*/function () {
3201
3693
  return _context3.abrupt("return", fetch(url, {
3202
3694
  headers: getHeaders(auth)
3203
3695
  }).then(handleResponse));
3204
- case 6:
3696
+ case 8:
3205
3697
  case "end":
3206
3698
  return _context3.stop();
3207
3699
  }
@@ -3216,10 +3708,16 @@ var getWorkspace = /*#__PURE__*/function () {
3216
3708
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3217
3709
  while (1) switch (_context4.prev = _context4.next) {
3218
3710
  case 0:
3711
+ if (!hasNoPresetBackend()) {
3712
+ _context4.next = 2;
3713
+ break;
3714
+ }
3715
+ return _context4.abrupt("return", extractWorkspacePresetFromJSON(workspaceId));
3716
+ case 2:
3219
3717
  return _context4.abrupt("return", fetch(getPresetBaseUrl() + "/workspacepreset/" + workspaceId, {
3220
3718
  headers: getHeaders(auth)
3221
3719
  }).then(handleResponse));
3222
- case 1:
3720
+ case 3:
3223
3721
  case "end":
3224
3722
  return _context4.stop();
3225
3723
  }
@@ -3469,6 +3967,7 @@ var workspaceQueryOptions = {
3469
3967
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
3470
3968
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3471
3969
  * */
3970
+
3472
3971
  var getWorkspaceListStore = function getWorkspaceListStore(store) {
3473
3972
  if (store != null && store.workspaceList) {
3474
3973
  return store.workspaceList;
@@ -3557,6 +4056,7 @@ var getWorkspaceListFilters = createSelector(function (store) {
3557
4056
  });
3558
4057
  });
3559
4058
  }
4059
+
3560
4060
  // Regular users: return all filters
3561
4061
  return filters.map(function (filter) {
3562
4062
  return Object.assign({}, filter, {
@@ -3613,6 +4113,7 @@ workspaceListListener.startListening({
3613
4113
  url: getWorkspaceRouteUrl()
3614
4114
  }));
3615
4115
  }
4116
+
3616
4117
  // For Save as, update url to include the new id
3617
4118
  if (action === WorkspacePresetAction.SAVE_AS) {
3618
4119
  listenerApi.dispatch(routerActions.navigateToUrl({
@@ -3651,6 +4152,7 @@ workspaceListListener.startListening({
3651
4152
  if (presetAction === WorkspacePresetAction.DUPLICATE) ;
3652
4153
  // delete
3653
4154
  if (presetAction === WorkspacePresetAction.DELETE || presetAction === WorkspacePresetAction.DELETE_SYSTEM_PRESET) ;
4155
+
3654
4156
  // edit
3655
4157
  if (!(presetAction === WorkspacePresetAction.EDIT)) {
3656
4158
  _context2.next = 19;
@@ -3867,7 +4369,7 @@ workspaceListener.startListening({
3867
4369
  actionCreator: mapActions.registerMap,
3868
4370
  effect: function () {
3869
4371
  var _effect = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, listenerApi) {
3870
- var payload, mapId, viewType, _workspaceState$views, _workspaceState$views2, workspaceState, mapPresetId;
4372
+ var payload, mapId, viewType, _mapId$id, _mapId, workspaceState, mapPresetId;
3871
4373
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3872
4374
  while (1) switch (_context.prev = _context.next) {
3873
4375
  case 0:
@@ -3876,7 +4378,7 @@ workspaceListener.startListening({
3876
4378
  viewType = getViewType(listenerApi.getState());
3877
4379
  if (viewType === 'tiledWindow') {
3878
4380
  workspaceState = getWorkspaceState(listenerApi.getState()); // if it can't find the id, it's a view with multiple maps
3879
- mapPresetId = (_workspaceState$views = (_workspaceState$views2 = workspaceState.views.byId[mapId]) == null ? void 0 : _workspaceState$views2.id) != null ? _workspaceState$views : workspaceState.views.byId[workspaceState.views.allIds[0]].id;
4381
+ mapPresetId = (_mapId$id = (_mapId = workspaceState.views.byId[mapId]) == null ? void 0 : _mapId.id) != null ? _mapId$id : workspaceState.views.byId[workspaceState.views.allIds[0]].id;
3880
4382
  listenerApi.dispatch(viewPresetActions.registerViewPreset({
3881
4383
  panelId: mapId,
3882
4384
  viewPresetId: mapPresetId
@@ -3935,6 +4437,7 @@ workspaceListener.startListening({
3935
4437
  // Cancel any in-progress instances of this listener
3936
4438
  listenerApi.cancelActiveListeners();
3937
4439
  // Unmount old components before changing workspace preset
4440
+
3938
4441
  // Check state BEFORE reducer ran - if there was a workspace,
3939
4442
  // wait for React to unmount old components before setting up new ones
3940
4443
  originalMosaicNode = (_listenerApi$getOrigi = listenerApi.getOriginalState().workspace) == null ? void 0 : _listenerApi$getOrigi.mosaicNode;
@@ -3963,12 +4466,12 @@ workspaceListener.startListening({
3963
4466
  _context4.next = 17;
3964
4467
  return Promise.all(views.map(/*#__PURE__*/function () {
3965
4468
  var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(view) {
3966
- var _view$initialProps$sy, _view$initialProps;
4469
+ var _syncGroupsIds, _view$initialProps;
3967
4470
  var syncGroupsIds;
3968
4471
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3969
4472
  while (1) switch (_context3.prev = _context3.next) {
3970
4473
  case 0:
3971
- syncGroupsIds = (_view$initialProps$sy = (_view$initialProps = view.initialProps) == null ? void 0 : _view$initialProps.syncGroupsIds) != null ? _view$initialProps$sy : [];
4474
+ syncGroupsIds = (_syncGroupsIds = (_view$initialProps = view.initialProps) == null ? void 0 : _view$initialProps.syncGroupsIds) != null ? _syncGroupsIds : [];
3972
4475
  if (!(!syncGroupsIds.length || !view.mosaicNodeId)) {
3973
4476
  _context3.next = 3;
3974
4477
  break;
@@ -4034,6 +4537,7 @@ var fetchWorkspaceViewPreset = /*#__PURE__*/function () {
4034
4537
  mosaicNodeId: mosaicNodeId,
4035
4538
  viewPreset: getViewPresetState(viewPresetId, mosaicNodeId, 'loading')
4036
4539
  }));
4540
+
4037
4541
  // fetch view
4038
4542
  _context5.next = 4;
4039
4543
  return getQueryClient().fetchQuery(viewpresetQueryOptions.getViewPreset(viewPresetId, credentials));
@@ -4044,6 +4548,7 @@ var fetchWorkspaceViewPreset = /*#__PURE__*/function () {
4044
4548
  viewPresetId: data.id,
4045
4549
  panelId: mosaicNodeId
4046
4550
  }));
4551
+
4047
4552
  // sync all connected syncgroups of viewPreset to the store
4048
4553
  syncGroupIds = ((_data$initialProps = data.initialProps) == null ? void 0 : _data$initialProps.syncGroupsIds) || [];
4049
4554
  if (syncGroupIds != null && syncGroupIds.length) {
@@ -4055,6 +4560,7 @@ var fetchWorkspaceViewPreset = /*#__PURE__*/function () {
4055
4560
  }));
4056
4561
  });
4057
4562
  }
4563
+
4058
4564
  // update view with fetched data
4059
4565
  if (data) {
4060
4566
  dispatch(workspaceActions.updateWorkspaceView({
@@ -4128,6 +4634,7 @@ workspaceListener.startListening({
4128
4634
  listenerApi.dispatch(workspaceListActions.toggleWorkspaceDialog({
4129
4635
  isWorkspaceListDialogOpen: false
4130
4636
  }));
4637
+
4131
4638
  // fetch workspace
4132
4639
  _context9.next = 9;
4133
4640
  return getQueryClient().fetchQuery(workspaceQueryOptions.getWorkspacePreset(workspaceId, common == null || (_common$auth = common.auth) == null ? void 0 : _common$auth.credentials));
@@ -4143,6 +4650,7 @@ workspaceListener.startListening({
4143
4650
  workspaceId: workspaceId,
4144
4651
  workspace: workspaceData
4145
4652
  }));
4653
+
4146
4654
  // show all views inside a workspace as loading
4147
4655
  fullLoadingWorkspace = getLoadingWorkspace(workspaceData);
4148
4656
  listenerApi.dispatch(workspaceActions.changePreset({
@@ -4318,13 +4826,13 @@ workspaceListener.startListening({
4318
4826
  }()
4319
4827
  });
4320
4828
  var generateInitialProps = function generateInitialProps(componentType, originalInitialProps, copyOriginalcontent) {
4321
- var _originalInitialProps;
4829
+ var _mapPreset;
4322
4830
  // If we are copying the original content, use that
4323
4831
  if (copyOriginalcontent) {
4324
4832
  return originalInitialProps;
4325
4833
  }
4326
4834
  // Add a new map, copy over the bbox and srs if present
4327
- if (componentType === 'Map' && originalInitialProps != null && (_originalInitialProps = originalInitialProps.mapPreset) != null && (_originalInitialProps = _originalInitialProps.proj) != null && _originalInitialProps.bbox.bottom) {
4835
+ if (componentType === 'Map' && originalInitialProps != null && (_mapPreset = originalInitialProps.mapPreset) != null && (_mapPreset = _mapPreset.proj) != null && _mapPreset.bbox.bottom) {
4328
4836
  var proj = originalInitialProps.mapPreset.proj;
4329
4837
  return {
4330
4838
  mapPreset: {
@@ -4350,7 +4858,7 @@ workspaceListener.startListening({
4350
4858
  actionCreator: workspaceActions.setNewWorkspaceView,
4351
4859
  effect: function () {
4352
4860
  var _effect8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_ref0, listenerApi) {
4353
- var _getViewPresetToSendT, _initialProps$mapPres;
4861
+ var _getViewPresetToSendT, _mapPreset2;
4354
4862
  var payload, mosaicNodeId, componentType, newId, copyOriginalcontent, originalInitialProps, initialProps;
4355
4863
  return _regeneratorRuntime().wrap(function _callee10$(_context10) {
4356
4864
  while (1) switch (_context10.prev = _context10.next) {
@@ -4361,6 +4869,7 @@ workspaceListener.startListening({
4361
4869
  // TODO: this would be nice to move into the openlayers store
4362
4870
  createViewObjectForNewMap(mosaicNodeId, newId);
4363
4871
  }
4872
+
4364
4873
  // Construct new initialProps from original preset if needed
4365
4874
  originalInitialProps = (_getViewPresetToSendT = getViewPresetToSendToBackend(listenerApi.getState(), mosaicNodeId, true).initialProps) != null ? _getViewPresetToSendT : {};
4366
4875
  initialProps = generateInitialProps(componentType, originalInitialProps, copyOriginalcontent);
@@ -4378,8 +4887,9 @@ workspaceListener.startListening({
4378
4887
  }));
4379
4888
  });
4380
4889
  }
4890
+
4381
4891
  // Update map to use all dimensions as set in original map
4382
- if (componentType === 'Map' && (_initialProps$mapPres = initialProps.mapPreset) != null && _initialProps$mapPres.dimensions) {
4892
+ if (componentType === 'Map' && (_mapPreset2 = initialProps.mapPreset) != null && _mapPreset2.dimensions) {
4383
4893
  listenerApi.dispatch(mapActions.mapUpdateAllMapDimensions({
4384
4894
  mapId: newId,
4385
4895
  dimensions: initialProps.mapPreset.dimensions,
@@ -4538,11 +5048,13 @@ var saveViewPresetEffect = /*#__PURE__*/function () {
4538
5048
  return _ref2.apply(this, arguments);
4539
5049
  };
4540
5050
  }();
5051
+
4541
5052
  // save view preset
4542
5053
  viewPresetsListener.startListening({
4543
5054
  actionCreator: viewPresetActions.saveViewPreset,
4544
5055
  effect: saveViewPresetEffect
4545
5056
  });
5057
+
4546
5058
  // select view preset
4547
5059
  viewPresetsListener.startListening({
4548
5060
  actionCreator: viewPresetActions.selectViewPreset,
@@ -4561,6 +5073,7 @@ viewPresetsListener.startListening({
4561
5073
  mapId: panelId
4562
5074
  }));
4563
5075
  }
5076
+
4564
5077
  // fetch existing map preset selected
4565
5078
  if (viewPresetId !== '') {
4566
5079
  listenerApi.dispatch(workspaceActions.fetchWorkspaceViewPreset({
@@ -4573,6 +5086,7 @@ viewPresetsListener.startListening({
4573
5086
  mapId: panelId,
4574
5087
  initialProps: emptyViewPreset('Map').initialProps
4575
5088
  }));
5089
+
4576
5090
  // update workspace with new empy view map
4577
5091
  listenerApi.dispatch(workspaceActions.updateWorkspaceView({
4578
5092
  viewPreset: emptyViewPreset('Map'),
@@ -4596,6 +5110,7 @@ viewPresetsListener.startListening({
4596
5110
  return effect;
4597
5111
  }()
4598
5112
  });
5113
+
4599
5114
  // success view preset
4600
5115
  viewPresetsListener.startListening({
4601
5116
  actionCreator: viewPresetActions.onSuccessViewPresetAction,
@@ -4680,6 +5195,7 @@ viewPresetsListener.startListening({
4680
5195
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4681
5196
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4682
5197
  * */
5198
+
4683
5199
  var workspaceReducersMap = {
4684
5200
  webmap: mapReducer,
4685
5201
  services: serviceReducer,
@@ -4723,6 +5239,7 @@ var createMockStore = function createMockStore(mockState) {
4723
5239
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4724
5240
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4725
5241
  * */
5242
+
4726
5243
  var WORKSPACE_NAMESPACE = 'workspace';
4727
5244
  var initWorkspaceTestI18n = function initWorkspaceTestI18n() {
4728
5245
  safelyInitI18nForTestsAndStories(i18n, WORKSPACE_NAMESPACE, [{
@@ -4754,15 +5271,15 @@ var WorkspaceThemeProvider = function WorkspaceThemeProvider(_ref) {
4754
5271
  var children = _ref.children,
4755
5272
  _ref$theme = _ref.theme,
4756
5273
  theme = _ref$theme === void 0 ? lightTheme : _ref$theme;
4757
- return jsx(ThemeWrapper, {
5274
+ return /*#__PURE__*/jsx(ThemeWrapper, {
4758
5275
  theme: theme,
4759
5276
  children: children
4760
5277
  });
4761
5278
  };
4762
5279
  var DemoWrapper = function DemoWrapper(_ref2) {
4763
5280
  var props = Object.assign({}, (_objectDestructuringEmpty(_ref2), _ref2));
4764
- return jsx(WorkspaceI18nProvider, {
4765
- children: jsx(WorkspaceThemeProvider, Object.assign({}, props))
5281
+ return /*#__PURE__*/jsx(WorkspaceI18nProvider, {
5282
+ children: /*#__PURE__*/jsx(WorkspaceThemeProvider, Object.assign({}, props))
4766
5283
  });
4767
5284
  };
4768
5285
  var defaultAuthConfig = {
@@ -4780,6 +5297,7 @@ var defaultAuthConfig = {
4780
5297
  },
4781
5298
  sessionStorageProvider: null
4782
5299
  };
5300
+
4783
5301
  // wrapper without theme and i18n
4784
5302
  var WorkspaceStoreWrapper = function WorkspaceStoreWrapper(_ref3) {
4785
5303
  var children = _ref3.children,
@@ -4787,14 +5305,14 @@ var WorkspaceStoreWrapper = function WorkspaceStoreWrapper(_ref3) {
4787
5305
  store = _ref3$store === void 0 ? createMockStore() : _ref3$store,
4788
5306
  _ref3$auth = _ref3.auth,
4789
5307
  auth = _ref3$auth === void 0 ? defaultAuthConfig : _ref3$auth;
4790
- return jsx(AuthenticationProvider, {
5308
+ return /*#__PURE__*/jsx(AuthenticationProvider, {
4791
5309
  value: auth,
4792
- children: jsx(QueryClientProviderWrapper, {
5310
+ children: /*#__PURE__*/jsx(QueryClientProviderWrapper, {
4793
5311
  mode: "test",
4794
- children: jsx(Provider, {
5312
+ children: /*#__PURE__*/jsx(Provider, {
4795
5313
  store: store,
4796
- children: jsx(SnackbarWrapperConnect, {
4797
- children: jsx(ConfirmationServiceProvider, {
5314
+ children: /*#__PURE__*/jsx(SnackbarWrapperConnect, {
5315
+ children: /*#__PURE__*/jsx(ConfirmationServiceProvider, {
4798
5316
  children: children
4799
5317
  })
4800
5318
  })
@@ -4809,10 +5327,10 @@ var WorkspaceWrapperProviderWithStore = function WorkspaceWrapperProviderWithSto
4809
5327
  theme = _ref4.theme,
4810
5328
  _ref4$auth = _ref4.auth,
4811
5329
  auth = _ref4$auth === void 0 ? defaultAuthConfig : _ref4$auth;
4812
- return jsx(WorkspaceThemeProvider, {
5330
+ return /*#__PURE__*/jsx(WorkspaceThemeProvider, {
4813
5331
  theme: theme,
4814
- children: jsx(WorkspaceI18nProvider, {
4815
- children: jsx(WorkspaceStoreWrapper, {
5332
+ children: /*#__PURE__*/jsx(WorkspaceI18nProvider, {
5333
+ children: /*#__PURE__*/jsx(WorkspaceStoreWrapper, {
4816
5334
  auth: auth,
4817
5335
  store: store,
4818
5336
  children: children
@@ -4823,7 +5341,7 @@ var WorkspaceWrapperProviderWithStore = function WorkspaceWrapperProviderWithSto
4823
5341
  var WorkspaceI18nProvider = function WorkspaceI18nProvider(_ref5) {
4824
5342
  var children = _ref5.children;
4825
5343
  initWorkspaceTestI18n();
4826
- return jsx(I18nextProvider, {
5344
+ return /*#__PURE__*/jsx(I18nextProvider, {
4827
5345
  i18n: i18n,
4828
5346
  children: children
4829
5347
  });
@@ -4844,7 +5362,7 @@ var ComponentsLookUpWrapper = function ComponentsLookUpWrapper(_ref) {
4844
5362
  shouldPreventClose: shouldPreventClose
4845
5363
  }));
4846
5364
  }, [dispatch, viewId]);
4847
- return jsx(RenderComponent, Object.assign({
5365
+ return /*#__PURE__*/jsx(RenderComponent, Object.assign({
4848
5366
  onPreventCloseView: togglePreventClose
4849
5367
  }, props));
4850
5368
  };
@@ -4866,6 +5384,7 @@ var ComponentsLookUpWrapper = function ComponentsLookUpWrapper(_ref) {
4866
5384
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4867
5385
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4868
5386
  * */
5387
+
4869
5388
  var getUniqueId = function getUniqueId(existingIds, count) {
4870
5389
  if (count === void 0) {
4871
5390
  count = 1;
@@ -4886,6 +5405,7 @@ var closeDialogsWhenChangingPreset = function closeDialogsWhenChangingPreset(com
4886
5405
  })) {
4887
5406
  return;
4888
5407
  }
5408
+
4889
5409
  // Close all dialogs related to timeseries
4890
5410
  if (!componentTypes.some(function (componentType) {
4891
5411
  return componentType.toLowerCase().includes('timeseries');
@@ -4907,6 +5427,7 @@ var closeDialogsWhenChangingPreset = function closeDialogsWhenChangingPreset(com
4907
5427
  type: uiTypes.DialogTypes.TimeSeriesLocationInfo
4908
5428
  }));
4909
5429
  }
5430
+
4910
5431
  // Close all dialogs related to soundings
4911
5432
  if (!componentTypes.some(function (componentType) {
4912
5433
  return componentType.toLowerCase().includes('soundings');
@@ -4920,6 +5441,7 @@ var closeDialogsWhenChangingPreset = function closeDialogsWhenChangingPreset(com
4920
5441
  type: uiTypes.DialogTypes.SoundingsSources
4921
5442
  }));
4922
5443
  }
5444
+
4923
5445
  // Close dialogs related to the warninglist
4924
5446
  if (!componentTypes.some(function (componentType) {
4925
5447
  return componentType.toLowerCase().includes('warninglist');
@@ -4933,6 +5455,24 @@ var closeDialogsWhenChangingPreset = function closeDialogsWhenChangingPreset(com
4933
5455
  }
4934
5456
  };
4935
5457
 
5458
+ /* *
5459
+ * Licensed under the Apache License, Version 2.0 (the "License");
5460
+ * you may not use this file except in compliance with the License.
5461
+ * You may obtain a copy of the License at
5462
+ *
5463
+ * http://www.apache.org/licenses/LICENSE-2.0
5464
+ *
5465
+ * Unless required by applicable law or agreed to in writing, software
5466
+ * distributed under the License is distributed on an "AS IS" BASIS,
5467
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5468
+ * See the License for the specific language governing permissions and
5469
+ * limitations under the License.
5470
+ *
5471
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5472
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
5473
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5474
+ * */
5475
+
4936
5476
  var LinkMenuConnect = function LinkMenuConnect(_ref) {
4937
5477
  var panelId = _ref.panelId;
4938
5478
  var dispatch = useDispatch();
@@ -4945,8 +5485,12 @@ var LinkMenuConnect = function LinkMenuConnect(_ref) {
4945
5485
  return mapSelectors.getAllMapIds(store);
4946
5486
  });
4947
5487
  var viewsById = useSelector(getViewsById);
4948
- var selectedMapIds = useSelector(function (store) {
4949
- return genericSelectors.getLinkedMaps(store, panelId);
5488
+ var selectedTargetIds = useSelector(function (store) {
5489
+ return genericSelectors.getLinkedTargetIds(store, panelId);
5490
+ });
5491
+ var linksByPanelId = useSelector(function (store) {
5492
+ var _store$syncGroups;
5493
+ return ((_store$syncGroups = store.syncGroups) == null || (_store$syncGroups = _store$syncGroups.linkedState) == null ? void 0 : _store$syncGroups.links) || {};
4950
5494
  });
4951
5495
  var viewComponentType = useSelector(function (store) {
4952
5496
  return getViewComponentType(store, panelId);
@@ -4955,28 +5499,57 @@ var LinkMenuConnect = function LinkMenuConnect(_ref) {
4955
5499
  return genericSelectors.getSelectedFeature(store.syncGroups, panelId);
4956
5500
  });
4957
5501
  var mapPinLocation = useSelector(function (store) {
4958
- return mapSelectors.getPinLocation(store, selectedMapIds[0] || '');
5502
+ return mapSelectors.getPinLocation(store, selectedTargetIds[0] || '');
4959
5503
  });
5504
+ var warningPanels = React.useMemo(function () {
5505
+ if (viewComponentType !== 'WarningList') {
5506
+ return [];
5507
+ }
5508
+ return Object.keys(viewsById || {}).filter(function (viewId) {
5509
+ var _viewsById$viewId;
5510
+ if (viewId === panelId) {
5511
+ return false;
5512
+ }
5513
+ return ((_viewsById$viewId = viewsById[viewId]) == null ? void 0 : _viewsById$viewId.componentType) === 'WarningsTimeline';
5514
+ });
5515
+ }, [panelId, viewComponentType, viewsById]);
5516
+ var takenWarningTimelineIds = React.useMemo(function () {
5517
+ return new Set(Object.keys(linksByPanelId).flatMap(function (candidatePanelId) {
5518
+ var _viewsById$candidateP;
5519
+ if (candidatePanelId === panelId) {
5520
+ return [];
5521
+ }
5522
+ if (((_viewsById$candidateP = viewsById[candidatePanelId]) == null ? void 0 : _viewsById$candidateP.componentType) !== 'WarningList') {
5523
+ return [];
5524
+ }
5525
+ return (linksByPanelId[candidatePanelId] || []).filter(function (targetId) {
5526
+ var _viewsById$targetId;
5527
+ return ((_viewsById$targetId = viewsById[targetId]) == null ? void 0 : _viewsById$targetId.componentType) === 'WarningsTimeline';
5528
+ });
5529
+ }));
5530
+ }, [linksByPanelId, panelId, viewsById]);
5531
+ var shouldShowWarningPanels = viewComponentType === 'WarningList' && warningPanels.length > 0;
4960
5532
  var handleLinkViews = function handleLinkViews(event) {
4961
5533
  setAnchorEl(event.currentTarget);
4962
5534
  };
4963
5535
  var handleMenuClose = function handleMenuClose() {
4964
5536
  setAnchorEl(null);
4965
5537
  };
4966
- var handleMapSelect = function handleMapSelect(mapId) {
4967
- var updatedMapIds = selectedMapIds.includes(mapId) ? selectedMapIds.filter(function (id) {
4968
- return id !== mapId;
4969
- }) : [].concat(selectedMapIds, [mapId]);
5538
+ var handleTargetSelect = function handleTargetSelect(targetId) {
5539
+ var updatedTargetIds = selectedTargetIds.includes(targetId) ? selectedTargetIds.filter(function (id) {
5540
+ return id !== targetId;
5541
+ }) : [].concat(selectedTargetIds, [targetId]);
4970
5542
  dispatch(genericActions.updateLinkedMap({
4971
5543
  panelId: panelId,
4972
- mapIds: updatedMapIds
5544
+ mapIds: updatedTargetIds
4973
5545
  }));
5546
+
4974
5547
  // Sync pin to newly added map for TimeSeries or Soundings components
4975
- if (!selectedMapIds.includes(mapId) && (viewComponentType === 'TimeSeries' || viewComponentType === 'Soundings')) {
5548
+ if (maps.includes(targetId) && !selectedTargetIds.includes(targetId) && (viewComponentType === 'TimeSeries' || viewComponentType === 'Soundings')) {
4976
5549
  // Observation station
4977
5550
  if (sharedFeature) {
4978
5551
  dispatch(mapActions.setMapPinLocation({
4979
- mapId: mapId,
5552
+ mapId: targetId,
4980
5553
  mapPinLocation: {
4981
5554
  lon: sharedFeature.lon,
4982
5555
  lat: sharedFeature.lat
@@ -4985,14 +5558,14 @@ var LinkMenuConnect = function LinkMenuConnect(_ref) {
4985
5558
  // Grid
4986
5559
  } else if (mapPinLocation) {
4987
5560
  dispatch(mapActions.setMapPinLocation({
4988
- mapId: mapId,
5561
+ mapId: targetId,
4989
5562
  mapPinLocation: mapPinLocation
4990
5563
  }));
4991
5564
  }
4992
5565
  }
4993
5566
  };
4994
- return jsxs(Fragment, {
4995
- children: [linkComponentTypesConstants.supportedComponentTypesForLinking.includes(viewComponentType) && jsx(CustomIconButton, {
5567
+ return /*#__PURE__*/jsxs(Fragment, {
5568
+ children: [linkComponentTypesConstants.supportedComponentTypesForLinking.includes(viewComponentType) && /*#__PURE__*/jsx(CustomIconButton, {
4996
5569
  "data-testid": "icon-button",
4997
5570
  onClick: handleLinkViews,
4998
5571
  sx: {
@@ -5000,56 +5573,56 @@ var LinkMenuConnect = function LinkMenuConnect(_ref) {
5000
5573
  marginRight: 0.5
5001
5574
  },
5002
5575
  tooltipTitle: "Link " + viewComponentType,
5003
- children: selectedMapIds.length > 0 ? jsx(Link, {
5576
+ children: selectedTargetIds.length > 0 ? /*#__PURE__*/jsx(Link, {
5004
5577
  "data-testid": "link-icon",
5005
5578
  style: {
5006
5579
  fill: anchorEl ? 'white' : undefined,
5007
5580
  backgroundColor: anchorEl ? '#186DFF' : undefined
5008
5581
  }
5009
- }) : jsx(LinkOff, {
5582
+ }) : /*#__PURE__*/jsx(LinkOff, {
5010
5583
  "data-testid": "link-off-icon",
5011
5584
  style: {
5012
5585
  fill: anchorEl ? 'white' : undefined,
5013
5586
  backgroundColor: anchorEl ? '#186DFF' : undefined
5014
5587
  }
5015
5588
  })
5016
- }), jsxs(Menu, {
5589
+ }), /*#__PURE__*/jsxs(Menu, {
5017
5590
  anchorEl: anchorEl,
5018
5591
  "data-testid": "map-select-menu",
5019
5592
  id: "map-select-menu",
5020
5593
  keepMounted: true,
5021
5594
  onClose: handleMenuClose,
5022
5595
  open: Boolean(anchorEl),
5023
- children: [jsxs(Typography, {
5596
+ children: [/*#__PURE__*/jsxs(Typography, {
5024
5597
  style: {
5025
5598
  padding: '10px 15px 0',
5026
5599
  fontWeight: 'bold'
5027
5600
  },
5028
5601
  variant: "h6",
5029
5602
  children: [t('workspace-link'), " - ", t('workspace-link-location-header')]
5030
- }), jsx(List, {
5603
+ }), /*#__PURE__*/jsxs(List, {
5031
5604
  dense: true,
5032
- children: maps.map(function (mapId) {
5605
+ children: [maps.map(function (mapId) {
5033
5606
  var _viewsById$mapId;
5034
5607
  var labelId = "checkbox-link-label-" + mapId;
5035
5608
  var mapTitle = constructSyncSourceDisplayName(mapId, viewsById[mapId], ((_viewsById$mapId = viewsById[mapId]) == null ? void 0 : _viewsById$mapId.title) || mapId);
5036
- return jsx(ListItem, {
5609
+ return /*#__PURE__*/jsx(ListItem, {
5037
5610
  dense: true,
5038
5611
  disablePadding: true,
5039
5612
  divider: true,
5040
5613
  onClick: function onClick() {
5041
- return handleMapSelect(mapId);
5614
+ return handleTargetSelect(mapId);
5042
5615
  },
5043
- children: jsxs(ListItemButton, {
5616
+ children: /*#__PURE__*/jsxs(ListItemButton, {
5044
5617
  dense: true,
5045
5618
  role: "checkbox",
5046
5619
  sx: {
5047
5620
  margin: 0,
5048
5621
  padding: '0 16px'
5049
5622
  },
5050
- children: [jsx(ListItemIcon, {
5051
- children: jsx(Checkbox, {
5052
- checked: selectedMapIds.includes(mapId),
5623
+ children: [/*#__PURE__*/jsx(ListItemIcon, {
5624
+ children: /*#__PURE__*/jsx(Checkbox, {
5625
+ checked: selectedTargetIds.includes(mapId),
5053
5626
  disableRipple: true,
5054
5627
  edge: "start",
5055
5628
  slotProps: {
@@ -5059,24 +5632,86 @@ var LinkMenuConnect = function LinkMenuConnect(_ref) {
5059
5632
  },
5060
5633
  tabIndex: -1
5061
5634
  })
5062
- }), jsx(ListItemText, {
5635
+ }), /*#__PURE__*/jsx(ListItemText, {
5063
5636
  id: labelId,
5064
5637
  primary: mapTitle
5065
5638
  })]
5066
5639
  })
5067
5640
  }, mapId);
5068
- })
5641
+ }), shouldShowWarningPanels ? /*#__PURE__*/jsx(Fragment, {
5642
+ children: warningPanels.map(function (targetPanelId) {
5643
+ var _viewsById$targetPane;
5644
+ var labelId = "checkbox-link-label-" + targetPanelId;
5645
+ var panelTitle = constructSyncSourceDisplayName(targetPanelId, viewsById[targetPanelId], ((_viewsById$targetPane = viewsById[targetPanelId]) == null ? void 0 : _viewsById$targetPane.title) || targetPanelId);
5646
+ var isSelected = selectedTargetIds.includes(targetPanelId);
5647
+ var isTaken = takenWarningTimelineIds.has(targetPanelId) && !isSelected;
5648
+ return /*#__PURE__*/jsx(ListItem, {
5649
+ dense: true,
5650
+ disablePadding: true,
5651
+ divider: true,
5652
+ onClick: function onClick() {
5653
+ if (!isTaken) {
5654
+ handleTargetSelect(targetPanelId);
5655
+ }
5656
+ },
5657
+ children: /*#__PURE__*/jsxs(ListItemButton, {
5658
+ dense: true,
5659
+ disabled: isTaken,
5660
+ role: "checkbox",
5661
+ sx: {
5662
+ margin: 0,
5663
+ padding: '0 16px'
5664
+ },
5665
+ children: [/*#__PURE__*/jsx(ListItemIcon, {
5666
+ children: /*#__PURE__*/jsx(Checkbox, {
5667
+ checked: isSelected,
5668
+ disableRipple: true,
5669
+ disabled: isTaken,
5670
+ edge: "start",
5671
+ slotProps: {
5672
+ input: {
5673
+ 'aria-labelledby': labelId
5674
+ }
5675
+ },
5676
+ tabIndex: -1
5677
+ })
5678
+ }), /*#__PURE__*/jsx(ListItemText, {
5679
+ id: labelId,
5680
+ primary: panelTitle
5681
+ })]
5682
+ })
5683
+ }, targetPanelId);
5684
+ })
5685
+ }) : null]
5069
5686
  })]
5070
5687
  })]
5071
5688
  });
5072
5689
  };
5073
5690
 
5691
+ /* *
5692
+ * Licensed under the Apache License, Version 2.0 (the "License");
5693
+ * you may not use this file except in compliance with the License.
5694
+ * You may obtain a copy of the License at
5695
+ *
5696
+ * http://www.apache.org/licenses/LICENSE-2.0
5697
+ *
5698
+ * Unless required by applicable law or agreed to in writing, software
5699
+ * distributed under the License is distributed on an "AS IS" BASIS,
5700
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5701
+ * See the License for the specific language governing permissions and
5702
+ * limitations under the License.
5703
+ *
5704
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5705
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
5706
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
5707
+ * */
5708
+
5074
5709
  var wrapInMenuItem = function wrapInMenuItem(inMenuItem, component, isDisabled) {
5075
5710
  if (isDisabled === void 0) {
5076
5711
  isDisabled = false;
5077
5712
  }
5078
5713
  if (inMenuItem) {
5079
- return jsx(MenuItem, {
5714
+ return /*#__PURE__*/jsx(MenuItem, {
5080
5715
  disabled: isDisabled,
5081
5716
  children: component
5082
5717
  });
@@ -5119,8 +5754,8 @@ var SplitButtonsConnect = function SplitButtonsConnect(_ref) {
5119
5754
  });
5120
5755
  return newId;
5121
5756
  }, [addView, panelId, viewComponentType, viewIds]);
5122
- return jsxs(Fragment, {
5123
- children: [wrapInMenuItem(inMenuItem, jsx(CustomIconButton, {
5757
+ return /*#__PURE__*/jsxs(Fragment, {
5758
+ children: [wrapInMenuItem(inMenuItem, /*#__PURE__*/jsx(CustomIconButton, {
5124
5759
  "data-testid": "split-horizontal-btn",
5125
5760
  onClick: function onClick(event) {
5126
5761
  var newNode = createNode(event.shiftKey);
@@ -5133,8 +5768,8 @@ var SplitButtonsConnect = function SplitButtonsConnect(_ref) {
5133
5768
  },
5134
5769
  sx: buttonStyle$1,
5135
5770
  tooltipTitle: t('workspace-control-split-horizontal') + " - " + t('workspace-control-split-shift'),
5136
- children: jsx(SplitHorizontal, {})
5137
- })), wrapInMenuItem(inMenuItem, jsx(CustomIconButton, {
5771
+ children: /*#__PURE__*/jsx(SplitHorizontal, {})
5772
+ })), wrapInMenuItem(inMenuItem, /*#__PURE__*/jsx(CustomIconButton, {
5138
5773
  "data-testid": "split-vertical-btn",
5139
5774
  disabled: isVerticalSplitDisabled,
5140
5775
  onClick: function onClick(event) {
@@ -5148,8 +5783,8 @@ var SplitButtonsConnect = function SplitButtonsConnect(_ref) {
5148
5783
  },
5149
5784
  sx: buttonStyle$1,
5150
5785
  tooltipTitle: t('workspace-control-split-vertical') + " - " + t('workspace-control-split-shift'),
5151
- children: jsx(SplitVertical, {})
5152
- }), isVerticalSplitDisabled), wrapInMenuItem(inMenuItem, jsx(CustomIconButton, {
5786
+ children: /*#__PURE__*/jsx(SplitVertical, {})
5787
+ }), isVerticalSplitDisabled), wrapInMenuItem(inMenuItem, /*#__PURE__*/jsx(CustomIconButton, {
5153
5788
  "data-testid": "split-horizontal-btn-copy-content",
5154
5789
  onClick: function onClick(event) {
5155
5790
  // Always copy over content
@@ -5163,8 +5798,8 @@ var SplitButtonsConnect = function SplitButtonsConnect(_ref) {
5163
5798
  },
5164
5799
  sx: buttonStyle$1,
5165
5800
  tooltipTitle: t('workspace-control-split-horizontal-with-data'),
5166
- children: jsx(SplitHorizontalWithContent, {})
5167
- })), wrapInMenuItem(inMenuItem, jsx(CustomIconButton, {
5801
+ children: /*#__PURE__*/jsx(SplitHorizontalWithContent, {})
5802
+ })), wrapInMenuItem(inMenuItem, /*#__PURE__*/jsx(CustomIconButton, {
5168
5803
  "data-testid": "split-vertical-btn-copy-content",
5169
5804
  disabled: isVerticalSplitDisabled,
5170
5805
  onClick: function onClick(event) {
@@ -5179,7 +5814,7 @@ var SplitButtonsConnect = function SplitButtonsConnect(_ref) {
5179
5814
  },
5180
5815
  sx: buttonStyle$1,
5181
5816
  tooltipTitle: t('workspace-control-split-vertical-with-data'),
5182
- children: jsx(SplitVerticalWithContent, {})
5817
+ children: /*#__PURE__*/jsx(SplitVerticalWithContent, {})
5183
5818
  }), isVerticalSplitDisabled)]
5184
5819
  });
5185
5820
  };
@@ -5189,7 +5824,7 @@ var buttonStyle = {
5189
5824
  marginRight: 0.5
5190
5825
  };
5191
5826
  var WorkspaceControls = function WorkspaceControls(_ref) {
5192
- var _sx, _sx2;
5827
+ var _ref3, _ref4;
5193
5828
  var panelId = _ref.panelId;
5194
5829
  _ref.createNode;
5195
5830
  var path = _ref.path,
@@ -5266,7 +5901,7 @@ var WorkspaceControls = function WorkspaceControls(_ref) {
5266
5901
  return _ref2.apply(this, arguments);
5267
5902
  };
5268
5903
  }();
5269
- var expandButton = !enableUnexpand || isString(mosaicNode) ? jsx(CustomIconButton, {
5904
+ var expandButton = !enableUnexpand || isString(mosaicNode) ? /*#__PURE__*/jsx(CustomIconButton, {
5270
5905
  "data-testid": "expand-btn",
5271
5906
  onClick: function onClick() {
5272
5907
  setStateBeforeExpand(mosaicNode);
@@ -5275,8 +5910,8 @@ var WorkspaceControls = function WorkspaceControls(_ref) {
5275
5910
  },
5276
5911
  sx: buttonStyle,
5277
5912
  tooltipTitle: t('workspace-control-expand'),
5278
- children: jsx(Expand, {})
5279
- }) : jsx(CustomIconButton, {
5913
+ children: /*#__PURE__*/jsx(Expand, {})
5914
+ }) : /*#__PURE__*/jsx(CustomIconButton, {
5280
5915
  "data-testid": "unexpand-btn",
5281
5916
  onClick: function onClick() {
5282
5917
  var stateBeforeExpandCopy = isString(stateBeforeExpand) ? stateBeforeExpand : Object.assign({}, stateBeforeExpand);
@@ -5284,17 +5919,17 @@ var WorkspaceControls = function WorkspaceControls(_ref) {
5284
5919
  },
5285
5920
  sx: buttonStyle,
5286
5921
  tooltipTitle: t('workspace-control-unexpand'),
5287
- children: jsx(UnExpand, {})
5922
+ children: /*#__PURE__*/jsx(UnExpand, {})
5288
5923
  });
5289
- return jsxs(Fragment, {
5290
- children: [jsxs(Box, {
5924
+ return /*#__PURE__*/jsxs(Fragment, {
5925
+ children: [/*#__PURE__*/jsxs(Box, {
5291
5926
  "data-testid": "workspace-view-controls-options-dropdown",
5292
- sx: (_sx = {}, _sx["@container workspace-view-container (min-width: 495px)"] = {
5927
+ sx: (_ref3 = {}, _ref3["@container workspace-view-container (min-width: 495px)"] = {
5293
5928
  display: 'none'
5294
- }, _sx.paddingLeft = '8px', _sx),
5295
- children: [jsx(LinkMenuConnect, {
5929
+ }, _ref3.paddingLeft = '8px', _ref3),
5930
+ children: [/*#__PURE__*/jsx(LinkMenuConnect, {
5296
5931
  panelId: panelId
5297
- }), jsxs(CustomIconButton, {
5932
+ }), /*#__PURE__*/jsxs(CustomIconButton, {
5298
5933
  "aria-label": "workspace view controls",
5299
5934
  "data-testid": "workspace-view-controls",
5300
5935
  isSelected: isOpen,
@@ -5312,7 +5947,7 @@ var WorkspaceControls = function WorkspaceControls(_ref) {
5312
5947
  },
5313
5948
  tooltipTitle: t('workspace-control-show-options'),
5314
5949
  variant: "tool",
5315
- children: [jsx(ChevronDown, {}), jsxs(Menu, {
5950
+ children: [/*#__PURE__*/jsx(ChevronDown, {}), /*#__PURE__*/jsxs(Menu, {
5316
5951
  anchorEl: anchorEl,
5317
5952
  anchorOrigin: {
5318
5953
  vertical: 21,
@@ -5339,34 +5974,34 @@ var WorkspaceControls = function WorkspaceControls(_ref) {
5339
5974
  minHeight: '32px !important'
5340
5975
  }
5341
5976
  },
5342
- children: [jsx(SplitButtonsConnect, {
5977
+ children: [/*#__PURE__*/jsx(SplitButtonsConnect, {
5343
5978
  inMenuItem: true,
5344
5979
  isVerticalSplitDisabled: true,
5345
5980
  panelId: panelId,
5346
5981
  path: path
5347
- }), jsx(MenuItem, {
5982
+ }), /*#__PURE__*/jsx(MenuItem, {
5348
5983
  children: expandButton
5349
5984
  })]
5350
5985
  })]
5351
5986
  })]
5352
- }), jsxs(Box, {
5987
+ }), /*#__PURE__*/jsxs(Box, {
5353
5988
  "data-testid": "workspace-view-controls-options-buttons",
5354
- sx: (_sx2 = {}, _sx2["@container workspace-view-container (max-width: 494px)"] = {
5989
+ sx: (_ref4 = {}, _ref4["@container workspace-view-container (max-width: 494px)"] = {
5355
5990
  display: 'none'
5356
- }, _sx2.paddingLeft = '4px', _sx2),
5357
- children: [jsx(LinkMenuConnect, {
5991
+ }, _ref4.paddingLeft = '4px', _ref4),
5992
+ children: [/*#__PURE__*/jsx(LinkMenuConnect, {
5358
5993
  panelId: panelId
5359
- }), jsx(SplitButtonsConnect, {
5994
+ }), /*#__PURE__*/jsx(SplitButtonsConnect, {
5360
5995
  panelId: panelId,
5361
5996
  path: path
5362
5997
  }), expandButton]
5363
- }), jsx(CustomIconButton, {
5998
+ }), /*#__PURE__*/jsx(CustomIconButton, {
5364
5999
  "data-testid": "close-btn",
5365
6000
  id: "close-window-button",
5366
6001
  onClick: onClose,
5367
6002
  sx: buttonStyle,
5368
6003
  tooltipTitle: t('workspace-control-close'),
5369
- children: jsx(Close, {})
6004
+ children: /*#__PURE__*/jsx(Close, {})
5370
6005
  })]
5371
6006
  });
5372
6007
  };
@@ -5388,7 +6023,8 @@ var WorkspaceControls = function WorkspaceControls(_ref) {
5388
6023
  * Copyright 2025 - Finnish Meteorological Institute (FMI)
5389
6024
  * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
5390
6025
  * */
5391
- var useFetchViewPresets = function useFetchViewPresets(panelId) {
6026
+
6027
+ var useResetViewPresetFiltersOnRoleChange = function useResetViewPresetFiltersOnRoleChange(panelId) {
5392
6028
  var dispatch = useDispatch();
5393
6029
  var _useAuthenticationCon = useAuthenticationContext(),
5394
6030
  currentRole = _useAuthenticationCon.currentRole;
@@ -5415,12 +6051,30 @@ var useFetchViewPresets = function useFetchViewPresets(panelId) {
5415
6051
  }, [dispatch, isAdmin, lastAdmin, panelId]);
5416
6052
  };
5417
6053
 
6054
+ /* *
6055
+ * Licensed under the Apache License, Version 2.0 (the "License");
6056
+ * you may not use this file except in compliance with the License.
6057
+ * You may obtain a copy of the License at
6058
+ *
6059
+ * http://www.apache.org/licenses/LICENSE-2.0
6060
+ *
6061
+ * Unless required by applicable law or agreed to in writing, software
6062
+ * distributed under the License is distributed on an "AS IS" BASIS,
6063
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6064
+ * See the License for the specific language governing permissions and
6065
+ * limitations under the License.
6066
+ *
6067
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6068
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
6069
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6070
+ * */
6071
+
5418
6072
  var ViewLoading = function ViewLoading(_ref) {
5419
6073
  var viewPresetId = _ref.viewPresetId;
5420
6074
  var _useWorkspaceTranslat = useWorkspaceTranslation(),
5421
6075
  t = _useWorkspaceTranslat.t;
5422
- return jsxs(Fragment, {
5423
- children: [jsx(LinearProgress, {
6076
+ return /*#__PURE__*/jsxs(Fragment, {
6077
+ children: [/*#__PURE__*/jsx(LinearProgress, {
5424
6078
  color: "secondary",
5425
6079
  "data-testid": "loading-bar",
5426
6080
  sx: {
@@ -5428,7 +6082,7 @@ var ViewLoading = function ViewLoading(_ref) {
5428
6082
  width: '100%',
5429
6083
  top: 0
5430
6084
  }
5431
- }), jsxs(Typography, {
6085
+ }), /*#__PURE__*/jsxs(Typography, {
5432
6086
  sx: {
5433
6087
  margin: 1
5434
6088
  },
@@ -5448,7 +6102,7 @@ var ViewError = function ViewError(_ref2) {
5448
6102
  mosaicNodeId: mosaicNodeId
5449
6103
  }));
5450
6104
  }, [dispatch, viewPresetId, mosaicNodeId]);
5451
- return jsx(AlertBanner, {
6105
+ return /*#__PURE__*/jsx(AlertBanner, {
5452
6106
  actionButtonProps: {
5453
6107
  title: t('workspace-retry'),
5454
6108
  onClick: fetchWorkspaceViewPreset
@@ -5465,11 +6119,11 @@ var defaultComponentsLookUp = function defaultComponentsLookUp(_ref3) {
5465
6119
  mosaicNodeId = _ref3.mosaicNodeId;
5466
6120
  switch (componentType) {
5467
6121
  case 'ViewLoading':
5468
- return jsx(ViewLoading, {
6122
+ return /*#__PURE__*/jsx(ViewLoading, {
5469
6123
  viewPresetId: viewPresetId
5470
6124
  });
5471
6125
  case 'ViewError':
5472
- return jsx(ViewError, {
6126
+ return /*#__PURE__*/jsx(ViewError, {
5473
6127
  mosaicNodeId: mosaicNodeId,
5474
6128
  viewPresetId: viewPresetId
5475
6129
  });
@@ -5596,6 +6250,7 @@ var writeToClipboard = /*#__PURE__*/function () {
5596
6250
  return _ref.apply(this, arguments);
5597
6251
  };
5598
6252
  }();
6253
+
5599
6254
  /**
5600
6255
  * For each view that only has a viewPresetId reference (old-style), fetch
5601
6256
  * the full view preset from BE and replaces the reference with inline
@@ -5727,6 +6382,7 @@ var validateWorkspacePresetJson = function validateWorkspacePresetJson(jsonStrin
5727
6382
  }
5728
6383
  return null;
5729
6384
  };
6385
+
5730
6386
  /**
5731
6387
  * Validates that the parsed value is a valid ViewPreset structure.
5732
6388
  */
@@ -5772,6 +6428,24 @@ var validateViewPresetJson = function validateViewPresetJson(jsonString) {
5772
6428
  return null;
5773
6429
  };
5774
6430
 
6431
+ /* *
6432
+ * Licensed under the Apache License, Version 2.0 (the "License");
6433
+ * you may not use this file except in compliance with the License.
6434
+ * You may obtain a copy of the License at
6435
+ *
6436
+ * http://www.apache.org/licenses/LICENSE-2.0
6437
+ *
6438
+ * Unless required by applicable law or agreed to in writing, software
6439
+ * distributed under the License is distributed on an "AS IS" BASIS,
6440
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6441
+ * See the License for the specific language governing permissions and
6442
+ * limitations under the License.
6443
+ *
6444
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6445
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
6446
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
6447
+ * */
6448
+
5775
6449
  var VIEW_TYPE_KEY = 'viewType';
5776
6450
  var normalizeLabels = function normalizeLabels(labels, available) {
5777
6451
  var result = {};
@@ -5813,6 +6487,7 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
5813
6487
  var withoutViewType = groupKeys.filter(function (key) {
5814
6488
  return key !== VIEW_TYPE_KEY;
5815
6489
  });
6490
+
5816
6491
  // If for some reason viewType really isn't in groupKeys, just return as-is
5817
6492
  if (!groupKeys.includes(VIEW_TYPE_KEY)) {
5818
6493
  return withoutViewType;
@@ -5831,6 +6506,7 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
5831
6506
  var rest = withoutViewType.slice(0, -1);
5832
6507
  return [].concat(rest, [VIEW_TYPE_KEY, last]);
5833
6508
  }
6509
+
5834
6510
  // FORM MODE: viewType should be LAST.
5835
6511
  return [].concat(withoutViewType, [VIEW_TYPE_KEY]);
5836
6512
  }, [groupKeys, isMenuFilterMode]);
@@ -5847,6 +6523,7 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
5847
6523
  }
5848
6524
  return humanizeLabelStrings(value);
5849
6525
  };
6526
+
5850
6527
  // viewType is actually based on componentType.
5851
6528
  // In workspace form mode, we derive it from the real views array.
5852
6529
  // In view preset form, we fall back to viewComponentType.
@@ -5870,8 +6547,8 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
5870
6547
  return (_labels$VIEW_TYPE_KEY = labels[VIEW_TYPE_KEY]) != null ? _labels$VIEW_TYPE_KEY : [];
5871
6548
  }, [labels]);
5872
6549
  var viewTypeConfigItems = React.useMemo(function () {
5873
- var _labelsConfig$VIEW_TY;
5874
- return ((_labelsConfig$VIEW_TY = labelsConfig == null ? void 0 : labelsConfig[VIEW_TYPE_KEY]) != null ? _labelsConfig$VIEW_TY : []).slice();
6550
+ var _ref2;
6551
+ return ((_ref2 = labelsConfig == null ? void 0 : labelsConfig[VIEW_TYPE_KEY]) != null ? _ref2 : []).slice();
5875
6552
  }, [labelsConfig]);
5876
6553
  var viewTypeItems = React.useMemo(function () {
5877
6554
  if (isMenuFilterMode) {
@@ -5893,6 +6570,7 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
5893
6570
  shouldDirty: false
5894
6571
  });
5895
6572
  }, [isMenuFilterMode, menuLabels, setValue]);
6573
+
5896
6574
  // In form mode, keep locked "viewType" labels in sync with componentTypes
5897
6575
  React.useEffect(function () {
5898
6576
  var _labels$VIEW_TYPE_KEY2;
@@ -5959,9 +6637,9 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
5959
6637
  };
5960
6638
  var groups = React.useMemo(function () {
5961
6639
  return orderedGroupKeys.map(function (key) {
5962
- var _labelsConfig$key;
6640
+ var _ref3;
5963
6641
  var isViewType = key === VIEW_TYPE_KEY;
5964
- var items = isViewType ? viewTypeItems : (_labelsConfig$key = labelsConfig[key]) != null ? _labelsConfig$key : [];
6642
+ var items = isViewType ? viewTypeItems : (_ref3 = labelsConfig[key]) != null ? _ref3 : [];
5965
6643
  var locked = !isMenuFilterMode && isViewType;
5966
6644
  return {
5967
6645
  key: key,
@@ -5985,11 +6663,11 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
5985
6663
  return key + 1;
5986
6664
  });
5987
6665
  };
5988
- return jsxs(Box, {
6666
+ return /*#__PURE__*/jsxs(Box, {
5989
6667
  sx: {
5990
6668
  py: 1
5991
6669
  },
5992
- children: [jsx(Typography, {
6670
+ children: [/*#__PURE__*/jsx(Typography, {
5993
6671
  sx: {
5994
6672
  px: 2,
5995
6673
  mb: 1,
@@ -5997,14 +6675,14 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
5997
6675
  },
5998
6676
  variant: "subtitle1",
5999
6677
  children: t('workspace-presets-form-labels-header')
6000
- }), jsxs(Box, {
6678
+ }), /*#__PURE__*/jsxs(Box, {
6001
6679
  sx: {
6002
6680
  px: 2,
6003
6681
  display: 'grid',
6004
6682
  rowGap: 1,
6005
6683
  mb: 2
6006
6684
  },
6007
- children: [jsx(Button, {
6685
+ children: [/*#__PURE__*/jsx(Button, {
6008
6686
  color: "secondary",
6009
6687
  disabled: isClearAllDisabled,
6010
6688
  onClick: clearAll,
@@ -6019,14 +6697,14 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
6019
6697
  children: t('workspace-presets-form-labels-clearAll', {
6020
6698
  count: totalActive
6021
6699
  })
6022
- }), jsx(Typography, {
6700
+ }), /*#__PURE__*/jsx(Typography, {
6023
6701
  sx: {
6024
6702
  color: 'text.secondary'
6025
6703
  },
6026
6704
  variant: "caption",
6027
6705
  children: t('workspace-presets-form-labels-info')
6028
- }), jsx(Button, {
6029
- endIcon: expandAll ? jsx(ChevronUp, {}) : jsx(ChevronDown, {}),
6706
+ }), /*#__PURE__*/jsx(Button, {
6707
+ endIcon: expandAll ? /*#__PURE__*/jsx(ChevronUp, {}) : /*#__PURE__*/jsx(ChevronDown, {}),
6030
6708
  onClick: toggleAll,
6031
6709
  size: "small",
6032
6710
  sx: {
@@ -6038,21 +6716,21 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
6038
6716
  variant: "outlined",
6039
6717
  children: expandAll ? t('workspace-presets-form-labels-collapseAll') : t('workspace-presets-form-labels-expandAll')
6040
6718
  })]
6041
- }), jsx(Stack, {
6719
+ }), /*#__PURE__*/jsx(Stack, {
6042
6720
  spacing: 1,
6043
6721
  sx: {
6044
6722
  px: 1
6045
6723
  },
6046
- children: groups.map(function (_ref2) {
6724
+ children: groups.map(function (_ref4) {
6047
6725
  var _labels$key4;
6048
- var key = _ref2.key,
6049
- title = _ref2.title,
6050
- items = _ref2.items,
6051
- locked = _ref2.locked;
6726
+ var key = _ref4.key,
6727
+ title = _ref4.title,
6728
+ items = _ref4.items,
6729
+ locked = _ref4.locked;
6052
6730
  var groupItems = items != null ? items : [];
6053
6731
  var currentGroupLabels = (_labels$key4 = labels[key]) != null ? _labels$key4 : [];
6054
6732
  var active = currentGroupLabels.length;
6055
- return jsx(CustomAccordion, {
6733
+ return /*#__PURE__*/jsx(CustomAccordion, {
6056
6734
  "data-testid": "workspace-labels-drawer-" + key,
6057
6735
  defaultExpanded: expandAll,
6058
6736
  sx: {
@@ -6076,26 +6754,26 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
6076
6754
  borderBottom: 'none'
6077
6755
  }
6078
6756
  },
6079
- title: jsxs(Stack, {
6757
+ title: /*#__PURE__*/jsxs(Stack, {
6080
6758
  alignItems: "center",
6081
6759
  direction: "row",
6082
6760
  sx: {
6083
6761
  flexGrow: 1,
6084
6762
  minWidth: 0
6085
6763
  },
6086
- children: [jsxs(Stack, {
6764
+ children: [/*#__PURE__*/jsxs(Stack, {
6087
6765
  alignItems: "center",
6088
6766
  direction: "row",
6089
6767
  spacing: 1,
6090
- children: [jsx(Typography, {
6768
+ children: [/*#__PURE__*/jsx(Typography, {
6091
6769
  sx: {
6092
6770
  fontSize: '14px'
6093
6771
  },
6094
6772
  children: title + " (" + groupItems.length + ")"
6095
- }), !!locked && jsx(LockLocked, {
6773
+ }), !!locked && /*#__PURE__*/jsx(LockLocked, {
6096
6774
  fontSize: "small"
6097
6775
  })]
6098
- }), active > 0 && jsx(Chip, {
6776
+ }), active > 0 && /*#__PURE__*/jsx(Chip, {
6099
6777
  color: "primary",
6100
6778
  label: active + " " + t('workspace-label-active'),
6101
6779
  size: "small",
@@ -6116,12 +6794,12 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
6116
6794
  variant: "outlined"
6117
6795
  })]
6118
6796
  }),
6119
- children: jsx(Stack, {
6797
+ children: /*#__PURE__*/jsx(Stack, {
6120
6798
  spacing: -0.8,
6121
6799
  children: groupItems.map(function (it) {
6122
6800
  var labelText = labelFor(key, it);
6123
- return jsx(FormControlLabel, {
6124
- control: jsx(Checkbox, {
6801
+ return /*#__PURE__*/jsx(FormControlLabel, {
6802
+ control: /*#__PURE__*/jsx(Checkbox, {
6125
6803
  checked: currentGroupLabels.includes(it),
6126
6804
  onChange: function onChange() {
6127
6805
  return toggle(key, it, locked);
@@ -6129,11 +6807,11 @@ var PresetLabelsPanel = function PresetLabelsPanel(_ref) {
6129
6807
  size: "small"
6130
6808
  }),
6131
6809
  disabled: locked,
6132
- label: jsx(CustomTooltip, {
6810
+ label: /*#__PURE__*/jsx(CustomTooltip, {
6133
6811
  enterDelay: 300,
6134
6812
  placement: "top",
6135
6813
  title: labelText,
6136
- children: jsx(Typography, {
6814
+ children: /*#__PURE__*/jsx(Typography, {
6137
6815
  noWrap: true,
6138
6816
  sx: {
6139
6817
  fontSize: 16,
@@ -6297,6 +6975,24 @@ var useCreateWorkspacePreset = function useCreateWorkspacePreset() {
6297
6975
  });
6298
6976
  };
6299
6977
 
6978
+ /* *
6979
+ * Licensed under the Apache License, Version 2.0 (the "License");
6980
+ * you may not use this file except in compliance with the License.
6981
+ * You may obtain a copy of the License at
6982
+ *
6983
+ * http://www.apache.org/licenses/LICENSE-2.0
6984
+ *
6985
+ * Unless required by applicable law or agreed to in writing, software
6986
+ * distributed under the License is distributed on an "AS IS" BASIS,
6987
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6988
+ * See the License for the specific language governing permissions and
6989
+ * limitations under the License.
6990
+ *
6991
+ * Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6992
+ * Copyright 2026 - Finnish Meteorological Institute (FMI)
6993
+ * Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
6994
+ * */
6995
+
6300
6996
  var PresetLabelsPanelWrapper = function PresetLabelsPanelWrapper(_ref) {
6301
6997
  var viewComponentType = _ref.viewComponentType,
6302
6998
  onLabelsChange = _ref.onLabelsChange,
@@ -6311,7 +7007,7 @@ var PresetLabelsPanelWrapper = function PresetLabelsPanelWrapper(_ref) {
6311
7007
  labelsError = _useWorkspaceLabelsCo.error,
6312
7008
  refetchLabelsConfig = _useWorkspaceLabelsCo.refetch;
6313
7009
  if (isLoading) {
6314
- return jsx(LinearProgress, {
7010
+ return /*#__PURE__*/jsx(LinearProgress, {
6315
7011
  color: "secondary",
6316
7012
  "data-testid": "labelspanel-loading-bar",
6317
7013
  sx: {
@@ -6320,7 +7016,7 @@ var PresetLabelsPanelWrapper = function PresetLabelsPanelWrapper(_ref) {
6320
7016
  });
6321
7017
  }
6322
7018
  if (labelsError || labelsConfig === undefined) {
6323
- return jsx(AlertBanner, {
7019
+ return /*#__PURE__*/jsx(AlertBanner, {
6324
7020
  actionButtonProps: {
6325
7021
  title: t('fetch-config-error-retry'),
6326
7022
  onClick: function onClick() {
@@ -6332,7 +7028,7 @@ var PresetLabelsPanelWrapper = function PresetLabelsPanelWrapper(_ref) {
6332
7028
  title: t('fetch-config-error-title')
6333
7029
  });
6334
7030
  }
6335
- return jsx(PresetLabelsPanel, {
7031
+ return /*#__PURE__*/jsx(PresetLabelsPanel, {
6336
7032
  isMenuFilterMode: isMenuFilterMode,
6337
7033
  labelsConfig: labelsConfig,
6338
7034
  menuLabels: menuLabels,
@@ -6341,6 +7037,24 @@ var PresetLabelsPanelWrapper = function PresetLabelsPanelWrapper(_ref) {
6341
7037
  });
6342
7038
  };
6343
7039
 
7040
+ /* *
7041
+ * Licensed under the Apache License, Version 2.0 (the "License");
7042
+ * you may not use this file except in compliance with the License.
7043
+ * You may obtain a copy of the License at
7044
+ *
7045
+ * http://www.apache.org/licenses/LICENSE-2.0
7046
+ *
7047
+ * Unless required by applicable law or agreed to in writing, software
7048
+ * distributed under the License is distributed on an "AS IS" BASIS,
7049
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7050
+ * See the License for the specific language governing permissions and
7051
+ * limitations under the License.
7052
+ *
7053
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7054
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
7055
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
7056
+ * */
7057
+
6344
7058
  var WorkspaceMenuLabelsPanel = function WorkspaceMenuLabelsPanel(_ref) {
6345
7059
  var value = _ref.value,
6346
7060
  onChange = _ref.onChange,
@@ -6351,8 +7065,8 @@ var WorkspaceMenuLabelsPanel = function WorkspaceMenuLabelsPanel(_ref) {
6351
7065
  views: []
6352
7066
  }
6353
7067
  });
6354
- return jsx(FormProvider, Object.assign({}, methods, {
6355
- children: jsx(PresetLabelsPanelWrapper, {
7068
+ return /*#__PURE__*/jsx(FormProvider, Object.assign({}, methods, {
7069
+ children: /*#__PURE__*/jsx(PresetLabelsPanelWrapper, {
6356
7070
  "data-testid": "workspace-menu-labels-panel",
6357
7071
  isMenuFilterMode: true,
6358
7072
  menuLabels: menuLabels,
@@ -6361,6 +7075,24 @@ var WorkspaceMenuLabelsPanel = function WorkspaceMenuLabelsPanel(_ref) {
6361
7075
  }));
6362
7076
  };
6363
7077
 
7078
+ /* *
7079
+ * Licensed under the Apache License, Version 2.0 (the "License");
7080
+ * you may not use this file except in compliance with the License.
7081
+ * You may obtain a copy of the License at
7082
+ *
7083
+ * http://www.apache.org/licenses/LICENSE-2.0
7084
+ *
7085
+ * Unless required by applicable law or agreed to in writing, software
7086
+ * distributed under the License is distributed on an "AS IS" BASIS,
7087
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7088
+ * See the License for the specific language governing permissions and
7089
+ * limitations under the License.
7090
+ *
7091
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7092
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
7093
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
7094
+ * */
7095
+
6364
7096
  var formatDate = function formatDate(value) {
6365
7097
  var _dateUtils$isoStringT, _dateUtils$dateToStri;
6366
7098
  if (!value) {
@@ -6421,7 +7153,7 @@ var WorkspacePresetInfo = function WorkspacePresetInfo(_ref) {
6421
7153
  if (!preset) {
6422
7154
  return null;
6423
7155
  }
6424
- return jsx(Popper, {
7156
+ return /*#__PURE__*/jsx(Popper, {
6425
7157
  anchorEl: anchorEl,
6426
7158
  container: anchorEl ? (_anchorEl$ownerDocume = anchorEl.ownerDocument) == null ? void 0 : _anchorEl$ownerDocume.body : undefined,
6427
7159
  "data-testid": "workspace-preset-info-popper",
@@ -6454,9 +7186,9 @@ var WorkspacePresetInfo = function WorkspacePresetInfo(_ref) {
6454
7186
  sx: {
6455
7187
  zIndex: 1300
6456
7188
  },
6457
- children: jsx(ClickAwayListener, {
7189
+ children: /*#__PURE__*/jsx(ClickAwayListener, {
6458
7190
  onClickAway: onClose,
6459
- children: jsxs(Paper, {
7191
+ children: /*#__PURE__*/jsxs(Paper, {
6460
7192
  elevation: 8,
6461
7193
  sx: {
6462
7194
  width: {
@@ -6474,33 +7206,33 @@ var WorkspacePresetInfo = function WorkspacePresetInfo(_ref) {
6474
7206
  padding: 2,
6475
7207
  bgcolor: 'geowebColors.background.surface'
6476
7208
  },
6477
- children: [jsxs(Box, {
7209
+ children: [/*#__PURE__*/jsxs(Box, {
6478
7210
  sx: {
6479
7211
  display: 'flex',
6480
7212
  alignItems: 'center',
6481
7213
  justifyContent: 'space-between',
6482
7214
  mb: 1.5
6483
7215
  },
6484
- children: [jsx(Typography, {
7216
+ children: [/*#__PURE__*/jsx(Typography, {
6485
7217
  fontSize: 20,
6486
7218
  fontWeight: 400,
6487
7219
  variant: "subtitle1",
6488
7220
  children: t('workspace-info-title')
6489
- }), jsx(IconButton, {
7221
+ }), /*#__PURE__*/jsx(IconButton, {
6490
7222
  "data-testid": "workspace-preset-info-close",
6491
7223
  onClick: onClose,
6492
7224
  size: "small",
6493
- children: jsx(Close, {
7225
+ children: /*#__PURE__*/jsx(Close, {
6494
7226
  fontSize: "small"
6495
7227
  })
6496
7228
  })]
6497
- }), jsxs(Box, {
7229
+ }), /*#__PURE__*/jsxs(Box, {
6498
7230
  alignItems: "center",
6499
7231
  display: "flex",
6500
7232
  sx: {
6501
7233
  mb: 1.75
6502
7234
  },
6503
- children: [jsx(Typography, {
7235
+ children: [/*#__PURE__*/jsx(Typography, {
6504
7236
  fontSize: 16,
6505
7237
  fontWeight: 400,
6506
7238
  gutterBottom: true,
@@ -6509,33 +7241,33 @@ var WorkspacePresetInfo = function WorkspacePresetInfo(_ref) {
6509
7241
  },
6510
7242
  variant: "subtitle2",
6511
7243
  children: t('workspace-info-preset-title')
6512
- }), jsx(Typography, {
7244
+ }), /*#__PURE__*/jsx(Typography, {
6513
7245
  fontSize: 16,
6514
7246
  fontWeight: 300,
6515
7247
  gutterBottom: true,
6516
7248
  variant: "subtitle2",
6517
7249
  children: preset.title
6518
7250
  })]
6519
- }), jsxs(Box, {
7251
+ }), /*#__PURE__*/jsxs(Box, {
6520
7252
  sx: {
6521
7253
  mb: 1.75
6522
7254
  },
6523
- children: [jsx(Typography, {
7255
+ children: [/*#__PURE__*/jsx(Typography, {
6524
7256
  fontSize: 16,
6525
7257
  fontWeight: 400,
6526
7258
  gutterBottom: true,
6527
7259
  variant: "subtitle2",
6528
7260
  children: t('workspace-info-short-description')
6529
- }), jsx(Typography, {
7261
+ }), /*#__PURE__*/jsx(Typography, {
6530
7262
  color: "text.secondary",
6531
7263
  variant: "body2",
6532
7264
  children: shortDescription || t('workspace-info-no-description')
6533
7265
  })]
6534
- }), jsxs(Box, {
7266
+ }), /*#__PURE__*/jsxs(Box, {
6535
7267
  sx: {
6536
7268
  mb: 1
6537
7269
  },
6538
- children: [jsxs(Box, {
7270
+ children: [/*#__PURE__*/jsxs(Box, {
6539
7271
  onClick: function onClick() {
6540
7272
  return setIsAbstractOpen(function (prevState) {
6541
7273
  return !prevState;
@@ -6547,24 +7279,24 @@ var WorkspacePresetInfo = function WorkspacePresetInfo(_ref) {
6547
7279
  justifyContent: 'space-between',
6548
7280
  cursor: 'pointer'
6549
7281
  },
6550
- children: [jsx(Typography, {
7282
+ children: [/*#__PURE__*/jsx(Typography, {
6551
7283
  fontSize: 16,
6552
7284
  fontWeight: 400,
6553
7285
  variant: "subtitle2",
6554
7286
  children: t('workspace-info-abstract')
6555
- }), isAbstractOpen ? jsx(ChevronUp, {
7287
+ }), isAbstractOpen ? /*#__PURE__*/jsx(ChevronUp, {
6556
7288
  sx: {
6557
7289
  mr: 15
6558
7290
  }
6559
- }) : jsx(ChevronDown, {
7291
+ }) : /*#__PURE__*/jsx(ChevronDown, {
6560
7292
  sx: {
6561
7293
  mr: 15
6562
7294
  }
6563
7295
  })]
6564
- }), jsx(Collapse, {
7296
+ }), /*#__PURE__*/jsx(Collapse, {
6565
7297
  "in": isAbstractOpen,
6566
7298
  unmountOnExit: true,
6567
- children: jsx(Typography, {
7299
+ children: /*#__PURE__*/jsx(Typography, {
6568
7300
  color: "text.secondary",
6569
7301
  sx: {
6570
7302
  mt: 0.5,
@@ -6575,11 +7307,11 @@ var WorkspacePresetInfo = function WorkspacePresetInfo(_ref) {
6575
7307
  children: abstractText || t('workspace-info-no-abstract')
6576
7308
  })
6577
7309
  })]
6578
- }), jsxs(Box, {
7310
+ }), /*#__PURE__*/jsxs(Box, {
6579
7311
  sx: {
6580
7312
  my: 1
6581
7313
  },
6582
- children: [jsxs(Box, {
7314
+ children: [/*#__PURE__*/jsxs(Box, {
6583
7315
  onClick: function onClick() {
6584
7316
  return setIsLabelsOpen(function (prevState) {
6585
7317
  return !prevState;
@@ -6591,33 +7323,33 @@ var WorkspacePresetInfo = function WorkspacePresetInfo(_ref) {
6591
7323
  justifyContent: 'space-between',
6592
7324
  cursor: 'pointer'
6593
7325
  },
6594
- children: [jsx(Typography, {
7326
+ children: [/*#__PURE__*/jsx(Typography, {
6595
7327
  fontSize: 16,
6596
7328
  fontWeight: 400,
6597
7329
  variant: "subtitle2",
6598
7330
  children: t('workspace-info-selected-labels', {
6599
7331
  count: totalLabelCount
6600
7332
  })
6601
- }), isLabelsOpen ? jsx(ChevronUp, {
7333
+ }), isLabelsOpen ? /*#__PURE__*/jsx(ChevronUp, {
6602
7334
  sx: {
6603
7335
  mr: 15
6604
7336
  }
6605
- }) : jsx(ChevronDown, {
7337
+ }) : /*#__PURE__*/jsx(ChevronDown, {
6606
7338
  sx: {
6607
7339
  mr: 15
6608
7340
  }
6609
7341
  })]
6610
- }), jsxs(Collapse, {
7342
+ }), /*#__PURE__*/jsxs(Collapse, {
6611
7343
  "in": isLabelsOpen,
6612
7344
  unmountOnExit: true,
6613
- children: [labelEntries.length === 0 && jsx(Typography, {
7345
+ children: [labelEntries.length === 0 && /*#__PURE__*/jsx(Typography, {
6614
7346
  color: "text.secondary",
6615
7347
  sx: {
6616
7348
  mt: 0.5
6617
7349
  },
6618
7350
  variant: "body2",
6619
7351
  children: t('workspace-info-no-labels')
6620
- }), labelEntries.length > 0 && jsx(Stack, {
7352
+ }), labelEntries.length > 0 && /*#__PURE__*/jsx(Stack, {
6621
7353
  spacing: 1,
6622
7354
  sx: {
6623
7355
  mt: 1
@@ -6625,15 +7357,15 @@ var WorkspacePresetInfo = function WorkspacePresetInfo(_ref) {
6625
7357
  children: labelEntries.map(function (_ref4) {
6626
7358
  var group = _ref4[0],
6627
7359
  values = _ref4[1];
6628
- return jsx(Box, {
6629
- children: jsx(Box, {
7360
+ return /*#__PURE__*/jsx(Box, {
7361
+ children: /*#__PURE__*/jsx(Box, {
6630
7362
  sx: {
6631
7363
  display: 'flex',
6632
7364
  flexWrap: 'wrap',
6633
7365
  gap: 0.5
6634
7366
  },
6635
7367
  children: (values != null ? values : []).map(function (value) {
6636
- return jsx(Chip, {
7368
+ return /*#__PURE__*/jsx(Chip, {
6637
7369
  color: "secondary",
6638
7370
  label: labelFor(group, value),
6639
7371
  size: "small",
@@ -6648,7 +7380,7 @@ var WorkspacePresetInfo = function WorkspacePresetInfo(_ref) {
6648
7380
  })
6649
7381
  })]
6650
7382
  })]
6651
- }), jsx(Box, {
7383
+ }), /*#__PURE__*/jsx(Box, {
6652
7384
  sx: {
6653
7385
  mt: 1.5,
6654
7386
  padding: 1.25,
@@ -6657,63 +7389,63 @@ var WorkspacePresetInfo = function WorkspacePresetInfo(_ref) {
6657
7389
  borderColor: 'geowebColors.buttons.secondary.default.fill',
6658
7390
  backgroundColor: 'geowebColors.typographyAndIcons.informationDialog'
6659
7391
  },
6660
- children: jsxs(Stack, {
7392
+ children: /*#__PURE__*/jsxs(Stack, {
6661
7393
  spacing: 0.5,
6662
- children: [jsxs(Box, {
7394
+ children: [/*#__PURE__*/jsxs(Box, {
6663
7395
  sx: {
6664
7396
  display: 'flex',
6665
7397
  justifyContent: 'space-between'
6666
7398
  },
6667
- children: [jsx(Typography, {
7399
+ children: [/*#__PURE__*/jsx(Typography, {
6668
7400
  color: "text.secondary",
6669
7401
  variant: "caption",
6670
7402
  children: t('workspace-info-updated')
6671
- }), jsx(Typography, {
7403
+ }), /*#__PURE__*/jsx(Typography, {
6672
7404
  color: "text.secondary",
6673
7405
  variant: "caption",
6674
7406
  children: t('workspace-info-author')
6675
7407
  })]
6676
- }), jsxs(Box, {
7408
+ }), /*#__PURE__*/jsxs(Box, {
6677
7409
  sx: {
6678
7410
  display: 'flex',
6679
7411
  justifyContent: 'space-between',
6680
7412
  fontSize: '13px'
6681
7413
  },
6682
- children: [jsx(Typography, {
7414
+ children: [/*#__PURE__*/jsx(Typography, {
6683
7415
  variant: "body2",
6684
7416
  children: (_formatDate = formatDate(preset.updated)) != null ? _formatDate : t('workspace-info-no-date-provided')
6685
- }), jsx(Typography, {
7417
+ }), /*#__PURE__*/jsx(Typography, {
6686
7418
  variant: "body2",
6687
7419
  children: (_preset$updatedBy = preset.updatedBy) != null ? _preset$updatedBy : t('workspace-info-unknown-author')
6688
7420
  })]
6689
- }), jsx(Divider, {
7421
+ }), /*#__PURE__*/jsx(Divider, {
6690
7422
  sx: {
6691
7423
  my: 0.75
6692
7424
  }
6693
- }), jsxs(Box, {
7425
+ }), /*#__PURE__*/jsxs(Box, {
6694
7426
  sx: {
6695
7427
  display: 'flex',
6696
7428
  justifyContent: 'space-between'
6697
7429
  },
6698
- children: [jsx(Typography, {
7430
+ children: [/*#__PURE__*/jsx(Typography, {
6699
7431
  color: "text.secondary",
6700
7432
  variant: "caption",
6701
7433
  children: t('workspace-info-created')
6702
- }), jsx(Typography, {
7434
+ }), /*#__PURE__*/jsx(Typography, {
6703
7435
  color: "text.secondary",
6704
7436
  variant: "caption",
6705
7437
  children: t('workspace-info-created-by')
6706
7438
  })]
6707
- }), jsxs(Box, {
7439
+ }), /*#__PURE__*/jsxs(Box, {
6708
7440
  sx: {
6709
7441
  display: 'flex',
6710
7442
  justifyContent: 'space-between',
6711
7443
  fontSize: '13px'
6712
7444
  },
6713
- children: [jsx(Typography, {
7445
+ children: [/*#__PURE__*/jsx(Typography, {
6714
7446
  variant: "body2",
6715
7447
  children: (_formatDate2 = formatDate(preset.date)) != null ? _formatDate2 : t('workspace-info-no-date-provided')
6716
- }), jsx(Typography, {
7448
+ }), /*#__PURE__*/jsx(Typography, {
6717
7449
  variant: "body2",
6718
7450
  children: (_preset$username = preset.username) != null ? _preset$username : t('workspace-info-unknown-author')
6719
7451
  })]
@@ -6725,10 +7457,28 @@ var WorkspacePresetInfo = function WorkspacePresetInfo(_ref) {
6725
7457
  });
6726
7458
  };
6727
7459
 
7460
+ /* *
7461
+ * Licensed under the Apache License, Version 2.0 (the "License");
7462
+ * you may not use this file except in compliance with the License.
7463
+ * You may obtain a copy of the License at
7464
+ *
7465
+ * http://www.apache.org/licenses/LICENSE-2.0
7466
+ *
7467
+ * Unless required by applicable law or agreed to in writing, software
7468
+ * distributed under the License is distributed on an "AS IS" BASIS,
7469
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7470
+ * See the License for the specific language governing permissions and
7471
+ * limitations under the License.
7472
+ *
7473
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7474
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
7475
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7476
+ * */
7477
+
6728
7478
  var WORKSPACE_SELECT_LIST_ROW_HEIGHT = 40;
6729
7479
  var getPresetIcon = function getPresetIcon(preset, currentUsername) {
6730
7480
  if (preset.scope === 'system') {
6731
- return jsx(WorkspacePresetsSystemIcon, {
7481
+ return /*#__PURE__*/jsx(WorkspacePresetsSystemIcon, {
6732
7482
  "data-testid": "systemPresetIcon",
6733
7483
  sx: {
6734
7484
  color: 'geowebColors.typographyAndIcons.systemScopeIcon'
@@ -6737,14 +7487,14 @@ var getPresetIcon = function getPresetIcon(preset, currentUsername) {
6737
7487
  }
6738
7488
  if (preset.is_shared) {
6739
7489
  if (preset.username && preset.username === currentUsername) {
6740
- return jsx(SharedPresetsMyUser, {
7490
+ return /*#__PURE__*/jsx(SharedPresetsMyUser, {
6741
7491
  "data-testid": "sharedByMeIcon",
6742
7492
  sx: {
6743
7493
  color: 'geowebColors.typographyAndIcons.userScopeIcon'
6744
7494
  }
6745
7495
  });
6746
7496
  }
6747
- return jsx(SharedPresetsOtherUsers, {
7497
+ return /*#__PURE__*/jsx(SharedPresetsOtherUsers, {
6748
7498
  "data-testid": "sharedByOtherIcon",
6749
7499
  sx: {
6750
7500
  color: 'geowebColors.typographyAndIcons.sharedByOthersIcon'
@@ -6752,7 +7502,7 @@ var getPresetIcon = function getPresetIcon(preset, currentUsername) {
6752
7502
  });
6753
7503
  }
6754
7504
  if (preset.username && preset.username === currentUsername) {
6755
- return jsx(WorkspacePresetsMyIcon, {
7505
+ return /*#__PURE__*/jsx(WorkspacePresetsMyIcon, {
6756
7506
  "data-testid": "myPrivatePresetIcon",
6757
7507
  sx: {
6758
7508
  color: 'geowebColors.typographyAndIcons.userScopeIcon'
@@ -6808,6 +7558,7 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
6808
7558
  return onClick(WorkspacePresetAction.COPY_TO_CLIPBOARD);
6809
7559
  }
6810
7560
  }];
7561
+
6811
7562
  // Show "Edit" if it's your own user-scoped preset OR you're an admin
6812
7563
  if (workspacePreset.scope === SystemScope.user && (auth == null ? void 0 : auth.username) === workspacePreset.username || isAdmin) {
6813
7564
  menuItems.push({
@@ -6817,6 +7568,7 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
6817
7568
  }
6818
7569
  });
6819
7570
  }
7571
+
6820
7572
  // Show "Share/Unshare" only if it's your own user-scoped preset
6821
7573
  if (workspacePreset.scope === SystemScope.user && (auth == null ? void 0 : auth.username) === workspacePreset.username) {
6822
7574
  menuItems.push({
@@ -6828,12 +7580,12 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
6828
7580
  });
6829
7581
  }
6830
7582
  var description = (_workspacePreset$desc = workspacePreset == null ? void 0 : workspacePreset.description) != null ? _workspacePreset$desc : '';
6831
- var tooltipContent = jsxs(Box, {
6832
- children: [jsx(Typography, {
7583
+ var tooltipContent = /*#__PURE__*/jsxs(Box, {
7584
+ children: [/*#__PURE__*/jsx(Typography, {
6833
7585
  fontWeight: 600,
6834
7586
  variant: "body2",
6835
7587
  children: workspacePreset.title
6836
- }), !!description && jsx(Typography, {
7588
+ }), !!description && /*#__PURE__*/jsx(Typography, {
6837
7589
  variant: "body2",
6838
7590
  children: description
6839
7591
  })]
@@ -6846,7 +7598,7 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
6846
7598
  }
6847
7599
  });
6848
7600
  }
6849
- return jsx(ListItem, {
7601
+ return /*#__PURE__*/jsx(ListItem, {
6850
7602
  disablePadding: true,
6851
7603
  sx: {
6852
7604
  mb: 0.5,
@@ -6872,7 +7624,7 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
6872
7624
  color: 'geowebColors.typographyAndIcons.text'
6873
7625
  }
6874
7626
  },
6875
- children: jsxs(ListItemButton, {
7627
+ children: /*#__PURE__*/jsxs(ListItemButton, {
6876
7628
  "aria-label": testIdPrefix,
6877
7629
  "data-testid": testIdPrefix + "-selectListRow",
6878
7630
  onClick: function onClick(event) {
@@ -6891,14 +7643,14 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
6891
7643
  py: 1,
6892
7644
  height: WORKSPACE_SELECT_LIST_ROW_HEIGHT + "px"
6893
7645
  },
6894
- children: [jsx(ListItemIcon, {
7646
+ children: [/*#__PURE__*/jsx(ListItemIcon, {
6895
7647
  children: getPresetIcon(workspacePreset, auth == null ? void 0 : auth.username)
6896
- }), jsx(ListItemText, {
6897
- primary: jsx(CustomTooltip, {
7648
+ }), /*#__PURE__*/jsx(ListItemText, {
7649
+ primary: /*#__PURE__*/jsx(CustomTooltip, {
6898
7650
  enterDelay: 300,
6899
7651
  placement: "bottom",
6900
7652
  title: tooltipContent,
6901
- children: jsx(Box, {
7653
+ children: /*#__PURE__*/jsx(Box, {
6902
7654
  component: "span",
6903
7655
  sx: {
6904
7656
  overflow: 'hidden',
@@ -6906,17 +7658,17 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
6906
7658
  whiteSpace: 'nowrap',
6907
7659
  display: 'block'
6908
7660
  },
6909
- children: jsx(SearchHighlight, {
7661
+ children: /*#__PURE__*/jsx(SearchHighlight, {
6910
7662
  search: searchQuery,
6911
7663
  text: workspacePreset == null ? void 0 : workspacePreset.title
6912
7664
  })
6913
7665
  })
6914
7666
  }),
6915
- secondary: jsx(CustomTooltip, {
7667
+ secondary: /*#__PURE__*/jsx(CustomTooltip, {
6916
7668
  enterDelay: 300,
6917
7669
  placement: "bottom",
6918
7670
  title: tooltipContent,
6919
- children: jsx(Box, {
7671
+ children: /*#__PURE__*/jsx(Box, {
6920
7672
  component: "span",
6921
7673
  sx: {
6922
7674
  overflow: 'hidden',
@@ -6924,7 +7676,7 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
6924
7676
  WebkitLineClamp: 1,
6925
7677
  WebkitBoxOrient: 'vertical'
6926
7678
  },
6927
- children: jsx(SearchHighlight, {
7679
+ children: /*#__PURE__*/jsx(SearchHighlight, {
6928
7680
  search: searchQuery,
6929
7681
  text: description
6930
7682
  })
@@ -6933,19 +7685,19 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
6933
7685
  sx: {
6934
7686
  margin: 0
6935
7687
  }
6936
- }), !!isEditable && jsx(Grid, {
7688
+ }), !!isEditable && /*#__PURE__*/jsx(Grid, {
6937
7689
  sx: {
6938
7690
  minWidth: 72,
6939
7691
  marginLeft: 2
6940
7692
  },
6941
- children: jsxs(Grid, {
7693
+ children: /*#__PURE__*/jsxs(Grid, {
6942
7694
  sx: {
6943
7695
  display: 'flex',
6944
7696
  alignItems: 'center',
6945
7697
  justifyContent: 'flex-end',
6946
7698
  gap: 0.5
6947
7699
  },
6948
- children: [!!workspacePreset.id && jsx(CustomIconButton, {
7700
+ children: [!!workspacePreset.id && /*#__PURE__*/jsx(CustomIconButton, {
6949
7701
  "data-testid": testIdPrefix + "-listInfoButton",
6950
7702
  isSelected: isInfoOpen,
6951
7703
  onClick: onOpenInfoClick,
@@ -6962,10 +7714,10 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
6962
7714
  },
6963
7715
  tooltipTitle: t('workspace-info-tooltip'),
6964
7716
  variant: "flat",
6965
- children: jsx(Info, {
7717
+ children: /*#__PURE__*/jsx(Info, {
6966
7718
  fontSize: "small"
6967
7719
  })
6968
- }), jsx(ToggleMenu, {
7720
+ }), /*#__PURE__*/jsx(ToggleMenu, {
6969
7721
  buttonTestId: testIdPrefix + "-listOptionsButton",
6970
7722
  isDefaultOpen: isOptionsMenuOpen,
6971
7723
  menuItems: menuItems,
@@ -6978,6 +7730,24 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
6978
7730
  });
6979
7731
  };
6980
7732
 
7733
+ /* *
7734
+ * Licensed under the Apache License, Version 2.0 (the "License");
7735
+ * you may not use this file except in compliance with the License.
7736
+ * You may obtain a copy of the License at
7737
+ *
7738
+ * http://www.apache.org/licenses/LICENSE-2.0
7739
+ *
7740
+ * Unless required by applicable law or agreed to in writing, software
7741
+ * distributed under the License is distributed on an "AS IS" BASIS,
7742
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7743
+ * See the License for the specific language governing permissions and
7744
+ * limitations under the License.
7745
+ *
7746
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7747
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
7748
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7749
+ * */
7750
+
6981
7751
  var RowComponent = function RowComponent(_ref) {
6982
7752
  var index = _ref.index,
6983
7753
  style = _ref.style,
@@ -6992,11 +7762,11 @@ var RowComponent = function RowComponent(_ref) {
6992
7762
  searchQuery = _ref.searchQuery,
6993
7763
  testIdPrefix = _ref.testIdPrefix;
6994
7764
  var preset = items[index];
6995
- return jsx("div", {
7765
+ return /*#__PURE__*/jsx("div", {
6996
7766
  style: Object.assign({}, style, {
6997
7767
  paddingRight: '8px'
6998
7768
  }),
6999
- children: jsx(WorkspaceSelectListRow, {
7769
+ children: /*#__PURE__*/jsx(WorkspaceSelectListRow, {
7000
7770
  infoOpenPresetId: infoOpenPresetId,
7001
7771
  isAdmin: isAdmin,
7002
7772
  isEditable: isEditable,
@@ -7012,6 +7782,7 @@ var RowComponent = function RowComponent(_ref) {
7012
7782
  };
7013
7783
  var MIN_HEIGHT_SCROLLABLE_LIST = 88; // Slightly less than 2 rows
7014
7784
  var LIST_PADDING_TOP = 8;
7785
+
7015
7786
  // row height = height + margin
7016
7787
  var rowHeight = WORKSPACE_SELECT_LIST_ROW_HEIGHT + 12;
7017
7788
  var WorkspaceSelectList = function WorkspaceSelectList(_ref2) {
@@ -7034,26 +7805,26 @@ var WorkspaceSelectList = function WorkspaceSelectList(_ref2) {
7034
7805
  var items = React.useMemo(function () {
7035
7806
  return !hideNewWorkspace ? [newPresetTruthy].concat(workspacePresets) : workspacePresets;
7036
7807
  }, [hideNewWorkspace, newPresetTruthy, workspacePresets]);
7037
- return jsxs(Box, {
7808
+ return /*#__PURE__*/jsxs(Box, {
7038
7809
  "data-testid": testIdPrefix + "-selectList",
7039
7810
  sx: {
7040
7811
  height: '100%',
7041
7812
  minHeight: MIN_HEIGHT_SCROLLABLE_LIST,
7042
7813
  overflow: 'hidden'
7043
7814
  },
7044
- children: [jsxs(Box, {
7815
+ children: [/*#__PURE__*/jsxs(Box, {
7045
7816
  sx: {
7046
7817
  marginBottom: '4px',
7047
7818
  fontSize: '12px',
7048
7819
  ml: 0.5
7049
7820
  },
7050
7821
  children: [workspacePresets.length, " ", t('workspace-results')]
7051
- }), jsx(Box, {
7822
+ }), /*#__PURE__*/jsx(Box, {
7052
7823
  sx: {
7053
7824
  paddingTop: LIST_PADDING_TOP + "px",
7054
7825
  height: "calc(100% - 24px)"
7055
7826
  },
7056
- children: jsx(List$1, {
7827
+ children: /*#__PURE__*/jsx(List$1, {
7057
7828
  rowComponent: RowComponent,
7058
7829
  rowCount: items.length,
7059
7830
  rowHeight: rowHeight,
@@ -7069,6 +7840,10 @@ var WorkspaceSelectList = function WorkspaceSelectList(_ref2) {
7069
7840
  searchQuery: searchQuery,
7070
7841
  testIdPrefix: testIdPrefix
7071
7842
  }
7843
+ // style={{
7844
+ // height: `100%`,
7845
+ // width: '100%',
7846
+ // }}
7072
7847
  })
7073
7848
  })]
7074
7849
  });
@@ -7202,6 +7977,7 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
7202
7977
  var constructInitialProps = function constructInitialProps() {
7203
7978
  switch (viewComponentType) {
7204
7979
  case 'WarningList':
7980
+ case 'WarningsTimeline':
7205
7981
  return currentWarningsPreset;
7206
7982
  case 'TimeSeries':
7207
7983
  return currentTimeSeriesPreset;
@@ -7418,7 +8194,7 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
7418
8194
  closeInfo();
7419
8195
  }
7420
8196
  }, [infoPreset, filteredPresets, closeInfo]);
7421
- return jsxs(Box, {
8197
+ return /*#__PURE__*/jsxs(Box, {
7422
8198
  "data-testid": "viewpreset-selectlist-connect",
7423
8199
  sx: {
7424
8200
  bgcolor: 'geowebColors.background.surface',
@@ -7426,16 +8202,16 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
7426
8202
  flexDirection: 'column',
7427
8203
  height: '100%'
7428
8204
  },
7429
- children: [jsx(Box, {
8205
+ children: [/*#__PURE__*/jsx(Box, {
7430
8206
  sx: {
7431
8207
  height: 4,
7432
8208
  overflow: 'hidden'
7433
8209
  },
7434
- children: !!isViewPresetsListFetching && jsx(LinearProgress, {
8210
+ children: !!isViewPresetsListFetching && /*#__PURE__*/jsx(LinearProgress, {
7435
8211
  color: "secondary",
7436
8212
  "data-testid": "loading-bar"
7437
8213
  })
7438
- }), !isViewPresetsListFetching && !!error && jsx(AlertBanner, Object.assign({
8214
+ }), !isViewPresetsListFetching && !!error && /*#__PURE__*/jsx(AlertBanner, Object.assign({
7439
8215
  info: error.message,
7440
8216
  shouldClose: true,
7441
8217
  title: t('workspace-viewpresets-error')
@@ -7444,10 +8220,10 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
7444
8220
  title: t('workspace-retry'),
7445
8221
  onClick: fetchViewPresets
7446
8222
  }
7447
- })), !error && jsx(SearchField, {
8223
+ })), !error && /*#__PURE__*/jsx(SearchField, {
7448
8224
  searchFilter: viewPresetListSearchQuery,
7449
8225
  setSearchFilter: onSearchFilter
7450
- }), jsxs(Box, {
8226
+ }), /*#__PURE__*/jsxs(Box, {
7451
8227
  sx: {
7452
8228
  display: 'grid',
7453
8229
  gridTemplateColumns: isLabelFilterOpen ? '280px 1fr' : '1fr',
@@ -7457,7 +8233,7 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
7457
8233
  bgcolor: 'geowebColors.background.surface',
7458
8234
  overflow: 'hidden'
7459
8235
  },
7460
- children: [!!isLabelFilterOpen && jsx(Box, {
8236
+ children: [!!isLabelFilterOpen && /*#__PURE__*/jsx(Box, {
7461
8237
  sx: {
7462
8238
  borderRight: '1px solid',
7463
8239
  borderColor: 'divider',
@@ -7465,13 +8241,13 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
7465
8241
  overflowY: 'auto',
7466
8242
  overflowX: 'hidden'
7467
8243
  },
7468
- children: jsx(FormProvider, Object.assign({}, labelsFormMethods, {
7469
- children: jsx(WorkspaceMenuLabelsPanel, {
8244
+ children: /*#__PURE__*/jsx(FormProvider, Object.assign({}, labelsFormMethods, {
8245
+ children: /*#__PURE__*/jsx(WorkspaceMenuLabelsPanel, {
7470
8246
  menuLabels: viewPresetLabelFilters,
7471
8247
  onChange: onLabelsFilterChange
7472
8248
  })
7473
8249
  }))
7474
- }), jsxs(Box, {
8250
+ }), /*#__PURE__*/jsxs(Box, {
7475
8251
  ref: infoPanelAnchorRef,
7476
8252
  sx: {
7477
8253
  display: 'flex',
@@ -7480,7 +8256,7 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
7480
8256
  padding: 1,
7481
8257
  overflow: 'hidden'
7482
8258
  },
7483
- children: [!error && jsxs(Box, {
8259
+ children: [!error && /*#__PURE__*/jsxs(Box, {
7484
8260
  sx: {
7485
8261
  flexShrink: 0,
7486
8262
  display: 'flex',
@@ -7488,14 +8264,14 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
7488
8264
  gap: 1,
7489
8265
  marginBottom: 1
7490
8266
  },
7491
- children: [jsx(Box, {
8267
+ children: [/*#__PURE__*/jsx(Box, {
7492
8268
  sx: {
7493
8269
  display: 'flex',
7494
8270
  flexWrap: 'wrap',
7495
8271
  gap: 1,
7496
8272
  width: '100%'
7497
8273
  },
7498
- children: jsx(Filter, {
8274
+ children: /*#__PURE__*/jsx(Filter, {
7499
8275
  activeLabelFilterCount: activeLabelFilterCount,
7500
8276
  filters: viewPresetListFilters,
7501
8277
  isAllSelected: isAllSelectedForFilters,
@@ -7507,38 +8283,32 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
7507
8283
  showLabelFilterToggle: showLabelFilterToggle,
7508
8284
  showSearchField: false
7509
8285
  })
7510
- }), jsx(Box, {
8286
+ }), /*#__PURE__*/jsx(Box, {
7511
8287
  sx: {
7512
8288
  display: 'flex',
7513
8289
  justifyContent: 'flex-start'
7514
8290
  },
7515
- children: jsx(LastUpdateTime, {
8291
+ children: /*#__PURE__*/jsx(LastUpdateTime, {
7516
8292
  hideLabel: true,
7517
- onPressRefresh: function () {
7518
- var _onPressRefresh = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
7519
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
7520
- while (1) switch (_context3.prev = _context3.next) {
7521
- case 0:
7522
- return _context3.abrupt("return", refreshViewPresets());
7523
- case 1:
7524
- case "end":
7525
- return _context3.stop();
7526
- }
7527
- }, _callee3);
7528
- }));
7529
- function onPressRefresh() {
7530
- return _onPressRefresh.apply(this, arguments);
7531
- }
7532
- return onPressRefresh;
7533
- }()
8293
+ onPressRefresh: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
8294
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
8295
+ while (1) switch (_context3.prev = _context3.next) {
8296
+ case 0:
8297
+ return _context3.abrupt("return", refreshViewPresets());
8298
+ case 1:
8299
+ case "end":
8300
+ return _context3.stop();
8301
+ }
8302
+ }, _callee3);
8303
+ }))
7534
8304
  })
7535
8305
  })]
7536
- }), jsxs(Box, {
8306
+ }), /*#__PURE__*/jsxs(Box, {
7537
8307
  sx: {
7538
8308
  flexGrow: 1,
7539
8309
  minHeight: 0
7540
8310
  },
7541
- children: [jsx(WorkspaceSelectList, {
8311
+ children: [/*#__PURE__*/jsx(WorkspaceSelectList, {
7542
8312
  currentSelectedId: activeViewPresetId || undefined,
7543
8313
  hideNewWorkspace: shouldHideNewWorkspace,
7544
8314
  infoOpenPresetId: infoPreset == null ? void 0 : infoPreset.id,
@@ -7553,7 +8323,7 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
7553
8323
  searchQuery: viewPresetListSearchQuery,
7554
8324
  testIdPrefix: "viewpreset",
7555
8325
  workspacePresets: filteredPresets
7556
- }), jsx(WorkspacePresetInfo, {
8326
+ }), /*#__PURE__*/jsx(WorkspacePresetInfo, {
7557
8327
  anchorEl: infoPanelAnchorRef.current,
7558
8328
  isOpen: Boolean(infoPreset),
7559
8329
  onClose: closeInfo,
@@ -7565,13 +8335,31 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
7565
8335
  });
7566
8336
  };
7567
8337
 
8338
+ /* *
8339
+ * Licensed under the Apache License, Version 2.0 (the "License");
8340
+ * you may not use this file except in compliance with the License.
8341
+ * You may obtain a copy of the License at
8342
+ *
8343
+ * http://www.apache.org/licenses/LICENSE-2.0
8344
+ *
8345
+ * Unless required by applicable law or agreed to in writing, software
8346
+ * distributed under the License is distributed on an "AS IS" BASIS,
8347
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8348
+ * See the License for the specific language governing permissions and
8349
+ * limitations under the License.
8350
+ *
8351
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8352
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
8353
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8354
+ * */
8355
+
7568
8356
  var ViewPresetMenu = function ViewPresetMenu(_ref) {
7569
8357
  var closeMenu = _ref.closeMenu,
7570
8358
  panelId = _ref.panelId,
7571
8359
  _ref$isOpen = _ref.isOpen,
7572
8360
  isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
7573
8361
  _ref$initialIsLabelFi = _ref.initialIsLabelFilterOpen,
7574
- initialIsLabelFilterOpen = _ref$initialIsLabelFi === void 0 ? false : _ref$initialIsLabelFi;
8362
+ initialIsLabelFilterOpen = _ref$initialIsLabelFi === void 0 ? true : _ref$initialIsLabelFi;
7575
8363
  var _useWorkspaceTranslat = useWorkspaceTranslation(),
7576
8364
  t = _useWorkspaceTranslat.t;
7577
8365
  renderCounter.count(ViewPresetMenu.name);
@@ -7600,6 +8388,7 @@ var ViewPresetMenu = function ViewPresetMenu(_ref) {
7600
8388
  });
7601
8389
  updateSpace(parentView.getBoundingClientRect().width);
7602
8390
  widthObserver.observe(parentView);
8391
+
7603
8392
  // eslint-disable-next-line consistent-return
7604
8393
  return function () {
7605
8394
  widthObserver.disconnect();
@@ -7617,12 +8406,12 @@ var ViewPresetMenu = function ViewPresetMenu(_ref) {
7617
8406
  }, []);
7618
8407
  var isLabelFilterVisible = isLabelFilterOpen && hasSpaceForLabelFilter;
7619
8408
  var dialogWidth = isLabelFilterVisible ? 700 : 380;
7620
- return jsx("div", {
8409
+ return /*#__PURE__*/jsx("div", {
7621
8410
  ref: containerRef,
7622
8411
  style: {
7623
8412
  height: '100%'
7624
8413
  },
7625
- children: jsx(CustomDialog, {
8414
+ children: /*#__PURE__*/jsx(CustomDialog, {
7626
8415
  "data-testid": "workspace-viewpreset-menu",
7627
8416
  hasLayout: false,
7628
8417
  isResizable: true,
@@ -7638,7 +8427,7 @@ var ViewPresetMenu = function ViewPresetMenu(_ref) {
7638
8427
  height: '90%'
7639
8428
  },
7640
8429
  shouldRenderInline: true,
7641
- children: jsx(ToolContainer, {
8430
+ children: /*#__PURE__*/jsx(ToolContainer, {
7642
8431
  onClick: function onClick(event) {
7643
8432
  event.stopPropagation();
7644
8433
  },
@@ -7648,7 +8437,7 @@ var ViewPresetMenu = function ViewPresetMenu(_ref) {
7648
8437
  height: '100%'
7649
8438
  },
7650
8439
  title: t('workspace-viewpreset-menu'),
7651
- children: jsx(ViewPresetMenuListConnect, {
8440
+ children: /*#__PURE__*/jsx(ViewPresetMenuListConnect, {
7652
8441
  hasSpaceForLabelFilter: hasSpaceForLabelFilter,
7653
8442
  isLabelFilterOpen: isLabelFilterVisible,
7654
8443
  onToggleLabelFilter: hasSpaceForLabelFilter ? handleToggleLabelFilter : undefined,
@@ -7659,6 +8448,24 @@ var ViewPresetMenu = function ViewPresetMenu(_ref) {
7659
8448
  });
7660
8449
  };
7661
8450
 
8451
+ /* *
8452
+ * Licensed under the Apache License, Version 2.0 (the "License");
8453
+ * you may not use this file except in compliance with the License.
8454
+ * You may obtain a copy of the License at
8455
+ *
8456
+ * http://www.apache.org/licenses/LICENSE-2.0
8457
+ *
8458
+ * Unless required by applicable law or agreed to in writing, software
8459
+ * distributed under the License is distributed on an "AS IS" BASIS,
8460
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8461
+ * See the License for the specific language governing permissions and
8462
+ * limitations under the License.
8463
+ *
8464
+ * Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8465
+ * Copyright 2026 - Finnish Meteorological Institute (FMI)
8466
+ * Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
8467
+ * */
8468
+
7662
8469
  var PastePresetDialog = function PastePresetDialog(_ref) {
7663
8470
  var isOpen = _ref.isOpen,
7664
8471
  mode = _ref.mode,
@@ -7672,6 +8479,7 @@ var PastePresetDialog = function PastePresetDialog(_ref) {
7672
8479
  var _React$useState2 = React.useState(),
7673
8480
  validationError = _React$useState2[0],
7674
8481
  setValidationError = _React$useState2[1];
8482
+
7675
8483
  // Reset state when dialog closes
7676
8484
  React.useEffect(function () {
7677
8485
  if (!isOpen) {
@@ -7709,19 +8517,19 @@ var PastePresetDialog = function PastePresetDialog(_ref) {
7709
8517
  var confirmLabel = isWorkspace ? t('workspace-paste-load-button') : t('workspace-paste-load-viewpreset-button');
7710
8518
  var fieldLabel = isWorkspace ? t('workspace-paste-field-label') : t('workspace-paste-viewpreset-field-label');
7711
8519
  var isConfirmDisabled = !pastedText.trim() || Boolean(validationError);
7712
- return jsx(CustomDialog, {
7713
- actions: jsxs(Box, {
8520
+ return /*#__PURE__*/jsx(CustomDialog, {
8521
+ actions: /*#__PURE__*/jsxs(Box, {
7714
8522
  sx: {
7715
8523
  display: 'flex',
7716
8524
  gap: 1,
7717
8525
  justifyContent: 'flex-end'
7718
8526
  },
7719
- children: [jsx(Button, {
8527
+ children: [/*#__PURE__*/jsx(Button, {
7720
8528
  "data-testid": "paste-preset-cancel",
7721
8529
  onClick: onClose,
7722
8530
  variant: "tertiary",
7723
8531
  children: t('workspace-cancel')
7724
- }), jsx(Button, {
8532
+ }), /*#__PURE__*/jsx(Button, {
7725
8533
  "data-testid": "paste-preset-confirm",
7726
8534
  disabled: isConfirmDisabled,
7727
8535
  onClick: handleSubmit,
@@ -7738,7 +8546,7 @@ var PastePresetDialog = function PastePresetDialog(_ref) {
7738
8546
  mx: 'auto'
7739
8547
  },
7740
8548
  title: dialogTitle,
7741
- children: jsx(TextField, {
8549
+ children: /*#__PURE__*/jsx(TextField, {
7742
8550
  "data-testid": "paste-preset-textarea",
7743
8551
  error: Boolean(validationError),
7744
8552
  fullWidth: true,
@@ -7866,6 +8674,7 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect(_ref) {
7866
8674
  searchQuery: searchQuery
7867
8675
  }));
7868
8676
  }, [dispatch]);
8677
+
7869
8678
  // If we're loading the `New workspace` preset as defined in the FE, use this instead of retrieving from BE
7870
8679
  var onClickNewPreset = React.useCallback(function () {
7871
8680
  dispatch(routerActions.navigateToUrl({
@@ -8117,7 +8926,7 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect(_ref) {
8117
8926
  closeInfo();
8118
8927
  }
8119
8928
  }, [infoPreset, filteredPresets, closeInfo]);
8120
- return jsxs(Box, {
8929
+ return /*#__PURE__*/jsxs(Box, {
8121
8930
  bgcolor: "geowebColors.background.surface",
8122
8931
  "data-testid": "workspace-selectlist-connect",
8123
8932
  style: {
@@ -8126,20 +8935,20 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect(_ref) {
8126
8935
  height: '100%'
8127
8936
  },
8128
8937
  tabIndex: 0,
8129
- children: [jsx(Box, {
8938
+ children: [/*#__PURE__*/jsx(Box, {
8130
8939
  sx: {
8131
8940
  height: 4,
8132
8941
  overflow: 'hidden'
8133
8942
  },
8134
- children: !!isFetching && jsx(LinearProgress, {
8943
+ children: !!isFetching && /*#__PURE__*/jsx(LinearProgress, {
8135
8944
  color: "secondary",
8136
8945
  "data-testid": "loading-bar"
8137
8946
  })
8138
- }), !!error && jsx("div", {
8947
+ }), !!error && /*#__PURE__*/jsx("div", {
8139
8948
  style: {
8140
8949
  whiteSpace: 'normal'
8141
8950
  },
8142
- children: jsx(AlertBanner, Object.assign({
8951
+ children: /*#__PURE__*/jsx(AlertBanner, Object.assign({
8143
8952
  info: error.type === WorkspaceListErrorType.TRANSLATABLE_ERROR ? t(error.key, error.params) : error.message,
8144
8953
  shouldClose: true,
8145
8954
  title: (_GENERIC$AUTH$error$c = {
@@ -8154,17 +8963,17 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect(_ref) {
8154
8963
  }
8155
8964
  }
8156
8965
  }))
8157
- }), !error && jsx(SearchField, {
8966
+ }), !error && /*#__PURE__*/jsx(SearchField, {
8158
8967
  searchFilter: workspaceSearchQuery,
8159
8968
  setSearchFilter: searchFilter
8160
- }), jsxs(Box, {
8969
+ }), /*#__PURE__*/jsxs(Box, {
8161
8970
  sx: {
8162
8971
  display: 'grid',
8163
8972
  gridTemplateColumns: isLabelFilterOpen ? '280px 1fr' : '1fr',
8164
8973
  height: '100%',
8165
8974
  overflow: 'hidden'
8166
8975
  },
8167
- children: [!!isLabelFilterOpen && jsx(Box, {
8976
+ children: [!!isLabelFilterOpen && /*#__PURE__*/jsx(Box, {
8168
8977
  sx: {
8169
8978
  borderRight: '1px solid',
8170
8979
  borderColor: 'divider',
@@ -8172,13 +8981,13 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect(_ref) {
8172
8981
  overflowY: 'auto',
8173
8982
  overflowX: 'hidden'
8174
8983
  },
8175
- children: jsx(FormProvider, Object.assign({}, labelsFormMethods, {
8176
- children: jsx(WorkspaceMenuLabelsPanel, {
8984
+ children: /*#__PURE__*/jsx(FormProvider, Object.assign({}, labelsFormMethods, {
8985
+ children: /*#__PURE__*/jsx(WorkspaceMenuLabelsPanel, {
8177
8986
  menuLabels: labelFilters,
8178
8987
  onChange: onLabelsFilterChange
8179
8988
  })
8180
8989
  }))
8181
- }), jsxs(Box, {
8990
+ }), /*#__PURE__*/jsxs(Box, {
8182
8991
  ref: infoPanelAnchorRef,
8183
8992
  sx: {
8184
8993
  display: 'flex',
@@ -8187,17 +8996,17 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect(_ref) {
8187
8996
  padding: 1,
8188
8997
  overflow: 'hidden'
8189
8998
  },
8190
- children: [!error && jsxs(Box, {
8999
+ children: [!error && /*#__PURE__*/jsxs(Box, {
8191
9000
  sx: {
8192
9001
  marginBottom: 1,
8193
9002
  mx: 0.5
8194
9003
  },
8195
- children: [jsx(Box, {
9004
+ children: [/*#__PURE__*/jsx(Box, {
8196
9005
  sx: {
8197
9006
  display: 'flex',
8198
9007
  width: '100%'
8199
9008
  },
8200
- children: jsx(Filter, {
9009
+ children: /*#__PURE__*/jsx(Filter, {
8201
9010
  activeLabelFilterCount: activeLabelFilterCount,
8202
9011
  filters: workspaceListFilters,
8203
9012
  isAllSelected: isAllSelected,
@@ -8209,12 +9018,12 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect(_ref) {
8209
9018
  showLabelFilterToggle: showLabelFilterToggle,
8210
9019
  showSearchField: false
8211
9020
  })
8212
- }), jsx(Box, {
9021
+ }), /*#__PURE__*/jsx(Box, {
8213
9022
  sx: {
8214
9023
  display: 'flex',
8215
9024
  justifyContent: 'flex-start'
8216
9025
  },
8217
- children: jsx(LastUpdateTime, {
9026
+ children: /*#__PURE__*/jsx(LastUpdateTime, {
8218
9027
  hideLabel: true,
8219
9028
  iconButtonSx: {
8220
9029
  marginLeft: 0
@@ -8224,12 +9033,12 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect(_ref) {
8224
9033
  }
8225
9034
  })
8226
9035
  })]
8227
- }), jsxs(Box, {
9036
+ }), /*#__PURE__*/jsxs(Box, {
8228
9037
  sx: {
8229
9038
  flexGrow: 1,
8230
9039
  minHeight: 0
8231
9040
  },
8232
- children: [jsx(WorkspaceSelectList, {
9041
+ children: [/*#__PURE__*/jsx(WorkspaceSelectList, {
8233
9042
  currentSelectedId: currentView.id || '',
8234
9043
  hideNewWorkspace: shouldHideNewWorkspace,
8235
9044
  infoOpenPresetId: infoPreset == null ? void 0 : infoPreset.id,
@@ -8240,7 +9049,7 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect(_ref) {
8240
9049
  onOpenPresetInfo: onOpenPresetInfo,
8241
9050
  searchQuery: workspaceSearchQuery,
8242
9051
  workspacePresets: filteredPresets
8243
- }), jsx(WorkspacePresetInfo, {
9052
+ }), /*#__PURE__*/jsx(WorkspacePresetInfo, {
8244
9053
  anchorEl: infoPanelAnchorRef.current,
8245
9054
  isOpen: Boolean(infoPreset),
8246
9055
  onClose: closeInfo,
@@ -8252,12 +9061,30 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect(_ref) {
8252
9061
  });
8253
9062
  };
8254
9063
 
9064
+ /* *
9065
+ * Licensed under the Apache License, Version 2.0 (the "License");
9066
+ * you may not use this file except in compliance with the License.
9067
+ * You may obtain a copy of the License at
9068
+ *
9069
+ * http://www.apache.org/licenses/LICENSE-2.0
9070
+ *
9071
+ * Unless required by applicable law or agreed to in writing, software
9072
+ * distributed under the License is distributed on an "AS IS" BASIS,
9073
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9074
+ * See the License for the specific language governing permissions and
9075
+ * limitations under the License.
9076
+ *
9077
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9078
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
9079
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9080
+ * */
9081
+
8255
9082
  var WorkspaceMenu = function WorkspaceMenu(_ref) {
8256
9083
  var _ref$isOpen = _ref.isOpen,
8257
9084
  isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
8258
9085
  closeMenu = _ref.closeMenu,
8259
9086
  _ref$initialIsLabelFi = _ref.initialIsLabelFilterOpen,
8260
- initialIsLabelFilterOpen = _ref$initialIsLabelFi === void 0 ? false : _ref$initialIsLabelFi;
9087
+ initialIsLabelFilterOpen = _ref$initialIsLabelFi === void 0 ? true : _ref$initialIsLabelFi;
8261
9088
  var _useWorkspaceTranslat = useWorkspaceTranslation(),
8262
9089
  t = _useWorkspaceTranslat.t;
8263
9090
  var _React$useState = React.useState(initialIsLabelFilterOpen),
@@ -8269,7 +9096,7 @@ var WorkspaceMenu = function WorkspaceMenu(_ref) {
8269
9096
  });
8270
9097
  }, []);
8271
9098
  var dialogWidth = isLabelFilterOpen ? 700 : 483;
8272
- return jsx(CustomDialog, {
9099
+ return /*#__PURE__*/jsx(CustomDialog, {
8273
9100
  "data-testid": "workspace-menu",
8274
9101
  hasLayout: false,
8275
9102
  isResizable: true,
@@ -8296,7 +9123,7 @@ var WorkspaceMenu = function WorkspaceMenu(_ref) {
8296
9123
  }
8297
9124
  }
8298
9125
  },
8299
- children: jsx(ToolContainer, {
9126
+ children: /*#__PURE__*/jsx(ToolContainer, {
8300
9127
  onClick: function onClick(event) {
8301
9128
  event.stopPropagation();
8302
9129
  },
@@ -8306,7 +9133,7 @@ var WorkspaceMenu = function WorkspaceMenu(_ref) {
8306
9133
  height: '100%'
8307
9134
  },
8308
9135
  title: t('workspace-menu'),
8309
- children: jsx(WorkspaceSelectListConnect, {
9136
+ children: /*#__PURE__*/jsx(WorkspaceSelectListConnect, {
8310
9137
  isLabelFilterOpen: isLabelFilterOpen,
8311
9138
  onToggleLabelFilter: handleToggleLabelFilter
8312
9139
  })
@@ -8314,6 +9141,24 @@ var WorkspaceMenu = function WorkspaceMenu(_ref) {
8314
9141
  }, isLabelFilterOpen ? 'wide' : 'narrow');
8315
9142
  };
8316
9143
 
9144
+ /* *
9145
+ * Licensed under the Apache License, Version 2.0 (the "License");
9146
+ * you may not use this file except in compliance with the License.
9147
+ * You may obtain a copy of the License at
9148
+ *
9149
+ * http://www.apache.org/licenses/LICENSE-2.0
9150
+ *
9151
+ * Unless required by applicable law or agreed to in writing, software
9152
+ * distributed under the License is distributed on an "AS IS" BASIS,
9153
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9154
+ * See the License for the specific language governing permissions and
9155
+ * limitations under the License.
9156
+ *
9157
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9158
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
9159
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
9160
+ * */
9161
+
8317
9162
  var workspacePresetOptionId = 'workspaceMenuButton';
8318
9163
  var viewPresetOptionId = 'viewpreset-options-toolbutton';
8319
9164
  var WorkspaceMenuButton = function WorkspaceMenuButton(_ref) {
@@ -8333,33 +9178,33 @@ var WorkspaceMenuButton = function WorkspaceMenuButton(_ref) {
8333
9178
  };
8334
9179
  var _useWorkspaceTranslat = useWorkspaceTranslation(),
8335
9180
  t = _useWorkspaceTranslat.t;
8336
- return jsxs(Box, {
9181
+ return /*#__PURE__*/jsxs(Box, {
8337
9182
  sx: {
8338
9183
  display: 'flex',
8339
9184
  alignItems: 'center',
8340
9185
  flexGrow: 1,
8341
9186
  minWidth: 0
8342
9187
  },
8343
- children: [jsx(CustomTooltip, {
9188
+ children: [/*#__PURE__*/jsx(CustomTooltip, {
8344
9189
  slotProps: {
8345
9190
  transition: {
8346
9191
  exit: false
8347
9192
  }
8348
9193
  },
8349
- title: !showMenu && jsxs(Fragment, {
8350
- children: [jsx(Box, {
9194
+ title: !showMenu && /*#__PURE__*/jsxs(Fragment, {
9195
+ children: [/*#__PURE__*/jsx(Box, {
8351
9196
  component: "span",
8352
9197
  sx: {
8353
9198
  fontWeight: 'bold',
8354
9199
  display: 'block'
8355
9200
  },
8356
9201
  children: t('workspace-menu')
8357
- }), jsx(Box, {
9202
+ }), /*#__PURE__*/jsx(Box, {
8358
9203
  component: "span",
8359
9204
  children: t('workspace-currently') + ": " + title
8360
9205
  })]
8361
9206
  }),
8362
- children: jsx(CustomToggleButton, {
9207
+ children: /*#__PURE__*/jsx(CustomToggleButton, {
8363
9208
  "aria-label": "workspace menu",
8364
9209
  "data-testid": id,
8365
9210
  disableRipple: true,
@@ -8390,7 +9235,7 @@ var WorkspaceMenuButton = function WorkspaceMenuButton(_ref) {
8390
9235
  }
8391
9236
  },
8392
9237
  variant: "tool",
8393
- children: jsx(Box, {
9238
+ children: /*#__PURE__*/jsx(Box, {
8394
9239
  component: "span",
8395
9240
  sx: {
8396
9241
  flexGrow: 1,
@@ -8403,7 +9248,7 @@ var WorkspaceMenuButton = function WorkspaceMenuButton(_ref) {
8403
9248
  children: title
8404
9249
  })
8405
9250
  })
8406
- }), jsx(WorkspaceMenu, {
9251
+ }), /*#__PURE__*/jsx(WorkspaceMenu, {
8407
9252
  closeMenu: function closeMenu() {
8408
9253
  return onToggleDialog == null ? void 0 : onToggleDialog(false);
8409
9254
  },
@@ -8412,6 +9257,24 @@ var WorkspaceMenuButton = function WorkspaceMenuButton(_ref) {
8412
9257
  });
8413
9258
  };
8414
9259
 
9260
+ /* *
9261
+ * Licensed under the Apache License, Version 2.0 (the "License");
9262
+ * you may not use this file except in compliance with the License.
9263
+ * You may obtain a copy of the License at
9264
+ *
9265
+ * http://www.apache.org/licenses/LICENSE-2.0
9266
+ *
9267
+ * Unless required by applicable law or agreed to in writing, software
9268
+ * distributed under the License is distributed on an "AS IS" BASIS,
9269
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9270
+ * See the License for the specific language governing permissions and
9271
+ * limitations under the License.
9272
+ *
9273
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9274
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
9275
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
9276
+ * */
9277
+
8415
9278
  var workspaceOptionsButtonId = 'workspace-options-toolbutton';
8416
9279
  var WorkspaceOptions = function WorkspaceOptions(_ref) {
8417
9280
  var _ref$id = _ref.id,
@@ -8468,7 +9331,7 @@ var WorkspaceOptions = function WorkspaceOptions(_ref) {
8468
9331
  callback: handleDelete
8469
9332
  }]);
8470
9333
  var renderButton = function renderButton() {
8471
- return jsxs(CustomIconButton, {
9334
+ return /*#__PURE__*/jsxs(CustomIconButton, {
8472
9335
  "aria-label": "workspace options",
8473
9336
  "data-testid": id,
8474
9337
  disabled: isDisabled,
@@ -8486,7 +9349,7 @@ var WorkspaceOptions = function WorkspaceOptions(_ref) {
8486
9349
  }
8487
9350
  },
8488
9351
  variant: "tool",
8489
- children: [jsx(Options, {}), jsxs(Menu, {
9352
+ children: [/*#__PURE__*/jsx(Options, {}), /*#__PURE__*/jsxs(Menu, {
8490
9353
  anchorEl: anchorEl,
8491
9354
  anchorOrigin: {
8492
9355
  vertical: 21,
@@ -8512,11 +9375,11 @@ var WorkspaceOptions = function WorkspaceOptions(_ref) {
8512
9375
  fontSize: 16
8513
9376
  }
8514
9377
  },
8515
- children: [jsx(ListSubheader, {
9378
+ children: [/*#__PURE__*/jsx(ListSubheader, {
8516
9379
  sx: {
8517
9380
  paddingTop: '8px'
8518
9381
  },
8519
- children: jsx(Typography, {
9382
+ children: /*#__PURE__*/jsx(Typography, {
8520
9383
  sx: {
8521
9384
  letterSpacing: '0.4px',
8522
9385
  fontSize: 12
@@ -8526,7 +9389,7 @@ var WorkspaceOptions = function WorkspaceOptions(_ref) {
8526
9389
  }), options.map(function (_ref2) {
8527
9390
  var title = _ref2.title,
8528
9391
  callback = _ref2.callback;
8529
- return jsx(MenuItem, {
9392
+ return /*#__PURE__*/jsx(MenuItem, {
8530
9393
  disabled: !callback,
8531
9394
  onClick: callback,
8532
9395
  children: title
@@ -8535,7 +9398,7 @@ var WorkspaceOptions = function WorkspaceOptions(_ref) {
8535
9398
  })]
8536
9399
  });
8537
9400
  };
8538
- return isDisabled ? renderButton() : jsx(CustomTooltip, {
9401
+ return isDisabled ? renderButton() : /*#__PURE__*/jsx(CustomTooltip, {
8539
9402
  slotProps: {
8540
9403
  transition: {
8541
9404
  exit: false
@@ -8546,6 +9409,24 @@ var WorkspaceOptions = function WorkspaceOptions(_ref) {
8546
9409
  });
8547
9410
  };
8548
9411
 
9412
+ /* *
9413
+ * Licensed under the Apache License, Version 2.0 (the "License");
9414
+ * you may not use this file except in compliance with the License.
9415
+ * You may obtain a copy of the License at
9416
+ *
9417
+ * http://www.apache.org/licenses/LICENSE-2.0
9418
+ *
9419
+ * Unless required by applicable law or agreed to in writing, software
9420
+ * distributed under the License is distributed on an "AS IS" BASIS,
9421
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9422
+ * See the License for the specific language governing permissions and
9423
+ * limitations under the License.
9424
+ *
9425
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9426
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
9427
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9428
+ * */
9429
+
8549
9430
  var LoadingIndicatorConnect = function LoadingIndicatorConnect(_ref) {
8550
9431
  var panelId = _ref.panelId;
8551
9432
  var isLoading = useSelector(function (store) {
@@ -8556,26 +9437,26 @@ var LoadingIndicatorConnect = function LoadingIndicatorConnect(_ref) {
8556
9437
  });
8557
9438
  var _useWorkspaceTranslat = useWorkspaceTranslation(),
8558
9439
  t = _useWorkspaceTranslat.t;
8559
- return jsx(CustomTooltip, {
9440
+ return /*#__PURE__*/jsx(CustomTooltip, {
8560
9441
  title: isLoading ? t('workspace-loading-indicator-loading') : t('workspace-loading-indicator-idle'),
8561
- children: jsxs("span", {
9442
+ children: /*#__PURE__*/jsxs("span", {
8562
9443
  style: {
8563
9444
  height: '100%'
8564
9445
  },
8565
- children: [jsx("span", {
9446
+ children: [/*#__PURE__*/jsx("span", {
8566
9447
  style: {
8567
9448
  position: 'relative',
8568
9449
  zIndex: 2
8569
9450
  },
8570
- children: isLoading ? jsx(CloudLoading, {
9451
+ children: isLoading ? /*#__PURE__*/jsx(CloudLoading, {
8571
9452
  "data-testid": "cloudicon-loading",
8572
9453
  style: {
8573
9454
  fill: '#186DFF'
8574
9455
  }
8575
- }) : jsx(CloudIdle, {
9456
+ }) : /*#__PURE__*/jsx(CloudIdle, {
8576
9457
  "data-testid": "cloudicon-idle"
8577
9458
  })
8578
- }), getMapLoadingPercentage !== 100 && jsx(LoadingIndicatorProgressBar, {
9459
+ }), getMapLoadingPercentage !== 100 && /*#__PURE__*/jsx(LoadingIndicatorProgressBar, {
8579
9460
  progressPercentage: getMapLoadingPercentage
8580
9461
  })]
8581
9462
  })
@@ -8584,7 +9465,6 @@ var LoadingIndicatorConnect = function LoadingIndicatorConnect(_ref) {
8584
9465
 
8585
9466
  var _excluded$4 = ["title", "scope"];
8586
9467
  var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_ref) {
8587
- var _currentWorkspace$sco, _currentViewPreset$ab, _currentViewPreset$de, _currentViewPreset$la, _ref7, _currentWorkspacePres;
8588
9468
  var panelId = _ref.panelId,
8589
9469
  isViewPresetDialogOpen = _ref.isViewPresetDialogOpen;
8590
9470
  var dispatch = useDispatch();
@@ -8599,13 +9479,12 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
8599
9479
  var activeViewPresetId = useSelector(function (store) {
8600
9480
  return getViewPresetActiveId(store, panelId);
8601
9481
  });
8602
- // TODO this should be fetched from the view. But it is currently missing username
8603
- var _useViewPresets = useViewPresets(),
8604
- viewPresets = _useViewPresets.data;
8605
- var currentViewPreset = viewPresets == null ? void 0 : viewPresets.find(function (preset) {
8606
- return preset.id === activeViewPresetId;
9482
+
9483
+ // whole workspace (id/title/abstract/scope + views)
9484
+ var currentWorkspace = useSelector(function (store) {
9485
+ return getWorkspaceState(store);
8607
9486
  });
8608
- var workspaceView = useSelector(function (store) {
9487
+ var thisView = useSelector(function (store) {
8609
9488
  var _getViewById;
8610
9489
  var _ref2 = (_getViewById = getViewById(store, panelId)) != null ? _getViewById : {},
8611
9490
  title = _ref2.title,
@@ -8616,23 +9495,12 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
8616
9495
  scope: scope
8617
9496
  }, restProps);
8618
9497
  }, shallowEqual);
8619
- var liveViewPreset = useSelector(function (store) {
8620
- return getViewPresetToSendToBackend(store, panelId);
8621
- });
8622
- // whole workspace (id/title/abstract/scope + views)
8623
- var currentWorkspace = useSelector(function (store) {
8624
- return getWorkspaceState(store);
8625
- });
8626
- var _useWorkspacePresets = useWorkspacePresets(),
8627
- _useWorkspacePresets$ = _useWorkspacePresets.data,
8628
- workspacePresetList = _useWorkspacePresets$ === void 0 ? [] : _useWorkspacePresets$;
8629
- var currentWorkspacePresetDetails = workspacePresetList.find(function (preset) {
8630
- return preset.id === currentWorkspace.id;
8631
- });
8632
- var workspaceScope = (_currentWorkspace$sco = currentWorkspace == null ? void 0 : currentWorkspace.scope) != null ? _currentWorkspace$sco : 'user';
8633
- var thisView = useSelector(function (store) {
8634
- return getViewById(store, panelId);
8635
- });
9498
+ var workspaceScope = (currentWorkspace == null ? void 0 : currentWorkspace.scope) || 'user';
9499
+ var workspaceOwner = currentWorkspace == null ? void 0 : currentWorkspace.username;
9500
+ var currentViewScope = (thisView == null ? void 0 : thisView.scope) || 'user';
9501
+ var viewpresetOwner = thisView == null ? void 0 : thisView.username;
9502
+ var isWorkspaceOwner = !isAdmin && (!!workspaceOwner && (auth == null ? void 0 : auth.username) === workspaceOwner || !workspaceOwner && workspaceScope === 'user' && isLoggedIn);
9503
+ var isUserPresetCreator = !isAdmin && !!(auth != null && auth.username) && auth.username === viewpresetOwner;
8636
9504
  var viewComponentType = useSelector(function (store) {
8637
9505
  return getViewComponentType(store, panelId);
8638
9506
  });
@@ -8642,27 +9510,32 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
8642
9510
  var relatedSyncGroupIds = useSelector(function (store) {
8643
9511
  return syncGroupsSelectors.getAllTargetGroupsForSource(store, panelId);
8644
9512
  });
8645
- var looksLikeUuid = function looksLikeUuid(string) {
8646
- return !!string && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(string);
8647
- };
8648
- var isActiveWorkspaceView = activeViewPresetId === '';
8649
- var isPresetBacked = !isActiveWorkspaceView && (!!currentViewPreset || looksLikeUuid(activeViewPresetId) && activeViewPresetId !== panelId || looksLikeUuid(workspaceView == null ? void 0 : workspaceView.id) && (workspaceView == null ? void 0 : workspaceView.id) !== (workspaceView == null ? void 0 : workspaceView.mosaicNodeId));
9513
+
9514
+ // Check if viewpreset is inline (plain) or comes from a viewpreset (has a activeViewPresetId)
9515
+ var hasActiveViewPresetId = (activeViewPresetId == null ? void 0 : activeViewPresetId.trim()) !== '';
9516
+ var isPresetBacked = hasActiveViewPresetId && (activeViewPresetId && activeViewPresetId !== panelId || (thisView == null ? void 0 : thisView.id) && (thisView == null ? void 0 : thisView.id) !== (thisView == null ? void 0 : thisView.mosaicNodeId));
8650
9517
  var isPlainWorkspaceView = !isPresetBacked;
9518
+
9519
+ // Regular viewPresets, stored in the db
9520
+ var isPresetActionsEnabled = isLoggedIn && isPresetBacked && (currentViewScope === 'user' && isUserPresetCreator || currentViewScope === 'system' && isAdmin);
9521
+
9522
+ // Workspace inline views, only allow editing if it's a plain view OR you are the owner of the current workspace
9523
+ var canEditWorkspaceViewTitle = isLoggedIn && (workspaceScope === 'user' && isWorkspaceOwner || workspaceScope === 'system' && isAdmin);
8651
9524
  React.useEffect(function () {
8652
9525
  if (hasViewPresetChanges) {
8653
9526
  dispatch(workspaceActions.markWorkspaceChanged());
8654
9527
  }
8655
9528
  }, [hasViewPresetChanges, dispatch]);
8656
- var presetAbstract = (_currentViewPreset$ab = currentViewPreset == null ? void 0 : currentViewPreset["abstract"]) != null ? _currentViewPreset$ab : workspaceView == null ? void 0 : workspaceView["abstract"];
8657
- var presetDescription = (_currentViewPreset$de = currentViewPreset == null ? void 0 : currentViewPreset.description) != null ? _currentViewPreset$de : workspaceView == null ? void 0 : workspaceView.description;
8658
- var presetLabels = (_currentViewPreset$la = currentViewPreset == null ? void 0 : currentViewPreset.labels) != null ? _currentViewPreset$la : workspaceView == null ? void 0 : workspaceView.labels;
8659
- var title = workspaceView.title || t('workspace-mappreset-new');
8660
- var isNewActive = activeViewPresetId === '';
9529
+ var presetAbstract = thisView == null ? void 0 : thisView["abstract"];
9530
+ var presetDescription = thisView == null ? void 0 : thisView.description;
9531
+ var presetLabels = thisView == null ? void 0 : thisView.labels;
9532
+ var title = thisView.title || t('workspace-mappreset-new');
8661
9533
  var showChangedInViewTitle = !!hasViewPresetChanges;
8662
- var isNewForDisplay = isNewActive && !hasViewPresetChanges;
9534
+ var isNewForDisplay = !hasActiveViewPresetId && !hasViewPresetChanges;
8663
9535
  var fullTitle = getPresetTitle(title, showChangedInViewTitle, isNewForDisplay, t);
9536
+
8664
9537
  // Whether or not to display the panelId next to the preset title
8665
- var showPanelId = constructSyncSourceDisplayName(panelId, workspaceView, title + " (" + panelId + ")").includes("(" + panelId + ")");
9538
+ var showPanelId = constructSyncSourceDisplayName(panelId, thisView, title + " (" + panelId + ")").includes("(" + panelId + ")");
8666
9539
  var openViewPresetsDialog = React.useCallback(function (viewPresetDialogOptions) {
8667
9540
  dispatch(viewPresetActions.openViewPresetDialog({
8668
9541
  viewPresetDialog: viewPresetDialogOptions
@@ -8674,6 +9547,7 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
8674
9547
  var constructInitialProps = React.useCallback(function () {
8675
9548
  switch (viewComponentType) {
8676
9549
  case 'WarningList':
9550
+ case 'WarningsTimeline':
8677
9551
  return currentWarningsPreset;
8678
9552
  case 'TimeSeries':
8679
9553
  return timeSeriesSelectors.getTimeSeriesPreset(store.getState(), panelId);
@@ -8801,13 +9675,18 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
8801
9675
  var _React$useState = React.useState(false),
8802
9676
  isPasteDialogOpen = _React$useState[0],
8803
9677
  setIsPasteDialogOpen = _React$useState[1];
9678
+
9679
+ // Retrieve view preset as would be sent to the BE
9680
+ var liveViewPreset = useSelector(function (store) {
9681
+ return getViewPresetToSendToBackend(store, panelId);
9682
+ });
8804
9683
  var onCopyToClipboard = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8805
9684
  var fullPreset, sanitized, json;
8806
9685
  return _regeneratorRuntime().wrap(function _callee$(_context) {
8807
9686
  while (1) switch (_context.prev = _context.next) {
8808
9687
  case 0:
8809
9688
  _context.prev = 0;
8810
- if (!isActiveWorkspaceView) {
9689
+ if (hasActiveViewPresetId) {
8811
9690
  _context.next = 5;
8812
9691
  break;
8813
9692
  }
@@ -8858,7 +9737,7 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
8858
9737
  return _context.stop();
8859
9738
  }
8860
9739
  }, _callee, null, [[0, 23], [5, 11]]);
8861
- })), [activeViewPresetId, auth, dispatch, isActiveWorkspaceView, liveViewPreset, t, title]);
9740
+ })), [activeViewPresetId, auth, dispatch, hasActiveViewPresetId, liveViewPreset, t, title]);
8862
9741
  var onPasteFromClipboard = function onPasteFromClipboard() {
8863
9742
  setIsPasteDialogOpen(true);
8864
9743
  };
@@ -8901,16 +9780,8 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
8901
9780
  });
8902
9781
  }, [isViewPresetDialogOpen, panelId, toggleViewPresetDialog]);
8903
9782
  renderCounter.count(WorkspaceViewTitleConnectNoMemo.name);
8904
- var viewpresetCreator = (currentViewPreset == null ? void 0 : currentViewPreset.username) || '';
8905
- var workspaceOwner = (_ref7 = (_currentWorkspacePres = currentWorkspacePresetDetails == null ? void 0 : currentWorkspacePresetDetails.username) != null ? _currentWorkspacePres : currentWorkspace == null ? void 0 : currentWorkspace.username) != null ? _ref7 : undefined;
8906
- var isUserPresetCreator = !isAdmin && !!(auth != null && auth.username) && auth.username === viewpresetCreator;
8907
- var isWorkspaceOwner = !isAdmin && (!!workspaceOwner && (auth == null ? void 0 : auth.username) === workspaceOwner || !workspaceOwner && workspaceScope === 'user' && isLoggedIn);
8908
- var currentViewScope = (currentViewPreset == null ? void 0 : currentViewPreset.scope) || 'system';
8909
- // Regular viewPresets
8910
- var isEnabled = !isPlainWorkspaceView && isLoggedIn && activeViewPresetId !== '' && (currentViewScope === 'user' && isUserPresetCreator || currentViewScope === 'system' && isAdmin);
8911
- // Workspace views
8912
- var canEditWorkspaceViewTitle = isLoggedIn && (workspaceScope === 'user' && isWorkspaceOwner || workspaceScope === 'system' && isAdmin);
8913
9783
  return (
9784
+ /*#__PURE__*/
8914
9785
  // Zero-length string assignment prevents showing title as an empty object '[object Object]'.
8915
9786
  // in child components. This is a workaround for a limitation in the Tooltip component.
8916
9787
  jsxs(Grid, {
@@ -8922,7 +9793,7 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
8922
9793
  justifyContent: 'space-between'
8923
9794
  },
8924
9795
  title: "",
8925
- children: [jsxs(Box, {
9796
+ children: [/*#__PURE__*/jsxs(Box, {
8926
9797
  sx: {
8927
9798
  display: 'flex',
8928
9799
  alignItems: 'center',
@@ -8930,26 +9801,26 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
8930
9801
  minWidth: 0,
8931
9802
  gap: 1
8932
9803
  },
8933
- children: [jsx(CustomTooltip, {
9804
+ children: [/*#__PURE__*/jsx(CustomTooltip, {
8934
9805
  slotProps: {
8935
9806
  transition: {
8936
9807
  exit: false
8937
9808
  }
8938
9809
  },
8939
- title: !isViewPresetDialogOpen && jsxs(Fragment, {
8940
- children: [jsx(Box, {
9810
+ title: !isViewPresetDialogOpen && /*#__PURE__*/jsxs(Fragment, {
9811
+ children: [/*#__PURE__*/jsx(Box, {
8941
9812
  component: "span",
8942
9813
  sx: {
8943
9814
  fontWeight: 'bold',
8944
9815
  display: 'block'
8945
9816
  },
8946
9817
  children: t('workspace-viewpreset-menu')
8947
- }), jsx(Box, {
9818
+ }), /*#__PURE__*/jsx(Box, {
8948
9819
  component: "span",
8949
9820
  children: t('workspace-currently') + ": " + title
8950
9821
  })]
8951
9822
  }),
8952
- children: jsx(CustomToggleButton, {
9823
+ children: /*#__PURE__*/jsx(CustomToggleButton, {
8953
9824
  "data-testid": "open-viewpresets",
8954
9825
  disableRipple: true,
8955
9826
  onClick: onClickOpenViewPreset,
@@ -8967,7 +9838,7 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
8967
9838
  }
8968
9839
  },
8969
9840
  variant: "tool",
8970
- children: jsxs(Typography, {
9841
+ children: /*#__PURE__*/jsxs(Typography, {
8971
9842
  sx: {
8972
9843
  fontSize: '12px',
8973
9844
  fontStyle: hasViewPresetChanges ? 'italic' : undefined,
@@ -8977,7 +9848,7 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
8977
9848
  whiteSpace: 'nowrap',
8978
9849
  width: '100%'
8979
9850
  },
8980
- children: [fullTitle, showPanelId ? jsx(Box, {
9851
+ children: [fullTitle, showPanelId ? /*#__PURE__*/jsx(Box, {
8981
9852
  component: "span",
8982
9853
  sx: {
8983
9854
  fontStyle: 'normal',
@@ -8989,30 +9860,32 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
8989
9860
  }) : null]
8990
9861
  })
8991
9862
  })
8992
- }), jsx(WorkspaceOptions, {
9863
+ }), /*#__PURE__*/jsx(WorkspaceOptions, {
8993
9864
  copyToClipboardLabel: t('workspace-copy-viewpreset-to-clipboard'),
8994
- handleCopyToClipboard: (isPresetBacked || isActiveWorkspaceView) && isLoggedIn ? onCopyToClipboard : undefined,
8995
- handleDelete: isEnabled ? onDelete : undefined,
8996
- handleEdit: isEnabled ? onEdit : undefined,
9865
+ handleCopyToClipboard:
9866
+ // If stand alone view preset OR inline viewpreset AND logged in
9867
+ (isPresetBacked || !hasActiveViewPresetId) && isLoggedIn ? onCopyToClipboard : undefined,
9868
+ handleDelete: isPresetActionsEnabled ? onDelete : undefined,
9869
+ handleEdit: isPresetActionsEnabled ? onEdit : undefined,
8997
9870
  handleEditTitle: canEditWorkspaceViewTitle ? handleEditTitle : undefined,
8998
9871
  handlePasteFromClipboard: isLoggedIn ? onPasteFromClipboard : undefined,
8999
9872
  handleReset: onReset,
9000
- handleSave: isEnabled ? onSave : undefined,
9873
+ handleSave: isPresetActionsEnabled ? onSave : undefined,
9001
9874
  handleSaveAs: isLoggedIn ? onSaveAs : undefined,
9002
9875
  id: viewPresetOptionId,
9003
9876
  pasteFromClipboardLabel: t('workspace-paste-viewpreset-from-clipboard'),
9004
9877
  showEditTitleOption: true
9005
9878
  })]
9006
- }), jsx(Box, {
9879
+ }), /*#__PURE__*/jsx(Box, {
9007
9880
  sx: {
9008
9881
  display: 'flex',
9009
9882
  alignItems: 'center',
9010
9883
  pt: 0.72
9011
9884
  },
9012
- children: jsx(LoadingIndicatorConnect, {
9885
+ children: /*#__PURE__*/jsx(LoadingIndicatorConnect, {
9013
9886
  panelId: panelId
9014
9887
  })
9015
- }), jsx(PastePresetDialog, {
9888
+ }), /*#__PURE__*/jsx(PastePresetDialog, {
9016
9889
  isOpen: isPasteDialogOpen,
9017
9890
  mode: "viewpreset",
9018
9891
  onClose: function onClose() {
@@ -9025,13 +9898,31 @@ var WorkspaceViewTitleConnectNoMemo = function WorkspaceViewTitleConnectNoMemo(_
9025
9898
  };
9026
9899
  var WorkspaceViewTitleConnect = /*#__PURE__*/React.memo(WorkspaceViewTitleConnectNoMemo);
9027
9900
 
9901
+ /* *
9902
+ * Licensed under the Apache License, Version 2.0 (the "License");
9903
+ * you may not use this file except in compliance with the License.
9904
+ * You may obtain a copy of the License at
9905
+ *
9906
+ * http://www.apache.org/licenses/LICENSE-2.0
9907
+ *
9908
+ * Unless required by applicable law or agreed to in writing, software
9909
+ * distributed under the License is distributed on an "AS IS" BASIS,
9910
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9911
+ * See the License for the specific language governing permissions and
9912
+ * limitations under the License.
9913
+ *
9914
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9915
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
9916
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9917
+ * */
9918
+
9028
9919
  var WorkspaceTileConnect = /*#__PURE__*/React.memo(function (_ref) {
9029
9920
  var _ref$mosaicNodeId = _ref.mosaicNodeId,
9030
9921
  mosaicNodeId = _ref$mosaicNodeId === void 0 ? '' : _ref$mosaicNodeId,
9031
9922
  path = _ref.path,
9032
9923
  componentsLookUp = _ref.componentsLookUp;
9033
9924
  var dispatch = useDispatch();
9034
- useFetchViewPresets(mosaicNodeId);
9925
+ useResetViewPresetFiltersOnRoleChange(mosaicNodeId);
9035
9926
  var view = useSelector(function (store) {
9036
9927
  return getViewById(store, mosaicNodeId);
9037
9928
  });
@@ -9102,6 +9993,7 @@ var WorkspaceTileConnect = /*#__PURE__*/React.memo(function (_ref) {
9102
9993
  };
9103
9994
  // eslint-disable-next-line react-hooks/exhaustive-deps
9104
9995
  }, [registerView, unregisterView]);
9996
+
9105
9997
  // generic componentsLookUp
9106
9998
  var genericComponentsLookupResult = React.useMemo(function () {
9107
9999
  return componentsLookUp({
@@ -9111,6 +10003,7 @@ var WorkspaceTileConnect = /*#__PURE__*/React.memo(function (_ref) {
9111
10003
  initialProps: view == null ? void 0 : view.initialProps
9112
10004
  });
9113
10005
  }, [componentsLookUp, mosaicNodeId, title, view == null ? void 0 : view.componentType, view == null ? void 0 : view.initialProps]);
10006
+
9114
10007
  // default componentsLookUp
9115
10008
  var defaultComponentsLookupResult = React.useMemo(function () {
9116
10009
  return defaultComponentsLookUp({
@@ -9119,21 +10012,21 @@ var WorkspaceTileConnect = /*#__PURE__*/React.memo(function (_ref) {
9119
10012
  mosaicNodeId: mosaicNodeId
9120
10013
  });
9121
10014
  }, [mosaicNodeId, view == null ? void 0 : view.componentType, view == null ? void 0 : view.id]);
9122
- return jsxs(MosaicWindow, {
10015
+ return /*#__PURE__*/jsxs(MosaicWindow, {
9123
10016
  createNode: createNode,
9124
10017
  path: path,
9125
- title: jsx(WorkspaceViewTitleConnect, {
10018
+ title: /*#__PURE__*/jsx(WorkspaceViewTitleConnect, {
9126
10019
  isViewPresetDialogOpen: isViewPresetDialogOpen || false,
9127
10020
  panelId: mosaicNodeId
9128
10021
  }),
9129
- toolbarControls: jsx(WorkspaceControls, {
10022
+ toolbarControls: /*#__PURE__*/jsx(WorkspaceControls, {
9130
10023
  createNode: createNode,
9131
10024
  panelId: mosaicNodeId,
9132
10025
  path: path,
9133
10026
  removeLinkedMap: removeLinkedMap,
9134
10027
  shouldPreventCloseView: shouldPreventCloseView
9135
10028
  }),
9136
- children: [!!isViewPresetsFetching && jsx(LinearProgress, {
10029
+ children: [!!isViewPresetsFetching && /*#__PURE__*/jsx(LinearProgress, {
9137
10030
  color: "secondary",
9138
10031
  "data-testid": "loading-bar",
9139
10032
  sx: {
@@ -9142,18 +10035,18 @@ var WorkspaceTileConnect = /*#__PURE__*/React.memo(function (_ref) {
9142
10035
  top: 0,
9143
10036
  zIndex: 1001
9144
10037
  }
9145
- }), !!errorViewPreset && jsx(Box, {
10038
+ }), !!errorViewPreset && /*#__PURE__*/jsx(Box, {
9146
10039
  sx: {
9147
10040
  position: 'absolute',
9148
10041
  left: 0,
9149
10042
  right: 0,
9150
10043
  zIndex: 1002
9151
10044
  },
9152
- children: jsx(AlertBanner, {
10045
+ children: /*#__PURE__*/jsx(AlertBanner, {
9153
10046
  shouldClose: true,
9154
10047
  title: errorViewPreset
9155
10048
  })
9156
- }), defaultComponentsLookupResult, genericComponentsLookupResult, jsx(ViewPresetMenu, {
10049
+ }), defaultComponentsLookupResult, genericComponentsLookupResult, /*#__PURE__*/jsx(ViewPresetMenu, {
9157
10050
  closeMenu: function closeMenu() {
9158
10051
  toggleViewPresetDialog({
9159
10052
  panelId: mosaicNodeId,
@@ -9166,6 +10059,24 @@ var WorkspaceTileConnect = /*#__PURE__*/React.memo(function (_ref) {
9166
10059
  });
9167
10060
  }, isEqual);
9168
10061
 
10062
+ /* *
10063
+ * Licensed under the Apache License, Version 2.0 (the "License");
10064
+ * you may not use this file except in compliance with the License.
10065
+ * You may obtain a copy of the License at
10066
+ *
10067
+ * http://www.apache.org/licenses/LICENSE-2.0
10068
+ *
10069
+ * Unless required by applicable law or agreed to in writing, software
10070
+ * distributed under the License is distributed on an "AS IS" BASIS,
10071
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10072
+ * See the License for the specific language governing permissions and
10073
+ * limitations under the License.
10074
+ *
10075
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10076
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
10077
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
10078
+ * */
10079
+
9169
10080
  var WorkspaceView = function WorkspaceView(_ref) {
9170
10081
  var screenConfig = _ref.screenConfig,
9171
10082
  componentsLookUp = _ref.componentsLookUp,
@@ -9176,7 +10087,7 @@ var WorkspaceView = function WorkspaceView(_ref) {
9176
10087
  isWorkspaceLoading = _ref$isWorkspaceLoadi === void 0 ? false : _ref$isWorkspaceLoadi;
9177
10088
  var _useWorkspaceTranslat = useWorkspaceTranslation(),
9178
10089
  t = _useWorkspaceTranslat.t;
9179
- var EmptyView = !isWorkspaceLoading && jsxs(Box, {
10090
+ var EmptyView = !isWorkspaceLoading && /*#__PURE__*/jsxs(Box, {
9180
10091
  sx: {
9181
10092
  backgroundColor: 'geowebColors.background.surface',
9182
10093
  display: 'flex',
@@ -9185,12 +10096,12 @@ var WorkspaceView = function WorkspaceView(_ref) {
9185
10096
  alignItems: 'center',
9186
10097
  height: '100%'
9187
10098
  },
9188
- children: [jsx(WebAssetOff, {
10099
+ children: [/*#__PURE__*/jsx(WebAssetOff, {
9189
10100
  sx: {
9190
10101
  fontSize: '150px',
9191
10102
  margin: '20px'
9192
10103
  }
9193
- }), jsx(Typography, {
10104
+ }), /*#__PURE__*/jsx(Typography, {
9194
10105
  sx: {
9195
10106
  color: 'geowebColors.typographyAndIcons.text'
9196
10107
  },
@@ -9217,7 +10128,7 @@ var WorkspaceView = function WorkspaceView(_ref) {
9217
10128
  setActiveWindowId(newViewId);
9218
10129
  }
9219
10130
  };
9220
- return jsx(Box, {
10131
+ return /*#__PURE__*/jsx(Box, {
9221
10132
  sx: {
9222
10133
  height: '100%',
9223
10134
  '.geoweb-mosaic .mosaic-window-title': {
@@ -9229,7 +10140,7 @@ var WorkspaceView = function WorkspaceView(_ref) {
9229
10140
  backgroundColor: 'geowebColors.background.surfaceApp'
9230
10141
  }
9231
10142
  },
9232
- children: jsx(Mosaic, {
10143
+ children: /*#__PURE__*/jsx(Mosaic, {
9233
10144
  className: "geoweb-mosaic",
9234
10145
  initialValue: screenConfig.mosaicNode,
9235
10146
  onRelease: function onRelease(node) {
@@ -9237,7 +10148,7 @@ var WorkspaceView = function WorkspaceView(_ref) {
9237
10148
  },
9238
10149
  renderTile: function renderTile(viewId, path) {
9239
10150
  var windowIsActive = viewId === activeWindowId;
9240
- return jsx(Box, {
10151
+ return /*#__PURE__*/jsx(Box, {
9241
10152
  onClick: function onClick(event) {
9242
10153
  return handleClickOnWindow(event, viewId);
9243
10154
  },
@@ -9263,7 +10174,7 @@ var WorkspaceView = function WorkspaceView(_ref) {
9263
10174
  containerType: 'inline-size'
9264
10175
  };
9265
10176
  },
9266
- children: jsx(WorkspaceTileConnect, {
10177
+ children: /*#__PURE__*/jsx(WorkspaceTileConnect, {
9267
10178
  componentsLookUp: componentsLookUp,
9268
10179
  mosaicNodeId: viewId,
9269
10180
  path: path
@@ -9289,6 +10200,7 @@ var useControlActiveWindowId = function useControlActiveWindowId(screenConfig, a
9289
10200
  }
9290
10201
  // eslint-disable-next-line react-hooks/exhaustive-deps
9291
10202
  }, [screenConfig.id]);
10203
+
9292
10204
  // If active window is no longer in screenConfig then set active window to first window
9293
10205
  React.useEffect(function () {
9294
10206
  var viewIds = screenConfig.views.allIds;
@@ -9298,6 +10210,24 @@ var useControlActiveWindowId = function useControlActiveWindowId(screenConfig, a
9298
10210
  }, [activeWindowId, screenConfig.views, screenConfig.views.allIds, setActiveWindowId]);
9299
10211
  };
9300
10212
 
10213
+ /* *
10214
+ * Licensed under the Apache License, Version 2.0 (the "License");
10215
+ * you may not use this file except in compliance with the License.
10216
+ * You may obtain a copy of the License at
10217
+ *
10218
+ * http://www.apache.org/licenses/LICENSE-2.0
10219
+ *
10220
+ * Unless required by applicable law or agreed to in writing, software
10221
+ * distributed under the License is distributed on an "AS IS" BASIS,
10222
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10223
+ * See the License for the specific language governing permissions and
10224
+ * limitations under the License.
10225
+ *
10226
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10227
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
10228
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
10229
+ * */
10230
+
9301
10231
  var WorkspaceViewConnect = function WorkspaceViewConnect(_ref) {
9302
10232
  var componentsLookUp = _ref.componentsLookUp;
9303
10233
  var dispatch = useDispatch();
@@ -9346,7 +10276,7 @@ var WorkspaceViewConnect = function WorkspaceViewConnect(_ref) {
9346
10276
  dispatch(workspaceActions.teardownComplete());
9347
10277
  }
9348
10278
  }, [mosaicNode, dispatch]);
9349
- return jsx(WorkspaceView, {
10279
+ return /*#__PURE__*/jsx(WorkspaceView, {
9350
10280
  activeWindowId: activeWindowId,
9351
10281
  componentsLookUp: componentsLookUp,
9352
10282
  isWorkspaceLoading: isWorkspaceLoading$1,
@@ -9373,11 +10303,13 @@ var WorkspaceViewConnect = function WorkspaceViewConnect(_ref) {
9373
10303
  * Copyright 2025 - Finnish Meteorological Institute (FMI)
9374
10304
  * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
9375
10305
  * */
10306
+
10307
+
9376
10308
  /**
9377
10309
  * Resets workspace list filter chips when the user's role changes
9378
10310
  * between admin and non-admin.
9379
10311
  */
9380
- var useResetFiltersOnRoleChange = function useResetFiltersOnRoleChange() {
10312
+ var useResetWorkspaceFiltersOnRoleChange = function useResetWorkspaceFiltersOnRoleChange() {
9381
10313
  var dispatch = useDispatch();
9382
10314
  var _useAuthenticationCon = useAuthenticationContext(),
9383
10315
  currentRole = _useAuthenticationCon.currentRole;
@@ -9400,6 +10332,24 @@ var useResetFiltersOnRoleChange = function useResetFiltersOnRoleChange() {
9400
10332
  }, [dispatch, isAdmin, lastAdmin]);
9401
10333
  };
9402
10334
 
10335
+ /* *
10336
+ * Licensed under the Apache License, Version 2.0 (the "License");
10337
+ * you may not use this file except in compliance with the License.
10338
+ * You may obtain a copy of the License at
10339
+ *
10340
+ * http://www.apache.org/licenses/LICENSE-2.0
10341
+ *
10342
+ * Unless required by applicable law or agreed to in writing, software
10343
+ * distributed under the License is distributed on an "AS IS" BASIS,
10344
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10345
+ * See the License for the specific language governing permissions and
10346
+ * limitations under the License.
10347
+ *
10348
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10349
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
10350
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
10351
+ * */
10352
+
9403
10353
  var WorkspaceMenuButtonConnect = function WorkspaceMenuButtonConnect(_ref) {
9404
10354
  var title = _ref.title,
9405
10355
  workspaceId = _ref.workspaceId,
@@ -9419,13 +10369,13 @@ var WorkspaceMenuButtonConnect = function WorkspaceMenuButtonConnect(_ref) {
9419
10369
  isWorkspaceListDialogOpen: isListDialogOpen
9420
10370
  }));
9421
10371
  }, [dispatch]);
9422
- useResetFiltersOnRoleChange();
10372
+ useResetWorkspaceFiltersOnRoleChange();
9423
10373
  var isNew = workspaceId === undefined || workspaceId === '';
9424
10374
  var fullTitle = getPresetTitle(title, hasChanges, isNew, t);
9425
10375
  React.useEffect(function () {
9426
10376
  setDocumentTitle(fullTitle, appTitle);
9427
10377
  }, [fullTitle, appTitle]);
9428
- return jsx(WorkspaceMenuButton, {
10378
+ return /*#__PURE__*/jsx(WorkspaceMenuButton, {
9429
10379
  activeTab: activeTab,
9430
10380
  hasChanges: hasChanges,
9431
10381
  onToggleDialog: setListDialogOpen,
@@ -9643,8 +10593,8 @@ var WorkspaceOptionsConnect = function WorkspaceOptionsConnect(_ref) {
9643
10593
  message: t('workspace-paste-success')
9644
10594
  }));
9645
10595
  }, [dispatch, t]);
9646
- return jsxs(Fragment, {
9647
- children: [jsx(WorkspaceOptions, {
10596
+ return /*#__PURE__*/jsxs(Fragment, {
10597
+ children: [/*#__PURE__*/jsx(WorkspaceOptions, {
9648
10598
  handleCopyToClipboard: isNew ? undefined : onCopyToClipboard,
9649
10599
  handleDelete: getOnDelete(),
9650
10600
  handleEdit: handleEdit(),
@@ -9653,7 +10603,7 @@ var WorkspaceOptionsConnect = function WorkspaceOptionsConnect(_ref) {
9653
10603
  handleSave: handleSave(),
9654
10604
  handleSaveAs: handleSaveAs(),
9655
10605
  isDisabled: !viewIds.length || !isLoggedIn
9656
- }), jsx(PastePresetDialog, {
10606
+ }), /*#__PURE__*/jsx(PastePresetDialog, {
9657
10607
  isOpen: isPasteDialogOpen,
9658
10608
  mode: "workspace",
9659
10609
  onClose: function onClose() {
@@ -9664,24 +10614,42 @@ var WorkspaceOptionsConnect = function WorkspaceOptionsConnect(_ref) {
9664
10614
  });
9665
10615
  };
9666
10616
 
10617
+ /* *
10618
+ * Licensed under the Apache License, Version 2.0 (the "License");
10619
+ * you may not use this file except in compliance with the License.
10620
+ * You may obtain a copy of the License at
10621
+ *
10622
+ * http://www.apache.org/licenses/LICENSE-2.0
10623
+ *
10624
+ * Unless required by applicable law or agreed to in writing, software
10625
+ * distributed under the License is distributed on an "AS IS" BASIS,
10626
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10627
+ * See the License for the specific language governing permissions and
10628
+ * limitations under the License.
10629
+ *
10630
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10631
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
10632
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
10633
+ * */
10634
+
9667
10635
  var WorkspaceTab = function WorkspaceTab(_ref) {
9668
10636
  var title = _ref.title,
9669
10637
  activeTab = _ref.activeTab,
9670
10638
  workspaceId = _ref.workspaceId,
9671
10639
  appTitle = _ref.appTitle;
9672
- return jsxs(Box, {
10640
+ return /*#__PURE__*/jsxs(Box, {
9673
10641
  "data-testid": "workspaceTab",
9674
10642
  sx: {
9675
10643
  display: 'flex',
9676
10644
  flexDirection: 'row',
9677
10645
  alignItems: 'center'
9678
10646
  },
9679
- children: [jsx(WorkspaceMenuButtonConnect, {
10647
+ children: [/*#__PURE__*/jsx(WorkspaceMenuButtonConnect, {
9680
10648
  activeTab: activeTab,
9681
10649
  appTitle: appTitle,
9682
10650
  title: title,
9683
10651
  workspaceId: workspaceId
9684
- }), jsx(WorkspaceOptionsConnect, {
10652
+ }), /*#__PURE__*/jsx(WorkspaceOptionsConnect, {
9685
10653
  title: title,
9686
10654
  workspaceId: workspaceId
9687
10655
  })]
@@ -9761,45 +10729,46 @@ var WorkspacePresetsForm = function WorkspacePresetsForm(_ref) {
9761
10729
  onSubmit();
9762
10730
  };
9763
10731
  var hasFormInput = action === WorkspacePresetAction.DUPLICATE || action === WorkspacePresetAction.SAVE || action === WorkspacePresetAction.SAVE_AS || action === WorkspacePresetAction.EDIT || action === WorkspacePresetAction.EDIT_TITLE || action === WorkspacePresetAction.SAVE_SYSTEM_PRESET || action === WorkspacePresetAction.SAVE_SYSTEM_PRESET_AS;
10732
+
9764
10733
  // disable form inputs
9765
10734
  var isDisabled = isLoading || hasSavedWorkspace && action !== WorkspacePresetAction.EDIT_TITLE;
9766
10735
  var shouldShowLabelsForm = action === WorkspacePresetAction.SAVE_SYSTEM_PRESET_AS || action === WorkspacePresetAction.SAVE_AS || action === WorkspacePresetAction.EDIT;
9767
- return jsxs(Fragment, {
9768
- children: [!!error && !shouldShowTitleError && jsx(Box, {
10736
+ return /*#__PURE__*/jsxs(Fragment, {
10737
+ children: [!!error && !shouldShowTitleError && /*#__PURE__*/jsx(Box, {
9769
10738
  sx: {
9770
10739
  marginBottom: 2
9771
10740
  },
9772
- children: jsx(AlertBanner, {
10741
+ children: /*#__PURE__*/jsx(AlertBanner, {
9773
10742
  title: error.type === WorkspaceListErrorType.TRANSLATABLE_ERROR ? t(error.key, error.params) : error.message
9774
10743
  })
9775
- }), !!hasFormInput && jsx("form", {
10744
+ }), !!hasFormInput && /*#__PURE__*/jsx("form", {
9776
10745
  "data-testid": "workspace-preset-form",
9777
10746
  onSubmit: onSubmitForm,
9778
10747
  style: {
9779
10748
  height: '100%'
9780
10749
  },
9781
- children: isViewsOnly ? jsxs(Fragment, {
9782
- children: [jsx(ReactHookFormHiddenInput, {
10750
+ children: isViewsOnly ? /*#__PURE__*/jsxs(Fragment, {
10751
+ children: [/*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9783
10752
  defaultValue: title,
9784
10753
  name: "title"
9785
- }), jsx(ReactHookFormHiddenInput, {
10754
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9786
10755
  defaultValue: _abstract,
9787
10756
  name: "abstract"
9788
- }), action === WorkspacePresetAction.EDIT_TITLE && jsx(Box, {
10757
+ }), action === WorkspacePresetAction.EDIT_TITLE && /*#__PURE__*/jsx(Box, {
9789
10758
  sx: {
9790
10759
  mt: 3
9791
10760
  },
9792
10761
  children: function (_views$, _thisView$mosaicNodeI, _thisView$title) {
9793
10762
  var thisView = (_views$ = views == null ? void 0 : views[0]) != null ? _views$ : {};
9794
10763
  var mosaicNodeId = (_thisView$mosaicNodeI = thisView.mosaicNodeId) != null ? _thisView$mosaicNodeI : '';
9795
- return jsxs(Box, {
10764
+ return /*#__PURE__*/jsxs(Box, {
9796
10765
  sx: {
9797
10766
  mb: 1.5
9798
10767
  },
9799
- children: [jsx(ReactHookFormHiddenInput, {
10768
+ children: [/*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9800
10769
  defaultValue: mosaicNodeId,
9801
10770
  name: "views.0.mosaicNodeId"
9802
- }), jsx(ReactHookFormTextField, {
10771
+ }), /*#__PURE__*/jsx(ReactHookFormTextField, {
9803
10772
  defaultValue: (_thisView$title = thisView.title) != null ? _thisView$title : '',
9804
10773
  disabled: isDisabled,
9805
10774
  label: mosaicNodeId || t('workspace-view-title'),
@@ -9822,67 +10791,71 @@ var WorkspacePresetsForm = function WorkspacePresetsForm(_ref) {
9822
10791
  }), hiddenFields.map(function (_ref2) {
9823
10792
  var name = _ref2.name,
9824
10793
  value = _ref2.value;
9825
- return jsx(ReactHookFormHiddenInput, {
10794
+ return /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9826
10795
  "data-testid": name,
9827
10796
  defaultValue: value,
9828
10797
  name: name
9829
10798
  }, name);
9830
10799
  })]
9831
- }) : jsxs(Box, {
10800
+ }) : /*#__PURE__*/jsxs(Box, {
9832
10801
  sx: {
9833
10802
  display: 'flex',
9834
10803
  flexDirection: 'column',
9835
- height: '100%'
10804
+ height: '100%',
10805
+ containerType: 'inline-size'
9836
10806
  },
9837
- children: [jsxs(Box, {
9838
- sx: {
10807
+ children: [/*#__PURE__*/jsxs(Box, {
10808
+ sx: Object.assign({
9839
10809
  flex: 1,
9840
10810
  minHeight: 360,
9841
10811
  overflow: 'hidden',
9842
10812
  display: 'grid',
9843
- gridTemplateColumns: shouldShowLabelsForm ? {
9844
- xs: '1fr',
9845
- md: '300px 1fr'
9846
- } : '1fr',
10813
+ gridTemplateColumns: '1fr'
10814
+ }, shouldShowLabelsForm && {
10815
+ '@container (min-width: 610px)': {
10816
+ gridTemplateColumns: '300px 1fr'
10817
+ }
10818
+ }, {
9847
10819
  alignItems: 'stretch'
9848
- },
9849
- children: [!!shouldShowLabelsForm && jsx(Box, {
10820
+ }),
10821
+ children: [!!shouldShowLabelsForm && /*#__PURE__*/jsx(Box, {
9850
10822
  sx: {
9851
- pr: {
9852
- md: 2
9853
- },
9854
- minWidth: 288,
10823
+ minWidth: 0,
9855
10824
  height: '100%',
10825
+ maxHeight: 200,
9856
10826
  overflowY: 'auto',
9857
10827
  overflowX: 'hidden',
9858
10828
  bgcolor: 'geowebColors.background.surface',
9859
- maxWidth: '80%'
10829
+ maxWidth: '100%',
10830
+ '@container (min-width: 610px)': {
10831
+ pr: 2,
10832
+ minWidth: 288,
10833
+ maxHeight: 'none'
10834
+ }
9860
10835
  },
9861
- children: jsx(PresetLabelsPanelWrapper, {})
9862
- }), jsxs(Box, {
10836
+ children: /*#__PURE__*/jsx(PresetLabelsPanelWrapper, {})
10837
+ }), /*#__PURE__*/jsxs(Box, {
9863
10838
  sx: {
9864
- pl: {
9865
- md: 2
9866
- },
10839
+ pl: 2,
9867
10840
  pr: 2,
9868
10841
  py: 2,
9869
10842
  minWidth: 0,
9870
- overflow: 'hidden',
10843
+ overflow: 'auto',
9871
10844
  display: 'flex',
9872
10845
  flexDirection: 'column'
9873
10846
  },
9874
- children: [!!dialogTitle && !!shouldShowLabelsForm && jsx(Typography, {
10847
+ children: [!!dialogTitle && !!shouldShowLabelsForm && /*#__PURE__*/jsx(Typography, {
9875
10848
  sx: {
9876
10849
  mb: 2,
9877
10850
  fontWeight: 500
9878
10851
  },
9879
10852
  variant: "subtitle1",
9880
10853
  children: dialogTitle
9881
- }), jsx(Box, {
10854
+ }), /*#__PURE__*/jsx(Box, {
9882
10855
  sx: {
9883
10856
  mb: 2
9884
10857
  },
9885
- children: jsx(ReactHookFormTextField, {
10858
+ children: /*#__PURE__*/jsx(ReactHookFormTextField, {
9886
10859
  defaultValue: title,
9887
10860
  disabled: isDisabled,
9888
10861
  error: shouldShowTitleError,
@@ -9896,11 +10869,11 @@ var WorkspacePresetsForm = function WorkspacePresetsForm(_ref) {
9896
10869
  }
9897
10870
  }
9898
10871
  })
9899
- }), jsxs(Box, {
10872
+ }), /*#__PURE__*/jsxs(Box, {
9900
10873
  sx: {
9901
10874
  mb: 2
9902
10875
  },
9903
- children: [jsx(ReactHookFormTextField, {
10876
+ children: [/*#__PURE__*/jsx(ReactHookFormTextField, {
9904
10877
  defaultValue: description,
9905
10878
  disabled: isDisabled,
9906
10879
  fullWidth: true,
@@ -9912,24 +10885,24 @@ var WorkspacePresetsForm = function WorkspacePresetsForm(_ref) {
9912
10885
  required: false,
9913
10886
  maxLength: SHORT_DESC_LIMIT$1
9914
10887
  }
9915
- }), jsxs(Typography, {
10888
+ }), /*#__PURE__*/jsxs(Typography, {
9916
10889
  component: "div",
9917
10890
  marginBottom: 2,
9918
10891
  marginLeft: 1,
9919
10892
  marginTop: 1,
9920
10893
  variant: "caption",
9921
- children: [jsxs(Typography, {
10894
+ children: [/*#__PURE__*/jsxs(Typography, {
9922
10895
  color: "textSecondary",
9923
10896
  component: "span",
9924
10897
  variant: "inherit",
9925
10898
  children: [t('workspace-char-limit'), ' ']
9926
- }), jsx(Typography, {
10899
+ }), /*#__PURE__*/jsx(Typography, {
9927
10900
  color: remaining === 0 ? 'error' : 'primary',
9928
10901
  component: "span",
9929
10902
  variant: "inherit",
9930
10903
  children: remaining
9931
10904
  })]
9932
- }), jsx(ReactHookFormTextField, {
10905
+ }), /*#__PURE__*/jsx(ReactHookFormTextField, {
9933
10906
  defaultValue: _abstract,
9934
10907
  disabled: isDisabled,
9935
10908
  fullWidth: true,
@@ -9941,13 +10914,22 @@ var WorkspacePresetsForm = function WorkspacePresetsForm(_ref) {
9941
10914
  required: false
9942
10915
  }
9943
10916
  })]
9944
- }), !!showInlineActions && jsx(Box, {
10917
+ }), !!showInlineActions && /*#__PURE__*/jsx(Box, {
9945
10918
  sx: {
9946
10919
  mt: 'auto',
9947
10920
  display: 'flex',
9948
- justifyContent: 'flex-end'
10921
+ justifyContent: 'flex-end',
10922
+ gap: 1,
10923
+ '& > button, & > .MuiBox-root': {
10924
+ minWidth: '0 !important',
10925
+ width: 'auto !important',
10926
+ flexShrink: 1,
10927
+ marginLeft: '0 !important',
10928
+ marginTop: '0 !important',
10929
+ paddingInline: 6
10930
+ }
9949
10931
  },
9950
- children: jsx(ConfirmationButtons, {
10932
+ children: /*#__PURE__*/jsx(ConfirmationButtons, {
9951
10933
  cancelLabel: cancelLabel != null ? cancelLabel : '',
9952
10934
  confirmLabel: confirmLabel != null ? confirmLabel : '',
9953
10935
  isLoading: isLoading,
@@ -9959,34 +10941,34 @@ var WorkspacePresetsForm = function WorkspacePresetsForm(_ref) {
9959
10941
  }), hiddenFields.map(function (_ref3) {
9960
10942
  var name = _ref3.name,
9961
10943
  value = _ref3.value;
9962
- return jsx(ReactHookFormHiddenInput, {
10944
+ return /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9963
10945
  "data-testid": name,
9964
10946
  defaultValue: value,
9965
10947
  name: name
9966
10948
  }, name);
9967
10949
  })]
9968
10950
  })
9969
- }), (action === WorkspacePresetAction.DELETE || action === WorkspacePresetAction.DELETE_SYSTEM_PRESET) && jsxs(Fragment, {
9970
- children: [jsx(Typography, {
10951
+ }), (action === WorkspacePresetAction.DELETE || action === WorkspacePresetAction.DELETE_SYSTEM_PRESET) && /*#__PURE__*/jsxs(Fragment, {
10952
+ children: [/*#__PURE__*/jsx(Typography, {
9971
10953
  variant: "body1",
9972
10954
  children: t('workspace-dialog-confirm-delete-message', {
9973
10955
  TITLE: title
9974
10956
  })
9975
- }), jsx(ReactHookFormHiddenInput, {
10957
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9976
10958
  defaultValue: title,
9977
10959
  name: "title"
9978
10960
  }, "title")]
9979
- }), action === WorkspacePresetAction.RESET && jsxs(Box, {
9980
- children: [jsxs(Typography, {
10961
+ }), action === WorkspacePresetAction.RESET && /*#__PURE__*/jsxs(Box, {
10962
+ children: [/*#__PURE__*/jsxs(Typography, {
9981
10963
  variant: "body1",
9982
- children: [jsx(Exclamation, {
10964
+ children: [/*#__PURE__*/jsx(Exclamation, {
9983
10965
  sx: {
9984
10966
  top: '6px',
9985
10967
  position: 'relative',
9986
10968
  color: 'geowebColors.functional.warning'
9987
10969
  }
9988
10970
  }), formValues.scope === 'system' ? t('workspace-dialog-confirm-reset-message') : t('workspace-dialog-confirm-reset-personal-message')]
9989
- }), jsx(ReactHookFormHiddenInput, {
10971
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9990
10972
  defaultValue: title,
9991
10973
  name: "title"
9992
10974
  }, "title")]
@@ -10092,12 +11074,15 @@ var WorkspacePresetsFormDialog = function WorkspacePresetsFormDialog(_ref) {
10092
11074
  description = rawValues.description,
10093
11075
  _abstract = rawValues["abstract"],
10094
11076
  viewEdits = rawValues.views;
11077
+
10095
11078
  // Start from the full BE shape already in the form (it contains the real views array)
10096
11079
  var base = rawValues;
11080
+
10097
11081
  // Normalize workspace title/abstract
10098
11082
  var trimmedWorkspaceTitle = typeof title === 'string' ? title.trim() : base.title;
10099
11083
  var trimmedWorkspaceAbstract = typeof _abstract === 'string' ? _abstract.trim() : base["abstract"];
10100
11084
  var trimmedWorkspaceDescription = typeof description === 'string' ? description.trim() : base.description;
11085
+
10101
11086
  // Build a map of mosaicNodeId -> trimmed new title (only if present)
10102
11087
  var editedTitles = new Map();
10103
11088
  (Array.isArray(viewEdits) ? viewEdits : []).forEach(function (ve) {
@@ -10105,6 +11090,7 @@ var WorkspacePresetsFormDialog = function WorkspacePresetsFormDialog(_ref) {
10105
11090
  editedTitles.set(ve.mosaicNodeId, ve.title.trim());
10106
11091
  }
10107
11092
  });
11093
+
10108
11094
  // Merge titles into the outgoing BE views
10109
11095
  var mergedViews = ((_base$views = base.views) != null ? _base$views : []).map(function (view, idx) {
10110
11096
  var byKey = editedTitles.get(view.mosaicNodeId);
@@ -10113,6 +11099,7 @@ var WorkspacePresetsFormDialog = function WorkspacePresetsFormDialog(_ref) {
10113
11099
  title: byKey
10114
11100
  });
10115
11101
  }
11102
+
10116
11103
  // (Optional) index fallback if mosaicNodeId wasn’t provided in the form
10117
11104
  var fallbackTitle = Array.isArray(viewEdits) && viewEdits[idx] && typeof viewEdits[idx].title === 'string' ? viewEdits[idx].title.trim() : undefined;
10118
11105
  return fallbackTitle !== undefined ? Object.assign({}, view, {
@@ -10139,7 +11126,7 @@ var WorkspacePresetsFormDialog = function WorkspacePresetsFormDialog(_ref) {
10139
11126
  }();
10140
11127
  var cancelLabel = t('workspace-cancel');
10141
11128
  var withLabelsPanel = action === WorkspacePresetAction.SAVE_AS || action === WorkspacePresetAction.SAVE_SYSTEM_PRESET_AS || action === WorkspacePresetAction.EDIT;
10142
- var actionsNode = withLabelsPanel ? null : jsx(ConfirmationButtons, {
11129
+ var actionsNode = withLabelsPanel ? null : /*#__PURE__*/jsx(ConfirmationButtons, {
10143
11130
  cancelLabel: cancelLabel,
10144
11131
  confirmLabel: confirmLabel,
10145
11132
  isLoading: isLoading,
@@ -10147,13 +11134,13 @@ var WorkspacePresetsFormDialog = function WorkspacePresetsFormDialog(_ref) {
10147
11134
  onSubmit: onSubmit
10148
11135
  });
10149
11136
  var dialogTitle = getDialogTitle(action);
10150
- return jsx(CustomDialog, {
11137
+ return /*#__PURE__*/jsx(CustomDialog, {
10151
11138
  actions: actionsNode,
10152
11139
  "data-testid": "workspace-preset-dialog",
10153
11140
  description: "",
10154
11141
  headerActions: withLabelsPanel ? [] : undefined,
10155
11142
  isResizable: true,
10156
- minWidth: withLabelsPanel ? 635 : undefined,
11143
+ minWidth: withLabelsPanel ? 350 : undefined,
10157
11144
  onClose: onClose,
10158
11145
  open: isOpen,
10159
11146
  resizableDefaultSize: {
@@ -10173,7 +11160,7 @@ var WorkspacePresetsFormDialog = function WorkspacePresetsFormDialog(_ref) {
10173
11160
  }
10174
11161
  } : undefined,
10175
11162
  title: withLabelsPanel ? undefined : getDialogTitle(action),
10176
- children: jsx(WorkspacePresetsForm, {
11163
+ children: /*#__PURE__*/jsx(WorkspacePresetsForm, {
10177
11164
  action: action,
10178
11165
  cancelLabel: cancelLabel,
10179
11166
  confirmLabel: confirmLabel,
@@ -10190,18 +11177,18 @@ var WorkspacePresetsFormDialog = function WorkspacePresetsFormDialog(_ref) {
10190
11177
  };
10191
11178
  var WorkspacePresetsFormDialogWrapper = function WorkspacePresetsFormDialogWrapper(_ref3) {
10192
11179
  var props = Object.assign({}, (_objectDestructuringEmpty(_ref3), _ref3));
10193
- return jsx(ReactHookFormProvider, {
11180
+ return /*#__PURE__*/jsx(ReactHookFormProvider, {
10194
11181
  options: Object.assign({}, defaultFormOptions, {
10195
11182
  defaultValues: props.formValues
10196
11183
  }),
10197
- children: jsx(WorkspacePresetsFormDialog, Object.assign({}, props))
11184
+ children: /*#__PURE__*/jsx(WorkspacePresetsFormDialog, Object.assign({}, props))
10198
11185
  });
10199
11186
  };
10200
11187
 
10201
11188
  var _excluded$2 = ["viewPresetId"],
10202
11189
  _excluded2 = ["viewPresetId"];
10203
11190
  var WorkspaceTabConnect = function WorkspaceTabConnect(_ref) {
10204
- var _ref4;
11191
+ var _ref4, _ref5;
10205
11192
  var workspaceId = _ref.workspaceId,
10206
11193
  appTitle = _ref.appTitle;
10207
11194
  var dispatch = useDispatch();
@@ -10340,16 +11327,16 @@ var WorkspaceTabConnect = function WorkspaceTabConnect(_ref) {
10340
11327
  var isFetching = (_ref4 = typeof dialogDetails === 'object' && dialogDetails.isFetching) != null ? _ref4 : false;
10341
11328
  var error = typeof dialogDetails === 'object' && dialogDetails.error;
10342
11329
  var hasSavedWorkspace = typeof dialogDetails === 'object' && dialogDetails.hasSaved;
10343
- return jsxs(Fragment, {
10344
- children: [jsx(WorkspaceTab, {
11330
+ return /*#__PURE__*/jsxs(Fragment, {
11331
+ children: [/*#__PURE__*/jsx(WorkspaceTab, {
10345
11332
  activeTab: true,
10346
11333
  appTitle: appTitle,
10347
11334
  title: title,
10348
11335
  workspaceId: workspaceId
10349
- }), jsx(WorkspacePresetsFormDialogWrapper, {
11336
+ }), /*#__PURE__*/jsx(WorkspacePresetsFormDialogWrapper, {
10350
11337
  action: action || undefined,
10351
11338
  error: error || undefined,
10352
- formValues: formValues != null ? formValues : undefined,
11339
+ formValues: (_ref5 = formValues) != null ? _ref5 : undefined,
10353
11340
  isLoading: isFetching,
10354
11341
  isOpen: Boolean(dialogDetails),
10355
11342
  isWorkspaceSaved: hasSavedWorkspace,
@@ -10360,10 +11347,28 @@ var WorkspaceTabConnect = function WorkspaceTabConnect(_ref) {
10360
11347
  });
10361
11348
  };
10362
11349
 
11350
+ /* *
11351
+ * Licensed under the Apache License, Version 2.0 (the "License");
11352
+ * you may not use this file except in compliance with the License.
11353
+ * You may obtain a copy of the License at
11354
+ *
11355
+ * http://www.apache.org/licenses/LICENSE-2.0
11356
+ *
11357
+ * Unless required by applicable law or agreed to in writing, software
11358
+ * distributed under the License is distributed on an "AS IS" BASIS,
11359
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11360
+ * See the License for the specific language governing permissions and
11361
+ * limitations under the License.
11362
+ *
11363
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11364
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
11365
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
11366
+ * */
11367
+
10363
11368
  var WorkspaceTopBar = function WorkspaceTopBar(_ref) {
10364
11369
  var workspaceId = _ref.workspaceId,
10365
11370
  appTitle = _ref.appTitle;
10366
- return jsx(Tabs, {
11371
+ return /*#__PURE__*/jsx(Tabs, {
10367
11372
  "aria-label": "workspace-bar-tabs",
10368
11373
  sx: {
10369
11374
  width: '100%',
@@ -10376,7 +11381,7 @@ var WorkspaceTopBar = function WorkspaceTopBar(_ref) {
10376
11381
  }
10377
11382
  },
10378
11383
  value: 0,
10379
- children: jsx(WorkspaceTabConnect, {
11384
+ children: /*#__PURE__*/jsx(WorkspaceTabConnect, {
10380
11385
  appTitle: appTitle,
10381
11386
  workspaceId: workspaceId
10382
11387
  })
@@ -10435,72 +11440,76 @@ var ViewPresetsForm = function ViewPresetsForm(_ref) {
10435
11440
  };
10436
11441
  var shouldShowLabelsForm = action === PresetAction.SAVE_AS || action === PresetAction.EDIT;
10437
11442
  var marginBottom = 2;
10438
- return jsxs(Fragment, {
10439
- children: [Boolean(error) && jsx(AlertBanner, {
11443
+ return /*#__PURE__*/jsxs(Fragment, {
11444
+ children: [Boolean(error) && /*#__PURE__*/jsx(AlertBanner, {
10440
11445
  title: error
10441
- }), (action === PresetAction.SAVE_AS || action === PresetAction.EDIT) && jsx("form", {
11446
+ }), (action === PresetAction.SAVE_AS || action === PresetAction.EDIT) && /*#__PURE__*/jsx("form", {
10442
11447
  "data-testid": "map-preset-form",
10443
11448
  onSubmit: onSubmitForm,
10444
11449
  style: {
10445
11450
  height: '100%'
10446
11451
  },
10447
- children: jsxs(Box, {
11452
+ children: /*#__PURE__*/jsxs(Box, {
10448
11453
  sx: {
10449
11454
  display: 'flex',
10450
11455
  flexDirection: 'column',
10451
- height: '100%'
11456
+ height: '100%',
11457
+ containerType: 'inline-size'
10452
11458
  },
10453
- children: [jsxs(Box, {
10454
- sx: {
11459
+ children: [/*#__PURE__*/jsxs(Box, {
11460
+ sx: Object.assign({
10455
11461
  flex: 1,
10456
11462
  minHeight: 360,
10457
11463
  overflow: 'hidden',
10458
11464
  display: 'grid',
10459
- gridTemplateColumns: shouldShowLabelsForm ? {
10460
- xs: '1fr',
10461
- md: '300px 1fr'
10462
- } : '1fr',
11465
+ gridTemplateColumns: '1fr'
11466
+ }, shouldShowLabelsForm && {
11467
+ '@container (min-width: 610px)': {
11468
+ gridTemplateColumns: '300px 1fr'
11469
+ }
11470
+ }, {
10463
11471
  alignItems: 'stretch'
10464
- },
10465
- children: [!!shouldShowLabelsForm && jsx(Box, {
11472
+ }),
11473
+ children: [!!shouldShowLabelsForm && /*#__PURE__*/jsx(Box, {
10466
11474
  sx: {
10467
- pr: {
10468
- md: 2
10469
- },
10470
- minWidth: 288,
11475
+ minWidth: 0,
10471
11476
  height: '100%',
11477
+ maxHeight: 200,
10472
11478
  overflowY: 'auto',
10473
11479
  overflowX: 'hidden',
10474
11480
  bgcolor: 'geowebColors.background.surface',
10475
- maxWidth: '80%'
11481
+ maxWidth: '100%',
11482
+ '@container (min-width: 610px)': {
11483
+ pr: 2,
11484
+ minWidth: 288,
11485
+ maxHeight: 'none'
11486
+ }
10476
11487
  },
10477
- children: jsx(PresetLabelsPanelWrapper, {
11488
+ children: /*#__PURE__*/jsx(PresetLabelsPanelWrapper, {
10478
11489
  viewComponentType: viewComponentType
10479
11490
  })
10480
- }), jsxs(Box, {
11491
+ }), /*#__PURE__*/jsxs(Box, {
10481
11492
  sx: {
10482
- pl: {
10483
- md: 2
10484
- },
11493
+ pl: 2,
10485
11494
  pr: 2,
10486
11495
  py: 2,
10487
11496
  minWidth: 0,
10488
- overflow: 'hidden',
11497
+ overflow: 'auto',
10489
11498
  display: 'flex',
10490
11499
  flexDirection: 'column'
10491
11500
  },
10492
- children: [!!dialogTitle && !!shouldShowLabelsForm && jsx(Typography, {
11501
+ children: [!!dialogTitle && !!shouldShowLabelsForm && /*#__PURE__*/jsx(Typography, {
10493
11502
  sx: {
10494
11503
  mb: 2,
10495
11504
  fontWeight: 500
10496
11505
  },
10497
11506
  variant: "subtitle1",
10498
11507
  children: dialogTitle
10499
- }), jsx(Box, {
11508
+ }), /*#__PURE__*/jsx(Box, {
10500
11509
  sx: {
10501
11510
  mb: 2
10502
11511
  },
10503
- children: jsx(ReactHookFormTextField, {
11512
+ children: /*#__PURE__*/jsx(ReactHookFormTextField, {
10504
11513
  defaultValue: title,
10505
11514
  label: t('workspace-mappreset-dialog-title'),
10506
11515
  name: "title",
@@ -10514,11 +11523,11 @@ var ViewPresetsForm = function ViewPresetsForm(_ref) {
10514
11523
  mb: marginBottom
10515
11524
  }
10516
11525
  })
10517
- }), jsxs(Box, {
11526
+ }), /*#__PURE__*/jsxs(Box, {
10518
11527
  sx: {
10519
11528
  mb: 2
10520
11529
  },
10521
- children: [jsx(ReactHookFormTextField, {
11530
+ children: [/*#__PURE__*/jsx(ReactHookFormTextField, {
10522
11531
  defaultValue: description,
10523
11532
  label: t('workspace-dialog-description'),
10524
11533
  multiline: true,
@@ -10528,24 +11537,24 @@ var ViewPresetsForm = function ViewPresetsForm(_ref) {
10528
11537
  required: false,
10529
11538
  maxLength: SHORT_DESC_LIMIT
10530
11539
  }
10531
- }), jsxs(Typography, {
11540
+ }), /*#__PURE__*/jsxs(Typography, {
10532
11541
  component: "div",
10533
11542
  marginBottom: 2,
10534
11543
  marginLeft: 1,
10535
11544
  marginTop: 1,
10536
11545
  variant: "caption",
10537
- children: [jsxs(Typography, {
11546
+ children: [/*#__PURE__*/jsxs(Typography, {
10538
11547
  color: "textSecondary",
10539
11548
  component: "span",
10540
11549
  variant: "inherit",
10541
11550
  children: [t('workspace-char-limit'), ' ']
10542
- }), jsx(Typography, {
11551
+ }), /*#__PURE__*/jsx(Typography, {
10543
11552
  color: remaining === 0 ? 'error' : 'primary',
10544
11553
  component: "span",
10545
11554
  variant: "inherit",
10546
11555
  children: remaining
10547
11556
  })]
10548
- }), jsx(ReactHookFormTextField, {
11557
+ }), /*#__PURE__*/jsx(ReactHookFormTextField, {
10549
11558
  label: t('workspace-dialog-abstract'),
10550
11559
  multiline: true,
10551
11560
  name: "abstract",
@@ -10554,13 +11563,22 @@ var ViewPresetsForm = function ViewPresetsForm(_ref) {
10554
11563
  required: false
10555
11564
  }
10556
11565
  })]
10557
- }), !!showInlineActions && jsx(Box, {
11566
+ }), !!showInlineActions && /*#__PURE__*/jsx(Box, {
10558
11567
  sx: {
10559
11568
  mt: 'auto',
10560
11569
  display: 'flex',
10561
- justifyContent: 'flex-end'
11570
+ justifyContent: 'flex-end',
11571
+ gap: 1,
11572
+ '& > button, & > .MuiBox-root': {
11573
+ minWidth: '0 !important',
11574
+ width: 'auto !important',
11575
+ flexShrink: 1,
11576
+ marginLeft: '0 !important',
11577
+ marginTop: '0 !important',
11578
+ paddingInline: 6
11579
+ }
10562
11580
  },
10563
- children: jsx(ConfirmationButtons, {
11581
+ children: /*#__PURE__*/jsx(ConfirmationButtons, {
10564
11582
  cancelLabel: cancelLabel != null ? cancelLabel : '',
10565
11583
  confirmLabel: confirmLabel != null ? confirmLabel : '',
10566
11584
  isLoading: isLoading,
@@ -10572,34 +11590,34 @@ var ViewPresetsForm = function ViewPresetsForm(_ref) {
10572
11590
  }), hiddenFields.map(function (_ref2) {
10573
11591
  var name = _ref2.name,
10574
11592
  value = _ref2.value;
10575
- return jsx(ReactHookFormHiddenInput, {
11593
+ return /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
10576
11594
  "data-testid": name,
10577
11595
  defaultValue: value,
10578
11596
  name: name
10579
11597
  }, name);
10580
11598
  })]
10581
11599
  })
10582
- }), action === PresetAction.DELETE && jsxs(Fragment, {
10583
- children: [jsx(Typography, {
11600
+ }), action === PresetAction.DELETE && /*#__PURE__*/jsxs(Fragment, {
11601
+ children: [/*#__PURE__*/jsx(Typography, {
10584
11602
  variant: "body1",
10585
11603
  children: t('workspace-mappreset-delete-message', {
10586
11604
  TITLE: title
10587
11605
  })
10588
- }), jsx(ReactHookFormHiddenInput, {
11606
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
10589
11607
  defaultValue: title,
10590
11608
  name: "title"
10591
11609
  }, "title")]
10592
- }), action === PresetAction.RESET && jsxs(Box, {
10593
- children: [jsxs(Typography, {
11610
+ }), action === PresetAction.RESET && /*#__PURE__*/jsxs(Box, {
11611
+ children: [/*#__PURE__*/jsxs(Typography, {
10594
11612
  variant: "body1",
10595
- children: [jsx(Exclamation, {
11613
+ children: [/*#__PURE__*/jsx(Exclamation, {
10596
11614
  sx: {
10597
11615
  top: '6px',
10598
11616
  position: 'relative',
10599
11617
  color: 'geowebColors.functional.warning'
10600
11618
  }
10601
11619
  }), t('workspace-dialog-confirm-reset-view-message')]
10602
- }), jsx(ReactHookFormHiddenInput, {
11620
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
10603
11621
  defaultValue: title,
10604
11622
  name: "title"
10605
11623
  }, "title")]
@@ -10793,8 +11811,8 @@ var ViewPresetsFormDialog = function ViewPresetsFormDialog(_ref) {
10793
11811
  };
10794
11812
  }();
10795
11813
  var withLabelsPanel = action === PresetAction.SAVE_AS || action === PresetAction.EDIT;
10796
- return jsx(CustomDialog, {
10797
- actions: jsx(ConfirmationButtons, {
11814
+ return /*#__PURE__*/jsx(CustomDialog, {
11815
+ actions: /*#__PURE__*/jsx(ConfirmationButtons, {
10798
11816
  cancelLabel: t('workspace-cancel'),
10799
11817
  confirmLabel: confirmLabel,
10800
11818
  isLoading: isLoading,
@@ -10805,7 +11823,7 @@ var ViewPresetsFormDialog = function ViewPresetsFormDialog(_ref) {
10805
11823
  description: "",
10806
11824
  headerActions: withLabelsPanel ? [] : undefined,
10807
11825
  isResizable: true,
10808
- minWidth: withLabelsPanel ? 635 : undefined,
11826
+ minWidth: withLabelsPanel ? 350 : undefined,
10809
11827
  onClose: onClose,
10810
11828
  onSubmit: onSubmit,
10811
11829
  open: isOpen,
@@ -10826,7 +11844,7 @@ var ViewPresetsFormDialog = function ViewPresetsFormDialog(_ref) {
10826
11844
  }
10827
11845
  } : undefined,
10828
11846
  title: withLabelsPanel ? undefined : title,
10829
- children: jsx(ViewPresetsForm, {
11847
+ children: /*#__PURE__*/jsx(ViewPresetsForm, {
10830
11848
  action: action,
10831
11849
  cancelLabel: t('workspace-cancel'),
10832
11850
  confirmLabel: confirmLabel,
@@ -10843,17 +11861,38 @@ var ViewPresetsFormDialog = function ViewPresetsFormDialog(_ref) {
10843
11861
  };
10844
11862
  var ViewPresetsFormDialogWrapper = function ViewPresetsFormDialogWrapper(_ref5) {
10845
11863
  var props = Object.assign({}, (_objectDestructuringEmpty(_ref5), _ref5));
10846
- return jsx(ReactHookFormProvider, {
11864
+ return /*#__PURE__*/jsx(ReactHookFormProvider, {
10847
11865
  options: Object.assign({}, defaultFormOptions),
10848
- children: jsx(ViewPresetsFormDialog, Object.assign({}, props))
11866
+ children: /*#__PURE__*/jsx(ViewPresetsFormDialog, Object.assign({}, props))
10849
11867
  });
10850
11868
  };
10851
11869
 
11870
+ /* *
11871
+ * Licensed under the Apache License, Version 2.0 (the "License");
11872
+ * you may not use this file except in compliance with the License.
11873
+ * You may obtain a copy of the License at
11874
+ *
11875
+ * http://www.apache.org/licenses/LICENSE-2.0
11876
+ *
11877
+ * Unless required by applicable law or agreed to in writing, software
11878
+ * distributed under the License is distributed on an "AS IS" BASIS,
11879
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11880
+ * See the License for the specific language governing permissions and
11881
+ * limitations under the License.
11882
+ *
11883
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11884
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
11885
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
11886
+ * */
11887
+
10852
11888
  var ViewPresetsFormDialogConnect = function ViewPresetsFormDialogConnect(_ref) {
10853
11889
  var _dialogOptions$formVa;
10854
11890
  var _ref$scope = _ref.scope,
10855
11891
  scope = _ref$scope === void 0 ? 'user' : _ref$scope;
10856
11892
  var dispatch = useDispatch();
11893
+ var _useAuthenticationCon = useAuthenticationContext(),
11894
+ auth = _useAuthenticationCon.auth;
11895
+ var username = (auth == null ? void 0 : auth.username) || '';
10857
11896
  var dialogOptions = useSelector(function (store) {
10858
11897
  return getDialogOptions(store);
10859
11898
  });
@@ -10891,11 +11930,12 @@ var ViewPresetsFormDialogConnect = function ViewPresetsFormDialogConnect(_ref) {
10891
11930
  description: description,
10892
11931
  scope: scope,
10893
11932
  "abstract": _abstract,
10894
- labels: labels
11933
+ labels: labels,
11934
+ username: username
10895
11935
  }));
10896
11936
  };
10897
11937
  var isOpen = dialogOptions !== undefined;
10898
- return jsx(ViewPresetsFormDialogWrapper, {
11938
+ return /*#__PURE__*/jsx(ViewPresetsFormDialogWrapper, {
10899
11939
  action: (dialogOptions == null ? void 0 : dialogOptions.action) || PresetAction.SAVE,
10900
11940
  formValues: dialogOptions == null ? void 0 : dialogOptions.formValues,
10901
11941
  isOpen: isOpen,
@@ -10909,6 +11949,24 @@ var ViewPresetsFormDialogConnect = function ViewPresetsFormDialogConnect(_ref) {
10909
11949
  });
10910
11950
  };
10911
11951
 
11952
+ /* *
11953
+ * Licensed under the Apache License, Version 2.0 (the "License");
11954
+ * you may not use this file except in compliance with the License.
11955
+ * You may obtain a copy of the License at
11956
+ *
11957
+ * http://www.apache.org/licenses/LICENSE-2.0
11958
+ *
11959
+ * Unless required by applicable law or agreed to in writing, software
11960
+ * distributed under the License is distributed on an "AS IS" BASIS,
11961
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11962
+ * See the License for the specific language governing permissions and
11963
+ * limitations under the License.
11964
+ *
11965
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11966
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
11967
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
11968
+ * */
11969
+
10912
11970
  var WorkspaceDetail = function WorkspaceDetail(_ref) {
10913
11971
  var initialWorkspaceId = _ref.initialWorkspaceId,
10914
11972
  workspaceId = _ref.workspaceId,
@@ -10961,13 +12019,13 @@ var WorkspaceDetail = function WorkspaceDetail(_ref) {
10961
12019
  }
10962
12020
  // eslint-disable-next-line react-hooks/exhaustive-deps
10963
12021
  }, []);
10964
- return jsxs(Box, {
12022
+ return /*#__PURE__*/jsxs(Box, {
10965
12023
  "data-testid": "workspace",
10966
12024
  sx: {
10967
12025
  width: '100%',
10968
12026
  height: '100%'
10969
12027
  },
10970
- children: [!!isLoading && jsx(LinearProgress, {
12028
+ children: [!!isLoading && /*#__PURE__*/jsx(LinearProgress, {
10971
12029
  color: "secondary",
10972
12030
  "data-testid": "loading-bar",
10973
12031
  sx: {
@@ -10976,7 +12034,7 @@ var WorkspaceDetail = function WorkspaceDetail(_ref) {
10976
12034
  top: 0,
10977
12035
  zIndex: 100
10978
12036
  }
10979
- }), !!error && error.type !== WorkspaceErrorType.SAVE && jsx(AlertBanner, Object.assign({
12037
+ }), !!error && error.type !== WorkspaceErrorType.SAVE && /*#__PURE__*/jsx(AlertBanner, Object.assign({
10980
12038
  info: error.message,
10981
12039
  shouldClose: true,
10982
12040
  title: t('workspace-error-fetch-detail', {
@@ -10989,8 +12047,8 @@ var WorkspaceDetail = function WorkspaceDetail(_ref) {
10989
12047
  return fetchWorkspace(workspaceId);
10990
12048
  }
10991
12049
  }
10992
- })), children, !isSnapshot && jsxs(Fragment, {
10993
- children: [!!error && error.type === WorkspaceErrorType.SAVE && jsx(AlertBanner, {
12050
+ })), children, !isSnapshot && /*#__PURE__*/jsxs(Fragment, {
12051
+ children: [!!error && error.type === WorkspaceErrorType.SAVE && /*#__PURE__*/jsx(AlertBanner, {
10994
12052
  actionButtonProps: {
10995
12053
  title: t('workspace-retry'),
10996
12054
  onClick: function onClick() {
@@ -11002,7 +12060,7 @@ var WorkspaceDetail = function WorkspaceDetail(_ref) {
11002
12060
  title: t('workspace-save-error', {
11003
12061
  TITLE: workspaceData.title
11004
12062
  })
11005
- }), (!error || error.type === WorkspaceErrorType.SAVE) && jsx(Box, {
12063
+ }), (!error || error.type === WorkspaceErrorType.SAVE) && /*#__PURE__*/jsx(Box, {
11006
12064
  component: "div",
11007
12065
  "data-testid": "WorkspacePage",
11008
12066
  sx: {
@@ -11016,11 +12074,11 @@ var WorkspaceDetail = function WorkspaceDetail(_ref) {
11016
12074
  overflowY: 'auto',
11017
12075
  zIndex: 3
11018
12076
  },
11019
- children: jsx(WorkspaceViewConnect, {
12077
+ children: /*#__PURE__*/jsx(WorkspaceViewConnect, {
11020
12078
  componentsLookUp: componentsLookUp
11021
12079
  })
11022
12080
  })]
11023
- }), jsx(ViewPresetsFormDialogConnect, {
12081
+ }), /*#__PURE__*/jsx(ViewPresetsFormDialogConnect, {
11024
12082
  scope: isAdmin ? 'system' : 'user'
11025
12083
  })]
11026
12084
  });
@@ -12295,34 +13353,10 @@ var workspacePresets = [
12295
13353
  }
12296
13354
  ];
12297
13355
 
12298
- /* *
12299
- * Licensed under the Apache License, Version 2.0 (the "License");
12300
- * you may not use this file except in compliance with the License.
12301
- * You may obtain a copy of the License at
12302
- *
12303
- * http://www.apache.org/licenses/LICENSE-2.0
12304
- *
12305
- * Unless required by applicable law or agreed to in writing, software
12306
- * distributed under the License is distributed on an "AS IS" BASIS,
12307
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12308
- * See the License for the specific language governing permissions and
12309
- * limitations under the License.
12310
- *
12311
- * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
12312
- * Copyright 2025 - Finnish Meteorological Institute (FMI)
12313
- * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
12314
- * */
12315
- var LABELS_CONFIG_DEFAULT = {
12316
- purpose: ['Aviation', 'Monitor', 'Public', 'Maritime', 'Warning', 'Media', 'Nowcasting (0–12h)'],
12317
- parameters: ['Pressure', 'Temperature', 'Wind', 'Humidity', 'Water vapour', 'Visibility', 'Geopotential', 'Snow', 'Cloud', 'Waves', 'Index', 'Precipitation'],
12318
- phenomena: ['Turbulence', 'MTW', 'CAT', 'Icing', 'Freezing rain', 'FlashFlood', 'Wind gust', 'Rain', 'Snow', 'Road ice', 'Lightning strike', 'Drifting snow', 'Wave height + water level', 'Forest fire', 'Polar Low', 'Heat wave', 'Gale warning'],
12319
- viewType: [].concat(ALL_COMPONENT_TYPES),
12320
- dataType: ['observation', 'forecast', 'archive'],
12321
- dataSource: ['Meps', 'Arome Arctic', 'Ecmwf', 'Ensemble', 'AIFS', 'BRIS', 'radar', 'satellite', 'synop']
12322
- };
13356
+ var defaultWorkspacePresets = workspacePresets;
12323
13357
 
12324
13358
  // Transforms full workspace presets to list items
12325
- var workspacePresetList = workspacePresets.map(function (preset) {
13359
+ var workspacePresetList = defaultWorkspacePresets.map(function (preset) {
12326
13360
  var _preset$abstract;
12327
13361
  return {
12328
13362
  id: preset.id,
@@ -12390,7 +13424,7 @@ var workspaceEndpoints = [http["delete"](/^.*\/workspacepreset\/(.*)$/, /*#__PUR
12390
13424
  return delay();
12391
13425
  case 3:
12392
13426
  presetId = String((_params$ = params[0]) != null ? _params$ : '');
12393
- preset = workspacePresets.find(function (item) {
13427
+ preset = defaultWorkspacePresets.find(function (item) {
12394
13428
  return item.id === presetId;
12395
13429
  });
12396
13430
  if (preset) {