@opengeoweb/workspace 12.0.0 → 12.1.1
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 +471 -242
- package/package.json +28 -44
- package/src/lib/Workspace.stories.d.ts +10 -19
- package/src/lib/WorkspaceAdmin.stories.d.ts +1 -0
- package/src/lib/api/workspace-api/api.d.ts +6 -0
- package/src/lib/api/workspace-api/fakeApi.d.ts +1 -0
- package/src/lib/api/workspace-api/hooks.d.ts +11 -0
- package/src/lib/components/Providers/Providers.d.ts +6 -2
- package/src/lib/components/ViewPresetMenu/ViewPresetMenu.stories.d.ts +6 -21
- package/src/lib/components/ViewPresetMenu/ViewPresetsError.stories.d.ts +1 -0
- package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialog.d.ts +1 -1
- package/src/lib/components/ViewPresetsFormDialog/ViewPresetsFormDialog.stories.d.ts +11 -22
- package/src/lib/components/WorkspaceDetail/WorkspaceDetail.stories.d.ts +1 -0
- package/src/lib/components/WorkspaceDetail/WorkspaceDetailError.stories.d.ts +1 -1
- package/src/lib/components/WorkspaceMenu/WorkspaceMenu.stories.d.ts +7 -13
- package/src/lib/components/WorkspaceMenu/WorkspaceMenuButton.stories.d.ts +7 -23
- package/src/lib/components/WorkspaceOptions/WorkspaceOptions.stories.d.ts +10 -39
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsForm.d.ts +2 -1
- package/src/lib/components/WorkspacePresetsFormDialog/WorkspacePresetsFormDialog.stories.d.ts +22 -72
- package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListError.stories.d.ts +1 -0
- package/src/lib/components/WorkspaceSelectList/WorkspaceSelectListRow.stories.d.ts +8 -19
- package/src/lib/components/WorkspaceTopBar/WorkspaceTopBar.stories.d.ts +11 -53
- package/src/lib/hooks/useFetchWorkspacePresets.d.ts +1 -0
- package/src/lib/store/viewPresets/reducer.d.ts +3 -3
- package/src/lib/store/viewPresets/types.d.ts +3 -3
- package/src/lib/store/workspace/types.d.ts +6 -2
- package/src/lib/store/workspaceList/reducer.d.ts +1 -1
- package/src/lib/store/workspaceList/selectors.d.ts +9 -0
- package/src/lib/store/workspaceList/types.d.ts +5 -2
- package/src/lib/storyUtils/StoryWrapper.d.ts +1 -3
- package/src/lib/storyUtils/componentsLookUp.stories.d.ts +22 -49
- package/src/lib/utils/api.d.ts +0 -1
- package/src/lib/utils/fakeApi.stories.d.ts +1 -0
- package/src/lib/utils/utils.d.ts +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PresetScope } from '@opengeoweb/shared';
|
|
2
|
+
import { PresetScope, 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>;
|
|
@@ -56,15 +56,19 @@ export interface WorkspacePresetFromBE {
|
|
|
56
56
|
viewType?: ViewType;
|
|
57
57
|
mosaicNode: MosaicNode<string>;
|
|
58
58
|
scope?: PresetScope;
|
|
59
|
+
is_shared?: boolean;
|
|
60
|
+
username?: string;
|
|
59
61
|
abstract?: string;
|
|
60
62
|
}
|
|
61
63
|
export interface WorkspacePresetListItem {
|
|
62
64
|
id: string;
|
|
63
65
|
date?: string;
|
|
64
66
|
title: string;
|
|
65
|
-
scope?:
|
|
67
|
+
scope?: SystemScope;
|
|
66
68
|
viewType: ViewType;
|
|
67
69
|
abstract: string;
|
|
70
|
+
username?: string;
|
|
71
|
+
is_shared?: boolean;
|
|
68
72
|
}
|
|
69
73
|
export declare enum WorkspacePresetAction {
|
|
70
74
|
DELETE = "DELETE",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
import { WorkspacePresetListItem } from '../workspace/types';
|
|
3
|
-
import {
|
|
3
|
+
import { ErrorWorkspaceList, FetchedWorkspaceList, FetchWorkspaceList, OnErrorWorkspacePresetActionPayload, OnSuccesWorkspacePresetActionPayload, OpenWorkspaceActionDialogPayload, SearchWorkspaceFilter, SubmitFormWorkspaceActionDialogPayload, ToggleListDialogPayload, ToggleSelectFilterChip, WorkspaceListFilter, WorkspaceListState } from './types';
|
|
4
4
|
export declare const workspaceListFilterOptions: WorkspaceListFilter[];
|
|
5
5
|
export declare const workspaceListAdapter: import("@reduxjs/toolkit").EntityAdapter<WorkspacePresetListItem>;
|
|
6
6
|
export declare const initialState: WorkspaceListState;
|
|
@@ -20,6 +20,11 @@ export declare const getWorkspaceListError: ((state: AppStore) => import("./type
|
|
|
20
20
|
}> & {
|
|
21
21
|
clearCache: () => void;
|
|
22
22
|
};
|
|
23
|
+
export declare const getWorkspaceActionFormValues: ((state: AppStore) => import("./types").WorkspacePresetFormValues) & import("reselect").OutputSelectorFields<(args_0: WorkspaceListState) => import("./types").WorkspacePresetFormValues, {
|
|
24
|
+
clearCache: () => void;
|
|
25
|
+
}> & {
|
|
26
|
+
clearCache: () => void;
|
|
27
|
+
};
|
|
23
28
|
export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => false | {
|
|
24
29
|
formValues: {
|
|
25
30
|
views: {
|
|
@@ -54,6 +59,8 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
54
59
|
viewType?: import("../workspace/types").ViewType | undefined;
|
|
55
60
|
mosaicNode: import("react-mosaic-component").MosaicNode<string>;
|
|
56
61
|
scope?: PresetScope | undefined;
|
|
62
|
+
is_shared?: boolean | undefined;
|
|
63
|
+
username?: string | undefined;
|
|
57
64
|
abstract?: string | undefined;
|
|
58
65
|
};
|
|
59
66
|
action: import("../workspace/types").WorkspacePresetAction;
|
|
@@ -95,6 +102,8 @@ export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => fals
|
|
|
95
102
|
viewType?: import("../workspace/types").ViewType | undefined;
|
|
96
103
|
mosaicNode: import("react-mosaic-component").MosaicNode<string>;
|
|
97
104
|
scope?: PresetScope | undefined;
|
|
105
|
+
is_shared?: boolean | undefined;
|
|
106
|
+
username?: string | undefined;
|
|
98
107
|
abstract?: string | undefined;
|
|
99
108
|
};
|
|
100
109
|
action: import("../workspace/types").WorkspacePresetAction;
|
|
@@ -10,6 +10,11 @@ export declare enum WorkspaceListErrorType {
|
|
|
10
10
|
TRANSLATABLE_ERROR = "TRANSLATABLE_ERROR",
|
|
11
11
|
VERBATIM_ERROR = "VERBATIM_ERROR"
|
|
12
12
|
}
|
|
13
|
+
export declare enum PresetFilterType {
|
|
14
|
+
personal = "personal",
|
|
15
|
+
shared = "shared",
|
|
16
|
+
system = "system"
|
|
17
|
+
}
|
|
13
18
|
export type WorkspaceListError = TranslatableWorkspaceListError | VerbatimWorkspaceListError | undefined;
|
|
14
19
|
export interface TranslatableWorkspaceListError {
|
|
15
20
|
type: WorkspaceListErrorType.TRANSLATABLE_ERROR;
|
|
@@ -25,7 +30,6 @@ export interface VerbatimWorkspaceListError {
|
|
|
25
30
|
export interface WorkspaceListFilter {
|
|
26
31
|
label: string;
|
|
27
32
|
id: string;
|
|
28
|
-
type: 'scope' | 'keyword';
|
|
29
33
|
isSelected?: boolean;
|
|
30
34
|
isDisabled?: boolean;
|
|
31
35
|
}
|
|
@@ -105,7 +109,6 @@ export interface OnDeleteSuccesWorkspacePresetActionPayload {
|
|
|
105
109
|
title: string;
|
|
106
110
|
abstract?: string;
|
|
107
111
|
currentActiveWorkspaceId?: string;
|
|
108
|
-
scope: PresetScope;
|
|
109
112
|
emptyWorkspacePresetTitle: string;
|
|
110
113
|
}
|
|
111
114
|
export type OnSuccesWorkspacePresetActionPayload = OnNonDeleteSuccesWorkspacePresetActionPayload | OnDeleteSuccesWorkspacePresetActionPayload;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Theme } from '@mui/material';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
interface WorkspaceAppProps {
|
|
4
3
|
isSnapshot?: boolean;
|
|
@@ -7,7 +6,6 @@ interface WorkspaceAppProps {
|
|
|
7
6
|
}
|
|
8
7
|
export declare const WorkspaceApp: ({ isSnapshot, workspaceId, shouldShowListOnOpen, }: WorkspaceAppProps) => React.ReactElement;
|
|
9
8
|
interface StoryWrapperProps {
|
|
10
|
-
theme?: Theme;
|
|
11
9
|
isSnapshot?: boolean;
|
|
12
10
|
createApi?: () => void;
|
|
13
11
|
workspaceId?: string;
|
|
@@ -15,5 +13,5 @@ interface StoryWrapperProps {
|
|
|
15
13
|
shouldShowListOnOpen?: boolean;
|
|
16
14
|
isAdmin?: boolean;
|
|
17
15
|
}
|
|
18
|
-
export declare const StoryWrapper: ({
|
|
16
|
+
export declare const StoryWrapper: ({ isSnapshot, createApi, workspaceId, isLoggedIn, shouldShowListOnOpen, isAdmin, }: StoryWrapperProps) => React.ReactElement;
|
|
19
17
|
export {};
|
|
@@ -1,50 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export declare const MultiMap:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export declare const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export declare const
|
|
24
|
-
(): React.ReactElement;
|
|
25
|
-
storyName: string;
|
|
26
|
-
};
|
|
27
|
-
export declare const AirmetModule: {
|
|
28
|
-
(): React.ReactElement;
|
|
29
|
-
storyName: string;
|
|
30
|
-
};
|
|
31
|
-
export declare const ActionsExample: {
|
|
32
|
-
(): React.ReactElement;
|
|
33
|
-
storyName: string;
|
|
34
|
-
};
|
|
35
|
-
export declare const ErrorExample: {
|
|
36
|
-
(): React.ReactElement;
|
|
37
|
-
storyName: string;
|
|
38
|
-
};
|
|
39
|
-
export declare const MapWithTimeslider: {
|
|
40
|
-
(): React.ReactElement;
|
|
41
|
-
storyName: string;
|
|
42
|
-
};
|
|
43
|
-
export declare const WarningList: {
|
|
44
|
-
(): React.ReactElement;
|
|
45
|
-
storyName: string;
|
|
46
|
-
};
|
|
47
|
-
export declare const SpaceweatherModule: {
|
|
48
|
-
(): React.ReactElement;
|
|
49
|
-
storyName: string;
|
|
50
|
-
};
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { WorkspacePreset } from '../store/workspace/types';
|
|
4
|
+
interface ComponentTypeDemoProps {
|
|
5
|
+
screenPreset: WorkspacePreset;
|
|
6
|
+
createApi?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare const ComponentTypeDemo: React.FC<ComponentTypeDemoProps>;
|
|
9
|
+
type Story = StoryObj<typeof ComponentTypeDemo>;
|
|
10
|
+
declare const meta: Meta<typeof ComponentTypeDemo>;
|
|
11
|
+
export default meta;
|
|
12
|
+
export declare const Map: Story;
|
|
13
|
+
export declare const HarmonieTempAndPrecipPreset: Story;
|
|
14
|
+
export declare const ModelRunInterval: Story;
|
|
15
|
+
export declare const MultiMap: Story;
|
|
16
|
+
export declare const TafModule: Story;
|
|
17
|
+
export declare const SigmetModule: Story;
|
|
18
|
+
export declare const AirmetModule: Story;
|
|
19
|
+
export declare const ActionsExample: Story;
|
|
20
|
+
export declare const ErrorExample: Story;
|
|
21
|
+
export declare const MapWithTimeslider: Story;
|
|
22
|
+
export declare const WarningList: Story;
|
|
23
|
+
export declare const SpaceweatherModule: Story;
|
package/src/lib/utils/api.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export interface PresetsApi {
|
|
|
14
14
|
}>;
|
|
15
15
|
saveWorkspacePreset: (workspacePresetId: string, data: WorkspacePresetFromBE) => Promise<void>;
|
|
16
16
|
saveWorkspacePresetAs: (data: WorkspacePresetFromBE) => Promise<string>;
|
|
17
|
-
deleteWorkspacePreset: (workspacePresetId: string) => Promise<void>;
|
|
18
17
|
getViewPresets: (params?: FetchViewPresetsListParams) => Promise<{
|
|
19
18
|
data: ViewPresetListItem[];
|
|
20
19
|
}>;
|
package/src/lib/utils/utils.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { TFunction } from 'i18next';
|
|
2
|
+
import { WorkspaceListFilter } from '../store/workspaceList/types';
|
|
3
|
+
import { WorkspacePresetListItem } from '../store/workspace/types';
|
|
2
4
|
export declare const getCleanSearchQuery: (searchQuery: string) => string;
|
|
3
5
|
export declare const getPresetTitle: (title: string, hasChanges: boolean, isNew: boolean, t: TFunction) => string;
|
|
4
6
|
export declare const setDocumentTitle: (workspaceTitle: string, appTitle?: string) => void;
|
|
7
|
+
export declare const filterWorkspacePresets: (workspacePresets: WorkspacePresetListItem[], selectedFilters: WorkspaceListFilter[], username: string) => WorkspacePresetListItem[];
|