@opengeoweb/workspace 9.25.3 → 9.27.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 +2602 -1258
- package/package.json +5 -3
- package/src/lib/Workspace.stories.d.ts +1 -0
- package/src/lib/components/MapPresetsFormDialog/MapPresetsForm.d.ts +7 -9
- package/src/lib/components/MapPresetsFormDialog/MapPresetsFormDialog.d.ts +4 -3
- package/src/lib/components/WorkspaceOptions/WorkspaceOptions.d.ts +2 -0
- package/src/lib/components/WorkspaceOptions/WorkspaceOptions.stories.d.ts +14 -0
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.d.ts +2 -2
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.stories.d.ts +23 -6
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspaceSystemPresetsForm.d.ts +12 -0
- package/src/lib/components/WorkspaceSelectList/WorkspaceSelectList.d.ts +1 -1
- package/src/lib/store/viewPresets/reducer.d.ts +7 -3
- package/src/lib/store/viewPresets/selectors.d.ts +3 -3
- package/src/lib/store/viewPresets/types.d.ts +3 -1
- package/src/lib/store/viewPresets/utils.d.ts +2 -10
- package/src/lib/store/viewPresetsList/selectors.d.ts +1 -1
- package/src/lib/store/viewPresetsList/types.d.ts +1 -0
- package/src/lib/store/workspace/selectors.d.ts +7 -21
- package/src/lib/store/workspace/types.d.ts +3 -3
- package/src/lib/store/workspaceList/listener.d.ts +11 -0
- package/src/lib/store/workspaceList/listener.spec.d.ts +1 -0
- package/src/lib/store/workspaceList/selectors.d.ts +3 -2
- package/src/lib/store/workspaceList/types.d.ts +3 -2
- package/src/lib/storyUtils/StoryWrapper.d.ts +2 -1
- package/src/lib/utils/api.d.ts +2 -2
- package/src/lib/utils/utils.d.ts +2 -0
- package/src/lib/store/workspaceList/sagas.d.ts +0 -27
- /package/src/lib/{store/workspaceList/sagas.spec.d.ts → components/WorkspacePresetsFormDialog/WorkspaceSystemPresetsForm.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/workspace",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.27.0",
|
|
4
4
|
"description": "GeoWeb Workspace library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -36,10 +36,12 @@
|
|
|
36
36
|
"i18next": "^23.11.5",
|
|
37
37
|
"react-i18next": "^14.1.2",
|
|
38
38
|
"@mui/material": "^5.16.0",
|
|
39
|
-
"@opengeoweb/webmap-react": "9.
|
|
39
|
+
"@opengeoweb/webmap-react": "9.27.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"react": "18"
|
|
42
|
+
"react": "18",
|
|
43
|
+
"@emotion/react": "*",
|
|
44
|
+
"@emotion/styled": "*"
|
|
43
45
|
},
|
|
44
46
|
"module": "./index.esm.js",
|
|
45
47
|
"type": "module",
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { mapTypes } from '@opengeoweb/store';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { InitialProps } from '@opengeoweb/core';
|
|
3
|
+
import { PresetAction, WorkspaceSupportedComponentTypes } from '../../store/viewPresets/types';
|
|
4
|
+
export interface ViewPresetFormValues {
|
|
5
5
|
title?: string;
|
|
6
|
-
initialProps?:
|
|
7
|
-
mapPreset: mapTypes.MapPreset;
|
|
8
|
-
syncGroupsIds?: string[];
|
|
9
|
-
};
|
|
6
|
+
initialProps?: InitialProps;
|
|
10
7
|
}
|
|
11
|
-
interface MapPresetsFormProps {
|
|
8
|
+
export interface MapPresetsFormProps {
|
|
9
|
+
viewComponentType: WorkspaceSupportedComponentTypes;
|
|
12
10
|
error?: string;
|
|
13
11
|
onSubmit?: () => void;
|
|
14
12
|
action: PresetAction;
|
|
15
|
-
formValues:
|
|
13
|
+
formValues: ViewPresetFormValues;
|
|
16
14
|
}
|
|
17
15
|
declare const MapPresetsForm: React.FC<MapPresetsFormProps>;
|
|
18
16
|
export default MapPresetsForm;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { PresetAction } from '../../store/viewPresets/types';
|
|
2
|
+
import { ViewPresetFormValues } from './MapPresetsForm';
|
|
3
|
+
import { PresetAction, WorkspaceSupportedComponentTypes } from '../../store/viewPresets/types';
|
|
4
4
|
export interface MapPresetsFormDialogProps {
|
|
5
5
|
isOpen: boolean;
|
|
6
6
|
title: string;
|
|
7
7
|
action: PresetAction;
|
|
8
8
|
viewPresetId: string;
|
|
9
|
-
|
|
9
|
+
viewComponentType: WorkspaceSupportedComponentTypes;
|
|
10
|
+
formValues: ViewPresetFormValues;
|
|
10
11
|
onSuccess: (action: PresetAction, presetId: string, title: string) => void;
|
|
11
12
|
onClose: () => void;
|
|
12
13
|
}
|
|
@@ -10,8 +10,10 @@ export interface WorkspaceOptionsProps {
|
|
|
10
10
|
handleSaveAll?: () => void;
|
|
11
11
|
handleEdit?: () => void;
|
|
12
12
|
handleDelete?: () => void;
|
|
13
|
+
handleSaveSystemPreset?: () => void;
|
|
13
14
|
hasChanges?: boolean;
|
|
14
15
|
isDisabled?: boolean;
|
|
16
|
+
isAdmin?: boolean;
|
|
15
17
|
}
|
|
16
18
|
export declare const WorkspaceOptionsNoMemo: React.FC<WorkspaceOptionsProps>;
|
|
17
19
|
export declare const WorkspaceOptions: React.NamedExoticComponent<WorkspaceOptionsProps>;
|
|
@@ -23,3 +23,17 @@ export declare const WorkspaceOptionsDark: {
|
|
|
23
23
|
};
|
|
24
24
|
tags: string[];
|
|
25
25
|
};
|
|
26
|
+
export declare const WorkspaceOptionsLightAdmin: {
|
|
27
|
+
(): React.ReactElement;
|
|
28
|
+
parameters: {
|
|
29
|
+
zeplinLink: {
|
|
30
|
+
name: string;
|
|
31
|
+
link: string;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
tags: string[];
|
|
35
|
+
};
|
|
36
|
+
export declare const WorkspaceOptionsDarkAdmin: {
|
|
37
|
+
(): React.ReactElement;
|
|
38
|
+
tags: string[];
|
|
39
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WorkspacePresetAction, WorkspacePresetFromBE } from '../../store/workspace/types';
|
|
3
3
|
import { WorkspacePresetFormValues } from '../../store/workspaceList/types';
|
|
4
4
|
export interface WorkspacePresetsFormDialogProps {
|
|
5
5
|
isOpen: boolean;
|
|
6
6
|
action: WorkspacePresetAction;
|
|
7
7
|
presetId: string;
|
|
8
8
|
formValues: WorkspacePresetFormValues;
|
|
9
|
-
onFormSubmit: (action: WorkspacePresetAction, presetId: string, data:
|
|
9
|
+
onFormSubmit: (action: WorkspacePresetAction, presetId: string, data: WorkspacePresetFromBE) => void;
|
|
10
10
|
onClose: () => void;
|
|
11
11
|
isLoading: boolean;
|
|
12
12
|
error?: string;
|
package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.stories.d.ts
CHANGED
|
@@ -5,12 +5,6 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const FormDialogLightSaveAs: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
parameters: {
|
|
9
|
-
zeplinLink: {
|
|
10
|
-
name: string;
|
|
11
|
-
link: string;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
14
8
|
tags: string[];
|
|
15
9
|
};
|
|
16
10
|
export declare const FormDialogDarkSaveAs: {
|
|
@@ -29,3 +23,26 @@ export declare const FormDialogLightDuplicate: () => React.ReactElement;
|
|
|
29
23
|
export declare const FormDialogDarkDuplicate: () => React.ReactElement;
|
|
30
24
|
export declare const FormDialogSaveAllLight: () => React.ReactElement;
|
|
31
25
|
export declare const FormDialogSaveAllDark: () => React.ReactElement;
|
|
26
|
+
export declare const FormDialogSaveSystemPreset: {
|
|
27
|
+
(): React.ReactElement;
|
|
28
|
+
parameters: {
|
|
29
|
+
zeplinLink: {
|
|
30
|
+
name: string;
|
|
31
|
+
link: string;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
tags: string[];
|
|
35
|
+
};
|
|
36
|
+
export declare const FormDialogSaveSystemPresetDark: {
|
|
37
|
+
(): React.ReactElement;
|
|
38
|
+
tags: string[];
|
|
39
|
+
};
|
|
40
|
+
export declare const FormDialogSaveSystemPresetChanges: {
|
|
41
|
+
(): React.ReactElement;
|
|
42
|
+
tags: string[];
|
|
43
|
+
};
|
|
44
|
+
export declare const FormDialogSaveSystemPresetChangesDark: {
|
|
45
|
+
(): React.ReactElement;
|
|
46
|
+
tags: string[];
|
|
47
|
+
};
|
|
48
|
+
export declare const FormDialogSaveSystemPresetChangesUnchecked: () => React.ReactElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WorkspaceViewsFromBE } from '../../store/workspace/types';
|
|
3
|
+
export type WorkspacePresetFormValuesViews = {
|
|
4
|
+
hasChanges: boolean;
|
|
5
|
+
title: string;
|
|
6
|
+
isChecked: boolean;
|
|
7
|
+
abstract?: string;
|
|
8
|
+
} & WorkspaceViewsFromBE;
|
|
9
|
+
declare const WorkspaceSystemPresetsForm: React.FC<{
|
|
10
|
+
viewPresets: WorkspacePresetFormValuesViews[];
|
|
11
|
+
}>;
|
|
12
|
+
export default WorkspaceSystemPresetsForm;
|
|
@@ -7,7 +7,7 @@ export interface WorkspaceSelectListProps extends BoxProps {
|
|
|
7
7
|
onClickPreset: (id: string) => void;
|
|
8
8
|
onClickWorkspacePresetOption: (presetId: string, workspaceAction: WorkspacePresetAction, workspacePreset: WorkspacePresetListItem) => void;
|
|
9
9
|
hideNewWorkspace?: boolean;
|
|
10
|
-
|
|
10
|
+
isEditable?: boolean;
|
|
11
11
|
searchQuery?: string;
|
|
12
12
|
newPreset?: WorkspacePresetListItem;
|
|
13
13
|
testIdPrefix?: string;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { mapEnums, layerTypes } from '@opengeoweb/store';
|
|
2
2
|
import { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
3
|
+
import { TimeSeriesTypes } from '@opengeoweb/timeseries';
|
|
3
4
|
import { ErrorInitialViewPresetsPayload, ErrorViewPresetPayload, FetchedInitialViewPresetsPayload, FetchedViewPresetPayload, FetchedViewPresetsPayload, FetchViewPresetsPayload, ViewPresetEntity, ViewPresetState, OnSuccesViewPresetActionPayload, RegisterViewPresetPayload, SavedViewPresetPayload, SaveViewPresetPayload, SelectViewPresetPayload, SetActiveViewPresetIdPayload, SetViewPresetHasChangePayload, UnregisterViewPresetPayload, ToggleViewPresetListDialogPayload, OpenViewPresetDialogPayload, ToggleSelectFilterChip, SetSelectAllFilterChip, SearchWorkspaceFilter } from './types';
|
|
5
|
+
import { FetchViewPresetsList } from '../viewPresetsList/types';
|
|
4
6
|
export declare const viewPresetsAdapter: import("@reduxjs/toolkit").EntityAdapter<ViewPresetEntity>;
|
|
5
7
|
export declare const initialState: ViewPresetState;
|
|
6
|
-
export type
|
|
7
|
-
export declare const
|
|
8
|
+
export type SupportedMapActionOrigins = layerTypes.LayerActionOrigin | mapEnums.MapActionOrigin;
|
|
9
|
+
export declare const supportedMapActionOrigins: SupportedMapActionOrigins[];
|
|
10
|
+
export type SupportedTimeSeriesActionOrigins = TimeSeriesTypes.TimeSeriesActionOrigin;
|
|
11
|
+
export declare const supportedTimeSeriesActionOrigins: SupportedTimeSeriesActionOrigins[];
|
|
8
12
|
export declare const reducer: import("redux").Reducer<ViewPresetState, import("redux").AnyAction>;
|
|
9
13
|
export declare const viewPresetActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
10
|
-
fetchInitialViewPresets: (draft: Draft<ViewPresetState>) => void;
|
|
14
|
+
fetchInitialViewPresets: (draft: Draft<ViewPresetState>, _action: PayloadAction<FetchViewPresetsList>) => void;
|
|
11
15
|
fetchedInitialViewPresets: (draft: Draft<ViewPresetState>, action: PayloadAction<FetchedInitialViewPresetsPayload>) => void;
|
|
12
16
|
errorInitialViewPresets: (draft: Draft<ViewPresetState>, action: PayloadAction<ErrorInitialViewPresetsPayload>) => void;
|
|
13
17
|
fetchViewPresets: (draft: Draft<ViewPresetState>, action: PayloadAction<FetchViewPresetsPayload>) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AppStore } from '../types';
|
|
2
|
-
import { ViewPresetListItem } from '../workspace/types';
|
|
3
|
-
import { ViewPresetEntity, ViewPresetError, ViewPresetState } from './types';
|
|
2
|
+
import { PresetScope, ViewPresetListItem } from '../workspace/types';
|
|
3
|
+
import { ViewPresetEntity, ViewPresetError, ViewPresetsListFilter, ViewPresetState } from './types';
|
|
4
4
|
export declare const getViewPresetsStore: (store: AppStore) => ViewPresetState;
|
|
5
5
|
export declare const getViewPresets: (state: AppStore) => ViewPresetEntity[], getViewPresetById: (state: AppStore, id: import("@reduxjs/toolkit").EntityId) => ViewPresetEntity | undefined;
|
|
6
6
|
export declare const getViewPresetsIsFetching: ((state: AppStore, id: string) => boolean) & import("reselect").OutputSelectorFields<(args_0: ViewPresetEntity | undefined, args_1: string) => boolean, {
|
|
@@ -43,7 +43,7 @@ export declare const getIsViewPresetListDialogOpen: ((state: AppStore, id: strin
|
|
|
43
43
|
}> & {
|
|
44
44
|
clearCache: () => void;
|
|
45
45
|
};
|
|
46
|
-
export declare const getViewPresetListFiltersForView: ((state: AppStore,
|
|
46
|
+
export declare const getViewPresetListFiltersForView: ((state: AppStore, _panelId: string, scope?: PresetScope | undefined) => ViewPresetsListFilter[]) & import("reselect").OutputSelectorFields<(args_0: ViewPresetEntity | undefined, args_1: PresetScope | undefined) => ViewPresetsListFilter[], {
|
|
47
47
|
clearCache: () => void;
|
|
48
48
|
}> & {
|
|
49
49
|
clearCache: () => void;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { InitialProps, SupportedComponentTypes } from '@opengeoweb/core';
|
|
2
|
+
import { SupportedComponentTypes as SupportedTimeSeriesComponentTypes } from '@opengeoweb/timeseries';
|
|
2
3
|
import { EntityState } from '@reduxjs/toolkit';
|
|
3
4
|
import { FetchViewPresetsListParams, PresetScope, ViewPresetListItem } from '../viewPresetsList/types';
|
|
4
5
|
import { WorkspaceViewPresetComponentsLookupType } from '../workspace/types';
|
|
6
|
+
export type WorkspaceSupportedComponentTypes = SupportedComponentTypes | SupportedTimeSeriesComponentTypes | WorkspaceViewPresetComponentsLookupType;
|
|
5
7
|
export interface ViewPreset {
|
|
6
8
|
id?: string;
|
|
7
9
|
title: string;
|
|
8
10
|
keywords: string;
|
|
9
|
-
componentType:
|
|
11
|
+
componentType: WorkspaceSupportedComponentTypes;
|
|
10
12
|
initialProps?: InitialProps;
|
|
11
13
|
scope?: PresetScope;
|
|
12
14
|
}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { PresetsApi } from '../../utils/api';
|
|
2
|
-
import { PresetAction, ViewPresetsListFilter } from './types';
|
|
2
|
+
import { PresetAction, ViewPreset, ViewPresetsListFilter, WorkspaceSupportedComponentTypes } from './types';
|
|
3
3
|
import { FetchViewPresetsListParams } from '../viewPresetsList/types';
|
|
4
4
|
export declare const getSnackbarMessage: (action: PresetAction, title: string) => string;
|
|
5
5
|
export declare const getPresetsApi: () => PresetsApi;
|
|
6
|
-
export declare const
|
|
7
|
-
componentType: "Map";
|
|
8
|
-
keywords: string;
|
|
9
|
-
scope: "user";
|
|
10
|
-
title: string;
|
|
11
|
-
initialProps: {
|
|
12
|
-
mapPreset: {};
|
|
13
|
-
};
|
|
14
|
-
};
|
|
6
|
+
export declare const emptyViewPreset: (componentType?: WorkspaceSupportedComponentTypes | undefined) => ViewPreset;
|
|
15
7
|
export declare const constructFilterParams: (filters: ViewPresetsListFilter[], searchQuery: string) => FetchViewPresetsListParams;
|
|
@@ -3,7 +3,7 @@ import { ViewPresetListItem, ViewPresetListState } from './types';
|
|
|
3
3
|
import { ViewPresetsListFilter } from '../viewPresets/types';
|
|
4
4
|
export declare const getViewPresetsListStore: (store: AppStore) => ViewPresetListState;
|
|
5
5
|
export declare const getViewPresetsList: (state: AppStore) => ViewPresetListItem[], selectById: (state: AppStore, id: import("@reduxjs/toolkit").EntityId) => ViewPresetListItem | undefined;
|
|
6
|
-
export declare const getFilteredViewPresetListForView: ((state: AppStore,
|
|
6
|
+
export declare const getFilteredViewPresetListForView: ((state: AppStore, _panelId: string, scope?: import("../workspace/types").PresetScope | undefined) => ViewPresetListItem[]) & import("reselect").OutputSelectorFields<(args_0: ViewPresetListItem[], args_1: import("../workspace/types").ViewPresetListItem[], args_2: ViewPresetsListFilter[], args_3: string) => ViewPresetListItem[], {
|
|
7
7
|
clearCache: () => void;
|
|
8
8
|
}> & {
|
|
9
9
|
clearCache: () => void;
|
|
@@ -10,6 +10,7 @@ export interface FetchViewPresetsListParams {
|
|
|
10
10
|
scope?: string;
|
|
11
11
|
search?: string;
|
|
12
12
|
}
|
|
13
|
+
export type FetchViewPresetsList = FetchViewPresetsListParams;
|
|
13
14
|
export type ViewPresetListState = EntityState<ViewPresetListItem>;
|
|
14
15
|
export interface LoadViewPresetsPayload {
|
|
15
16
|
viewPresets: ViewPresetListItem[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { WorkspaceState } from './types';
|
|
2
2
|
import { AppStore } from '../types';
|
|
3
|
+
import { WorkspaceSupportedComponentTypes, ViewPreset } from '../viewPresets/types';
|
|
3
4
|
/**
|
|
4
5
|
* Gets workspace state
|
|
5
6
|
*
|
|
@@ -157,27 +158,12 @@ export declare const getWorkspaceData: ((state: AppStore & import("@opengeoweb/s
|
|
|
157
158
|
}> & {
|
|
158
159
|
clearCache: () => void;
|
|
159
160
|
};
|
|
160
|
-
export declare const
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
syncGroupsIds: string[];
|
|
167
|
-
};
|
|
168
|
-
componentType: "Map";
|
|
169
|
-
keywords: string;
|
|
170
|
-
}) & import("reselect").OutputSelectorFields<(args_0: import("./types").WorkspaceViewType | undefined, args_1: import("@opengeoweb/store").MapPreset, args_2: string[]) => {
|
|
171
|
-
id: string | undefined;
|
|
172
|
-
scope: import("./types").PresetScope;
|
|
173
|
-
title: string;
|
|
174
|
-
initialProps: {
|
|
175
|
-
mapPreset: import("@opengeoweb/store").MapPreset;
|
|
176
|
-
syncGroupsIds: string[];
|
|
177
|
-
};
|
|
178
|
-
componentType: "Map";
|
|
179
|
-
keywords: string;
|
|
180
|
-
}, {
|
|
161
|
+
export declare const getViewComponentType: ((state: AppStore, viewId: string) => WorkspaceSupportedComponentTypes) & import("reselect").OutputSelectorFields<(args_0: import("./types").WorkspaceViewType | undefined) => WorkspaceSupportedComponentTypes, {
|
|
162
|
+
clearCache: () => void;
|
|
163
|
+
}> & {
|
|
164
|
+
clearCache: () => void;
|
|
165
|
+
};
|
|
166
|
+
export declare const getViewPresetToSendToBackend: ((state: any, viewId: any) => ViewPreset) & import("reselect").OutputSelectorFields<(args_0: import("./types").WorkspaceViewType | undefined, args_1: WorkspaceSupportedComponentTypes, args_2: import("@opengeoweb/store").MapPreset, args_3: string[], args_4: import("dist/libs/timeseries/src/lib/store/types").TimeSeriesPreset | undefined) => ViewPreset, {
|
|
181
167
|
clearCache: () => void;
|
|
182
168
|
}> & {
|
|
183
169
|
clearCache: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { MapPreset, syncGroupsTypes } from '@opengeoweb/store';
|
|
3
3
|
import { MosaicNode } from 'react-mosaic-component';
|
|
4
|
-
type InitialPropsWorkspaceViewType = Record<string, unknown>;
|
|
4
|
+
export type InitialPropsWorkspaceViewType = Record<string, unknown>;
|
|
5
5
|
export type WorkspaceViewPresetComponentsLookupType = 'ViewError' | 'ViewLoading';
|
|
6
6
|
export interface WorkspaceViewType {
|
|
7
7
|
id?: string;
|
|
@@ -68,7 +68,8 @@ export declare enum WorkspacePresetAction {
|
|
|
68
68
|
SAVE = "SAVE",
|
|
69
69
|
SAVE_AS = "SAVE_AS",
|
|
70
70
|
SAVE_ALL = "SAVE_ALL",
|
|
71
|
-
DUPLICATE = "DUPLICATE"
|
|
71
|
+
DUPLICATE = "DUPLICATE",
|
|
72
|
+
SAVE_SYSTEM_PRESET = "SAVE_SYSTEM_PRESET"
|
|
72
73
|
}
|
|
73
74
|
export interface WorkspaceSetInitialViewMapPresetPayload {
|
|
74
75
|
preset: MapPreset;
|
|
@@ -142,4 +143,3 @@ export interface WorkspaceErrorWorkspacePayload {
|
|
|
142
143
|
workspaceId: string;
|
|
143
144
|
error: WorkspaceError;
|
|
144
145
|
}
|
|
145
|
-
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ToolkitStore } from '@reduxjs/toolkit/dist/configureStore';
|
|
2
|
+
import { WorkspacePresetFromBE } from '../workspace/types';
|
|
3
|
+
import { ViewPresetEntity } from '../viewPresets/types';
|
|
4
|
+
import { WorkspaceModuleStore } from '../types';
|
|
5
|
+
export declare const emptyWorkspaceBEData: WorkspacePresetFromBE;
|
|
6
|
+
export declare const saveAllViewPresets: (viewPresetEntity: ViewPresetEntity, workspaceTitle: string, store: ToolkitStore) => Promise<{
|
|
7
|
+
mosaicNodeId: string;
|
|
8
|
+
viewPresetId: string;
|
|
9
|
+
title: string;
|
|
10
|
+
} | string>;
|
|
11
|
+
export declare const workspaceListListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<WorkspaceModuleStore, import("@reduxjs/toolkit").ThunkDispatch<WorkspaceModuleStore, unknown, import("redux").AnyAction>, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { WorkspaceListState } from './types';
|
|
1
|
+
import { WorkspaceListFilter, WorkspaceListState } from './types';
|
|
2
2
|
import { AppStore } from '../types';
|
|
3
|
+
import { PresetScope } from '../workspace/types';
|
|
3
4
|
export declare const getWorkspaceListStore: (store: AppStore) => WorkspaceListState;
|
|
4
5
|
export declare const getWorkspaceList: (state: AppStore) => import("../workspace/types").WorkspacePresetListItem[];
|
|
5
6
|
export declare const getIsWorkspaceListFetching: ((state: AppStore) => boolean) & import("reselect").OutputSelectorFields<(args_0: WorkspaceListState, args_1: AppStore) => boolean, {
|
|
@@ -28,7 +29,7 @@ export declare const getIsWorkspaceListDialogOpen: ((state: AppStore) => boolean
|
|
|
28
29
|
}> & {
|
|
29
30
|
clearCache: () => void;
|
|
30
31
|
};
|
|
31
|
-
export declare const getWorkspaceListFilters: ((state: AppStore) =>
|
|
32
|
+
export declare const getWorkspaceListFilters: ((state: AppStore, scope?: PresetScope | undefined) => WorkspaceListFilter[]) & import("reselect").OutputSelectorFields<(args_0: WorkspaceListState, args_1: PresetScope | undefined) => WorkspaceListFilter[], {
|
|
32
33
|
clearCache: () => void;
|
|
33
34
|
}> & {
|
|
34
35
|
clearCache: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EntityState } from '@reduxjs/toolkit';
|
|
2
|
-
import { WorkspacePresetListItem, WorkspacePresetAction, PresetScope, WorkspacePresetFromBE
|
|
2
|
+
import { WorkspacePresetListItem, WorkspacePresetAction, PresetScope, WorkspacePresetFromBE } from '../workspace/types';
|
|
3
3
|
export declare enum WorkspaceListErrorType {
|
|
4
4
|
AUTH = "AUTH",
|
|
5
5
|
GENERIC = "GENERIC"
|
|
@@ -62,7 +62,7 @@ export type OpenWorkspaceActionDialogPayload = WorkspaceActionDialogType;
|
|
|
62
62
|
export interface SubmitFormWorkspaceActionDialogPayload {
|
|
63
63
|
presetAction: WorkspacePresetAction;
|
|
64
64
|
presetId: string;
|
|
65
|
-
data:
|
|
65
|
+
data: WorkspacePresetFromBE;
|
|
66
66
|
}
|
|
67
67
|
export interface OnSuccesWorkspacePresetActionPayload {
|
|
68
68
|
workspaceId: string;
|
|
@@ -70,6 +70,7 @@ export interface OnSuccesWorkspacePresetActionPayload {
|
|
|
70
70
|
title: string;
|
|
71
71
|
abstract?: string;
|
|
72
72
|
currentActiveWorkspaceId?: string;
|
|
73
|
+
scope: PresetScope;
|
|
73
74
|
}
|
|
74
75
|
export interface OnErrorWorkspacePresetActionPayload {
|
|
75
76
|
error: WorkspaceListError;
|
|
@@ -13,6 +13,7 @@ interface StoryWrapperProps {
|
|
|
13
13
|
workspaceId?: string;
|
|
14
14
|
isLoggedIn?: boolean;
|
|
15
15
|
shouldShowListOnOpen?: boolean;
|
|
16
|
+
isAdmin?: boolean;
|
|
16
17
|
}
|
|
17
|
-
export declare const StoryWrapper: ({ theme, isSnapshot, createApi, workspaceId, isLoggedIn, shouldShowListOnOpen, }: StoryWrapperProps) => React.ReactElement;
|
|
18
|
+
export declare const StoryWrapper: ({ theme, isSnapshot, createApi, workspaceId, isLoggedIn, shouldShowListOnOpen, isAdmin, }: StoryWrapperProps) => React.ReactElement;
|
|
18
19
|
export {};
|
package/src/lib/utils/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CreateApiProps } from '@opengeoweb/api';
|
|
2
|
-
import {
|
|
2
|
+
import { WorkspacePresetFromBE, WorkspacePresetListItem, ViewPresetListItem } from '../store/workspace/types';
|
|
3
3
|
import { FetchWorkspaceParams } from '../store/workspaceList/types';
|
|
4
4
|
import { ViewPreset } from '../store/viewPresets/types';
|
|
5
5
|
import { FetchViewPresetsListParams } from '../store/viewPresetsList/types';
|
|
@@ -13,7 +13,7 @@ export interface PresetsApi {
|
|
|
13
13
|
data: WorkspacePresetFromBE;
|
|
14
14
|
}>;
|
|
15
15
|
saveWorkspacePreset: (workspacePresetId: string, data: WorkspacePresetFromBE) => Promise<void>;
|
|
16
|
-
saveWorkspacePresetAs: (data:
|
|
16
|
+
saveWorkspacePresetAs: (data: WorkspacePresetFromBE) => Promise<string>;
|
|
17
17
|
deleteWorkspacePreset: (workspacePresetId: string) => Promise<void>;
|
|
18
18
|
getViewPresets: (params?: FetchViewPresetsListParams) => Promise<{
|
|
19
19
|
data: ViewPresetListItem[];
|
package/src/lib/utils/utils.d.ts
CHANGED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { SagaIterator } from 'redux-saga';
|
|
2
|
-
import { workspaceListActions } from './reducer';
|
|
3
|
-
import { ViewPresetEntity } from '../viewPresets/types';
|
|
4
|
-
export declare const emptyWorkspaceBEData: {
|
|
5
|
-
views: {
|
|
6
|
-
mosaicNodeId: string;
|
|
7
|
-
viewPresetId: string;
|
|
8
|
-
}[];
|
|
9
|
-
id?: string | undefined;
|
|
10
|
-
title: string;
|
|
11
|
-
syncGroups?: import("../workspace/types").WorkspaceSyncGroup[] | undefined;
|
|
12
|
-
viewType?: import("../workspace/types").ViewType | undefined;
|
|
13
|
-
mosaicNode: import("react-mosaic-component").MosaicNode<string>;
|
|
14
|
-
minimumPaneSizePercentage?: number | undefined;
|
|
15
|
-
scope?: import("../workspace/types").PresetScope | undefined;
|
|
16
|
-
abstract?: string | undefined;
|
|
17
|
-
};
|
|
18
|
-
export declare function fetchWorkspaceListSaga({ payload: workspaceFilterParams, }: ReturnType<typeof workspaceListActions.fetchWorkspaceList>): SagaIterator;
|
|
19
|
-
export declare function onSuccessWorkspacePresetsActionSaga({ payload, }: ReturnType<typeof workspaceListActions.onSuccessWorkspacePresetAction>): SagaIterator;
|
|
20
|
-
export declare function saveAllViewPresetSaga(viewPresetEntity: ViewPresetEntity, workspaceTitle: string): SagaIterator<{
|
|
21
|
-
mosaicNodeId: string;
|
|
22
|
-
viewPresetId: string;
|
|
23
|
-
title: string;
|
|
24
|
-
} | string>;
|
|
25
|
-
export declare function submitFormWorkspaceDialogSaga({ payload, }: ReturnType<typeof workspaceListActions.submitFormWorkspaceActionDialogOptions>): SagaIterator;
|
|
26
|
-
export declare function rootSaga(): SagaIterator;
|
|
27
|
-
export default rootSaga;
|