@opengeoweb/workspace 14.2.2 → 14.4.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 (45) hide show
  1. package/index.esm.js +4466 -1804
  2. package/package.json +18 -17
  3. package/src/lib/api/workspace-api/api.d.ts +2 -1
  4. package/src/lib/api/workspace-api/hooks.d.ts +3 -2
  5. package/src/lib/components/LabelsPanel/PresetLabelsPanel.d.ts +14 -0
  6. package/src/lib/components/ViewPresetMenu/ViewPresetMenu.d.ts +1 -0
  7. package/src/lib/components/ViewPresetMenu/ViewPresetMenuListConnect.d.ts +3 -0
  8. package/src/lib/components/ViewPresetsFormDialog/ViewPresetsForm.d.ts +9 -0
  9. package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialog.d.ts +3 -1
  10. package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialogConnect.d.ts +2 -0
  11. package/src/lib/components/WorkspaceMenu/WorkspaceMenu.d.ts +1 -0
  12. package/src/lib/components/WorkspaceMenu/WorkspaceMenu.stories.d.ts +2 -0
  13. package/src/lib/components/WorkspaceOptions/WorkspaceOptions.d.ts +2 -0
  14. package/src/lib/components/WorkspaceOptions/WorkspaceOptionsConnect.d.ts +1 -1
  15. package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsForm.d.ts +8 -2
  16. package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.d.ts +2 -1
  17. package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.stories.d.ts +2 -1
  18. package/src/lib/components/WorkspaceSelectList/WorkspaceMenuLabelsWrapper.d.ts +9 -0
  19. package/src/lib/components/WorkspaceSelectList/WorkspaceMenuLabelsWrapper.spec.d.ts +1 -0
  20. package/src/lib/components/WorkspaceSelectList/WorkspacePresetInfo.d.ts +12 -0
  21. package/src/lib/components/WorkspaceSelectList/WorkspacePresetInfo.spec.d.ts +1 -0
  22. package/src/lib/components/WorkspaceSelectList/WorkspacePresetInfo.stories.d.ts +10 -0
  23. package/src/lib/components/WorkspaceSelectList/WorkspaceSelectList.d.ts +2 -0
  24. package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListConnect.d.ts +6 -1
  25. package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListRow.d.ts +3 -1
  26. package/src/lib/components/WorkspaceTab/WorkspaceTabConnect.d.ts +1 -1
  27. package/src/lib/components/WorkspaceView/SplitButtonsConnect.d.ts +8 -0
  28. package/src/lib/components/WorkspaceView/SplitButtonsConnect.spec.d.ts +1 -0
  29. package/src/lib/store/viewPresets/reducer.d.ts +3 -1
  30. package/src/lib/store/viewPresets/selectors.d.ts +83 -1
  31. package/src/lib/store/viewPresets/types.d.ts +28 -1
  32. package/src/lib/store/viewPresetsList/selectors.d.ts +10 -0
  33. package/src/lib/store/viewPresetsList/types.d.ts +5 -0
  34. package/src/lib/store/workspace/listener.d.ts +1 -1
  35. package/src/lib/store/workspace/reducer.d.ts +3 -2
  36. package/src/lib/store/workspace/selectors.d.ts +36 -701
  37. package/src/lib/store/workspace/types.d.ts +42 -9
  38. package/src/lib/store/workspace/utils.d.ts +9 -8
  39. package/src/lib/store/workspaceList/reducer.d.ts +3 -1
  40. package/src/lib/store/workspaceList/selectors.d.ts +112 -64
  41. package/src/lib/store/workspaceList/types.d.ts +21 -4
  42. package/src/lib/utils/labels.config.d.ts +3 -0
  43. package/src/lib/utils/utils.d.ts +3 -2
  44. package/src/lib/components/WorkspacePresetsFormDialog/WorkspaceViewPresetsFormFields.d.ts +0 -8
  45. /package/src/lib/components/{WorkspacePresetsFormDialog/WorkspaceViewPresetsFormFields.spec.d.ts → LabelsPanel/PresetLabelsPanel.spec.d.ts} +0 -0
@@ -1,18 +1,21 @@
1
- import { SystemScope } from '@opengeoweb/shared';
2
- import { syncGroupsTypes } from '@opengeoweb/store';
3
- import { MosaicNode } from 'react-mosaic-component';
4
- export type InitialPropsWorkspaceViewType = Record<string, unknown>;
1
+ import type { MosaicNode } from 'react-mosaic-component';
2
+ import type { SystemScope } from '@opengeoweb/shared';
3
+ import type { syncGroupsTypes } from '@opengeoweb/store';
4
+ import { InitialProps } from '@opengeoweb/core';
5
5
  export type WorkspaceViewPresetComponentsLookupType = 'ViewError' | 'ViewLoading';
6
6
  export interface WorkspaceViewType {
7
7
  id?: string;
8
+ mosaicNodeId?: string;
8
9
  title?: string;
10
+ description?: string;
9
11
  abstract?: string;
10
- componentType: string | WorkspaceViewPresetComponentsLookupType;
11
- initialProps?: InitialPropsWorkspaceViewType;
12
+ componentType: string;
13
+ initialProps?: InitialProps;
12
14
  activeLayerId?: string;
13
15
  shouldPreventClose?: boolean;
14
16
  scope?: SystemScope;
15
17
  keywords?: string;
18
+ labels?: WorkspaceLabelsConfigResponse;
16
19
  }
17
20
  export interface WorkspaceViews {
18
21
  byId: Record<string, WorkspaceViewType>;
@@ -20,7 +23,11 @@ export interface WorkspaceViews {
20
23
  }
21
24
  export interface WorkspaceViewsFromBE {
22
25
  mosaicNodeId: string;
23
- viewPresetId: string;
26
+ viewPresetId?: string;
27
+ componentType?: string;
28
+ initialProps?: InitialProps;
29
+ title?: string;
30
+ originalViewPresetId?: string;
24
31
  }
25
32
  export type ViewType = 'singleWindow' | 'multiWindow' | 'tiledWindow';
26
33
  export interface WorkspaceSyncGroup {
@@ -39,14 +46,27 @@ export interface WorkspacePreset {
39
46
  minimumPaneSizePercentage?: number;
40
47
  scope?: SystemScope;
41
48
  abstract?: string;
49
+ description?: string;
42
50
  linking?: Record<string, string[]>;
43
51
  username?: string;
52
+ labels?: WorkspacePresetLabels;
53
+ updated?: string;
54
+ updatedBy?: string;
44
55
  }
45
56
  export interface WorkspaceState extends WorkspacePreset {
46
57
  isLoading?: boolean;
47
58
  error?: WorkspaceError;
48
59
  hasChanges?: boolean;
49
60
  }
61
+ export interface WorkspacePresetLabels {
62
+ [groupKey: string]: string[] | undefined;
63
+ purpose?: string[];
64
+ parameters?: string[];
65
+ phenomena?: string[];
66
+ dataType?: string[];
67
+ dataSource?: string[];
68
+ viewType?: string[];
69
+ }
50
70
  export interface WorkspacePresetForBE {
51
71
  id?: string;
52
72
  title: string;
@@ -59,6 +79,10 @@ export interface WorkspacePresetForBE {
59
79
  is_shared?: boolean;
60
80
  username?: string;
61
81
  abstract?: string;
82
+ description?: string;
83
+ labels?: WorkspacePresetLabels;
84
+ updated?: string;
85
+ updatedBy?: string;
62
86
  }
63
87
  export interface WorkspacePresetFromBE extends WorkspacePresetForBE {
64
88
  id: string;
@@ -75,6 +99,10 @@ export interface WorkspacePresetListItem {
75
99
  abstract: string;
76
100
  username?: string;
77
101
  is_shared?: boolean;
102
+ labels?: WorkspacePresetLabels;
103
+ description?: string;
104
+ updated?: string;
105
+ updatedBy?: string;
78
106
  }
79
107
  export declare enum WorkspacePresetAction {
80
108
  DELETE = "DELETE",
@@ -87,17 +115,19 @@ export declare enum WorkspacePresetAction {
87
115
  RESET = "RESET",
88
116
  DELETE_SYSTEM_PRESET = "DELETE_SYSTEM_PRESET",
89
117
  SHARE = "SHARE",
90
- OPEN_TAB = "OPEN_TAB"
118
+ OPEN_TAB = "OPEN_TAB",
119
+ EDIT_TITLE = "EDIT_TITLE"
91
120
  }
92
121
  export interface WorkspaceAddViewPayload {
93
122
  id: string;
94
123
  componentType: string;
95
- initialProps: InitialPropsWorkspaceViewType;
124
+ initialProps: InitialProps;
96
125
  }
97
126
  export interface WorkspaceSetNewViewPayload {
98
127
  mosaicNodeId: string;
99
128
  newId: string;
100
129
  componentType: string;
130
+ copyOriginalcontent: boolean;
101
131
  }
102
132
  export interface WorkspaceDeleteViewPayload {
103
133
  id: string;
@@ -133,8 +163,10 @@ export interface ViewPresetListItem {
133
163
  date: string;
134
164
  scope: SystemScope;
135
165
  abstract?: string;
166
+ description?: string;
136
167
  is_shared?: boolean;
137
168
  username?: string;
169
+ labels?: WorkspacePresetLabels;
138
170
  }
139
171
  export interface WorkspaceFetchWorkspacePayload {
140
172
  workspaceId: string;
@@ -163,3 +195,4 @@ export interface WorkspaceErrorWorkspacePayload {
163
195
  workspaceId: string;
164
196
  error: WorkspaceError;
165
197
  }
198
+ export type WorkspaceLabelsConfigResponse = WorkspacePresetLabels;
@@ -1,12 +1,12 @@
1
+ import type { PayloadAction } from '@reduxjs/toolkit';
2
+ import type { AxiosError } from 'axios';
3
+ import type { MosaicNode } from 'react-mosaic-component';
4
+ import type { SystemScope } from '@opengeoweb/shared';
1
5
  import { syncGroupsTypes } from '@opengeoweb/store';
2
- import { MosaicNode } from 'react-mosaic-component';
3
- import { AxiosError } from 'axios';
4
- import { PayloadAction } from '@reduxjs/toolkit';
5
- import { SystemScope } from '@opengeoweb/shared';
6
- import { PresetsApi } from '../../utils/api';
7
- import { WorkspacePreset, WorkspacePresetForBE, WorkspaceViewsFromBE, ViewType, WorkspaceViewPresetComponentsLookupType, WorkspaceSyncGroup } from './types';
8
- import { WorkspaceDialogView } from '../workspaceList/types';
9
- import { SaveViewPresetPayload, ViewPreset } from '../viewPresets/types';
6
+ import type { WorkspacePreset, WorkspacePresetForBE, WorkspaceViewsFromBE, ViewType, WorkspaceViewPresetComponentsLookupType, WorkspaceSyncGroup, WorkspaceViews } from './types';
7
+ import type { PresetsApi } from '../../utils/api';
8
+ import type { SaveViewPresetPayload, ViewPreset } from '../viewPresets/types';
9
+ import type { WorkspaceDialogView } from '../workspaceList/types';
10
10
  export declare const getWorkspaceApi: () => PresetsApi;
11
11
  export declare const getViewPresetState: (viewPresetId: string, mosaicNodeId: string, state: "loading" | "error") => {
12
12
  title: string;
@@ -32,3 +32,4 @@ export declare const getViewType: (numViews: number, firstViewComponentType: str
32
32
  export declare const makeListOfViewIds: (mNode: MosaicNode<string>) => string[];
33
33
  export declare const getErrorMessage: (error: AxiosError<unknown>) => string;
34
34
  export declare const updateViewPresets: (saveViewPreset: (payloadAction: PayloadAction<SaveViewPresetPayload>, saveAs?: boolean) => Promise<ViewPreset | Error | void>, getViewPresetEntity: (view: WorkspaceDialogView) => ViewPreset, data: WorkspacePresetForBE, scope: SystemScope) => Promise<(void | Error | ViewPreset)[]>;
35
+ export declare const toViewsArray: (wsViews: WorkspaceViewsFromBE[] | WorkspaceViews | null | undefined) => WorkspaceViewsFromBE[];
@@ -1,6 +1,6 @@
1
1
  import { Draft, PayloadAction } from '@reduxjs/toolkit';
2
2
  import { WorkspacePresetListItem } from '../workspace/types';
3
- import { ErrorWorkspaceList, FetchedWorkspaceList, FetchWorkspaceList, OnErrorWorkspacePresetActionPayload, OnSuccesWorkspacePresetActionPayload, OpenWorkspaceActionDialogPayload, PresetFilterType, SearchWorkspaceFilter, SubmitFormWorkspaceActionDialogPayload, ToggleListDialogPayload, ToggleSelectFilterChip, WorkspaceListFilter, WorkspaceListState } from './types';
3
+ import { ErrorWorkspaceList, FetchedWorkspaceList, FetchWorkspaceList, OnErrorWorkspacePresetActionPayload, OnSuccesWorkspacePresetActionPayload, OpenWorkspaceActionDialogPayload, PresetFilterType, SearchWorkspaceFilter, SetWorkspaceLabelFiltersPayload, SubmitFormWorkspaceActionDialogPayload, ToggleListDialogPayload, ToggleSelectFilterChip, WorkspaceListFilter, WorkspaceListState } from './types';
4
4
  export declare const personalFilterState: {
5
5
  label: string;
6
6
  id: PresetFilterType;
@@ -38,5 +38,7 @@ export declare const workspaceListReducer: import("redux").Reducer<WorkspaceList
38
38
  toggleSelectFilterChip: (draft: Draft<WorkspaceListState>, action: PayloadAction<ToggleSelectFilterChip>) => void;
39
39
  setSelectAllFilterChip: (draft: Draft<WorkspaceListState>) => void;
40
40
  setFilterChips: (draft: Draft<WorkspaceListState>, action: PayloadAction<ToggleSelectFilterChip[]>) => void;
41
+ setWorkspaceLabelFilters: (draft: Draft<WorkspaceListState>, action: PayloadAction<SetWorkspaceLabelFiltersPayload>) => void;
42
+ clearLabelFilters: (draft: Draft<WorkspaceListState>) => void;
41
43
  searchFilter: (draft: Draft<WorkspaceListState>, action: PayloadAction<SearchWorkspaceFilter>) => void;
42
44
  }, "workspaceList">;
@@ -1,8 +1,7 @@
1
- import { SystemScope } from '@opengeoweb/shared';
2
- import { AppStore } from '../types';
3
- import { ViewPresetState } from '../viewPresets/types';
4
- import { WorkspacePresetListItem, WorkspaceState } from '../workspace/types';
5
- import { WorkspaceListState } from './types';
1
+ import type { SystemScope } from '@opengeoweb/shared';
2
+ import type { AppStore } from '../types';
3
+ import type { WorkspaceDialogView, WorkspaceListState } from './types';
4
+ import type { WorkspacePresetLabels, WorkspacePresetListItem, WorkspaceState } from '../workspace/types';
6
5
  export declare const getWorkspaceListStore: (store: AppStore) => WorkspaceListState;
7
6
  export declare const getWorkspaceList: (state: AppStore) => WorkspacePresetListItem[];
8
7
  export declare const getWorkspacePresetFromList: (store: AppStore, id: string) => WorkspacePresetListItem;
@@ -92,31 +91,34 @@ export declare const getWorkspaceActionFormValues: ((state: AppStore) => import(
92
91
  };
93
92
  export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => false | {
94
93
  formValues: {
95
- views: {
94
+ views: (WorkspaceDialogView | {
96
95
  mosaicNodeId: string;
97
- viewPresetId: string;
98
- isSelected: boolean;
99
96
  title: string | undefined;
100
- error: import("../viewPresets/types").ViewPresetError;
101
- isFetching: boolean;
102
- hasChanges: boolean;
97
+ abstract: string | undefined;
98
+ componentType: string;
103
99
  scope: SystemScope;
104
- }[];
100
+ initialProps: Record<string, unknown> | import("@opengeoweb/core").InitialMultiMapProps | import("@opengeoweb/core").InitialHarmTempAndPrecipProps | import("dist/libs/core/src/lib/components/MultiMapViewConnect/ModelRunInterval").ModelRunIntervalProps | import("@opengeoweb/store").MapPresetInitialProps | import("@opengeoweb/core").InitialSliderProps | import("@opengeoweb/core").InitialTimeSeriesProps | undefined;
101
+ originalViewPresetId: string | undefined;
102
+ })[];
105
103
  id?: string;
106
104
  title?: string;
107
105
  abstract?: string;
106
+ description?: string;
108
107
  scope?: SystemScope;
108
+ labels?: WorkspacePresetLabels;
109
+ updated?: string;
110
+ updatedBy?: string;
111
+ username?: string;
109
112
  } | {
110
- views: {
113
+ views: (WorkspaceDialogView | {
111
114
  mosaicNodeId: string;
112
- viewPresetId: string;
113
- isSelected: boolean;
114
115
  title: string | undefined;
115
- error: import("../viewPresets/types").ViewPresetError;
116
- isFetching: boolean;
117
- hasChanges: boolean;
116
+ abstract: string | undefined;
117
+ componentType: string;
118
118
  scope: SystemScope;
119
- }[];
119
+ initialProps: Record<string, unknown> | import("@opengeoweb/core").InitialMultiMapProps | import("@opengeoweb/core").InitialHarmTempAndPrecipProps | import("dist/libs/core/src/lib/components/MultiMapViewConnect/ModelRunInterval").ModelRunIntervalProps | import("@opengeoweb/store").MapPresetInitialProps | import("@opengeoweb/core").InitialSliderProps | import("@opengeoweb/core").InitialTimeSeriesProps | undefined;
120
+ originalViewPresetId: string | undefined;
121
+ })[];
120
122
  id?: string;
121
123
  title: string;
122
124
  syncGroups?: import("../workspace/types").WorkspaceSyncGroup[];
@@ -127,6 +129,10 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
127
129
  is_shared?: boolean;
128
130
  username?: string;
129
131
  abstract?: string;
132
+ description?: string;
133
+ labels?: WorkspacePresetLabels;
134
+ updated?: string;
135
+ updatedBy?: string;
130
136
  };
131
137
  action: import("../workspace/types").WorkspacePresetAction;
132
138
  presetId: string;
@@ -138,33 +144,36 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
138
144
  resultsCount: () => number;
139
145
  resetResultsCount: () => void;
140
146
  } & {
141
- resultFunc: (resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: WorkspaceState, resultFuncArgs_2: ViewPresetState) => false | {
147
+ resultFunc: (resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: WorkspaceState) => false | {
142
148
  formValues: {
143
- views: {
149
+ views: (WorkspaceDialogView | {
144
150
  mosaicNodeId: string;
145
- viewPresetId: string;
146
- isSelected: boolean;
147
151
  title: string | undefined;
148
- error: import("../viewPresets/types").ViewPresetError;
149
- isFetching: boolean;
150
- hasChanges: boolean;
152
+ abstract: string | undefined;
153
+ componentType: string;
151
154
  scope: SystemScope;
152
- }[];
155
+ initialProps: Record<string, unknown> | import("@opengeoweb/core").InitialMultiMapProps | import("@opengeoweb/core").InitialHarmTempAndPrecipProps | import("dist/libs/core/src/lib/components/MultiMapViewConnect/ModelRunInterval").ModelRunIntervalProps | import("@opengeoweb/store").MapPresetInitialProps | import("@opengeoweb/core").InitialSliderProps | import("@opengeoweb/core").InitialTimeSeriesProps | undefined;
156
+ originalViewPresetId: string | undefined;
157
+ })[];
153
158
  id?: string;
154
159
  title?: string;
155
160
  abstract?: string;
161
+ description?: string;
156
162
  scope?: SystemScope;
163
+ labels?: WorkspacePresetLabels;
164
+ updated?: string;
165
+ updatedBy?: string;
166
+ username?: string;
157
167
  } | {
158
- views: {
168
+ views: (WorkspaceDialogView | {
159
169
  mosaicNodeId: string;
160
- viewPresetId: string;
161
- isSelected: boolean;
162
170
  title: string | undefined;
163
- error: import("../viewPresets/types").ViewPresetError;
164
- isFetching: boolean;
165
- hasChanges: boolean;
171
+ abstract: string | undefined;
172
+ componentType: string;
166
173
  scope: SystemScope;
167
- }[];
174
+ initialProps: Record<string, unknown> | import("@opengeoweb/core").InitialMultiMapProps | import("@opengeoweb/core").InitialHarmTempAndPrecipProps | import("dist/libs/core/src/lib/components/MultiMapViewConnect/ModelRunInterval").ModelRunIntervalProps | import("@opengeoweb/store").MapPresetInitialProps | import("@opengeoweb/core").InitialSliderProps | import("@opengeoweb/core").InitialTimeSeriesProps | undefined;
175
+ originalViewPresetId: string | undefined;
176
+ })[];
168
177
  id?: string;
169
178
  title: string;
170
179
  syncGroups?: import("../workspace/types").WorkspaceSyncGroup[];
@@ -175,6 +184,10 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
175
184
  is_shared?: boolean;
176
185
  username?: string;
177
186
  abstract?: string;
187
+ description?: string;
188
+ labels?: WorkspacePresetLabels;
189
+ updated?: string;
190
+ updatedBy?: string;
178
191
  };
179
192
  action: import("../workspace/types").WorkspacePresetAction;
180
193
  presetId: string;
@@ -182,33 +195,36 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
182
195
  isFetching?: boolean;
183
196
  hasSaved?: boolean;
184
197
  };
185
- memoizedResultFunc: ((resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: WorkspaceState, resultFuncArgs_2: ViewPresetState) => false | {
198
+ memoizedResultFunc: ((resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: WorkspaceState) => false | {
186
199
  formValues: {
187
- views: {
200
+ views: (WorkspaceDialogView | {
188
201
  mosaicNodeId: string;
189
- viewPresetId: string;
190
- isSelected: boolean;
191
202
  title: string | undefined;
192
- error: import("../viewPresets/types").ViewPresetError;
193
- isFetching: boolean;
194
- hasChanges: boolean;
203
+ abstract: string | undefined;
204
+ componentType: string;
195
205
  scope: SystemScope;
196
- }[];
206
+ initialProps: Record<string, unknown> | import("@opengeoweb/core").InitialMultiMapProps | import("@opengeoweb/core").InitialHarmTempAndPrecipProps | import("dist/libs/core/src/lib/components/MultiMapViewConnect/ModelRunInterval").ModelRunIntervalProps | import("@opengeoweb/store").MapPresetInitialProps | import("@opengeoweb/core").InitialSliderProps | import("@opengeoweb/core").InitialTimeSeriesProps | undefined;
207
+ originalViewPresetId: string | undefined;
208
+ })[];
197
209
  id?: string;
198
210
  title?: string;
199
211
  abstract?: string;
212
+ description?: string;
200
213
  scope?: SystemScope;
214
+ labels?: WorkspacePresetLabels;
215
+ updated?: string;
216
+ updatedBy?: string;
217
+ username?: string;
201
218
  } | {
202
- views: {
219
+ views: (WorkspaceDialogView | {
203
220
  mosaicNodeId: string;
204
- viewPresetId: string;
205
- isSelected: boolean;
206
221
  title: string | undefined;
207
- error: import("../viewPresets/types").ViewPresetError;
208
- isFetching: boolean;
209
- hasChanges: boolean;
222
+ abstract: string | undefined;
223
+ componentType: string;
210
224
  scope: SystemScope;
211
- }[];
225
+ initialProps: Record<string, unknown> | import("@opengeoweb/core").InitialMultiMapProps | import("@opengeoweb/core").InitialHarmTempAndPrecipProps | import("dist/libs/core/src/lib/components/MultiMapViewConnect/ModelRunInterval").ModelRunIntervalProps | import("@opengeoweb/store").MapPresetInitialProps | import("@opengeoweb/core").InitialSliderProps | import("@opengeoweb/core").InitialTimeSeriesProps | undefined;
226
+ originalViewPresetId: string | undefined;
227
+ })[];
212
228
  id?: string;
213
229
  title: string;
214
230
  syncGroups?: import("../workspace/types").WorkspaceSyncGroup[];
@@ -219,6 +235,10 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
219
235
  is_shared?: boolean;
220
236
  username?: string;
221
237
  abstract?: string;
238
+ description?: string;
239
+ labels?: WorkspacePresetLabels;
240
+ updated?: string;
241
+ updatedBy?: string;
222
242
  };
223
243
  action: import("../workspace/types").WorkspacePresetAction;
224
244
  presetId: string;
@@ -232,31 +252,34 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
232
252
  };
233
253
  lastResult: () => false | {
234
254
  formValues: {
235
- views: {
255
+ views: (WorkspaceDialogView | {
236
256
  mosaicNodeId: string;
237
- viewPresetId: string;
238
- isSelected: boolean;
239
257
  title: string | undefined;
240
- error: import("../viewPresets/types").ViewPresetError;
241
- isFetching: boolean;
242
- hasChanges: boolean;
258
+ abstract: string | undefined;
259
+ componentType: string;
243
260
  scope: SystemScope;
244
- }[];
261
+ initialProps: Record<string, unknown> | import("@opengeoweb/core").InitialMultiMapProps | import("@opengeoweb/core").InitialHarmTempAndPrecipProps | import("dist/libs/core/src/lib/components/MultiMapViewConnect/ModelRunInterval").ModelRunIntervalProps | import("@opengeoweb/store").MapPresetInitialProps | import("@opengeoweb/core").InitialSliderProps | import("@opengeoweb/core").InitialTimeSeriesProps | undefined;
262
+ originalViewPresetId: string | undefined;
263
+ })[];
245
264
  id?: string;
246
265
  title?: string;
247
266
  abstract?: string;
267
+ description?: string;
248
268
  scope?: SystemScope;
269
+ labels?: WorkspacePresetLabels;
270
+ updated?: string;
271
+ updatedBy?: string;
272
+ username?: string;
249
273
  } | {
250
- views: {
274
+ views: (WorkspaceDialogView | {
251
275
  mosaicNodeId: string;
252
- viewPresetId: string;
253
- isSelected: boolean;
254
276
  title: string | undefined;
255
- error: import("../viewPresets/types").ViewPresetError;
256
- isFetching: boolean;
257
- hasChanges: boolean;
277
+ abstract: string | undefined;
278
+ componentType: string;
258
279
  scope: SystemScope;
259
- }[];
280
+ initialProps: Record<string, unknown> | import("@opengeoweb/core").InitialMultiMapProps | import("@opengeoweb/core").InitialHarmTempAndPrecipProps | import("dist/libs/core/src/lib/components/MultiMapViewConnect/ModelRunInterval").ModelRunIntervalProps | import("@opengeoweb/store").MapPresetInitialProps | import("@opengeoweb/core").InitialSliderProps | import("@opengeoweb/core").InitialTimeSeriesProps | undefined;
281
+ originalViewPresetId: string | undefined;
282
+ })[];
260
283
  id?: string;
261
284
  title: string;
262
285
  syncGroups?: import("../workspace/types").WorkspaceSyncGroup[];
@@ -267,6 +290,10 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
267
290
  is_shared?: boolean;
268
291
  username?: string;
269
292
  abstract?: string;
293
+ description?: string;
294
+ labels?: WorkspacePresetLabels;
295
+ updated?: string;
296
+ updatedBy?: string;
270
297
  };
271
298
  action: import("../workspace/types").WorkspacePresetAction;
272
299
  presetId: string;
@@ -274,7 +301,7 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
274
301
  isFetching?: boolean;
275
302
  hasSaved?: boolean;
276
303
  };
277
- dependencies: [(store: AppStore) => WorkspaceListState, (store: AppStore) => WorkspaceState, (store: AppStore) => ViewPresetState];
304
+ dependencies: [(store: AppStore) => WorkspaceListState, (store: AppStore) => WorkspaceState];
278
305
  recomputations: () => number;
279
306
  resetRecomputations: () => void;
280
307
  dependencyRecomputations: () => number;
@@ -366,3 +393,24 @@ export declare const getWorkspaceListSearchQuery: ((state: AppStore) => string)
366
393
  memoize: typeof import("reselect").weakMapMemoize;
367
394
  argsMemoize: typeof import("reselect").weakMapMemoize;
368
395
  };
396
+ export declare const getWorkspaceLabelFilters: ((state: AppStore) => WorkspacePresetLabels | undefined) & {
397
+ clearCache: () => void;
398
+ resultsCount: () => number;
399
+ resetResultsCount: () => void;
400
+ } & {
401
+ resultFunc: (resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: AppStore) => WorkspacePresetLabels | undefined;
402
+ memoizedResultFunc: ((resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: AppStore) => WorkspacePresetLabels | undefined) & {
403
+ clearCache: () => void;
404
+ resultsCount: () => number;
405
+ resetResultsCount: () => void;
406
+ };
407
+ lastResult: () => WorkspacePresetLabels | undefined;
408
+ dependencies: [(store: AppStore) => WorkspaceListState, (store: AppStore) => AppStore];
409
+ recomputations: () => number;
410
+ resetRecomputations: () => void;
411
+ dependencyRecomputations: () => number;
412
+ resetDependencyRecomputations: () => void;
413
+ } & {
414
+ memoize: typeof import("reselect").weakMapMemoize;
415
+ argsMemoize: typeof import("reselect").weakMapMemoize;
416
+ };
@@ -1,7 +1,7 @@
1
- import { SystemScope } from '@opengeoweb/shared';
2
- import { EntityState } from '@reduxjs/toolkit';
3
- import { type ViewPresetError } from '../viewPresets/types';
4
- import { WorkspacePresetAction, WorkspacePresetForBE, WorkspacePresetListItem, WorkspaceViewsFromBE } from '../workspace/types';
1
+ import type { EntityState } from '@reduxjs/toolkit';
2
+ import type { SystemScope } from '@opengeoweb/shared';
3
+ import type { ViewPresetError } from '../viewPresets/types';
4
+ import type { WorkspacePresetAction, WorkspacePresetForBE, WorkspacePresetLabels, WorkspacePresetListItem, WorkspaceViewsFromBE } from '../workspace/types';
5
5
  export declare enum WorkspaceListErrorCategory {
6
6
  AUTH = "AUTH",// Errors related to authentication and authorization
7
7
  GENERIC = "GENERIC"
@@ -45,13 +45,19 @@ export type WorkspaceDialogView = {
45
45
  error?: ViewPresetError;
46
46
  scope: SystemScope;
47
47
  abstract?: string;
48
+ description?: string;
48
49
  } & WorkspaceViewsFromBE;
49
50
  export interface WorkspaceFormValues {
50
51
  id?: string;
51
52
  title?: string;
52
53
  abstract?: string;
54
+ description?: string;
53
55
  scope?: SystemScope;
54
56
  views?: WorkspaceDialogView[];
57
+ labels?: WorkspacePresetLabels;
58
+ updated?: string;
59
+ updatedBy?: string;
60
+ username?: string;
55
61
  }
56
62
  export type WorkspacePresetFormValues = WorkspaceFormValues | WorkspacePresetForBE;
57
63
  export interface WorkspaceActionDialogType {
@@ -69,6 +75,7 @@ export interface WorkspaceListState extends WorkspaceListEntityState {
69
75
  workspaceActionDialog?: WorkspaceActionDialogType;
70
76
  searchQuery?: string;
71
77
  workspaceListFilters?: WorkspaceListFilter[];
78
+ workspaceLabelFilters?: WorkspacePresetLabels;
72
79
  }
73
80
  export type FetchWorkspaceList = FetchWorkspaceParams;
74
81
  export interface FetchedWorkspaceList {
@@ -85,6 +92,9 @@ export interface ToggleSelectFilterChip {
85
92
  isSelected: boolean;
86
93
  isAdmin?: boolean;
87
94
  }
95
+ export interface SetWorkspaceLabelFiltersPayload {
96
+ labels: WorkspacePresetLabels;
97
+ }
88
98
  export interface SearchWorkspaceFilter {
89
99
  searchQuery: string;
90
100
  }
@@ -101,17 +111,24 @@ export interface OnNonDeleteSuccesWorkspacePresetActionPayload {
101
111
  action: Exclude<WorkspacePresetAction, WorkspacePresetAction.DELETE | WorkspacePresetAction.DELETE_SYSTEM_PRESET>;
102
112
  title: string;
103
113
  abstract?: string;
114
+ description?: string;
104
115
  currentActiveWorkspaceId?: string;
105
116
  scope: SystemScope;
106
117
  is_shared?: boolean;
118
+ labels?: WorkspacePresetLabels;
119
+ views?: WorkspaceViewsFromBE[];
120
+ updated?: string;
121
+ updatedBy?: string;
107
122
  }
108
123
  export interface OnDeleteSuccesWorkspacePresetActionPayload {
109
124
  workspaceId: string;
110
125
  action: WorkspacePresetAction.DELETE | WorkspacePresetAction.DELETE_SYSTEM_PRESET;
111
126
  title: string;
112
127
  abstract?: string;
128
+ description?: string;
113
129
  currentActiveWorkspaceId?: string;
114
130
  emptyWorkspacePresetTitle: string;
131
+ views?: WorkspaceViewsFromBE[];
115
132
  }
116
133
  export type OnSuccesWorkspacePresetActionPayload = OnNonDeleteSuccesWorkspacePresetActionPayload | OnDeleteSuccesWorkspacePresetActionPayload;
117
134
  export interface OnErrorWorkspacePresetActionPayload {
@@ -0,0 +1,3 @@
1
+ import { WorkspacePresetLabels } from '../store/workspace/types';
2
+ export type LabelKey = 'purpose' | 'parameters' | 'phenomena' | 'dataType' | 'viewType' | 'dataSource';
3
+ export declare const LABELS_CONFIG_DEFAULT: WorkspacePresetLabels;
@@ -1,8 +1,9 @@
1
1
  import { TFunction } from 'i18next';
2
2
  import { ViewPresetsListFilter } from '../store/viewPresets/types';
3
- import { ViewPresetListItem, WorkspacePresetListItem } from '../store/workspace/types';
3
+ import { ViewPresetListItem, WorkspacePresetLabels, WorkspacePresetListItem } from '../store/workspace/types';
4
4
  import { WorkspaceListFilter } from '../store/workspaceList/types';
5
5
  export declare const getCleanSearchQuery: (searchQuery: string) => string;
6
6
  export declare const getPresetTitle: (title: string, hasChanges: boolean, isNew: boolean, t: TFunction) => string;
7
7
  export declare const setDocumentTitle: (workspaceTitle: string, appTitle?: string) => void;
8
- export declare const filterAndSortPresets: <T extends WorkspacePresetListItem | ViewPresetListItem>(presets: T[], selectedFilters: WorkspaceListFilter[] | ViewPresetsListFilter[], username: string, isAdmin: boolean) => T[];
8
+ export declare const humanizeLabelStrings: (value: string) => string;
9
+ export declare const filterAndSortPresets: <T extends WorkspacePresetListItem | ViewPresetListItem>(presets: T[], selectedFilters: WorkspaceListFilter[] | ViewPresetsListFilter[], username: string, isAdmin: boolean, labelFilters?: WorkspacePresetLabels) => T[];
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { WorkspaceDialogView } from '../../store/workspaceList/types';
3
- declare const WorkspaceViewPresetsFormFields: React.FC<{
4
- viewPresets: WorkspaceDialogView[];
5
- isLoading?: boolean;
6
- isAdmin?: boolean;
7
- }>;
8
- export default WorkspaceViewPresetsFormFields;