@opengeoweb/shared 9.34.0 → 9.35.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/index.esm.js
CHANGED
|
@@ -1198,6 +1198,45 @@ var useDebounce = function useDebounce(value, timeout) {
|
|
|
1198
1198
|
return state;
|
|
1199
1199
|
};
|
|
1200
1200
|
|
|
1201
|
+
/* *
|
|
1202
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1203
|
+
* you may not use this file except in compliance with the License.
|
|
1204
|
+
* You may obtain a copy of the License at
|
|
1205
|
+
*
|
|
1206
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1207
|
+
*
|
|
1208
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1209
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1210
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1211
|
+
* See the License for the specific language governing permissions and
|
|
1212
|
+
* limitations under the License.
|
|
1213
|
+
*
|
|
1214
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1215
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
1216
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1217
|
+
* */
|
|
1218
|
+
var useWheelStopPropagation = function useWheelStopPropagation() {
|
|
1219
|
+
var ref = React__default.useRef(null);
|
|
1220
|
+
React__default.useEffect(function () {
|
|
1221
|
+
var element = ref.current;
|
|
1222
|
+
if (!element) {
|
|
1223
|
+
return;
|
|
1224
|
+
}
|
|
1225
|
+
var handleWheel = function handleWheel(event) {
|
|
1226
|
+
event.stopPropagation();
|
|
1227
|
+
};
|
|
1228
|
+
element.addEventListener('wheel', handleWheel, {
|
|
1229
|
+
passive: false
|
|
1230
|
+
});
|
|
1231
|
+
// eslint-disable-next-line consistent-return
|
|
1232
|
+
return function () {
|
|
1233
|
+
element.removeEventListener('wheel', handleWheel);
|
|
1234
|
+
};
|
|
1235
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1236
|
+
}, [ref.current]);
|
|
1237
|
+
return ref;
|
|
1238
|
+
};
|
|
1239
|
+
|
|
1201
1240
|
var ConfirmationServiceContext = /*#__PURE__*/React.createContext(Promise.reject);
|
|
1202
1241
|
var useConfirmationDialog = function useConfirmationDialog() {
|
|
1203
1242
|
return React.useContext(ConfirmationServiceContext);
|
|
@@ -5890,4 +5929,4 @@ var RenderCounter = /*#__PURE__*/function () {
|
|
|
5890
5929
|
}();
|
|
5891
5930
|
var renderCounter = new RenderCounter();
|
|
5892
5931
|
|
|
5893
|
-
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, CanvasComponent, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEBOUNCE_TIMEOUT, DEFAULT_ERROR_MESSAGE, DEFAULT_FILTER_HEIGHT, DraggableComponent$1 as Draggable, ErrorBoundary, Filter, FilterChip, FilterLabel, FilterListItem, FilterOption, LastUpdateTime, PROJECTION, ResizeComponent as Resizable, SHARED_NAMESPACE, SearchField$1 as SearchField, SearchFieldButton, SearchHighlight, StatusTag, SwitchButton, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, UserMenuItemSentryRecording, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, createToolkitMockStoreWithEggs, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, isAxiosAuthError, isAxiosError, pollingIntervalTimeout, renderCounter, sharedTranslations, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, withEggs };
|
|
5932
|
+
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, CanvasComponent, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEBOUNCE_TIMEOUT, DEFAULT_ERROR_MESSAGE, DEFAULT_FILTER_HEIGHT, DraggableComponent$1 as Draggable, ErrorBoundary, Filter, FilterChip, FilterLabel, FilterListItem, FilterOption, LastUpdateTime, PROJECTION, ResizeComponent as Resizable, SHARED_NAMESPACE, SearchField$1 as SearchField, SearchFieldButton, SearchHighlight, StatusTag, SwitchButton, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, UserMenuItemSentryRecording, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, createToolkitMockStoreWithEggs, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, isAxiosAuthError, isAxiosError, pollingIntervalTimeout, renderCounter, sharedTranslations, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, useWheelStopPropagation, withEggs };
|
package/package.json
CHANGED
package/src/lib/hooks/index.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export * from './usePrevious/usePrevious';
|
|
|
4
4
|
export * from './useIsMounted/useIsMounted';
|
|
5
5
|
export * from './useMakeSureContainerStaysInsideWindow/useMakeSureContainerStaysInsideWindow';
|
|
6
6
|
export * from './useDebounce/useDebounce';
|
|
7
|
+
export * from './useWheelStopPropagation/useWheelStopPropagation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|