@opengeoweb/shared 4.13.0 → 4.14.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
@@ -2,8 +2,6 @@ import * as React from 'react';
2
2
  import React__default, { useRef } from 'react';
3
3
  import { Box, Typography, Dialog, DialogTitle, IconButton, DialogContent, DialogActions, Button, CircularProgress, Alert, AlertTitle, Grid, useTheme, Link, Avatar as Avatar$1, Paper, ClickAwayListener, MenuList, MenuItem, RadioGroup, FormControlLabel, Radio, Tooltip, List, ListItem, Tabs, Tab, Backdrop, Slider, ToggleButton, Menu, ListItemIcon, Checkbox, Select, Accordion, AccordionSummary, AccordionDetails } from '@mui/material';
4
4
  import { Close, Exclamation, Success, Info, ChevronRight, GeoWebLogo, Resize, useThemeContext, DragHandle, ArrowLeft, ArrowRight, KeyOption, ArrowUp, ArrowDown, KeyCommand, Options, Delete, VisibilityOff, Visibility, ChevronDown } from '@opengeoweb/theme';
5
- import { useFormContext } from 'react-hook-form';
6
- import { isEmpty, errorMessages } from '@opengeoweb/form-fields';
7
5
  import { throttle } from 'lodash';
8
6
  import Draggable from 'react-draggable';
9
7
  import { Resizable } from 're-resizable';
@@ -576,70 +574,6 @@ var useIsMounted = function useIsMounted() {
576
574
  };
577
575
  };
578
576
 
579
- /* *
580
- * Licensed under the Apache License, Version 2.0 (the "License");
581
- * you may not use this file except in compliance with the License.
582
- * You may obtain a copy of the License at
583
- *
584
- * http://www.apache.org/licenses/LICENSE-2.0
585
- *
586
- * Unless required by applicable law or agreed to in writing, software
587
- * distributed under the License is distributed on an "AS IS" BASIS,
588
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
589
- * See the License for the specific language governing permissions and
590
- * limitations under the License.
591
- *
592
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
593
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
594
- * */
595
-
596
- var HIDDEN_INPUT_HELPER_IS_DRAFT = 'IS_DRAFT';
597
- var useDraftFormHelpers = function useDraftFormHelpers() {
598
- var isDefaultDraft = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
599
-
600
- var _useFormContext = useFormContext(),
601
- getValues = _useFormContext.getValues,
602
- setValue = _useFormContext.setValue,
603
- register = _useFormContext.register;
604
-
605
- React.useEffect(function () {
606
- setValue(HIDDEN_INPUT_HELPER_IS_DRAFT, isDefaultDraft, {
607
- shouldDirty: false
608
- }); // eslint-disable-next-line react-hooks/exhaustive-deps
609
- }, []);
610
-
611
- var isDraft = function isDraft() {
612
- return getValues(HIDDEN_INPUT_HELPER_IS_DRAFT) === true;
613
- };
614
-
615
- var isRequired = function isRequired(value) {
616
- if (!isDraft() && isEmpty(value)) {
617
- return errorMessages.required;
618
- }
619
-
620
- return true;
621
- };
622
-
623
- var toggleIsDraft = function toggleIsDraft(isDraft) {
624
- return setValue(HIDDEN_INPUT_HELPER_IS_DRAFT, isDraft, {
625
- shouldDirty: false
626
- });
627
- };
628
-
629
- var DraftFieldHelper = function DraftFieldHelper() {
630
- return /*#__PURE__*/React.createElement("input", Object.assign({}, register(HIDDEN_INPUT_HELPER_IS_DRAFT), {
631
- type: "hidden"
632
- }));
633
- };
634
-
635
- return {
636
- isRequired: isRequired,
637
- toggleIsDraft: toggleIsDraft,
638
- isDraft: isDraft,
639
- DraftFieldHelper: DraftFieldHelper
640
- };
641
- };
642
-
643
577
  /* *
644
578
  * Licensed under the Apache License, Version 2.0 (the "License");
645
579
  * you may not use this file except in compliance with the License.
@@ -1933,6 +1867,8 @@ var DraggableComponent = function DraggableComponent(_a) {
1933
1867
  var title = _a.title,
1934
1868
  _a$bounds = _a.bounds,
1935
1869
  bounds = _a$bounds === void 0 ? 'body' : _a$bounds,
1870
+ _a$cancel = _a.cancel,
1871
+ cancel = _a$cancel === void 0 ? '.MuiButtonBase-root' : _a$cancel,
1936
1872
  _a$headerSize = _a.headerSize,
1937
1873
  headerSize = _a$headerSize === void 0 ? 'small' : _a$headerSize,
1938
1874
  _a$startSize = _a.startSize,
@@ -1972,7 +1908,7 @@ var DraggableComponent = function DraggableComponent(_a) {
1972
1908
  className = _a.className,
1973
1909
  _a$sx = _a.sx,
1974
1910
  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"]);
1911
+ props = __rest(_a, ["title", "bounds", "cancel", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "className", "sx"]);
1976
1912
 
1977
1913
  var zIndex = (source === 'app' ? BASE_Z_INDEX : 1000) + order;
1978
1914
  var elevation = BASE_ELEVATION + order;
@@ -2041,6 +1977,7 @@ var DraggableComponent = function DraggableComponent(_a) {
2041
1977
  return isOpen ? /*#__PURE__*/React__default.createElement(DraggableComponent$1, {
2042
1978
  nodeRef: nodeRef,
2043
1979
  bounds: bounds,
1980
+ cancel: cancel,
2044
1981
  position: position,
2045
1982
  onStop: onStopDrag,
2046
1983
  handle: ".".concat(headerClassName),
@@ -3354,26 +3291,6 @@ var getWarningMessage = function getWarningMessage(error) {
3354
3291
  return '';
3355
3292
  };
3356
3293
 
3357
- /* *
3358
- * Licensed under the Apache License, Version 2.0 (the "License");
3359
- * you may not use this file except in compliance with the License.
3360
- * You may obtain a copy of the License at
3361
- *
3362
- * http://www.apache.org/licenses/LICENSE-2.0
3363
- *
3364
- * Unless required by applicable law or agreed to in writing, software
3365
- * distributed under the License is distributed on an "AS IS" BASIS,
3366
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3367
- * See the License for the specific language governing permissions and
3368
- * limitations under the License.
3369
- *
3370
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3371
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
3372
- * */
3373
- // TODO: https://gitlab.com/opengeoweb/geoweb-assets/-/issues/2350
3374
- // temporary check until we get the unit test passing with container queries
3375
- var IS_JEST = typeof jest !== 'undefined';
3376
-
3377
3294
  /* *
3378
3295
  * Licensed under the Apache License, Version 2.0 (the "License");
3379
3296
  * you may not use this file except in compliance with the License.
@@ -3615,4 +3532,4 @@ var index = /*#__PURE__*/Object.freeze({
3615
3532
  createDate: createDate
3616
3533
  });
3617
3534
 
3618
- export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomSlider, CustomToggleButton, CustomTooltip, DEFAULT_ERROR_MESSAGE, DraggableComponent$1 as Draggable, EnableButton, ErrorBoundary, HIDDEN_INPUT_HELPER_IS_DRAFT, IS_JEST, ManagerButton, ManagerDeleteButton, ResizeComponent as Resizable, StatusTag, ToggleMenu, ToolButton, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getPosition, getWarningMessage, isAxiosError, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDialogActions, useDraftFormHelpers, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, withEggs };
3535
+ export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomSlider, CustomToggleButton, CustomTooltip, DEFAULT_ERROR_MESSAGE, DraggableComponent$1 as Draggable, EnableButton, ErrorBoundary, ManagerButton, ManagerDeleteButton, ResizeComponent as Resizable, StatusTag, ToggleMenu, ToolButton, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getPosition, getWarningMessage, isAxiosError, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, withEggs };
package/index.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@mui/material'), require('@opengeoweb/theme'), require('react-hook-form'), require('@opengeoweb/form-fields'), require('lodash'), require('react-draggable'), require('re-resizable'), require('react-redux'), require('date-fns')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react', '@mui/material', '@opengeoweb/theme', 'react-hook-form', '@opengeoweb/form-fields', 'lodash', 'react-draggable', 're-resizable', 'react-redux', 'date-fns'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Shared = {}, global.React, global.material, global.theme, global.reactHookForm, global.formFields, global.lodash, global.Draggable, global.reResizable, global.reactRedux, global.dateFns));
5
- })(this, (function (exports, React, material, theme, reactHookForm, formFields, lodash, Draggable, reResizable, reactRedux, dateFns) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@mui/material'), require('@opengeoweb/theme'), require('lodash'), require('react-draggable'), require('re-resizable'), require('react-redux'), require('date-fns')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react', '@mui/material', '@opengeoweb/theme', 'lodash', 'react-draggable', 're-resizable', 'react-redux', 'date-fns'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Shared = {}, global.React, global.material, global.theme, global.lodash, global.Draggable, global.reResizable, global.reactRedux, global.dateFns));
5
+ })(this, (function (exports, React, material, theme, lodash, Draggable, reResizable, reactRedux, dateFns) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -459,55 +459,6 @@
459
459
  };
460
460
  };
461
461
 
462
- var HIDDEN_INPUT_HELPER_IS_DRAFT = 'IS_DRAFT';
463
- var useDraftFormHelpers = function useDraftFormHelpers(isDefaultDraft) {
464
- if (isDefaultDraft === void 0) {
465
- isDefaultDraft = false;
466
- }
467
-
468
- var _a = reactHookForm.useFormContext(),
469
- getValues = _a.getValues,
470
- setValue = _a.setValue,
471
- register = _a.register;
472
-
473
- React__namespace.useEffect(function () {
474
- setValue(HIDDEN_INPUT_HELPER_IS_DRAFT, isDefaultDraft, {
475
- shouldDirty: false
476
- }); // eslint-disable-next-line react-hooks/exhaustive-deps
477
- }, []);
478
-
479
- var isDraft = function isDraft() {
480
- return getValues(HIDDEN_INPUT_HELPER_IS_DRAFT) === true;
481
- };
482
-
483
- var isRequired = function isRequired(value) {
484
- if (!isDraft() && formFields.isEmpty(value)) {
485
- return formFields.errorMessages.required;
486
- }
487
-
488
- return true;
489
- };
490
-
491
- var toggleIsDraft = function toggleIsDraft(isDraft) {
492
- return setValue(HIDDEN_INPUT_HELPER_IS_DRAFT, isDraft, {
493
- shouldDirty: false
494
- });
495
- };
496
-
497
- var DraftFieldHelper = function DraftFieldHelper() {
498
- return /*#__PURE__*/React__namespace.createElement("input", __assign({}, register(HIDDEN_INPUT_HELPER_IS_DRAFT), {
499
- type: "hidden"
500
- }));
501
- };
502
-
503
- return {
504
- isRequired: isRequired,
505
- toggleIsDraft: toggleIsDraft,
506
- isDraft: isDraft,
507
- DraftFieldHelper: DraftFieldHelper
508
- };
509
- };
510
-
511
462
  var adjustPosition = function adjustPosition(bbox, containingView, position, setPosition) {
512
463
  var isHorizontallyLarger = bbox.width > containingView.width;
513
464
  var isVerticallyLarger = bbox.height > containingView.height; // Check corner cases first
@@ -1790,61 +1741,63 @@
1790
1741
  var title = _a.title,
1791
1742
  _b = _a.bounds,
1792
1743
  bounds = _b === void 0 ? 'body' : _b,
1793
- _c = _a.headerSize,
1794
- headerSize = _c === void 0 ? 'small' : _c,
1795
- _d = _a.startSize,
1796
- startSize = _d === void 0 ? {
1744
+ _c = _a.cancel,
1745
+ cancel = _c === void 0 ? '.MuiButtonBase-root' : _c,
1746
+ _d = _a.headerSize,
1747
+ headerSize = _d === void 0 ? 'small' : _d,
1748
+ _e = _a.startSize,
1749
+ startSize = _e === void 0 ? {
1797
1750
  width: 'auto',
1798
1751
  height: 'auto'
1799
- } : _d,
1800
- _e = _a.startPosition,
1801
- startPosition = _e === void 0 ? {
1752
+ } : _e,
1753
+ _f = _a.startPosition,
1754
+ startPosition = _f === void 0 ? {
1802
1755
  left: undefined,
1803
1756
  right: undefined,
1804
1757
  top: undefined
1805
- } : _e,
1758
+ } : _f,
1806
1759
  children = _a.children,
1807
- _f = _a.isOpen,
1808
- isOpen = _f === void 0 ? true : _f,
1809
- _g = _a.onClose,
1810
- onClose = _g === void 0 ? function () {} : _g,
1811
- _h = _a.initialMaxHeight,
1812
- defaultInitialMaxHeight = _h === void 0 ? 'initial' : _h,
1813
- _j = _a.onChangeSize,
1814
- onChangeSize = _j === void 0 ? function () {} : _j,
1815
- _k = _a.onMouseDown,
1816
- onMouseDown = _k === void 0 ? function () {} : _k,
1817
- _l = _a.onResizeStop,
1818
- onResizeStop = _l === void 0 ? function () {} : _l,
1819
- _m = _a.onDragEnd,
1820
- onDragEnd = _m === void 0 ? function () {} : _m,
1821
- _o = _a.order,
1822
- order = _o === void 0 ? 1 : _o,
1823
- _p = _a.source,
1824
- source = _p === void 0 ? 'app' : _p,
1825
- _q = _a.leftHeaderComponent,
1826
- leftHeaderComponent = _q === void 0 ? null : _q,
1827
- _r = _a.rightHeaderComponent,
1828
- rightHeaderComponent = _r === void 0 ? null : _r,
1760
+ _g = _a.isOpen,
1761
+ isOpen = _g === void 0 ? true : _g,
1762
+ _h = _a.onClose,
1763
+ onClose = _h === void 0 ? function () {} : _h,
1764
+ _j = _a.initialMaxHeight,
1765
+ defaultInitialMaxHeight = _j === void 0 ? 'initial' : _j,
1766
+ _k = _a.onChangeSize,
1767
+ onChangeSize = _k === void 0 ? function () {} : _k,
1768
+ _l = _a.onMouseDown,
1769
+ onMouseDown = _l === void 0 ? function () {} : _l,
1770
+ _m = _a.onResizeStop,
1771
+ onResizeStop = _m === void 0 ? function () {} : _m,
1772
+ _o = _a.onDragEnd,
1773
+ onDragEnd = _o === void 0 ? function () {} : _o,
1774
+ _p = _a.order,
1775
+ order = _p === void 0 ? 1 : _p,
1776
+ _q = _a.source,
1777
+ source = _q === void 0 ? 'app' : _q,
1778
+ _r = _a.leftHeaderComponent,
1779
+ leftHeaderComponent = _r === void 0 ? null : _r,
1780
+ _s = _a.rightHeaderComponent,
1781
+ rightHeaderComponent = _s === void 0 ? null : _s,
1829
1782
  className = _a.className,
1830
- _s = _a.sx,
1831
- sx = _s === void 0 ? {} : _s,
1832
- props = __rest(_a, ["title", "bounds", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "className", "sx"]);
1783
+ _t = _a.sx,
1784
+ sx = _t === void 0 ? {} : _t,
1785
+ props = __rest(_a, ["title", "bounds", "cancel", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "className", "sx"]);
1833
1786
 
1834
1787
  var zIndex = (source === 'app' ? BASE_Z_INDEX : 1000) + order;
1835
1788
  var elevation = BASE_ELEVATION + order;
1836
1789
  var nodeRef = React__default["default"].useRef(null);
1837
1790
 
1838
- var _t = __read(React__default["default"].useState({
1791
+ var _u = __read(React__default["default"].useState({
1839
1792
  x: 0,
1840
1793
  y: 0
1841
1794
  }), 2),
1842
- position = _t[0],
1843
- setPosition = _t[1];
1795
+ position = _u[0],
1796
+ setPosition = _u[1];
1844
1797
 
1845
- var _u = __read(React__default["default"].useState(startSize), 2),
1846
- size = _u[0],
1847
- setSize = _u[1];
1798
+ var _v = __read(React__default["default"].useState(startSize), 2),
1799
+ size = _v[0],
1800
+ setSize = _v[1];
1848
1801
 
1849
1802
  var isRightAligned = startPosition && startPosition.right !== null && startPosition.right !== undefined;
1850
1803
  var onStopDrag = React__default["default"].useCallback(function (_event, position) {
@@ -1852,9 +1805,9 @@
1852
1805
  onDragEnd(position, size);
1853
1806
  }, [setPosition, onDragEnd, size]);
1854
1807
 
1855
- var _v = __read(React__default["default"].useState(defaultInitialMaxHeight), 2),
1856
- initialMaxHeight = _v[0],
1857
- setInitialMaxHeight = _v[1];
1808
+ var _w = __read(React__default["default"].useState(defaultInitialMaxHeight), 2),
1809
+ initialMaxHeight = _w[0],
1810
+ setInitialMaxHeight = _w[1];
1858
1811
 
1859
1812
  var onStartResize = function onStartResize() {
1860
1813
  setInitialMaxHeight('initial');
@@ -1895,6 +1848,7 @@
1895
1848
  return isOpen ? /*#__PURE__*/React__default["default"].createElement(DraggableComponent$1, {
1896
1849
  nodeRef: nodeRef,
1897
1850
  bounds: bounds,
1851
+ cancel: cancel,
1898
1852
  position: position,
1899
1853
  onStop: onStopDrag,
1900
1854
  handle: "." + headerClassName,
@@ -3223,26 +3177,6 @@
3223
3177
  return '';
3224
3178
  };
3225
3179
 
3226
- /* *
3227
- * Licensed under the Apache License, Version 2.0 (the "License");
3228
- * you may not use this file except in compliance with the License.
3229
- * You may obtain a copy of the License at
3230
- *
3231
- * http://www.apache.org/licenses/LICENSE-2.0
3232
- *
3233
- * Unless required by applicable law or agreed to in writing, software
3234
- * distributed under the License is distributed on an "AS IS" BASIS,
3235
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3236
- * See the License for the specific language governing permissions and
3237
- * limitations under the License.
3238
- *
3239
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3240
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
3241
- * */
3242
- // TODO: https://gitlab.com/opengeoweb/geoweb-assets/-/issues/2350
3243
- // temporary check until we get the unit test passing with container queries
3244
- var IS_JEST = typeof jest !== 'undefined';
3245
-
3246
3180
  /* *
3247
3181
  * Licensed under the Apache License, Version 2.0 (the "License");
3248
3182
  * you may not use this file except in compliance with the License.
@@ -3524,8 +3458,6 @@
3524
3458
  exports.Draggable = DraggableComponent$1;
3525
3459
  exports.EnableButton = EnableButton;
3526
3460
  exports.ErrorBoundary = ErrorBoundary;
3527
- exports.HIDDEN_INPUT_HELPER_IS_DRAFT = HIDDEN_INPUT_HELPER_IS_DRAFT;
3528
- exports.IS_JEST = IS_JEST;
3529
3461
  exports.ManagerButton = ManagerButton;
3530
3462
  exports.ManagerDeleteButton = ManagerDeleteButton;
3531
3463
  exports.Resizable = ResizeComponent;
@@ -3557,7 +3489,6 @@
3557
3489
  exports.useConfirmationDialog = useConfirmationDialog;
3558
3490
  exports.useControlledTooltip = useControlledTooltip;
3559
3491
  exports.useDialogActions = useDialogActions;
3560
- exports.useDraftFormHelpers = useDraftFormHelpers;
3561
3492
  exports.useIsMounted = useIsMounted;
3562
3493
  exports.useMakeSureContainerStaysInsideWindow = useMakeSureContainerStaysInsideWindow;
3563
3494
  exports.usePoller = usePoller;
@@ -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;
@@ -2,5 +2,4 @@ export * from './usePreventBrowserClose/usePreventBrowserClose';
2
2
  export * from './usePoller/usePoller';
3
3
  export * from './usePrevious/usePrevious';
4
4
  export * from './useIsMounted/useIsMounted';
5
- export * from './useDraftFormHelpers/useDraftFormHelpers';
6
5
  export * from './useMakeSureContainerStaysInsideWindow/useMakeSureContainerStaysInsideWindow';
@@ -1,3 +1,2 @@
1
1
  export * from './axiosErrorUtils';
2
- export * from './containerQueryHelper';
3
2
  export * as dateUtils from './dateUtils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/shared",
3
- "version": "4.13.0",
3
+ "version": "4.14.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,16 +14,11 @@
14
14
  "peerDependencies": {
15
15
  "react": "^18.2.0",
16
16
  "@mui/material": "^5.10.8",
17
- "@opengeoweb/theme": "4.13.0",
17
+ "@opengeoweb/theme": "4.14.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.0",
23
- "react-hook-form": "^7.41.5",
24
- "moment": "^2.29.0",
25
- "moment-timezone": "^0.5.31",
26
- "@mui/x-date-pickers": "^5.0.4",
27
22
  "lodash": "^4.17.20",
28
23
  "axios": "^0.25.0",
29
24
  "date-fns": "^2.29.3"
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- export declare const HIDDEN_INPUT_HELPER_IS_DRAFT = "IS_DRAFT";
3
- export declare const useDraftFormHelpers: (isDefaultDraft?: boolean) => {
4
- isRequired: (value: string) => boolean | string;
5
- toggleIsDraft: (isDraft: boolean) => void;
6
- isDraft: () => boolean;
7
- DraftFieldHelper: () => React.ReactElement;
8
- };
@@ -1 +0,0 @@
1
- export declare const IS_JEST: boolean;