@opengeoweb/workspace 11.0.0 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +101 -99
- package/package.json +1 -1
- package/src/lib/components/ViewPresetMenu/ViewPresetMenu.d.ts +1 -1
- package/src/lib/components/WorkspaceMenu/WorkspaceMenu.d.ts +1 -1
- package/src/lib/components/ResizeMenu/ResizeMenu.d.ts +0 -6
- package/src/lib/components/ResizeMenu/ResizeMenu.spec.d.ts +0 -1
- package/src/lib/components/ResizeMenu/index.d.ts +0 -1
package/index.esm.js
CHANGED
|
@@ -5,11 +5,11 @@ import { chunk, cloneDeep, pick, isEmpty, isEqual, isString } from 'lodash';
|
|
|
5
5
|
import { getLeaves, MosaicContext, getAndAssertNodeAtPathExists, createBalancedTreeFromLeaves, MosaicWindow, Mosaic } from 'react-mosaic-component';
|
|
6
6
|
import { timeSeriesActions, TimeSeriesTypes, timeSeriesSelectors, timeSeriesReducer } from '@opengeoweb/timeseries';
|
|
7
7
|
import { publicWarningActions, WARN_NAMESPACE, warningsTranslations, publicWarningsSelectors } from '@opengeoweb/warnings';
|
|
8
|
-
import { PROJECTION, getAxiosErrorMessage, isAxiosAuthError, isAxiosError as isAxiosError$1, SHARED_NAMESPACE, sharedTranslations, ConfirmationServiceProvider, CustomIconButton, useConfirmationDialog, AlertBanner, PresetScope, CustomTooltip, SearchHighlight, ToggleMenu, DEFAULT_FILTER_HEIGHT, Filter,
|
|
8
|
+
import { PROJECTION, getAxiosErrorMessage, isAxiosAuthError, isAxiosError as isAxiosError$1, SHARED_NAMESPACE, sharedTranslations, ConfirmationServiceProvider, CustomIconButton, useConfirmationDialog, AlertBanner, PresetScope, CustomTooltip, SearchHighlight, ToggleMenu, DEFAULT_FILTER_HEIGHT, Filter, renderCounter, CustomDialog, ToolContainer, CustomToggleButton, usePrevious, ConfirmationButtons } from '@opengeoweb/shared';
|
|
9
9
|
import { snackbarTypes, snackbarActions, snackbarListener, snackbarReducer, SnackbarWrapperConnect } from '@opengeoweb/snackbar';
|
|
10
10
|
import { isAxiosError } from 'axios';
|
|
11
11
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
12
|
-
import { ThemeWrapper, lightTheme, Link, LinkOff, SplitVertical, SplitHorizontal, Expand, UnExpand, Close, Delete, Preset, PresetWorkspace, PresetTiles,
|
|
12
|
+
import { ThemeWrapper, lightTheme, Link, LinkOff, SplitVertical, SplitHorizontal, Expand, UnExpand, Close, Delete, Preset, PresetWorkspace, PresetTiles, CloudLoading, CloudIdle, WebAssetOff, Exclamation } from '@opengeoweb/theme';
|
|
13
13
|
import { Provider, useDispatch, useSelector, useStore, shallowEqual } from 'react-redux';
|
|
14
14
|
import { initReactI18next, useTranslation, I18nextProvider } from 'react-i18next';
|
|
15
15
|
import { AuthenticationProvider, useAuthenticationContext, GEOWEB_ROLE_PRESETS_ADMIN } from '@opengeoweb/authentication';
|
|
@@ -20,7 +20,7 @@ import { CORE_NAMESPACE, coreTranslations } from '@opengeoweb/core';
|
|
|
20
20
|
import { FORM_FIELDS_NAMESPACE, formFieldsTranslations, ReactHookFormTextField, ReactHookFormHiddenInput, ReactHookFormProvider, defaultFormOptions } from '@opengeoweb/form-fields';
|
|
21
21
|
import * as React from 'react';
|
|
22
22
|
import React__default, { useCallback } from 'react';
|
|
23
|
-
import { Menu, Typography, List, ListItem, ListItemButton, ListItemIcon, Checkbox, ListItemText, LinearProgress, Grid2, Box,
|
|
23
|
+
import { Menu, Typography, List, ListItem, ListItemButton, ListItemIcon, Checkbox, ListItemText, LinearProgress, Grid2, Box, ListSubheader, MenuItem, useTheme, FormGroup, FormControlLabel, Tabs } from '@mui/material';
|
|
24
24
|
import 'react-mosaic-component/react-mosaic-component.css';
|
|
25
25
|
import AutoSizer from 'react-virtualized-auto-sizer';
|
|
26
26
|
import { FixedSizeList } from 'react-window';
|
|
@@ -1414,9 +1414,9 @@ var slice$2 = createSlice({
|
|
|
1414
1414
|
warningsPresetChangeActions.map(function (warningsAction) {
|
|
1415
1415
|
return builder.addCase(warningsAction, function (draft, action) {
|
|
1416
1416
|
var _action$payload14 = action.payload,
|
|
1417
|
-
|
|
1417
|
+
systemUpdate = _action$payload14.systemUpdate,
|
|
1418
1418
|
panelId = _action$payload14.panelId;
|
|
1419
|
-
if (
|
|
1419
|
+
if (!systemUpdate && panelId) {
|
|
1420
1420
|
var entity = draft.entities[panelId];
|
|
1421
1421
|
if (entity && !(entity != null && entity.hasChanges)) {
|
|
1422
1422
|
entity.hasChanges = true;
|
|
@@ -6536,7 +6536,8 @@ var WorkspaceSelectListRow = function WorkspaceSelectListRow(_ref) {
|
|
|
6536
6536
|
fontSize: '12px',
|
|
6537
6537
|
fontWeight: 500,
|
|
6538
6538
|
textOverflow: 'ellipsis',
|
|
6539
|
-
overflow: 'hidden'
|
|
6539
|
+
overflow: 'hidden',
|
|
6540
|
+
whiteSpace: 'nowrap'
|
|
6540
6541
|
},
|
|
6541
6542
|
' .MuiListItemText-secondary': {
|
|
6542
6543
|
fontSize: '10px',
|
|
@@ -6892,36 +6893,32 @@ var ViewPresetMenuListConnect = function ViewPresetMenuListConnect(_ref) {
|
|
|
6892
6893
|
});
|
|
6893
6894
|
};
|
|
6894
6895
|
|
|
6895
|
-
var
|
|
6896
|
-
var
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6896
|
+
var ViewPresetMenu = function ViewPresetMenu(_ref) {
|
|
6897
|
+
var closeMenu = _ref.closeMenu,
|
|
6898
|
+
panelId = _ref.panelId,
|
|
6899
|
+
_ref$isOpen = _ref.isOpen,
|
|
6900
|
+
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen;
|
|
6901
|
+
var _useWorkspaceTranslat = useWorkspaceTranslation(),
|
|
6902
|
+
t = _useWorkspaceTranslat.t;
|
|
6903
|
+
renderCounter.count(ViewPresetMenu.name);
|
|
6904
|
+
return jsx(CustomDialog, {
|
|
6905
|
+
open: isOpen,
|
|
6906
|
+
onClose: function onClose() {
|
|
6907
|
+
if (closeMenu) {
|
|
6908
|
+
closeMenu();
|
|
6909
|
+
}
|
|
6910
|
+
},
|
|
6911
|
+
isResizable: true,
|
|
6912
|
+
hasLayout: false,
|
|
6913
|
+
resizableDefaultSize: {
|
|
6901
6914
|
width: 380,
|
|
6902
6915
|
height: '90%'
|
|
6903
6916
|
},
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
minWidth: 280,
|
|
6907
|
-
style: {
|
|
6908
|
-
display: 'flex',
|
|
6909
|
-
alignItems: 'center',
|
|
6910
|
-
justifyContent: 'center'
|
|
6911
|
-
},
|
|
6912
|
-
enable: {
|
|
6913
|
-
top: true,
|
|
6914
|
-
right: true,
|
|
6915
|
-
bottom: true,
|
|
6916
|
-
left: true,
|
|
6917
|
-
topRight: true,
|
|
6918
|
-
bottomRight: true,
|
|
6919
|
-
bottomLeft: true,
|
|
6920
|
-
topLeft: true
|
|
6921
|
-
},
|
|
6917
|
+
shouldRenderInline: true,
|
|
6918
|
+
"data-testid": "workspace-viewpreset-menu",
|
|
6922
6919
|
children: jsx(ToolContainer, {
|
|
6923
|
-
title:
|
|
6924
|
-
onClose:
|
|
6920
|
+
title: t('workspace-viewpreset-menu'),
|
|
6921
|
+
onClose: closeMenu,
|
|
6925
6922
|
style: {
|
|
6926
6923
|
width: '100%',
|
|
6927
6924
|
height: '100%'
|
|
@@ -6929,40 +6926,11 @@ var ResizeMenu = function ResizeMenu(_ref) {
|
|
|
6929
6926
|
onClick: function onClick(event) {
|
|
6930
6927
|
event.stopPropagation();
|
|
6931
6928
|
},
|
|
6932
|
-
children:
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
};
|
|
6936
|
-
|
|
6937
|
-
var ViewPresetMenu = function ViewPresetMenu(_ref) {
|
|
6938
|
-
var _ref$hideBackdrop = _ref.hideBackdrop,
|
|
6939
|
-
hideBackdrop = _ref$hideBackdrop === void 0 ? false : _ref$hideBackdrop,
|
|
6940
|
-
closeMenu = _ref.closeMenu,
|
|
6941
|
-
panelId = _ref.panelId;
|
|
6942
|
-
var _useWorkspaceTranslat = useWorkspaceTranslation(),
|
|
6943
|
-
t = _useWorkspaceTranslat.t;
|
|
6944
|
-
var toolContainer = jsx(ResizeMenu, {
|
|
6945
|
-
title: t('workspace-viewpreset-menu'),
|
|
6946
|
-
onCloseMenu: closeMenu,
|
|
6947
|
-
children: jsx(ViewPresetMenuListConnect, {
|
|
6948
|
-
panelId: panelId
|
|
6929
|
+
children: jsx(ViewPresetMenuListConnect, {
|
|
6930
|
+
panelId: panelId
|
|
6931
|
+
})
|
|
6949
6932
|
})
|
|
6950
6933
|
});
|
|
6951
|
-
renderCounter.count(ViewPresetMenu.name);
|
|
6952
|
-
return hideBackdrop ?
|
|
6953
|
-
// Enable hiding backdrop from snapshot tests
|
|
6954
|
-
toolContainer : jsxs(Backdrop, {
|
|
6955
|
-
"data-testid": "viewpresetMenuBackdrop",
|
|
6956
|
-
open: true,
|
|
6957
|
-
sx: Object.assign({
|
|
6958
|
-
'&.MuiBackdrop-root': {
|
|
6959
|
-
position: 'absolute',
|
|
6960
|
-
zIndex: 1002
|
|
6961
|
-
}
|
|
6962
|
-
}, BackdropStyle()),
|
|
6963
|
-
onClick: closeMenu,
|
|
6964
|
-
children: [BackdropElement(), toolContainer]
|
|
6965
|
-
});
|
|
6966
6934
|
};
|
|
6967
6935
|
|
|
6968
6936
|
var workspacePresetOptionId = 'workspace-options-toolbutton';
|
|
@@ -7504,14 +7472,15 @@ var WorkspaceTileConnect = /*#__PURE__*/React.memo(function (_ref2) {
|
|
|
7504
7472
|
})
|
|
7505
7473
|
}), defaultComponentsLookupResult, genericComponentsLookupResult, jsx(FetchViewPresets, {
|
|
7506
7474
|
panelId: mosaicNodeId
|
|
7507
|
-
}),
|
|
7475
|
+
}), jsx(ViewPresetMenu, {
|
|
7508
7476
|
panelId: mosaicNodeId,
|
|
7509
7477
|
closeMenu: function closeMenu() {
|
|
7510
7478
|
toggleViewPresetDialog({
|
|
7511
7479
|
panelId: mosaicNodeId,
|
|
7512
7480
|
isViewPresetDialogOpen: false
|
|
7513
7481
|
});
|
|
7514
|
-
}
|
|
7482
|
+
},
|
|
7483
|
+
isOpen: isViewPresetDialogOpen
|
|
7515
7484
|
})]
|
|
7516
7485
|
});
|
|
7517
7486
|
}, isEqual);
|
|
@@ -7845,7 +7814,8 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect() {
|
|
|
7845
7814
|
return jsxs(Box, {
|
|
7846
7815
|
"data-testid": "workspace-selectlist-connect",
|
|
7847
7816
|
style: {
|
|
7848
|
-
height: '100%'
|
|
7817
|
+
height: '100%',
|
|
7818
|
+
width: '100%'
|
|
7849
7819
|
},
|
|
7850
7820
|
tabIndex: 0,
|
|
7851
7821
|
children: [isFetching && jsx(LinearProgress, {
|
|
@@ -7899,28 +7869,49 @@ var WorkspaceSelectListConnect = function WorkspaceSelectListConnect() {
|
|
|
7899
7869
|
};
|
|
7900
7870
|
|
|
7901
7871
|
var WorkspaceMenu = function WorkspaceMenu(_ref) {
|
|
7902
|
-
var _ref$
|
|
7903
|
-
|
|
7872
|
+
var _ref$isOpen = _ref.isOpen,
|
|
7873
|
+
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
7904
7874
|
closeMenu = _ref.closeMenu;
|
|
7905
7875
|
var _useWorkspaceTranslat = useWorkspaceTranslation(),
|
|
7906
7876
|
t = _useWorkspaceTranslat.t;
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
'
|
|
7919
|
-
|
|
7877
|
+
return jsx(CustomDialog, {
|
|
7878
|
+
open: isOpen,
|
|
7879
|
+
onClose: function onClose() {
|
|
7880
|
+
if (closeMenu) {
|
|
7881
|
+
closeMenu();
|
|
7882
|
+
}
|
|
7883
|
+
},
|
|
7884
|
+
isResizable: true,
|
|
7885
|
+
hasLayout: false,
|
|
7886
|
+
resizableDefaultSize: {
|
|
7887
|
+
width: 380,
|
|
7888
|
+
height: '90%'
|
|
7889
|
+
},
|
|
7890
|
+
slotProps: {
|
|
7891
|
+
backdrop: {
|
|
7892
|
+
style: {
|
|
7893
|
+
top: 40
|
|
7894
|
+
}
|
|
7895
|
+
},
|
|
7896
|
+
root: {
|
|
7897
|
+
style: {
|
|
7898
|
+
top: 40
|
|
7899
|
+
}
|
|
7920
7900
|
}
|
|
7921
|
-
},
|
|
7922
|
-
|
|
7923
|
-
children:
|
|
7901
|
+
},
|
|
7902
|
+
"data-testid": "workspace-menu",
|
|
7903
|
+
children: jsx(ToolContainer, {
|
|
7904
|
+
title: t('workspace-menu'),
|
|
7905
|
+
onClose: closeMenu,
|
|
7906
|
+
style: {
|
|
7907
|
+
width: '100%',
|
|
7908
|
+
height: '100%'
|
|
7909
|
+
},
|
|
7910
|
+
onClick: function onClick(event) {
|
|
7911
|
+
event.stopPropagation();
|
|
7912
|
+
},
|
|
7913
|
+
children: jsx(WorkspaceSelectListConnect, {})
|
|
7914
|
+
})
|
|
7924
7915
|
});
|
|
7925
7916
|
};
|
|
7926
7917
|
|
|
@@ -7960,7 +7951,8 @@ var WorkspaceMenuButton = function WorkspaceMenuButton(_ref) {
|
|
|
7960
7951
|
},
|
|
7961
7952
|
children: jsx(PresetWorkspace, {})
|
|
7962
7953
|
})
|
|
7963
|
-
}),
|
|
7954
|
+
}), jsx(WorkspaceMenu, {
|
|
7955
|
+
isOpen: showMenu,
|
|
7964
7956
|
closeMenu: onCloseMenu
|
|
7965
7957
|
})]
|
|
7966
7958
|
});
|
|
@@ -8586,20 +8578,26 @@ var WorkspacePresetsFormDialog = function WorkspacePresetsFormDialog(_ref) {
|
|
|
8586
8578
|
};
|
|
8587
8579
|
}();
|
|
8588
8580
|
var cancelLabel = t('workspace-cancel');
|
|
8589
|
-
return jsx(
|
|
8581
|
+
return jsx(CustomDialog, {
|
|
8590
8582
|
"data-testid": "workspace-preset-dialog",
|
|
8591
8583
|
title: getDialogTitle(action),
|
|
8592
8584
|
open: isOpen,
|
|
8593
|
-
confirmLabel: confirmLabel,
|
|
8594
|
-
cancelLabel: cancelLabel,
|
|
8595
8585
|
description: "",
|
|
8596
8586
|
onClose: onClose,
|
|
8597
8587
|
onSubmit: onSubmit,
|
|
8598
|
-
|
|
8599
|
-
|
|
8600
|
-
width:
|
|
8588
|
+
isResizable: true,
|
|
8589
|
+
resizableDefaultSize: {
|
|
8590
|
+
width: 500,
|
|
8591
|
+
height: 'auto'
|
|
8601
8592
|
},
|
|
8602
|
-
|
|
8593
|
+
actions: jsx(ConfirmationButtons, {
|
|
8594
|
+
onClose: onClose,
|
|
8595
|
+
cancelLabel: cancelLabel,
|
|
8596
|
+
isLoading: isLoading,
|
|
8597
|
+
onSubmit: onSubmit,
|
|
8598
|
+
confirmLabel: confirmLabel
|
|
8599
|
+
}),
|
|
8600
|
+
children: jsx(WorkspacePresetsForm, {
|
|
8603
8601
|
formValues: formValues,
|
|
8604
8602
|
error: error,
|
|
8605
8603
|
onSubmit: onSubmit,
|
|
@@ -8655,7 +8653,7 @@ var WorkspaceTabConnect = function WorkspaceTabConnect(_ref) {
|
|
|
8655
8653
|
title: title,
|
|
8656
8654
|
workspaceId: workspaceId,
|
|
8657
8655
|
appTitle: appTitle
|
|
8658
|
-
}),
|
|
8656
|
+
}), jsx(WorkspacePresetsFormDialogWrapper, {
|
|
8659
8657
|
isOpen: Boolean(dialogDetails),
|
|
8660
8658
|
onClose: closeWorkspaceActionDialog,
|
|
8661
8659
|
presetId: presetId || undefined,
|
|
@@ -8966,20 +8964,24 @@ var ViewPresetsFormDialog = function ViewPresetsFormDialog(_ref) {
|
|
|
8966
8964
|
return _ref3.apply(this, arguments);
|
|
8967
8965
|
};
|
|
8968
8966
|
}();
|
|
8969
|
-
return jsx(
|
|
8967
|
+
return jsx(CustomDialog, {
|
|
8970
8968
|
"data-testid": "map-preset-dialog",
|
|
8971
8969
|
title: title,
|
|
8972
8970
|
open: isOpen,
|
|
8973
|
-
confirmLabel: confirmLabel,
|
|
8974
|
-
cancelLabel: t('workspace-cancel'),
|
|
8975
8971
|
description: "",
|
|
8976
8972
|
onClose: onClose,
|
|
8977
8973
|
onSubmit: onSubmit,
|
|
8978
|
-
isLoading: isLoading,
|
|
8979
8974
|
sx: {
|
|
8980
8975
|
width: '330px'
|
|
8981
8976
|
},
|
|
8982
|
-
|
|
8977
|
+
actions: jsx(ConfirmationButtons, {
|
|
8978
|
+
onClose: onClose,
|
|
8979
|
+
cancelLabel: t('workspace-cancel'),
|
|
8980
|
+
isLoading: isLoading,
|
|
8981
|
+
onSubmit: onSubmit,
|
|
8982
|
+
confirmLabel: confirmLabel
|
|
8983
|
+
}),
|
|
8984
|
+
children: jsx(ViewPresetsForm, {
|
|
8983
8985
|
viewComponentType: viewComponentType,
|
|
8984
8986
|
formValues: formValues,
|
|
8985
8987
|
error: error,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export declare const DIALOG_TITLE = "View presets menu";
|
|
3
3
|
export interface ViewPresetMenuProps {
|
|
4
4
|
panelId: string;
|
|
5
|
-
hideBackdrop?: boolean;
|
|
6
5
|
closeMenu?: () => void;
|
|
6
|
+
isOpen?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const ViewPresetMenu: React.FC<ViewPresetMenuProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ResizeMenu';
|