@opengeoweb/workspace 14.5.2 → 15.0.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 +609 -581
- package/package.json +17 -17
- package/src/lib/WorkspaceAdmin.stories.d.ts +8 -1
- package/src/lib/api/utils.d.ts +1 -0
- package/src/lib/api/workspace-api/api.d.ts +2 -1
- package/src/lib/api/workspace-api/queryOptions.d.ts +12 -0
- package/src/lib/components/LabelsPanel/PresetLabelsPanel.d.ts +1 -1
- package/src/lib/components/LabelsPanel/PresetsLabelsPanelWrapper.d.ts +11 -0
- package/src/lib/components/LabelsPanel/PresetsLabelsPanelWrapper.spec.d.ts +1 -0
- package/src/lib/components/ViewPresetsFormDialog/ViewPresetsForm.d.ts +0 -2
- package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialog.d.ts +1 -2
- package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialogConnect.d.ts +0 -2
- package/src/lib/components/WorkspaceDetail/WorkspaceDetailError.stories.d.ts +8 -1
- package/src/lib/components/WorkspaceMenu/WorkspaceMenu.stories.d.ts +1 -0
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsForm.d.ts +0 -2
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.d.ts +1 -2
- package/src/lib/components/WorkspaceSelectList/WorkspaceMenuLabelsWrapper.d.ts +1 -2
- package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListRow.d.ts +1 -1
- package/src/lib/store/workspaceList/listener.d.ts +2 -2
- package/src/lib/storyUtils/StoryWrapper.d.ts +4 -2
- package/src/lib/utils/api.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/workspace",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "GeoWeb Workspace library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,33 +9,33 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"react-redux": "^9.2.0",
|
|
12
|
-
"@opengeoweb/shared": "
|
|
13
|
-
"@opengeoweb/store": "
|
|
14
|
-
"@opengeoweb/api": "
|
|
12
|
+
"@opengeoweb/shared": "15.0.0",
|
|
13
|
+
"@opengeoweb/store": "15.0.0",
|
|
14
|
+
"@opengeoweb/api": "15.0.0",
|
|
15
15
|
"react-hook-form": "^7.50.1",
|
|
16
|
-
"@opengeoweb/theme": "
|
|
16
|
+
"@opengeoweb/theme": "15.0.0",
|
|
17
17
|
"@reduxjs/toolkit": "^2.6.1",
|
|
18
|
-
"@opengeoweb/snackbar": "
|
|
18
|
+
"@opengeoweb/snackbar": "15.0.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": "
|
|
25
|
-
"@opengeoweb/time-series": "
|
|
26
|
-
"@opengeoweb/authentication": "
|
|
27
|
-
"@opengeoweb/core": "
|
|
28
|
-
"@opengeoweb/taf": "
|
|
29
|
-
"@opengeoweb/sigmet-airmet": "
|
|
30
|
-
"@opengeoweb/warnings": "
|
|
31
|
-
"@opengeoweb/space-weather": "
|
|
24
|
+
"@opengeoweb/form-fields": "15.0.0",
|
|
25
|
+
"@opengeoweb/time-series": "15.0.0",
|
|
26
|
+
"@opengeoweb/authentication": "15.0.0",
|
|
27
|
+
"@opengeoweb/core": "15.0.0",
|
|
28
|
+
"@opengeoweb/taf": "15.0.0",
|
|
29
|
+
"@opengeoweb/sigmet-airmet": "15.0.0",
|
|
30
|
+
"@opengeoweb/warnings": "15.0.0",
|
|
31
|
+
"@opengeoweb/space-weather": "15.0.0",
|
|
32
32
|
"i18next": "^25.0.1",
|
|
33
33
|
"react-i18next": "^15.1.1",
|
|
34
34
|
"@mui/material": "^7.0.1",
|
|
35
|
-
"@opengeoweb/webmap-react": "
|
|
35
|
+
"@opengeoweb/webmap-react": "15.0.0",
|
|
36
36
|
"@tanstack/react-query": "^5.85.5",
|
|
37
|
-
"@opengeoweb/soundings": "
|
|
38
|
-
"@opengeoweb/knmi-components": "
|
|
37
|
+
"@opengeoweb/soundings": "15.0.0",
|
|
38
|
+
"@opengeoweb/knmi-components": "15.0.0",
|
|
39
39
|
"@mui/system": "^7.3.5"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -6,5 +6,12 @@ declare const _default: {
|
|
|
6
6
|
export default _default;
|
|
7
7
|
export declare const Admin: () => React.ReactElement;
|
|
8
8
|
export declare const AdminScreenConfigRadarTemp: () => React.ReactElement;
|
|
9
|
-
export declare const ErrorSaveWorkspace:
|
|
9
|
+
export declare const ErrorSaveWorkspace: {
|
|
10
|
+
(): React.ReactElement;
|
|
11
|
+
parameters: {
|
|
12
|
+
msw: {
|
|
13
|
+
handlers: import("msw").HttpHandler[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
10
17
|
export declare const ErrorSaveWorkspaceViews: () => React.ReactElement;
|
package/src/lib/api/utils.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Credentials } from '@opengeoweb/api';
|
|
2
2
|
import type { WorkspaceLabelsConfigResponse, WorkspacePresetForBE, WorkspacePresetFromBE } from '../../store/workspace/types';
|
|
3
|
-
export declare const getWorkspaceLabelsConfig: () => Promise<WorkspaceLabelsConfigResponse>;
|
|
3
|
+
export declare const getWorkspaceLabelsConfig: (auth: Credentials) => Promise<WorkspaceLabelsConfigResponse>;
|
|
4
4
|
export declare const getWorkspace: (workspaceId: string, auth: Credentials) => Promise<WorkspacePresetFromBE>;
|
|
5
5
|
export declare const deleteWorkspace: (workspaceId: string, auth: Credentials) => Promise<null>;
|
|
6
6
|
export declare const updateWorkspace: (workspaceId: string, data: WorkspacePresetForBE, auth: Credentials) => Promise<null>;
|
|
7
|
+
export declare const saveWorkspacePreset: (workspaceId: string, data: WorkspacePresetForBE, auth?: Credentials) => Promise<void>;
|
|
7
8
|
export declare const createWorkspace: (data: WorkspacePresetForBE, auth: Credentials) => Promise<Headers>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Credentials } from '@opengeoweb/authentication';
|
|
2
|
+
import type { WorkspacePresetForBE } from '../../store/workspace/types';
|
|
3
|
+
export declare const workspaceQueryOptions: {
|
|
4
|
+
readonly saveWorkspacePreset: (id: string, data: WorkspacePresetForBE, credentials?: Credentials) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<void, Error, void, string[]>, "queryFn"> & {
|
|
5
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<void, string[], never> | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
queryKey: string[] & {
|
|
8
|
+
[dataTagSymbol]: void;
|
|
9
|
+
[dataTagErrorSymbol]: Error;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -4,7 +4,7 @@ import type { WorkspaceLabelsConfigResponse, WorkspacePresetLabels } from '../..
|
|
|
4
4
|
type GroupKey = string;
|
|
5
5
|
export declare const VIEW_TYPE_KEY: GroupKey;
|
|
6
6
|
interface PresetLabelsPanelProps {
|
|
7
|
-
labelsConfig
|
|
7
|
+
labelsConfig: WorkspaceLabelsConfigResponse;
|
|
8
8
|
viewComponentType?: WorkspaceSupportedComponentTypes;
|
|
9
9
|
onLabelsChange?: (labels: WorkspacePresetLabels) => void;
|
|
10
10
|
menuLabels?: WorkspacePresetLabels;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WorkspaceSupportedComponentTypes } from '../../store/viewPresets/types';
|
|
3
|
+
import type { WorkspacePresetLabels } from '../../store/workspace/types';
|
|
4
|
+
interface PresetLabelsPanelWrapperProps {
|
|
5
|
+
viewComponentType?: WorkspaceSupportedComponentTypes;
|
|
6
|
+
onLabelsChange?: (labels: WorkspacePresetLabels) => void;
|
|
7
|
+
menuLabels?: WorkspacePresetLabels;
|
|
8
|
+
isMenuFilterMode?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const PresetLabelsPanelWrapper: React.FC<PresetLabelsPanelWrapperProps>;
|
|
11
|
+
export default PresetLabelsPanelWrapper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ViewPresetFormValues, WorkspaceSupportedComponentTypes } from '../../store/viewPresets/types';
|
|
3
3
|
import { PresetAction } from '../../store/viewPresets/types';
|
|
4
|
-
import type { WorkspaceLabelsConfigResponse } from '../../store/workspace/types';
|
|
5
4
|
export declare const SHORT_DESC_LIMIT = 100;
|
|
6
5
|
export interface ViewPresetsFormProps {
|
|
7
6
|
viewComponentType: WorkspaceSupportedComponentTypes;
|
|
@@ -15,7 +14,6 @@ export interface ViewPresetsFormProps {
|
|
|
15
14
|
cancelLabel?: string;
|
|
16
15
|
onClose?: () => void;
|
|
17
16
|
dialogTitle?: string;
|
|
18
|
-
labelsConfig?: WorkspaceLabelsConfigResponse | undefined;
|
|
19
17
|
}
|
|
20
18
|
declare const ViewPresetsForm: React.FC<ViewPresetsFormProps>;
|
|
21
19
|
export default ViewPresetsForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ViewPresetFormValues, WorkspaceSupportedComponentTypes } from '../../store/viewPresets/types';
|
|
3
3
|
import { PresetAction } from '../../store/viewPresets/types';
|
|
4
|
-
import type {
|
|
4
|
+
import type { WorkspacePresetLabels } from '../../store/workspace/types';
|
|
5
5
|
export interface ViewPresetsFormDialogProps {
|
|
6
6
|
isOpen: boolean;
|
|
7
7
|
title: string;
|
|
@@ -9,7 +9,6 @@ export interface ViewPresetsFormDialogProps {
|
|
|
9
9
|
viewPresetId: string;
|
|
10
10
|
viewComponentType: WorkspaceSupportedComponentTypes;
|
|
11
11
|
formValues?: ViewPresetFormValues;
|
|
12
|
-
labelsConfig?: WorkspaceLabelsConfigResponse;
|
|
13
12
|
onSuccess: (action: PresetAction, presetId: string, title: string, description: string, abstract: string, labels: WorkspacePresetLabels) => void;
|
|
14
13
|
onClose: () => void;
|
|
15
14
|
onReset: (viewPresetId: string) => void;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SystemScope } from '@opengeoweb/shared';
|
|
3
|
-
import type { WorkspaceLabelsConfigResponse } from '../../store/workspace/types';
|
|
4
3
|
declare const ViewPresetsFormDialogConnect: React.FC<{
|
|
5
4
|
scope?: SystemScope;
|
|
6
|
-
labelsConfig?: WorkspaceLabelsConfigResponse;
|
|
7
5
|
}>;
|
|
8
6
|
export default ViewPresetsFormDialogConnect;
|
|
@@ -15,5 +15,12 @@ export declare const WorkspaceFetchDetailError: {
|
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
export declare const WorkspaceSave:
|
|
18
|
+
export declare const WorkspaceSave: {
|
|
19
|
+
(): React.ReactElement;
|
|
20
|
+
parameters: {
|
|
21
|
+
msw: {
|
|
22
|
+
handlers: import("msw").HttpHandler[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
19
26
|
export declare const WorkspaceDelete: () => React.ReactElement;
|
|
@@ -7,3 +7,4 @@ export declare const WorkspaceMenuSearchLight: Story;
|
|
|
7
7
|
export declare const WorkspaceMenuSearchDark: Story;
|
|
8
8
|
export declare const WorkspaceMenuSearchWithLabelsLight: Story;
|
|
9
9
|
export declare const WorkspaceMenuSearchWithLabelsDark: Story;
|
|
10
|
+
export declare const WorkspaceMenuSearchWithAlternativeLabels: Story;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SystemScope } from '@opengeoweb/shared';
|
|
3
|
-
import type { WorkspaceLabelsConfigResponse } from '../../store/workspace/types';
|
|
4
3
|
import { WorkspacePresetAction } from '../../store/workspace/types';
|
|
5
4
|
import type { WorkspaceListError, WorkspacePresetFormValues } from '../../store/workspaceList/types';
|
|
6
5
|
export declare const ERROR_DUPLICATE_TITLE_BE = "Preset title already in use, please choose a different title";
|
|
@@ -22,7 +21,6 @@ interface WorkspacePresetsFormProps {
|
|
|
22
21
|
cancelLabel?: string;
|
|
23
22
|
onClose?: () => void;
|
|
24
23
|
dialogTitle?: string;
|
|
25
|
-
labelsConfig?: WorkspaceLabelsConfigResponse | undefined;
|
|
26
24
|
}
|
|
27
25
|
declare const WorkspacePresetsForm: React.FC<WorkspacePresetsFormProps>;
|
|
28
26
|
export default WorkspacePresetsForm;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { WorkspacePresetForBE } from '../../store/workspace/types';
|
|
3
3
|
import { WorkspacePresetAction } from '../../store/workspace/types';
|
|
4
4
|
import type { WorkspaceListError, WorkspacePresetFormValues } from '../../store/workspaceList/types';
|
|
5
5
|
export interface WorkspacePresetsFormDialogProps {
|
|
@@ -12,7 +12,6 @@ export interface WorkspacePresetsFormDialogProps {
|
|
|
12
12
|
isLoading: boolean;
|
|
13
13
|
error?: WorkspaceListError;
|
|
14
14
|
isWorkspaceSaved?: boolean;
|
|
15
|
-
labelsConfig?: WorkspaceLabelsConfigResponse | undefined;
|
|
16
15
|
}
|
|
17
16
|
declare const WorkspacePresetsFormDialogWrapper: React.FC<WorkspacePresetsFormDialogProps>;
|
|
18
17
|
export default WorkspacePresetsFormDialogWrapper;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { WorkspacePresetLabels } from '../../store/workspace/types';
|
|
3
3
|
export interface WorkspaceMenuLabelsPanelProps {
|
|
4
4
|
value?: WorkspacePresetLabels;
|
|
5
5
|
onChange?: (labels: WorkspacePresetLabels) => void;
|
|
6
6
|
menuLabels?: WorkspacePresetLabels;
|
|
7
|
-
labelsConfig: WorkspaceLabelsConfigResponse | undefined;
|
|
8
7
|
}
|
|
9
8
|
declare const WorkspaceMenuLabelsPanel: React.FC<WorkspaceMenuLabelsPanelProps>;
|
|
10
9
|
export default WorkspaceMenuLabelsPanel;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { WorkspacePresetListItem } from '../../store/workspace/types';
|
|
3
3
|
import { WorkspacePresetAction } from '../../store/workspace/types';
|
|
4
|
-
export declare const WORKSPACE_SELECT_LIST_ROW_HEIGHT =
|
|
4
|
+
export declare const WORKSPACE_SELECT_LIST_ROW_HEIGHT = 41;
|
|
5
5
|
export declare const getPresetIcon: (preset: WorkspacePresetListItem, currentUsername?: string) => React.ReactElement | null;
|
|
6
6
|
interface WorkspaceSelectListRowProps {
|
|
7
7
|
workspacePreset: WorkspacePresetListItem;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppStore } from '../types';
|
|
2
2
|
import type { WorkspacePresetForBE } from '../workspace/types';
|
|
3
3
|
export declare const emptyWorkspaceBEData: Omit<WorkspacePresetForBE, 'title'>;
|
|
4
|
-
export declare const workspaceListListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<
|
|
4
|
+
export declare const workspaceListListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<AppStore, import("redux-thunk").ThunkDispatch<AppStore, unknown, import("redux").UnknownAction>, unknown>;
|
|
@@ -3,8 +3,9 @@ interface WorkspaceAppProps {
|
|
|
3
3
|
isSnapshot?: boolean;
|
|
4
4
|
workspaceId?: string;
|
|
5
5
|
shouldShowListOnOpen?: boolean;
|
|
6
|
+
markWorkspaceChanged?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare const WorkspaceApp: ({ isSnapshot, workspaceId, shouldShowListOnOpen, }: WorkspaceAppProps) => React.ReactElement;
|
|
8
|
+
export declare const WorkspaceApp: ({ isSnapshot, workspaceId, shouldShowListOnOpen, markWorkspaceChanged, }: WorkspaceAppProps) => React.ReactElement;
|
|
8
9
|
interface StoryWrapperProps {
|
|
9
10
|
isSnapshot?: boolean;
|
|
10
11
|
createApi?: () => void;
|
|
@@ -12,6 +13,7 @@ interface StoryWrapperProps {
|
|
|
12
13
|
isLoggedIn?: boolean;
|
|
13
14
|
shouldShowListOnOpen?: boolean;
|
|
14
15
|
isAdmin?: boolean;
|
|
16
|
+
hasChanges?: boolean;
|
|
15
17
|
}
|
|
16
|
-
export declare const StoryWrapper: ({ isSnapshot, createApi, workspaceId, isLoggedIn, shouldShowListOnOpen, isAdmin, }: StoryWrapperProps) => React.ReactElement;
|
|
18
|
+
export declare const StoryWrapper: ({ isSnapshot, createApi, workspaceId, isLoggedIn, shouldShowListOnOpen, isAdmin, hasChanges, }: StoryWrapperProps) => React.ReactElement;
|
|
17
19
|
export {};
|
package/src/lib/utils/api.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export interface PresetsApi {
|
|
|
12
12
|
getWorkspacePreset: (workspacePresetId: string) => Promise<{
|
|
13
13
|
data: WorkspacePresetFromBE;
|
|
14
14
|
}>;
|
|
15
|
-
saveWorkspacePreset: (workspacePresetId: string, data: WorkspacePresetForBE) => Promise<void>;
|
|
16
15
|
saveWorkspacePresetAs: (data: WorkspacePresetForBE) => Promise<string>;
|
|
17
16
|
getViewPresets: (params?: FetchViewPresetsListParams) => Promise<{
|
|
18
17
|
data: ViewPresetListItem[];
|