@opengeoweb/time-slider 19.4.0 → 19.5.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/dist/index.esm.js +7 -3
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { Grid, useTheme, Box, Typography, Menu, MenuItem, CardHeader, FormControl, TextField, Select, Popper, Paper, Stack, InputAdornment, ClickAwayListener } from '@mui/material';
|
|
3
3
|
import React, { useState, useRef, useEffect, useCallback, useContext, useMemo, createElement } from 'react';
|
|
4
|
-
import { dateUtils, safelyInitI18nForTestsAndStories, CustomIconButton, CustomTooltip, CanvasComponent, renderCounter, CustomToggleButton } from '@opengeoweb/shared';
|
|
4
|
+
import { dateUtils, isTargetInteractiveInput, isDialogFocused, safelyInitI18nForTestsAndStories, CustomIconButton, CustomTooltip, CanvasComponent, renderCounter, CustomToggleButton } from '@opengeoweb/shared';
|
|
5
5
|
import { debounce, throttle } from 'lodash';
|
|
6
6
|
import { ChevronDown, ChevronUp, dragHandlePath, Edit, Animation, AutoUpdateActive, AutoUpdateInActive, StepForward, StepBackward, Now, Pause, Play, Speed, Clock, FastForward, Options, CalendarToday, ThemeWrapper, lightTheme, darkTheme } from '@opengeoweb/theme';
|
|
7
7
|
import i18n from 'i18next';
|
|
@@ -702,7 +702,7 @@ var useToggleTimesliderVisibility = function useToggleTimesliderVisibility(mapIs
|
|
|
702
702
|
React.useEffect(function () {
|
|
703
703
|
var handleKeyDown = function handleKeyDown(event) {
|
|
704
704
|
var target = event.target;
|
|
705
|
-
if (target
|
|
705
|
+
if (!isTargetInteractiveInput(target) && !isDialogFocused() && (event.key === 't' || event.key === 'T') && mapIsActive) {
|
|
706
706
|
onToggleTimeSlider(!isVisible);
|
|
707
707
|
}
|
|
708
708
|
};
|
|
@@ -715,6 +715,10 @@ var useToggleTimesliderVisibility = function useToggleTimesliderVisibility(mapIs
|
|
|
715
715
|
var useMoveTimeWithKeyboard = function useMoveTimeWithKeyboard(mapIsActive, timeStep, dataStartTime, dataEndTime, onSetNewDate, onSetCenterTime, selectedTime) {
|
|
716
716
|
React.useEffect(function () {
|
|
717
717
|
var handleKeyDown = function handleKeyDown(event) {
|
|
718
|
+
var target = event.target;
|
|
719
|
+
if (isTargetInteractiveInput(target) || isDialogFocused()) {
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
718
722
|
if (event.key === 'Home' && mapIsActive) {
|
|
719
723
|
handleSetNowEvent(timeStep, dataStartTime, dataEndTime, dateUtils.unix(dateUtils.utc()), onSetNewDate, onSetCenterTime);
|
|
720
724
|
}
|
|
@@ -2726,7 +2730,7 @@ var useTimeStepShortcutListener = function useTimeStepShortcutListener(enabled,
|
|
|
2726
2730
|
}
|
|
2727
2731
|
var handleKeyDown = function handleKeyDown(event) {
|
|
2728
2732
|
var target = event.target;
|
|
2729
|
-
if ((target
|
|
2733
|
+
if (isTargetInteractiveInput(target) || isDialogFocused()) {
|
|
2730
2734
|
return;
|
|
2731
2735
|
}
|
|
2732
2736
|
var direction = getTimeStepShortcutDirection(event);
|