@opengeoweb/shared 9.29.0 → 9.30.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,5 +1,5 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
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, Grid, 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, ListItemSecondaryAction } from '@mui/material';
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 } from '@mui/material';
3
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';
4
4
  import * as React from 'react';
5
5
  import React__default, { useRef, Component } from 'react';
@@ -11,8 +11,8 @@ import { Resizable } from 're-resizable';
11
11
  import * as Sentry from '@sentry/react';
12
12
  import { useStore } from 'react-redux';
13
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$3, getHours as getHours$1, startOfDay, addMinutes, addHours, getDay, getDayOfYear, getMonth, getWeek, getYear, isWithinInterval } from 'date-fns';
14
- import configureStore from 'redux-mock-store';
15
- import { configureStore as configureStore$1 } from '@reduxjs/toolkit';
14
+ import configureStoreToBeDeprecated from 'redux-mock-store';
15
+ import { configureStore } from '@reduxjs/toolkit';
16
16
 
17
17
  var en = {
18
18
  "shared-choose-app-mode": "Choose your default app mode",
@@ -3485,15 +3485,12 @@ $$a({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
3485
3485
  * See the License for the specific language governing permissions and
3486
3486
  * limitations under the License.
3487
3487
  *
3488
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3489
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
3488
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3489
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
3490
3490
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3491
3491
  * */
3492
3492
  const showPrompt = event => {
3493
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3494
- // @ts-ignore
3495
- // eslint-disable-next-line no-param-reassign
3496
- event.returnValue = 'Changes that you made may not be saved.'; // changes are your browser have default text to overrule this
3493
+ event.preventDefault();
3497
3494
  };
3498
3495
  function usePreventBrowserClose(shouldPreventClose) {
3499
3496
  React.useEffect(() => {
@@ -4835,16 +4832,12 @@ const MenuItemTheme = () => {
4835
4832
  return jsx(MenuItem, Object.assign({
4836
4833
  divider: true
4837
4834
  }, {
4838
- children: jsxs(Grid, Object.assign({
4835
+ children: jsxs(Grid2, Object.assign({
4839
4836
  container: true
4840
4837
  }, {
4841
- children: [jsx(Grid, Object.assign({
4842
- item: true
4843
- }, {
4838
+ children: [jsx(Grid2, {
4844
4839
  children: t('shared-choose-app-mode')
4845
- })), jsx(Grid, Object.assign({
4846
- item: true
4847
- }, {
4840
+ }), jsx(Grid2, {
4848
4841
  children: jsxs(RadioGroup, Object.assign({
4849
4842
  onChange: toggleTheme
4850
4843
  }, {
@@ -4862,7 +4855,7 @@ const MenuItemTheme = () => {
4862
4855
  label: t('shared-dark')
4863
4856
  })]
4864
4857
  }))
4865
- }))]
4858
+ })]
4866
4859
  }))
4867
4860
  }));
4868
4861
  };
@@ -4975,7 +4968,7 @@ const ToolHeader = ({
4975
4968
  role: "heading",
4976
4969
  "aria-label": "toolheader"
4977
4970
  }, {
4978
- children: jsxs(Grid, Object.assign({
4971
+ children: jsxs(Grid2, Object.assign({
4979
4972
  container: true,
4980
4973
  alignItems: "center",
4981
4974
  sx: {
@@ -4983,17 +4976,19 @@ const ToolHeader = ({
4983
4976
  height: styles.height
4984
4977
  }
4985
4978
  }, {
4986
- children: [jsxs(Grid, Object.assign({
4979
+ children: [jsxs(Grid2, Object.assign({
4987
4980
  className: "header-left",
4988
- item: true,
4989
- xs: columnSizeLeft,
4990
4981
  sx: {
4991
4982
  paddingRight: 1
4983
+ },
4984
+ size: {
4985
+ sm: columnSizeLeft
4992
4986
  }
4993
4987
  }, {
4994
- children: [_isDraggable && size !== 'xxs' && !_leftHeaderComponent && jsx(Grid, Object.assign({
4988
+ children: [_isDraggable && size !== 'xxs' && !_leftHeaderComponent && jsx(Grid2, Object.assign({
4995
4989
  container: true,
4996
- justifyContent: "flex-start"
4990
+ justifyContent: "flex-start",
4991
+ size: "grow"
4997
4992
  }, {
4998
4993
  children: jsx(CustomIconButton, Object.assign({
4999
4994
  "data-testid": "dragBtn",
@@ -5006,48 +5001,45 @@ const ToolHeader = ({
5006
5001
  children: _dragHandleIcon
5007
5002
  }))
5008
5003
  })), _leftHeaderComponent && _leftHeaderComponent]
5009
- })), jsx(Grid, Object.assign({
5004
+ })), jsxs(Grid2, Object.assign({
5010
5005
  className: "header-title",
5011
- item: true,
5012
- xs: title ? columnSizeTitle : 0
5006
+ size: title ? columnSizeTitle : 0,
5007
+ container: true,
5008
+ justifyContent: "center",
5009
+ alignItems: "center"
5013
5010
  }, {
5014
- children: jsxs(Grid, Object.assign({
5015
- container: true,
5016
- justifyContent: "center",
5017
- alignItems: "center"
5011
+ children: [title && jsx(Typography, Object.assign({
5012
+ variant: "h2",
5013
+ noWrap: true,
5014
+ sx: {
5015
+ fontSize: styles.fontSize,
5016
+ fontWeight: styles.fontWeight,
5017
+ lineHeight: styles.lineHeight,
5018
+ marginTop: styles.marginTop,
5019
+ textAlign: 'center'
5020
+ },
5021
+ role: "heading"
5018
5022
  }, {
5019
- children: [title && jsx(Typography, Object.assign({
5020
- variant: "h2",
5021
- noWrap: true,
5022
- sx: {
5023
- fontSize: styles.fontSize,
5024
- fontWeight: styles.fontWeight,
5025
- lineHeight: styles.lineHeight,
5026
- marginTop: styles.marginTop
5027
- },
5028
- role: "heading"
5029
- }, {
5030
- children: title
5031
- })), size === 'xxs' && jsx(CustomIconButton, Object.assign({
5032
- "data-testid": "dragBtn-xxs",
5033
- disableRipple: true,
5034
- sx: {
5035
- pointerEvents: 'none',
5036
- transform: 'rotate(90deg)',
5037
- '&.MuiButtonBase-root.MuiIconButton-root': Object.assign(Object.assign({}, iconStyle), {
5038
- height: 12
5039
- })
5040
- }
5041
- }, {
5042
- children: _dragHandleIcon
5043
- }))]
5044
- }))
5045
- })), jsxs(Grid, Object.assign({
5023
+ children: title
5024
+ })), size === 'xxs' && jsx(CustomIconButton, Object.assign({
5025
+ "data-testid": "dragBtn-xxs",
5026
+ disableRipple: true,
5027
+ sx: {
5028
+ pointerEvents: 'none',
5029
+ right: -12,
5030
+ transform: 'rotate(90deg)',
5031
+ '&.MuiButtonBase-root.MuiIconButton-root': Object.assign(Object.assign({}, iconStyle), {
5032
+ height: 12
5033
+ })
5034
+ }
5035
+ }, {
5036
+ children: _dragHandleIcon
5037
+ }))]
5038
+ })), jsxs(Grid2, Object.assign({
5046
5039
  className: "header-right",
5047
- item: true,
5048
- xs: columnSizeIcon,
5049
5040
  container: true,
5050
- justifyContent: "flex-end"
5041
+ justifyContent: "flex-end",
5042
+ size: columnSizeIcon
5051
5043
  }, {
5052
5044
  children: [_rightHeaderComponent && _rightHeaderComponent, _onClose && jsx(CustomTooltip, Object.assign({
5053
5045
  title: t('shared-close'),
@@ -5915,14 +5907,14 @@ const ShortcutList = ({
5915
5907
  },
5916
5908
  divider: index !== shortcuts.length - 1
5917
5909
  }, {
5918
- children: jsxs(Grid, Object.assign({
5910
+ children: jsxs(Grid2, Object.assign({
5919
5911
  container: true,
5920
5912
  direction: "row",
5921
5913
  justifyContent: "space-between",
5922
- alignItems: "center"
5914
+ alignItems: "center",
5915
+ size: "grow"
5923
5916
  }, {
5924
- children: [jsx(Grid, Object.assign({
5925
- item: true,
5917
+ children: [jsx(Grid2, Object.assign({
5926
5918
  sx: {
5927
5919
  fontSize: 12,
5928
5920
  fontWeight: 300,
@@ -5931,9 +5923,7 @@ const ShortcutList = ({
5931
5923
  }
5932
5924
  }, {
5933
5925
  children: t(shortcut.titleKey)
5934
- })), jsx(Grid, Object.assign({
5935
- item: true
5936
- }, {
5926
+ })), jsx(Grid2, {
5937
5927
  children: jsx(Box, Object.assign({
5938
5928
  sx: {
5939
5929
  alignItems: 'center'
@@ -5941,7 +5931,7 @@ const ShortcutList = ({
5941
5931
  }, {
5942
5932
  children: _platform === 'mac' && shortcut.descriptionMac ? shortcut.descriptionMac : shortcut.description
5943
5933
  }))
5944
- }))]
5934
+ })]
5945
5935
  }))
5946
5936
  }), shortcut.titleKey))
5947
5937
  }));
@@ -6021,14 +6011,12 @@ const UserMenuItemCheatSheet = () => {
6021
6011
  onClick: onOpen,
6022
6012
  divider: true
6023
6013
  }, {
6024
- children: jsx(Grid, Object.assign({
6014
+ children: jsx(Grid2, Object.assign({
6025
6015
  container: true
6026
6016
  }, {
6027
- children: jsx(Grid, Object.assign({
6028
- item: true
6029
- }, {
6017
+ children: jsx(Grid2, {
6030
6018
  children: t('shared-cheat-sheet')
6031
- }))
6019
+ })
6032
6020
  }))
6033
6021
  })), jsx(Backdrop, Object.assign({
6034
6022
  "data-testid": "cheatsheet-content",
@@ -6119,14 +6107,12 @@ const UserMenuItemSentryRecording = ({
6119
6107
  onClick: onOpen,
6120
6108
  divider: true
6121
6109
  }, {
6122
- children: jsx(Grid, Object.assign({
6110
+ children: jsx(Grid2, Object.assign({
6123
6111
  container: true
6124
6112
  }, {
6125
- children: jsx(Grid, Object.assign({
6126
- item: true
6127
- }, {
6113
+ children: jsx(Grid2, {
6128
6114
  children: t('shared-sentry-recording')
6129
- }))
6115
+ })
6130
6116
  }))
6131
6117
  })), jsx(Backdrop, Object.assign({
6132
6118
  "data-testid": "sentryRecording-content",
@@ -6146,7 +6132,7 @@ const UserMenuItemSentryRecording = ({
6146
6132
  onClose: onClose,
6147
6133
  bounds: "parent"
6148
6134
  }, {
6149
- children: jsxs(Grid, Object.assign({
6135
+ children: jsxs(Grid2, Object.assign({
6150
6136
  container: true,
6151
6137
  spacing: 4,
6152
6138
  sx: {
@@ -6154,9 +6140,8 @@ const UserMenuItemSentryRecording = ({
6154
6140
  paddingRight: '70px'
6155
6141
  }
6156
6142
  }, {
6157
- children: [jsx(Grid, Object.assign({
6143
+ children: [jsx(Grid2, Object.assign({
6158
6144
  container: true,
6159
- item: true,
6160
6145
  justifyContent: "center",
6161
6146
  sx: {
6162
6147
  textAlign: 'center'
@@ -6165,9 +6150,8 @@ const UserMenuItemSentryRecording = ({
6165
6150
  children: jsx(Typography, {
6166
6151
  children: t('shared-sentry-information')
6167
6152
  })
6168
- })), jsx(Grid, Object.assign({
6153
+ })), jsx(Grid2, Object.assign({
6169
6154
  container: true,
6170
- item: true,
6171
6155
  justifyContent: "center",
6172
6156
  sx: {
6173
6157
  textAlign: 'center'
@@ -6176,9 +6160,8 @@ const UserMenuItemSentryRecording = ({
6176
6160
  children: jsx(Typography, {
6177
6161
  children: t('shared-sentry-enable-message')
6178
6162
  })
6179
- })), jsxs(Grid, Object.assign({
6163
+ })), jsxs(Grid2, Object.assign({
6180
6164
  container: true,
6181
- item: true,
6182
6165
  alignItems: "center",
6183
6166
  direction: "column"
6184
6167
  }, {
@@ -6191,9 +6174,8 @@ const UserMenuItemSentryRecording = ({
6191
6174
  }) : jsxs(Typography, {
6192
6175
  children: [" ", t('shared-sentry-enable')]
6193
6176
  })]
6194
- })), jsxs(Grid, Object.assign({
6177
+ })), jsxs(Grid2, Object.assign({
6195
6178
  container: true,
6196
- item: true,
6197
6179
  alignItems: "center",
6198
6180
  direction: "column"
6199
6181
  }, {
@@ -6219,9 +6201,8 @@ const UserMenuItemSentryRecording = ({
6219
6201
  children: ["(", t('shared-sentry-cors-wait'), ")"]
6220
6202
  }))]
6221
6203
  })]
6222
- })), jsx(Grid, Object.assign({
6204
+ })), jsx(Grid2, Object.assign({
6223
6205
  container: true,
6224
- item: true,
6225
6206
  justifyContent: "center"
6226
6207
  }, {
6227
6208
  children: jsx(Typography, Object.assign({
@@ -6547,19 +6528,17 @@ const ToggleMenu = ({
6547
6528
  disabled: isDisabled,
6548
6529
  selected: menuItem.isSelected
6549
6530
  }, {
6550
- children: jsxs(Grid, Object.assign({
6531
+ children: jsxs(Grid2, Object.assign({
6551
6532
  container: true,
6552
6533
  spacing: 2,
6553
- justifyContent: "space-between"
6534
+ justifyContent: "space-between",
6535
+ size: "grow"
6554
6536
  }, {
6555
- children: [jsx(Grid, Object.assign({
6556
- item: true
6557
- }, {
6537
+ children: [jsx(Grid2, {
6558
6538
  children: jsx(ListItemText, {
6559
6539
  children: text
6560
6540
  })
6561
- })), icon && jsx(Grid, Object.assign({
6562
- item: true,
6541
+ }), icon && jsx(Grid2, Object.assign({
6563
6542
  alignItems: "flex-end"
6564
6543
  }, {
6565
6544
  children: jsx(ListItemIcon, Object.assign({
@@ -8193,7 +8172,7 @@ class CanvasComponent extends Component {
8193
8172
  event,
8194
8173
  deltaY: event.deltaY,
8195
8174
  deltaX: event.deltaX,
8196
- canvasWidth: event.srcElement.width,
8175
+ canvasWidth: event.target.width,
8197
8176
  mouseX: event.offsetX
8198
8177
  });
8199
8178
  }
@@ -8383,12 +8362,15 @@ const FilterChip = ({
8383
8362
  isSelected: _isSelected = false,
8384
8363
  isDisabled: _isDisabled = false,
8385
8364
  handleClick: _handleClick = () => {},
8386
- onAction,
8365
+ onClick,
8387
8366
  actionIcon,
8388
8367
  size: _size = 'small'
8389
8368
  }) => {
8390
8369
  const theme = useTheme();
8370
+ const chipRef = useRef(null);
8371
+ const clickHandler = () => onClick ? onClick(chipRef.current) : _handleClick(id, _isSelected);
8391
8372
  return jsx(Chip, {
8373
+ ref: chipRef,
8392
8374
  size: _size,
8393
8375
  id: id,
8394
8376
  label: label,
@@ -8405,13 +8387,13 @@ const FilterChip = ({
8405
8387
  '& .MuiChip-filled': {
8406
8388
  border: '1px solid transparent'
8407
8389
  },
8408
- '& .MuiChip-labelMedium': {
8390
+ '&.MuiChip-sizeMedium > .MuiChip-label': {
8409
8391
  overflow: 'visible'
8410
8392
  }
8411
8393
  },
8412
- onClick: () => _handleClick(id, _isSelected),
8394
+ onClick: clickHandler,
8413
8395
  deleteIcon: actionIcon,
8414
- onDelete: onAction
8396
+ onDelete: actionIcon ? clickHandler : undefined
8415
8397
  });
8416
8398
  };
8417
8399
 
@@ -8617,7 +8599,29 @@ const FilterListItem = ({
8617
8599
  paddingLeft: '0px',
8618
8600
  paddingRight: '50px',
8619
8601
  fontSize: '12px'
8620
- }
8602
+ },
8603
+ secondaryAction: jsx(CustomIconButton, Object.assign({
8604
+ "aria-label": `Only ${filter.name}`,
8605
+ style: {
8606
+ backgroundColor: 'transparent',
8607
+ width: 'auto',
8608
+ display: isHovering ? 'block' : 'none'
8609
+ },
8610
+ edge: "end",
8611
+ onClick: () => {
8612
+ selectOnlyOne(filter.id);
8613
+ }
8614
+ }, {
8615
+ children: jsx(Typography, Object.assign({
8616
+ sx: {
8617
+ color: 'geowebColors.buttons.primary.default.fill',
8618
+ fontSize: '14px',
8619
+ fontWeight: 500
8620
+ }
8621
+ }, {
8622
+ children: t('shared-only')
8623
+ }))
8624
+ }))
8621
8625
  }, {
8622
8626
  children: [jsx(ListItemIcon, Object.assign({
8623
8627
  sx: {
@@ -8626,8 +8630,10 @@ const FilterListItem = ({
8626
8630
  }, {
8627
8631
  children: jsx(Checkbox, {
8628
8632
  inputProps: {
8629
- 'aria-label': filter.name
8633
+ 'aria-label': filter.name,
8634
+ checked: filter.checked
8630
8635
  },
8636
+ className: filter.checked ? 'is-checked' : '',
8631
8637
  color: "secondary",
8632
8638
  checked: filter.checked,
8633
8639
  onChange: () => {
@@ -8643,27 +8649,7 @@ const FilterListItem = ({
8643
8649
  })
8644
8650
  })), children || jsx(FilterLabel, {
8645
8651
  name: name
8646
- }), isHovering ? jsx(ListItemSecondaryAction, {
8647
- children: jsx(CustomIconButton, Object.assign({
8648
- "aria-label": `Only ${filter.name}`,
8649
- style: {
8650
- backgroundColor: 'transparent',
8651
- width: 'auto'
8652
- },
8653
- edge: "end",
8654
- onClick: () => selectOnlyOne(filter.id)
8655
- }, {
8656
- children: jsx(Typography, Object.assign({
8657
- sx: {
8658
- color: 'geowebColors.buttons.primary.default.fill',
8659
- fontSize: '14px',
8660
- fontWeight: 500
8661
- }
8662
- }, {
8663
- children: t('shared-only')
8664
- }))
8665
- }))
8666
- }) : null]
8652
+ })]
8667
8653
  }))
8668
8654
  }));
8669
8655
  }
@@ -9453,25 +9439,8 @@ var index = /*#__PURE__*/Object.freeze({
9453
9439
  utc: utc
9454
9440
  });
9455
9441
 
9456
- /* *
9457
- * Licensed under the Apache License, Version 2.0 (the "License");
9458
- * you may not use this file except in compliance with the License.
9459
- * You may obtain a copy of the License at
9460
- *
9461
- * http://www.apache.org/licenses/LICENSE-2.0
9462
- *
9463
- * Unless required by applicable law or agreed to in writing, software
9464
- * distributed under the License is distributed on an "AS IS" BASIS,
9465
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9466
- * See the License for the specific language governing permissions and
9467
- * limitations under the License.
9468
- *
9469
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9470
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
9471
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9472
- * */
9473
9442
  const createMockStoreWithEggs = mockState => {
9474
- const mockStore = configureStore();
9443
+ const mockStore = configureStoreToBeDeprecated();
9475
9444
  const store = mockStore(mockState);
9476
9445
  store.addEggs = typeof jest !== 'undefined' ? jest.fn() : () => {}; // mocking the dynamic module loader
9477
9446
  return store;
@@ -9481,10 +9450,10 @@ const createToolkitMockStoreWithEggs = storeConfig => {
9481
9450
  reducer,
9482
9451
  preloadedState
9483
9452
  } = storeConfig;
9484
- const store = configureStore$1({
9453
+ const store = configureStore(Object.assign(Object.assign({}, storeConfig), {
9485
9454
  reducer,
9486
9455
  preloadedState
9487
- });
9456
+ }));
9488
9457
  store.addEggs = typeof jest !== 'undefined' ? jest.fn() : () => {}; // mocking the dynamic module loader
9489
9458
  return store;
9490
9459
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/shared",
3
- "version": "9.29.0",
3
+ "version": "9.30.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": {
@@ -5,8 +5,8 @@ export interface FilterChipProps {
5
5
  isSelected?: boolean;
6
6
  isDisabled?: boolean;
7
7
  handleClick?: (label: string, isSelected?: boolean) => void;
8
- onAction?: React.MouseEventHandler;
9
8
  actionIcon?: React.ReactElement;
9
+ onClick?: (ref: HTMLElement | null) => void;
10
10
  size?: 'small' | 'medium';
11
11
  }
12
12
  declare const FilterChip: React.FC<FilterChipProps>;
@@ -1,5 +1,4 @@
1
1
  import { MockStoreEnhanced } from 'redux-mock-store';
2
- import { AnyAction, Reducer, ReducersMapObject, ThunkMiddleware, StoreEnhancer } from '@reduxjs/toolkit';
3
2
  import { ConfigureStoreOptions, ToolkitStore } from '@reduxjs/toolkit/dist/configureStore';
4
3
  interface MockStoreWithEggs extends MockStoreEnhanced {
5
4
  addEggs?: () => void;
@@ -7,14 +6,6 @@ interface MockStoreWithEggs extends MockStoreEnhanced {
7
6
  interface ToolkitStoreWithEggs extends ToolkitStore {
8
7
  addEggs?: () => void;
9
8
  }
10
- interface StoreConfig {
11
- reducer: Reducer<unknown, AnyAction> | ReducersMapObject<unknown, AnyAction>;
12
- preloadedState: ConfigureStoreOptions<unknown, AnyAction, [
13
- ThunkMiddleware<unknown, AnyAction>
14
- ], [
15
- StoreEnhancer
16
- ]> | object | undefined;
17
- }
18
9
  export declare const createMockStoreWithEggs: (mockState: unknown) => MockStoreWithEggs;
19
- export declare const createToolkitMockStoreWithEggs: (storeConfig: StoreConfig) => ToolkitStoreWithEggs;
10
+ export declare const createToolkitMockStoreWithEggs: (storeConfig: ConfigureStoreOptions) => ToolkitStoreWithEggs;
20
11
  export {};