@opengeoweb/shared 12.3.0 → 12.4.2

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
@@ -7,9 +7,10 @@ import { Resizable } from 're-resizable';
7
7
  import { Resize, Options, Close, ChevronLeft, Exclamation, Success, Info, ChevronRight, GeoWebLogo, HamburgerMenu, Admin, useThemeContext, ThemeTypes, KeyOption, ArrowLeft, ArrowRight, KeyCommand, ArrowUp, ArrowDown, ChevronDown, Search, Clear, Cached } from '@opengeoweb/theme';
8
8
  import 'i18next';
9
9
  import { initReactI18next, useTranslation } from 'react-i18next';
10
- import { throttle, escapeRegExp, debounce } from 'lodash';
10
+ import { throttle, merge, escapeRegExp, debounce } from 'lodash';
11
11
  import * as Sentry from '@sentry/react';
12
12
  import { parseISO, parse, format, isEqual, add as add$1, sub as sub$1, differenceInYears as differenceInYears$1, differenceInMonths as differenceInMonths$1, differenceInDays as differenceInDays$1, differenceInMinutes as differenceInMinutes$1, differenceInHours as differenceInHours$1, differenceInSeconds as differenceInSeconds$1, roundToNearestMinutes as roundToNearestMinutes$1, isBefore as isBefore$1, isAfter as isAfter$1, isValid as isValid$1, getUnixTime, fromUnixTime, set as set$1, getHours as getHours$1, startOfDay, addMinutes, addHours, setSeconds as setSeconds$1, getDay, getDayOfYear, getMonth, getWeek, getYear, isWithinInterval } from 'date-fns';
13
+ import { fi as fi$1, nl as nl$1, nb, enGB } from 'date-fns/locale';
13
14
 
14
15
  var en = {
15
16
  "shared-choose-app-mode": "Choose your default app mode",
@@ -18,7 +19,7 @@ var en = {
18
19
  "shared-viewer": "Viewer",
19
20
  "shared-editor": "Editor",
20
21
  "shared-reload-page": "Reload page",
21
- "shared-search-label": "Search through services or enter a service URL",
22
+ "shared-search-services": "Search through services or enter a service URL",
22
23
  "shared-last-updated": "Last updated {{time}}",
23
24
  "shared-click-to-refresh": "Click to refresh",
24
25
  "shared-error-occurred": "Woops, an error has occurred. Please report the error shown below and reload the page if needed.",
@@ -81,7 +82,7 @@ var fi = {
81
82
  "shared-viewer": "Katselu",
82
83
  "shared-editor": "Muokkain",
83
84
  "shared-reload-page": "Lataa sivu uudelleen",
84
- "shared-search-label": "Etsi palveluista tai lisää palvelun URL-osoite",
85
+ "shared-search-services": "Etsi palveluista tai lisää palvelun URL-osoite",
85
86
  "shared-last-updated": "Päivitetty viimeksi {{time}}",
86
87
  "shared-click-to-refresh": "Napsauta päivittääksesi",
87
88
  "shared-error-occurred": "Hups, virhe havaittu. Ilmoita ongelmasta eteenpäin ja lataa sivu uudelleen tarvittaessa",
@@ -144,7 +145,7 @@ var no = {
144
145
  "shared-viewer": "Viewer",
145
146
  "shared-editor": "Editor",
146
147
  "shared-reload-page": "Last inn på nytt",
147
- "shared-search-label": "Søk gjennom tjenester eller legg inn URL",
148
+ "shared-search-services": "Søk gjennom tjenester eller legg inn URL",
148
149
  "shared-last-updated": "Sist oppdatert",
149
150
  "shared-click-to-refresh": "Trykk for å laste inn på nytt",
150
151
  "shared-error-occurred": "Woops, an error has occurred. Please report the error shown below and reload the page if needed.",
@@ -207,7 +208,7 @@ var nl = {
207
208
  "shared-viewer": "Kijker",
208
209
  "shared-editor": "Bewerker",
209
210
  "shared-reload-page": "Pagina vernieuwen",
210
- "shared-search-label": "Zoek door services of voer een service-URL in",
211
+ "shared-search-services": "Zoek door services of voer een service-URL in",
211
212
  "shared-last-updated": "Laatst bijgewerkt {{time}}",
212
213
  "shared-click-to-refresh": "Klik om te vernieuwen",
213
214
  "shared-error-occurred": "Oeps, er is een fout opgetreden. Rapporteer de onderstaande fout en herlaad de pagina indien nodig.",
@@ -1815,6 +1816,55 @@ var useWheelStopPropagation = function useWheelStopPropagation() {
1815
1816
  return ref;
1816
1817
  };
1817
1818
 
1819
+ /* *
1820
+ * Licensed under the Apache License, Version 2.0 (the "License");
1821
+ * you may not use this file except in compliance with the License.
1822
+ * You may obtain a copy of the License at
1823
+ *
1824
+ * http://www.apache.org/licenses/LICENSE-2.0
1825
+ *
1826
+ * Unless required by applicable law or agreed to in writing, software
1827
+ * distributed under the License is distributed on an "AS IS" BASIS,
1828
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1829
+ * See the License for the specific language governing permissions and
1830
+ * limitations under the License.
1831
+ *
1832
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1833
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
1834
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
1835
+ * */
1836
+ /**
1837
+ * This hook allows to stop wheel events from propagating to parent elements.
1838
+ * Normally, when you scroll a child element, the scroll event will propagate to the parent element,
1839
+ * as calling event.stopPropagation() on syncthetic events does not stop the propagation
1840
+ */
1841
+ var useScrollingInIsolation = function useScrollingInIsolation(options) {
1842
+ var scrollInIsolationRef = React__default.useRef(null);
1843
+ React__default.useEffect(function () {
1844
+ var element = scrollInIsolationRef.current;
1845
+ if (!element) {
1846
+ return;
1847
+ }
1848
+ var handleWheel = function handleWheel(event) {
1849
+ if (event.metaKey || event.ctrlKey) {
1850
+ event.stopPropagation();
1851
+ event.preventDefault();
1852
+ }
1853
+ if (options != null && options.onWheel) {
1854
+ options.onWheel(event);
1855
+ }
1856
+ };
1857
+ element.addEventListener('wheel', handleWheel, {
1858
+ passive: false
1859
+ });
1860
+ // eslint-disable-next-line consistent-return
1861
+ return function () {
1862
+ element.removeEventListener('wheel', handleWheel);
1863
+ };
1864
+ }, [options]);
1865
+ return scrollInIsolationRef;
1866
+ };
1867
+
1818
1868
  var ConfirmationServiceContext = /*#__PURE__*/React.createContext(Promise.reject);
1819
1869
  var useConfirmationDialog = function useConfirmationDialog() {
1820
1870
  return React.useContext(ConfirmationServiceContext);
@@ -3867,7 +3917,7 @@ var getInitials = function getInitials(name) {
3867
3917
  }
3868
3918
  };
3869
3919
 
3870
- var _excluded$6 = ["value", "orientation", "shouldAutoFocus"];
3920
+ var _excluded$6 = ["value", "orientation", "shouldAutoFocus", "extraStyles"];
3871
3921
  var sliderHeaderStyle = {
3872
3922
  fontFamily: 'Roboto-Black, Roboto',
3873
3923
  fontSize: 12,
@@ -3924,6 +3974,8 @@ var CustomSlider = function CustomSlider(_ref) {
3924
3974
  orientation = _ref$orientation === void 0 ? 'vertical' : _ref$orientation,
3925
3975
  _ref$shouldAutoFocus = _ref.shouldAutoFocus,
3926
3976
  shouldAutoFocus = _ref$shouldAutoFocus === void 0 ? false : _ref$shouldAutoFocus,
3977
+ _ref$extraStyles = _ref.extraStyles,
3978
+ extraStyles = _ref$extraStyles === void 0 ? {} : _ref$extraStyles,
3927
3979
  props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
3928
3980
  // Add custom class (for bold text) to label adjacent to thumb component.
3929
3981
  // Material UI doesn't support highlighing only adjacent label
@@ -3953,8 +4005,9 @@ var CustomSlider = function CustomSlider(_ref) {
3953
4005
  }
3954
4006
  // eslint-disable-next-line react-hooks/exhaustive-deps
3955
4007
  }, []);
4008
+ var mergedStyles = merge(extraStyles, sliderStyle);
3956
4009
  return jsx(Slider, Object.assign({
3957
- sx: sliderStyle,
4010
+ sx: mergedStyles,
3958
4011
  ref: element,
3959
4012
  value: value,
3960
4013
  orientation: orientation,
@@ -3986,7 +4039,7 @@ var CustomToggleButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3986
4039
  }, props));
3987
4040
  });
3988
4041
 
3989
- var _excluded$4 = ["tooltip", "list", "currentIndex", "onChangeMouseWheel", "requiresCtrlToChange", "isEnabled", "hasBackgroundColor", "variant", "additionalStyling", "skipLocalStyling"],
4042
+ var _excluded$4 = ["tooltip", "list", "currentIndex", "onChangeMouseWheel", "isEnabled", "hasBackgroundColor", "variant", "additionalStyling", "skipLocalStyling"],
3990
4043
  _excluded2 = ["className", "additionalStyling"];
3991
4044
  var TooltipSelect = function TooltipSelect(_ref) {
3992
4045
  var _ref$tooltip = _ref.tooltip,
@@ -3997,8 +4050,6 @@ var TooltipSelect = function TooltipSelect(_ref) {
3997
4050
  currentIndex = _ref$currentIndex === void 0 ? -1 : _ref$currentIndex,
3998
4051
  _ref$onChangeMouseWhe = _ref.onChangeMouseWheel,
3999
4052
  onChangeMouseWheel = _ref$onChangeMouseWhe === void 0 ? function () {} : _ref$onChangeMouseWhe,
4000
- _ref$requiresCtrlToCh = _ref.requiresCtrlToChange,
4001
- requiresCtrlToChange = _ref$requiresCtrlToCh === void 0 ? false : _ref$requiresCtrlToCh,
4002
4053
  isEnabled = _ref.isEnabled,
4003
4054
  hasBackgroundColor = _ref.hasBackgroundColor,
4004
4055
  _ref$variant = _ref.variant,
@@ -4015,10 +4066,10 @@ var TooltipSelect = function TooltipSelect(_ref) {
4015
4066
  tooltipOpen = _useControlledTooltip[0],
4016
4067
  setTooltipOpen = _useControlledTooltip[1];
4017
4068
  var onWheel = React.useCallback(function (event) {
4018
- if (requiresCtrlToChange && (event.ctrlKey || event.metaKey) || !requiresCtrlToChange) {
4019
- if (selectOpen) {
4020
- return;
4021
- }
4069
+ if (selectOpen) {
4070
+ return;
4071
+ }
4072
+ if (event.ctrlKey || event.metaKey) {
4022
4073
  var direction = event.deltaY < 0 ? 1 : -1;
4023
4074
  var newIndex = currentIndex - direction;
4024
4075
  if (newIndex < 0 || newIndex >= list.length) {
@@ -4026,7 +4077,7 @@ var TooltipSelect = function TooltipSelect(_ref) {
4026
4077
  }
4027
4078
  onChangeMouseWheel(list[newIndex]);
4028
4079
  }
4029
- }, [selectOpen, currentIndex, list, onChangeMouseWheel, requiresCtrlToChange]);
4080
+ }, [selectOpen, currentIndex, list, onChangeMouseWheel]);
4030
4081
  var onOpen = React.useCallback(function () {
4031
4082
  setSelectOpen(true);
4032
4083
  setTooltipOpen(false);
@@ -4050,11 +4101,15 @@ var TooltipSelect = function TooltipSelect(_ref) {
4050
4101
  var onBlur = React.useCallback(function () {
4051
4102
  setTooltipOpen(false);
4052
4103
  }, [setTooltipOpen]);
4104
+ var scrollInIsolationRef = useScrollingInIsolation({
4105
+ onWheel: onWheel
4106
+ });
4053
4107
  return jsx(CustomTooltip, {
4054
4108
  title: tooltip,
4055
4109
  placement: "top",
4056
4110
  open: tooltipOpen,
4057
4111
  children: jsx(StyledSelect, Object.assign({
4112
+ ref: scrollInIsolationRef,
4058
4113
  variant: variant,
4059
4114
  disableUnderline: true,
4060
4115
  onOpen: onOpen,
@@ -4063,7 +4118,6 @@ var TooltipSelect = function TooltipSelect(_ref) {
4063
4118
  onMouseLeave: onMouseLeave,
4064
4119
  onFocus: onFocus,
4065
4120
  onBlur: onBlur,
4066
- onWheel: onWheel,
4067
4121
  isEnabled: isEnabled,
4068
4122
  hasBackgroundColor: hasBackgroundColor,
4069
4123
  additionalStyling: additionalStyling,
@@ -4395,7 +4449,7 @@ var SearchFieldButton = function SearchFieldButton(_ref2) {
4395
4449
  setPopupIsOpen = _ref2.setPopupIsOpen;
4396
4450
  var _useSharedTranslation2 = useSharedTranslation(),
4397
4451
  t = _useSharedTranslation2.t;
4398
- if (isURL(localSearchString)) {
4452
+ if (isURL(localSearchString) && setPopupIsOpen) {
4399
4453
  return jsxs(Fragment, {
4400
4454
  children: [jsx("div", {
4401
4455
  style: {
@@ -4429,11 +4483,33 @@ var SearchFieldButton = function SearchFieldButton(_ref2) {
4429
4483
  });
4430
4484
  };
4431
4485
 
4486
+ var stylesSmall = {
4487
+ '.MuiInputLabel-root': {
4488
+ lineHeight: '16px',
4489
+ fontSize: '12px',
4490
+ top: '-6px',
4491
+ transform: 'translate(12px, 7px) scale(1)',
4492
+ ':not(.MuiInputLabel-shrink)': {
4493
+ transform: 'translate(12px, 10px) scale(1.6)'
4494
+ }
4495
+ },
4496
+ '.MuiFilledInput-input': {
4497
+ lineHeight: '20px',
4498
+ padding: '10px 0 1px 12px'
4499
+ },
4500
+ '.MuiButtonBase-root.MuiIconButton-root': {
4501
+ height: '32px!important',
4502
+ width: '32px!important',
4503
+ marginRight: '-4px!important'
4504
+ }
4505
+ };
4432
4506
  var SearchField$1 = function SearchField(_ref) {
4433
4507
  var searchFilter = _ref.searchFilter,
4434
4508
  label = _ref.label,
4435
4509
  setSearchFilter = _ref.setSearchFilter,
4436
- onOpenServicePopup = _ref.onOpenServicePopup;
4510
+ onOpenServicePopup = _ref.onOpenServicePopup,
4511
+ _ref$small = _ref.small,
4512
+ small = _ref$small === void 0 ? false : _ref$small;
4437
4513
  var _React$useState = React.useState(''),
4438
4514
  localSearchString = _React$useState[0],
4439
4515
  setLocalSearchString = _React$useState[1];
@@ -4442,7 +4518,7 @@ var SearchField$1 = function SearchField(_ref) {
4442
4518
  setUrlIsValid = _React$useState2[1];
4443
4519
  var _useTranslation = useTranslation(SHARED_NAMESPACE),
4444
4520
  t = _useTranslation.t;
4445
- var translatedLabel = label || t('shared-search-label');
4521
+ var translatedLabel = label || (onOpenServicePopup ? t('shared-search-services') : t('shared-search'));
4446
4522
  // eslint-disable-next-line react-hooks/exhaustive-deps
4447
4523
  var setSearchFilterDebounced = React.useCallback(debounce(setSearchFilter, 300), []);
4448
4524
  var handleChange = function handleChange(text) {
@@ -4462,7 +4538,7 @@ var SearchField$1 = function SearchField(_ref) {
4462
4538
  var keyDownHandler = function keyDownHandler(event) {
4463
4539
  if (event.key === 'Enter') {
4464
4540
  event.preventDefault();
4465
- if (urlIsValid) {
4541
+ if (urlIsValid && onOpenServicePopup) {
4466
4542
  onOpenServicePopup(localSearchString);
4467
4543
  setLocalSearchString('');
4468
4544
  }
@@ -4495,10 +4571,10 @@ var SearchField$1 = function SearchField(_ref) {
4495
4571
  endAdornment: jsx(InputAdornment, {
4496
4572
  position: "end",
4497
4573
  children: jsx(SearchFieldButton, {
4498
- setPopupIsOpen: function setPopupIsOpen() {
4574
+ setPopupIsOpen: onOpenServicePopup ? function () {
4499
4575
  onOpenServicePopup(localSearchString);
4500
4576
  setLocalSearchString('');
4501
- },
4577
+ } : undefined,
4502
4578
  localSearchString: localSearchString,
4503
4579
  onClickClear: function onClickClear() {
4504
4580
  setLocalSearchString('');
@@ -4508,7 +4584,8 @@ var SearchField$1 = function SearchField(_ref) {
4508
4584
  })
4509
4585
  })
4510
4586
  }
4511
- }
4587
+ },
4588
+ sx: small ? stylesSmall : {}
4512
4589
  });
4513
4590
  };
4514
4591
 
@@ -5280,6 +5357,18 @@ var DATE_FORMAT_NAME_OF_DAY = 'eee dd/MM/yyyy HH:mm';
5280
5357
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5281
5358
  * */
5282
5359
  // eslint-disable-next-line no-restricted-imports
5360
+ var getDateFnsLocale = function getDateFnsLocale(locale) {
5361
+ if (locale === 'fi') {
5362
+ return fi$1;
5363
+ }
5364
+ if (locale === 'nl') {
5365
+ return nl$1;
5366
+ }
5367
+ if (locale === 'no') {
5368
+ return nb;
5369
+ }
5370
+ return enGB;
5371
+ };
5283
5372
  /**
5284
5373
  * Parsing date strings with geoweb dateUtils:
5285
5374
  *
@@ -5430,7 +5519,7 @@ var setUTCDate = function setUTCDate(inDate) {
5430
5519
  * @example
5431
5520
  * ``` dateToString(new Date(2022, 10, 12, 15, 30), 'dd MMM yyyy') ```
5432
5521
  */
5433
- var dateToString = function dateToString(inDate, strFormat, utc) {
5522
+ var dateToString = function dateToString(inDate, strFormat, utc, locale) {
5434
5523
  if (strFormat === void 0) {
5435
5524
  strFormat = DATE_FORMAT_UTC;
5436
5525
  }
@@ -5440,7 +5529,11 @@ var dateToString = function dateToString(inDate, strFormat, utc) {
5440
5529
  if (!inDate || !isValid(inDate)) {
5441
5530
  return undefined;
5442
5531
  }
5443
- var formattedDate = utc ? format(new Date(inDate.getUTCFullYear(), inDate.getUTCMonth(), inDate.getUTCDate(), inDate.getUTCHours(), inDate.getUTCMinutes(), inDate.getUTCSeconds()), strFormat) : format(inDate, strFormat);
5532
+ var formattedDate = utc ? format(new Date(inDate.getUTCFullYear(), inDate.getUTCMonth(), inDate.getUTCDate(), inDate.getUTCHours(), inDate.getUTCMinutes(), inDate.getUTCSeconds()), strFormat, {
5533
+ locale: getDateFnsLocale(locale)
5534
+ }) : format(inDate, strFormat, {
5535
+ locale: getDateFnsLocale(locale)
5536
+ });
5444
5537
  return formattedDate;
5445
5538
  };
5446
5539
  /**
@@ -5960,6 +6053,7 @@ var index = /*#__PURE__*/Object.freeze({
5960
6053
  differenceInYears: differenceInYears,
5961
6054
  fromUnix: fromUnix,
5962
6055
  getCurrentTimeAsString: getCurrentTimeAsString,
6056
+ getDateFnsLocale: getDateFnsLocale,
5963
6057
  getDay: getDay,
5964
6058
  getDayOfYear: getDayOfYear,
5965
6059
  getHours: getHours,
@@ -6238,4 +6332,4 @@ var SystemScope = {
6238
6332
  system: 'system'
6239
6333
  };
6240
6334
 
6241
- export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, CanvasComponent, ConfirmationButtons, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomDialogHeader, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEBOUNCE_TIMEOUT, DEFAULT_ERROR_MESSAGE, DEFAULT_FILTER_HEIGHT, DraggableComponent$1 as Draggable, ErrorBoundary, Filter, FilterChip, FilterOption, LastUpdateTime, PROJECTION, ResizeComponent as Resizable, SHARED_NAMESPACE, SearchField$1 as SearchField, SearchFieldButton, SearchHighlight, SessionStorageKey, StatusTag, StorybookDocsWrapper, StyledSelect, SwitchButton, SystemScope, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, UserMenuItemSentryRecording, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, isAxiosAuthError, isAxiosError, loadAllTranslations, pollingIntervalTimeout, renderCounter, safelyInitI18nForTestsAndStories, sessionStorageProvider, sharedTranslations, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, useWheelStopPropagation };
6335
+ export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, CanvasComponent, ConfirmationButtons, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomDialogHeader, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEBOUNCE_TIMEOUT, DEFAULT_ERROR_MESSAGE, DEFAULT_FILTER_HEIGHT, DraggableComponent$1 as Draggable, ErrorBoundary, Filter, FilterChip, FilterOption, LastUpdateTime, PROJECTION, ResizeComponent as Resizable, SHARED_NAMESPACE, SearchField$1 as SearchField, SearchFieldButton, SearchHighlight, SessionStorageKey, StatusTag, StorybookDocsWrapper, StyledSelect, SwitchButton, SystemScope, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, UserMenuItemSentryRecording, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, isAxiosAuthError, isAxiosError, loadAllTranslations, pollingIntervalTimeout, renderCounter, safelyInitI18nForTestsAndStories, sessionStorageProvider, sharedTranslations, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useScrollingInIsolation, useUserMenu, useWheelStopPropagation };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/shared",
3
- "version": "12.3.0",
3
+ "version": "12.4.2",
4
4
  "description": "GeoWeb shared library with shared components and utils for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,14 +8,14 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/theme": "12.3.0",
11
+ "@opengeoweb/theme": "12.4.2",
12
12
  "react-draggable": "^4.4.6",
13
13
  "re-resizable": "^6.9.11",
14
14
  "lodash": "^4.17.21",
15
15
  "axios": "^1.7.7",
16
16
  "date-fns": "^4.1.0",
17
17
  "react-i18next": "^15.1.1",
18
- "i18next": "^23.11.5",
18
+ "i18next": "^25.0.1",
19
19
  "@sentry/react": "^8.34.0",
20
20
  "@mui/material": "^7.0.1"
21
21
  },
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SliderProps } from '@mui/material';
2
+ import { SliderProps, SxProps } from '@mui/material';
3
3
  export declare const sliderHeaderStyle: {
4
4
  fontFamily: string;
5
5
  fontSize: number;
@@ -8,6 +8,7 @@ export declare const sliderHeaderStyle: {
8
8
  };
9
9
  interface CustomSliderProps extends SliderProps {
10
10
  shouldAutoFocus?: boolean;
11
+ extraStyles?: SxProps;
11
12
  }
12
13
  export declare const CustomSlider: React.FC<CustomSliderProps>;
13
14
  export default CustomSlider;
@@ -3,7 +3,8 @@ interface SearchFieldProps {
3
3
  searchFilter: string;
4
4
  label?: string;
5
5
  setSearchFilter: (filterText: string) => void;
6
- onOpenServicePopup: (url: string) => void;
6
+ onOpenServicePopup?: (url: string) => void;
7
+ small?: boolean;
7
8
  }
8
9
  export declare const SearchField: React.FC<SearchFieldProps>;
9
10
  export {};
@@ -3,7 +3,7 @@ export declare const isURL: (string: string) => boolean;
3
3
  interface FieldButtonProps {
4
4
  localSearchString: string;
5
5
  onClickClear: () => void;
6
- setPopupIsOpen: (value: boolean) => void;
6
+ setPopupIsOpen?: (value: boolean) => void;
7
7
  }
8
8
  export declare const SearchFieldButton: React.FC<FieldButtonProps>;
9
9
  export {};
@@ -8,7 +8,6 @@ type TooltipSelectProps = Omit<BaseSelectProps, 'sx'> & {
8
8
  list?: ListElement[];
9
9
  currentIndex?: number;
10
10
  onChangeMouseWheel?: (element: ListElement) => void;
11
- requiresCtrlToChange?: boolean;
12
11
  isEnabled?: boolean;
13
12
  hasBackgroundColor?: boolean;
14
13
  variant?: SelectVariants;
@@ -5,3 +5,4 @@ export * from './useIsMounted/useIsMounted';
5
5
  export * from './useMakeSureContainerStaysInsideWindow/useMakeSureContainerStaysInsideWindow';
6
6
  export * from './useDebounce/useDebounce';
7
7
  export * from './useWheelStopPropagation/useWheelStopPropagation';
8
+ export * from './useScrollingInIsolation/useScrollingInIsolation';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This hook allows to stop wheel events from propagating to parent elements.
3
+ * Normally, when you scroll a child element, the scroll event will propagate to the parent element,
4
+ * as calling event.stopPropagation() on syncthetic events does not stop the propagation
5
+ */
6
+ import React from 'react';
7
+ interface ScrollInIsolationProps {
8
+ onWheel?: (event: WheelEvent) => void;
9
+ }
10
+ export declare const useScrollingInIsolation: <T extends HTMLElement>(options?: ScrollInIsolationProps) => React.RefObject<T>;
11
+ export {};
@@ -1,4 +1,4 @@
1
- import { parseISO, isEqual, Duration, startOfDay, isWithinInterval, getDayOfYear, getDay, getMonth, getYear, getWeek, NearestMinutes } from 'date-fns';
1
+ import { parseISO, isEqual, Duration, startOfDay, isWithinInterval, getDayOfYear, getDay, getMonth, getYear, getWeek, NearestMinutes, Locale } from 'date-fns';
2
2
  export interface DateValues {
3
3
  year?: number;
4
4
  month?: number;
@@ -8,6 +8,7 @@ export interface DateValues {
8
8
  seconds?: number;
9
9
  milliseconds?: number;
10
10
  }
11
+ export declare const getDateFnsLocale: (locale?: string) => Locale;
11
12
  /**
12
13
  * Parsing date strings with geoweb dateUtils:
13
14
  *
@@ -107,7 +108,7 @@ export declare const setUTCDate: (inDate: Date | undefined) => Date | undefined;
107
108
  * @example
108
109
  * ``` dateToString(new Date(2022, 10, 12, 15, 30), 'dd MMM yyyy') ```
109
110
  */
110
- export declare const dateToString: (inDate: Date | undefined, strFormat?: string, utc?: boolean) => string | undefined;
111
+ export declare const dateToString: (inDate: Date | undefined, strFormat?: string, utc?: boolean, locale?: string) => string | undefined;
111
112
  /**
112
113
  * Find out if a date is between two other dates.
113
114
  *