@opengeoweb/workspace 9.30.0 → 9.32.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 +5061 -5261
- package/package.json +5 -4
- package/src/index.d.ts +3 -0
- package/src/lib/components/WorkspaceOptions/WorkspaceOptions.d.ts +1 -2
- package/src/lib/components/WorkspaceOptions/WorkspaceOptionsConnect.d.ts +1 -0
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.stories.d.ts +0 -2
- package/src/lib/components/WorkspacePresetsFormDialog/{WorkspaceSystemPresetsForm.d.ts → WorkspaceViewPresetsFormFields.d.ts} +3 -2
- package/src/lib/components/WorkspaceSelectList/WorkspaceSelectList.d.ts +1 -1
- package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListRow.d.ts +1 -1
- package/src/lib/components/WorkspaceTab/WorkspaceTab.d.ts +1 -0
- package/src/lib/components/WorkspaceTab/WorkspaceTabConnect.d.ts +1 -0
- package/src/lib/components/WorkspaceTopBar/WorkspaceTopBar.d.ts +1 -0
- package/src/lib/components/WorkspaceView/helpers.d.ts +1 -0
- package/src/lib/store/viewPresets/types.d.ts +2 -1
- package/src/lib/store/workspace/listener.d.ts +2 -2
- package/src/lib/store/workspace/reducer.d.ts +1 -2
- package/src/lib/store/workspace/selectors.d.ts +3 -3
- package/src/lib/store/workspace/types.d.ts +2 -6
- package/src/lib/store/workspaceList/listener.d.ts +0 -7
- package/src/lib/store/workspaceList/selectors.d.ts +2 -0
- package/src/lib/store/workspaceList/types.d.ts +2 -1
- package/src/lib/store/workspaceList/utils.d.ts +0 -2
- package/src/lib/utils/testUtils.d.ts +4 -0
- package/src/lib/utils/utils.d.ts +1 -0
- /package/src/lib/components/WorkspacePresetsFormDialog/{WorkspaceSystemPresetsForm.spec.d.ts → WorkspaceViewPresetsFormFields.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.32.0",
|
|
4
4
|
"description": "GeoWeb Workspace library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@redux-eggs/core": "^2.2.0",
|
|
22
22
|
"@redux-eggs/redux-toolkit": "^2.2.0",
|
|
23
23
|
"immer": "^10.0.3",
|
|
24
|
-
"axios": "1.
|
|
24
|
+
"axios": "^1.7.7",
|
|
25
25
|
"react-virtualized-auto-sizer": "^1.0.21",
|
|
26
26
|
"react-mosaic-component": "^6.1.0",
|
|
27
27
|
"@opengeoweb/form-fields": "*",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@opengeoweb/sigmet-airmet": "*",
|
|
33
33
|
"@opengeoweb/warnings": "*",
|
|
34
34
|
"i18next": "^23.11.5",
|
|
35
|
-
"react-i18next": "^
|
|
35
|
+
"react-i18next": "^15.1.1",
|
|
36
36
|
"@mui/material": "^6.1.1",
|
|
37
37
|
"@opengeoweb/webmap-react": "*"
|
|
38
38
|
},
|
|
@@ -43,5 +43,6 @@
|
|
|
43
43
|
},
|
|
44
44
|
"module": "./index.esm.js",
|
|
45
45
|
"type": "module",
|
|
46
|
-
"main": "./index.esm.js"
|
|
46
|
+
"main": "./index.esm.js",
|
|
47
|
+
"types": "./index.esm.d.ts"
|
|
47
48
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import workspaceTranslations from '../locales/workspace.json';
|
|
2
|
+
import { workspaceListener } from './lib/store/workspace/listener';
|
|
3
|
+
export { workspaceListener };
|
|
2
4
|
export { workspaceActions as actions, reducer as workspaceReducer, } from './lib/store/workspace/reducer';
|
|
3
5
|
export { workspaceListActions } from './lib/store/workspaceList/reducer';
|
|
4
6
|
export { viewPresetActions } from './lib/store/viewPresets';
|
|
5
7
|
export * as selectors from './lib/store/workspace/selectors';
|
|
6
8
|
export { default as workspaceModuleConfig } from './lib/store/config';
|
|
7
9
|
export * from './lib/store/workspace/types';
|
|
10
|
+
export * from './lib/store/viewPresets/types';
|
|
8
11
|
export * from './lib/components/Providers';
|
|
9
12
|
export * from './lib/components/ComponentsLookUpWrapper';
|
|
10
13
|
export * from './lib/components/WorkspaceView';
|
|
@@ -7,10 +7,9 @@ export interface WorkspaceOptionsProps {
|
|
|
7
7
|
id?: string;
|
|
8
8
|
handleSave?: () => void;
|
|
9
9
|
handleSaveAs?: () => void;
|
|
10
|
-
handleSaveAll?: () => void;
|
|
11
10
|
handleEdit?: () => void;
|
|
12
11
|
handleDelete?: () => void;
|
|
13
|
-
|
|
12
|
+
handleSaveSystemPresetAs?: () => void;
|
|
14
13
|
handleResetWorkspace?: () => void;
|
|
15
14
|
hasChanges?: boolean;
|
|
16
15
|
isDisabled?: boolean;
|
package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.stories.d.ts
CHANGED
|
@@ -21,8 +21,6 @@ export declare const FormDialogLightDelete: {
|
|
|
21
21
|
};
|
|
22
22
|
export declare const FormDialogLightDuplicate: () => React.ReactElement;
|
|
23
23
|
export declare const FormDialogDarkDuplicate: () => React.ReactElement;
|
|
24
|
-
export declare const FormDialogSaveAllLight: () => React.ReactElement;
|
|
25
|
-
export declare const FormDialogSaveAllDark: () => React.ReactElement;
|
|
26
24
|
export declare const FormDialogSaveSystemPreset: {
|
|
27
25
|
(): React.ReactElement;
|
|
28
26
|
parameters: {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WorkspaceDialogView } from '../../store/workspaceList/types';
|
|
3
|
-
declare const
|
|
3
|
+
declare const WorkspaceViewPresetsFormFields: React.FC<{
|
|
4
4
|
viewPresets: WorkspaceDialogView[];
|
|
5
5
|
isLoading?: boolean;
|
|
6
|
+
isAdmin?: boolean;
|
|
6
7
|
}>;
|
|
7
|
-
export default
|
|
8
|
+
export default WorkspaceViewPresetsFormFields;
|
|
@@ -4,7 +4,7 @@ import { WorkspacePresetListItem, WorkspacePresetAction } from '../../store/work
|
|
|
4
4
|
export interface WorkspaceSelectListProps extends BoxProps {
|
|
5
5
|
workspacePresets: WorkspacePresetListItem[];
|
|
6
6
|
currentSelectedId: string;
|
|
7
|
-
|
|
7
|
+
onClickWorkspacePreset: (id: string) => void;
|
|
8
8
|
onClickWorkspacePresetOption: (presetId: string, workspaceAction: WorkspacePresetAction, workspacePreset: WorkspacePresetListItem) => void;
|
|
9
9
|
hideNewWorkspace?: boolean;
|
|
10
10
|
isEditable?: boolean;
|
|
@@ -4,7 +4,7 @@ export declare const WORKSPACE_SELECT_LIST_ROW_HEIGHT = 46;
|
|
|
4
4
|
export declare const getPresetIcon: (preset: WorkspacePresetListItem) => React.ReactElement;
|
|
5
5
|
interface WorkspaceSelectListRowProps {
|
|
6
6
|
workspacePreset: WorkspacePresetListItem;
|
|
7
|
-
|
|
7
|
+
onClickWorkspacePreset: (id: string) => void;
|
|
8
8
|
onClickWorkspacePresetOption: (presetId: string, workspaceAction: WorkspacePresetAction, workspacePreset: WorkspacePresetListItem) => void;
|
|
9
9
|
isOptionsMenuOpen?: boolean;
|
|
10
10
|
isEditable?: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { MosaicNode } from 'react-mosaic-component';
|
|
2
2
|
export declare const getUniqueId: (existingIds: string[], count?: number) => string;
|
|
3
3
|
export declare const createBalancedMosaicNode: (currentNode: MosaicNode<string>) => MosaicNode<string>;
|
|
4
|
+
export declare const closeTimeSeriesDialogsWhenChangingPreset: (componentTypes: string[] | undefined, dispatch: (action: unknown) => void) => void;
|
|
@@ -17,7 +17,7 @@ export declare enum ViewPresetErrorComponent {
|
|
|
17
17
|
PRESET_LIST = "PRESET_LIST"
|
|
18
18
|
}
|
|
19
19
|
export declare enum ViewPresetErrorType {
|
|
20
|
-
AUTH = "AUTH"
|
|
20
|
+
AUTH = "AUTH",// Errors related to authentication and authorization
|
|
21
21
|
GENERIC = "GENERIC"
|
|
22
22
|
}
|
|
23
23
|
export type ViewPresetError = {
|
|
@@ -108,6 +108,7 @@ export interface OnSuccesViewPresetActionPayload extends ViewPresetAction {
|
|
|
108
108
|
viewPresetId: string;
|
|
109
109
|
action: PresetAction;
|
|
110
110
|
title: string;
|
|
111
|
+
componentType?: string;
|
|
111
112
|
}
|
|
112
113
|
export interface SelectViewPresetPayload extends ViewPresetAction {
|
|
113
114
|
viewPresetId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AnyAction, ThunkDispatch } from '@reduxjs/toolkit';
|
|
2
|
-
import { WorkspaceModuleStore } from '../types';
|
|
3
|
-
export declare const workspaceListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<
|
|
2
|
+
import { AppStore, WorkspaceModuleStore } from '../types';
|
|
3
|
+
export declare const workspaceListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<AppStore, ThunkDispatch<AppStore, unknown, AnyAction>, unknown>;
|
|
4
4
|
export declare const fetchWorkspaceViewPreset: (dispatch: ThunkDispatch<WorkspaceModuleStore, unknown, AnyAction>, viewPresetId: string, mosaicNodeId: string) => Promise<void>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Reducer } from '@reduxjs/toolkit';
|
|
2
|
-
import { WorkspaceAddViewPayload, WorkspaceDeleteViewPayload, WorkspaceState, WorkspaceSetPresetPayload, WorkspaceSetPreventCloseViewPayload, WorkspaceUpdateViewPayload, WorkspaceUpdateViewsPayload, WorkspaceErrorWorkspacePayload, WorkspaceFetchedWorkspacePayload, WorkspaceFetchWorkspacePayload, WorkspaceFetchWorkspaceViewPresetPayload, WorkspaceSaveWorkspacePresetPayload,
|
|
2
|
+
import { WorkspaceAddViewPayload, WorkspaceDeleteViewPayload, WorkspaceState, WorkspaceSetPresetPayload, WorkspaceSetPreventCloseViewPayload, WorkspaceUpdateViewPayload, WorkspaceUpdateViewsPayload, WorkspaceErrorWorkspacePayload, WorkspaceFetchedWorkspacePayload, WorkspaceFetchWorkspacePayload, WorkspaceFetchWorkspaceViewPresetPayload, WorkspaceSaveWorkspacePresetPayload, WorkspaceSetNewViewPayload, WorkspaceChangeToEmptyMapWorkspacePayload } from './types';
|
|
3
3
|
export declare const initialState: WorkspaceState;
|
|
4
4
|
export declare const reducer: Reducer<WorkspaceState>;
|
|
5
5
|
export declare const workspaceActions: {
|
|
6
|
-
setInitialViewMapPreset: import("@reduxjs/toolkit").ActionCreatorWithPayload<WorkspaceSetInitialViewMapPresetPayload, "workspace/setInitialViewMapPreset">;
|
|
7
6
|
addWorkspaceView: import("@reduxjs/toolkit").ActionCreatorWithPayload<WorkspaceAddViewPayload, "workspace/addWorkspaceView">;
|
|
8
7
|
setNewWorkspaceView: import("@reduxjs/toolkit").ActionCreatorWithPayload<WorkspaceSetNewViewPayload, "workspace/setNewWorkspaceView">;
|
|
9
8
|
deleteWorkspaceView: import("@reduxjs/toolkit").ActionCreatorWithPayload<WorkspaceDeleteViewPayload, "workspace/deleteWorkspaceView">;
|
|
@@ -13,12 +13,12 @@ export declare const getWorkspaceState: ((state: AppStore) => WorkspaceState) &
|
|
|
13
13
|
clearCache: () => void;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* Gets
|
|
16
|
+
* Gets component types from the views used in the workspace
|
|
17
17
|
*
|
|
18
18
|
* @param {object} store store: object - Store object
|
|
19
|
-
* @returns {
|
|
19
|
+
* @returns {WorkspaceViewType.componentType[]} returnType: WorkspaceViewType.componentType[]
|
|
20
20
|
*/
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const getComponentTypesFromActiveViews: ((state: AppStore) => string[] | undefined) & import("reselect").OutputSelectorFields<(args_0: WorkspaceState | undefined) => string[] | undefined, {
|
|
22
22
|
clearCache: () => void;
|
|
23
23
|
}> & {
|
|
24
24
|
clearCache: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { syncGroupsTypes } from '@opengeoweb/store';
|
|
3
3
|
import { MosaicNode } from 'react-mosaic-component';
|
|
4
4
|
export type InitialPropsWorkspaceViewType = Record<string, unknown>;
|
|
5
5
|
export type WorkspaceViewPresetComponentsLookupType = 'ViewError' | 'ViewLoading';
|
|
@@ -42,7 +42,6 @@ export interface WorkspaceState extends WorkspacePreset {
|
|
|
42
42
|
isLoading?: boolean;
|
|
43
43
|
error?: WorkspaceError;
|
|
44
44
|
hasChanges?: boolean;
|
|
45
|
-
intialViewMapPreset?: MapPreset;
|
|
46
45
|
}
|
|
47
46
|
export interface WorkspacePresetFromBE {
|
|
48
47
|
id?: string;
|
|
@@ -67,15 +66,12 @@ export declare enum WorkspacePresetAction {
|
|
|
67
66
|
EDIT = "EDIT",
|
|
68
67
|
SAVE = "SAVE",
|
|
69
68
|
SAVE_AS = "SAVE_AS",
|
|
70
|
-
SAVE_ALL = "SAVE_ALL",
|
|
71
69
|
DUPLICATE = "DUPLICATE",
|
|
72
70
|
SAVE_SYSTEM_PRESET = "SAVE_SYSTEM_PRESET",
|
|
71
|
+
SAVE_SYSTEM_PRESET_AS = "SAVE_SYSTEM_PRESET_AS",
|
|
73
72
|
RESET = "RESET",
|
|
74
73
|
DELETE_SYSTEM_PRESET = "DELETE_SYSTEM_PRESET"
|
|
75
74
|
}
|
|
76
|
-
export interface WorkspaceSetInitialViewMapPresetPayload {
|
|
77
|
-
preset: MapPreset;
|
|
78
|
-
}
|
|
79
75
|
export interface WorkspaceAddViewPayload {
|
|
80
76
|
id: string;
|
|
81
77
|
componentType: string;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import { ToolkitStore } from '@reduxjs/toolkit/dist/configureStore';
|
|
2
1
|
import { WorkspacePresetFromBE } from '../workspace/types';
|
|
3
|
-
import { ViewPresetEntity } from '../viewPresets/types';
|
|
4
2
|
import { WorkspaceModuleStore } from '../types';
|
|
5
3
|
export declare const emptyWorkspaceBEData: Omit<WorkspacePresetFromBE, 'title'>;
|
|
6
|
-
export declare const saveAllViewPresets: (viewPresetEntity: ViewPresetEntity, workspaceTitle: string, store: ToolkitStore, emptyMapPresetTitle: string) => Promise<{
|
|
7
|
-
mosaicNodeId: string;
|
|
8
|
-
viewPresetId: string;
|
|
9
|
-
title?: string;
|
|
10
|
-
} | string>;
|
|
11
4
|
export declare const workspaceListListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<WorkspaceModuleStore, import("@reduxjs/toolkit").ThunkDispatch<WorkspaceModuleStore, unknown, import("redux").AnyAction>, unknown>;
|
|
@@ -29,6 +29,7 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
29
29
|
error: import("../viewPresets/types").ViewPresetError;
|
|
30
30
|
isFetching: boolean | undefined;
|
|
31
31
|
hasChanges: boolean | undefined;
|
|
32
|
+
scope: PresetScope;
|
|
32
33
|
}[] | undefined;
|
|
33
34
|
id?: string | undefined;
|
|
34
35
|
title?: string | undefined;
|
|
@@ -59,6 +60,7 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
59
60
|
error: import("../viewPresets/types").ViewPresetError;
|
|
60
61
|
isFetching: boolean | undefined;
|
|
61
62
|
hasChanges: boolean | undefined;
|
|
63
|
+
scope: PresetScope;
|
|
62
64
|
}[] | undefined;
|
|
63
65
|
id?: string | undefined;
|
|
64
66
|
title?: string | undefined;
|
|
@@ -2,7 +2,7 @@ import { EntityState } from '@reduxjs/toolkit';
|
|
|
2
2
|
import { WorkspacePresetListItem, WorkspacePresetAction, PresetScope, WorkspacePresetFromBE, WorkspaceViewsFromBE } from '../workspace/types';
|
|
3
3
|
import { ViewPresetError } from '../viewPresets/types';
|
|
4
4
|
export declare enum WorkspaceListErrorCategory {
|
|
5
|
-
AUTH = "AUTH"
|
|
5
|
+
AUTH = "AUTH",// Errors related to authentication and authorization
|
|
6
6
|
GENERIC = "GENERIC"
|
|
7
7
|
}
|
|
8
8
|
export declare enum WorkspaceListErrorType {
|
|
@@ -38,6 +38,7 @@ export type WorkspaceDialogView = {
|
|
|
38
38
|
title: string;
|
|
39
39
|
isSelected: boolean;
|
|
40
40
|
error?: ViewPresetError;
|
|
41
|
+
scope: PresetScope;
|
|
41
42
|
} & WorkspaceViewsFromBE;
|
|
42
43
|
export interface WorkspaceFormValues {
|
|
43
44
|
id?: string;
|
|
@@ -12,5 +12,3 @@ export declare function getEmptyMapWorkspace(t: TFunction): WorkspacePreset;
|
|
|
12
12
|
export declare const getEmptyWorkspacePreset: () => Omit<WorkspacePreset, 'title'>;
|
|
13
13
|
export declare const createCustomEmptyMapWorkspace: (emptyWorkspaceTitle: string, emptyMapWorkspaceTitle: string, customMapPreset?: MapPreset) => WorkspacePreset;
|
|
14
14
|
export declare const constructFilterParams: (filters: WorkspaceListFilter[], searchQuery: string) => FetchWorkspaceParams;
|
|
15
|
-
export declare const generateUID: () => string;
|
|
16
|
-
export declare const getGeneratedViewPresetTitle: (workspaceTitle: string, uid: string) => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { uiTypes, WebMapStateModuleState } from '@opengeoweb/store';
|
|
2
|
+
import { Store } from '@reduxjs/toolkit';
|
|
3
|
+
import { WorkspaceModuleStore } from '../store/types';
|
|
4
|
+
export declare const createMockStore: (mockState: WorkspaceModuleStore & uiTypes.UIModuleState & WebMapStateModuleState) => Store;
|
package/src/lib/utils/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { TFunction } from 'i18next';
|
|
2
2
|
export declare const getCleanSearchQuery: (searchQuery: string) => string;
|
|
3
3
|
export declare const getPresetTitle: (title: string, hasChanges: boolean, isNew: boolean, t: TFunction) => string;
|
|
4
|
+
export declare const setDocumentTitle: (workspaceTitle: string, appTitle?: string) => void;
|