@opengeoweb/shared 4.13.0 → 4.13.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.esm.js
CHANGED
|
@@ -1933,6 +1933,8 @@ var DraggableComponent = function DraggableComponent(_a) {
|
|
|
1933
1933
|
var title = _a.title,
|
|
1934
1934
|
_a$bounds = _a.bounds,
|
|
1935
1935
|
bounds = _a$bounds === void 0 ? 'body' : _a$bounds,
|
|
1936
|
+
_a$cancel = _a.cancel,
|
|
1937
|
+
cancel = _a$cancel === void 0 ? '.MuiButtonBase-root' : _a$cancel,
|
|
1936
1938
|
_a$headerSize = _a.headerSize,
|
|
1937
1939
|
headerSize = _a$headerSize === void 0 ? 'small' : _a$headerSize,
|
|
1938
1940
|
_a$startSize = _a.startSize,
|
|
@@ -1972,7 +1974,7 @@ var DraggableComponent = function DraggableComponent(_a) {
|
|
|
1972
1974
|
className = _a.className,
|
|
1973
1975
|
_a$sx = _a.sx,
|
|
1974
1976
|
sx = _a$sx === void 0 ? {} : _a$sx,
|
|
1975
|
-
props = __rest(_a, ["title", "bounds", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "className", "sx"]);
|
|
1977
|
+
props = __rest(_a, ["title", "bounds", "cancel", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "className", "sx"]);
|
|
1976
1978
|
|
|
1977
1979
|
var zIndex = (source === 'app' ? BASE_Z_INDEX : 1000) + order;
|
|
1978
1980
|
var elevation = BASE_ELEVATION + order;
|
|
@@ -2041,6 +2043,7 @@ var DraggableComponent = function DraggableComponent(_a) {
|
|
|
2041
2043
|
return isOpen ? /*#__PURE__*/React__default.createElement(DraggableComponent$1, {
|
|
2042
2044
|
nodeRef: nodeRef,
|
|
2043
2045
|
bounds: bounds,
|
|
2046
|
+
cancel: cancel,
|
|
2044
2047
|
position: position,
|
|
2045
2048
|
onStop: onStopDrag,
|
|
2046
2049
|
handle: ".".concat(headerClassName),
|
package/index.umd.js
CHANGED
|
@@ -1790,61 +1790,63 @@
|
|
|
1790
1790
|
var title = _a.title,
|
|
1791
1791
|
_b = _a.bounds,
|
|
1792
1792
|
bounds = _b === void 0 ? 'body' : _b,
|
|
1793
|
-
_c = _a.
|
|
1794
|
-
|
|
1795
|
-
_d = _a.
|
|
1796
|
-
|
|
1793
|
+
_c = _a.cancel,
|
|
1794
|
+
cancel = _c === void 0 ? '.MuiButtonBase-root' : _c,
|
|
1795
|
+
_d = _a.headerSize,
|
|
1796
|
+
headerSize = _d === void 0 ? 'small' : _d,
|
|
1797
|
+
_e = _a.startSize,
|
|
1798
|
+
startSize = _e === void 0 ? {
|
|
1797
1799
|
width: 'auto',
|
|
1798
1800
|
height: 'auto'
|
|
1799
|
-
} :
|
|
1800
|
-
|
|
1801
|
-
startPosition =
|
|
1801
|
+
} : _e,
|
|
1802
|
+
_f = _a.startPosition,
|
|
1803
|
+
startPosition = _f === void 0 ? {
|
|
1802
1804
|
left: undefined,
|
|
1803
1805
|
right: undefined,
|
|
1804
1806
|
top: undefined
|
|
1805
|
-
} :
|
|
1807
|
+
} : _f,
|
|
1806
1808
|
children = _a.children,
|
|
1807
|
-
|
|
1808
|
-
isOpen =
|
|
1809
|
-
|
|
1810
|
-
onClose =
|
|
1811
|
-
|
|
1812
|
-
defaultInitialMaxHeight =
|
|
1813
|
-
|
|
1814
|
-
onChangeSize =
|
|
1815
|
-
|
|
1816
|
-
onMouseDown =
|
|
1817
|
-
|
|
1818
|
-
onResizeStop =
|
|
1819
|
-
|
|
1820
|
-
onDragEnd =
|
|
1821
|
-
|
|
1822
|
-
order =
|
|
1823
|
-
|
|
1824
|
-
source =
|
|
1825
|
-
|
|
1826
|
-
leftHeaderComponent =
|
|
1827
|
-
|
|
1828
|
-
rightHeaderComponent =
|
|
1809
|
+
_g = _a.isOpen,
|
|
1810
|
+
isOpen = _g === void 0 ? true : _g,
|
|
1811
|
+
_h = _a.onClose,
|
|
1812
|
+
onClose = _h === void 0 ? function () {} : _h,
|
|
1813
|
+
_j = _a.initialMaxHeight,
|
|
1814
|
+
defaultInitialMaxHeight = _j === void 0 ? 'initial' : _j,
|
|
1815
|
+
_k = _a.onChangeSize,
|
|
1816
|
+
onChangeSize = _k === void 0 ? function () {} : _k,
|
|
1817
|
+
_l = _a.onMouseDown,
|
|
1818
|
+
onMouseDown = _l === void 0 ? function () {} : _l,
|
|
1819
|
+
_m = _a.onResizeStop,
|
|
1820
|
+
onResizeStop = _m === void 0 ? function () {} : _m,
|
|
1821
|
+
_o = _a.onDragEnd,
|
|
1822
|
+
onDragEnd = _o === void 0 ? function () {} : _o,
|
|
1823
|
+
_p = _a.order,
|
|
1824
|
+
order = _p === void 0 ? 1 : _p,
|
|
1825
|
+
_q = _a.source,
|
|
1826
|
+
source = _q === void 0 ? 'app' : _q,
|
|
1827
|
+
_r = _a.leftHeaderComponent,
|
|
1828
|
+
leftHeaderComponent = _r === void 0 ? null : _r,
|
|
1829
|
+
_s = _a.rightHeaderComponent,
|
|
1830
|
+
rightHeaderComponent = _s === void 0 ? null : _s,
|
|
1829
1831
|
className = _a.className,
|
|
1830
|
-
|
|
1831
|
-
sx =
|
|
1832
|
-
props = __rest(_a, ["title", "bounds", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "className", "sx"]);
|
|
1832
|
+
_t = _a.sx,
|
|
1833
|
+
sx = _t === void 0 ? {} : _t,
|
|
1834
|
+
props = __rest(_a, ["title", "bounds", "cancel", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "className", "sx"]);
|
|
1833
1835
|
|
|
1834
1836
|
var zIndex = (source === 'app' ? BASE_Z_INDEX : 1000) + order;
|
|
1835
1837
|
var elevation = BASE_ELEVATION + order;
|
|
1836
1838
|
var nodeRef = React__default["default"].useRef(null);
|
|
1837
1839
|
|
|
1838
|
-
var
|
|
1840
|
+
var _u = __read(React__default["default"].useState({
|
|
1839
1841
|
x: 0,
|
|
1840
1842
|
y: 0
|
|
1841
1843
|
}), 2),
|
|
1842
|
-
position =
|
|
1843
|
-
setPosition =
|
|
1844
|
+
position = _u[0],
|
|
1845
|
+
setPosition = _u[1];
|
|
1844
1846
|
|
|
1845
|
-
var
|
|
1846
|
-
size =
|
|
1847
|
-
setSize =
|
|
1847
|
+
var _v = __read(React__default["default"].useState(startSize), 2),
|
|
1848
|
+
size = _v[0],
|
|
1849
|
+
setSize = _v[1];
|
|
1848
1850
|
|
|
1849
1851
|
var isRightAligned = startPosition && startPosition.right !== null && startPosition.right !== undefined;
|
|
1850
1852
|
var onStopDrag = React__default["default"].useCallback(function (_event, position) {
|
|
@@ -1852,9 +1854,9 @@
|
|
|
1852
1854
|
onDragEnd(position, size);
|
|
1853
1855
|
}, [setPosition, onDragEnd, size]);
|
|
1854
1856
|
|
|
1855
|
-
var
|
|
1856
|
-
initialMaxHeight =
|
|
1857
|
-
setInitialMaxHeight =
|
|
1857
|
+
var _w = __read(React__default["default"].useState(defaultInitialMaxHeight), 2),
|
|
1858
|
+
initialMaxHeight = _w[0],
|
|
1859
|
+
setInitialMaxHeight = _w[1];
|
|
1858
1860
|
|
|
1859
1861
|
var onStartResize = function onStartResize() {
|
|
1860
1862
|
setInitialMaxHeight('initial');
|
|
@@ -1895,6 +1897,7 @@
|
|
|
1895
1897
|
return isOpen ? /*#__PURE__*/React__default["default"].createElement(DraggableComponent$1, {
|
|
1896
1898
|
nodeRef: nodeRef,
|
|
1897
1899
|
bounds: bounds,
|
|
1900
|
+
cancel: cancel,
|
|
1898
1901
|
position: position,
|
|
1899
1902
|
onStop: onStopDrag,
|
|
1900
1903
|
handle: "." + headerClassName,
|
|
@@ -4,6 +4,7 @@ interface DraggableComponentProps {
|
|
|
4
4
|
nodeRef?: React.RefObject<HTMLElement>;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
bounds?: 'parent' | string;
|
|
7
|
+
cancel?: string;
|
|
7
8
|
position?: DraggablePosition;
|
|
8
9
|
onStop?: (event: React.MouseEvent<HTMLElement>, pos: DraggablePosition) => void;
|
|
9
10
|
onMouseDown?: (event: MouseEvent) => void;
|
|
@@ -19,8 +19,9 @@ interface DraggableComponentProps extends Omit<ResizableComponentProps, 'bounds'
|
|
|
19
19
|
initialMaxHeight?: string | number;
|
|
20
20
|
onChangeSize?: (size: Size) => void;
|
|
21
21
|
onDragEnd?: (position: DraggablePosition, size: Size) => void;
|
|
22
|
-
onMouseDown?: () => void;
|
|
22
|
+
onMouseDown?: (event: MouseEvent) => void;
|
|
23
23
|
bounds?: 'parent' | string;
|
|
24
|
+
cancel?: string;
|
|
24
25
|
order?: number;
|
|
25
26
|
source?: 'app' | 'module';
|
|
26
27
|
leftHeaderComponent?: React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.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,12 +14,12 @@
|
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^18.2.0",
|
|
16
16
|
"@mui/material": "^5.10.8",
|
|
17
|
-
"@opengeoweb/theme": "4.13.
|
|
17
|
+
"@opengeoweb/theme": "4.13.1",
|
|
18
18
|
"react-draggable": "^4.4.5",
|
|
19
19
|
"re-resizable": "^6.9.0",
|
|
20
20
|
"@redux-eggs/core": "^2.2.0",
|
|
21
21
|
"react-redux": "^8.0.4",
|
|
22
|
-
"@opengeoweb/form-fields": "4.13.
|
|
22
|
+
"@opengeoweb/form-fields": "4.13.1",
|
|
23
23
|
"react-hook-form": "^7.41.5",
|
|
24
24
|
"moment": "^2.29.0",
|
|
25
25
|
"moment-timezone": "^0.5.31",
|