@opengeoweb/shared 9.35.1-spike-oltanstack.0 → 9.37.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { Box, Typography, Tooltip, IconButton, Dialog, DialogTitle, DialogContent, DialogActions, Button, CircularProgress, Alert, AlertTitle, useTheme, Drawer, Link, Avatar as Avatar$1, Paper, ClickAwayListener, MenuList, MenuItem, Grid2, RadioGroup, FormControlLabel, Radio, List, ListItem, Tabs, Tab, Backdrop, Switch, Slider, ToggleButton, Menu, ListSubheader, ListItemText, ListItemIcon, styled, Select, Accordion, AccordionSummary, AccordionDetails, FormLabel, TextField, InputAdornment, Chip, Stack, debounce as debounce$1, Checkbox, ListItemButton } from '@mui/material';
3
- import { Close, Exclamation, Success, Info, ChevronRight, GeoWebLogo, HamburgerMenu, Resize, Admin, useThemeContext, DragHandle, ArrowLeft, ArrowRight, KeyOption, ArrowUp, ArrowDown, KeyCommand, Options, ChevronDown, Search, Clear, Cached } from '@opengeoweb/theme';
3
+ import { Close, Exclamation, Success, Info, ChevronRight, GeoWebLogo, HamburgerMenu, Resize, Admin, useThemeContext, ThemeTypes, DragHandle, ArrowLeft, ArrowRight, KeyOption, ArrowUp, ArrowDown, KeyCommand, Options, ChevronDown, Search, Clear, Cached } from '@opengeoweb/theme';
4
4
  import * as React from 'react';
5
5
  import React__default, { useRef, Component, useState } from 'react';
6
6
  import 'i18next';
@@ -10,7 +10,7 @@ import Draggable from 'react-draggable';
10
10
  import { Resizable } from 're-resizable';
11
11
  import * as Sentry from '@sentry/react';
12
12
  import { useStore } from 'react-redux';
13
- 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, getDay, getDayOfYear, getMonth, getWeek, getYear, isWithinInterval } from 'date-fns';
13
+ 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';
14
14
  import { configureStore } from '@reduxjs/toolkit';
15
15
 
16
16
  var en = {
@@ -66,6 +66,7 @@ var en = {
66
66
  "shared-clear": "Clear",
67
67
  "shared-light": "Light",
68
68
  "shared-dark": "Dark",
69
+ "shared-xmas": "Christmas",
69
70
  "shared-filter-all": "All",
70
71
  "shared-filter-my-presets": "My presets",
71
72
  "shared-filter-system-presets": "System presets",
@@ -125,6 +126,7 @@ var fi = {
125
126
  "shared-clear": "Tyhjennä",
126
127
  "shared-light": "Vaalea",
127
128
  "shared-dark": "Tumma",
129
+ "shared-xmas": "Joulu",
128
130
  "shared-filter-all": "Kaikki",
129
131
  "shared-filter-my-presets": "Omat presetit",
130
132
  "shared-filter-system-presets": "Järestelmä presetit",
@@ -184,6 +186,7 @@ var no = {
184
186
  "shared-clear": "Tøm",
185
187
  "shared-light": "Lys",
186
188
  "shared-dark": "Mørk",
189
+ "shared-xmas": "Christmas",
187
190
  "shared-filter-all": "Alle",
188
191
  "shared-filter-my-presets": "Mine presets",
189
192
  "shared-filter-system-presets": "System presets",
@@ -243,6 +246,7 @@ var nl = {
243
246
  "shared-clear": "Wissen",
244
247
  "shared-light": "Licht",
245
248
  "shared-dark": "Donker",
249
+ "shared-xmas": "Kerstmis",
246
250
  "shared-filter-all": "Alle",
247
251
  "shared-filter-my-presets": "Mijn presets",
248
252
  "shared-filter-system-presets": "Systeem presets",
@@ -600,7 +604,7 @@ function _setPrototypeOf(t, e) {
600
604
  }, _setPrototypeOf(t, e);
601
605
  }
602
606
 
603
- var _excluded$d = ["content", "color", "icon"];
607
+ var _excluded$e = ["content", "color", "icon"];
604
608
  var bgColors = {
605
609
  green: 'geowebColors.functional.successOutline.fill',
606
610
  grey: 'geowebColors.functional.disabledOutline.fill',
@@ -638,7 +642,7 @@ var StatusTag = function StatusTag(_ref) {
638
642
  var content = _ref.content,
639
643
  color = _ref.color,
640
644
  icon = _ref.icon,
641
- props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
645
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
642
646
  return jsxs(Box, {
643
647
  display: "flex",
644
648
  alignItems: "center",
@@ -693,7 +697,7 @@ var CustomTooltip = function CustomTooltip(props) {
693
697
  }));
694
698
  };
695
699
 
696
- var _excluded$c = ["tooltipTitle", "variant", "isSelected", "shouldShowAsDisabled", "size", "children", "className", "tooltipProps"];
700
+ var _excluded$d = ["tooltipTitle", "variant", "isSelected", "shouldShowAsDisabled", "size", "children", "className", "tooltipProps"];
697
701
  var CustomIconButtonNoMemo = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
698
702
  var _ref$tooltipTitle = _ref.tooltipTitle,
699
703
  defaultTooltipTitle = _ref$tooltipTitle === void 0 ? '' : _ref$tooltipTitle,
@@ -708,7 +712,7 @@ var CustomIconButtonNoMemo = /*#__PURE__*/React.forwardRef(function (_ref, ref)
708
712
  children = _ref.children,
709
713
  className = _ref.className,
710
714
  defaultTooltipProps = _ref.tooltipProps,
711
- props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
715
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
712
716
  var classNames = [].concat(className ? [className] : [], isSelected ? ['Mui-selected'] : [], [variant]).join(' ');
713
717
  var tooltipTitle = (defaultTooltipProps == null ? void 0 : defaultTooltipProps.title) || defaultTooltipTitle;
714
718
  var tooltipProps = React.useMemo(function () {
@@ -745,7 +749,7 @@ var CustomIconButtonNoMemo = /*#__PURE__*/React.forwardRef(function (_ref, ref)
745
749
  });
746
750
  var CustomIconButton = /*#__PURE__*/React.memo(CustomIconButtonNoMemo);
747
751
 
748
- var _excluded$b = ["title", "onClose", "description", "actions", "children", "sx"];
752
+ var _excluded$c = ["title", "onClose", "description", "actions", "children", "sx"];
749
753
  var CustomDialog = function CustomDialog(_ref) {
750
754
  var title = _ref.title,
751
755
  _onClose = _ref.onClose,
@@ -755,7 +759,7 @@ var CustomDialog = function CustomDialog(_ref) {
755
759
  actions = _ref$actions === void 0 ? null : _ref$actions,
756
760
  children = _ref.children,
757
761
  sx = _ref.sx,
758
- other = _objectWithoutPropertiesLoose(_ref, _excluded$b);
762
+ other = _objectWithoutPropertiesLoose(_ref, _excluded$c);
759
763
  return jsxs(Dialog, Object.assign({
760
764
  "data-testid": "customDialog",
761
765
  PaperProps: {
@@ -846,7 +850,7 @@ var useSharedTranslation = function useSharedTranslation() {
846
850
  return useTranslation([SHARED_NAMESPACE]);
847
851
  };
848
852
 
849
- var _excluded$a = ["open", "title", "description", "confirmLabel", "cancelLabel", "onSubmit", "onClose", "content", "disableAutoFocus", "isLoading"],
853
+ var _excluded$b = ["open", "title", "description", "confirmLabel", "cancelLabel", "onSubmit", "onClose", "content", "disableAutoFocus", "isLoading"],
850
854
  _excluded2$1 = ["catchOnCancel"];
851
855
  var confirmStyle = {
852
856
  width: {
@@ -880,7 +884,7 @@ var ConfirmationDialog = function ConfirmationDialog(_ref) {
880
884
  disableAutoFocus = _ref$disableAutoFocus === void 0 ? false : _ref$disableAutoFocus,
881
885
  _ref$isLoading = _ref.isLoading,
882
886
  isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
883
- other = _objectWithoutPropertiesLoose(_ref, _excluded$a);
887
+ other = _objectWithoutPropertiesLoose(_ref, _excluded$b);
884
888
  other.catchOnCancel;
885
889
  var rest = _objectWithoutPropertiesLoose(other, _excluded2$1); // remove unwanted props
886
890
  var _useSharedTranslation = useSharedTranslation(),
@@ -1476,7 +1480,7 @@ var AppLayout = function AppLayout(_ref) {
1476
1480
  };
1477
1481
 
1478
1482
  var AppHeader = function AppHeader(_ref) {
1479
- var _sx;
1483
+ var _sx, _theme$palette$geoweb;
1480
1484
  var menu = _ref.menu,
1481
1485
  userMenu = _ref.userMenu,
1482
1486
  workspaceTopBar = _ref.workspaceTopBar,
@@ -1529,7 +1533,14 @@ var AppHeader = function AppHeader(_ref) {
1529
1533
  alignItems: 'center',
1530
1534
  cursor: onClick ? 'pointer' : 'auto'
1531
1535
  },
1532
- children: [jsx(GeoWebLogo, {
1536
+ children: [(_theme$palette$geoweb = theme.palette.geowebColors.logo) != null && _theme$palette$geoweb.image ? jsx("img", {
1537
+ src: theme.palette.geowebColors.logo.image,
1538
+ alt: "GeoWeb",
1539
+ style: {
1540
+ height: '29px',
1541
+ width: '47px'
1542
+ }
1543
+ }) : jsx(GeoWebLogo, {
1533
1544
  style: {
1534
1545
  position: 'relative',
1535
1546
  top: '-1px',
@@ -1615,12 +1626,12 @@ var AppHeader = function AppHeader(_ref) {
1615
1626
  });
1616
1627
  };
1617
1628
 
1618
- var _excluded$9 = ["bounds", "children"];
1629
+ var _excluded$a = ["bounds", "children"];
1619
1630
  var DraggableComponent$1 = function DraggableComponent(_ref) {
1620
1631
  var _ref$bounds = _ref.bounds,
1621
1632
  bounds = _ref$bounds === void 0 ? 'body' : _ref$bounds,
1622
1633
  children = _ref.children,
1623
- props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
1634
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
1624
1635
  var onDragStart = function onDragStart(e) {
1625
1636
  // This makes sure that nothing is selected during drag
1626
1637
  e.preventDefault();
@@ -1634,7 +1645,7 @@ var DraggableComponent$1 = function DraggableComponent(_ref) {
1634
1645
  }));
1635
1646
  };
1636
1647
 
1637
- var _excluded$8 = ["children", "onResizeStart", "onResizeStop", "size", "setSize", "minHeight", "minWidth", "enable", "nodeRef"];
1648
+ var _excluded$9 = ["children", "onResizeStart", "onResizeStop", "size", "setSize", "minHeight", "minWidth", "enable", "nodeRef"];
1638
1649
  var isDraggingClassName = 'is-dragging';
1639
1650
  var useBoundsProps = function useBoundsProps(nodeRef) {
1640
1651
  var _React$useState = React__default.useState({}),
@@ -1677,7 +1688,7 @@ var ResizeComponent = function ResizeComponent(_ref) {
1677
1688
  topLeft: true
1678
1689
  } : _ref$enable,
1679
1690
  nodeRef = _ref.nodeRef,
1680
- props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
1691
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
1681
1692
  var theme = useTheme();
1682
1693
  var onStartResize = React__default.useCallback(function (event, _direction, node) {
1683
1694
  event.stopPropagation();
@@ -1952,8 +1963,8 @@ var UserMenu = function UserMenu(_ref) {
1952
1963
 
1953
1964
  var MenuItemTheme = function MenuItemTheme() {
1954
1965
  var _useThemeContext = useThemeContext(),
1955
- isDark = _useThemeContext.isDark,
1956
- toggleTheme = _useThemeContext.toggleTheme;
1966
+ namedTheme = _useThemeContext.namedTheme,
1967
+ setThemeName = _useThemeContext.setThemeName;
1957
1968
  var _useTranslation = useTranslation(SHARED_NAMESPACE),
1958
1969
  t = _useTranslation.t;
1959
1970
  return jsx(MenuItem, {
@@ -1964,19 +1975,29 @@ var MenuItemTheme = function MenuItemTheme() {
1964
1975
  children: t('shared-choose-app-mode')
1965
1976
  }), jsx(Grid2, {
1966
1977
  children: jsxs(RadioGroup, {
1967
- onChange: toggleTheme,
1978
+ onChange: function onChange(event, value) {
1979
+ if (value && setThemeName) {
1980
+ setThemeName(value);
1981
+ }
1982
+ },
1968
1983
  children: [jsx(FormControlLabel, {
1969
- value: true,
1984
+ value: ThemeTypes.LIGHT_THEME,
1970
1985
  control: jsx(Radio, {
1971
- checked: !isDark
1986
+ checked: (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.LIGHT_THEME
1972
1987
  }),
1973
1988
  label: t('shared-light')
1974
1989
  }), jsx(FormControlLabel, {
1975
- value: false,
1990
+ value: ThemeTypes.DARK_THEME,
1976
1991
  control: jsx(Radio, {
1977
- checked: isDark
1992
+ checked: (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.DARK_THEME
1978
1993
  }),
1979
1994
  label: t('shared-dark')
1995
+ }), jsx(FormControlLabel, {
1996
+ value: ThemeTypes.XMAS2024_THEME,
1997
+ control: jsx(Radio, {
1998
+ checked: (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.XMAS2024_THEME
1999
+ }),
2000
+ label: t('shared-xmas') + " 2024"
1980
2001
  })]
1981
2002
  })
1982
2003
  })]
@@ -2183,7 +2204,7 @@ var ToolHeader = function ToolHeader(_ref) {
2183
2204
  });
2184
2205
  };
2185
2206
 
2186
- var _excluded$7 = ["title", "size", "children", "onClose", "isResizable", "isDraggable", "maxHeight", "elevation", "headerClassName", "leftHeaderComponent", "rightHeaderComponent", "dragHandleIcon", "closeIcon"];
2207
+ var _excluded$8 = ["title", "size", "children", "onClose", "isResizable", "isDraggable", "maxHeight", "elevation", "headerClassName", "leftHeaderComponent", "rightHeaderComponent", "dragHandleIcon", "closeIcon"];
2187
2208
  var styles$3 = {
2188
2209
  container: {
2189
2210
  overflow: 'hidden',
@@ -2222,7 +2243,7 @@ var ToolContainer = function ToolContainer(_ref) {
2222
2243
  rightHeaderComponent = _ref$rightHeaderCompo === void 0 ? null : _ref$rightHeaderCompo,
2223
2244
  dragHandleIcon = _ref.dragHandleIcon,
2224
2245
  closeIcon = _ref.closeIcon,
2225
- props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
2246
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
2226
2247
  return jsxs(Paper, Object.assign({
2227
2248
  elevation: elevation,
2228
2249
  sx: styles$3.container
@@ -2390,7 +2411,7 @@ var useHandleSizeFromOutsideComponent = function useHandleSizeFromOutsideCompone
2390
2411
  }, [isOpen, getBoundsNode]);
2391
2412
  };
2392
2413
 
2393
- var _excluded$6 = ["title", "bounds", "cancel", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "dragHandleIcon", "closeIcon", "className", "sx"];
2414
+ var _excluded$7 = ["title", "bounds", "cancel", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "dragHandleIcon", "closeIcon", "className", "sx"];
2394
2415
  // calculate dialog size and position to 85% of screensize
2395
2416
  var calculateDialogSizeAndPosition = function calculateDialogSizeAndPosition() {
2396
2417
  var width = window.innerWidth * 0.85;
@@ -2485,7 +2506,7 @@ var DraggableComponent = function DraggableComponent(_ref) {
2485
2506
  className = _ref.className,
2486
2507
  _ref$sx = _ref.sx,
2487
2508
  sx = _ref$sx === void 0 ? {} : _ref$sx,
2488
- props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
2509
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
2489
2510
  var zIndex = (source === 'app' ? BASE_Z_INDEX : 1000) + order;
2490
2511
  var elevation = BASE_ELEVATION + order;
2491
2512
  var nodeRef = React__default.useRef(null);
@@ -3385,7 +3406,7 @@ var getInitials = function getInitials(name) {
3385
3406
  }
3386
3407
  };
3387
3408
 
3388
- var _excluded$5 = ["value", "orientation", "shouldAutoFocus"];
3409
+ var _excluded$6 = ["value", "orientation", "shouldAutoFocus"];
3389
3410
  var sliderHeaderStyle = {
3390
3411
  fontFamily: 'Roboto-Black, Roboto',
3391
3412
  fontSize: 12,
@@ -3442,7 +3463,7 @@ var CustomSlider = function CustomSlider(_ref) {
3442
3463
  orientation = _ref$orientation === void 0 ? 'vertical' : _ref$orientation,
3443
3464
  _ref$shouldAutoFocus = _ref.shouldAutoFocus,
3444
3465
  shouldAutoFocus = _ref$shouldAutoFocus === void 0 ? false : _ref$shouldAutoFocus,
3445
- props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
3466
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
3446
3467
  // Add custom class (for bold text) to label adjacent to thumb component.
3447
3468
  // Material UI doesn't support highlighing only adjacent label
3448
3469
  // when track is highlighted everywhere below selected value.
@@ -3462,7 +3483,7 @@ var CustomSlider = function CustomSlider(_ref) {
3462
3483
  rest.forEach(function (element) {
3463
3484
  return element.classList.remove('selectedLabel');
3464
3485
  });
3465
- }, [value, themeContext.isDark]);
3486
+ }, [value, themeContext.namedTheme]);
3466
3487
  // autofocus
3467
3488
  React.useEffect(function () {
3468
3489
  if (shouldAutoFocus && element.current) {
@@ -3488,7 +3509,7 @@ var CustomSlider = function CustomSlider(_ref) {
3488
3509
  }, props));
3489
3510
  };
3490
3511
 
3491
- var _excluded$4 = ["variant", "className", "value"];
3512
+ var _excluded$5 = ["variant", "className", "value"];
3492
3513
  // This button is same as MUI ToggleButton but adds the variant prop
3493
3514
  var CustomToggleButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3494
3515
  var _ref$variant = _ref.variant,
@@ -3496,7 +3517,7 @@ var CustomToggleButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3496
3517
  className = _ref.className,
3497
3518
  _ref$value = _ref.value,
3498
3519
  value = _ref$value === void 0 ? 0 : _ref$value,
3499
- props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
3520
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
3500
3521
  return jsx(ToggleButton, Object.assign({
3501
3522
  ref: ref,
3502
3523
  className: variant + " " + className,
@@ -3667,7 +3688,7 @@ var ToggleMenu = function ToggleMenu(_ref) {
3667
3688
  });
3668
3689
  };
3669
3690
 
3670
- var _excluded$3 = ["tooltip", "list", "currentIndex", "onChangeMouseWheel", "requiresCtrlToChange", "isEnabled", "hasBackgroundColor", "variant", "additionalStyling", "skipLocalStyling"],
3691
+ var _excluded$4 = ["tooltip", "list", "currentIndex", "onChangeMouseWheel", "requiresCtrlToChange", "isEnabled", "hasBackgroundColor", "variant", "additionalStyling", "skipLocalStyling"],
3671
3692
  _excluded2 = ["className", "additionalStyling"];
3672
3693
  var TooltipSelect = function TooltipSelect(_ref) {
3673
3694
  var _ref$tooltip = _ref.tooltip,
@@ -3688,7 +3709,7 @@ var TooltipSelect = function TooltipSelect(_ref) {
3688
3709
  additionalStyling = _ref$additionalStylin === void 0 ? {} : _ref$additionalStylin,
3689
3710
  _ref$skipLocalStyling = _ref.skipLocalStyling,
3690
3711
  skipLocalStyling = _ref$skipLocalStyling === void 0 ? false : _ref$skipLocalStyling,
3691
- props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
3712
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
3692
3713
  var _React$useState = React.useState(false),
3693
3714
  selectOpen = _React$useState[0],
3694
3715
  setSelectOpen = _React$useState[1];
@@ -3903,7 +3924,7 @@ function withEggs(eggs) {
3903
3924
  };
3904
3925
  }
3905
3926
 
3906
- var _excluded$2 = ["title", "title2", "defaultExpanded", "disableGutters", "expandedElevation", "collapsedElevation", "transitionDuration", "detailsSx", "CustomExpandIcon", "children", "amountOfItems"];
3927
+ var _excluded$3 = ["title", "title2", "defaultExpanded", "disableGutters", "expandedElevation", "collapsedElevation", "transitionDuration", "detailsSx", "CustomExpandIcon", "children", "amountOfItems"];
3907
3928
  var CustomAccordion = function CustomAccordion(_ref) {
3908
3929
  var title = _ref.title,
3909
3930
  title2 = _ref.title2,
@@ -3921,7 +3942,7 @@ var CustomAccordion = function CustomAccordion(_ref) {
3921
3942
  CustomExpandIcon = _ref.CustomExpandIcon,
3922
3943
  children = _ref.children,
3923
3944
  amountOfItems = _ref.amountOfItems,
3924
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
3945
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
3925
3946
  var _React$useState = React.useState(defaultExpanded),
3926
3947
  expanded = _React$useState[0],
3927
3948
  setExpanded = _React$useState[1];
@@ -4027,7 +4048,7 @@ var SearchHighlight = function SearchHighlight(_ref) {
4027
4048
  });
4028
4049
  };
4029
4050
 
4030
- var _excluded$1 = ["activeLabel", "inActiveLabel", "tooltip"];
4051
+ var _excluded$2 = ["activeLabel", "inActiveLabel", "tooltip"];
4031
4052
  var styles = {
4032
4053
  label: {
4033
4054
  color: 'geowebColors.buttons.tertiary.default.color',
@@ -4043,7 +4064,7 @@ var SwitchButton = function SwitchButton(_ref) {
4043
4064
  inActiveLabel = _ref$inActiveLabel === void 0 ? 'Viewer' : _ref$inActiveLabel,
4044
4065
  _ref$tooltip = _ref.tooltip,
4045
4066
  tooltip = _ref$tooltip === void 0 ? 'Switch mode' : _ref$tooltip,
4046
- props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
4067
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
4047
4068
  return jsx(CustomTooltip, {
4048
4069
  title: tooltip,
4049
4070
  children: jsxs("span", {
@@ -4722,7 +4743,7 @@ var SearchField = function SearchField(_ref3) {
4722
4743
  });
4723
4744
  };
4724
4745
 
4725
- var _excluded = ["filters", "onClickFilterChip", "onSearch", "isAllSelected", "searchQuery"];
4746
+ var _excluded$1 = ["filters", "onClickFilterChip", "onSearch", "isAllSelected", "searchQuery"];
4726
4747
  var DEFAULT_FILTER_HEIGHT = 85;
4727
4748
  var Filter = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4728
4749
  var filters = _ref.filters,
@@ -4732,7 +4753,7 @@ var Filter = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4732
4753
  onSearch = _ref$onSearch === void 0 ? function () {} : _ref$onSearch,
4733
4754
  isAllSelected = _ref.isAllSelected,
4734
4755
  searchQuery = _ref.searchQuery,
4735
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
4756
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
4736
4757
  return jsx(Box, {
4737
4758
  sx: Object.assign({
4738
4759
  marginBottom: '8px'
@@ -4976,6 +4997,20 @@ var FilterOption = function FilterOption(_ref) {
4976
4997
  });
4977
4998
  };
4978
4999
 
5000
+ var _excluded = ["isDark", "children"];
5001
+ var StorybookDocsWrapper = function StorybookDocsWrapper(_ref) {
5002
+ var _ref$isDark = _ref.isDark,
5003
+ isDark = _ref$isDark === void 0 ? false : _ref$isDark,
5004
+ children = _ref.children,
5005
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
5006
+ return jsx(Box, {
5007
+ sx: Object.assign({}, isDark && {
5008
+ backgroundColor: 'geowebColors.background.surfaceBrowser'
5009
+ }, props.sx),
5010
+ children: children
5011
+ });
5012
+ };
5013
+
4979
5014
  /* *
4980
5015
  * Licensed under the Apache License, Version 2.0 (the "License");
4981
5016
  * you may not use this file except in compliance with the License.
@@ -5696,6 +5731,29 @@ var convertNOWandTODAYFormatsToUTC = function convertNOWandTODAYFormatsToUTC(tim
5696
5731
  }
5697
5732
  throw new Error('Invalid endTime format');
5698
5733
  };
5734
+ /**
5735
+ * @name setSeconds
5736
+ * @category Second Helpers
5737
+ * @summary Set the seconds to the given date.
5738
+ *
5739
+ * @description
5740
+ * Set the seconds to the given date.
5741
+ *
5742
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
5743
+ *
5744
+ * @param date - The date to be changed
5745
+ * @param seconds - The seconds of the new date
5746
+ *
5747
+ * @returns The new date with the seconds set
5748
+ *
5749
+ * @example
5750
+ * // Set 45 seconds to 1 September 2014 11:30:40:
5751
+ * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)
5752
+ * //=> Mon Sep 01 2014 11:30:45
5753
+ */
5754
+ var setSeconds = function setSeconds(date, seconds) {
5755
+ return setSeconds$1(date, seconds);
5756
+ };
5699
5757
 
5700
5758
  /* *
5701
5759
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -5758,6 +5816,7 @@ var index = /*#__PURE__*/Object.freeze({
5758
5816
  parseISO: parseISO,
5759
5817
  roundToNearestMinutes: roundToNearestMinutes,
5760
5818
  set: set,
5819
+ setSeconds: setSeconds,
5761
5820
  setUTCDate: setUTCDate,
5762
5821
  startOfDay: startOfDay,
5763
5822
  startOfDayUTC: startOfDayUTC,
@@ -5798,6 +5857,15 @@ var createToolkitMockStoreWithEggs = function createToolkitMockStoreWithEggs(sto
5798
5857
  store.addEggs = typeof jest !== 'undefined' ? jest.fn() : function () {}; // mocking the dynamic module loader
5799
5858
  return store;
5800
5859
  };
5860
+ var createToolkitMockStore = function createToolkitMockStore(storeConfig) {
5861
+ var reducer = storeConfig.reducer,
5862
+ preloadedState = storeConfig.preloadedState;
5863
+ var store = configureStore(Object.assign({}, storeConfig, {
5864
+ reducer: reducer,
5865
+ preloadedState: preloadedState
5866
+ }));
5867
+ return store;
5868
+ };
5801
5869
 
5802
5870
  /* *
5803
5871
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -5943,4 +6011,4 @@ var RenderCounter = /*#__PURE__*/function () {
5943
6011
  }();
5944
6012
  var renderCounter = new RenderCounter();
5945
6013
 
5946
- 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, FilterLabel, FilterListItem, FilterOption, LastUpdateTime, PROJECTION, ResizeComponent as Resizable, SHARED_NAMESPACE, SearchField$1 as SearchField, SearchFieldButton, SearchHighlight, StatusTag, SwitchButton, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, UserMenuItemSentryRecording, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, createToolkitMockStoreWithEggs, 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, withEggs };
6014
+ 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, FilterLabel, FilterListItem, FilterOption, LastUpdateTime, PROJECTION, ResizeComponent as Resizable, SHARED_NAMESPACE, SearchField$1 as SearchField, SearchFieldButton, SearchHighlight, StatusTag, StorybookDocsWrapper, SwitchButton, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, UserMenuItemSentryRecording, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, createToolkitMockStore, createToolkitMockStoreWithEggs, 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, withEggs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/shared",
3
- "version": "9.35.1-spike-oltanstack.0",
3
+ "version": "9.37.0",
4
4
  "description": "GeoWeb shared library with shared components and utils for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,25 +1,8 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const AppHeaderLight: {
7
- (): React.ReactElement;
8
- tags: string[];
9
- parameters: {
10
- zeplinLink: {
11
- name: string;
12
- link: string;
13
- }[];
14
- };
15
- };
16
- export declare const AppHeaderDark: {
17
- (): React.ReactElement;
18
- tags: string[];
19
- parameters: {
20
- zeplinLink: {
21
- name: string;
22
- link: string;
23
- }[];
24
- };
25
- };
1
+ import { Meta, StoryObj } from '@storybook/react/*';
2
+ import { AppHeader } from '.';
3
+ declare const meta: Meta<typeof AppHeader>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof AppHeader>;
6
+ export declare const Component: Story;
7
+ export declare const AppHeaderLight: Story;
8
+ export declare const AppHeaderDark: Story;
@@ -1,10 +1,8 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const ThemeLight: () => React.ReactElement;
7
- export declare const ThemeDark: {
8
- (): React.ReactElement;
9
- tags: string[];
10
- };
1
+ import { Meta, StoryObj } from '@storybook/react/*';
2
+ import AppLayout from './AppLayout';
3
+ declare const meta: Meta<typeof AppLayout>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof AppLayout>;
6
+ export declare const Component: Story;
7
+ export declare const ThemeLight: Story;
8
+ export declare const ThemeDark: Story;
@@ -1,7 +1,8 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const DynamicCanvas: React.FC;
7
- export declare const StaticCanvas: React.FC;
1
+ import { Meta, StoryObj } from '@storybook/react/*';
2
+ import { CanvasComponent } from './CanvasComponent';
3
+ declare const meta: Meta<typeof CanvasComponent>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CanvasComponent>;
6
+ export declare const Component: Story;
7
+ export declare const DynamicCanvas: Story;
8
+ export declare const StaticCanvas: Story;
@@ -1,13 +1,8 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const CustomAccordionLight: {
7
- (): React.ReactElement;
8
- tags: string[];
9
- };
10
- export declare const CustomAccordionDark: {
11
- (): React.ReactElement;
12
- tags: string[];
13
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { CustomAccordion } from './CustomAccordion';
3
+ declare const meta: Meta<typeof CustomAccordion>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CustomAccordion>;
6
+ export declare const Component: Story;
7
+ export declare const CustomAccordionLight: Story;
8
+ export declare const CustomAccordionDark: Story;
@@ -1,25 +1,8 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const CustomIconButtonLight: {
7
- (): React.ReactElement;
8
- tags: string[];
9
- parameters: {
10
- zeplinLink: {
11
- name: string;
12
- link: string;
13
- }[];
14
- };
15
- };
16
- export declare const CustomIconButtonDark: {
17
- (): React.ReactElement;
18
- tags: string[];
19
- parameters: {
20
- zeplinLink: {
21
- name: string;
22
- link: string;
23
- }[];
24
- };
25
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { CustomIconButton } from './CustomIconButton';
3
+ declare const meta: Meta<typeof CustomIconButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CustomIconButton>;
6
+ export declare const Component: Story;
7
+ export declare const CustomIconButtonLight: Story;
8
+ export declare const CustomIconButtonDark: Story;
@@ -1,13 +1,8 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const CustomSliderLightTheme: {
7
- (): React.ReactElement;
8
- tags: string[];
9
- };
10
- export declare const CustomSliderDarkTheme: {
11
- (): React.ReactElement;
12
- tags: string[];
13
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { CustomSlider } from './CustomSlider';
3
+ declare const meta: Meta<typeof CustomSlider>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CustomSlider>;
6
+ export declare const Component: Story;
7
+ export declare const CustomSliderLightTheme: Story;
8
+ export declare const CustomSliderDarkTheme: Story;
@@ -1,13 +1,8 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const CustomToggleButtonLight: {
7
- (): React.ReactElement;
8
- tags: string[];
9
- };
10
- export declare const CustomToggleButtonDark: {
11
- (): React.ReactElement;
12
- tags: string[];
13
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { CustomToggleButton } from './CustomToggleButton';
3
+ declare const meta: Meta<typeof CustomToggleButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CustomToggleButton>;
6
+ export declare const Component: Story;
7
+ export declare const CustomToggleButtonLight: Story;
8
+ export declare const CustomToggleButtonDark: Story;
@@ -1,10 +1,8 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const ErrorBoundaryDemo: {
7
- (): React.ReactElement;
8
- storyName: string;
9
- };
10
- export declare const ErrorBoundaryInsideBox: () => React.ReactElement;
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { ErrorBoundary } from './ErrorBoundary';
3
+ declare const meta: Meta<typeof ErrorBoundary>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ErrorBoundary>;
6
+ export declare const Component: Story;
7
+ export declare const ErrorBoundaryDemo: Story;
8
+ export declare const ErrorBoundaryInsideBox: Story;
@@ -1,25 +1,8 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const FilterLight: {
7
- (): React.ReactElement;
8
- parameters: {
9
- zeplinLink: {
10
- name: string;
11
- link: string;
12
- }[];
13
- };
14
- tags: string[];
15
- };
16
- export declare const FilterDark: {
17
- (): React.ReactElement;
18
- parameters: {
19
- zeplinLink: {
20
- name: string;
21
- link: string;
22
- }[];
23
- };
24
- tags: string[];
25
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Filter from './Filter';
3
+ declare const meta: Meta<typeof Filter>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Filter>;
6
+ export declare const Component: Story;
7
+ export declare const FilterLight: Story;
8
+ export declare const FilterDark: Story;
@@ -1,13 +1,8 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const LastUpdateTimeLightTheme: {
7
- (): React.ReactElement;
8
- tags: string[];
9
- };
10
- export declare const LastUpdateTimeDarkTheme: {
11
- (): React.ReactElement;
12
- tags: string[];
13
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import LastUpdateTime from './LastUpdateTime';
3
+ declare const meta: Meta<typeof LastUpdateTime>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof LastUpdateTime>;
6
+ export declare const Component: Story;
7
+ export declare const LastUpdateTimeLightTheme: Story;
8
+ export declare const LastUpdateTimeDarkTheme: Story;
@@ -1,13 +1,8 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const ToggleMenuLight: {
7
- (): React.ReactElement;
8
- tags: string[];
9
- };
10
- export declare const ToggleMenuDark: {
11
- (): React.ReactElement;
12
- tags: string[];
13
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { ToggleMenu } from './ToggleMenu';
3
+ declare const meta: Meta<typeof ToggleMenu>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ToggleMenu>;
6
+ export declare const Component: Story;
7
+ export declare const ToggleMenuLight: Story;
8
+ export declare const ToggleMenuDark: Story;
@@ -1,29 +1,16 @@
1
1
  import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- includeStories: string[];
5
- };
6
- export default _default;
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import { ToolContainer } from '.';
4
+ declare const meta: Meta<typeof ToolContainer>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof ToolContainer>;
7
+ export declare const Component: Story;
7
8
  interface ToolContainerDemoProps {
8
9
  isSnapShot?: boolean;
9
10
  }
10
- export declare const ToolContainerDemo: React.FC<ToolContainerDemoProps>;
11
- export declare const ThemeLight: {
12
- (): React.ReactElement;
13
- parameters: {
14
- zeplinLink: {
15
- name: string;
16
- link: string;
17
- }[];
18
- };
19
- };
20
- export declare const ThemeDark: {
21
- (): React.ReactElement;
11
+ export declare const ToolContainerDemo: {
12
+ ({ isSnapShot, }: ToolContainerDemoProps): React.ReactElement;
22
13
  tags: string[];
23
- parameters: {
24
- zeplinLink: {
25
- name: string;
26
- link: string;
27
- }[];
28
- };
29
14
  };
15
+ export declare const ThemeLight: Story;
16
+ export declare const ThemeDark: Story;
@@ -1,24 +1,8 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const ThemeLight: {
7
- (): React.ReactElement;
8
- parameters: {
9
- zeplinLink: {
10
- name: string;
11
- link: string;
12
- }[];
13
- };
14
- };
15
- export declare const ThemeDark: {
16
- (): React.ReactElement;
17
- tags: string[];
18
- parameters: {
19
- zeplinLink: {
20
- name: string;
21
- link: string;
22
- }[];
23
- };
24
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { ToolHeader } from '.';
3
+ declare const meta: Meta<typeof ToolHeader>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ToolHeader>;
6
+ export declare const Component: Story;
7
+ export declare const ThemeLight: Story;
8
+ export declare const ThemeDark: Story;
@@ -1,32 +1,10 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const ThemeLight: {
7
- (): React.ReactElement;
8
- parameters: {
9
- zeplinLink: {
10
- name: string;
11
- link: string;
12
- }[];
13
- };
14
- };
15
- export declare const ThemeDark: {
16
- (): React.ReactElement;
17
- tags: string[];
18
- parameters: {
19
- zeplinLink: {
20
- name: string;
21
- link: string;
22
- }[];
23
- };
24
- };
25
- export declare const CheatSheetLight: {
26
- (): React.ReactElement;
27
- tags: string[];
28
- };
29
- export declare const CheatSheetDark: {
30
- (): React.ReactElement;
31
- tags: string[];
32
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import CheatSheet from './CheatSheet';
3
+ declare const meta: Meta<typeof CheatSheet>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CheatSheet>;
6
+ export declare const Component: Story;
7
+ export declare const ThemeLight: Story;
8
+ export declare const ThemeDark: Story;
9
+ export declare const CheatSheetLight: Story;
10
+ export declare const CheatSheetDark: Story;
@@ -1,18 +1,10 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const ThemeLight: () => React.ReactElement;
7
- export declare const ThemeDark: {
8
- (): React.ReactElement;
9
- tags: string[];
10
- };
11
- export declare const UserMenuLight: {
12
- (): React.ReactElement;
13
- tags: string[];
14
- };
15
- export declare const UserMenuDark: {
16
- (): React.ReactElement;
17
- tags: string[];
18
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { UserMenu } from '.';
3
+ declare const meta: Meta<typeof UserMenu>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof UserMenu>;
6
+ export declare const Component: Story;
7
+ export declare const ThemeLight: Story;
8
+ export declare const ThemeDark: Story;
9
+ export declare const UserMenuLight: Story;
10
+ export declare const UserMenuDark: Story;
@@ -24,3 +24,4 @@ export * from './SearchField';
24
24
  export * from './LastUpdateTime';
25
25
  export * from './CanvasComponent';
26
26
  export * from './Filter';
27
+ export * from './Storybook';
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const usePollerDemo: () => React.ReactElement;
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { usePoller } from './usePoller';
3
+ declare const meta: Meta<typeof usePoller>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof usePoller>;
6
+ export declare const Component: Story;
@@ -334,6 +334,27 @@ export declare const convertNOWFormatToUTC: (timeValue: string) => string;
334
334
  * @returns Time in UTC format
335
335
  */
336
336
  export declare const convertNOWandTODAYFormatsToUTC: (timeValue: string) => string;
337
+ /**
338
+ * @name setSeconds
339
+ * @category Second Helpers
340
+ * @summary Set the seconds to the given date.
341
+ *
342
+ * @description
343
+ * Set the seconds to the given date.
344
+ *
345
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
346
+ *
347
+ * @param date - The date to be changed
348
+ * @param seconds - The seconds of the new date
349
+ *
350
+ * @returns The new date with the seconds set
351
+ *
352
+ * @example
353
+ * // Set 45 seconds to 1 September 2014 11:30:40:
354
+ * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)
355
+ * //=> Mon Sep 01 2014 11:30:45
356
+ */
357
+ export declare const setSeconds: (date: Date, seconds: number) => Date;
337
358
  /**
338
359
  * Compares two dates if values are the same
339
360
  * @param {Date} date - first date
@@ -3,4 +3,5 @@ interface ToolkitStoreWithEggs extends ToolkitStore {
3
3
  addEggs?: () => void;
4
4
  }
5
5
  export declare const createToolkitMockStoreWithEggs: (storeConfig: ConfigureStoreOptions) => ToolkitStoreWithEggs;
6
+ export declare const createToolkitMockStore: (storeConfig: ConfigureStoreOptions) => ToolkitStore;
6
7
  export {};