@opengeoweb/workspace 14.3.0 → 14.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +5115 -4579
- package/package.json +20 -18
- package/src/lib/api/utils.d.ts +1 -0
- package/src/lib/api/viewpresets-api/api.d.ts +4 -4
- package/src/lib/api/viewpresets-api/fakeApi/mockData.d.ts +26 -0
- package/src/lib/api/viewpresets-api/hooks.d.ts +3 -1
- package/src/lib/api/viewpresets-api/queryOptions.d.ts +12 -0
- package/src/lib/api/workspace-api/api.d.ts +2 -2
- package/src/lib/api/workspace-api/fakeApi/mockData.d.ts +12 -0
- package/src/lib/api/workspace-api/hooks.d.ts +3 -2
- package/src/lib/components/ComponentsLookUpWrapper/ComponentsLookUpWrapper.d.ts +1 -1
- package/src/lib/components/DefaultComponentsLookUp/DefaultComponentsLookUp.d.ts +2 -2
- package/src/lib/components/LabelsPanel/PresetLabelsPanel.d.ts +14 -0
- package/src/lib/components/Providers/Providers.d.ts +3 -3
- package/src/lib/components/Providers/WorkspaceModuleProvider.d.ts +2 -2
- package/src/lib/components/ViewPresetMenu/ViewPresetMenu.d.ts +1 -0
- package/src/lib/components/ViewPresetMenu/ViewPresetMenuListConnect.d.ts +4 -1
- package/src/lib/components/ViewPresetMenu/ViewPresetsError.stories.d.ts +21 -3
- package/src/lib/components/ViewPresetsFormDialog/ViewPresetsForm.d.ts +11 -1
- package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialog.d.ts +5 -2
- package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialog.stories.d.ts +1 -1
- package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialogConnect.d.ts +3 -1
- package/src/lib/components/WorkspaceDetail/WorkspaceDetail.d.ts +2 -2
- package/src/lib/components/WorkspaceDetail/WorkspaceDetail.stories.d.ts +20 -2
- package/src/lib/components/WorkspaceDetail/WorkspaceDetailError.stories.d.ts +10 -2
- package/src/lib/components/WorkspaceMenu/WorkspaceMenu.d.ts +1 -0
- package/src/lib/components/WorkspaceMenu/WorkspaceMenu.stories.d.ts +2 -0
- package/src/lib/components/WorkspaceMenu/WorkspaceMenuButton.d.ts +1 -1
- package/src/lib/components/WorkspaceMenu/WorkspaceMenuButtonConnect.d.ts +1 -1
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsForm.d.ts +3 -2
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.d.ts +3 -2
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.stories.d.ts +2 -0
- package/src/lib/components/WorkspaceSelectList/WorkspaceMenuLabelsWrapper.d.ts +9 -0
- package/src/lib/components/WorkspaceSelectList/WorkspaceMenuLabelsWrapper.spec.d.ts +1 -0
- package/src/lib/components/WorkspaceSelectList/WorkspacePresetInfo.d.ts +12 -0
- package/src/lib/components/WorkspaceSelectList/WorkspacePresetInfo.spec.d.ts +1 -0
- package/src/lib/components/WorkspaceSelectList/WorkspacePresetInfo.stories.d.ts +10 -0
- package/src/lib/components/WorkspaceSelectList/WorkspaceSelectList.d.ts +5 -3
- package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListConnect.d.ts +7 -2
- package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListRow.d.ts +4 -1
- package/src/lib/components/WorkspaceTab/WorkspaceTab.d.ts +1 -1
- package/src/lib/components/WorkspaceTopBar/WorkspaceTopBar.d.ts +1 -1
- package/src/lib/components/WorkspaceView/LoadingIndicator/LoadingIndicatorConnect.d.ts +1 -1
- package/src/lib/components/WorkspaceView/SplitButtonsConnect.d.ts +8 -0
- package/src/lib/components/WorkspaceView/SplitButtonsConnect.spec.d.ts +1 -0
- package/src/lib/components/WorkspaceView/WorkspaceControls.d.ts +2 -2
- package/src/lib/components/WorkspaceView/WorkspaceTileConnect.d.ts +3 -3
- package/src/lib/components/WorkspaceView/WorkspaceView.d.ts +3 -3
- package/src/lib/components/WorkspaceView/WorkspaceViewConnect.d.ts +1 -1
- package/src/lib/components/WorkspaceView/helpers.d.ts +2 -2
- package/src/lib/components/WorkspaceViewTitle/WorkspaceViewTitleConnect.d.ts +1 -1
- package/src/lib/store/store.d.ts +4 -4
- package/src/lib/store/types.d.ts +6 -6
- package/src/lib/store/viewPresets/listener.d.ts +4 -4
- package/src/lib/store/viewPresets/reducer.d.ts +5 -2
- package/src/lib/store/viewPresets/selectors.d.ts +86 -4
- package/src/lib/store/viewPresets/types.d.ts +39 -9
- package/src/lib/store/viewPresets/utils.d.ts +3 -2
- package/src/lib/store/viewPresetsList/reducer.d.ts +2 -2
- package/src/lib/store/viewPresetsList/selectors.d.ts +12 -2
- package/src/lib/store/viewPresetsList/types.d.ts +7 -2
- package/src/lib/store/workspace/listener.d.ts +3 -2
- package/src/lib/store/workspace/reducer.d.ts +2 -2
- package/src/lib/store/workspace/selectors.d.ts +17 -787
- package/src/lib/store/workspace/types.d.ts +28 -20
- package/src/lib/store/workspace/utils.d.ts +1 -1
- package/src/lib/store/workspaceList/listener.d.ts +2 -2
- package/src/lib/store/workspaceList/reducer.d.ts +6 -3
- package/src/lib/store/workspaceList/selectors.d.ts +83 -90
- package/src/lib/store/workspaceList/types.d.ts +13 -0
- package/src/lib/storyUtils/componentsLookUp.d.ts +1 -1
- package/src/lib/storyUtils/componentsLookUp.stories.d.ts +2 -2
- package/src/lib/utils/api.d.ts +5 -8
- package/src/lib/utils/fakeApi.d.ts +5 -5
- package/src/lib/utils/fakeApi.stories.d.ts +10 -1
- package/src/lib/utils/i18n.d.ts +1 -1
- package/src/lib/utils/labels.config.d.ts +2 -8
- package/src/lib/utils/utils.d.ts +6 -5
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetLabelsPanel.d.ts +0 -8
- /package/src/lib/api/viewpresets-api/{fakeApi.d.ts → fakeApi/fakeApi.d.ts} +0 -0
- /package/src/lib/api/workspace-api/{fakeApi.d.ts → fakeApi/fakeApi.d.ts} +0 -0
- /package/src/lib/components/{WorkspacePresetsFormDialog/WorkspacePresetLabelsPanel.spec.d.ts → LabelsPanel/PresetLabelsPanel.spec.d.ts} +0 -0
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import type { MosaicNode } from 'react-mosaic-component';
|
|
2
|
+
import type { InitialProps } from '@opengeoweb/core';
|
|
2
3
|
import type { SystemScope } from '@opengeoweb/shared';
|
|
3
4
|
import type { syncGroupsTypes } from '@opengeoweb/store';
|
|
4
|
-
export type InitialPropsWorkspaceViewType = Record<string, unknown>;
|
|
5
5
|
export type WorkspaceViewPresetComponentsLookupType = 'ViewError' | 'ViewLoading';
|
|
6
6
|
export interface WorkspaceViewType {
|
|
7
7
|
id?: string;
|
|
8
8
|
mosaicNodeId?: string;
|
|
9
9
|
title?: string;
|
|
10
|
+
description?: string;
|
|
10
11
|
abstract?: string;
|
|
11
12
|
componentType: string;
|
|
12
|
-
initialProps?:
|
|
13
|
+
initialProps?: InitialProps;
|
|
13
14
|
activeLayerId?: string;
|
|
14
15
|
shouldPreventClose?: boolean;
|
|
15
16
|
scope?: SystemScope;
|
|
16
17
|
keywords?: string;
|
|
18
|
+
labels?: WorkspaceLabelsConfigResponse;
|
|
17
19
|
}
|
|
18
20
|
export interface WorkspaceViews {
|
|
19
21
|
byId: Record<string, WorkspaceViewType>;
|
|
@@ -23,7 +25,7 @@ export interface WorkspaceViewsFromBE {
|
|
|
23
25
|
mosaicNodeId: string;
|
|
24
26
|
viewPresetId?: string;
|
|
25
27
|
componentType?: string;
|
|
26
|
-
initialProps?:
|
|
28
|
+
initialProps?: InitialProps;
|
|
27
29
|
title?: string;
|
|
28
30
|
originalViewPresetId?: string;
|
|
29
31
|
}
|
|
@@ -44,23 +46,27 @@ export interface WorkspacePreset {
|
|
|
44
46
|
minimumPaneSizePercentage?: number;
|
|
45
47
|
scope?: SystemScope;
|
|
46
48
|
abstract?: string;
|
|
49
|
+
description?: string;
|
|
47
50
|
linking?: Record<string, string[]>;
|
|
48
51
|
username?: string;
|
|
49
52
|
labels?: WorkspacePresetLabels;
|
|
53
|
+
updated?: string;
|
|
54
|
+
updatedBy?: string;
|
|
50
55
|
}
|
|
51
56
|
export interface WorkspaceState extends WorkspacePreset {
|
|
52
57
|
isLoading?: boolean;
|
|
53
58
|
error?: WorkspaceError;
|
|
54
59
|
hasChanges?: boolean;
|
|
55
60
|
}
|
|
56
|
-
export
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
dataSource
|
|
63
|
-
|
|
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
|
+
}
|
|
64
70
|
export interface WorkspacePresetForBE {
|
|
65
71
|
id?: string;
|
|
66
72
|
title: string;
|
|
@@ -73,7 +79,10 @@ export interface WorkspacePresetForBE {
|
|
|
73
79
|
is_shared?: boolean;
|
|
74
80
|
username?: string;
|
|
75
81
|
abstract?: string;
|
|
82
|
+
description?: string;
|
|
76
83
|
labels?: WorkspacePresetLabels;
|
|
84
|
+
updated?: string;
|
|
85
|
+
updatedBy?: string;
|
|
77
86
|
}
|
|
78
87
|
export interface WorkspacePresetFromBE extends WorkspacePresetForBE {
|
|
79
88
|
id: string;
|
|
@@ -91,6 +100,9 @@ export interface WorkspacePresetListItem {
|
|
|
91
100
|
username?: string;
|
|
92
101
|
is_shared?: boolean;
|
|
93
102
|
labels?: WorkspacePresetLabels;
|
|
103
|
+
description?: string;
|
|
104
|
+
updated?: string;
|
|
105
|
+
updatedBy?: string;
|
|
94
106
|
}
|
|
95
107
|
export declare enum WorkspacePresetAction {
|
|
96
108
|
DELETE = "DELETE",
|
|
@@ -109,12 +121,13 @@ export declare enum WorkspacePresetAction {
|
|
|
109
121
|
export interface WorkspaceAddViewPayload {
|
|
110
122
|
id: string;
|
|
111
123
|
componentType: string;
|
|
112
|
-
initialProps:
|
|
124
|
+
initialProps: InitialProps;
|
|
113
125
|
}
|
|
114
126
|
export interface WorkspaceSetNewViewPayload {
|
|
115
127
|
mosaicNodeId: string;
|
|
116
128
|
newId: string;
|
|
117
129
|
componentType: string;
|
|
130
|
+
copyOriginalcontent: boolean;
|
|
118
131
|
}
|
|
119
132
|
export interface WorkspaceDeleteViewPayload {
|
|
120
133
|
id: string;
|
|
@@ -150,8 +163,10 @@ export interface ViewPresetListItem {
|
|
|
150
163
|
date: string;
|
|
151
164
|
scope: SystemScope;
|
|
152
165
|
abstract?: string;
|
|
166
|
+
description?: string;
|
|
153
167
|
is_shared?: boolean;
|
|
154
168
|
username?: string;
|
|
169
|
+
labels?: WorkspacePresetLabels;
|
|
155
170
|
}
|
|
156
171
|
export interface WorkspaceFetchWorkspacePayload {
|
|
157
172
|
workspaceId: string;
|
|
@@ -180,11 +195,4 @@ export interface WorkspaceErrorWorkspacePayload {
|
|
|
180
195
|
workspaceId: string;
|
|
181
196
|
error: WorkspaceError;
|
|
182
197
|
}
|
|
183
|
-
export
|
|
184
|
-
[group: string]: string[] | undefined;
|
|
185
|
-
purpose?: string[];
|
|
186
|
-
parameters?: string[];
|
|
187
|
-
phenomena?: string[];
|
|
188
|
-
dataType?: string[];
|
|
189
|
-
dataSource?: string[];
|
|
190
|
-
}
|
|
198
|
+
export type WorkspaceLabelsConfigResponse = WorkspacePresetLabels;
|
|
@@ -31,5 +31,5 @@ export declare const getViewType: (numViews: number, firstViewComponentType: str
|
|
|
31
31
|
*/
|
|
32
32
|
export declare const makeListOfViewIds: (mNode: MosaicNode<string>) => string[];
|
|
33
33
|
export declare const getErrorMessage: (error: AxiosError<unknown>) => string;
|
|
34
|
-
export declare const updateViewPresets: (saveViewPreset: (payloadAction: PayloadAction<SaveViewPresetPayload>, saveAs?: boolean) => Promise<ViewPreset | Error
|
|
34
|
+
export declare const updateViewPresets: (saveViewPreset: (payloadAction: PayloadAction<SaveViewPresetPayload>, saveAs?: boolean) => Promise<ViewPreset | Error>, getViewPresetEntity: (view: WorkspaceDialogView) => ViewPreset, data: WorkspacePresetForBE, scope: SystemScope) => Promise<(Error | ViewPreset)[]>;
|
|
35
35
|
export declare const toViewsArray: (wsViews: WorkspaceViewsFromBE[] | WorkspaceViews | null | undefined) => WorkspaceViewsFromBE[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { WorkspaceModuleStore } from '../types';
|
|
2
|
+
import type { WorkspacePresetForBE } from '../workspace/types';
|
|
3
3
|
export declare const emptyWorkspaceBEData: Omit<WorkspacePresetForBE, 'title'>;
|
|
4
4
|
export declare const workspaceListListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<WorkspaceModuleStore, import("redux-thunk").ThunkDispatch<WorkspaceModuleStore, unknown, import("redux").UnknownAction>, unknown>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
import type { ErrorWorkspaceList, FetchedWorkspaceList, FetchWorkspaceList, OnErrorWorkspacePresetActionPayload, OnSuccesWorkspacePresetActionPayload, OpenWorkspaceActionDialogPayload, SearchWorkspaceFilter, SetWorkspaceLabelFiltersPayload, SubmitFormWorkspaceActionDialogPayload, ToggleListDialogPayload, ToggleSelectFilterChip, WorkspaceListFilter, WorkspaceListState } from './types';
|
|
3
|
+
import { PresetFilterType } from './types';
|
|
4
|
+
import type { WorkspacePresetListItem } from '../workspace/types';
|
|
4
5
|
export declare const personalFilterState: {
|
|
5
6
|
label: string;
|
|
6
7
|
id: PresetFilterType;
|
|
@@ -38,5 +39,7 @@ export declare const workspaceListReducer: import("redux").Reducer<WorkspaceList
|
|
|
38
39
|
toggleSelectFilterChip: (draft: Draft<WorkspaceListState>, action: PayloadAction<ToggleSelectFilterChip>) => void;
|
|
39
40
|
setSelectAllFilterChip: (draft: Draft<WorkspaceListState>) => void;
|
|
40
41
|
setFilterChips: (draft: Draft<WorkspaceListState>, action: PayloadAction<ToggleSelectFilterChip[]>) => void;
|
|
42
|
+
setWorkspaceLabelFilters: (draft: Draft<WorkspaceListState>, action: PayloadAction<SetWorkspaceLabelFiltersPayload>) => void;
|
|
43
|
+
clearLabelFilters: (draft: Draft<WorkspaceListState>) => void;
|
|
41
44
|
searchFilter: (draft: Draft<WorkspaceListState>, action: PayloadAction<SearchWorkspaceFilter>) => void;
|
|
42
45
|
}, "workspaceList">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SystemScope } from '@opengeoweb/shared';
|
|
2
2
|
import type { AppStore } from '../types';
|
|
3
|
-
import type { WorkspaceListState } from './types';
|
|
4
|
-
import type { WorkspacePresetListItem, WorkspaceState } from '../workspace/types';
|
|
3
|
+
import type { WorkspaceDialogView, WorkspaceListState } from './types';
|
|
4
|
+
import type { WorkspacePresetLabels, WorkspacePresetListItem, WorkspaceState } from '../workspace/types';
|
|
5
5
|
export declare const getWorkspaceListStore: (store: AppStore) => WorkspaceListState;
|
|
6
6
|
export declare const getWorkspaceList: (state: AppStore) => WorkspacePresetListItem[];
|
|
7
7
|
export declare const getWorkspacePresetFromList: (store: AppStore, id: string) => WorkspacePresetListItem;
|
|
@@ -91,37 +91,34 @@ export declare const getWorkspaceActionFormValues: ((state: AppStore) => import(
|
|
|
91
91
|
};
|
|
92
92
|
export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => false | {
|
|
93
93
|
formValues: {
|
|
94
|
-
views: {
|
|
94
|
+
views: (WorkspaceDialogView | {
|
|
95
95
|
mosaicNodeId: string;
|
|
96
96
|
title: string | undefined;
|
|
97
97
|
abstract: string | undefined;
|
|
98
98
|
componentType: string;
|
|
99
99
|
scope: SystemScope;
|
|
100
|
-
initialProps: import("
|
|
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
101
|
originalViewPresetId: string | undefined;
|
|
102
|
-
}[];
|
|
102
|
+
})[];
|
|
103
103
|
id?: string;
|
|
104
104
|
title?: string;
|
|
105
105
|
abstract?: string;
|
|
106
|
+
description?: string;
|
|
106
107
|
scope?: SystemScope;
|
|
107
|
-
labels?:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
dataType: string[];
|
|
112
|
-
viewType: string[];
|
|
113
|
-
dataSource: string[];
|
|
114
|
-
}> | undefined;
|
|
108
|
+
labels?: WorkspacePresetLabels;
|
|
109
|
+
updated?: string;
|
|
110
|
+
updatedBy?: string;
|
|
111
|
+
username?: string;
|
|
115
112
|
} | {
|
|
116
|
-
views: {
|
|
113
|
+
views: (WorkspaceDialogView | {
|
|
117
114
|
mosaicNodeId: string;
|
|
118
115
|
title: string | undefined;
|
|
119
116
|
abstract: string | undefined;
|
|
120
117
|
componentType: string;
|
|
121
118
|
scope: SystemScope;
|
|
122
|
-
initialProps: import("
|
|
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;
|
|
123
120
|
originalViewPresetId: string | undefined;
|
|
124
|
-
}[];
|
|
121
|
+
})[];
|
|
125
122
|
id?: string;
|
|
126
123
|
title: string;
|
|
127
124
|
syncGroups?: import("../workspace/types").WorkspaceSyncGroup[];
|
|
@@ -132,14 +129,10 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
132
129
|
is_shared?: boolean;
|
|
133
130
|
username?: string;
|
|
134
131
|
abstract?: string;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
dataType: string[];
|
|
140
|
-
viewType: string[];
|
|
141
|
-
dataSource: string[];
|
|
142
|
-
}> | undefined;
|
|
132
|
+
description?: string;
|
|
133
|
+
labels?: WorkspacePresetLabels;
|
|
134
|
+
updated?: string;
|
|
135
|
+
updatedBy?: string;
|
|
143
136
|
};
|
|
144
137
|
action: import("../workspace/types").WorkspacePresetAction;
|
|
145
138
|
presetId: string;
|
|
@@ -153,37 +146,34 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
153
146
|
} & {
|
|
154
147
|
resultFunc: (resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: WorkspaceState) => false | {
|
|
155
148
|
formValues: {
|
|
156
|
-
views: {
|
|
149
|
+
views: (WorkspaceDialogView | {
|
|
157
150
|
mosaicNodeId: string;
|
|
158
151
|
title: string | undefined;
|
|
159
152
|
abstract: string | undefined;
|
|
160
153
|
componentType: string;
|
|
161
154
|
scope: SystemScope;
|
|
162
|
-
initialProps: import("
|
|
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;
|
|
163
156
|
originalViewPresetId: string | undefined;
|
|
164
|
-
}[];
|
|
157
|
+
})[];
|
|
165
158
|
id?: string;
|
|
166
159
|
title?: string;
|
|
167
160
|
abstract?: string;
|
|
161
|
+
description?: string;
|
|
168
162
|
scope?: SystemScope;
|
|
169
|
-
labels?:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
dataType: string[];
|
|
174
|
-
viewType: string[];
|
|
175
|
-
dataSource: string[];
|
|
176
|
-
}> | undefined;
|
|
163
|
+
labels?: WorkspacePresetLabels;
|
|
164
|
+
updated?: string;
|
|
165
|
+
updatedBy?: string;
|
|
166
|
+
username?: string;
|
|
177
167
|
} | {
|
|
178
|
-
views: {
|
|
168
|
+
views: (WorkspaceDialogView | {
|
|
179
169
|
mosaicNodeId: string;
|
|
180
170
|
title: string | undefined;
|
|
181
171
|
abstract: string | undefined;
|
|
182
172
|
componentType: string;
|
|
183
173
|
scope: SystemScope;
|
|
184
|
-
initialProps: import("
|
|
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;
|
|
185
175
|
originalViewPresetId: string | undefined;
|
|
186
|
-
}[];
|
|
176
|
+
})[];
|
|
187
177
|
id?: string;
|
|
188
178
|
title: string;
|
|
189
179
|
syncGroups?: import("../workspace/types").WorkspaceSyncGroup[];
|
|
@@ -194,14 +184,10 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
194
184
|
is_shared?: boolean;
|
|
195
185
|
username?: string;
|
|
196
186
|
abstract?: string;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
dataType: string[];
|
|
202
|
-
viewType: string[];
|
|
203
|
-
dataSource: string[];
|
|
204
|
-
}> | undefined;
|
|
187
|
+
description?: string;
|
|
188
|
+
labels?: WorkspacePresetLabels;
|
|
189
|
+
updated?: string;
|
|
190
|
+
updatedBy?: string;
|
|
205
191
|
};
|
|
206
192
|
action: import("../workspace/types").WorkspacePresetAction;
|
|
207
193
|
presetId: string;
|
|
@@ -211,37 +197,34 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
211
197
|
};
|
|
212
198
|
memoizedResultFunc: ((resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: WorkspaceState) => false | {
|
|
213
199
|
formValues: {
|
|
214
|
-
views: {
|
|
200
|
+
views: (WorkspaceDialogView | {
|
|
215
201
|
mosaicNodeId: string;
|
|
216
202
|
title: string | undefined;
|
|
217
203
|
abstract: string | undefined;
|
|
218
204
|
componentType: string;
|
|
219
205
|
scope: SystemScope;
|
|
220
|
-
initialProps: import("
|
|
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;
|
|
221
207
|
originalViewPresetId: string | undefined;
|
|
222
|
-
}[];
|
|
208
|
+
})[];
|
|
223
209
|
id?: string;
|
|
224
210
|
title?: string;
|
|
225
211
|
abstract?: string;
|
|
212
|
+
description?: string;
|
|
226
213
|
scope?: SystemScope;
|
|
227
|
-
labels?:
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
dataType: string[];
|
|
232
|
-
viewType: string[];
|
|
233
|
-
dataSource: string[];
|
|
234
|
-
}> | undefined;
|
|
214
|
+
labels?: WorkspacePresetLabels;
|
|
215
|
+
updated?: string;
|
|
216
|
+
updatedBy?: string;
|
|
217
|
+
username?: string;
|
|
235
218
|
} | {
|
|
236
|
-
views: {
|
|
219
|
+
views: (WorkspaceDialogView | {
|
|
237
220
|
mosaicNodeId: string;
|
|
238
221
|
title: string | undefined;
|
|
239
222
|
abstract: string | undefined;
|
|
240
223
|
componentType: string;
|
|
241
224
|
scope: SystemScope;
|
|
242
|
-
initialProps: import("
|
|
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;
|
|
243
226
|
originalViewPresetId: string | undefined;
|
|
244
|
-
}[];
|
|
227
|
+
})[];
|
|
245
228
|
id?: string;
|
|
246
229
|
title: string;
|
|
247
230
|
syncGroups?: import("../workspace/types").WorkspaceSyncGroup[];
|
|
@@ -252,14 +235,10 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
252
235
|
is_shared?: boolean;
|
|
253
236
|
username?: string;
|
|
254
237
|
abstract?: string;
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
dataType: string[];
|
|
260
|
-
viewType: string[];
|
|
261
|
-
dataSource: string[];
|
|
262
|
-
}> | undefined;
|
|
238
|
+
description?: string;
|
|
239
|
+
labels?: WorkspacePresetLabels;
|
|
240
|
+
updated?: string;
|
|
241
|
+
updatedBy?: string;
|
|
263
242
|
};
|
|
264
243
|
action: import("../workspace/types").WorkspacePresetAction;
|
|
265
244
|
presetId: string;
|
|
@@ -273,37 +252,34 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
273
252
|
};
|
|
274
253
|
lastResult: () => false | {
|
|
275
254
|
formValues: {
|
|
276
|
-
views: {
|
|
255
|
+
views: (WorkspaceDialogView | {
|
|
277
256
|
mosaicNodeId: string;
|
|
278
257
|
title: string | undefined;
|
|
279
258
|
abstract: string | undefined;
|
|
280
259
|
componentType: string;
|
|
281
260
|
scope: SystemScope;
|
|
282
|
-
initialProps: import("
|
|
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;
|
|
283
262
|
originalViewPresetId: string | undefined;
|
|
284
|
-
}[];
|
|
263
|
+
})[];
|
|
285
264
|
id?: string;
|
|
286
265
|
title?: string;
|
|
287
266
|
abstract?: string;
|
|
267
|
+
description?: string;
|
|
288
268
|
scope?: SystemScope;
|
|
289
|
-
labels?:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
dataType: string[];
|
|
294
|
-
viewType: string[];
|
|
295
|
-
dataSource: string[];
|
|
296
|
-
}> | undefined;
|
|
269
|
+
labels?: WorkspacePresetLabels;
|
|
270
|
+
updated?: string;
|
|
271
|
+
updatedBy?: string;
|
|
272
|
+
username?: string;
|
|
297
273
|
} | {
|
|
298
|
-
views: {
|
|
274
|
+
views: (WorkspaceDialogView | {
|
|
299
275
|
mosaicNodeId: string;
|
|
300
276
|
title: string | undefined;
|
|
301
277
|
abstract: string | undefined;
|
|
302
278
|
componentType: string;
|
|
303
279
|
scope: SystemScope;
|
|
304
|
-
initialProps: import("
|
|
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;
|
|
305
281
|
originalViewPresetId: string | undefined;
|
|
306
|
-
}[];
|
|
282
|
+
})[];
|
|
307
283
|
id?: string;
|
|
308
284
|
title: string;
|
|
309
285
|
syncGroups?: import("../workspace/types").WorkspaceSyncGroup[];
|
|
@@ -314,14 +290,10 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
314
290
|
is_shared?: boolean;
|
|
315
291
|
username?: string;
|
|
316
292
|
abstract?: string;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
dataType: string[];
|
|
322
|
-
viewType: string[];
|
|
323
|
-
dataSource: string[];
|
|
324
|
-
}> | undefined;
|
|
293
|
+
description?: string;
|
|
294
|
+
labels?: WorkspacePresetLabels;
|
|
295
|
+
updated?: string;
|
|
296
|
+
updatedBy?: string;
|
|
325
297
|
};
|
|
326
298
|
action: import("../workspace/types").WorkspacePresetAction;
|
|
327
299
|
presetId: string;
|
|
@@ -421,3 +393,24 @@ export declare const getWorkspaceListSearchQuery: ((state: AppStore) => string)
|
|
|
421
393
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
422
394
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
423
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
|
+
};
|
|
@@ -45,14 +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[];
|
|
55
57
|
labels?: WorkspacePresetLabels;
|
|
58
|
+
updated?: string;
|
|
59
|
+
updatedBy?: string;
|
|
60
|
+
username?: string;
|
|
56
61
|
}
|
|
57
62
|
export type WorkspacePresetFormValues = WorkspaceFormValues | WorkspacePresetForBE;
|
|
58
63
|
export interface WorkspaceActionDialogType {
|
|
@@ -70,6 +75,7 @@ export interface WorkspaceListState extends WorkspaceListEntityState {
|
|
|
70
75
|
workspaceActionDialog?: WorkspaceActionDialogType;
|
|
71
76
|
searchQuery?: string;
|
|
72
77
|
workspaceListFilters?: WorkspaceListFilter[];
|
|
78
|
+
workspaceLabelFilters?: WorkspacePresetLabels;
|
|
73
79
|
}
|
|
74
80
|
export type FetchWorkspaceList = FetchWorkspaceParams;
|
|
75
81
|
export interface FetchedWorkspaceList {
|
|
@@ -86,6 +92,9 @@ export interface ToggleSelectFilterChip {
|
|
|
86
92
|
isSelected: boolean;
|
|
87
93
|
isAdmin?: boolean;
|
|
88
94
|
}
|
|
95
|
+
export interface SetWorkspaceLabelFiltersPayload {
|
|
96
|
+
labels: WorkspacePresetLabels;
|
|
97
|
+
}
|
|
89
98
|
export interface SearchWorkspaceFilter {
|
|
90
99
|
searchQuery: string;
|
|
91
100
|
}
|
|
@@ -102,17 +111,21 @@ export interface OnNonDeleteSuccesWorkspacePresetActionPayload {
|
|
|
102
111
|
action: Exclude<WorkspacePresetAction, WorkspacePresetAction.DELETE | WorkspacePresetAction.DELETE_SYSTEM_PRESET>;
|
|
103
112
|
title: string;
|
|
104
113
|
abstract?: string;
|
|
114
|
+
description?: string;
|
|
105
115
|
currentActiveWorkspaceId?: string;
|
|
106
116
|
scope: SystemScope;
|
|
107
117
|
is_shared?: boolean;
|
|
108
118
|
labels?: WorkspacePresetLabels;
|
|
109
119
|
views?: WorkspaceViewsFromBE[];
|
|
120
|
+
updated?: string;
|
|
121
|
+
updatedBy?: string;
|
|
110
122
|
}
|
|
111
123
|
export interface OnDeleteSuccesWorkspacePresetActionPayload {
|
|
112
124
|
workspaceId: string;
|
|
113
125
|
action: WorkspacePresetAction.DELETE | WorkspacePresetAction.DELETE_SYSTEM_PRESET;
|
|
114
126
|
title: string;
|
|
115
127
|
abstract?: string;
|
|
128
|
+
description?: string;
|
|
116
129
|
currentActiveWorkspaceId?: string;
|
|
117
130
|
emptyWorkspacePresetTitle: string;
|
|
118
131
|
views?: WorkspaceViewsFromBE[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WorkspaceComponentLookupPayload } from '../store/workspace/types';
|
|
2
|
+
import type { WorkspaceComponentLookupPayload } from '../store/workspace/types';
|
|
3
3
|
/**
|
|
4
4
|
* The lookup table is for registering your own components with the workspace.
|
|
5
5
|
* @param payload
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
3
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { WorkspacePreset } from '../store/workspace/types';
|
|
4
4
|
interface ComponentTypeDemoProps {
|
|
5
5
|
screenPreset: WorkspacePreset;
|
|
6
6
|
createApi?: () => void;
|
package/src/lib/utils/api.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CreateApiProps } from '@opengeoweb/api';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import type { CreateApiProps } from '@opengeoweb/api';
|
|
2
|
+
import type { ViewPreset } from '../store/viewPresets/types';
|
|
3
|
+
import type { FetchViewPresetsListParams } from '../store/viewPresetsList/types';
|
|
4
|
+
import type { WorkspacePresetFromBE, WorkspacePresetForBE, WorkspacePresetListItem, ViewPresetListItem } from '../store/workspace/types';
|
|
5
|
+
import type { FetchWorkspaceParams } from '../store/workspaceList/types';
|
|
6
6
|
export declare const API_NAME = "workspacepresets";
|
|
7
7
|
export declare const getIdFromUrl: (url: string) => string;
|
|
8
8
|
export interface PresetsApi {
|
|
@@ -17,9 +17,6 @@ export interface PresetsApi {
|
|
|
17
17
|
getViewPresets: (params?: FetchViewPresetsListParams) => Promise<{
|
|
18
18
|
data: ViewPresetListItem[];
|
|
19
19
|
}>;
|
|
20
|
-
getViewPreset: (viewPresetId: string) => Promise<{
|
|
21
|
-
data: ViewPreset;
|
|
22
|
-
}>;
|
|
23
20
|
saveViewPreset: (viewPresetId: string, data: ViewPreset) => Promise<void>;
|
|
24
21
|
saveViewPresetAs: (data: ViewPreset) => Promise<string>;
|
|
25
22
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import type { PresetsApi } from './api';
|
|
2
|
+
import type { ViewPreset } from '../store/viewPresets/types';
|
|
3
|
+
import type { FetchViewPresetsListParams } from '../store/viewPresetsList/types';
|
|
4
|
+
import type { ViewPresetListItem, WorkspacePresetFromBE, WorkspacePresetListItem } from '../store/workspace/types';
|
|
5
|
+
import type { FetchWorkspaceParams } from '../store/workspaceList/types';
|
|
6
6
|
export declare const ERROR_NOT_FOUND = "Request failed with status code 400";
|
|
7
7
|
export declare const extractWorkspacePresetFromJSON: (workspacePresetId: string) => WorkspacePresetFromBE;
|
|
8
8
|
export declare const extractViewPresetFromJSON: (viewPresetId: string) => ViewPreset;
|
|
@@ -4,4 +4,13 @@ declare const _default: {
|
|
|
4
4
|
tags: string[];
|
|
5
5
|
};
|
|
6
6
|
export default _default;
|
|
7
|
-
export declare const WorkspacePresetsListStory:
|
|
7
|
+
export declare const WorkspacePresetsListStory: {
|
|
8
|
+
(): React.ReactElement;
|
|
9
|
+
parameters: {
|
|
10
|
+
msw: {
|
|
11
|
+
handlers: {
|
|
12
|
+
viewPresetsEndpoints: import("msw").HttpHandler[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
package/src/lib/utils/i18n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import i18n from 'i18next';
|
|
2
|
-
import { UseTranslationResponse } from 'react-i18next';
|
|
2
|
+
import type { UseTranslationResponse } from 'react-i18next';
|
|
3
3
|
export declare const WORKSPACE_NAMESPACE = "workspace";
|
|
4
4
|
export declare const initWorkspaceTestI18n: () => void;
|
|
5
5
|
export declare const translateInTestsAndStories: (key: string, params?: Record<string, string | number> | undefined) => string;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
+
import type { WorkspacePresetLabels } from '../store/workspace/types';
|
|
1
2
|
export type LabelKey = 'purpose' | 'parameters' | 'phenomena' | 'dataType' | 'viewType' | 'dataSource';
|
|
2
|
-
export
|
|
3
|
-
purpose: string[];
|
|
4
|
-
parameters: string[];
|
|
5
|
-
phenomena: string[];
|
|
6
|
-
dataType: string[];
|
|
7
|
-
dataSource: string[];
|
|
8
|
-
}
|
|
9
|
-
export declare const LABELS_CONFIG_DEFAULT: LabelsConfig;
|
|
3
|
+
export declare const LABELS_CONFIG_DEFAULT: WorkspacePresetLabels;
|
package/src/lib/utils/utils.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { TFunction } from 'i18next';
|
|
2
|
-
import { ViewPresetsListFilter } from '../store/viewPresets/types';
|
|
3
|
-
import { ViewPresetListItem, WorkspacePresetListItem } from '../store/workspace/types';
|
|
4
|
-
import { WorkspaceListFilter } from '../store/workspaceList/types';
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
2
|
+
import type { ViewPresetsListFilter } from '../store/viewPresets/types';
|
|
3
|
+
import type { ViewPresetListItem, WorkspacePresetLabels, WorkspacePresetListItem } from '../store/workspace/types';
|
|
4
|
+
import type { 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
|
|
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[];
|