@opengeoweb/shared 5.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +0 -0
  2. package/index.js +47 -13
  3. package/package.json +3 -3
  4. package/src/index.d.ts +0 -0
  5. package/src/lib/components/AlertBanner/AlertBanner.d.ts +0 -0
  6. package/src/lib/components/AlertBanner/AlertBanner.spec.d.ts +0 -0
  7. package/src/lib/components/AlertBanner/AlertBanner.stories.d.ts +0 -0
  8. package/src/lib/components/AlertBanner/index.d.ts +0 -0
  9. package/src/lib/components/AlertIcon/AlertIcon.d.ts +0 -0
  10. package/src/lib/components/AlertIcon/index.d.ts +0 -0
  11. package/src/lib/components/AppHeader/AppHeader.d.ts +0 -0
  12. package/src/lib/components/AppHeader/AppHeader.spec.d.ts +0 -0
  13. package/src/lib/components/AppHeader/AppHeader.stories.d.ts +0 -0
  14. package/src/lib/components/AppHeader/index.d.ts +0 -0
  15. package/src/lib/components/AppLayout/AppLayout.d.ts +0 -0
  16. package/src/lib/components/AppLayout/AppLayout.spec.d.ts +0 -0
  17. package/src/lib/components/AppLayout/AppLayout.stories.d.ts +0 -0
  18. package/src/lib/components/AppLayout/index.d.ts +0 -0
  19. package/src/lib/components/Avatar/Avatar.d.ts +0 -0
  20. package/src/lib/components/Avatar/Avatar.stories.d.ts +0 -0
  21. package/src/lib/components/Avatar/index.d.ts +0 -0
  22. package/src/lib/components/ConfirmationDialog/ConfirmationDialog.d.ts +0 -0
  23. package/src/lib/components/ConfirmationDialog/ConfirmationDialog.spec.d.ts +0 -0
  24. package/src/lib/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +0 -0
  25. package/src/lib/components/ConfirmationDialog/ConfirmationService.d.ts +0 -0
  26. package/src/lib/components/ConfirmationDialog/ConfirmationService.spec.d.ts +0 -0
  27. package/src/lib/components/ConfirmationDialog/index.d.ts +0 -0
  28. package/src/lib/components/CustomAccordion/CustomAccordion.d.ts +0 -0
  29. package/src/lib/components/CustomAccordion/CustomAccordion.spec.d.ts +0 -0
  30. package/src/lib/components/CustomAccordion/CustomAccordion.stories.d.ts +0 -0
  31. package/src/lib/components/CustomAccordion/index.d.ts +0 -0
  32. package/src/lib/components/CustomDialog/CustomDialog.d.ts +0 -0
  33. package/src/lib/components/CustomDialog/CustomDialog.spec.d.ts +0 -0
  34. package/src/lib/components/CustomDialog/CustomDialog.stories.d.ts +0 -0
  35. package/src/lib/components/CustomDialog/index.d.ts +0 -0
  36. package/src/lib/components/CustomIconButton/CustomIconButton.d.ts +0 -0
  37. package/src/lib/components/CustomIconButton/CustomIconButton.spec.d.ts +0 -0
  38. package/src/lib/components/CustomIconButton/CustomIconButton.stories.d.ts +0 -0
  39. package/src/lib/components/CustomIconButton/index.d.ts +0 -0
  40. package/src/lib/components/CustomSlider/CustomSlider.d.ts +0 -0
  41. package/src/lib/components/CustomSlider/CustomSlider.spec.d.ts +0 -0
  42. package/src/lib/components/CustomSlider/CustomSlider.stories.d.ts +0 -0
  43. package/src/lib/components/CustomSlider/index.d.ts +0 -0
  44. package/src/lib/components/CustomToggleButton/CustomToggleButton.d.ts +0 -0
  45. package/src/lib/components/CustomToggleButton/CustomToggleButton.spec.d.ts +0 -0
  46. package/src/lib/components/CustomToggleButton/CustomToggleButton.stories.d.ts +0 -0
  47. package/src/lib/components/CustomToggleButton/index.d.ts +0 -0
  48. package/src/lib/components/CustomTooltip/CustomTooltip.d.ts +0 -0
  49. package/src/lib/components/CustomTooltip/CustomTooltip.spec.d.ts +0 -0
  50. package/src/lib/components/CustomTooltip/index.d.ts +0 -0
  51. package/src/lib/components/DraggableResizable/Draggable.d.ts +0 -0
  52. package/src/lib/components/DraggableResizable/Draggable.spec.d.ts +0 -0
  53. package/src/lib/components/DraggableResizable/Resizable.d.ts +0 -0
  54. package/src/lib/components/DraggableResizable/Resizable.spec.d.ts +0 -0
  55. package/src/lib/components/DraggableResizable/index.d.ts +0 -0
  56. package/src/lib/components/DraggableResizable/types.d.ts +0 -0
  57. package/src/lib/components/ErrorBoundary/ErrorBoundary.d.ts +0 -0
  58. package/src/lib/components/ErrorBoundary/ErrorBoundary.spec.d.ts +0 -0
  59. package/src/lib/components/ErrorBoundary/ErrorBoundary.stories.d.ts +0 -0
  60. package/src/lib/components/ErrorBoundary/index.d.ts +0 -0
  61. package/src/lib/components/Providers/Providers.d.ts +0 -0
  62. package/src/lib/components/Providers/index.d.ts +0 -0
  63. package/src/lib/components/SearchHighlight/SearchHighlight.d.ts +0 -0
  64. package/src/lib/components/SearchHighlight/SearchHighlight.spec.d.ts +0 -0
  65. package/src/lib/components/SearchHighlight/SearchHighlight.stories.d.ts +0 -0
  66. package/src/lib/components/SearchHighlight/index.d.ts +0 -0
  67. package/src/lib/components/StatusTag/StatusTag.d.ts +0 -0
  68. package/src/lib/components/StatusTag/StatusTag.spec.d.ts +0 -0
  69. package/src/lib/components/StatusTag/StatusTag.stories.d.ts +0 -0
  70. package/src/lib/components/StatusTag/index.d.ts +0 -0
  71. package/src/lib/components/ToggleMenu/ToggleMenu.d.ts +0 -0
  72. package/src/lib/components/ToggleMenu/ToggleMenu.spec.d.ts +0 -0
  73. package/src/lib/components/ToggleMenu/ToggleMenu.stories.d.ts +0 -0
  74. package/src/lib/components/ToggleMenu/index.d.ts +0 -0
  75. package/src/lib/components/ToolContainer/ToolContainer.d.ts +0 -0
  76. package/src/lib/components/ToolContainer/ToolContainer.spec.d.ts +0 -0
  77. package/src/lib/components/ToolContainer/ToolContainer.stories.d.ts +0 -0
  78. package/src/lib/components/ToolContainer/ToolContainerDraggable.d.ts +0 -0
  79. package/src/lib/components/ToolContainer/ToolContainerDraggable.spec.d.ts +0 -0
  80. package/src/lib/components/ToolContainer/ToolContainerDraggable.stories.d.ts +0 -0
  81. package/src/lib/components/ToolContainer/ToolContainerSnapShots.stories.d.ts +0 -0
  82. package/src/lib/components/ToolContainer/ToolFooter.d.ts +0 -0
  83. package/src/lib/components/ToolContainer/ToolFooter.spec.d.ts +0 -0
  84. package/src/lib/components/ToolContainer/ToolHeader.d.ts +0 -0
  85. package/src/lib/components/ToolContainer/ToolHeader.spec.d.ts +0 -0
  86. package/src/lib/components/ToolContainer/ToolHeader.stories.d.ts +0 -0
  87. package/src/lib/components/ToolContainer/index.d.ts +0 -0
  88. package/src/lib/components/ToolContainer/types.d.ts +0 -0
  89. package/src/lib/components/ToolContainer/useHandleSizeFromOutsideComponent.d.ts +0 -0
  90. package/src/lib/components/ToolContainer/useHandleSizeFromOutsideComponent.spec.d.ts +0 -0
  91. package/src/lib/components/TooltipSelect/TooltipSelect.d.ts +0 -0
  92. package/src/lib/components/TooltipSelect/TooltipSelect.spec.d.ts +0 -0
  93. package/src/lib/components/TooltipSelect/TooltipSelect.stories.d.ts +0 -0
  94. package/src/lib/components/TooltipSelect/index.d.ts +0 -0
  95. package/src/lib/components/TooltipSelect/tooltipContainerStyles.d.ts +0 -0
  96. package/src/lib/components/UserMenu/CheatSheet/CheatSheet.d.ts +0 -0
  97. package/src/lib/components/UserMenu/CheatSheet/CheatSheet.spec.d.ts +0 -0
  98. package/src/lib/components/UserMenu/CheatSheet/CheatSheet.stories.d.ts +0 -0
  99. package/src/lib/components/UserMenu/CheatSheet/ShortcutList.d.ts +0 -0
  100. package/src/lib/components/UserMenu/CheatSheet/ShortcutList.spec.d.ts +0 -0
  101. package/src/lib/components/UserMenu/CheatSheet/ShortcutSegment.d.ts +0 -0
  102. package/src/lib/components/UserMenu/CheatSheet/ShortcutSegment.spec.d.ts +0 -0
  103. package/src/lib/components/UserMenu/UserMenu.d.ts +0 -0
  104. package/src/lib/components/UserMenu/UserMenu.spec.d.ts +0 -0
  105. package/src/lib/components/UserMenu/UserMenu.stories.d.ts +0 -0
  106. package/src/lib/components/UserMenu/UserMenuItemCheatSheet.d.ts +0 -0
  107. package/src/lib/components/UserMenu/UserMenuItemCheatSheet.spec.d.ts +0 -0
  108. package/src/lib/components/UserMenu/UserMenuItemTheme.d.ts +0 -0
  109. package/src/lib/components/UserMenu/UserMenuItemTheme.spec.d.ts +0 -0
  110. package/src/lib/components/UserMenu/index.d.ts +0 -0
  111. package/src/lib/components/UserMenu/useUserMenu.d.ts +0 -0
  112. package/src/lib/components/UserMenu/useUserMenu.spec.d.ts +0 -0
  113. package/src/lib/components/UserMenu/utils.d.ts +0 -0
  114. package/src/lib/components/WithEggs/WithEggs.d.ts +0 -0
  115. package/src/lib/components/WithEggs/WithEggs.spec.d.ts +0 -0
  116. package/src/lib/components/WithEggs/index.d.ts +0 -0
  117. package/src/lib/components/components.stories.d.ts +0 -0
  118. package/src/lib/components/index.d.ts +0 -0
  119. package/src/lib/hooks/index.d.ts +0 -0
  120. package/src/lib/hooks/useIsMounted/useIsMounted.d.ts +0 -0
  121. package/src/lib/hooks/useIsMounted/useIsMounted.spec.d.ts +0 -0
  122. package/src/lib/hooks/useMakeSureContainerStaysInsideWindow/useMakeSureContainerStaysInsideWindow.d.ts +0 -0
  123. package/src/lib/hooks/useMakeSureContainerStaysInsideWindow/useMakeSureContainerStaysInsideWindow.spec.d.ts +0 -0
  124. package/src/lib/hooks/usePoller/usePoller.d.ts +0 -0
  125. package/src/lib/hooks/usePoller/usePoller.spec.d.ts +0 -0
  126. package/src/lib/hooks/usePoller/usePoller.stories.d.ts +0 -0
  127. package/src/lib/hooks/usePreventBrowserClose/usePreventBrowserClose.d.ts +0 -0
  128. package/src/lib/hooks/usePreventBrowserClose/usePreventBrowserClose.spec.d.ts +0 -0
  129. package/src/lib/hooks/usePreventBrowserClose/usePreventBrowserClose.stories.d.ts +0 -0
  130. package/src/lib/hooks/usePrevious/usePrevious.d.ts +0 -0
  131. package/src/lib/hooks/usePrevious/usePrevious.spec.d.ts +0 -0
  132. package/src/lib/hooks/usePrevious/usePrevious.stories.d.ts +0 -0
  133. package/src/lib/storyshots/Storyshots.spec.d.ts +0 -0
  134. package/src/lib/utils/axiosErrorUtils/axiosErrorUtils.d.ts +0 -0
  135. package/src/lib/utils/axiosErrorUtils/axiosErrorUtils.spec.d.ts +0 -0
  136. package/src/lib/utils/axiosErrorUtils/index.d.ts +0 -0
  137. package/src/lib/utils/dateUtils/dateUtils.d.ts +0 -0
  138. package/src/lib/utils/dateUtils/dateUtils.spec.d.ts +0 -0
  139. package/src/lib/utils/dateUtils/index.d.ts +0 -0
  140. package/src/lib/utils/index.d.ts +0 -0
package/README.md CHANGED
File without changes
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { useRef, createContext, useContext } from 'react';
2
+ import React__default, { useRef, createContext, version, useContext } from 'react';
3
3
  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, Slider, ToggleButton, Menu, ListSubheader, ListItemIcon, Select, Accordion, AccordionSummary, AccordionDetails } from '@mui/material';
4
4
  import { Close, Exclamation, Success, Info, ChevronRight, GeoWebLogo, HamburgerMenu, Resize, useThemeContext, DragHandle, ArrowLeft, ArrowRight, KeyOption, ArrowUp, ArrowDown, KeyCommand, Options, ChevronDown } from '@opengeoweb/theme';
5
5
  import require$$2, { flushSync } from 'react-dom';
@@ -24307,12 +24307,52 @@ if (
24307
24307
 
24308
24308
  if (process.env.NODE_ENV === 'production') ;
24309
24309
 
24310
- const ReactReduxContext = /*#__PURE__*/createContext(null);
24310
+ const ContextKey = Symbol.for(`react-redux-context-${version}`);
24311
+ const gT = globalThis;
24311
24312
 
24312
- if (process.env.NODE_ENV !== 'production') {
24313
- ReactReduxContext.displayName = 'ReactRedux';
24313
+ function getContext() {
24314
+ let realContext = gT[ContextKey];
24315
+
24316
+ if (!realContext) {
24317
+ realContext = createContext(null);
24318
+
24319
+ if (process.env.NODE_ENV !== 'production') {
24320
+ realContext.displayName = 'ReactRedux';
24321
+ }
24322
+
24323
+ gT[ContextKey] = realContext;
24324
+ }
24325
+
24326
+ return realContext;
24314
24327
  }
24315
24328
 
24329
+ const ReactReduxContext = /*#__PURE__*/new Proxy({}, /*#__PURE__*/new Proxy({}, {
24330
+ get(_, handler) {
24331
+ const target = getContext(); // @ts-ignore
24332
+
24333
+ return (_target, ...args) => Reflect[handler](target, ...args);
24334
+ }
24335
+
24336
+ }));
24337
+
24338
+ /**
24339
+ * Hook factory, which creates a `useReduxContext` hook bound to a given context. This is a low-level
24340
+ * hook that you should usually not need to call directly.
24341
+ *
24342
+ * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
24343
+ * @returns {Function} A `useReduxContext` hook bound to the specified context.
24344
+ */
24345
+ function createReduxContextHook(context = ReactReduxContext) {
24346
+ return function useReduxContext() {
24347
+ const contextValue = useContext(context);
24348
+
24349
+ if (process.env.NODE_ENV !== 'production' && !contextValue) {
24350
+ throw new Error('could not find react-redux context value; please ensure the component is wrapped in a <Provider>');
24351
+ }
24352
+
24353
+ return contextValue;
24354
+ };
24355
+ }
24316
24356
  /**
24317
24357
  * A hook to access the value of the `ReactReduxContext`. This is a low-level
24318
24358
  * hook that you should usually not need to call directly.
@@ -24329,15 +24369,8 @@ if (process.env.NODE_ENV !== 'production') {
24329
24369
  * return <div>{store.getState()}</div>
24330
24370
  * }
24331
24371
  */
24332
- function useReduxContext() {
24333
- const contextValue = useContext(ReactReduxContext);
24334
24372
 
24335
- if (process.env.NODE_ENV !== 'production' && !contextValue) {
24336
- throw new Error('could not find react-redux context value; please ensure the component is wrapped in a <Provider>');
24337
- }
24338
-
24339
- return contextValue;
24340
- }
24373
+ const useReduxContext = /*#__PURE__*/createReduxContextHook();
24341
24374
 
24342
24375
  var reactIs$1 = {exports: {}};
24343
24376
 
@@ -24814,7 +24847,8 @@ if (process.env.NODE_ENV === 'production') ;
24814
24847
 
24815
24848
  function createStoreHook(context = ReactReduxContext) {
24816
24849
  const useReduxContext$1 = // @ts-ignore
24817
- context === ReactReduxContext ? useReduxContext : () => useContext(context);
24850
+ context === ReactReduxContext ? useReduxContext : // @ts-ignore
24851
+ createReduxContextHook(context);
24818
24852
  return function useStore() {
24819
24853
  const {
24820
24854
  store
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/shared",
3
- "version": "5.0.0",
3
+ "version": "5.1.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": {
@@ -14,7 +14,7 @@
14
14
  "dependencies": {},
15
15
  "peerDependencies": {
16
16
  "@mui/material": "5.12.0",
17
- "@opengeoweb/theme": "5.0.0",
17
+ "@opengeoweb/theme": "5.1.0",
18
18
  "@redux-eggs/core": "2.2.0",
19
19
  "axios": "1.4.0",
20
20
  "date-fns": "2.29.3",
@@ -22,6 +22,6 @@
22
22
  "re-resizable": "6.9.9",
23
23
  "react": "18.2.0",
24
24
  "react-draggable": "4.4.5",
25
- "react-redux": "8.0.4"
25
+ "react-redux": "8.1.1"
26
26
  }
27
27
  }
package/src/index.d.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes