@opengeoweb/workspace 12.1.2 → 12.2.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 +830 -607
- package/package.json +16 -16
- package/src/lib/api/viewpresets-api/api.d.ts +4 -0
- package/src/lib/api/workspace-api/api.d.ts +3 -3
- package/src/lib/api/workspace-api/hooks.d.ts +2 -2
- package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialogConnect.d.ts +2 -2
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsForm.d.ts +2 -2
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.d.ts +2 -2
- package/src/lib/components/WorkspaceSelectList/WorkspaceSelectList.d.ts +2 -2
- package/src/lib/components/WorkspaceView/WorkspaceTileConnect.d.ts +1 -1
- package/src/lib/hooks/useFetchViewPresets.d.ts +1 -0
- package/src/lib/store/viewPresets/selectors.d.ts +2 -2
- package/src/lib/store/viewPresets/types.d.ts +10 -7
- package/src/lib/store/viewPresets/utils.d.ts +1 -1
- package/src/lib/store/viewPresetsList/selectors.d.ts +1 -1
- package/src/lib/store/viewPresetsList/types.d.ts +3 -2
- package/src/lib/store/workspace/selectors.d.ts +3 -3
- package/src/lib/store/workspace/types.d.ts +19 -9
- package/src/lib/store/workspace/utils.d.ts +2 -2
- package/src/lib/store/workspaceList/listener.d.ts +2 -2
- package/src/lib/store/workspaceList/reducer.d.ts +20 -2
- package/src/lib/store/workspaceList/selectors.d.ts +10 -10
- package/src/lib/store/workspaceList/types.d.ts +11 -10
- package/src/lib/store/workspaceList/utils.d.ts +4 -4
- package/src/lib/utils/api.d.ts +3 -3
- package/src/lib/utils/utils.d.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/workspace",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.2.0",
|
|
4
4
|
"description": "GeoWeb Workspace library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,31 +9,31 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"react-redux": "^8.1.3",
|
|
12
|
-
"@opengeoweb/shared": "12.
|
|
13
|
-
"@opengeoweb/store": "12.
|
|
14
|
-
"@opengeoweb/api": "12.
|
|
12
|
+
"@opengeoweb/shared": "12.2.0",
|
|
13
|
+
"@opengeoweb/store": "12.2.0",
|
|
14
|
+
"@opengeoweb/api": "12.2.0",
|
|
15
15
|
"react-hook-form": "^7.50.1",
|
|
16
|
-
"@opengeoweb/theme": "12.
|
|
16
|
+
"@opengeoweb/theme": "12.2.0",
|
|
17
17
|
"@reduxjs/toolkit": "^1.9.7",
|
|
18
|
-
"@opengeoweb/snackbar": "12.
|
|
18
|
+
"@opengeoweb/snackbar": "12.2.0",
|
|
19
19
|
"react-window": "^1.8.10",
|
|
20
20
|
"lodash": "^4.17.21",
|
|
21
21
|
"axios": "^1.7.7",
|
|
22
22
|
"react-virtualized-auto-sizer": "^1.0.21",
|
|
23
23
|
"react-mosaic-component": "^6.1.0",
|
|
24
|
-
"@opengeoweb/form-fields": "12.
|
|
25
|
-
"@opengeoweb/timeseries": "12.
|
|
26
|
-
"@opengeoweb/authentication": "12.
|
|
27
|
-
"@opengeoweb/core": "12.
|
|
28
|
-
"@opengeoweb/taf": "12.
|
|
29
|
-
"@opengeoweb/sigmet-airmet": "12.
|
|
30
|
-
"@opengeoweb/warnings": "12.
|
|
31
|
-
"@opengeoweb/spaceweather": "12.
|
|
24
|
+
"@opengeoweb/form-fields": "12.2.0",
|
|
25
|
+
"@opengeoweb/timeseries": "12.2.0",
|
|
26
|
+
"@opengeoweb/authentication": "12.2.0",
|
|
27
|
+
"@opengeoweb/core": "12.2.0",
|
|
28
|
+
"@opengeoweb/taf": "12.2.0",
|
|
29
|
+
"@opengeoweb/sigmet-airmet": "12.2.0",
|
|
30
|
+
"@opengeoweb/warnings": "12.2.0",
|
|
31
|
+
"@opengeoweb/spaceweather": "12.2.0",
|
|
32
32
|
"i18next": "^23.11.5",
|
|
33
33
|
"react-i18next": "^15.1.1",
|
|
34
34
|
"@mui/material": "^6.1.1",
|
|
35
|
-
"@opengeoweb/webmap-react": "12.
|
|
36
|
-
"@tanstack/react-query": "^5.
|
|
35
|
+
"@opengeoweb/webmap-react": "12.2.0",
|
|
36
|
+
"@tanstack/react-query": "^5.69.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": "18",
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Credentials } from '@opengeoweb/api';
|
|
2
|
+
import { ViewPresetListItem } from '../../store/workspace/types';
|
|
3
|
+
export declare const getViewPreset: (viewpresetId: string, auth: Credentials) => Promise<ViewPresetListItem>;
|
|
4
|
+
export declare const updateViewPreset: (viewpresetId: string, data: ViewPresetListItem, auth: Credentials) => Promise<null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Credentials } from '@opengeoweb/api';
|
|
2
|
-
import { WorkspacePresetFromBE } from '../../store/workspace/types';
|
|
2
|
+
import { WorkspacePresetForBE, WorkspacePresetFromBE } from '../../store/workspace/types';
|
|
3
3
|
export declare const getWorkspace: (workspaceId: string, auth: Credentials) => Promise<WorkspacePresetFromBE>;
|
|
4
4
|
export declare const deleteWorkspace: (workspaceId: string, auth: Credentials) => Promise<null>;
|
|
5
|
-
export declare const updateWorkspace: (workspaceId: string, data:
|
|
6
|
-
export declare const createWorkspace: (data:
|
|
5
|
+
export declare const updateWorkspace: (workspaceId: string, data: WorkspacePresetForBE, auth: Credentials) => Promise<null>;
|
|
6
|
+
export declare const createWorkspace: (data: WorkspacePresetForBE, auth: Credentials) => Promise<Headers>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { UseMutationResult } from '@tanstack/react-query';
|
|
2
|
-
import { WorkspacePresetAction,
|
|
2
|
+
import { WorkspacePresetAction, WorkspacePresetForBE } from '../../store/workspace/types';
|
|
3
3
|
type MutationReturnType<T> = UseMutationResult<Headers | null, Error, T>;
|
|
4
4
|
export declare const useDeleteWorkspacePreset: () => MutationReturnType<{
|
|
5
5
|
id: string;
|
|
6
6
|
}>;
|
|
7
7
|
export declare const useCreateWorkspacePreset: () => MutationReturnType<{
|
|
8
|
-
data:
|
|
8
|
+
data: WorkspacePresetForBE;
|
|
9
9
|
action?: WorkspacePresetAction.DUPLICATE;
|
|
10
10
|
}>;
|
|
11
11
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PresetScope } from '@opengeoweb/shared';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import { SystemScope } from '@opengeoweb/shared';
|
|
3
3
|
declare const ViewPresetsFormDialogConnect: React.FC<{
|
|
4
|
-
scope?:
|
|
4
|
+
scope?: SystemScope;
|
|
5
5
|
}>;
|
|
6
6
|
export default ViewPresetsFormDialogConnect;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SystemScope } from '@opengeoweb/shared';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { WorkspacePresetAction } from '../../store/workspace/types';
|
|
4
4
|
import { WorkspaceListError, WorkspacePresetFormValues } from '../../store/workspaceList/types';
|
|
5
5
|
export declare const ERROR_DUPLICATE_TITLE_BE = "Preset title already in use, please choose a different title";
|
|
6
6
|
export declare const ERROR_LONG_TITLE_BE = "Preset title cannot exceed 100 characters";
|
|
7
7
|
export declare const emptyWorkspacePreset: {
|
|
8
|
-
scope:
|
|
8
|
+
scope: SystemScope;
|
|
9
9
|
title: string;
|
|
10
10
|
abstract: string;
|
|
11
11
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WorkspacePresetAction,
|
|
2
|
+
import { WorkspacePresetAction, WorkspacePresetForBE } from '../../store/workspace/types';
|
|
3
3
|
import { WorkspaceListError, 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: WorkspacePresetForBE) => void;
|
|
10
10
|
onClose: () => void;
|
|
11
11
|
isLoading: boolean;
|
|
12
12
|
error?: WorkspaceListError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { BoxProps } from '@mui/material';
|
|
3
|
-
import
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { WorkspacePresetAction, WorkspacePresetListItem } from '../../store/workspace/types';
|
|
4
4
|
export interface WorkspaceSelectListProps extends BoxProps {
|
|
5
5
|
workspacePresets: WorkspacePresetListItem[];
|
|
6
6
|
currentSelectedId: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MosaicBranch } from 'react-mosaic-component';
|
|
3
3
|
import 'react-mosaic-component/react-mosaic-component.css';
|
|
4
|
-
import './WorkspaceView.css';
|
|
5
4
|
import { WorkspaceLookupFunctionType } from '../../store/workspace/types';
|
|
5
|
+
import './WorkspaceView.css';
|
|
6
6
|
interface WorkspaceTileConnectProps {
|
|
7
7
|
mosaicNodeId: string;
|
|
8
8
|
path: MosaicBranch[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useFetchViewPresets: (panelId: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SystemScope } from '@opengeoweb/shared';
|
|
2
2
|
import type { AppStore } from '../types';
|
|
3
3
|
import { ViewPresetListItem } from '../workspace/types';
|
|
4
4
|
import { ViewPresetEntity, ViewPresetError, ViewPresetsListFilter, ViewPresetState } from './types';
|
|
@@ -44,7 +44,7 @@ export declare const getIsViewPresetListDialogOpen: ((state: AppStore, id: strin
|
|
|
44
44
|
}> & {
|
|
45
45
|
clearCache: () => void;
|
|
46
46
|
};
|
|
47
|
-
export declare const getViewPresetListFiltersForView: ((state: AppStore, _panelId: string, scope?:
|
|
47
|
+
export declare const getViewPresetListFiltersForView: ((state: AppStore, _panelId: string, scope?: SystemScope | undefined) => ViewPresetsListFilter[]) & import("reselect").OutputSelectorFields<(args_0: ViewPresetEntity | undefined, args_1: SystemScope | undefined) => ViewPresetsListFilter[], {
|
|
48
48
|
clearCache: () => void;
|
|
49
49
|
}> & {
|
|
50
50
|
clearCache: () => void;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { InitialProps, SupportedComponentTypes } from '@opengeoweb/core';
|
|
2
2
|
import { SupportedComponentTypes as SupportedTimeSeriesComponentTypes } from '@opengeoweb/timeseries';
|
|
3
|
-
import {
|
|
3
|
+
import { SystemScope } from '@opengeoweb/shared';
|
|
4
4
|
import { WarningListComponentType } from '@opengeoweb/warnings';
|
|
5
5
|
import { EntityState } from '@reduxjs/toolkit';
|
|
6
6
|
import { FetchViewPresetsListParams, ViewPresetListItem } from '../viewPresetsList/types';
|
|
7
7
|
import { WorkspaceViewPresetComponentsLookupType } from '../workspace/types';
|
|
8
|
+
import { PresetFilterType } from '../workspaceList/types';
|
|
8
9
|
export type WorkspaceSupportedComponentTypes = SupportedComponentTypes | SupportedTimeSeriesComponentTypes | WarningListComponentType | WorkspaceViewPresetComponentsLookupType;
|
|
9
10
|
export interface ViewPreset {
|
|
10
11
|
id?: string;
|
|
@@ -13,7 +14,9 @@ export interface ViewPreset {
|
|
|
13
14
|
keywords: string;
|
|
14
15
|
componentType: WorkspaceSupportedComponentTypes;
|
|
15
16
|
initialProps?: InitialProps;
|
|
16
|
-
scope?:
|
|
17
|
+
scope?: SystemScope;
|
|
18
|
+
is_shared?: boolean;
|
|
19
|
+
username?: string;
|
|
17
20
|
}
|
|
18
21
|
export declare enum ViewPresetErrorComponent {
|
|
19
22
|
PRESET_DETAIL = "PRESET_DETAIL",
|
|
@@ -30,8 +33,7 @@ export type ViewPresetError = {
|
|
|
30
33
|
} | undefined;
|
|
31
34
|
export interface ViewPresetsListFilter {
|
|
32
35
|
label: string;
|
|
33
|
-
id:
|
|
34
|
-
type?: 'scope' | 'keyword';
|
|
36
|
+
id: PresetFilterType | 'all';
|
|
35
37
|
isSelected?: boolean;
|
|
36
38
|
isDisabled?: boolean;
|
|
37
39
|
}
|
|
@@ -109,8 +111,9 @@ export interface OnSuccesViewPresetActionPayload extends ViewPresetAction {
|
|
|
109
111
|
action: PresetAction;
|
|
110
112
|
title: string;
|
|
111
113
|
componentType?: string;
|
|
112
|
-
scope?:
|
|
114
|
+
scope?: SystemScope;
|
|
113
115
|
abstract?: string;
|
|
116
|
+
is_shared?: boolean;
|
|
114
117
|
}
|
|
115
118
|
export interface SelectViewPresetPayload extends ViewPresetAction {
|
|
116
119
|
viewPresetId: string;
|
|
@@ -123,12 +126,12 @@ export interface ToggleViewPresetListDialogPayload extends ViewPresetAction {
|
|
|
123
126
|
isViewPresetListDialogOpen: boolean;
|
|
124
127
|
}
|
|
125
128
|
export interface ToggleSelectFilterChip extends ViewPresetAction {
|
|
126
|
-
id:
|
|
129
|
+
id: PresetFilterType;
|
|
127
130
|
isSelected: boolean;
|
|
128
131
|
}
|
|
129
132
|
export interface SetFilterChipsPayload extends ViewPresetAction {
|
|
130
133
|
filters: {
|
|
131
|
-
id:
|
|
134
|
+
id: PresetFilterType;
|
|
132
135
|
isSelected: boolean;
|
|
133
136
|
}[];
|
|
134
137
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { snackbarTypes } from '@opengeoweb/snackbar';
|
|
2
2
|
import { PresetsApi } from '../../utils/api';
|
|
3
3
|
import { PresetAction, ViewPreset, WorkspaceSupportedComponentTypes } from './types';
|
|
4
|
-
export declare const getSnackbarMessage: (action: PresetAction, title: string) => snackbarTypes.TranslatableMessage;
|
|
4
|
+
export declare const getSnackbarMessage: (action: PresetAction, title: string, is_shared?: boolean) => snackbarTypes.TranslatableMessage;
|
|
5
5
|
export declare const getPresetsApi: () => PresetsApi;
|
|
6
6
|
export declare const emptyViewPreset: (componentType?: WorkspaceSupportedComponentTypes | undefined) => ViewPreset;
|
|
@@ -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, _panelId: string, scope?: import("dist/libs/shared/src").
|
|
6
|
+
export declare const getFilteredViewPresetListForView: ((state: AppStore, _panelId: string, scope?: import("dist/libs/shared/src").SystemScope | 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;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SystemScope } from '@opengeoweb/shared';
|
|
2
2
|
import { EntityState } from '@reduxjs/toolkit';
|
|
3
3
|
export interface ViewPresetListItem {
|
|
4
4
|
id: string;
|
|
5
5
|
title: string;
|
|
6
6
|
date: string;
|
|
7
|
-
scope:
|
|
7
|
+
scope: SystemScope;
|
|
8
8
|
abstract?: string;
|
|
9
|
+
username?: string;
|
|
9
10
|
}
|
|
10
11
|
export interface FetchViewPresetsListParams {
|
|
11
12
|
scope?: string;
|
|
@@ -117,7 +117,7 @@ export declare const getViewType: ((state: AppStore) => "" | import("./types").V
|
|
|
117
117
|
* @param {object} store store: object - Store object
|
|
118
118
|
* @returns {string} returnType: string
|
|
119
119
|
*/
|
|
120
|
-
export declare const getSelectedWorkspaceScope: ((state: AppStore) => import("dist/libs/shared/src").
|
|
120
|
+
export declare const getSelectedWorkspaceScope: ((state: AppStore) => import("dist/libs/shared/src").SystemScope) & import("reselect").OutputSelectorFields<(args_0: WorkspaceState) => import("dist/libs/shared/src").SystemScope, {
|
|
121
121
|
clearCache: () => void;
|
|
122
122
|
}> & {
|
|
123
123
|
clearCache: () => void;
|
|
@@ -140,7 +140,7 @@ export declare const getWorkspaceData: ((state: AppStore & import("@opengeoweb/s
|
|
|
140
140
|
viewPresetId: string;
|
|
141
141
|
}[];
|
|
142
142
|
viewType: import("./types").ViewType | undefined;
|
|
143
|
-
scope: import("dist/libs/shared/src").
|
|
143
|
+
scope: import("dist/libs/shared/src").SystemScope | undefined;
|
|
144
144
|
abstract: string | undefined;
|
|
145
145
|
mosaicNode: import("react-mosaic-component").MosaicNode<string>;
|
|
146
146
|
isTimeScrollingEnabled: boolean;
|
|
@@ -157,7 +157,7 @@ export declare const getWorkspaceData: ((state: AppStore & import("@opengeoweb/s
|
|
|
157
157
|
viewPresetId: string;
|
|
158
158
|
}[];
|
|
159
159
|
viewType: import("./types").ViewType | undefined;
|
|
160
|
-
scope: import("dist/libs/shared/src").
|
|
160
|
+
scope: import("dist/libs/shared/src").SystemScope | undefined;
|
|
161
161
|
abstract: string | undefined;
|
|
162
162
|
mosaicNode: import("react-mosaic-component").MosaicNode<string>;
|
|
163
163
|
isTimeScrollingEnabled: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { SystemScope } from '@opengeoweb/shared';
|
|
3
3
|
import { syncGroupsTypes } from '@opengeoweb/store';
|
|
4
4
|
import { MosaicNode } from 'react-mosaic-component';
|
|
5
5
|
export type InitialPropsWorkspaceViewType = Record<string, unknown>;
|
|
@@ -12,7 +12,7 @@ export interface WorkspaceViewType {
|
|
|
12
12
|
initialProps?: InitialPropsWorkspaceViewType;
|
|
13
13
|
activeLayerId?: string;
|
|
14
14
|
shouldPreventClose?: boolean;
|
|
15
|
-
scope?:
|
|
15
|
+
scope?: SystemScope;
|
|
16
16
|
keywords?: string;
|
|
17
17
|
}
|
|
18
18
|
export interface WorkspaceViews {
|
|
@@ -38,16 +38,17 @@ export interface WorkspacePreset {
|
|
|
38
38
|
viewType?: ViewType;
|
|
39
39
|
mosaicNode: MosaicNode<string>;
|
|
40
40
|
minimumPaneSizePercentage?: number;
|
|
41
|
-
scope?:
|
|
41
|
+
scope?: SystemScope;
|
|
42
42
|
abstract?: string;
|
|
43
43
|
linking?: Record<string, string[]>;
|
|
44
|
+
username?: string;
|
|
44
45
|
}
|
|
45
46
|
export interface WorkspaceState extends WorkspacePreset {
|
|
46
47
|
isLoading?: boolean;
|
|
47
48
|
error?: WorkspaceError;
|
|
48
49
|
hasChanges?: boolean;
|
|
49
50
|
}
|
|
50
|
-
export interface
|
|
51
|
+
export interface WorkspacePresetForBE {
|
|
51
52
|
id?: string;
|
|
52
53
|
title: string;
|
|
53
54
|
syncGroups?: WorkspaceSyncGroup[];
|
|
@@ -55,16 +56,22 @@ export interface WorkspacePresetFromBE {
|
|
|
55
56
|
views: WorkspaceViewsFromBE[];
|
|
56
57
|
viewType?: ViewType;
|
|
57
58
|
mosaicNode: MosaicNode<string>;
|
|
58
|
-
scope?:
|
|
59
|
+
scope?: SystemScope;
|
|
59
60
|
is_shared?: boolean;
|
|
60
61
|
username?: string;
|
|
61
62
|
abstract?: string;
|
|
62
63
|
}
|
|
64
|
+
export interface WorkspacePresetFromBE extends WorkspacePresetForBE {
|
|
65
|
+
id: string;
|
|
66
|
+
viewType: ViewType;
|
|
67
|
+
scope: SystemScope;
|
|
68
|
+
username: string;
|
|
69
|
+
}
|
|
63
70
|
export interface WorkspacePresetListItem {
|
|
64
71
|
id: string;
|
|
65
72
|
date?: string;
|
|
66
73
|
title: string;
|
|
67
|
-
scope
|
|
74
|
+
scope: SystemScope;
|
|
68
75
|
viewType: ViewType;
|
|
69
76
|
abstract: string;
|
|
70
77
|
username?: string;
|
|
@@ -125,21 +132,24 @@ export interface ViewPresetListItem {
|
|
|
125
132
|
id: string;
|
|
126
133
|
title: string;
|
|
127
134
|
date: string;
|
|
128
|
-
scope:
|
|
135
|
+
scope: SystemScope;
|
|
136
|
+
abstract?: string;
|
|
137
|
+
is_shared?: boolean;
|
|
138
|
+
username?: string;
|
|
129
139
|
}
|
|
130
140
|
export interface WorkspaceFetchWorkspacePayload {
|
|
131
141
|
workspaceId: string;
|
|
132
142
|
}
|
|
133
143
|
export interface WorkspaceFetchedWorkspacePayload {
|
|
134
144
|
workspaceId: string;
|
|
135
|
-
workspace:
|
|
145
|
+
workspace: WorkspacePresetForBE;
|
|
136
146
|
}
|
|
137
147
|
export interface WorkspaceFetchWorkspaceViewPresetPayload {
|
|
138
148
|
viewPresetId: string;
|
|
139
149
|
mosaicNodeId: string;
|
|
140
150
|
}
|
|
141
151
|
export interface WorkspaceSaveWorkspacePresetPayload {
|
|
142
|
-
workspace:
|
|
152
|
+
workspace: WorkspacePresetForBE;
|
|
143
153
|
}
|
|
144
154
|
export declare enum WorkspaceErrorType {
|
|
145
155
|
NOT_FOUND = "NOT_FOUND",
|
|
@@ -2,7 +2,7 @@ import { syncGroupsTypes } from '@opengeoweb/store';
|
|
|
2
2
|
import { MosaicNode } from 'react-mosaic-component';
|
|
3
3
|
import { AxiosError } from 'axios';
|
|
4
4
|
import { PresetsApi } from '../../utils/api';
|
|
5
|
-
import { WorkspacePreset,
|
|
5
|
+
import { WorkspacePreset, WorkspacePresetForBE, WorkspaceViewsFromBE, ViewType, WorkspaceViewPresetComponentsLookupType, WorkspaceSyncGroup } from './types';
|
|
6
6
|
export declare const getWorkspaceApi: () => PresetsApi;
|
|
7
7
|
export declare const getViewPresetState: (viewPresetId: string, mosaicNodeId: string, state: 'loading' | 'error') => {
|
|
8
8
|
title: string;
|
|
@@ -10,7 +10,7 @@ export declare const getViewPresetState: (viewPresetId: string, mosaicNodeId: st
|
|
|
10
10
|
mosaicNodeId: string;
|
|
11
11
|
componentType: WorkspaceViewPresetComponentsLookupType;
|
|
12
12
|
};
|
|
13
|
-
export declare const getLoadingWorkspace: (workspacePreset:
|
|
13
|
+
export declare const getLoadingWorkspace: (workspacePreset: WorkspacePresetForBE) => WorkspacePreset;
|
|
14
14
|
export declare const getListInChunks: (views: WorkspaceViewsFromBE[]) => WorkspaceViewsFromBE[][];
|
|
15
15
|
export declare const defaultSyncGroups: {
|
|
16
16
|
groupId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WorkspacePresetFromBE } from '../workspace/types';
|
|
2
1
|
import { WorkspaceModuleStore } from '../types';
|
|
3
|
-
|
|
2
|
+
import { WorkspacePresetForBE } from '../workspace/types';
|
|
3
|
+
export declare const emptyWorkspaceBEData: Omit<WorkspacePresetForBE, 'title'>;
|
|
4
4
|
export declare const workspaceListListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<WorkspaceModuleStore, import("@reduxjs/toolkit").ThunkDispatch<WorkspaceModuleStore, unknown, import("redux").AnyAction>, unknown>;
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
import { WorkspacePresetListItem } from '../workspace/types';
|
|
3
|
-
import { ErrorWorkspaceList, FetchedWorkspaceList, FetchWorkspaceList, OnErrorWorkspacePresetActionPayload, OnSuccesWorkspacePresetActionPayload, OpenWorkspaceActionDialogPayload, SearchWorkspaceFilter, SubmitFormWorkspaceActionDialogPayload, ToggleListDialogPayload, ToggleSelectFilterChip, WorkspaceListFilter, WorkspaceListState } from './types';
|
|
4
|
-
export declare const
|
|
3
|
+
import { ErrorWorkspaceList, FetchedWorkspaceList, FetchWorkspaceList, OnErrorWorkspacePresetActionPayload, OnSuccesWorkspacePresetActionPayload, OpenWorkspaceActionDialogPayload, PresetFilterType, SearchWorkspaceFilter, SubmitFormWorkspaceActionDialogPayload, ToggleListDialogPayload, ToggleSelectFilterChip, WorkspaceListFilter, WorkspaceListState } from './types';
|
|
4
|
+
export declare const personalFilterState: {
|
|
5
|
+
label: string;
|
|
6
|
+
id: PresetFilterType;
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
isDisabled: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const systemFilterState: {
|
|
11
|
+
label: string;
|
|
12
|
+
id: PresetFilterType;
|
|
13
|
+
isSelected: boolean;
|
|
14
|
+
isDisabled: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const sharedFilterState: {
|
|
17
|
+
label: string;
|
|
18
|
+
id: PresetFilterType;
|
|
19
|
+
isSelected: boolean;
|
|
20
|
+
isDisabled: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare const defaultPresetFilterState: WorkspaceListFilter[];
|
|
5
23
|
export declare const workspaceListAdapter: import("@reduxjs/toolkit").EntityAdapter<WorkspacePresetListItem>;
|
|
6
24
|
export declare const initialState: WorkspaceListState;
|
|
7
25
|
export declare const workspaceListReducer: import("redux").Reducer<WorkspaceListState>, workspaceListActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SystemScope } from '@opengeoweb/shared';
|
|
2
2
|
import { AppStore } from '../types';
|
|
3
3
|
import { ViewPresetState } from '../viewPresets/types';
|
|
4
4
|
import { WorkspaceState } from '../workspace/types';
|
|
@@ -35,12 +35,12 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
35
35
|
error: import("../viewPresets/types").ViewPresetError;
|
|
36
36
|
isFetching: boolean | undefined;
|
|
37
37
|
hasChanges: boolean | undefined;
|
|
38
|
-
scope:
|
|
38
|
+
scope: SystemScope;
|
|
39
39
|
}[];
|
|
40
40
|
id?: string | undefined;
|
|
41
41
|
title?: string | undefined;
|
|
42
42
|
abstract?: string | undefined;
|
|
43
|
-
scope?:
|
|
43
|
+
scope?: SystemScope | undefined;
|
|
44
44
|
} | {
|
|
45
45
|
views: {
|
|
46
46
|
mosaicNodeId: string;
|
|
@@ -50,7 +50,7 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
50
50
|
error: import("../viewPresets/types").ViewPresetError;
|
|
51
51
|
isFetching: boolean | undefined;
|
|
52
52
|
hasChanges: boolean | undefined;
|
|
53
|
-
scope:
|
|
53
|
+
scope: SystemScope;
|
|
54
54
|
}[];
|
|
55
55
|
id?: string | undefined;
|
|
56
56
|
title: string;
|
|
@@ -58,7 +58,7 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
58
58
|
linking?: Record<string, string[]> | undefined;
|
|
59
59
|
viewType?: import("../workspace/types").ViewType | undefined;
|
|
60
60
|
mosaicNode: import("react-mosaic-component").MosaicNode<string>;
|
|
61
|
-
scope?:
|
|
61
|
+
scope?: SystemScope | undefined;
|
|
62
62
|
is_shared?: boolean | undefined;
|
|
63
63
|
username?: string | undefined;
|
|
64
64
|
abstract?: string | undefined;
|
|
@@ -78,12 +78,12 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
78
78
|
error: import("../viewPresets/types").ViewPresetError;
|
|
79
79
|
isFetching: boolean | undefined;
|
|
80
80
|
hasChanges: boolean | undefined;
|
|
81
|
-
scope:
|
|
81
|
+
scope: SystemScope;
|
|
82
82
|
}[];
|
|
83
83
|
id?: string | undefined;
|
|
84
84
|
title?: string | undefined;
|
|
85
85
|
abstract?: string | undefined;
|
|
86
|
-
scope?:
|
|
86
|
+
scope?: SystemScope | undefined;
|
|
87
87
|
} | {
|
|
88
88
|
views: {
|
|
89
89
|
mosaicNodeId: string;
|
|
@@ -93,7 +93,7 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
93
93
|
error: import("../viewPresets/types").ViewPresetError;
|
|
94
94
|
isFetching: boolean | undefined;
|
|
95
95
|
hasChanges: boolean | undefined;
|
|
96
|
-
scope:
|
|
96
|
+
scope: SystemScope;
|
|
97
97
|
}[];
|
|
98
98
|
id?: string | undefined;
|
|
99
99
|
title: string;
|
|
@@ -101,7 +101,7 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
101
101
|
linking?: Record<string, string[]> | undefined;
|
|
102
102
|
viewType?: import("../workspace/types").ViewType | undefined;
|
|
103
103
|
mosaicNode: import("react-mosaic-component").MosaicNode<string>;
|
|
104
|
-
scope?:
|
|
104
|
+
scope?: SystemScope | undefined;
|
|
105
105
|
is_shared?: boolean | undefined;
|
|
106
106
|
username?: string | undefined;
|
|
107
107
|
abstract?: string | undefined;
|
|
@@ -121,7 +121,7 @@ export declare const getIsWorkspaceListDialogOpen: ((state: AppStore) => boolean
|
|
|
121
121
|
}> & {
|
|
122
122
|
clearCache: () => void;
|
|
123
123
|
};
|
|
124
|
-
export declare const getWorkspaceListFilters: ((state: AppStore, scope?:
|
|
124
|
+
export declare const getWorkspaceListFilters: ((state: AppStore, scope?: SystemScope | undefined) => WorkspaceListFilter[]) & import("reselect").OutputSelectorFields<(args_0: WorkspaceListState, args_1: SystemScope | undefined) => WorkspaceListFilter[], {
|
|
125
125
|
clearCache: () => void;
|
|
126
126
|
}> & {
|
|
127
127
|
clearCache: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SystemScope } from '@opengeoweb/shared';
|
|
2
2
|
import { EntityState } from '@reduxjs/toolkit';
|
|
3
|
-
import { ViewPresetError } from '../viewPresets/types';
|
|
4
|
-
import { WorkspacePresetAction,
|
|
3
|
+
import { type ViewPresetError } from '../viewPresets/types';
|
|
4
|
+
import { WorkspacePresetAction, WorkspacePresetForBE, 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"
|
|
@@ -29,7 +29,7 @@ export interface VerbatimWorkspaceListError {
|
|
|
29
29
|
}
|
|
30
30
|
export interface WorkspaceListFilter {
|
|
31
31
|
label: string;
|
|
32
|
-
id:
|
|
32
|
+
id: PresetFilterType;
|
|
33
33
|
isSelected?: boolean;
|
|
34
34
|
isDisabled?: boolean;
|
|
35
35
|
}
|
|
@@ -43,17 +43,17 @@ export type WorkspaceDialogView = {
|
|
|
43
43
|
title: string;
|
|
44
44
|
isSelected: boolean;
|
|
45
45
|
error?: ViewPresetError;
|
|
46
|
-
scope:
|
|
46
|
+
scope: SystemScope;
|
|
47
47
|
abstract?: string;
|
|
48
48
|
} & WorkspaceViewsFromBE;
|
|
49
49
|
export interface WorkspaceFormValues {
|
|
50
50
|
id?: string;
|
|
51
51
|
title?: string;
|
|
52
52
|
abstract?: string;
|
|
53
|
-
scope?:
|
|
53
|
+
scope?: SystemScope;
|
|
54
54
|
views?: WorkspaceDialogView[];
|
|
55
55
|
}
|
|
56
|
-
export type WorkspacePresetFormValues = WorkspaceFormValues |
|
|
56
|
+
export type WorkspacePresetFormValues = WorkspaceFormValues | WorkspacePresetForBE;
|
|
57
57
|
export interface WorkspaceActionDialogType {
|
|
58
58
|
action: WorkspacePresetAction;
|
|
59
59
|
presetId: string;
|
|
@@ -81,7 +81,7 @@ export interface ToggleListDialogPayload {
|
|
|
81
81
|
isWorkspaceListDialogOpen: boolean;
|
|
82
82
|
}
|
|
83
83
|
export interface ToggleSelectFilterChip {
|
|
84
|
-
id:
|
|
84
|
+
id: PresetFilterType;
|
|
85
85
|
isSelected: boolean;
|
|
86
86
|
}
|
|
87
87
|
export interface SearchWorkspaceFilter {
|
|
@@ -91,7 +91,7 @@ export type OpenWorkspaceActionDialogPayload = WorkspaceActionDialogType;
|
|
|
91
91
|
export interface SubmitFormWorkspaceActionDialogPayload {
|
|
92
92
|
presetAction: WorkspacePresetAction;
|
|
93
93
|
presetId: string;
|
|
94
|
-
data:
|
|
94
|
+
data: WorkspacePresetForBE;
|
|
95
95
|
emptyMapPresetTitle: string;
|
|
96
96
|
emptyWorkspacePresetTitle: string;
|
|
97
97
|
}
|
|
@@ -101,7 +101,8 @@ export interface OnNonDeleteSuccesWorkspacePresetActionPayload {
|
|
|
101
101
|
title: string;
|
|
102
102
|
abstract?: string;
|
|
103
103
|
currentActiveWorkspaceId?: string;
|
|
104
|
-
scope:
|
|
104
|
+
scope: SystemScope;
|
|
105
|
+
is_shared?: boolean;
|
|
105
106
|
}
|
|
106
107
|
export interface OnDeleteSuccesWorkspacePresetActionPayload {
|
|
107
108
|
workspaceId: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MapPreset } from '@opengeoweb/store';
|
|
2
1
|
import { snackbarTypes } from '@opengeoweb/snackbar';
|
|
2
|
+
import { MapPreset } from '@opengeoweb/store';
|
|
3
3
|
import { TFunction } from 'i18next';
|
|
4
|
+
import { ViewPresetsListFilter } from '../viewPresets/types';
|
|
5
|
+
import { FetchViewPresetsListParams } from '../viewPresetsList/types';
|
|
4
6
|
import { WorkspacePreset, WorkspacePresetAction, WorkspacePresetListItem } from '../workspace/types';
|
|
5
7
|
import { FetchWorkspaceParams, WorkspaceListFilter } from './types';
|
|
6
|
-
|
|
7
|
-
import { ViewPresetsListFilter } from '../viewPresets/types';
|
|
8
|
-
export declare const getSnackbarMessage: (action: WorkspacePresetAction, title: string) => snackbarTypes.TranslatableMessage;
|
|
8
|
+
export declare const getSnackbarMessage: (action: WorkspacePresetAction, title: string, is_shared?: boolean) => snackbarTypes.TranslatableMessage;
|
|
9
9
|
export declare function getEmptyWorkspaceListItem(): Omit<WorkspacePresetListItem, 'title'>;
|
|
10
10
|
export declare function getEmptyWorkspaceListItem(t: TFunction): WorkspacePresetListItem;
|
|
11
11
|
export declare function getEmptyWorkspaceListItem(t?: TFunction): Omit<WorkspacePresetListItem, 'title'> | WorkspacePresetListItem;
|
package/src/lib/utils/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CreateApiProps } from '@opengeoweb/api';
|
|
2
|
-
import { WorkspacePresetFromBE, WorkspacePresetListItem, ViewPresetListItem } from '../store/workspace/types';
|
|
2
|
+
import { WorkspacePresetFromBE, WorkspacePresetForBE, 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';
|
|
@@ -12,8 +12,8 @@ export interface PresetsApi {
|
|
|
12
12
|
getWorkspacePreset: (workspacePresetId: string) => Promise<{
|
|
13
13
|
data: WorkspacePresetFromBE;
|
|
14
14
|
}>;
|
|
15
|
-
saveWorkspacePreset: (workspacePresetId: string, data:
|
|
16
|
-
saveWorkspacePresetAs: (data:
|
|
15
|
+
saveWorkspacePreset: (workspacePresetId: string, data: WorkspacePresetForBE) => Promise<void>;
|
|
16
|
+
saveWorkspacePresetAs: (data: WorkspacePresetForBE) => Promise<string>;
|
|
17
17
|
getViewPresets: (params?: FetchViewPresetsListParams) => Promise<{
|
|
18
18
|
data: ViewPresetListItem[];
|
|
19
19
|
}>;
|
package/src/lib/utils/utils.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TFunction } from 'i18next';
|
|
2
|
+
import { ViewPresetsListFilter } from '../store/viewPresets/types';
|
|
3
|
+
import { ViewPresetListItem, WorkspacePresetListItem } from '../store/workspace/types';
|
|
2
4
|
import { WorkspaceListFilter } from '../store/workspaceList/types';
|
|
3
|
-
import { WorkspacePresetListItem } from '../store/workspace/types';
|
|
4
5
|
export declare const getCleanSearchQuery: (searchQuery: string) => string;
|
|
5
6
|
export declare const getPresetTitle: (title: string, hasChanges: boolean, isNew: boolean, t: TFunction) => string;
|
|
6
7
|
export declare const setDocumentTitle: (workspaceTitle: string, appTitle?: string) => void;
|
|
7
|
-
export declare const
|
|
8
|
+
export declare const filterAndSortPresets: <T extends WorkspacePresetListItem | ViewPresetListItem>(presets: T[], selectedFilters: WorkspaceListFilter[] | ViewPresetsListFilter[], username: string) => T[];
|