@opengeoweb/shared 19.5.1 → 19.6.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/dist/index.esm.js CHANGED
@@ -2857,20 +2857,13 @@ var getNewPositionSize = function getNewPositionSize(element, boundsNode, isRigh
2857
2857
  if (isElementWider) {
2858
2858
  newX = isRightAligned ? initialX : -initialX;
2859
2859
  }
2860
- // if fixTopPosition=false: recalculate the new
2861
- // y-position of the element
2862
- // fixTopPosition prevents docked dialog from jumping
2863
- // when resizing parent
2864
- if (!fixTopPosition) {
2865
- // vertical constrains
2866
- if (isElementLarger) {
2867
- newY = -initialY;
2868
- }
2869
- // top aligned
2870
- var newTop = newY + initialY + newHeight;
2871
- if (newTop > parentBbox.height) {
2872
- newY = parentBbox.height - newTop + position.y;
2873
- }
2860
+ var shouldAlignToTop = !fixTopPosition && isElementLarger;
2861
+ if (shouldAlignToTop) {
2862
+ newY = -initialY;
2863
+ }
2864
+ var bottomOverflow = newY + initialY + newHeight - parentBbox.height;
2865
+ if (bottomOverflow > 0) {
2866
+ newY = position.y - bottomOverflow;
2874
2867
  }
2875
2868
  // right aligned
2876
2869
  if (isRightAligned) {
@@ -3026,7 +3019,7 @@ var calculateNewPosition = function calculateNewPosition(position, isRightAligne
3026
3019
  var DraggableComponent = function DraggableComponent(_ref) {
3027
3020
  var title = _ref.title,
3028
3021
  _ref$bounds = _ref.bounds,
3029
- bounds = _ref$bounds === void 0 ? 'body' : _ref$bounds,
3022
+ bounds = _ref$bounds === void 0 ? 'parent' : _ref$bounds,
3030
3023
  _ref$cancel = _ref.cancel,
3031
3024
  cancel = _ref$cancel === void 0 ? '.MuiButtonBase-root' : _ref$cancel,
3032
3025
  _ref$headerSize = _ref.headerSize,
@@ -4010,7 +4003,7 @@ var CustomToggleButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4010
4003
  });
4011
4004
 
4012
4005
  var _excluded$4 = ["tooltip", "list", "currentIndex", "onChangeMouseWheel", "isEnabled", "hasBackgroundColor", "variant", "additionalStyling", "skipLocalStyling"],
4013
- _excluded2 = ["className", "additionalStyling"];
4006
+ _excluded2 = ["className", "additionalStyling", "MenuProps"];
4014
4007
  var TooltipSelect = function TooltipSelect(_ref) {
4015
4008
  var _ref$tooltip = _ref.tooltip,
4016
4009
  tooltip = _ref$tooltip === void 0 ? '' : _ref$tooltip,
@@ -4112,15 +4105,17 @@ var BaseSelect = styled(Select, {
4112
4105
  });
4113
4106
  // Style the menu pop-over
4114
4107
  var StyledSelect = styled(/*#__PURE__*/React.forwardRef(function (_ref3, ref) {
4108
+ var _MenuProps$slotProps;
4115
4109
  var className = _ref3.className,
4116
4110
  additionalStyling = _ref3.additionalStyling,
4111
+ MenuProps = _ref3.MenuProps,
4117
4112
  props = _objectWithoutPropertiesLoose(_ref3, _excluded2);
4118
4113
  return jsx(BaseSelect, Object.assign({}, props, {
4119
- MenuProps: {
4120
- classes: {
4114
+ MenuProps: Object.assign({}, MenuProps, {
4115
+ classes: Object.assign({}, MenuProps == null ? void 0 : MenuProps.classes, {
4121
4116
  paper: className
4122
- },
4123
- slotProps: {
4117
+ }),
4118
+ slotProps: Object.assign({}, (_MenuProps$slotProps = MenuProps == null ? void 0 : MenuProps.slotProps) != null ? _MenuProps$slotProps : {}, {
4124
4119
  root: {
4125
4120
  slotProps: {
4126
4121
  backdrop: {
@@ -4130,8 +4125,8 @@ var StyledSelect = styled(/*#__PURE__*/React.forwardRef(function (_ref3, ref) {
4130
4125
  }
4131
4126
  }
4132
4127
  }
4133
- }
4134
- },
4128
+ })
4129
+ }),
4135
4130
  ref: ref,
4136
4131
  sx: additionalStyling
4137
4132
  }));
@@ -4508,7 +4503,8 @@ var SearchField$1 = function SearchField(_ref) {
4508
4503
  setUrlIsValid(isURL(localSearchString));
4509
4504
  }, [localSearchString]);
4510
4505
  var handleKeyDown = function handleKeyDown(event) {
4511
- if (event.key === 'Enter') {
4506
+ event.stopPropagation();
4507
+ if (event.key === 'Enter' && event.target instanceof HTMLInputElement) {
4512
4508
  event.preventDefault();
4513
4509
  if (urlIsValid && onOpenServicePopup) {
4514
4510
  onOpenServicePopup(localSearchString);
@@ -23,6 +23,7 @@ interface DraggableComponentProps extends Omit<ResizableComponentProps, 'bounds'
23
23
  onChangeSize?: (size: Size) => void;
24
24
  onDragEnd?: (position: DraggablePosition, size: Size) => void;
25
25
  onMouseDown?: (event: MouseEvent) => void;
26
+ /** Defaults to the containing element. Pass 'body' to opt out. */
26
27
  bounds?: 'parent' | string;
27
28
  cancel?: string;
28
29
  order?: number;
@@ -46,6 +46,7 @@ export interface ConfigType {
46
46
  GW_HIDE_SIGMET_MENU?: boolean;
47
47
  GW_HIDE_AIRMET_MENU?: boolean;
48
48
  GW_FEATURE_WARNINGS_EVENT?: boolean;
49
+ GW_FEATURE_SILENT_LOGIN?: boolean;
49
50
  GW_LANGUAGE?: string;
50
51
  GW_EXTERNAL_APPLICATIONS_MENU_LINKS?: string;
51
52
  GW_PLUGIN_BACKEND_URL?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/shared",
3
- "version": "19.5.1",
3
+ "version": "19.6.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": {