@opengeoweb/workspace 19.0.0 → 19.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/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,210 @@
|
|
|
1
|
+
import type { MosaicNode } from 'react-mosaic-component';
|
|
2
|
+
import type { InitialProps } from '@opengeoweb/core';
|
|
3
|
+
import type { SystemScope } from '@opengeoweb/shared';
|
|
4
|
+
import type { syncGroupsTypes } from '@opengeoweb/store';
|
|
5
|
+
export type WorkspaceViewPresetComponentsLookupType = 'ViewError' | 'ViewLoading';
|
|
6
|
+
export interface WorkspaceViewType {
|
|
7
|
+
id?: string;
|
|
8
|
+
mosaicNodeId?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
abstract?: string;
|
|
12
|
+
componentType: string;
|
|
13
|
+
initialProps?: InitialProps;
|
|
14
|
+
activeLayerId?: string;
|
|
15
|
+
shouldPreventClose?: boolean;
|
|
16
|
+
scope?: SystemScope;
|
|
17
|
+
keywords?: string;
|
|
18
|
+
labels?: WorkspaceLabelsConfigResponse;
|
|
19
|
+
username?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface WorkspaceViews {
|
|
22
|
+
byId: Record<string, WorkspaceViewType>;
|
|
23
|
+
allIds: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface WorkspaceViewsFromBE {
|
|
26
|
+
mosaicNodeId: string;
|
|
27
|
+
viewPresetId?: string;
|
|
28
|
+
componentType?: string;
|
|
29
|
+
initialProps?: InitialProps;
|
|
30
|
+
title?: string;
|
|
31
|
+
originalViewPresetId?: string;
|
|
32
|
+
}
|
|
33
|
+
export type ViewType = 'singleWindow' | 'multiWindow' | 'tiledWindow';
|
|
34
|
+
export interface WorkspaceSyncGroup {
|
|
35
|
+
id: string;
|
|
36
|
+
type: syncGroupsTypes.SyncType;
|
|
37
|
+
title?: string;
|
|
38
|
+
sourcePanelId?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface WorkspacePreset {
|
|
41
|
+
id?: string;
|
|
42
|
+
title: string;
|
|
43
|
+
syncGroups?: WorkspaceSyncGroup[];
|
|
44
|
+
isTimeScrollingEnabled?: boolean;
|
|
45
|
+
views: WorkspaceViews;
|
|
46
|
+
viewType?: ViewType;
|
|
47
|
+
mosaicNode: MosaicNode<string>;
|
|
48
|
+
minimumPaneSizePercentage?: number;
|
|
49
|
+
scope?: SystemScope;
|
|
50
|
+
abstract?: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
linking?: Record<string, string[]>;
|
|
53
|
+
username?: string;
|
|
54
|
+
labels?: WorkspacePresetLabels;
|
|
55
|
+
updated?: string;
|
|
56
|
+
updatedBy?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface WorkspaceState extends WorkspacePreset {
|
|
59
|
+
isLoading?: boolean;
|
|
60
|
+
error?: WorkspaceError;
|
|
61
|
+
hasChanges?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface WorkspacePresetLabels {
|
|
64
|
+
[groupKey: string]: string[] | undefined;
|
|
65
|
+
purpose?: string[];
|
|
66
|
+
parameters?: string[];
|
|
67
|
+
phenomena?: string[];
|
|
68
|
+
dataType?: string[];
|
|
69
|
+
dataSource?: string[];
|
|
70
|
+
viewType?: string[];
|
|
71
|
+
}
|
|
72
|
+
export interface WorkspacePresetForBE {
|
|
73
|
+
id?: string;
|
|
74
|
+
title: string;
|
|
75
|
+
syncGroups?: WorkspaceSyncGroup[];
|
|
76
|
+
linking?: Record<string, string[]>;
|
|
77
|
+
views: WorkspaceViewsFromBE[];
|
|
78
|
+
viewType?: ViewType;
|
|
79
|
+
mosaicNode: MosaicNode<string>;
|
|
80
|
+
scope?: SystemScope;
|
|
81
|
+
is_shared?: boolean;
|
|
82
|
+
username?: string;
|
|
83
|
+
abstract?: string;
|
|
84
|
+
description?: string;
|
|
85
|
+
labels?: WorkspacePresetLabels;
|
|
86
|
+
updated?: string;
|
|
87
|
+
updatedBy?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface WorkspacePresetFromBE extends WorkspacePresetForBE {
|
|
90
|
+
id: string;
|
|
91
|
+
viewType: ViewType;
|
|
92
|
+
scope: SystemScope;
|
|
93
|
+
username?: string;
|
|
94
|
+
}
|
|
95
|
+
export interface PresetListItemOrigin {
|
|
96
|
+
type: 'plugin';
|
|
97
|
+
pluginId: string;
|
|
98
|
+
versions?: string[];
|
|
99
|
+
}
|
|
100
|
+
export interface WorkspacePresetListItem {
|
|
101
|
+
id: string;
|
|
102
|
+
date?: string;
|
|
103
|
+
title: string;
|
|
104
|
+
scope: SystemScope;
|
|
105
|
+
viewType: ViewType;
|
|
106
|
+
abstract: string;
|
|
107
|
+
username?: string;
|
|
108
|
+
is_shared?: boolean;
|
|
109
|
+
labels?: WorkspacePresetLabels;
|
|
110
|
+
description?: string;
|
|
111
|
+
updated?: string;
|
|
112
|
+
updatedBy?: string;
|
|
113
|
+
origin?: PresetListItemOrigin;
|
|
114
|
+
}
|
|
115
|
+
export declare enum WorkspacePresetAction {
|
|
116
|
+
DELETE = "DELETE",
|
|
117
|
+
EDIT = "EDIT",
|
|
118
|
+
SAVE = "SAVE",
|
|
119
|
+
SAVE_AS = "SAVE_AS",
|
|
120
|
+
DUPLICATE = "DUPLICATE",
|
|
121
|
+
SAVE_SYSTEM_PRESET = "SAVE_SYSTEM_PRESET",
|
|
122
|
+
SAVE_SYSTEM_PRESET_AS = "SAVE_SYSTEM_PRESET_AS",
|
|
123
|
+
RESET = "RESET",
|
|
124
|
+
DELETE_SYSTEM_PRESET = "DELETE_SYSTEM_PRESET",
|
|
125
|
+
SHARE = "SHARE",
|
|
126
|
+
OPEN_TAB = "OPEN_TAB",
|
|
127
|
+
EDIT_TITLE = "EDIT_TITLE",
|
|
128
|
+
COPY_TO_CLIPBOARD = "COPY_TO_CLIPBOARD"
|
|
129
|
+
}
|
|
130
|
+
export interface WorkspaceAddViewPayload {
|
|
131
|
+
id: string;
|
|
132
|
+
componentType: string;
|
|
133
|
+
initialProps: InitialProps;
|
|
134
|
+
}
|
|
135
|
+
export interface WorkspaceSetNewViewPayload {
|
|
136
|
+
mosaicNodeId: string;
|
|
137
|
+
newId: string;
|
|
138
|
+
componentType: string;
|
|
139
|
+
copyOriginalcontent: boolean;
|
|
140
|
+
}
|
|
141
|
+
export interface WorkspaceDeleteViewPayload {
|
|
142
|
+
id: string;
|
|
143
|
+
}
|
|
144
|
+
export interface WorkspaceUpdateViewsPayload {
|
|
145
|
+
mosaicNode: MosaicNode<string>;
|
|
146
|
+
}
|
|
147
|
+
export interface WorkspaceUpdateViewPayload {
|
|
148
|
+
mosaicNodeId: string;
|
|
149
|
+
viewPreset: WorkspaceViewType;
|
|
150
|
+
}
|
|
151
|
+
export interface WorkspaceChangeToEmptyMapWorkspacePayload {
|
|
152
|
+
newMapPresetText: string;
|
|
153
|
+
newWorkspaceText: string;
|
|
154
|
+
}
|
|
155
|
+
export interface WorkspaceSetPresetPayload {
|
|
156
|
+
workspacePreset: WorkspacePreset;
|
|
157
|
+
markAsChanged?: boolean;
|
|
158
|
+
}
|
|
159
|
+
export interface WorkspaceSetPreventCloseViewPayload {
|
|
160
|
+
viewId: string;
|
|
161
|
+
shouldPreventClose: boolean;
|
|
162
|
+
}
|
|
163
|
+
export interface WorkspaceComponentLookupPayload {
|
|
164
|
+
componentType: string;
|
|
165
|
+
id: string;
|
|
166
|
+
title?: string;
|
|
167
|
+
initialProps: unknown;
|
|
168
|
+
}
|
|
169
|
+
export type WorkspaceLookupFunctionType = (payload: WorkspaceComponentLookupPayload) => React.ReactElement;
|
|
170
|
+
export interface ViewPresetListItem {
|
|
171
|
+
id: string;
|
|
172
|
+
title: string;
|
|
173
|
+
date: string;
|
|
174
|
+
scope: SystemScope;
|
|
175
|
+
abstract?: string;
|
|
176
|
+
description?: string;
|
|
177
|
+
is_shared?: boolean;
|
|
178
|
+
username?: string;
|
|
179
|
+
labels?: WorkspacePresetLabels;
|
|
180
|
+
updated?: string;
|
|
181
|
+
updatedBy?: string;
|
|
182
|
+
}
|
|
183
|
+
export interface WorkspaceFetchWorkspacePayload {
|
|
184
|
+
workspaceId: string;
|
|
185
|
+
}
|
|
186
|
+
export interface WorkspaceFetchedWorkspacePayload {
|
|
187
|
+
workspaceId: string;
|
|
188
|
+
workspace: WorkspacePresetForBE;
|
|
189
|
+
}
|
|
190
|
+
export interface WorkspaceFetchWorkspaceViewPresetPayload {
|
|
191
|
+
viewPresetId: string;
|
|
192
|
+
mosaicNodeId: string;
|
|
193
|
+
}
|
|
194
|
+
export interface WorkspaceSaveWorkspacePresetPayload {
|
|
195
|
+
workspace: WorkspacePresetForBE;
|
|
196
|
+
}
|
|
197
|
+
export declare enum WorkspaceErrorType {
|
|
198
|
+
NOT_FOUND = "NOT_FOUND",
|
|
199
|
+
GENERIC = "GENERIC",
|
|
200
|
+
SAVE = "SAVE"
|
|
201
|
+
}
|
|
202
|
+
export type WorkspaceError = {
|
|
203
|
+
type: WorkspaceErrorType;
|
|
204
|
+
message: string;
|
|
205
|
+
} | undefined;
|
|
206
|
+
export interface WorkspaceErrorWorkspacePayload {
|
|
207
|
+
workspaceId: string;
|
|
208
|
+
error: WorkspaceError;
|
|
209
|
+
}
|
|
210
|
+
export type WorkspaceLabelsConfigResponse = WorkspacePresetLabels;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AxiosError } from 'axios';
|
|
2
|
+
import type { MosaicNode } from 'react-mosaic-component';
|
|
3
|
+
import { syncGroupsTypes } from '@opengeoweb/store';
|
|
4
|
+
import type { WorkspacePreset, WorkspacePresetForBE, WorkspaceViewsFromBE, ViewType, WorkspaceViewPresetComponentsLookupType, WorkspaceSyncGroup, WorkspaceViews } from './types';
|
|
5
|
+
export declare const getViewPresetState: (viewPresetId: string, mosaicNodeId: string, state: "loading" | "error") => {
|
|
6
|
+
title: string;
|
|
7
|
+
id: string;
|
|
8
|
+
mosaicNodeId: string;
|
|
9
|
+
componentType: WorkspaceViewPresetComponentsLookupType;
|
|
10
|
+
};
|
|
11
|
+
export declare const getLoadingWorkspace: (workspacePreset: WorkspacePresetForBE) => WorkspacePreset;
|
|
12
|
+
export declare const getListInChunks: (views: WorkspaceViewsFromBE[]) => WorkspaceViewsFromBE[][];
|
|
13
|
+
export declare const defaultSyncGroups: syncGroupsTypes.SyncGroupAddGroupPayload[];
|
|
14
|
+
export declare const getSyncGroups: (syncGroups?: WorkspaceSyncGroup[]) => syncGroupsTypes.SyncGroupAddGroupPayload[];
|
|
15
|
+
export declare const tiledWindowComponentTypes: string[];
|
|
16
|
+
export declare const getViewType: (numViews: number, firstViewComponentType: string) => ViewType;
|
|
17
|
+
/**
|
|
18
|
+
* Get all view ids from the mosaicnode state
|
|
19
|
+
* @param mNode MosaicNode state
|
|
20
|
+
* @returns List if string ids of all mosaic nodes.
|
|
21
|
+
*/
|
|
22
|
+
export declare const makeListOfViewIds: (mNode: MosaicNode<string>) => string[];
|
|
23
|
+
export declare const getErrorMessage: (error: AxiosError<unknown>) => string;
|
|
24
|
+
export declare const toViewsArray: (wsViews: WorkspaceViewsFromBE[] | WorkspaceViews | null | undefined) => WorkspaceViewsFromBE[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AppStore } from '../types';
|
|
2
|
+
import type { WorkspacePresetForBE } from '../workspace/types';
|
|
3
|
+
export declare const emptyWorkspaceBEData: Omit<WorkspacePresetForBE, 'title'>;
|
|
4
|
+
export declare const workspaceListListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<AppStore, import("redux-thunk").ThunkDispatch<AppStore, unknown, import("redux").UnknownAction>, unknown>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
import type { OnErrorWorkspacePresetActionPayload, OnSuccesWorkspacePresetActionPayload, OpenWorkspaceActionDialogPayload, SearchWorkspaceFilter, SetWorkspaceLabelFiltersPayload, SubmitFormWorkspaceActionDialogPayload, ToggleListDialogPayload, ToggleSelectFilterChip, WorkspaceListFilter, WorkspaceListState } from './types';
|
|
3
|
+
import { PresetFilterType } 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 pluginFilterState: {
|
|
23
|
+
label: string;
|
|
24
|
+
id: PresetFilterType;
|
|
25
|
+
isSelected: boolean;
|
|
26
|
+
isDisabled: boolean;
|
|
27
|
+
};
|
|
28
|
+
export declare const defaultPresetFilterState: WorkspaceListFilter[];
|
|
29
|
+
export declare const initialState: WorkspaceListState;
|
|
30
|
+
export declare const workspaceListReducer: import("redux").Reducer<WorkspaceListState>, workspaceListActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
31
|
+
openWorkspaceActionDialogOptions: (draft: Draft<WorkspaceListState>, action: PayloadAction<OpenWorkspaceActionDialogPayload>) => void;
|
|
32
|
+
onSuccessWorkspaceSaveDialog: (draft: Draft<WorkspaceListState>, action: PayloadAction<{
|
|
33
|
+
presetId: string;
|
|
34
|
+
}>) => void;
|
|
35
|
+
submitFormWorkspaceActionDialogOptions: (draft: Draft<WorkspaceListState>, _action: PayloadAction<SubmitFormWorkspaceActionDialogPayload>) => void;
|
|
36
|
+
closeWorkspaceActionDialogOptions: (draft: Draft<WorkspaceListState>) => void;
|
|
37
|
+
onSuccessWorkspacePresetAction: (draft: Draft<WorkspaceListState>, _action: PayloadAction<OnSuccesWorkspacePresetActionPayload>) => void;
|
|
38
|
+
onErrorWorkspacePresetAction: (draft: Draft<WorkspaceListState>, action: PayloadAction<OnErrorWorkspacePresetActionPayload>) => void;
|
|
39
|
+
toggleWorkspaceDialog: (draft: Draft<WorkspaceListState>, action: PayloadAction<ToggleListDialogPayload>) => void;
|
|
40
|
+
toggleSelectFilterChip: (draft: Draft<WorkspaceListState>, action: PayloadAction<ToggleSelectFilterChip>) => void;
|
|
41
|
+
setSelectAllFilterChip: (draft: Draft<WorkspaceListState>) => void;
|
|
42
|
+
setFilterChips: (draft: Draft<WorkspaceListState>, action: PayloadAction<ToggleSelectFilterChip[]>) => void;
|
|
43
|
+
setWorkspaceLabelFilters: (draft: Draft<WorkspaceListState>, action: PayloadAction<SetWorkspaceLabelFiltersPayload>) => void;
|
|
44
|
+
clearLabelFilters: (draft: Draft<WorkspaceListState>) => void;
|
|
45
|
+
searchFilter: (draft: Draft<WorkspaceListState>, action: PayloadAction<SearchWorkspaceFilter>) => void;
|
|
46
|
+
}, "workspaceList">;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type { SystemScope } from '@opengeoweb/shared';
|
|
2
|
+
import type { AppStore } from '../types';
|
|
3
|
+
import type { WorkspaceActionDialogType, WorkspaceListState } from './types';
|
|
4
|
+
import type { WorkspacePresetLabels, WorkspaceState } from '../workspace/types';
|
|
5
|
+
export declare const getWorkspaceListStore: (store: AppStore) => WorkspaceListState;
|
|
6
|
+
export declare const getWorkspaceDialogIsSaved: ((state: AppStore) => boolean) & {
|
|
7
|
+
clearCache: () => void;
|
|
8
|
+
resultsCount: () => number;
|
|
9
|
+
resetResultsCount: () => void;
|
|
10
|
+
} & {
|
|
11
|
+
resultFunc: (resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: AppStore) => boolean;
|
|
12
|
+
memoizedResultFunc: ((resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: AppStore) => boolean) & {
|
|
13
|
+
clearCache: () => void;
|
|
14
|
+
resultsCount: () => number;
|
|
15
|
+
resetResultsCount: () => void;
|
|
16
|
+
};
|
|
17
|
+
lastResult: () => boolean;
|
|
18
|
+
dependencies: [(store: AppStore) => WorkspaceListState, (store: AppStore) => AppStore];
|
|
19
|
+
recomputations: () => number;
|
|
20
|
+
resetRecomputations: () => void;
|
|
21
|
+
dependencyRecomputations: () => number;
|
|
22
|
+
resetDependencyRecomputations: () => void;
|
|
23
|
+
} & {
|
|
24
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
25
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
26
|
+
};
|
|
27
|
+
export declare const getWorkspaceListError: ((state: AppStore) => import("./types").TranslatableWorkspaceListError | import("./types").VerbatimWorkspaceListError | undefined) & {
|
|
28
|
+
clearCache: () => void;
|
|
29
|
+
resultsCount: () => number;
|
|
30
|
+
resetResultsCount: () => void;
|
|
31
|
+
} & {
|
|
32
|
+
resultFunc: (resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: AppStore) => import("./types").TranslatableWorkspaceListError | import("./types").VerbatimWorkspaceListError | undefined;
|
|
33
|
+
memoizedResultFunc: ((resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: AppStore) => import("./types").TranslatableWorkspaceListError | import("./types").VerbatimWorkspaceListError | undefined) & {
|
|
34
|
+
clearCache: () => void;
|
|
35
|
+
resultsCount: () => number;
|
|
36
|
+
resetResultsCount: () => void;
|
|
37
|
+
};
|
|
38
|
+
lastResult: () => import("./types").TranslatableWorkspaceListError | import("./types").VerbatimWorkspaceListError | undefined;
|
|
39
|
+
dependencies: [(store: AppStore) => WorkspaceListState, (store: AppStore) => AppStore];
|
|
40
|
+
recomputations: () => number;
|
|
41
|
+
resetRecomputations: () => void;
|
|
42
|
+
dependencyRecomputations: () => number;
|
|
43
|
+
resetDependencyRecomputations: () => void;
|
|
44
|
+
} & {
|
|
45
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
46
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
47
|
+
};
|
|
48
|
+
export declare const getWorkspaceActionFormValues: ((state: AppStore) => import("./types").WorkspacePresetFormValues) & {
|
|
49
|
+
clearCache: () => void;
|
|
50
|
+
resultsCount: () => number;
|
|
51
|
+
resetResultsCount: () => void;
|
|
52
|
+
} & {
|
|
53
|
+
resultFunc: (resultFuncArgs_0: WorkspaceListState) => import("./types").WorkspacePresetFormValues;
|
|
54
|
+
memoizedResultFunc: ((resultFuncArgs_0: WorkspaceListState) => import("./types").WorkspacePresetFormValues) & {
|
|
55
|
+
clearCache: () => void;
|
|
56
|
+
resultsCount: () => number;
|
|
57
|
+
resetResultsCount: () => void;
|
|
58
|
+
};
|
|
59
|
+
lastResult: () => import("./types").WorkspacePresetFormValues;
|
|
60
|
+
dependencies: [(store: AppStore) => WorkspaceListState];
|
|
61
|
+
recomputations: () => number;
|
|
62
|
+
resetRecomputations: () => void;
|
|
63
|
+
dependencyRecomputations: () => number;
|
|
64
|
+
resetDependencyRecomputations: () => void;
|
|
65
|
+
} & {
|
|
66
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
67
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
68
|
+
};
|
|
69
|
+
type WorkspaceActionDialogDetails = WorkspaceActionDialogType | false;
|
|
70
|
+
export declare const getWorkspaceActionDialogDetails: ((state: AppStore) => WorkspaceActionDialogDetails) & {
|
|
71
|
+
clearCache: () => void;
|
|
72
|
+
resultsCount: () => number;
|
|
73
|
+
resetResultsCount: () => void;
|
|
74
|
+
} & {
|
|
75
|
+
resultFunc: (resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: WorkspaceState) => WorkspaceActionDialogDetails;
|
|
76
|
+
memoizedResultFunc: ((resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: WorkspaceState) => WorkspaceActionDialogDetails) & {
|
|
77
|
+
clearCache: () => void;
|
|
78
|
+
resultsCount: () => number;
|
|
79
|
+
resetResultsCount: () => void;
|
|
80
|
+
};
|
|
81
|
+
lastResult: () => WorkspaceActionDialogDetails;
|
|
82
|
+
dependencies: [(store: AppStore) => WorkspaceListState, (store: AppStore) => WorkspaceState];
|
|
83
|
+
recomputations: () => number;
|
|
84
|
+
resetRecomputations: () => void;
|
|
85
|
+
dependencyRecomputations: () => number;
|
|
86
|
+
resetDependencyRecomputations: () => void;
|
|
87
|
+
} & {
|
|
88
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
89
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
90
|
+
};
|
|
91
|
+
export declare const getIsWorkspaceListDialogOpen: ((state: AppStore) => boolean) & {
|
|
92
|
+
clearCache: () => void;
|
|
93
|
+
resultsCount: () => number;
|
|
94
|
+
resetResultsCount: () => void;
|
|
95
|
+
} & {
|
|
96
|
+
resultFunc: (resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: AppStore) => boolean;
|
|
97
|
+
memoizedResultFunc: ((resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: AppStore) => boolean) & {
|
|
98
|
+
clearCache: () => void;
|
|
99
|
+
resultsCount: () => number;
|
|
100
|
+
resetResultsCount: () => void;
|
|
101
|
+
};
|
|
102
|
+
lastResult: () => boolean;
|
|
103
|
+
dependencies: [(store: AppStore) => WorkspaceListState, (store: AppStore) => AppStore];
|
|
104
|
+
recomputations: () => number;
|
|
105
|
+
resetRecomputations: () => void;
|
|
106
|
+
dependencyRecomputations: () => number;
|
|
107
|
+
resetDependencyRecomputations: () => void;
|
|
108
|
+
} & {
|
|
109
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
110
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
111
|
+
};
|
|
112
|
+
export declare const getWorkspaceListFilters: ((state: AppStore, _scope?: SystemScope | undefined, isAdmin?: boolean | undefined) => {
|
|
113
|
+
isDisabled: boolean;
|
|
114
|
+
label: string;
|
|
115
|
+
id: import("./types").PresetFilterType;
|
|
116
|
+
isSelected?: boolean;
|
|
117
|
+
}[]) & {
|
|
118
|
+
clearCache: () => void;
|
|
119
|
+
resultsCount: () => number;
|
|
120
|
+
resetResultsCount: () => void;
|
|
121
|
+
} & {
|
|
122
|
+
resultFunc: (resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: SystemScope | undefined, resultFuncArgs_2: boolean | undefined) => {
|
|
123
|
+
isDisabled: boolean;
|
|
124
|
+
label: string;
|
|
125
|
+
id: import("./types").PresetFilterType;
|
|
126
|
+
isSelected?: boolean;
|
|
127
|
+
}[];
|
|
128
|
+
memoizedResultFunc: ((resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: SystemScope | undefined, resultFuncArgs_2: boolean | undefined) => {
|
|
129
|
+
isDisabled: boolean;
|
|
130
|
+
label: string;
|
|
131
|
+
id: import("./types").PresetFilterType;
|
|
132
|
+
isSelected?: boolean;
|
|
133
|
+
}[]) & {
|
|
134
|
+
clearCache: () => void;
|
|
135
|
+
resultsCount: () => number;
|
|
136
|
+
resetResultsCount: () => void;
|
|
137
|
+
};
|
|
138
|
+
lastResult: () => {
|
|
139
|
+
isDisabled: boolean;
|
|
140
|
+
label: string;
|
|
141
|
+
id: import("./types").PresetFilterType;
|
|
142
|
+
isSelected?: boolean;
|
|
143
|
+
}[];
|
|
144
|
+
dependencies: [(store: AppStore) => WorkspaceListState, (_store: AppStore, scope?: SystemScope) => SystemScope | undefined, (_store: AppStore, _scope?: SystemScope, isAdmin?: boolean) => boolean | undefined];
|
|
145
|
+
recomputations: () => number;
|
|
146
|
+
resetRecomputations: () => void;
|
|
147
|
+
dependencyRecomputations: () => number;
|
|
148
|
+
resetDependencyRecomputations: () => void;
|
|
149
|
+
} & {
|
|
150
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
151
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
152
|
+
};
|
|
153
|
+
export declare const getWorkspaceListSearchQuery: ((state: AppStore) => string) & {
|
|
154
|
+
clearCache: () => void;
|
|
155
|
+
resultsCount: () => number;
|
|
156
|
+
resetResultsCount: () => void;
|
|
157
|
+
} & {
|
|
158
|
+
resultFunc: (resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: AppStore) => string;
|
|
159
|
+
memoizedResultFunc: ((resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: AppStore) => string) & {
|
|
160
|
+
clearCache: () => void;
|
|
161
|
+
resultsCount: () => number;
|
|
162
|
+
resetResultsCount: () => void;
|
|
163
|
+
};
|
|
164
|
+
lastResult: () => string;
|
|
165
|
+
dependencies: [(store: AppStore) => WorkspaceListState, (store: AppStore) => AppStore];
|
|
166
|
+
recomputations: () => number;
|
|
167
|
+
resetRecomputations: () => void;
|
|
168
|
+
dependencyRecomputations: () => number;
|
|
169
|
+
resetDependencyRecomputations: () => void;
|
|
170
|
+
} & {
|
|
171
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
172
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
173
|
+
};
|
|
174
|
+
export declare const getWorkspaceLabelFilters: ((state: AppStore) => WorkspacePresetLabels | undefined) & {
|
|
175
|
+
clearCache: () => void;
|
|
176
|
+
resultsCount: () => number;
|
|
177
|
+
resetResultsCount: () => void;
|
|
178
|
+
} & {
|
|
179
|
+
resultFunc: (resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: AppStore) => WorkspacePresetLabels | undefined;
|
|
180
|
+
memoizedResultFunc: ((resultFuncArgs_0: WorkspaceListState, resultFuncArgs_1: AppStore) => WorkspacePresetLabels | undefined) & {
|
|
181
|
+
clearCache: () => void;
|
|
182
|
+
resultsCount: () => number;
|
|
183
|
+
resetResultsCount: () => void;
|
|
184
|
+
};
|
|
185
|
+
lastResult: () => WorkspacePresetLabels | undefined;
|
|
186
|
+
dependencies: [(store: AppStore) => WorkspaceListState, (store: AppStore) => AppStore];
|
|
187
|
+
recomputations: () => number;
|
|
188
|
+
resetRecomputations: () => void;
|
|
189
|
+
dependencyRecomputations: () => number;
|
|
190
|
+
resetDependencyRecomputations: () => void;
|
|
191
|
+
} & {
|
|
192
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
193
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
194
|
+
};
|
|
195
|
+
export {};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { SystemScope } from '@opengeoweb/shared';
|
|
2
|
+
import type { ViewPresetError } from '../viewPresets/types';
|
|
3
|
+
import type { WorkspacePresetAction, WorkspacePresetForBE, WorkspacePresetLabels, WorkspaceViewsFromBE } from '../workspace/types';
|
|
4
|
+
export declare enum WorkspaceListErrorCategory {
|
|
5
|
+
AUTH = "AUTH",// Errors related to authentication and authorization
|
|
6
|
+
GENERIC = "GENERIC"
|
|
7
|
+
}
|
|
8
|
+
export declare enum WorkspaceListErrorType {
|
|
9
|
+
TRANSLATABLE_ERROR = "TRANSLATABLE_ERROR",
|
|
10
|
+
VERBATIM_ERROR = "VERBATIM_ERROR"
|
|
11
|
+
}
|
|
12
|
+
export declare enum PresetFilterType {
|
|
13
|
+
personal = "personal",
|
|
14
|
+
shared = "shared",
|
|
15
|
+
system = "system",
|
|
16
|
+
plugin = "plugin"
|
|
17
|
+
}
|
|
18
|
+
export type WorkspaceListError = TranslatableWorkspaceListError | VerbatimWorkspaceListError | undefined;
|
|
19
|
+
export interface TranslatableWorkspaceListError {
|
|
20
|
+
type: WorkspaceListErrorType.TRANSLATABLE_ERROR;
|
|
21
|
+
category: WorkspaceListErrorCategory;
|
|
22
|
+
key: string;
|
|
23
|
+
params?: Record<string, string | number> | undefined;
|
|
24
|
+
}
|
|
25
|
+
export interface VerbatimWorkspaceListError {
|
|
26
|
+
type: WorkspaceListErrorType.VERBATIM_ERROR;
|
|
27
|
+
category: WorkspaceListErrorCategory;
|
|
28
|
+
message: string;
|
|
29
|
+
}
|
|
30
|
+
export interface WorkspaceListFilter {
|
|
31
|
+
label: string;
|
|
32
|
+
id: PresetFilterType;
|
|
33
|
+
isSelected?: boolean;
|
|
34
|
+
isDisabled?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export type WorkspaceDialogView = {
|
|
37
|
+
hasChanges: boolean;
|
|
38
|
+
title: string;
|
|
39
|
+
isSelected: boolean;
|
|
40
|
+
error?: ViewPresetError;
|
|
41
|
+
scope: SystemScope;
|
|
42
|
+
abstract?: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
} & WorkspaceViewsFromBE;
|
|
45
|
+
export interface WorkspaceFormValues {
|
|
46
|
+
id?: string;
|
|
47
|
+
title?: string;
|
|
48
|
+
abstract?: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
scope?: SystemScope;
|
|
51
|
+
views?: WorkspaceDialogView[];
|
|
52
|
+
labels?: WorkspacePresetLabels;
|
|
53
|
+
updated?: string;
|
|
54
|
+
updatedBy?: string;
|
|
55
|
+
username?: string;
|
|
56
|
+
}
|
|
57
|
+
export type WorkspacePresetFormValues = WorkspaceFormValues | WorkspacePresetForBE;
|
|
58
|
+
export interface WorkspaceActionDialogType {
|
|
59
|
+
action: WorkspacePresetAction;
|
|
60
|
+
presetId: string;
|
|
61
|
+
formValues: WorkspacePresetFormValues;
|
|
62
|
+
error?: WorkspaceListError;
|
|
63
|
+
hasSaved?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface WorkspaceListState {
|
|
66
|
+
error: WorkspaceListError;
|
|
67
|
+
isWorkspaceListDialogOpen: boolean;
|
|
68
|
+
workspaceActionDialog?: WorkspaceActionDialogType;
|
|
69
|
+
searchQuery?: string;
|
|
70
|
+
workspaceListFilters?: WorkspaceListFilter[];
|
|
71
|
+
workspaceLabelFilters?: WorkspacePresetLabels;
|
|
72
|
+
}
|
|
73
|
+
export interface ToggleListDialogPayload {
|
|
74
|
+
isWorkspaceListDialogOpen: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface ToggleSelectFilterChip {
|
|
77
|
+
id: PresetFilterType;
|
|
78
|
+
isSelected: boolean;
|
|
79
|
+
isAdmin?: boolean;
|
|
80
|
+
}
|
|
81
|
+
export interface SetWorkspaceLabelFiltersPayload {
|
|
82
|
+
labels: WorkspacePresetLabels;
|
|
83
|
+
}
|
|
84
|
+
export interface SearchWorkspaceFilter {
|
|
85
|
+
searchQuery: string;
|
|
86
|
+
}
|
|
87
|
+
export type OpenWorkspaceActionDialogPayload = WorkspaceActionDialogType;
|
|
88
|
+
export interface SubmitFormWorkspaceActionDialogPayload {
|
|
89
|
+
presetAction: WorkspacePresetAction;
|
|
90
|
+
presetId: string;
|
|
91
|
+
data: WorkspacePresetForBE;
|
|
92
|
+
emptyMapPresetTitle: string;
|
|
93
|
+
emptyWorkspacePresetTitle: string;
|
|
94
|
+
}
|
|
95
|
+
export interface OnNonDeleteSuccesWorkspacePresetActionPayload {
|
|
96
|
+
workspaceId: string;
|
|
97
|
+
action: Exclude<WorkspacePresetAction, WorkspacePresetAction.DELETE | WorkspacePresetAction.DELETE_SYSTEM_PRESET>;
|
|
98
|
+
title: string;
|
|
99
|
+
abstract?: string;
|
|
100
|
+
description?: string;
|
|
101
|
+
currentActiveWorkspaceId?: string;
|
|
102
|
+
scope: SystemScope;
|
|
103
|
+
is_shared?: boolean;
|
|
104
|
+
labels?: WorkspacePresetLabels;
|
|
105
|
+
views?: WorkspaceViewsFromBE[];
|
|
106
|
+
updated?: string;
|
|
107
|
+
updatedBy?: string;
|
|
108
|
+
username?: string;
|
|
109
|
+
}
|
|
110
|
+
export interface OnDeleteSuccesWorkspacePresetActionPayload {
|
|
111
|
+
workspaceId: string;
|
|
112
|
+
action: WorkspacePresetAction.DELETE | WorkspacePresetAction.DELETE_SYSTEM_PRESET;
|
|
113
|
+
title: string;
|
|
114
|
+
abstract?: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
currentActiveWorkspaceId?: string;
|
|
117
|
+
emptyWorkspacePresetTitle: string;
|
|
118
|
+
views?: WorkspaceViewsFromBE[];
|
|
119
|
+
}
|
|
120
|
+
export type OnSuccesWorkspacePresetActionPayload = OnNonDeleteSuccesWorkspacePresetActionPayload | OnDeleteSuccesWorkspacePresetActionPayload;
|
|
121
|
+
export interface OnErrorWorkspacePresetActionPayload {
|
|
122
|
+
error: WorkspaceListError;
|
|
123
|
+
}
|
|
124
|
+
export interface FetchWorkspaceParams {
|
|
125
|
+
scope?: string;
|
|
126
|
+
search?: string;
|
|
127
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
2
|
+
import { snackbarTypes } from '@opengeoweb/snackbar';
|
|
3
|
+
import type { MapPreset } from '@opengeoweb/store';
|
|
4
|
+
import type { WorkspacePreset, WorkspacePresetListItem } from '../workspace/types';
|
|
5
|
+
import { WorkspacePresetAction } from '../workspace/types';
|
|
6
|
+
export declare const getSnackbarMessage: (action: WorkspacePresetAction, title: string, is_shared?: boolean) => snackbarTypes.TranslatableMessage;
|
|
7
|
+
export declare function getEmptyWorkspaceListItem(): Omit<WorkspacePresetListItem, 'title'>;
|
|
8
|
+
export declare function getEmptyWorkspaceListItem(t: TFunction): WorkspacePresetListItem;
|
|
9
|
+
export declare function getEmptyWorkspaceListItem(t?: TFunction): Omit<WorkspacePresetListItem, 'title'> | WorkspacePresetListItem;
|
|
10
|
+
export declare function getEmptyMapWorkspace(): Omit<WorkspacePreset, 'title'>;
|
|
11
|
+
export declare function getEmptyMapWorkspace(t: TFunction): WorkspacePreset;
|
|
12
|
+
export declare const getEmptyWorkspacePreset: () => Omit<WorkspacePreset, "title">;
|
|
13
|
+
export declare const createCustomEmptyMapWorkspace: (emptyWorkspaceTitle: string, emptyMapWorkspaceTitle: string, customMapPreset?: MapPreset) => WorkspacePreset;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface WorkspaceAppProps {
|
|
3
|
+
isSnapshot?: boolean;
|
|
4
|
+
workspaceId?: string;
|
|
5
|
+
shouldShowListOnOpen?: boolean;
|
|
6
|
+
markWorkspaceChanged?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const WorkspaceApp: ({ isSnapshot, workspaceId, shouldShowListOnOpen, markWorkspaceChanged, }: WorkspaceAppProps) => React.ReactElement;
|
|
9
|
+
interface StoryWrapperProps {
|
|
10
|
+
isSnapshot?: boolean;
|
|
11
|
+
workspaceId?: string;
|
|
12
|
+
isLoggedIn?: boolean;
|
|
13
|
+
shouldShowListOnOpen?: boolean;
|
|
14
|
+
isAdmin?: boolean;
|
|
15
|
+
hasChanges?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const StoryWrapper: ({ isSnapshot, workspaceId, isLoggedIn, shouldShowListOnOpen, isAdmin, hasChanges, }: StoryWrapperProps) => React.ReactElement;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WorkspaceComponentLookupPayload } from '../store/workspace/types';
|
|
3
|
+
/**
|
|
4
|
+
* The lookup table is for registering your own components with the workspace.
|
|
5
|
+
* @param payload
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const componentsLookUp: (payload: WorkspaceComponentLookupPayload) => React.ReactElement;
|