@opengeoweb/shared 5.2.1 → 6.0.1

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.js CHANGED
@@ -22742,7 +22742,7 @@ var useHandleSizeFromOutsideComponent = function useHandleSizeFromOutsideCompone
22742
22742
  position = _ref3.position,
22743
22743
  setPosition = _ref3.setPosition;
22744
22744
  React__default.useEffect(function () {
22745
- var _a, _b;
22745
+ var _a, _b, _c;
22746
22746
  // update size when startSize has changed outside the component
22747
22747
  if (startSize !== size) {
22748
22748
  var node = (_a = nodeRef.current) === null || _a === void 0 ? void 0 : _a.firstChild;
@@ -22750,10 +22750,10 @@ var useHandleSizeFromOutsideComponent = function useHandleSizeFromOutsideCompone
22750
22750
  var _boundsNode$getBoundi = boundsNode.getBoundingClientRect(),
22751
22751
  maxWidth = _boundsNode$getBoundi.width;
22752
22752
  var newWidth = Number(startSize.width);
22753
- var _node$getBoundingClie = node.getBoundingClientRect(),
22754
- currentX = _node$getBoundingClie.x,
22755
- currentWidth = _node$getBoundingClie.width;
22756
- var _ref4 = isRightAligned ? getRightPositionAndSize({
22753
+ var _ref4 = (_c = node === null || node === void 0 ? void 0 : node.getBoundingClientRect()) !== null && _c !== void 0 ? _c : {},
22754
+ currentX = _ref4.x,
22755
+ currentWidth = _ref4.width;
22756
+ var _ref5 = isRightAligned ? getRightPositionAndSize({
22757
22757
  currentX: currentX,
22758
22758
  currentWidth: currentWidth,
22759
22759
  newWidth: newWidth,
@@ -22761,14 +22761,14 @@ var useHandleSizeFromOutsideComponent = function useHandleSizeFromOutsideCompone
22761
22761
  position: position,
22762
22762
  startSize: startSize
22763
22763
  }) : getLeftPositionAndSize({
22764
- currentX: currentX,
22764
+ currentX: currentX - boundsNode.getBoundingClientRect().x,
22765
22765
  newWidth: newWidth,
22766
22766
  maxWidth: maxWidth,
22767
22767
  position: position,
22768
22768
  startSize: startSize
22769
22769
  }),
22770
- newPosition = _ref4.position,
22771
- newSize = _ref4.size;
22770
+ newPosition = _ref5.position,
22771
+ newSize = _ref5.size;
22772
22772
  setSize(newSize);
22773
22773
  setPosition(newPosition);
22774
22774
  }
@@ -23476,11 +23476,14 @@ var CustomSlider = function CustomSlider(_a) {
23476
23476
  var element = React$1.useRef(null);
23477
23477
  var themeContext = useThemeContext();
23478
23478
  React$1.useEffect(function () {
23479
+ if (!element.current) {
23480
+ return;
23481
+ }
23479
23482
  var activeMarkLabelElements = element.current.getElementsByClassName('MuiSlider-markLabelActive');
23480
- var _reverse = _toConsumableArray(activeMarkLabelElements).reverse(),
23481
- _reverse2 = _toArray(_reverse),
23482
- first = _reverse2[0],
23483
- rest = _reverse2.slice(1);
23483
+ var _Array$from$reverse = Array.from(activeMarkLabelElements).reverse(),
23484
+ _Array$from$reverse2 = _toArray(_Array$from$reverse),
23485
+ first = _Array$from$reverse2[0],
23486
+ rest = _Array$from$reverse2.slice(1);
23484
23487
  if (first) {
23485
23488
  first.classList.add('selectedLabel');
23486
23489
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/shared",
3
- "version": "5.2.1",
3
+ "version": "6.0.1",
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,9 +14,9 @@
14
14
  "dependencies": {},
15
15
  "peerDependencies": {
16
16
  "@mui/material": "5.12.0",
17
- "@opengeoweb/theme": "5.2.1",
17
+ "@opengeoweb/theme": "6.0.1",
18
18
  "@redux-eggs/core": "2.2.0",
19
- "axios": "1.4.0",
19
+ "axios": "1.2.0",
20
20
  "date-fns": "2.29.3",
21
21
  "lodash": "4.17.21",
22
22
  "re-resizable": "6.9.9",
package/src/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './lib/components';
2
2
  export * from './lib/hooks';
3
3
  export * from './lib/utils';
4
+ export * from './lib/types';
@@ -1,4 +1,8 @@
1
1
  import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
2
6
  export declare const ErrorBoundaryDemo: {
3
7
  (): React.ReactElement;
4
8
  storyName: string;
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,29 @@
1
+ import { ThemeTypes } from '@opengeoweb/theme';
2
+ export interface ConfigType {
3
+ GW_AUTH_LOGIN_URL?: string;
4
+ GW_AUTH_LOGOUT_URL?: string;
5
+ GW_AUTH_TOKEN_URL?: string;
6
+ GW_AUTH_CLIENT_ID?: string;
7
+ GW_INFRA_BASE_URL?: string;
8
+ GW_APP_URL?: string;
9
+ GW_INITIAL_PRESETS_FILENAME?: string;
10
+ GW_CAP_CONFIGURATION_FILENAME?: string;
11
+ GW_TIMESERIES_CONFIGURATION_FILENAME?: string;
12
+ GW_DEFAULT_THEME?: ThemeTypes;
13
+ GW_SW_BASE_URL?: string;
14
+ GW_SIGMET_BASE_URL?: string;
15
+ GW_AIRMET_BASE_URL?: string;
16
+ GW_TAF_BASE_URL?: string;
17
+ GW_PRESET_BACKEND_URL?: string;
18
+ GW_CAP_BASE_URL?: string;
19
+ GW_FEATURE_APP_TITLE?: string;
20
+ GW_FEATURE_FORCE_AUTHENTICATION?: boolean;
21
+ GW_FEATURE_MODULE_SPACE_WEATHER?: boolean;
22
+ GW_FEATURE_MODULE_SIGMET_CONFIGURATION?: string;
23
+ GW_FEATURE_MODULE_AIRMET_CONFIGURATION?: string;
24
+ GW_FEATURE_MENU_FEEDBACK?: boolean;
25
+ GW_FEATURE_MENU_INFO?: boolean;
26
+ GW_FEATURE_MENU_USER_DOCUMENTATION_URL?: string;
27
+ GW_FEATURE_MENU_VERSION?: boolean;
28
+ GW_FEATURE_MENU_FE_VERSION?: boolean;
29
+ }