@opengeoweb/shared 9.20.2 → 9.21.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/shared",
3
- "version": "9.20.2",
3
+ "version": "9.21.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": {
@@ -19,8 +19,8 @@
19
19
  "date-fns": "^3.3.0",
20
20
  "redux-mock-store": "^1.5.4",
21
21
  "@reduxjs/toolkit": "^1.9.7",
22
- "react-i18next": "^13.5.0",
23
- "i18next": "^23.7.19",
22
+ "react-i18next": "^14.1.2",
23
+ "i18next": "^23.11.5",
24
24
  "@sentry/react": "^7.109.0"
25
25
  },
26
26
  "peerDependencies": {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DraggableEvent } from 'react-draggable';
3
3
  import { DraggablePosition } from './types';
4
- interface DraggableComponentProps {
4
+ export interface DraggableComponentProps {
5
5
  nodeRef?: React.RefObject<HTMLElement>;
6
6
  children?: React.ReactNode;
7
7
  bounds?: 'parent' | string;
@@ -1,33 +1,15 @@
1
1
  import React from 'react';
2
- import { ControlPosition } from 'react-draggable';
3
- import { Size } from '../DraggableResizable/types';
4
- interface PositionAndSizeProps {
5
- currentX: number;
6
- newWidth: number;
7
- maxWidth: number;
8
- position: ControlPosition;
9
- startSize: Size;
10
- }
11
- interface PositionAndSizePropsRight extends PositionAndSizeProps {
12
- currentWidth: number;
13
- }
14
- export declare const getRightPositionAndSize: ({ currentX, currentWidth, newWidth, maxWidth, position, startSize, }: PositionAndSizePropsRight) => {
15
- size: Size;
16
- position: ControlPosition;
17
- };
18
- export declare const getLeftPositionAndSize: ({ currentX, newWidth, maxWidth, position, startSize, }: PositionAndSizeProps) => {
2
+ import { DraggablePosition, Position, Size } from '../DraggableResizable/types';
3
+ export declare const getNewPositionSize: (element: Element, boundsNode: Element, isRightAligned: boolean, position: DraggablePosition, newSize?: Size) => {
4
+ position: Position;
19
5
  size: Size;
20
- position: ControlPosition;
21
6
  };
22
- interface UseHandleSizeFromOutsideComponentProps {
7
+ export declare const useHandleSizeFromOutsideComponent: ({ nodeRef, bounds, position, isRightAligned, isOpen, startSize, onChangeSize, }: {
23
8
  nodeRef: React.RefObject<HTMLDivElement>;
24
- startSize: Size;
25
- bounds?: 'parent' | string;
9
+ position: DraggablePosition;
10
+ bounds: string;
26
11
  isRightAligned: boolean;
27
- size: Size;
28
- setSize: (size: Size) => void;
29
- position: ControlPosition;
30
- setPosition: (position: ControlPosition) => void;
31
- }
32
- export declare const useHandleSizeFromOutsideComponent: ({ nodeRef, startSize, bounds, isRightAligned, size, setSize, position, setPosition, }: UseHandleSizeFromOutsideComponentProps) => void;
33
- export {};
12
+ isOpen: boolean;
13
+ startSize: Size;
14
+ onChangeSize: (size: Size) => void;
15
+ }) => void;