@opengeoweb/time-slider 19.6.1-nightly-20260917 → 20.0.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
CHANGED
|
@@ -2698,6 +2698,51 @@ var exactAnimationLengthFrom = function exactAnimationLengthFrom(_ref3, now) {
|
|
|
2698
2698
|
} : defaultExactSelections(now)
|
|
2699
2699
|
};
|
|
2700
2700
|
};
|
|
2701
|
+
var getOffsetFromTime = function getOffsetFromTime(time, anchorTime) {
|
|
2702
|
+
var relativeTime = dateUtils.utc(time);
|
|
2703
|
+
var value = dateUtils.differenceInMinutes(relativeTime, anchorTime);
|
|
2704
|
+
return {
|
|
2705
|
+
unit: 'minutes',
|
|
2706
|
+
value: value
|
|
2707
|
+
};
|
|
2708
|
+
};
|
|
2709
|
+
var getAnimationLengthFromRange = function getAnimationLengthFromRange(mode, _ref4, now) {
|
|
2710
|
+
var animationStartTime = _ref4.animationStartTime,
|
|
2711
|
+
animationEndTime = _ref4.animationEndTime;
|
|
2712
|
+
if (now === void 0) {
|
|
2713
|
+
now = dateUtils.utc();
|
|
2714
|
+
}
|
|
2715
|
+
switch (mode) {
|
|
2716
|
+
case AnimationLengthMode.Now:
|
|
2717
|
+
{
|
|
2718
|
+
return {
|
|
2719
|
+
mode: mode,
|
|
2720
|
+
now: {
|
|
2721
|
+
startOffset: getOffsetFromTime(animationStartTime, now),
|
|
2722
|
+
endOffset: getOffsetFromTime(animationEndTime, now)
|
|
2723
|
+
}
|
|
2724
|
+
};
|
|
2725
|
+
}
|
|
2726
|
+
case AnimationLengthMode.RecurringPeriod:
|
|
2727
|
+
{
|
|
2728
|
+
var today = dateUtils.startOfDayUTC(now);
|
|
2729
|
+
return {
|
|
2730
|
+
mode: mode,
|
|
2731
|
+
recurringPeriod: {
|
|
2732
|
+
anchorTime: '00:00',
|
|
2733
|
+
startOffset: getOffsetFromTime(animationStartTime, today),
|
|
2734
|
+
endOffset: getOffsetFromTime(animationEndTime, today)
|
|
2735
|
+
}
|
|
2736
|
+
};
|
|
2737
|
+
}
|
|
2738
|
+
case AnimationLengthMode.Exact:
|
|
2739
|
+
default:
|
|
2740
|
+
return exactAnimationLengthFrom({
|
|
2741
|
+
animationStartTime: animationStartTime,
|
|
2742
|
+
animationEndTime: animationEndTime
|
|
2743
|
+
});
|
|
2744
|
+
}
|
|
2745
|
+
};
|
|
2701
2746
|
|
|
2702
2747
|
var styles$2 = {
|
|
2703
2748
|
openPickerButton: {
|
|
@@ -4651,4 +4696,4 @@ var DemoWrapper = function DemoWrapper(_ref2) {
|
|
|
4651
4696
|
});
|
|
4652
4697
|
};
|
|
4653
4698
|
|
|
4654
|
-
export { ANCHOR_MINUTE_STEP, AUTO_MOVE_AREA_PADDING, AnchorTimeField, AnimationLength, AnimationLengthButton, AnimationLengthMenu, AnimationLengthMode, AnimationLengthPanel, AutoUpdateButton, _BackwardForwardStepButton as BackwardForwardStepButton, ControlButtons, DRAG_AREA_WIDTH, DemoWrapper, HideSliderButton, MAX_ANIMATION_STEPS, NowButton, OptionsMenu, OptionsMenuButton, PlayButton, Scale, SpeedButton, TIME_SLIDER_LEGEND_HEIGHT, TIME_SLIDER_NAMESPACE, TimeInMinutes, TimeSlider, TimeSliderButtons, TimeSliderCurrentTimeBox, TimeSliderLegend, TimeSliderMenu, TimeSpanButton, _TimeStepButton as TimeStepButton, activeOffsets, anchorTimeToPickerDate, asDisplayTime, calculateMouseTimeAndCheckBounds, convertStringTimeToUnix, defaultAnimationDelayAtStart, defaultDelay, defaultEndOffset, defaultExactSelections, defaultOffsetSelections, defaultRecurringPeriodSelections, defaultSecondsPerPx, defaultStartOffset, defaultTimeSpan, defaultTimeStep, exactAnimationLengthFrom, getAutoMoveAreaWidth, getFilteredTime, getFundamentalScale, getLargestTimeUnit, getNewCenterOfFixedPointZoom, getPixelsBetweenViewportAndTimesliderOnLeft, getPositions, getScaleFromSpan, getSpeedDelay, getTimeBoxWidth, getTimeSliderLegendElement, getTimeSliderLegendId, handleSetNowEvent, isAnchoredMode, isDraggingEndWithinBounds, isDraggingStartWithinBounds, isInsideAnimationArea, isLeftAnimationIconArea, isRecurringPeriodMode, isRightAnimationIconArea, isSelectedTimeIconArea, isValidAnchorTime, isValidAnimationLength, isWithinAnimationStepLimit, marks$1 as marks, minutesToDescribedDuration, modeTranslationKey, moveRelativeToTimePoint, moveSelectedTimePx, onsetNewDateDebounced, pickerDateToAnchorTime, pixelToTimestamp, resolveAnchorInstant, resolveAnimationRange, roundWithTimeStep, scaleToSecondsPerPx, scalingCoefficient, secondsPerPxFromCanvasWidth, secondsPerPxToScale, secondsPerPxValues, setNextTimeStep, setPreviousTimeStep, settingRange, shortUnitTranslationKey, spanToScale, speedFactors, timeBoxGeom, timeSliderLegendDefaultProps, timeSliderUtils, timeUnits, timeValues, timesliderTranslations, timestampToPixel, timestampToPixelEdges, toAnchorTime, toExactAnimationTime, unitTranslationKey, useCanvasTarget, withModeSelections };
|
|
4699
|
+
export { ANCHOR_MINUTE_STEP, AUTO_MOVE_AREA_PADDING, AnchorTimeField, AnimationLength, AnimationLengthButton, AnimationLengthMenu, AnimationLengthMode, AnimationLengthPanel, AutoUpdateButton, _BackwardForwardStepButton as BackwardForwardStepButton, ControlButtons, DRAG_AREA_WIDTH, DemoWrapper, HideSliderButton, MAX_ANIMATION_STEPS, NowButton, OptionsMenu, OptionsMenuButton, PlayButton, Scale, SpeedButton, TIME_SLIDER_LEGEND_HEIGHT, TIME_SLIDER_NAMESPACE, TimeInMinutes, TimeSlider, TimeSliderButtons, TimeSliderCurrentTimeBox, TimeSliderLegend, TimeSliderMenu, TimeSpanButton, _TimeStepButton as TimeStepButton, activeOffsets, anchorTimeToPickerDate, asDisplayTime, calculateMouseTimeAndCheckBounds, convertStringTimeToUnix, defaultAnimationDelayAtStart, defaultDelay, defaultEndOffset, defaultExactSelections, defaultOffsetSelections, defaultRecurringPeriodSelections, defaultSecondsPerPx, defaultStartOffset, defaultTimeSpan, defaultTimeStep, exactAnimationLengthFrom, getAnimationLengthFromRange, getAutoMoveAreaWidth, getFilteredTime, getFundamentalScale, getLargestTimeUnit, getNewCenterOfFixedPointZoom, getPixelsBetweenViewportAndTimesliderOnLeft, getPositions, getScaleFromSpan, getSpeedDelay, getTimeBoxWidth, getTimeSliderLegendElement, getTimeSliderLegendId, handleSetNowEvent, isAnchoredMode, isDraggingEndWithinBounds, isDraggingStartWithinBounds, isInsideAnimationArea, isLeftAnimationIconArea, isRecurringPeriodMode, isRightAnimationIconArea, isSelectedTimeIconArea, isValidAnchorTime, isValidAnimationLength, isWithinAnimationStepLimit, marks$1 as marks, minutesToDescribedDuration, modeTranslationKey, moveRelativeToTimePoint, moveSelectedTimePx, onsetNewDateDebounced, pickerDateToAnchorTime, pixelToTimestamp, resolveAnchorInstant, resolveAnimationRange, roundWithTimeStep, scaleToSecondsPerPx, scalingCoefficient, secondsPerPxFromCanvasWidth, secondsPerPxToScale, secondsPerPxValues, setNextTimeStep, setPreviousTimeStep, settingRange, shortUnitTranslationKey, spanToScale, speedFactors, timeBoxGeom, timeSliderLegendDefaultProps, timeSliderUtils, timeUnits, timeValues, timesliderTranslations, timestampToPixel, timestampToPixelEdges, toAnchorTime, toExactAnimationTime, unitTranslationKey, useCanvasTarget, withModeSelections };
|
package/dist/src/lib/components/TimeSliderButtons/AnimationLengthPanel/animationLengthUtils.d.ts
CHANGED
|
@@ -111,3 +111,4 @@ export declare const toExactAnimationTime: (date: Date) => string;
|
|
|
111
111
|
export declare const defaultExactSelections: (now?: Date) => ExactSelections;
|
|
112
112
|
/** Starts Exact from whatever range is already on screen, falling back to the defaults. */
|
|
113
113
|
export declare const exactAnimationLengthFrom: ({ animationStartTime, animationEndTime }: Partial<AnimationRange>, now?: Date) => AnimationLengthSetting;
|
|
114
|
+
export declare const getAnimationLengthFromRange: (mode: AnimationLengthMode, { animationStartTime, animationEndTime }: AnimationRange, now?: Date) => AnimationLengthSetting;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/time-slider",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"description": "GeoWeb time-slider library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@opengeoweb/shared": "
|
|
23
|
+
"@opengeoweb/shared": "20.0.0",
|
|
24
24
|
"lodash": "^4.18.1",
|
|
25
|
-
"@opengeoweb/theme": "
|
|
25
|
+
"@opengeoweb/theme": "20.0.0",
|
|
26
26
|
"@mui/x-date-pickers": "^9.3.0",
|
|
27
27
|
"@mui/system": "^9.0.1",
|
|
28
28
|
"i18next": "^25.0.1",
|