@opengeoweb/workspace 19.1.0 → 19.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/dist/README.md +29 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +12860 -0
- package/dist/src/index.d.ts +23 -0
- package/dist/src/lib/api/types.d.ts +2 -0
- package/dist/src/lib/api/utils.d.ts +10 -0
- package/dist/src/lib/api/viewpreset-api/api.d.ts +9 -0
- package/dist/src/lib/api/viewpreset-api/fakeApi/fakeApi.d.ts +1 -0
- package/dist/src/lib/api/viewpreset-api/fakeApi/mockData.d.ts +84 -0
- package/dist/src/lib/api/viewpreset-api/hooks.d.ts +16 -0
- package/dist/src/lib/api/viewpreset-api/queryOptions.d.ts +42 -0
- package/dist/src/lib/api/workspace-api/api.d.ts +12 -0
- package/dist/src/lib/api/workspace-api/fakeApi/fakeApi.d.ts +1 -0
- package/dist/src/lib/api/workspace-api/fakeApi/mockData.d.ts +13 -0
- package/dist/src/lib/api/workspace-api/hooks.d.ts +14 -0
- package/dist/src/lib/api/workspace-api/queryOptions.d.ts +41 -0
- package/dist/src/lib/components/ComponentsLookUpWrapper/ComponentsLookUpWrapper.d.ts +12 -0
- package/dist/src/lib/components/ComponentsLookUpWrapper/index.d.ts +1 -0
- package/dist/src/lib/components/DefaultComponentsLookUp/DefaultComponentsLookUp.d.ts +17 -0
- package/dist/src/lib/components/DefaultComponentsLookUp/index.d.ts +1 -0
- package/dist/src/lib/components/LabelsPanel/PresetLabelsPanel.d.ts +14 -0
- package/dist/src/lib/components/LabelsPanel/PresetsLabelsPanelWrapper.d.ts +11 -0
- package/dist/src/lib/components/PastePresetDialog/PastePresetDialog.d.ts +8 -0
- package/dist/src/lib/components/PastePresetDialog/index.d.ts +2 -0
- package/dist/src/lib/components/Providers/Providers.d.ts +30 -0
- package/dist/src/lib/components/Providers/index.d.ts +1 -0
- package/dist/src/lib/components/ViewPresetMenu/ViewPresetMenu.d.ts +9 -0
- package/dist/src/lib/components/ViewPresetMenu/ViewPresetMenuListConnect.d.ts +9 -0
- package/dist/src/lib/components/ViewPresetMenu/index.d.ts +1 -0
- package/dist/src/lib/components/ViewPresetsFormDialog/ViewPresetsForm.d.ts +19 -0
- package/dist/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialog.d.ts +20 -0
- package/dist/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialogConnect.d.ts +6 -0
- package/dist/src/lib/components/ViewPresetsFormDialog/index.d.ts +1 -0
- package/dist/src/lib/components/WorkspaceDetail/WorkspaceDetail.d.ts +11 -0
- package/dist/src/lib/components/WorkspaceDetail/index.d.ts +1 -0
- package/dist/src/lib/components/WorkspaceMenu/WorkspaceMenu.d.ts +7 -0
- package/dist/src/lib/components/WorkspaceMenu/WorkspaceMenuButton.d.ts +12 -0
- package/dist/src/lib/components/WorkspaceMenu/WorkspaceMenuButtonConnect.d.ts +8 -0
- package/dist/src/lib/components/WorkspaceMenu/index.d.ts +1 -0
- package/dist/src/lib/components/WorkspaceOptions/WorkspaceOptions.d.ts +19 -0
- package/dist/src/lib/components/WorkspaceOptions/WorkspaceOptionsConnect.d.ts +6 -0
- package/dist/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsForm.d.ts +26 -0
- package/dist/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.d.ts +17 -0
- package/dist/src/lib/components/WorkspaceSelectList/WorkspaceMenuLabelsWrapper.d.ts +9 -0
- package/dist/src/lib/components/WorkspaceSelectList/WorkspacePresetInfo.d.ts +11 -0
- package/dist/src/lib/components/WorkspaceSelectList/WorkspaceSelectList.d.ts +20 -0
- package/dist/src/lib/components/WorkspaceSelectList/WorkspaceSelectListConnect.d.ts +7 -0
- package/dist/src/lib/components/WorkspaceSelectList/WorkspaceSelectListRow.d.ts +21 -0
- package/dist/src/lib/components/WorkspaceTab/WorkspaceTab.d.ts +8 -0
- package/dist/src/lib/components/WorkspaceTab/WorkspaceTabConnect.d.ts +7 -0
- package/dist/src/lib/components/WorkspaceTab/index.d.ts +1 -0
- package/dist/src/lib/components/WorkspaceTopBar/WorkspaceTopBar.d.ts +7 -0
- package/dist/src/lib/components/WorkspaceTopBar/index.d.ts +1 -0
- package/dist/src/lib/components/WorkspaceView/LinkMenu/LinkMenuConnect.d.ts +6 -0
- package/dist/src/lib/components/WorkspaceView/LoadingIndicator/LoadingIndicatorConnect.d.ts +6 -0
- package/dist/src/lib/components/WorkspaceView/SplitButtonsConnect.d.ts +9 -0
- package/dist/src/lib/components/WorkspaceView/WorkspaceControls.d.ts +11 -0
- package/dist/src/lib/components/WorkspaceView/WorkspaceTileConnect.d.ts +12 -0
- package/dist/src/lib/components/WorkspaceView/WorkspaceView.d.ts +16 -0
- package/dist/src/lib/components/WorkspaceView/WorkspaceViewConnect.d.ts +7 -0
- package/dist/src/lib/components/WorkspaceView/helpers.d.ts +5 -0
- package/dist/src/lib/components/WorkspaceView/index.d.ts +2 -0
- package/dist/src/lib/components/WorkspaceViewTitle/WorkspaceViewTitleConnect.d.ts +11 -0
- package/dist/src/lib/hooks/useResetViewPresetFiltersOnRoleChange.d.ts +1 -0
- package/dist/src/lib/hooks/useResetWorkspaceFiltersOnRoleChange.d.ts +5 -0
- package/dist/src/lib/store/index.d.ts +1 -0
- package/dist/src/lib/store/store.d.ts +7 -0
- package/dist/src/lib/store/types.d.ts +15 -0
- package/dist/src/lib/store/viewPresets/index.d.ts +2 -0
- package/dist/src/lib/store/viewPresets/listener.d.ts +5 -0
- package/dist/src/lib/store/viewPresets/reducer.d.ts +39 -0
- package/dist/src/lib/store/viewPresets/selectors.d.ts +671 -0
- package/dist/src/lib/store/viewPresets/types.d.ts +184 -0
- package/dist/src/lib/store/viewPresets/utils.d.ts +5 -0
- package/dist/src/lib/store/workspace/index.d.ts +1 -0
- package/dist/src/lib/store/workspace/listener.d.ts +5 -0
- package/dist/src/lib/store/workspace/reducer.d.ts +22 -0
- package/dist/src/lib/store/workspace/selectors.d.ts +406 -0
- package/dist/src/lib/store/workspace/types.d.ts +210 -0
- package/dist/src/lib/store/workspace/utils.d.ts +24 -0
- package/dist/src/lib/store/workspaceList/index.d.ts +2 -0
- package/dist/src/lib/store/workspaceList/listener.d.ts +4 -0
- package/dist/src/lib/store/workspaceList/reducer.d.ts +46 -0
- package/dist/src/lib/store/workspaceList/selectors.d.ts +195 -0
- package/dist/src/lib/store/workspaceList/types.d.ts +127 -0
- package/dist/src/lib/store/workspaceList/utils.d.ts +13 -0
- package/dist/src/lib/storyUtils/ActionsExampleComponent.d.ts +6 -0
- package/dist/src/lib/storyUtils/StoryWrapper.d.ts +18 -0
- package/dist/src/lib/storyUtils/componentsLookUp.d.ts +8 -0
- package/dist/src/lib/storyUtils/useFirstTimeError.d.ts +4 -0
- package/dist/src/lib/utils/clipboardUtils.d.ts +23 -0
- package/dist/src/lib/utils/i18n.d.ts +7 -0
- package/dist/src/lib/utils/labels.config.d.ts +3 -0
- package/dist/src/lib/utils/routes.d.ts +8 -0
- package/dist/src/lib/utils/utils.d.ts +9 -0
- package/package.json +2 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import workspaceTranslations from '../locales/workspace.json';
|
|
2
|
+
import { workspaceListener } from './lib/store/workspace/listener';
|
|
3
|
+
export { workspaceListener };
|
|
4
|
+
export { workspaceListListener } from './lib/store/workspaceList/listener';
|
|
5
|
+
export { viewPresetsListener } from './lib/store/viewPresets/listener';
|
|
6
|
+
export { workspaceActions, workspaceReducer, } from './lib/store/workspace/reducer';
|
|
7
|
+
export { workspaceListActions, workspaceListReducer, } from './lib/store/workspaceList/reducer';
|
|
8
|
+
export { viewPresetActions, viewPresetsReducer, defaultViewPresetsFilters, } from './lib/store/viewPresets';
|
|
9
|
+
export * as selectors from './lib/store/workspace/selectors';
|
|
10
|
+
export * from './lib/store/workspace/types';
|
|
11
|
+
export * from './lib/store/viewPresets/types';
|
|
12
|
+
export * from './lib/components/Providers';
|
|
13
|
+
export * from './lib/components/ComponentsLookUpWrapper';
|
|
14
|
+
export * from './lib/components/WorkspaceView';
|
|
15
|
+
export * from './lib/components/WorkspaceTopBar';
|
|
16
|
+
export * from './lib/components/WorkspaceDetail';
|
|
17
|
+
export { WORKSPACE_NAMESPACE } from './lib/utils/i18n';
|
|
18
|
+
export { workspaceTranslations };
|
|
19
|
+
export { routes as workspaceRoutes, getWorkspaceRouteUrl, } from './lib/utils/routes';
|
|
20
|
+
export { getEmptyMapWorkspace, createCustomEmptyMapWorkspace, } from './lib/store/workspaceList/utils';
|
|
21
|
+
export type { WorkspaceModuleStore } from './lib/store/types';
|
|
22
|
+
export { workspaceReducersMap, workspaceMiddlewares } from './lib/store';
|
|
23
|
+
export * from './lib/api/workspace-api/fakeApi/fakeApi';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { UseMutationResult } from '@tanstack/react-query';
|
|
2
|
+
import type { WorkspacePresetFromBE, WorkspacePresetListItem } from '../store/workspace/types';
|
|
3
|
+
import type { FetchWorkspaceParams } from '../store/workspaceList/types';
|
|
4
|
+
export type MutationReturnType<T> = UseMutationResult<Headers | null, Error, T>;
|
|
5
|
+
export declare const LIB_KEY = "workspace-lib";
|
|
6
|
+
export declare const getPresetBaseUrl: () => string;
|
|
7
|
+
export declare const getIdFromUrl: (url: string) => string;
|
|
8
|
+
export declare const hasNoPresetBackend: () => boolean;
|
|
9
|
+
export declare const extractWorkspacePresetFromJSON: (workspacePresetId: string) => WorkspacePresetFromBE;
|
|
10
|
+
export declare const filterWorkspacePresetList: (params?: FetchWorkspaceParams) => WorkspacePresetListItem[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Credentials } from '@opengeoweb/api';
|
|
2
|
+
import type { ViewPreset } from '../../store/viewPresets/types';
|
|
3
|
+
import type { ViewPresetListItem } from '../../store/workspace/types';
|
|
4
|
+
export declare const getViewPreset: (viewpresetId?: string, auth?: Credentials) => Promise<ViewPreset>;
|
|
5
|
+
export declare const getViewPresets: (auth?: Credentials) => Promise<ViewPresetListItem[]>;
|
|
6
|
+
export declare const updateViewPreset: (viewpresetId: string, data: ViewPreset, auth?: Credentials) => Promise<null>;
|
|
7
|
+
export declare const saveViewPreset: (viewPresetId: string, data: ViewPreset, auth?: Credentials) => Promise<void>;
|
|
8
|
+
export declare const saveViewPresetAs: (data: ViewPreset, auth?: Credentials) => Promise<string>;
|
|
9
|
+
export declare const deleteViewPreset: (viewPresetId: string, auth: Credentials) => Promise<Headers | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const viewPresetsEndpoints: import("msw").HttpHandler[];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export declare const viewPresetMockData: {
|
|
2
|
+
title: string;
|
|
3
|
+
id: string;
|
|
4
|
+
componentType: string;
|
|
5
|
+
scope: string;
|
|
6
|
+
initialProps: {
|
|
7
|
+
mapPreset: {
|
|
8
|
+
layers: {
|
|
9
|
+
service: string;
|
|
10
|
+
name: string;
|
|
11
|
+
id: string;
|
|
12
|
+
layerType: string;
|
|
13
|
+
}[];
|
|
14
|
+
proj: {
|
|
15
|
+
bbox: {
|
|
16
|
+
left: number;
|
|
17
|
+
bottom: number;
|
|
18
|
+
right: number;
|
|
19
|
+
top: number;
|
|
20
|
+
};
|
|
21
|
+
srs: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
labels: {
|
|
25
|
+
purpose: string[];
|
|
26
|
+
};
|
|
27
|
+
syncGroupsIds: string[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const viewPresetList: ({
|
|
31
|
+
title: string;
|
|
32
|
+
abstract: string;
|
|
33
|
+
id: string;
|
|
34
|
+
date: string;
|
|
35
|
+
scope: string;
|
|
36
|
+
username?: undefined;
|
|
37
|
+
labels?: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
title: string;
|
|
40
|
+
id: string;
|
|
41
|
+
date: string;
|
|
42
|
+
scope: string;
|
|
43
|
+
username: string;
|
|
44
|
+
abstract?: undefined;
|
|
45
|
+
labels?: undefined;
|
|
46
|
+
} | {
|
|
47
|
+
title: string;
|
|
48
|
+
id: string;
|
|
49
|
+
date: string;
|
|
50
|
+
scope: string;
|
|
51
|
+
username: string;
|
|
52
|
+
labels: {
|
|
53
|
+
purpose: string[];
|
|
54
|
+
parameters: never[];
|
|
55
|
+
phenomena: never[];
|
|
56
|
+
dataType: never[];
|
|
57
|
+
dataSource: never[];
|
|
58
|
+
viewType: never[];
|
|
59
|
+
};
|
|
60
|
+
abstract?: undefined;
|
|
61
|
+
} | {
|
|
62
|
+
id: string;
|
|
63
|
+
title: string;
|
|
64
|
+
date: string;
|
|
65
|
+
scope: string;
|
|
66
|
+
abstract?: undefined;
|
|
67
|
+
username?: undefined;
|
|
68
|
+
labels?: undefined;
|
|
69
|
+
} | {
|
|
70
|
+
title: string;
|
|
71
|
+
id: string;
|
|
72
|
+
date: string;
|
|
73
|
+
scope: string;
|
|
74
|
+
labels: {
|
|
75
|
+
purpose: string[];
|
|
76
|
+
parameters: never[];
|
|
77
|
+
phenomena: never[];
|
|
78
|
+
dataType: never[];
|
|
79
|
+
dataSource: never[];
|
|
80
|
+
viewType: never[];
|
|
81
|
+
};
|
|
82
|
+
abstract?: undefined;
|
|
83
|
+
username?: undefined;
|
|
84
|
+
})[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { ViewPreset } from '../../store/viewPresets/types';
|
|
3
|
+
import type { ViewPresetListItem } from '../../store/workspace/types';
|
|
4
|
+
import type { MutationReturnType } from '../types';
|
|
5
|
+
export declare const useDeleteViewPreset: () => MutationReturnType<Headers | null, {
|
|
6
|
+
id: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const useSaveViewPreset: () => MutationReturnType<void, {
|
|
9
|
+
id: string;
|
|
10
|
+
data: ViewPreset;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const useSaveViewPresetAs: () => MutationReturnType<string, {
|
|
13
|
+
data: ViewPreset;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const useViewPreset: (id?: string) => UseQueryResult<ViewPreset>;
|
|
16
|
+
export declare const useViewPresets: () => UseQueryResult<ViewPresetListItem[]>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Credentials } from '@opengeoweb/authentication';
|
|
2
|
+
import type { ViewPreset } from '../../store/viewPresets/types';
|
|
3
|
+
import type { ViewPresetListItem } from '../../store/workspace/types';
|
|
4
|
+
export declare const viewpresetQueryOptions: {
|
|
5
|
+
readonly keys: {
|
|
6
|
+
readonly all: () => string[];
|
|
7
|
+
readonly views: () => string[];
|
|
8
|
+
readonly lists: () => string[];
|
|
9
|
+
};
|
|
10
|
+
readonly getViewPreset: (id?: string, credentials?: Credentials) => import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<ViewPreset, Error, ViewPreset, (string | undefined)[]>, "queryFn"> & {
|
|
11
|
+
queryFn?: import("@tanstack/query-core").QueryFunction<ViewPreset, (string | undefined)[], never> | undefined;
|
|
12
|
+
} & {
|
|
13
|
+
queryKey: (string | undefined)[] & {
|
|
14
|
+
[dataTagSymbol]: ViewPreset;
|
|
15
|
+
[dataTagErrorSymbol]: Error;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly getViewPresets: (credentials?: Credentials) => import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<ViewPresetListItem[], Error, ViewPresetListItem[], string[]>, "queryFn"> & {
|
|
19
|
+
queryFn?: import("@tanstack/query-core").QueryFunction<ViewPresetListItem[], string[], never> | undefined;
|
|
20
|
+
} & {
|
|
21
|
+
queryKey: string[] & {
|
|
22
|
+
[dataTagSymbol]: ViewPresetListItem[];
|
|
23
|
+
[dataTagErrorSymbol]: Error;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
readonly saveViewPreset: (id: string, data: ViewPreset, credentials?: Credentials) => import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<void, Error, void, string[]>, "queryFn"> & {
|
|
27
|
+
queryFn?: import("@tanstack/query-core").QueryFunction<void, string[], never> | undefined;
|
|
28
|
+
} & {
|
|
29
|
+
queryKey: string[] & {
|
|
30
|
+
[dataTagSymbol]: void;
|
|
31
|
+
[dataTagErrorSymbol]: Error;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly saveViewPresetAs: (data: ViewPreset, credentials?: Credentials) => import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, string[]>, "queryFn"> & {
|
|
35
|
+
queryFn?: import("@tanstack/query-core").QueryFunction<string, string[], never> | undefined;
|
|
36
|
+
} & {
|
|
37
|
+
queryKey: string[] & {
|
|
38
|
+
[dataTagSymbol]: string;
|
|
39
|
+
[dataTagErrorSymbol]: Error;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Credentials } from '@opengeoweb/api';
|
|
2
|
+
import type { WorkspaceLabelsConfigResponse, WorkspacePresetForBE, WorkspacePresetFromBE, WorkspacePresetListItem } from '../../store/workspace/types';
|
|
3
|
+
import type { FetchWorkspaceParams } from '../../store/workspaceList/types';
|
|
4
|
+
export declare const getWorkspaceLabelsConfig: (auth: Credentials) => Promise<WorkspaceLabelsConfigResponse>;
|
|
5
|
+
export declare const getWorkspacePreset: (workspaceId: string, auth?: Credentials) => Promise<WorkspacePresetFromBE>;
|
|
6
|
+
export declare const getWorkspacePresets: (auth?: Credentials, params?: FetchWorkspaceParams) => Promise<WorkspacePresetListItem[]>;
|
|
7
|
+
export declare const getWorkspace: (workspaceId: string, auth: Credentials) => Promise<WorkspacePresetFromBE>;
|
|
8
|
+
export declare const deleteWorkspace: (workspaceId: string, auth: Credentials) => Promise<null>;
|
|
9
|
+
export declare const updateWorkspace: (workspaceId: string, data: WorkspacePresetForBE, auth: Credentials) => Promise<null>;
|
|
10
|
+
export declare const saveWorkspacePreset: (workspaceId: string, data: WorkspacePresetForBE, auth?: Credentials) => Promise<void>;
|
|
11
|
+
export declare const createWorkspace: (data: WorkspacePresetForBE, auth: Credentials) => Promise<Headers>;
|
|
12
|
+
export declare const saveWorkspacePresetAs: (data: WorkspacePresetForBE, auth?: Credentials) => Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const workspaceEndpoints: import("msw").HttpHandler[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const ERROR_NOT_FOUND = "Request failed with status code 400";
|
|
2
|
+
export declare const customRadarWorkspacePreset: {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
scope: string;
|
|
6
|
+
viewType: string;
|
|
7
|
+
views: {
|
|
8
|
+
mosaicNodeId: string;
|
|
9
|
+
viewPresetId: string;
|
|
10
|
+
}[];
|
|
11
|
+
syncGroups: never[];
|
|
12
|
+
mosaicNode: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { UseMutationResult, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { WorkspaceLabelsConfigResponse, WorkspacePresetForBE, WorkspacePresetListItem } from '../../store/workspace/types';
|
|
3
|
+
import { WorkspacePresetAction } from '../../store/workspace/types';
|
|
4
|
+
export declare const useWorkspaceLabelsConfig: () => UseQueryResult<WorkspaceLabelsConfigResponse>;
|
|
5
|
+
export declare const useWorkspacePresets: () => UseQueryResult<WorkspacePresetListItem[]>;
|
|
6
|
+
type MutationReturnType<T> = UseMutationResult<Headers | null, Error, T>;
|
|
7
|
+
export declare const useDeleteWorkspacePreset: () => MutationReturnType<{
|
|
8
|
+
id: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const useCreateWorkspacePreset: () => MutationReturnType<{
|
|
11
|
+
data: WorkspacePresetForBE;
|
|
12
|
+
action?: WorkspacePresetAction.DUPLICATE;
|
|
13
|
+
}>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Credentials } from '@opengeoweb/authentication';
|
|
2
|
+
import type { WorkspacePresetForBE, WorkspacePresetFromBE, WorkspacePresetListItem } from '../../store/workspace/types';
|
|
3
|
+
export declare const workspaceQueryOptions: {
|
|
4
|
+
readonly keys: {
|
|
5
|
+
readonly all: () => string[];
|
|
6
|
+
readonly workspaces: () => string[];
|
|
7
|
+
readonly lists: () => string[];
|
|
8
|
+
};
|
|
9
|
+
readonly getWorkspacePreset: (id: string, credentials?: Credentials) => import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<WorkspacePresetFromBE, Error, WorkspacePresetFromBE, string[]>, "queryFn"> & {
|
|
10
|
+
queryFn?: import("@tanstack/query-core").QueryFunction<WorkspacePresetFromBE, string[], never> | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
queryKey: string[] & {
|
|
13
|
+
[dataTagSymbol]: WorkspacePresetFromBE;
|
|
14
|
+
[dataTagErrorSymbol]: Error;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
readonly getWorkspacePresets: (credentials?: Credentials) => import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<WorkspacePresetListItem[], Error, WorkspacePresetListItem[], string[]>, "queryFn"> & {
|
|
18
|
+
queryFn?: import("@tanstack/query-core").QueryFunction<WorkspacePresetListItem[], string[], never> | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
queryKey: string[] & {
|
|
21
|
+
[dataTagSymbol]: WorkspacePresetListItem[];
|
|
22
|
+
[dataTagErrorSymbol]: Error;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly saveWorkspacePreset: (id: string, data: WorkspacePresetForBE, credentials?: Credentials) => import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<void, Error, void, string[]>, "queryFn"> & {
|
|
26
|
+
queryFn?: import("@tanstack/query-core").QueryFunction<void, string[], never> | undefined;
|
|
27
|
+
} & {
|
|
28
|
+
queryKey: string[] & {
|
|
29
|
+
[dataTagSymbol]: void;
|
|
30
|
+
[dataTagErrorSymbol]: Error;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly saveWorkspacePresetAs: (data: WorkspacePresetForBE, credentials?: Credentials) => import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, string[]>, "queryFn"> & {
|
|
34
|
+
queryFn?: import("@tanstack/query-core").QueryFunction<string, string[], never> | undefined;
|
|
35
|
+
} & {
|
|
36
|
+
queryKey: string[] & {
|
|
37
|
+
[dataTagSymbol]: string;
|
|
38
|
+
[dataTagErrorSymbol]: Error;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WorkspaceComponentLookupPayload } from '../../store/workspace/types';
|
|
3
|
+
interface ModuleMethods {
|
|
4
|
+
onPreventCloseView?: (shouldPreventClose: boolean) => void;
|
|
5
|
+
}
|
|
6
|
+
interface ComponentsLookUpWrapperProps {
|
|
7
|
+
component: React.FC<ModuleMethods> | React.FC;
|
|
8
|
+
payload: WorkspaceComponentLookupPayload;
|
|
9
|
+
[otherProps: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare const ComponentsLookUpWrapper: React.FC<ComponentsLookUpWrapperProps>;
|
|
12
|
+
export default ComponentsLookUpWrapper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComponentsLookUpWrapper } from './ComponentsLookUpWrapper';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WorkspaceViewPresetComponentsLookupType } from '../../store/workspace/types';
|
|
3
|
+
export interface WorkspaceComponentsLookUpPayload {
|
|
4
|
+
componentType: string | WorkspaceViewPresetComponentsLookupType;
|
|
5
|
+
viewPresetId: string;
|
|
6
|
+
mosaicNodeId: string;
|
|
7
|
+
}
|
|
8
|
+
interface WorkspaceComponentsLookUpComponent {
|
|
9
|
+
viewPresetId: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const ViewLoading: React.FC<WorkspaceComponentsLookUpComponent>;
|
|
12
|
+
interface WorkspaceComponentsLookUpComponentError extends WorkspaceComponentsLookUpComponent {
|
|
13
|
+
mosaicNodeId: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const ViewError: React.FC<WorkspaceComponentsLookUpComponentError>;
|
|
16
|
+
export declare const defaultComponentsLookUp: ({ componentType, viewPresetId, mosaicNodeId, }: WorkspaceComponentsLookUpPayload) => React.ReactElement;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DefaultComponentsLookUp';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WorkspaceSupportedComponentTypes } from '../../store/viewPresets/types';
|
|
3
|
+
import type { WorkspaceLabelsConfigResponse, WorkspacePresetLabels } from '../../store/workspace/types';
|
|
4
|
+
type GroupKey = string;
|
|
5
|
+
export declare const VIEW_TYPE_KEY: GroupKey;
|
|
6
|
+
interface PresetLabelsPanelProps {
|
|
7
|
+
labelsConfig: WorkspaceLabelsConfigResponse;
|
|
8
|
+
viewComponentType?: WorkspaceSupportedComponentTypes;
|
|
9
|
+
onLabelsChange?: (labels: WorkspacePresetLabels) => void;
|
|
10
|
+
menuLabels?: WorkspacePresetLabels;
|
|
11
|
+
isMenuFilterMode?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const PresetLabelsPanel: React.FC<PresetLabelsPanelProps>;
|
|
14
|
+
export default PresetLabelsPanel;
|
|
@@ -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,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface PastePresetDialogProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
mode: 'workspace' | 'viewpreset';
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onConfirm: (jsonString: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const PastePresetDialog: React.FC<PastePresetDialogProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Store } from '@reduxjs/toolkit';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { AuthenticationDefaultStateProps } from '@opengeoweb/authentication';
|
|
4
|
+
import type { ThemeProviderProps } from '@opengeoweb/theme';
|
|
5
|
+
export declare const WorkspaceThemeProvider: React.FC<ThemeProviderProps>;
|
|
6
|
+
export declare const DemoWrapper: React.FC<ThemeProviderProps>;
|
|
7
|
+
interface WorkspaceStoreWrapperProps {
|
|
8
|
+
store?: Store;
|
|
9
|
+
auth?: AuthenticationDefaultStateProps;
|
|
10
|
+
}
|
|
11
|
+
export declare const defaultAuthConfig: {
|
|
12
|
+
isLoggedIn: boolean;
|
|
13
|
+
auth: {
|
|
14
|
+
username: string;
|
|
15
|
+
token: string;
|
|
16
|
+
refresh_token: string;
|
|
17
|
+
};
|
|
18
|
+
onLogin: () => void;
|
|
19
|
+
onSetAuth: () => void;
|
|
20
|
+
sessionStorageProvider: never;
|
|
21
|
+
};
|
|
22
|
+
export declare const WorkspaceStoreWrapper: React.FC<WorkspaceStoreWrapperProps & {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const WorkspaceWrapperProviderWithStore: React.FC<WorkspaceStoreWrapperProps & ThemeProviderProps>;
|
|
26
|
+
interface WorkspaceTranslationsWrapperProps {
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export declare const WorkspaceI18nProvider: React.FC<WorkspaceTranslationsWrapperProps>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Providers';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const DIALOG_TITLE = "View presets menu";
|
|
3
|
+
export interface ViewPresetMenuProps {
|
|
4
|
+
panelId: string;
|
|
5
|
+
closeMenu?: () => void;
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
initialIsLabelFilterOpen?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const ViewPresetMenu: React.FC<ViewPresetMenuProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ViewPresetMenuListConnectProps {
|
|
3
|
+
panelId: string;
|
|
4
|
+
isLabelFilterOpen?: boolean;
|
|
5
|
+
onToggleLabelFilter?: () => void;
|
|
6
|
+
hasSpaceForLabelFilter?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const ViewPresetMenuListConnect: React.FC<ViewPresetMenuListConnectProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ViewPresetMenu } from './ViewPresetMenu';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewPresetFormValues, WorkspaceSupportedComponentTypes } from '../../store/viewPresets/types';
|
|
3
|
+
import { PresetAction } from '../../store/viewPresets/types';
|
|
4
|
+
export declare const SHORT_DESC_LIMIT = 100;
|
|
5
|
+
export interface ViewPresetsFormProps {
|
|
6
|
+
viewComponentType: WorkspaceSupportedComponentTypes;
|
|
7
|
+
error?: string;
|
|
8
|
+
onSubmit?: () => void;
|
|
9
|
+
action: PresetAction;
|
|
10
|
+
formValues: ViewPresetFormValues;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
showInlineActions?: boolean;
|
|
13
|
+
confirmLabel?: string;
|
|
14
|
+
cancelLabel?: string;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
dialogTitle?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const ViewPresetsForm: React.FC<ViewPresetsFormProps>;
|
|
19
|
+
export default ViewPresetsForm;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewPresetFormValues, WorkspaceSupportedComponentTypes } from '../../store/viewPresets/types';
|
|
3
|
+
import { PresetAction } from '../../store/viewPresets/types';
|
|
4
|
+
import type { WorkspacePresetLabels } from '../../store/workspace/types';
|
|
5
|
+
export interface ViewPresetsFormDialogProps {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
title: string;
|
|
8
|
+
action: PresetAction;
|
|
9
|
+
viewPresetId: string;
|
|
10
|
+
viewComponentType: WorkspaceSupportedComponentTypes;
|
|
11
|
+
formValues?: ViewPresetFormValues;
|
|
12
|
+
onSuccess: (action: PresetAction, presetId: string, title: string, description: string, abstract: string, labels: WorkspacePresetLabels) => void;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
onReset: (viewPresetId: string) => void;
|
|
15
|
+
onDelete: (variables: {
|
|
16
|
+
id: string;
|
|
17
|
+
}) => Promise<Headers | null>;
|
|
18
|
+
}
|
|
19
|
+
declare const ViewPresetsFormDialogWrapper: React.FC<ViewPresetsFormDialogProps>;
|
|
20
|
+
export default ViewPresetsFormDialogWrapper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ViewPresetsFormDialog } from './ViewPresetsFormDialog';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WorkspaceLookupFunctionType } from '../../store/workspace/types';
|
|
3
|
+
export interface WorkspaceTopBarProps {
|
|
4
|
+
initialWorkspaceId?: string;
|
|
5
|
+
workspaceId?: string;
|
|
6
|
+
componentsLookUp: WorkspaceLookupFunctionType;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
isSnapshot?: boolean;
|
|
9
|
+
openWorkspaceMenuOnStartup?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const WorkspaceDetail: React.FC<WorkspaceTopBarProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './WorkspaceDetail';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface WorkspaceMenuButtonProps {
|
|
3
|
+
title: string;
|
|
4
|
+
activeTab?: boolean;
|
|
5
|
+
hasChanges?: boolean;
|
|
6
|
+
id?: string;
|
|
7
|
+
showMenu?: boolean;
|
|
8
|
+
onToggleDialog?: (open: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const workspacePresetOptionId = "workspaceMenuButton";
|
|
11
|
+
export declare const viewPresetOptionId = "viewpreset-options-toolbutton";
|
|
12
|
+
export declare const WorkspaceMenuButton: React.FC<WorkspaceMenuButtonProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WorkspaceMenu } from './WorkspaceMenu';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface WorkspaceOptionsProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
handleSave?: () => void;
|
|
5
|
+
handleSaveAs?: () => void;
|
|
6
|
+
handleEdit?: () => void;
|
|
7
|
+
handleEditTitle?: () => void;
|
|
8
|
+
handleDelete?: () => void;
|
|
9
|
+
handleReset?: () => void;
|
|
10
|
+
handleCopyToClipboard?: () => void;
|
|
11
|
+
handlePasteFromClipboard?: () => void;
|
|
12
|
+
copyToClipboardLabel?: string;
|
|
13
|
+
pasteFromClipboardLabel?: string;
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
isDefaultOpen?: boolean;
|
|
16
|
+
showEditTitleOption?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const workspaceOptionsButtonId = "workspace-options-toolbutton";
|
|
19
|
+
export declare const WorkspaceOptions: React.FC<WorkspaceOptionsProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SystemScope } from '@opengeoweb/shared';
|
|
3
|
+
import { WorkspacePresetAction } from '../../store/workspace/types';
|
|
4
|
+
import type { WorkspaceListError, WorkspacePresetFormValues } from '../../store/workspaceList/types';
|
|
5
|
+
export declare const ERROR_DUPLICATE_TITLE_BE = "Preset title already in use, please choose a different title";
|
|
6
|
+
export declare const ERROR_LONG_TITLE_BE = "Preset title cannot exceed 100 characters";
|
|
7
|
+
export declare const emptyWorkspacePreset: {
|
|
8
|
+
scope: SystemScope;
|
|
9
|
+
title: string;
|
|
10
|
+
abstract: string;
|
|
11
|
+
};
|
|
12
|
+
interface WorkspacePresetsFormProps {
|
|
13
|
+
error?: WorkspaceListError;
|
|
14
|
+
onSubmit?: () => void;
|
|
15
|
+
action: WorkspacePresetAction;
|
|
16
|
+
formValues: WorkspacePresetFormValues;
|
|
17
|
+
isLoading?: boolean;
|
|
18
|
+
hasSavedWorkspace?: boolean;
|
|
19
|
+
showInlineActions?: boolean;
|
|
20
|
+
confirmLabel?: string;
|
|
21
|
+
cancelLabel?: string;
|
|
22
|
+
onClose?: () => void;
|
|
23
|
+
dialogTitle?: string;
|
|
24
|
+
}
|
|
25
|
+
declare const WorkspacePresetsForm: React.FC<WorkspacePresetsFormProps>;
|
|
26
|
+
export default WorkspacePresetsForm;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WorkspacePresetForBE } from '../../store/workspace/types';
|
|
3
|
+
import { WorkspacePresetAction } from '../../store/workspace/types';
|
|
4
|
+
import type { WorkspaceListError, WorkspacePresetFormValues } from '../../store/workspaceList/types';
|
|
5
|
+
export interface WorkspacePresetsFormDialogProps {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
action: WorkspacePresetAction;
|
|
8
|
+
presetId: string;
|
|
9
|
+
formValues: WorkspacePresetFormValues;
|
|
10
|
+
onFormSubmit: (action: WorkspacePresetAction, presetId: string, data: WorkspacePresetForBE) => void;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
error?: WorkspaceListError;
|
|
14
|
+
isWorkspaceSaved?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const WorkspacePresetsFormDialogWrapper: React.FC<WorkspacePresetsFormDialogProps>;
|
|
17
|
+
export default WorkspacePresetsFormDialogWrapper;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WorkspacePresetLabels } from '../../store/workspace/types';
|
|
3
|
+
export interface WorkspaceMenuLabelsPanelProps {
|
|
4
|
+
value?: WorkspacePresetLabels;
|
|
5
|
+
onChange?: (labels: WorkspacePresetLabels) => void;
|
|
6
|
+
menuLabels?: WorkspacePresetLabels;
|
|
7
|
+
}
|
|
8
|
+
declare const WorkspaceMenuLabelsPanel: React.FC<WorkspaceMenuLabelsPanelProps>;
|
|
9
|
+
export default WorkspaceMenuLabelsPanel;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewPresetListItem, WorkspacePresetListItem } from '../../store/workspace/types';
|
|
3
|
+
interface WorkspacePresetInfoProps {
|
|
4
|
+
preset?: WorkspacePresetListItem | ViewPresetListItem;
|
|
5
|
+
anchorEl: HTMLElement | null;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
disablePortal?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const WorkspacePresetInfo: React.FC<WorkspacePresetInfoProps>;
|
|
11
|
+
export default WorkspacePresetInfo;
|