@synerise/ds-date-range-picker 1.3.8 → 1.3.10
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/CHANGELOG.md +975 -2642
- package/README.md +85 -86
- package/dist/AddonCollapse/AddonCollapse.d.ts +1 -1
- package/dist/AddonCollapse/AddonCollapse.types.d.ts +1 -1
- package/dist/DateRangePicker.d.ts +2 -2
- package/dist/DateRangePicker.js +8 -6
- package/dist/DateRangePicker.styles.d.ts +1 -1
- package/dist/DateRangePicker.types.d.ts +10 -11
- package/dist/DateRangePicker.types.js +1 -5
- package/dist/Footer/Footer.d.ts +1 -1
- package/dist/Footer/Footer.js +6 -6
- package/dist/RangeFilter/Filters/DailyFilter/DailyFilter.d.ts +7 -7
- package/dist/RangeFilter/Filters/DailyFilter/DailyFilter.js +2 -2
- package/dist/RangeFilter/Filters/MonthlyFilter/MonthlyFilter.d.ts +1 -1
- package/dist/RangeFilter/Filters/MonthlyFilter/MonthlyFilter.js +8 -10
- package/dist/RangeFilter/Filters/MonthlyFilter/MonthlyFilter.styles.d.ts +1 -1
- package/dist/RangeFilter/Filters/MonthlyFilter/MonthlyFilter.types.d.ts +6 -6
- package/dist/RangeFilter/Filters/WeeklyFilter/WeeklyFilter.d.ts +1 -1
- package/dist/RangeFilter/Filters/WeeklyFilter/WeeklyFilter.js +1 -1
- package/dist/RangeFilter/Filters/WeeklyFilter/WeeklyFilter.types.d.ts +5 -5
- package/dist/RangeFilter/Filters/new/Daily/Daily.d.ts +1 -1
- package/dist/RangeFilter/Filters/new/Daily/Daily.js +6 -8
- package/dist/RangeFilter/Filters/new/Daily/Daily.types.d.ts +6 -6
- package/dist/RangeFilter/Filters/new/Filters.types.d.ts +2 -2
- package/dist/RangeFilter/Filters/new/Monthly/Monthly.d.ts +1 -1
- package/dist/RangeFilter/Filters/new/Monthly/Monthly.js +9 -9
- package/dist/RangeFilter/Filters/new/Monthly/Monthly.types.d.ts +7 -7
- package/dist/RangeFilter/Filters/new/Monthly/utils.d.ts +2 -2
- package/dist/RangeFilter/Filters/new/Weekly/Weekly.d.ts +1 -1
- package/dist/RangeFilter/Filters/new/Weekly/Weekly.js +9 -9
- package/dist/RangeFilter/Filters/new/Weekly/Weekly.types.d.ts +6 -6
- package/dist/RangeFilter/Filters/new/Weekly/utils.d.ts +2 -2
- package/dist/RangeFilter/Filters/new/constants.js +0 -1
- package/dist/RangeFilter/Filters/new/hooks/useShiftAndControlKeys.js +1 -1
- package/dist/RangeFilter/RangeFilter.d.ts +1 -1
- package/dist/RangeFilter/RangeFilter.js +5 -5
- package/dist/RangeFilter/RangeFilter.types.d.ts +6 -6
- package/dist/RangeFilter/Shared/AddButton/AddButton.d.ts +1 -1
- package/dist/RangeFilter/Shared/AddButton/AddButton.types.d.ts +2 -2
- package/dist/RangeFilter/Shared/FilterDropdown/FilterDropdown.d.ts +1 -1
- package/dist/RangeFilter/Shared/FilterDropdown/FilterDropdown.js +3 -3
- package/dist/RangeFilter/Shared/FilterDropdown/FilterDropdown.types.d.ts +2 -2
- package/dist/RangeFilter/Shared/RangeFilterStatus/RangeFilterStatus.d.ts +2 -2
- package/dist/RangeFilter/Shared/RangeFilterStatus/RangeFilterStatus.js +2 -2
- package/dist/RangeFilter/Shared/RangeFilterStatus/RangeFilterStatus.styles.d.ts +5 -3
- package/dist/RangeFilter/Shared/RangeFilterStatus/RangeFilterStatus.types.d.ts +3 -3
- package/dist/RangeFilter/Shared/SaveFilterForm/SaveFilterForm.d.ts +1 -1
- package/dist/RangeFilter/Shared/SaveFilterForm/SaveFilterForm.js +1 -1
- package/dist/RangeFilter/Shared/SaveFilterForm/SaveFilterForm.styles.d.ts +1 -1
- package/dist/RangeFilter/Shared/SaveFilterForm/SaveFilterForm.types.d.ts +1 -1
- package/dist/RangeFilter/Shared/SelectionCount/SelectionCount.d.ts +1 -1
- package/dist/RangeFilter/Shared/SelectionCount/SelectionCount.types.d.ts +1 -1
- package/dist/RangeFilter/Shared/SelectionHint/SelectionHint.d.ts +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/Day/Day.d.ts +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/Day/Day.js +2 -2
- package/dist/RangeFilter/Shared/TimeWindow/Day/Day.types.d.ts +4 -4
- package/dist/RangeFilter/Shared/TimeWindow/Grid/Grid.d.ts +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/Grid/Grid.js +16 -12
- package/dist/RangeFilter/Shared/TimeWindow/Grid/Grid.types.d.ts +3 -3
- package/dist/RangeFilter/Shared/TimeWindow/Header/Header.js +5 -9
- package/dist/RangeFilter/Shared/TimeWindow/RangeActions/RangeActions.d.ts +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/RangeActions/RangeActions.js +3 -3
- package/dist/RangeFilter/Shared/TimeWindow/RangeActions/RangeActions.styles.js +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/RangeActions/RangeActions.types.d.ts +2 -2
- package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.d.ts +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.js +16 -12
- package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types.d.ts +4 -4
- package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.utils.js +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeFormContainer.js +7 -5
- package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeFormContainer.types.d.ts +10 -6
- package/dist/RangeFilter/Shared/TimeWindow/RangeSummary/RangeSummary.d.ts +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/RangeSummary/RangeSummary.js +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/RangeSummary/RangeSummary.types.d.ts +4 -4
- package/dist/RangeFilter/Shared/TimeWindow/TimeWindow.d.ts +2 -2
- package/dist/RangeFilter/Shared/TimeWindow/TimeWindow.js +27 -15
- package/dist/RangeFilter/Shared/TimeWindow/TimeWindow.styles.js +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/TimeWindow.types.d.ts +8 -8
- package/dist/RangeFilter/Shared/TimeWindow/utils.d.ts +2 -2
- package/dist/RangeFilter/Shared/TimeWindow/utils.js +1 -1
- package/dist/RangeFilter/constants.d.ts +1 -1
- package/dist/RangeFilter/constants.js +2 -2
- package/dist/RangeFilter/utils.d.ts +3 -3
- package/dist/RangeFilter/utils.js +44 -37
- package/dist/RangePicker/RangePicker.d.ts +1 -1
- package/dist/RangePicker/RangePicker.js +16 -14
- package/dist/RangePicker/RangePicker.styles.d.ts +1 -1
- package/dist/RangePicker/RangePicker.types.d.ts +3 -3
- package/dist/RangePicker/utils.d.ts +3 -3
- package/dist/RangePicker/utils.js +7 -7
- package/dist/RangePickerInput/RangePickerInput.d.ts +1 -1
- package/dist/RangePickerInput/RangePickerInput.js +4 -4
- package/dist/RangePickerInput/RangePickerInput.types.d.ts +2 -2
- package/dist/RawDateRangePicker.js +10 -10
- package/dist/RelativeRangePicker/Elements/CustomRangeForm/CustomRangeForm.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/CustomRangeForm/CustomRangeForm.js +4 -4
- package/dist/RelativeRangePicker/Elements/CustomRangeForm/CustomRangeForm.types.d.ts +2 -2
- package/dist/RelativeRangePicker/Elements/CustomRangeForm/DurationField/DurationField.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/CustomRangeForm/DurationField/DurationField.js +5 -5
- package/dist/RelativeRangePicker/Elements/CustomRangeForm/DurationField/DurationField.types.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/CustomRangeForm/OffsetField/OffsetField.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/CustomRangeForm/OffsetField/OffsetField.js +3 -3
- package/dist/RelativeRangePicker/Elements/CustomRangeForm/OffsetField/OffsetField.types.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/ModeDropdown/ModeDropdown.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/ModeDropdown/ModeDropdown.js +2 -2
- package/dist/RelativeRangePicker/Elements/ModeDropdown/ModeDropdown.types.d.ts +2 -2
- package/dist/RelativeRangePicker/Elements/RangeButtons/RangeButtons.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/RangeButtons/RangeButtons.js +2 -2
- package/dist/RelativeRangePicker/Elements/RangeButtons/RangeButtons.types.d.ts +2 -2
- package/dist/RelativeRangePicker/Elements/RangeDropdown/RangeDropdown.d.ts +2 -2
- package/dist/RelativeRangePicker/Elements/RangeDropdown/RangeDropdown.js +8 -6
- package/dist/RelativeRangePicker/Elements/RangeDropdown/RangeDropdown.types.d.ts +2 -2
- package/dist/RelativeRangePicker/Elements/TimestampRange/TimestampDuration/TimestampDuration.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/TimestampRange/TimestampDuration/TimestampDuration.js +4 -4
- package/dist/RelativeRangePicker/Elements/TimestampRange/TimestampDuration/TimestampDuration.types.d.ts +2 -2
- package/dist/RelativeRangePicker/Elements/TimestampRange/TimestampRange.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/TimestampRange/TimestampRange.js +5 -4
- package/dist/RelativeRangePicker/Elements/TimestampRange/TimestampRange.types.d.ts +2 -2
- package/dist/RelativeRangePicker/RelativeRangePicker.d.ts +1 -1
- package/dist/RelativeRangePicker/RelativeRangePicker.js +14 -10
- package/dist/RelativeRangePicker/RelativeRangePicker.styles.d.ts +1 -1
- package/dist/RelativeRangePicker/RelativeRangePicker.styles.js +8 -15
- package/dist/RelativeRangePicker/RelativeRangePicker.types.d.ts +3 -3
- package/dist/RelativeRangePicker/utils/findMatchingPreset.utils.d.ts +1 -1
- package/dist/RelativeRangePicker/utils/findMatchingPreset.utils.js +0 -1
- package/dist/RelativeRangePicker/utils/findRangeByKey.utils.d.ts +1 -1
- package/dist/RelativeRangePicker/utils/getCurrentGroupFromProps.utils.d.ts +3 -3
- package/dist/RelativeRangePicker/utils/getDefaultCustomRange.utils.d.ts +1 -1
- package/dist/RelativeRangePicker/utils/getDefaultCustomRange.utils.js +1 -1
- package/dist/RelativeRangePicker/utils/isAbsolute.utils.d.ts +1 -1
- package/dist/RelativeRangePicker/utils/setDurationValue.utils.d.ts +1 -1
- package/dist/RelativeRangePicker/utils/setDurationValue.utils.js +1 -1
- package/dist/RelativeRangePicker/utils/setFuture.utils.js +1 -1
- package/dist/RelativeRangePicker/utils/setOffsetValue.utils.d.ts +1 -1
- package/dist/RelativeRangePicker/utils/setOffsetValue.utils.js +1 -1
- package/dist/RelativeRangePicker/utils/updatePresetKey.utils.d.ts +1 -1
- package/dist/RelativeRangePicker/utils/updatePresetKey.utils.js +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/date.types.d.ts +2 -2
- package/dist/dateUtils/add.d.ts +7 -7
- package/dist/dateUtils/add.js +7 -7
- package/dist/dateUtils/difference.d.ts +7 -7
- package/dist/dateUtils/difference.js +7 -7
- package/dist/dateUtils/endOf.d.ts +7 -7
- package/dist/dateUtils/endOf.js +7 -7
- package/dist/dateUtils/format.js +2 -2
- package/dist/dateUtils/get.d.ts +3 -3
- package/dist/dateUtils/get.js +3 -3
- package/dist/dateUtils/getRelativePresetForRange.d.ts +1 -1
- package/dist/dateUtils/getRelativePresetForRange.js +1 -1
- package/dist/dateUtils/relativeToAbsolute.d.ts +1 -1
- package/dist/dateUtils/relativeToAbsolute.js +1 -1
- package/dist/dateUtils/set.d.ts +3 -3
- package/dist/dateUtils/set.js +3 -3
- package/dist/dateUtils/startOf.d.ts +7 -7
- package/dist/dateUtils/startOf.js +7 -7
- package/dist/dateUtils/sub.d.ts +7 -7
- package/dist/dateUtils/sub.js +7 -7
- package/dist/fns.d.ts +20 -20
- package/dist/fns.js +20 -20
- package/dist/index.d.ts +2 -2
- package/dist/utils.d.ts +4 -4
- package/dist/utils.js +6 -4
- package/package.json +22 -22
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type DayKey } from '../../../Shared/TimeWindow/TimeWindow.types';
|
|
2
|
+
import { type DayOfMonthIndex, type MonthlySchedule, type MonthlyScheduleDayValue } from './Monthly.types';
|
|
3
3
|
export declare const range: (start: number, stop: number) => number[];
|
|
4
4
|
export declare const haveActiveDaysCommonRange: (days: Record<DayOfMonthIndex, MonthlyScheduleDayValue>, activeDaysArray: DayKey[]) => boolean;
|
|
5
5
|
export declare const canAddAnotherRange: (schedule: MonthlySchedule, activeDays: DayKey[], maxRanges?: number) => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WeeklyProps } from './Weekly.types';
|
|
2
|
+
import { type WeeklyProps } from './Weekly.types';
|
|
3
3
|
declare const Weekly: ({ maxEntries, valueSelectionMode, onChange, timeFormat, valueFormatOptions, value, texts, timePickerProps, disabled, errorTexts, }: WeeklyProps) => React.JSX.Element;
|
|
4
4
|
export default Weekly;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
-
import React, { useRef, useEffect, useCallback, useState, useMemo } from 'react';
|
|
3
|
-
import { useIntl } from 'react-intl';
|
|
4
2
|
import dayjs from 'dayjs';
|
|
3
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { useIntl } from 'react-intl';
|
|
5
5
|
import { v4 as uuid } from 'uuid';
|
|
6
6
|
import { useDataFormat } from '@synerise/ds-data-format';
|
|
7
|
-
import
|
|
8
|
-
import { SelectionCount, SelectionHint, AddButton } from '../../../Shared';
|
|
9
|
-
import Grid from '../../../Shared/TimeWindow/Grid/Grid';
|
|
10
|
-
import Day from '../../../Shared/TimeWindow/Day/Day';
|
|
7
|
+
import { getDefaultTexts } from '../../../../utils';
|
|
11
8
|
import * as S from '../../../RangeFilter.styles';
|
|
9
|
+
import { AddButton, SelectionCount, SelectionHint } from '../../../Shared';
|
|
10
|
+
import Day from '../../../Shared/TimeWindow/Day/Day';
|
|
11
|
+
import Grid from '../../../Shared/TimeWindow/Grid/Grid';
|
|
12
|
+
import RangeFormContainer from '../../../Shared/TimeWindow/RangeFormContainer/RangeFormContainer';
|
|
13
|
+
import { EU_NOTATION_WEEK_DAYS_INDEXES, US_NOTATION_WEEK_DAYS_INDEXES } from '../../../Shared/TimeWindow/constants/timeWindow.constants';
|
|
14
|
+
import { DEFAULT_MAX_ENTRIES, DEFAULT_RANGE_END, DEFAULT_RANGE_START, DEFAULT_TIME_FORMAT, EMPTY_OBJECT, NOOP, RENDER_EMPTY_NODE_FN } from '../constants';
|
|
12
15
|
import { useShiftAndControlKeys } from '../hooks/useShiftAndControlKeys';
|
|
13
16
|
import { canAddAnotherRange, haveActiveDaysCommonRange, range, removeEmptyEntries } from './utils';
|
|
14
|
-
import { DEFAULT_RANGE_START, DEFAULT_RANGE_END, DEFAULT_TIME_FORMAT, EMPTY_OBJECT, DEFAULT_MAX_ENTRIES, RENDER_EMPTY_NODE_FN, NOOP } from '../constants';
|
|
15
|
-
import { EU_NOTATION_WEEK_DAYS_INDEXES, US_NOTATION_WEEK_DAYS_INDEXES } from '../../../Shared/TimeWindow/constants/timeWindow.constants';
|
|
16
|
-
import { getDefaultTexts } from '../../../../utils';
|
|
17
17
|
var Weekly = function Weekly(_ref) {
|
|
18
18
|
var _ref$maxEntries = _ref.maxEntries,
|
|
19
19
|
maxEntries = _ref$maxEntries === void 0 ? DEFAULT_MAX_ENTRIES : _ref$maxEntries,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { type Texts } from '../../../../DateRangePicker.types';
|
|
2
|
+
import { type WithDisabledProp } from '../../../RangeFilter.types';
|
|
3
|
+
import { type DateLimitMode } from '../../../Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
|
|
4
|
+
import { type FilterErrorType } from '../../../Shared/TimeWindow/RangeFormContainer/RangeFormContainer.types';
|
|
5
|
+
import { type DayOptions } from '../../../Shared/TimeWindow/TimeWindow.types';
|
|
6
|
+
import { type FilterBaseProps } from '../Filters.types';
|
|
7
7
|
export type WeeklyScheduleDayValue = DayOptions & {
|
|
8
8
|
mode: DateLimitMode;
|
|
9
9
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type DayKey } from '../../../Shared/TimeWindow/TimeWindow.types';
|
|
2
|
+
import { type DayOfWeekIndex, type WeeklySchedule, type WeeklyScheduleDayValue } from './Weekly.types';
|
|
3
3
|
export declare const range: (start: number, stop: number) => number[];
|
|
4
4
|
export declare const haveActiveDaysCommonRange: (days: Record<DayOfWeekIndex, WeeklyScheduleDayValue>, activeDaysArray: DayKey[]) => boolean;
|
|
5
5
|
export declare const canAddAnotherRange: (schedule: WeeklySchedule, activeDays: DayKey[], maxRanges?: number) => boolean;
|
|
@@ -3,7 +3,6 @@ export var DEFAULT_TIME_FORMAT = 'HH:mm:ss.SSS';
|
|
|
3
3
|
export var DEFAULT_RANGE_START = '00:00:00.000';
|
|
4
4
|
export var DEFAULT_RANGE_END = '23:59:59.999';
|
|
5
5
|
export var EMPTY_OBJECT = {};
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
7
6
|
export var NOOP = function NOOP() {};
|
|
8
7
|
export var RENDER_EMPTY_NODE_FN = function RENDER_EMPTY_NODE_FN() {
|
|
9
8
|
return null;
|
|
@@ -4,7 +4,7 @@ var KEYS = /*#__PURE__*/function (KEYS) {
|
|
|
4
4
|
KEYS["COMMAND"] = "Meta";
|
|
5
5
|
KEYS["CONTROL"] = "Control";
|
|
6
6
|
return KEYS;
|
|
7
|
-
}(KEYS || {});
|
|
7
|
+
}(KEYS || {});
|
|
8
8
|
export var useShiftAndControlKeys = function useShiftAndControlKeys(ref) {
|
|
9
9
|
var _React$useState = React.useState(false),
|
|
10
10
|
controlPressed = _React$useState[0],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RangeFilterProps } from './RangeFilter.types';
|
|
2
|
+
import { type RangeFilterProps } from './RangeFilter.types';
|
|
3
3
|
declare const _default: React.FC<import("react-intl").WithIntlProps<RangeFilterProps>> & {
|
|
4
4
|
WrappedComponent: React.ComponentType<RangeFilterProps>;
|
|
5
5
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
|
|
3
3
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
4
|
-
import React from 'react';
|
|
5
4
|
import { cloneDeep } from 'lodash';
|
|
6
|
-
import
|
|
5
|
+
import React from 'react';
|
|
7
6
|
import { injectIntl } from 'react-intl';
|
|
8
7
|
import { v4 as uuid } from 'uuid';
|
|
9
8
|
import Button from '@synerise/ds-button';
|
|
9
|
+
import ButtonGroup from '@synerise/ds-button-group';
|
|
10
|
+
import { getDefaultTexts } from '../utils';
|
|
10
11
|
import * as S from './RangeFilter.styles';
|
|
11
|
-
import { TYPES, TYPES_DATA } from './constants';
|
|
12
|
-
import { addSuffixToDuplicate, denormalizeValue, isValidValue, normalizeValue } from './utils';
|
|
13
12
|
import FilterDropdown from './Shared/FilterDropdown/FilterDropdown';
|
|
14
13
|
import SaveFilterForm from './Shared/SaveFilterForm/SaveFilterForm';
|
|
15
|
-
import {
|
|
14
|
+
import { TYPES, TYPES_DATA } from './constants';
|
|
15
|
+
import { addSuffixToDuplicate, denormalizeValue, isValidValue, normalizeValue } from './utils';
|
|
16
16
|
var RangeFilter = /*#__PURE__*/function (_React$PureComponent) {
|
|
17
17
|
function RangeFilter(props) {
|
|
18
18
|
var _props$allowedFilterT, _props$value, _props$value2, _props$value3, _this$state;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IntlShape } from 'react-intl';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { COUNTED_FROM_ENUM, DAYS_OF_PERIOD_ENUM } from './constants';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type IntlShape } from 'react-intl';
|
|
3
|
+
import { type DateRangePickerProps, type Texts } from '../DateRangePicker.types';
|
|
4
|
+
import { type SavedFilter } from './Shared/FilterDropdown/FilterDropdown.types';
|
|
5
|
+
import { type DateLimitMode, type RangeDisplayMode } from './Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
|
|
6
|
+
import { type COUNTED_FROM_ENUM, type DAYS_OF_PERIOD_ENUM } from './constants';
|
|
7
7
|
export type FilterValue<T = FilterDefinition> = {
|
|
8
8
|
definition?: Partial<T>;
|
|
9
9
|
type: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Button from '@synerise/ds-button';
|
|
3
|
-
import
|
|
3
|
+
import { theme } from '@synerise/ds-core';
|
|
4
4
|
import Dropdown from '@synerise/ds-dropdown';
|
|
5
5
|
import Icon, { AngleDownS, TrashS } from '@synerise/ds-icon';
|
|
6
|
-
import
|
|
6
|
+
import Tooltip from '@synerise/ds-tooltip';
|
|
7
7
|
import * as S from './FilterDropdown.styles';
|
|
8
8
|
var FilterDropdown = function FilterDropdown(_ref) {
|
|
9
9
|
var removeTooltip = _ref.removeTooltip,
|
|
@@ -42,7 +42,7 @@ var FilterDropdown = function FilterDropdown(_ref) {
|
|
|
42
42
|
boxShadow: '0 4px 12px 0 rgba(35, 41, 54, 0.07)'
|
|
43
43
|
},
|
|
44
44
|
getPopupContainer: function getPopupContainer(node) {
|
|
45
|
-
return node.parentElement
|
|
45
|
+
return node.parentElement !== null ? node.parentElement : document.body;
|
|
46
46
|
}
|
|
47
47
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
48
48
|
mode: "label-icon",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FilterValue } from '../../RangeFilter.types';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type FilterValue } from '../../RangeFilter.types';
|
|
3
3
|
export type FilterDropdownProps = {
|
|
4
4
|
filters: SavedFilter[];
|
|
5
5
|
onFilterSelect: (filter: SavedFilter) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RangeFilterStatusProps } from './RangeFilterStatus.types';
|
|
3
|
-
declare const RangeFilterStatus: ({ onFilterRemove, disabled, filter, label, onClick, texts }: RangeFilterStatusProps) => React.JSX.Element;
|
|
2
|
+
import { type RangeFilterStatusProps } from './RangeFilterStatus.types';
|
|
3
|
+
declare const RangeFilterStatus: ({ onFilterRemove, disabled, filter, label, onClick, texts, }: RangeFilterStatusProps) => React.JSX.Element;
|
|
4
4
|
export default RangeFilterStatus;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
2
3
|
import Badge from '@synerise/ds-badge';
|
|
4
|
+
import { theme } from '@synerise/ds-core';
|
|
3
5
|
import Icon, { CloseS, FilterM } from '@synerise/ds-icon';
|
|
4
6
|
import Tooltip from '@synerise/ds-tooltip';
|
|
5
|
-
import { useIntl } from 'react-intl';
|
|
6
|
-
import { theme } from '@synerise/ds-core';
|
|
7
7
|
import * as S from './RangeFilterStatus.styles';
|
|
8
8
|
var RangeFilterStatus = function RangeFilterStatus(_ref) {
|
|
9
9
|
var onFilterRemove = _ref.onFilterRemove,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import Button from '@synerise/ds-button';
|
|
3
|
-
export declare const ContentItem: import("styled-components").StyledComponent<(({ onRemove, onUpdate, onDuplicate, draggable, dashed, item, greyBackground, changeOrderDisabled, texts, hideExpander, expanded, onExpand, headerSuffix, headerPrefix, contentWithoutPadding, onMoveTop, onMoveBottom, isFirst, isLast, size, ...rest }: import("@synerise/ds-manageable-list/dist/Item/ContentItem/ContentItem.types").ContentItemProps) => import("react").JSX.Element) & {
|
|
3
|
+
export declare const ContentItem: import("styled-components").StyledComponent<(({ onRemove, onUpdate, onDuplicate, draggable, dashed, item, greyBackground, changeOrderDisabled, texts, hideExpander, expanded, onExpand, headerSuffix, headerPrefix, contentWithoutPadding, onMoveTop, onMoveBottom, isFirst, isLast, size, dragHandleProps, isDragPlaceholder, isDragOverlay, ...rest }: import("@synerise/ds-manageable-list/dist/Item/ContentItem/ContentItem.types").ContentItemProps) => import("react").JSX.Element) & {
|
|
4
4
|
AdditionalSuffix: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
5
|
ContentWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
6
6
|
withoutPadding: boolean;
|
|
@@ -15,14 +15,16 @@ export declare const ContentItem: import("styled-components").StyledComponent<((
|
|
|
15
15
|
ItemContainer: import("styled-components").StyledComponent<"div", any, {
|
|
16
16
|
opened: boolean;
|
|
17
17
|
greyBackground: boolean | undefined;
|
|
18
|
-
size?: "
|
|
18
|
+
size?: "default" | "large" | undefined;
|
|
19
19
|
dashed?: boolean | undefined;
|
|
20
20
|
isDisabled?: boolean | undefined;
|
|
21
|
+
isDragOverlay?: boolean | undefined;
|
|
22
|
+
isDragPlaceholder?: boolean | undefined;
|
|
21
23
|
}, never>;
|
|
22
24
|
ItemHeader: import("styled-components").StyledComponent<"div", any, {
|
|
23
25
|
hasPrefix: boolean;
|
|
24
26
|
hasDescription: boolean;
|
|
25
|
-
size?: "
|
|
27
|
+
size?: "default" | "large" | undefined;
|
|
26
28
|
}, never>;
|
|
27
29
|
ItemHeaderPrefix: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
28
30
|
ItemHeaderSuffix: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type Texts } from '../../../DateRangePicker.types';
|
|
3
|
+
import { type DateFilter } from '../../../date.types';
|
|
4
4
|
export type RangeFilterStatusProps = {
|
|
5
5
|
filter: DateFilter | undefined;
|
|
6
6
|
disabled: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Button from '@synerise/ds-button';
|
|
3
|
-
import { RawInput } from '@synerise/ds-input';
|
|
4
3
|
import Icon, { CheckM, CloseM } from '@synerise/ds-icon';
|
|
4
|
+
import { RawInput } from '@synerise/ds-input';
|
|
5
5
|
import * as S from './SaveFilterForm.styles';
|
|
6
6
|
var SaveFilterForm = function SaveFilterForm(_ref) {
|
|
7
7
|
var texts = _ref.texts,
|
|
@@ -10,7 +10,7 @@ export declare const FormButton: import("styled-components").StyledComponent<typ
|
|
|
10
10
|
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
11
11
|
} & Omit<import("react").ButtonHTMLAttributes<any>, "type" | "onClick">>, "type" | "ghost"> & {
|
|
12
12
|
type?: import("@synerise/ds-utils").LiteralStringUnion<import("@synerise/ds-button/dist/Button.types").ButtonType> | undefined;
|
|
13
|
-
mode?: import("@synerise/ds-utils").LiteralStringUnion<"
|
|
13
|
+
mode?: import("@synerise/ds-utils").LiteralStringUnion<"icon-label" | "single-icon" | "split" | "two-icons" | "label-icon"> | undefined;
|
|
14
14
|
color?: import("@synerise/ds-utils").LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet"> | undefined;
|
|
15
15
|
groupVariant?: import("@synerise/ds-utils").LiteralStringUnion<"left-rounded" | "squared" | "right-rounded"> | undefined;
|
|
16
16
|
justifyContent?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DayProps } from './Day.types';
|
|
2
|
+
import { type DayProps } from './Day.types';
|
|
3
3
|
declare const _default: React.MemoExoticComponent<({ active, label, onToggle, onClear, readOnly, restricted, dayKey, texts, intl, ...rest }: DayProps) => React.JSX.Element>;
|
|
4
4
|
export default _default;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var _excluded = ["active", "label", "onToggle", "onClear", "readOnly", "restricted", "dayKey", "texts", "intl"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
-
import React, { memo, useCallback, useMemo, useState } from 'react';
|
|
5
4
|
import dayjs from 'dayjs';
|
|
6
5
|
import customParseFormatPlugin from 'dayjs/plugin/customParseFormat';
|
|
6
|
+
import React, { memo, useCallback, useMemo, useState } from 'react';
|
|
7
7
|
import Button from '@synerise/ds-button';
|
|
8
|
-
import Icon, { CheckS, Close3S } from '@synerise/ds-icon';
|
|
9
8
|
import { theme } from '@synerise/ds-core';
|
|
9
|
+
import Icon, { CheckS, Close3S } from '@synerise/ds-icon';
|
|
10
10
|
import Tooltip from '@synerise/ds-tooltip';
|
|
11
11
|
import * as S from './Day.styles';
|
|
12
12
|
dayjs.extend(customParseFormatPlugin);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IntlShape, WrappedComponentProps } from 'react-intl';
|
|
3
|
-
import { GridTexts } from '../Grid/Grid.types';
|
|
4
|
-
import { DayKey } from '../TimeWindow.types';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type IntlShape, type WrappedComponentProps } from 'react-intl';
|
|
3
|
+
import { type GridTexts } from '../Grid/Grid.types';
|
|
4
|
+
import { type DayKey } from '../TimeWindow.types';
|
|
5
5
|
export type DayProps = {
|
|
6
6
|
dayKey: DayKey;
|
|
7
7
|
label: React.ReactNode | ((hovered: boolean) => React.ReactNode);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { range, rangeRight } from 'lodash';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { Header } from '../Header/Header';
|
|
4
4
|
import * as S from '../TimeWindow.styles';
|
|
5
|
-
import { reverseRange } from '../utils';
|
|
6
5
|
import { HeaderWrapper } from '../TimeWindow.styles';
|
|
6
|
+
import { reverseRange } from '../utils';
|
|
7
7
|
var Grid = function Grid(_ref) {
|
|
8
8
|
var keys = _ref.keys,
|
|
9
9
|
numberOfDays = _ref.numberOfDays,
|
|
@@ -22,16 +22,20 @@ var Grid = function Grid(_ref) {
|
|
|
22
22
|
var numberOfColumns = numberOfDaysPerRow || numberOfDays;
|
|
23
23
|
var rangeMethod = labelInverted ? rangeRight : range;
|
|
24
24
|
var actions = [];
|
|
25
|
-
if (showSelectAll)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
if (showSelectAll) {
|
|
26
|
+
actions.push({
|
|
27
|
+
key: 'select-all',
|
|
28
|
+
onClick: onSelectAll,
|
|
29
|
+
label: /*#__PURE__*/React.createElement(React.Fragment, null, texts.selectAll)
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (showUnselectAll) {
|
|
33
|
+
actions.push({
|
|
34
|
+
key: 'unselect-all',
|
|
35
|
+
onClick: onUnselectAll,
|
|
36
|
+
label: /*#__PURE__*/React.createElement(React.Fragment, null, texts.unselectAll)
|
|
37
|
+
});
|
|
38
|
+
}
|
|
35
39
|
var grid = React.useMemo(function () {
|
|
36
40
|
return /*#__PURE__*/React.createElement(S.Days, {
|
|
37
41
|
columns: numberOfColumns
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IntlShape } from 'react-intl';
|
|
3
|
-
import { DayKey, Days } from '../TimeWindow.types';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type IntlShape } from 'react-intl';
|
|
4
3
|
import type { Texts } from '../../../../DateRangePicker.types';
|
|
4
|
+
import { type DayKey, type Days } from '../TimeWindow.types';
|
|
5
5
|
export type GridProps = {
|
|
6
6
|
keys: number[];
|
|
7
7
|
days: Days;
|
|
@@ -11,15 +11,11 @@ var HeaderBase = function HeaderBase(_ref) {
|
|
|
11
11
|
}, title), /*#__PURE__*/React.createElement(S.Actions, {
|
|
12
12
|
"data-attr": "actions"
|
|
13
13
|
}, actions && actions.map(function (action) {
|
|
14
|
-
return (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"data-attr": action.key,
|
|
20
|
-
onClick: action.onClick
|
|
21
|
-
}, action.label)
|
|
22
|
-
);
|
|
14
|
+
return /*#__PURE__*/React.createElement(S.Action, {
|
|
15
|
+
key: action.key,
|
|
16
|
+
"data-attr": action.key,
|
|
17
|
+
onClick: action.onClick
|
|
18
|
+
}, action.label);
|
|
23
19
|
})), suffix);
|
|
24
20
|
};
|
|
25
21
|
export var Header = /*#__PURE__*/React.memo(HeaderBase);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Button from '@synerise/ds-button';
|
|
3
|
-
import Icon, { ArrowDownCircleM, CloseM, DuplicateM, OptionHorizontalM } from '@synerise/ds-icon';
|
|
4
|
-
import Dropdown from '@synerise/ds-dropdown';
|
|
5
3
|
import { theme } from '@synerise/ds-core';
|
|
4
|
+
import Dropdown from '@synerise/ds-dropdown';
|
|
5
|
+
import Icon, { ArrowDownCircleM, CloseM, DuplicateM, OptionHorizontalM } from '@synerise/ds-icon';
|
|
6
6
|
import * as S from './RangeActions.styles';
|
|
7
7
|
var RangeActions = function RangeActions(_ref) {
|
|
8
8
|
var texts = _ref.texts,
|
|
@@ -50,7 +50,7 @@ var RangeActions = function RangeActions(_ref) {
|
|
|
50
50
|
points: ['tr', 'br']
|
|
51
51
|
},
|
|
52
52
|
getPopupContainer: function getPopupContainer(node) {
|
|
53
|
-
return node.parentElement
|
|
53
|
+
return node.parentElement !== null ? node.parentElement : document.body;
|
|
54
54
|
}
|
|
55
55
|
}, trigger);
|
|
56
56
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RangeFormProps } from './RangeForm.types';
|
|
3
2
|
import { FORM_MODES, RANGE_FORM_INTL_KEYS } from './RangeForm.constants';
|
|
3
|
+
import { type RangeFormProps } from './RangeForm.types';
|
|
4
4
|
export { FORM_MODES, RANGE_FORM_INTL_KEYS };
|
|
5
5
|
declare const RangeForm: ({ onModeChange, disabled, startDate, endDate, onStartChange, onEndChange, onExactHourSelect, onRangeDelete, valueSelectionModes, mode, rangeDisplayMode, isInvertedRange, timePickerProps, texts, valueFormatOptions, errorTexts, }: RangeFormProps) => React.JSX.Element;
|
|
6
6
|
export default RangeForm;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
-
import React, { useState, useEffect } from 'react';
|
|
3
|
-
import { useIntl } from 'react-intl';
|
|
4
2
|
import dayjs from 'dayjs';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { useIntl } from 'react-intl';
|
|
5
|
+
import { theme } from '@synerise/ds-core';
|
|
7
6
|
import { useDataFormat } from '@synerise/ds-data-format';
|
|
8
|
-
import
|
|
7
|
+
import Icon, { CloseS } from '@synerise/ds-icon';
|
|
8
|
+
import Select from '@synerise/ds-select';
|
|
9
9
|
import Slider from '@synerise/ds-slider';
|
|
10
|
-
import
|
|
11
|
-
import * as S from './RangeForm.styles';
|
|
10
|
+
import TimePicker from '@synerise/ds-time-picker';
|
|
12
11
|
import { getDisabledTimeOptions } from '../../../../../RangePicker/utils';
|
|
13
|
-
import { FORM_MODES, RANGE_DISPLAY_MODES, RANGE_FORM_INTL_KEYS,
|
|
14
|
-
import
|
|
12
|
+
import { FORM_MODES, RANGE_DISPLAY_MODES, RANGE_FORM_INTL_KEYS, SLIDER_MAX, SLIDER_MIN, SLIDER_STEP } from './RangeForm.constants';
|
|
13
|
+
import * as S from './RangeForm.styles';
|
|
14
|
+
import { dateToNumber, numberToDate } from './RangeForm.utils';
|
|
15
15
|
|
|
16
16
|
// @deprecated, moved to ./RangeForm.constants
|
|
17
17
|
export { FORM_MODES, RANGE_FORM_INTL_KEYS };
|
|
@@ -60,7 +60,7 @@ var RangeForm = function RangeForm(_ref) {
|
|
|
60
60
|
}
|
|
61
61
|
}, [rangeDisplayMode, startDate, endDate]);
|
|
62
62
|
var getPopupContainer = function getPopupContainer(node) {
|
|
63
|
-
return node.parentElement
|
|
63
|
+
return node.parentElement !== null ? node.parentElement : document.body;
|
|
64
64
|
};
|
|
65
65
|
var errorForFirstItem = (errorTexts == null ? void 0 : errorTexts.length) && errorTexts[0];
|
|
66
66
|
var errorForSecondItem = (errorTexts == null ? void 0 : errorTexts.length) && errorTexts[1];
|
|
@@ -84,7 +84,9 @@ var RangeForm = function RangeForm(_ref) {
|
|
|
84
84
|
};
|
|
85
85
|
var timeFormatByClockMode = is12HoursClock ? 'hh:mm A' : 'HH:mm';
|
|
86
86
|
var tipFormatter = function tipFormatter(value) {
|
|
87
|
-
if (value === undefined)
|
|
87
|
+
if (value === undefined) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
88
90
|
var valueAsDate = numberToDate(value, SLIDER_MAX);
|
|
89
91
|
return dayjs(valueAsDate).format(timeFormatByClockMode);
|
|
90
92
|
};
|
|
@@ -169,7 +171,9 @@ var RangeForm = function RangeForm(_ref) {
|
|
|
169
171
|
return renderRangePicker();
|
|
170
172
|
};
|
|
171
173
|
var getModeLabel = function getModeLabel(modeName) {
|
|
172
|
-
if (texts[modeName.toLocaleLowerCase()])
|
|
174
|
+
if (texts[modeName.toLocaleLowerCase()]) {
|
|
175
|
+
return texts[modeName.toLocaleLowerCase()];
|
|
176
|
+
}
|
|
173
177
|
return intl.formatMessage(RANGE_FORM_INTL_KEYS[modeName]);
|
|
174
178
|
};
|
|
175
179
|
var limitModeSelect = function limitModeSelect() {
|
package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type WithDisabledProp } from '../../../../RangeFilter.types';
|
|
3
|
+
import { type TimeWindowTexts } from '../../TimeWindow.types';
|
|
4
|
+
import { type RangeFormContainerProps } from '../RangeFormContainer.types';
|
|
5
5
|
export type DateLimitMode = 'Hour' | 'Range';
|
|
6
6
|
export type RangeDisplayMode = 'timepicker' | 'slider';
|
|
7
7
|
export type RangeFormProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
-
import startOf from '../../../../../dateUtils/startOf';
|
|
3
2
|
import endOf from '../../../../../dateUtils/endOf';
|
|
3
|
+
import startOf from '../../../../../dateUtils/startOf';
|
|
4
4
|
export var numberToDate = function numberToDate(number, max, isRangeStart) {
|
|
5
5
|
if (number === max) {
|
|
6
6
|
return dayjs().endOf('day').toDate();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import RangeForm from './RangeForm/RangeForm';
|
|
4
|
-
import { RANGE_DISPLAY_MODES } from './RangeForm/RangeForm.constants';
|
|
5
|
-
import { getDateFromDayValue, getDefaultFilterForLimitMode } from '../utils';
|
|
6
3
|
import { Header } from '../Header/Header';
|
|
7
|
-
import RangeSummary from '../RangeSummary/RangeSummary';
|
|
8
4
|
import RangeActions from '../RangeActions/RangeActions';
|
|
5
|
+
import RangeSummary from '../RangeSummary/RangeSummary';
|
|
9
6
|
import { DEFAULT_LIMIT_MODE } from '../TimeWindow';
|
|
7
|
+
import { getDateFromDayValue, getDefaultFilterForLimitMode } from '../utils';
|
|
8
|
+
import RangeForm from './RangeForm/RangeForm';
|
|
9
|
+
import { RANGE_DISPLAY_MODES } from './RangeForm/RangeForm.constants';
|
|
10
10
|
import * as S from './RangeFormContainer.styles';
|
|
11
11
|
var RangeFormContainer = function RangeFormContainer(_ref) {
|
|
12
12
|
var errorTexts = _ref.errorTexts,
|
|
@@ -136,7 +136,9 @@ var RangeFormContainer = function RangeFormContainer(_ref) {
|
|
|
136
136
|
texts: texts
|
|
137
137
|
}));
|
|
138
138
|
}, [onRangePaste, onRangeClear, onRangeCopy, texts, renderSuffix, rangeDisplayMode, invertedToggleLink, headerOptions]);
|
|
139
|
-
if (hideHeader)
|
|
139
|
+
if (hideHeader) {
|
|
140
|
+
return rangeForm;
|
|
141
|
+
}
|
|
140
142
|
var _headerOptions$includ2 = headerOptions.includeSummary,
|
|
141
143
|
includeSummary = _headerOptions$includ2 === void 0 ? true : _headerOptions$includ2;
|
|
142
144
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, {
|