@opengeoweb/workspace 6.0.2 → 6.0.3
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
CHANGED
|
@@ -4,7 +4,7 @@ import { getLeaves, MosaicContext, getAndAssertNodeAtPathExists, createBalancedT
|
|
|
4
4
|
import { isAxiosError, getAxiosErrorMessage, withEggs, useConfirmationDialog, CustomIconButton, AlertBanner, CustomTooltip, SearchHighlight, ToggleMenu, usePrevious, ToolContainer, CustomToggleButton, ConfirmationServiceProvider, ConfirmationDialog } from '@opengeoweb/shared';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import React__default, { useContext, useRef, useCallback, useDebugValue, createContext, memo, useEffect, forwardRef } from 'react';
|
|
7
|
-
import { ThemeWrapper, lightTheme, Menu, SplitVertical, SplitHorizontal, Expand, UnExpand, Close, Delete, Preset, PresetWorkspace, PresetTiles,
|
|
7
|
+
import { ThemeWrapper, lightTheme, Menu, SplitVertical, SplitHorizontal, Expand, UnExpand, Close, Delete, Preset, PresetWorkspace, PresetTiles, Search, Clear, WebAssetOff } from '@opengeoweb/theme';
|
|
8
8
|
import { unstable_batchedUpdates } from 'react-dom';
|
|
9
9
|
import { SnackbarWrapperConnect } from '@opengeoweb/core';
|
|
10
10
|
import { timeSeriesModuleConfig } from '@opengeoweb/timeseries';
|
|
@@ -19846,6 +19846,12 @@ var getViewPresetActiveId = function getViewPresetActiveId(store, panelId) {
|
|
|
19846
19846
|
var _a;
|
|
19847
19847
|
return (_a = getViewPresetById(store, panelId)) === null || _a === void 0 ? void 0 : _a.activeViewPresetId;
|
|
19848
19848
|
};
|
|
19849
|
+
var getViewPresetPanelId = function getViewPresetPanelId(store, mapId) {
|
|
19850
|
+
var _a, _b;
|
|
19851
|
+
return (_b = (_a = getViewPresets(store).find(function (preset) {
|
|
19852
|
+
return preset.activeViewPresetId === mapId;
|
|
19853
|
+
})) === null || _a === void 0 ? void 0 : _a.panelId) !== null && _b !== void 0 ? _b : '';
|
|
19854
|
+
};
|
|
19849
19855
|
var getDialogOptions = function getDialogOptions(store) {
|
|
19850
19856
|
return getViewPresetsStore(store).viewPresetDialog || undefined;
|
|
19851
19857
|
};
|
|
@@ -20009,10 +20015,7 @@ var getMosaicNode = createSelector(getWorkspaceState, function (state) {
|
|
|
20009
20015
|
*/
|
|
20010
20016
|
var getViewById = function getViewById(store, viewId) {
|
|
20011
20017
|
var _a, _b;
|
|
20012
|
-
|
|
20013
|
-
return store.workspace.views.byId[viewId];
|
|
20014
|
-
}
|
|
20015
|
-
return null;
|
|
20018
|
+
return (_b = (_a = store === null || store === void 0 ? void 0 : store.workspace) === null || _a === void 0 ? void 0 : _a.views.byId) === null || _b === void 0 ? void 0 : _b[viewId];
|
|
20016
20019
|
};
|
|
20017
20020
|
/**
|
|
20018
20021
|
* Gets all view ids
|
|
@@ -31981,36 +31984,35 @@ var FilterList = function FilterList(_ref) {
|
|
|
31981
31984
|
};
|
|
31982
31985
|
|
|
31983
31986
|
var DEBOUNCE_TIMEOUT = 300;
|
|
31984
|
-
var
|
|
31985
|
-
var
|
|
31986
|
-
|
|
31987
|
-
|
|
31988
|
-
|
|
31989
|
-
|
|
31987
|
+
var SearchButton = function SearchButton(_ref) {
|
|
31988
|
+
var label = _ref.label;
|
|
31989
|
+
return /*#__PURE__*/React.createElement(CustomIconButton, {
|
|
31990
|
+
tooltipTitle: label,
|
|
31991
|
+
edge: "end",
|
|
31992
|
+
size: "large"
|
|
31993
|
+
}, /*#__PURE__*/React.createElement(Search, null));
|
|
31994
|
+
};
|
|
31995
|
+
var ClearButton = function ClearButton(_ref2) {
|
|
31996
|
+
var onClick = _ref2.onClick;
|
|
31997
|
+
return /*#__PURE__*/React.createElement(CustomIconButton, {
|
|
31998
|
+
tooltipTitle: "Clear",
|
|
31999
|
+
edge: "end",
|
|
32000
|
+
onClick: onClick,
|
|
32001
|
+
size: "large"
|
|
32002
|
+
}, /*#__PURE__*/React.createElement(Clear, null));
|
|
32003
|
+
};
|
|
32004
|
+
var SearchField = function SearchField(_ref3) {
|
|
32005
|
+
var _ref3$label = _ref3.label,
|
|
32006
|
+
label = _ref3$label === void 0 ? 'Search' : _ref3$label,
|
|
32007
|
+
valueChanged = _ref3.valueChanged,
|
|
32008
|
+
_ref3$value = _ref3.value,
|
|
32009
|
+
value = _ref3$value === void 0 ? '' : _ref3$value;
|
|
31990
32010
|
var _React$useState = React.useState(value),
|
|
31991
32011
|
_React$useState2 = _slicedToArray$2(_React$useState, 2),
|
|
31992
32012
|
localValue = _React$useState2[0],
|
|
31993
32013
|
setLocalValue = _React$useState2[1];
|
|
31994
32014
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31995
32015
|
var handleValueChangeDebounced = React.useCallback(debounce$1(valueChanged, DEBOUNCE_TIMEOUT), []);
|
|
31996
|
-
var ClearButton = function ClearButton() {
|
|
31997
|
-
return /*#__PURE__*/React.createElement(CustomIconButton, {
|
|
31998
|
-
tooltipTitle: "Clear",
|
|
31999
|
-
edge: "end",
|
|
32000
|
-
onClick: function onClick() {
|
|
32001
|
-
setLocalValue('');
|
|
32002
|
-
valueChanged('');
|
|
32003
|
-
},
|
|
32004
|
-
size: "large"
|
|
32005
|
-
}, /*#__PURE__*/React.createElement(Clear, null));
|
|
32006
|
-
};
|
|
32007
|
-
var SearchButton = function SearchButton() {
|
|
32008
|
-
return /*#__PURE__*/React.createElement(CustomIconButton, {
|
|
32009
|
-
tooltipTitle: label,
|
|
32010
|
-
edge: "end",
|
|
32011
|
-
size: "large"
|
|
32012
|
-
}, /*#__PURE__*/React.createElement(Search, null));
|
|
32013
|
-
};
|
|
32014
32016
|
return /*#__PURE__*/React.createElement(TextField, {
|
|
32015
32017
|
variant: "filled",
|
|
32016
32018
|
size: "small",
|
|
@@ -32030,7 +32032,14 @@ var SearchField = function SearchField(_ref) {
|
|
|
32030
32032
|
InputProps: {
|
|
32031
32033
|
endAdornment: /*#__PURE__*/React.createElement(InputAdornment, {
|
|
32032
32034
|
position: "end"
|
|
32033
|
-
}, localValue ? /*#__PURE__*/React.createElement(ClearButton,
|
|
32035
|
+
}, localValue ? /*#__PURE__*/React.createElement(ClearButton, {
|
|
32036
|
+
onClick: function onClick() {
|
|
32037
|
+
setLocalValue('');
|
|
32038
|
+
valueChanged('');
|
|
32039
|
+
}
|
|
32040
|
+
}) : /*#__PURE__*/React.createElement(SearchButton, {
|
|
32041
|
+
label: label
|
|
32042
|
+
}))
|
|
32034
32043
|
}
|
|
32035
32044
|
});
|
|
32036
32045
|
};
|
|
@@ -32661,6 +32670,16 @@ var WorkspaceTileConnect = function WorkspaceTileConnect(_ref) {
|
|
|
32661
32670
|
};
|
|
32662
32671
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32663
32672
|
}, [unregisterView, registerView]);
|
|
32673
|
+
var connectedMap = useSelector(function (store) {
|
|
32674
|
+
var _a;
|
|
32675
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32676
|
+
var initialProps = view === null || view === void 0 ? void 0 : view.initialProps;
|
|
32677
|
+
var mapId = (_a = initialProps === null || initialProps === void 0 ? void 0 : initialProps.plotPreset) === null || _a === void 0 ? void 0 : _a.mapId;
|
|
32678
|
+
if (mapId) {
|
|
32679
|
+
return getViewPresetPanelId(store, mapId);
|
|
32680
|
+
}
|
|
32681
|
+
return undefined;
|
|
32682
|
+
});
|
|
32664
32683
|
return /*#__PURE__*/React.createElement(MosaicWindow, {
|
|
32665
32684
|
path: path,
|
|
32666
32685
|
createNode: createNode,
|
|
@@ -32706,7 +32725,8 @@ var WorkspaceTileConnect = function WorkspaceTileConnect(_ref) {
|
|
|
32706
32725
|
title: title,
|
|
32707
32726
|
id: mosaicNodeId,
|
|
32708
32727
|
componentType: view === null || view === void 0 ? void 0 : view.componentType,
|
|
32709
|
-
initialProps: view === null || view === void 0 ? void 0 : view.initialProps
|
|
32728
|
+
initialProps: view === null || view === void 0 ? void 0 : view.initialProps,
|
|
32729
|
+
connectedMap: connectedMap
|
|
32710
32730
|
}), isViewPresetDialogOpen && /*#__PURE__*/React.createElement(ViewPresetMenu, {
|
|
32711
32731
|
panelId: mosaicNodeId,
|
|
32712
32732
|
closeMenu: function closeMenu() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/workspace",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "GeoWeb Workspace library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"@emotion/react": "11.11.1",
|
|
16
16
|
"@mui/material": "5.12.0",
|
|
17
17
|
"@mui/system": "5.14.5",
|
|
18
|
-
"@opengeoweb/api": "6.0.
|
|
19
|
-
"@opengeoweb/authentication": "6.0.
|
|
20
|
-
"@opengeoweb/core": "6.0.
|
|
21
|
-
"@opengeoweb/form-fields": "6.0.
|
|
22
|
-
"@opengeoweb/shared": "6.0.
|
|
23
|
-
"@opengeoweb/sigmet-airmet": "6.0.
|
|
24
|
-
"@opengeoweb/store": "6.0.
|
|
25
|
-
"@opengeoweb/taf": "6.0.
|
|
26
|
-
"@opengeoweb/theme": "6.0.
|
|
27
|
-
"@opengeoweb/timeseries": "6.0.
|
|
18
|
+
"@opengeoweb/api": "6.0.3",
|
|
19
|
+
"@opengeoweb/authentication": "6.0.3",
|
|
20
|
+
"@opengeoweb/core": "6.0.3",
|
|
21
|
+
"@opengeoweb/form-fields": "6.0.3",
|
|
22
|
+
"@opengeoweb/shared": "6.0.3",
|
|
23
|
+
"@opengeoweb/sigmet-airmet": "6.0.3",
|
|
24
|
+
"@opengeoweb/store": "6.0.3",
|
|
25
|
+
"@opengeoweb/taf": "6.0.3",
|
|
26
|
+
"@opengeoweb/theme": "6.0.3",
|
|
27
|
+
"@opengeoweb/timeseries": "6.0.3",
|
|
28
28
|
"@redux-eggs/core": "2.2.0",
|
|
29
29
|
"@redux-eggs/redux-toolkit": "2.2.0",
|
|
30
30
|
"@redux-eggs/saga-extension": "2.2.0",
|
|
@@ -9,6 +9,7 @@ export declare const getViewPresetDetailError: (store: AppStore, panelId: string
|
|
|
9
9
|
export declare const getViewPresetListError: (store: AppStore, panelId: string) => string | undefined;
|
|
10
10
|
export declare const getViewPresetHasChanges: (store: AppStore, panelId: string) => boolean | undefined;
|
|
11
11
|
export declare const getViewPresetActiveId: (store: AppStore, panelId: string) => string | undefined;
|
|
12
|
+
export declare const getViewPresetPanelId: (store: AppStore, mapId: string) => string;
|
|
12
13
|
export declare const getDialogOptions: (store: AppStore) => ViewPresetDialog | undefined;
|
|
13
14
|
export declare const getIsViewPresetListDialogOpen: (store: AppStore, panelId: string) => boolean | undefined;
|
|
14
15
|
export declare const getViewPresetListFiltersForView: ((state: AppStore, id: import("@reduxjs/toolkit").EntityId) => ViewPresetsListFilter[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").ViewPresetEntity | undefined) => ViewPresetsListFilter[], {
|
|
@@ -29,7 +29,7 @@ export declare const getMosaicNode: ((state: AppStore) => import("react-mosaic-c
|
|
|
29
29
|
* @param {string} viewId viewId: string - view id
|
|
30
30
|
* @returns {object} returnType: WorkspaceViewType
|
|
31
31
|
*/
|
|
32
|
-
export declare const getViewById: (store: AppStore, viewId: string) => WorkspaceViewType;
|
|
32
|
+
export declare const getViewById: (store: AppStore, viewId: string) => WorkspaceViewType | undefined;
|
|
33
33
|
/**
|
|
34
34
|
* Gets all view ids
|
|
35
35
|
*
|
|
@@ -48,7 +48,7 @@ export declare const getViewIds: ((state: AppStore) => string[]) & import("resel
|
|
|
48
48
|
* @param {string} viewId viewId: string - view id
|
|
49
49
|
* @returns {boolean} returnType: boolean
|
|
50
50
|
*/
|
|
51
|
-
export declare const getShouldPreventClose: ((state: AppStore, viewId: string) => boolean) & import("reselect").OutputSelectorFields<(args_0: WorkspaceViewType) => boolean, {
|
|
51
|
+
export declare const getShouldPreventClose: ((state: AppStore, viewId: string) => boolean) & import("reselect").OutputSelectorFields<(args_0: WorkspaceViewType | undefined) => boolean, {
|
|
52
52
|
clearCache: () => void;
|
|
53
53
|
}> & {
|
|
54
54
|
clearCache: () => void;
|
|
@@ -159,7 +159,7 @@ export declare const getViewPresetToSendToBackend: ((state: any, viewId: string)
|
|
|
159
159
|
*/
|
|
160
160
|
componentType: "Map";
|
|
161
161
|
keywords: string;
|
|
162
|
-
}) & import("reselect").OutputSelectorFields<(args_0: WorkspaceViewType, args_1: import("dist/libs/store/src/store/mapStore/types").MapPreset, args_2: string[]) => {
|
|
162
|
+
}) & import("reselect").OutputSelectorFields<(args_0: WorkspaceViewType | undefined, args_1: import("dist/libs/store/src/store/mapStore/types").MapPreset, args_2: string[]) => {
|
|
163
163
|
id: string | undefined;
|
|
164
164
|
scope: import("./types").PresetScope;
|
|
165
165
|
title: string;
|
|
@@ -95,6 +95,7 @@ export interface WorkspaceComponentLookupPayload {
|
|
|
95
95
|
id: string;
|
|
96
96
|
title?: string;
|
|
97
97
|
initialProps: unknown;
|
|
98
|
+
connectedMap?: string;
|
|
98
99
|
}
|
|
99
100
|
export type WorkspaceLookupFunctionType = (payload: WorkspaceComponentLookupPayload) => React.ReactElement;
|
|
100
101
|
export type PresetScope = 'user' | 'system';
|