@opengeoweb/shared 10.1.0 → 11.0.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/README.md
CHANGED
|
@@ -21,3 +21,7 @@ import { Example } from '@opengeoweb/shared';
|
|
|
21
21
|
## Running unit tests
|
|
22
22
|
|
|
23
23
|
Run `nx test shared` to execute the unit tests via [Jest](https://jestjs.io).
|
|
24
|
+
|
|
25
|
+
### TypeScript Documentation
|
|
26
|
+
|
|
27
|
+
- [TypeScript Docs](https://opengeoweb.gitlab.io/opengeoweb/typescript-docs/shared/)
|
package/index.esm.js
CHANGED
|
@@ -1970,7 +1970,8 @@ var UserMenu = function UserMenu(_ref) {
|
|
|
1970
1970
|
});
|
|
1971
1971
|
};
|
|
1972
1972
|
|
|
1973
|
-
var MenuItemTheme = function MenuItemTheme() {
|
|
1973
|
+
var MenuItemTheme = function MenuItemTheme(_ref) {
|
|
1974
|
+
var enableSpecialThemes = _ref.enableSpecialThemes;
|
|
1974
1975
|
var _useThemeContext = useThemeContext(),
|
|
1975
1976
|
namedTheme = _useThemeContext.namedTheme,
|
|
1976
1977
|
setThemeName = _useThemeContext.setThemeName;
|
|
@@ -2001,7 +2002,7 @@ var MenuItemTheme = function MenuItemTheme() {
|
|
|
2001
2002
|
checked: (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.DARK_THEME
|
|
2002
2003
|
}),
|
|
2003
2004
|
label: t('shared-dark')
|
|
2004
|
-
}), jsx(FormControlLabel, {
|
|
2005
|
+
}), enableSpecialThemes && jsx(FormControlLabel, {
|
|
2005
2006
|
value: ThemeTypes.XMAS2024_THEME,
|
|
2006
2007
|
control: jsx(Radio, {
|
|
2007
2008
|
checked: (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.XMAS2024_THEME
|
|
@@ -3939,10 +3940,13 @@ var CustomAccordion = function CustomAccordion(_ref) {
|
|
|
3939
3940
|
return setExpanded(expanded);
|
|
3940
3941
|
},
|
|
3941
3942
|
disableGutters: disableGutters,
|
|
3942
|
-
|
|
3943
|
-
|
|
3943
|
+
slotProps: {
|
|
3944
|
+
transition: {
|
|
3945
|
+
timeout: transitionDuration
|
|
3946
|
+
}
|
|
3944
3947
|
},
|
|
3945
3948
|
children: [jsx(AccordionSummary, {
|
|
3949
|
+
component: "div",
|
|
3946
3950
|
expandIcon: CustomExpandIcon ? jsx(CustomExpandIcon, {
|
|
3947
3951
|
style: {
|
|
3948
3952
|
fill: "" + iconColor
|
|
@@ -4838,18 +4842,8 @@ var FilterOption = function FilterOption(_ref) {
|
|
|
4838
4842
|
})
|
|
4839
4843
|
}), jsx(ListItemText, {
|
|
4840
4844
|
id: optionId,
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
margin: 0
|
|
4844
|
-
},
|
|
4845
|
-
primary: jsx(Typography, {
|
|
4846
|
-
variant: "body2",
|
|
4847
|
-
sx: Object.assign({
|
|
4848
|
-
fontSize: '16px',
|
|
4849
|
-
textOverflow: 'ellipsis',
|
|
4850
|
-
whiteSpace: 'nowrap',
|
|
4851
|
-
overflow: 'hidden'
|
|
4852
|
-
}, labelStyle),
|
|
4845
|
+
primary: jsx(Box, {
|
|
4846
|
+
sx: Object.assign({}, labelStyle),
|
|
4853
4847
|
children: label
|
|
4854
4848
|
})
|
|
4855
4849
|
})]
|
|
@@ -5861,4 +5855,31 @@ var RenderCounter = /*#__PURE__*/function () {
|
|
|
5861
5855
|
}();
|
|
5862
5856
|
var renderCounter = new RenderCounter();
|
|
5863
5857
|
|
|
5864
|
-
|
|
5858
|
+
/* *
|
|
5859
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5860
|
+
* you may not use this file except in compliance with the License.
|
|
5861
|
+
* You may obtain a copy of the License at
|
|
5862
|
+
*
|
|
5863
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5864
|
+
*
|
|
5865
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5866
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5867
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5868
|
+
* See the License for the specific language governing permissions and
|
|
5869
|
+
* limitations under the License.
|
|
5870
|
+
*
|
|
5871
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5872
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
5873
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5874
|
+
* */
|
|
5875
|
+
// eslint-disable-next-line no-redeclare
|
|
5876
|
+
var SystemScope = {
|
|
5877
|
+
user: 'user',
|
|
5878
|
+
system: 'system'
|
|
5879
|
+
};
|
|
5880
|
+
// eslint-disable-next-line no-redeclare
|
|
5881
|
+
var PresetScope = Object.assign({}, SystemScope, {
|
|
5882
|
+
shared: 'shared'
|
|
5883
|
+
});
|
|
5884
|
+
|
|
5885
|
+
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, CanvasComponent, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEBOUNCE_TIMEOUT, DEFAULT_ERROR_MESSAGE, DEFAULT_FILTER_HEIGHT, DraggableComponent$1 as Draggable, ErrorBoundary, Filter, FilterChip, FilterOption, LastUpdateTime, PROJECTION, PresetScope, ResizeComponent as Resizable, SHARED_NAMESPACE, SearchField$1 as SearchField, SearchFieldButton, SearchHighlight, StatusTag, StorybookDocsWrapper, SwitchButton, SystemScope, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, UserMenuItemSentryRecording, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, createToolkitMockStore, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, isAxiosAuthError, isAxiosError, pollingIntervalTimeout, renderCounter, sharedTranslations, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, useWheelStopPropagation };
|
package/package.json
CHANGED
package/src/lib/types/types.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export interface ConfigType {
|
|
|
22
22
|
GW_DRAWINGS_BASE_URL?: string;
|
|
23
23
|
GW_TECHNICAL_RELEASE_NOTES_URL?: string;
|
|
24
24
|
GW_VERSION_PROGRESS_NOTES_URL?: string;
|
|
25
|
+
GW_LOCATION_BASE_URL?: string;
|
|
25
26
|
GW_FEATURE_APP_TITLE?: string;
|
|
26
27
|
GW_FEATURE_FORCE_AUTHENTICATION?: boolean;
|
|
27
28
|
GW_FEATURE_MODULE_SPACE_WEATHER?: boolean;
|
|
@@ -31,6 +32,7 @@ export interface ConfigType {
|
|
|
31
32
|
GW_FEATURE_MENU_FE_VERSION?: boolean;
|
|
32
33
|
GW_FEATURE_DISPLAY_SEARCH_ON_MAP?: boolean;
|
|
33
34
|
GW_FEATURE_INITIALIZE_SENTRY?: boolean;
|
|
35
|
+
GW_FEATURE_ENABLE_SPECIAL_THEMES?: boolean;
|
|
34
36
|
GW_LANGUAGE?: string;
|
|
35
37
|
}
|
|
36
38
|
export interface TimeSeriesService {
|
|
@@ -39,10 +41,20 @@ export interface TimeSeriesService {
|
|
|
39
41
|
url: string;
|
|
40
42
|
type: ServiceInterface;
|
|
41
43
|
name: string;
|
|
42
|
-
scope?:
|
|
44
|
+
scope?: SystemScope;
|
|
43
45
|
}
|
|
44
46
|
export type ServiceInterface = 'EDR' | 'OGC';
|
|
45
|
-
export type
|
|
47
|
+
export type SystemScope = 'user' | 'system';
|
|
48
|
+
export declare const SystemScope: {
|
|
49
|
+
readonly user: SystemScope;
|
|
50
|
+
readonly system: SystemScope;
|
|
51
|
+
};
|
|
52
|
+
export type PresetScope = SystemScope | 'shared';
|
|
53
|
+
export declare const PresetScope: {
|
|
54
|
+
readonly shared: PresetScope;
|
|
55
|
+
readonly user: SystemScope;
|
|
56
|
+
readonly system: SystemScope;
|
|
57
|
+
};
|
|
46
58
|
export interface PlotPreset {
|
|
47
59
|
connectedMap?: string;
|
|
48
60
|
mapId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosError } from 'axios';
|
|
2
2
|
export declare const DEFAULT_ERROR_MESSAGE = "An error has occurred";
|
|
3
|
-
export declare const isAxiosError: (error: AxiosError | Error) => error is AxiosError
|
|
3
|
+
export declare const isAxiosError: (error: AxiosError | Error) => error is AxiosError<unknown, any>;
|
|
4
4
|
export declare const isAxiosAuthError: (error: AxiosError | Error) => boolean;
|
|
5
5
|
export declare const getAxiosErrorMessage: (error: AxiosError) => string;
|
|
6
6
|
export declare const getErrorMessage: (error: Error | AxiosError) => string;
|