@synerise/ds-date-range-picker 0.24.7 → 0.24.9

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.
Files changed (70) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/AddonCollapse/AddonCollapse.types.d.ts +1 -1
  3. package/dist/DateRangePicker.types.d.ts +9 -9
  4. package/dist/Footer/Footer.d.ts +2 -2
  5. package/dist/Footer/Footer.types.d.ts +1 -1
  6. package/dist/RangeFilter/Filters/DailyFilter/DailyFilter.d.ts +2 -2
  7. package/dist/RangeFilter/Filters/DailyFilter/DailyFilter.js +1 -2
  8. package/dist/RangeFilter/Filters/MonthlyFilter/MonthlyFilter.d.ts +2 -2
  9. package/dist/RangeFilter/Filters/MonthlyFilter/MonthlyFilter.js +4 -9
  10. package/dist/RangeFilter/Filters/MonthlyFilter/MonthlyFilter.types.d.ts +3 -3
  11. package/dist/RangeFilter/Filters/WeeklyFilter/WeeklyFilter.d.ts +0 -1
  12. package/dist/RangeFilter/Filters/WeeklyFilter/WeeklyFilter.js +1 -2
  13. package/dist/RangeFilter/Filters/WeeklyFilter/WeeklyFilter.types.d.ts +3 -3
  14. package/dist/RangeFilter/Filters/new/Daily/Daily.types.d.ts +2 -2
  15. package/dist/RangeFilter/Filters/new/Filters.types.d.ts +1 -1
  16. package/dist/RangeFilter/Filters/new/Monthly/Monthly.types.d.ts +4 -4
  17. package/dist/RangeFilter/Filters/new/Weekly/Weekly.types.d.ts +4 -4
  18. package/dist/RangeFilter/RangeFilter.d.ts +2 -2
  19. package/dist/RangeFilter/RangeFilter.js +1 -2
  20. package/dist/RangeFilter/RangeFilter.types.d.ts +13 -13
  21. package/dist/RangeFilter/Shared/AddButton/AddButton.types.d.ts +1 -1
  22. package/dist/RangeFilter/Shared/FilterDropdown/FilterDropdown.types.d.ts +2 -2
  23. package/dist/RangeFilter/Shared/RangeFilterStatus/RangeFilterStatus.types.d.ts +1 -1
  24. package/dist/RangeFilter/Shared/SaveFilterForm/SaveFilterForm.styles.d.ts +24 -2
  25. package/dist/RangeFilter/Shared/SaveFilterForm/SaveFilterForm.types.d.ts +1 -1
  26. package/dist/RangeFilter/Shared/SelectionCount/SelectionCount.types.d.ts +1 -1
  27. package/dist/RangeFilter/Shared/SelectionHint/SelectionHint.d.ts +4 -2
  28. package/dist/RangeFilter/Shared/TimeWindow/Day/Day.js +2 -4
  29. package/dist/RangeFilter/Shared/TimeWindow/Day/Day.types.d.ts +1 -1
  30. package/dist/RangeFilter/Shared/TimeWindow/Grid/Grid.types.d.ts +2 -2
  31. package/dist/RangeFilter/Shared/TimeWindow/Header/Header.d.ts +2 -2
  32. package/dist/RangeFilter/Shared/TimeWindow/RangeActions/RangeActions.types.d.ts +2 -2
  33. package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.d.ts +0 -1
  34. package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types.d.ts +4 -4
  35. package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.utils.d.ts +1 -1
  36. package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeFormContainer.d.ts +0 -1
  37. package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeFormContainer.types.d.ts +2 -2
  38. package/dist/RangeFilter/Shared/TimeWindow/RangeSummary/RangeSummary.types.d.ts +1 -1
  39. package/dist/RangeFilter/Shared/TimeWindow/TimeWindow.types.d.ts +8 -8
  40. package/dist/RangeFilter/Shared/TimeWindow/utils.d.ts +1 -1
  41. package/dist/RangeFilter/Shared/TimeWindow/utils.js +0 -1
  42. package/dist/RangeFilter/constants.d.ts +4 -4
  43. package/dist/RangeFilter/utils.d.ts +1 -1
  44. package/dist/RangeFilter/utils.js +3 -7
  45. package/dist/RangePicker/RangePicker.js +2 -4
  46. package/dist/RangePicker/RangePicker.styles.d.ts +24 -2
  47. package/dist/RangePicker/RangePicker.types.d.ts +2 -2
  48. package/dist/RangePicker/utils.d.ts +2 -2
  49. package/dist/RangePickerInput/RangePickerInput.js +1 -1
  50. package/dist/RangePickerInput/RangePickerInput.types.d.ts +2 -2
  51. package/dist/RawDateRangePicker.d.ts +5 -5
  52. package/dist/RawDateRangePicker.js +1 -2
  53. package/dist/RelativeRangePicker/Elements/CustomRangeForm/CustomRangeForm.d.ts +1 -1
  54. package/dist/RelativeRangePicker/Elements/CustomRangeForm/CustomRangeForm.types.d.ts +2 -2
  55. package/dist/RelativeRangePicker/Elements/CustomRangeForm/DurationField/DurationField.d.ts +1 -1
  56. package/dist/RelativeRangePicker/Elements/CustomRangeForm/DurationField/DurationField.types.d.ts +1 -1
  57. package/dist/RelativeRangePicker/Elements/CustomRangeForm/OffsetField/OffsetField.types.d.ts +1 -1
  58. package/dist/RelativeRangePicker/Elements/ModeDropdown/ModeDropdown.types.d.ts +1 -1
  59. package/dist/RelativeRangePicker/Elements/RangeButtons/RangeButtons.types.d.ts +1 -1
  60. package/dist/RelativeRangePicker/Elements/RangeDropdown/RangeDropdown.d.ts +2 -2
  61. package/dist/RelativeRangePicker/Elements/RangeDropdown/RangeDropdown.types.d.ts +2 -2
  62. package/dist/RelativeRangePicker/Elements/TimestampRange/TimestampDuration/TimestampDuration.types.d.ts +1 -1
  63. package/dist/RelativeRangePicker/Elements/TimestampRange/TimestampRange.types.d.ts +2 -2
  64. package/dist/RelativeRangePicker/RelativeRangePicker.d.ts +2 -2
  65. package/dist/RelativeRangePicker/RelativeRangePicker.types.d.ts +3 -3
  66. package/dist/RelativeRangePicker/utils.d.ts +1 -2
  67. package/dist/date.types.d.ts +5 -5
  68. package/dist/dateUtils/relativeToAbsolute.d.ts +1 -1
  69. package/dist/utils.d.ts +1 -1
  70. package/package.json +22 -22
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { DayKey } from '../TimeWindow.types';
3
- export declare type RangeSummaryProps = {
3
+ export type RangeSummaryProps = {
4
4
  dayKeys: DayKey[];
5
5
  getDayLabel: (dayKey: DayKey, long?: boolean) => string | React.ReactNode | undefined;
6
6
  monthlyFilter?: boolean;
@@ -6,32 +6,32 @@ import { DayProps } from './Day/Day.types';
6
6
  import { FilterDefinition, WithDisabledProp } from '../../RangeFilter.types';
7
7
  import { GridTexts } from './Grid/Grid.types';
8
8
  import { DateLimitMode, RangeDisplayMode } from './RangeFormContainer/RangeForm/RangeForm.types';
9
- export declare type DayKey = number | string;
10
- export declare type DayOptions = {
9
+ export type DayKey = number | string;
10
+ export type DayOptions = {
11
11
  display?: boolean;
12
12
  inverted?: boolean;
13
13
  restricted: boolean;
14
14
  start: string;
15
15
  stop: string;
16
16
  };
17
- export declare type Days = {
17
+ export type Days = {
18
18
  [key in DayKey]: DayOptions;
19
19
  };
20
- export declare type CustomDayConfig = {
20
+ export type CustomDayConfig = {
21
21
  component?: React.ComponentType<DayProps>;
22
22
  template?: object;
23
23
  tooltip?: string;
24
24
  label?: string;
25
25
  longLabel?: string;
26
26
  };
27
- export declare type TimeWindowTexts = {
27
+ export type TimeWindowTexts = {
28
28
  clearRange: React.ReactNode | string;
29
29
  copyRange: React.ReactNode | string;
30
30
  pasteRange: React.ReactNode | string;
31
31
  range: React.ReactNode | string;
32
32
  hour: React.ReactNode | string;
33
33
  };
34
- export declare type TimeWindowProps = {
34
+ export type TimeWindowProps = {
35
35
  days: Days;
36
36
  monthlyFilter?: boolean;
37
37
  monthlyFilterPeriod?: string;
@@ -66,13 +66,13 @@ export declare type TimeWindowProps = {
66
66
  renderRangeFormSuffix?: () => React.ReactNode;
67
67
  timePickerProps?: Partial<TimePickerProps>;
68
68
  } & Partial<RangeActions> & WithDataFormatProps & WithDisabledProp & WrappedComponentProps;
69
- export declare type State = {
69
+ export type State = {
70
70
  activeDays: DayKey[];
71
71
  controlKeyPressed: boolean;
72
72
  shiftKeyPressed?: boolean;
73
73
  isRangeDefined?: boolean;
74
74
  };
75
- export declare type RangeActions = {
75
+ export type RangeActions = {
76
76
  onRangeCopy: (range?: Partial<FilterDefinition>) => void;
77
77
  onRangePaste: (range?: Partial<FilterDefinition>) => void;
78
78
  onRangeClear: () => void;
@@ -1,5 +1,5 @@
1
1
  import { DateLimitMode } from './RangeFormContainer/RangeForm/RangeForm.types';
2
2
  import { FilterDefinition } from '../../RangeFilter.types';
3
- export declare const getDateFromDayValue: (dayValue?: string | undefined, hourTimeFormat?: string | undefined) => Date;
3
+ export declare const getDateFromDayValue: (dayValue?: string, hourTimeFormat?: string) => Date;
4
4
  export declare const reverseRange: (inputRange: number[], groupItem: number) => number[];
5
5
  export declare const getDefaultFilterForLimitMode: (mode: DateLimitMode) => Partial<FilterDefinition>;
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
2
1
  // @ts-ignore
3
2
  import dayjs from 'dayjs';
4
3
  import { flatten, groupBy, reverse, values } from 'lodash';
@@ -24,8 +24,8 @@ export declare const TYPES_DATA: {
24
24
  MONTHLY: {
25
25
  labelTranslationKey: string;
26
26
  defaultLabel: string;
27
- component: import("react").ForwardRefExoticComponent<Pick<import("./Filters/MonthlyFilter/MonthlyFilter.types").MonthlyFilterProps, "onChange" | "onRangeCopy" | "onRangePaste" | "onRangeClear" | "rangeClipboard" | "valueSelectionModes" | "rangeDisplayMode" | "texts" | "renderRangeFormSuffix" | "timePickerProps" | "disabled" | "value" | "maxEntries" | "daysOfPeriods" | "countedFromPeriods"> & {
28
- forwardedRef?: ((instance: any) => void) | import("react").RefObject<any> | null | undefined;
27
+ component: import("react").ForwardRefExoticComponent<import("react-intl").Omit<import("./Filters/MonthlyFilter/MonthlyFilter.types").MonthlyFilterProps, "intl"> & {
28
+ forwardedRef?: import("react").Ref<any> | undefined;
29
29
  } & import("react").RefAttributes<any>> & {
30
30
  WrappedComponent: import("react").ComponentType<import("./Filters/MonthlyFilter/MonthlyFilter.types").MonthlyFilterProps>;
31
31
  };
@@ -45,8 +45,8 @@ export declare const TYPES_DATA: {
45
45
  DAILY: {
46
46
  labelTranslationKey: string;
47
47
  defaultLabel: string;
48
- component: import("react").ForwardRefExoticComponent<Pick<import("./Filters/DailyFilter/DailyFilter").Props, "onChange" | "onRangeCopy" | "onRangePaste" | "onRangeClear" | "valueSelectionModes" | "rangeDisplayMode" | "texts" | "disabled" | "value"> & {
49
- forwardedRef?: ((instance: any) => void) | import("react").RefObject<any> | null | undefined;
48
+ component: import("react").ForwardRefExoticComponent<import("react-intl").Omit<import("./Filters/DailyFilter/DailyFilter").Props, "intl"> & {
49
+ forwardedRef?: import("react").Ref<any> | undefined;
50
50
  } & import("react").RefAttributes<any>> & {
51
51
  WrappedComponent: import("react").ComponentType<import("./Filters/DailyFilter/DailyFilter").Props>;
52
52
  };
@@ -9,7 +9,7 @@ export declare const createWeeklyRange: (days: NormalizedFilter[]) => {};
9
9
  export declare const createMonthlyWeekDayRange: (rules: {
10
10
  weeks?: (NormalizedFilter & WeekFilter)[];
11
11
  }) => MonthlyDayRange;
12
- export declare type MonthlyDayRange = {
12
+ export type MonthlyDayRange = {
13
13
  [key: string]: DenormalizedFilter & {
14
14
  restricted: boolean;
15
15
  display: boolean;
@@ -126,8 +126,7 @@ export var normalizeValue = function normalizeValue(_ref) {
126
126
  default:
127
127
  days = [];
128
128
  break;
129
- } // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
130
- // @ts-ignore
129
+ } // @ts-ignore
131
130
 
132
131
 
133
132
  result.days = days.map(function (_ref4) {
@@ -158,11 +157,9 @@ export var createMonthlyWeekDayRange = function createMonthlyWeekDayRange(rules)
158
157
 
159
158
  var weekStartIndex = Math.floor(i / 7);
160
159
  var week = weekStartIndex;
161
- var dayOfWeek = i - weekStartIndex * 7; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
162
- // @ts-expect-error: FIXME: Type 'undefined' is not assignable to type 'NormalizedFilter[]'.ts(2322)
160
+ var dayOfWeek = i - weekStartIndex * 7; // @ts-expect-error: FIXME: Type 'undefined' is not assignable to type 'NormalizedFilter[]'.ts(2322)
163
161
 
164
- var days = rules.weeks && rules.weeks.reduce( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
165
- // @ts-ignore
162
+ var days = rules.weeks && rules.weeks.reduce( // @ts-ignore
166
163
  function (prev, item) {
167
164
  return [].concat(prev, item.days.map(function (day) {
168
165
  return _objectSpread({}, denormMapTimeSchema(day), {
@@ -205,7 +202,6 @@ export var denormalizers = (_denormalizers = {}, _denormalizers[TYPES.DAILY] = f
205
202
  period: value.type,
206
203
  id: Math.random(),
207
204
  periodType: value.inverted ? COUNTED_FROM_ENUM.ENDING : COUNTED_FROM_ENUM.BEGINNING,
208
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
209
205
  // @ts-ignore
210
206
  definition: monthlyDenormalizers[value.type](value)
211
207
  };
@@ -326,11 +326,9 @@ var RangePicker = /*#__PURE__*/function (_PureComponent) {
326
326
  },
327
327
  fixedWeeks: true,
328
328
  showOutsideDay: true,
329
- modifiers: modifiers // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
330
- // @ts-ignore
329
+ modifiers: modifiers // @ts-ignore
331
330
  ,
332
- onDayClick: _this.handleDayClick // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
333
- // @ts-ignore
331
+ onDayClick: _this.handleDayClick // @ts-ignore
334
332
  ,
335
333
  selectedDays: selectedDays
336
334
  });
@@ -1,8 +1,30 @@
1
- import Button, { ButtonProps } from '@synerise/ds-button';
1
+ /// <reference types="react" />
2
+ import Button from '@synerise/ds-button';
2
3
  export declare const Sides: import("styled-components").StyledComponent<"div", any, {}, never>;
3
4
  export declare const Side: import("styled-components").StyledComponent<"div", any, {
4
5
  mode: string;
5
6
  }, never>;
6
7
  export declare const PickerFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
7
8
  export declare const FooterSeparator: import("styled-components").StyledComponent<"div", any, {}, never>;
8
- export declare const DateTimeModeSwitch: import("styled-components").StyledComponent<typeof Button, any, ButtonProps, never>;
9
+ export declare const DateTimeModeSwitch: import("styled-components").StyledComponent<typeof Button, any, Omit<Partial<{
10
+ href: string;
11
+ target?: string | undefined;
12
+ onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
13
+ } & import("antd/lib/button/button").BaseButtonProps & import("antd/lib/_util/type").Omit<import("react").AnchorHTMLAttributes<any>, "type" | "onClick"> & {
14
+ htmlType?: "button" | "submit" | "reset" | undefined;
15
+ onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
16
+ } & import("antd/lib/_util/type").Omit<import("react").ButtonHTMLAttributes<any>, "type" | "onClick">>, "type"> & {
17
+ type?: string | undefined;
18
+ mode?: string | undefined;
19
+ color?: string | undefined;
20
+ groupVariant?: string | undefined;
21
+ justifyContent?: string | undefined;
22
+ loading?: boolean | {
23
+ delay?: number | undefined;
24
+ } | undefined;
25
+ onClick?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
26
+ iconColor?: string | undefined;
27
+ error?: boolean | undefined;
28
+ activated?: boolean | undefined;
29
+ readOnly?: boolean | undefined;
30
+ }, never>;
@@ -19,7 +19,7 @@ export interface RangePickerProps extends WrappedComponentProps {
19
19
  /**
20
20
  * @deprecated use @{type RangePickerProps}
21
21
  */
22
- export declare type Props = RangePickerProps;
22
+ export type Props = RangePickerProps;
23
23
  export interface State {
24
24
  enteredTo?: Date | null;
25
25
  left: {
@@ -33,4 +33,4 @@ export interface State {
33
33
  mode: string;
34
34
  };
35
35
  }
36
- export declare type Side = 'left' | 'right';
36
+ export type Side = 'left' | 'right';
@@ -1,6 +1,6 @@
1
1
  import { Modifiers } from 'react-day-picker';
2
2
  import { State } from './RangePicker.types';
3
3
  import { DateRange, NullableDateLimit } from '../date.types';
4
- export declare const getDisabledTimeOptions: (initialDay: string | Date | undefined, granularity: string, initialLowerLimit?: NullableDateLimit, initialUpperLimit?: NullableDateLimit, is12HoursClock?: boolean | undefined) => number[];
5
- export declare const getSidesState: (value: DateRange, forceAdjacentMonths?: boolean | undefined) => State;
4
+ export declare const getDisabledTimeOptions: (initialDay: string | Date | undefined, granularity: string, initialLowerLimit?: NullableDateLimit, initialUpperLimit?: NullableDateLimit, is12HoursClock?: boolean) => number[];
5
+ export declare const getSidesState: (value: DateRange, forceAdjacentMonths?: boolean) => State;
6
6
  export declare const getModifiers: (from: NullableDateLimit | undefined, to: NullableDateLimit | undefined, enteredTo: NullableDateLimit | undefined) => Modifiers;
@@ -89,7 +89,7 @@ var RangePickerInput = function RangePickerInput(_ref) {
89
89
  }, [dateRangeValue, getText, active, texts, highlight]);
90
90
  var placeholder = React.useMemo(function () {
91
91
  if (isLifetime(value)) {
92
- return /*#__PURE__*/React.createElement(React.Fragment, null, (texts == null ? void 0 : texts['allTime']) || 'Lifetime');
92
+ return /*#__PURE__*/React.createElement(React.Fragment, null, (texts == null ? void 0 : texts.allTime) || 'Lifetime');
93
93
  }
94
94
 
95
95
  return /*#__PURE__*/React.createElement(React.Fragment, null, preferRelativeDesc && (dateRangeValue == null ? void 0 : dateRangeValue.translationKey) && ((texts == null ? void 0 : texts[dateRangeValue.translationKey]) || (dateRangeValue == null ? void 0 : dateRangeValue.translationKey)) + " (", renderFromDate(), /*#__PURE__*/React.createElement(Icon, {
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { DateToFormatOptions } from '@synerise/ds-data-format';
3
3
  import { DateFilter, DateRange } from '../date.types';
4
4
  import { Texts } from '../DateRangePicker.types';
5
- export declare type RangePickerInputProps = {
5
+ export type RangePickerInputProps = {
6
6
  size?: 'large' | 'default' | 'small';
7
7
  /**
8
8
  * @deprecated use `valueFormatOptions` instead
@@ -35,4 +35,4 @@ export declare type RangePickerInputProps = {
35
35
  /**
36
36
  * @deprecated use `RangePickerInputProps`
37
37
  */
38
- export declare type Props = RangePickerInputProps;
38
+ export type Props = RangePickerInputProps;
@@ -5,7 +5,7 @@ import { FilterDefinition, FilterValue } from './RangeFilter/RangeFilter.types';
5
5
  export declare function defaultValueTransformer(value: DateRange): DateRange;
6
6
  export declare class RawDateRangePicker extends PureComponent<DateRangePickerProps, State> {
7
7
  static defaultProps: {
8
- ranges: DateRange[];
8
+ ranges: (import("./date.types").AbsoluteDateRange | RelativeDateRange)[];
9
9
  relativePast: boolean;
10
10
  showRelativePicker: boolean;
11
11
  validate: () => {
@@ -17,8 +17,8 @@ export declare class RawDateRangePicker extends PureComponent<DateRangePickerPro
17
17
  constructor(props: DateRangePickerProps);
18
18
  componentDidUpdate(prevProps: Readonly<Props>): void;
19
19
  handleFilterCancel: () => void;
20
- handleFilterApply: (filter?: FilterValue<FilterDefinition> | undefined) => void;
21
- handleRangeChange: (range?: import("./date.types").AbsoluteDateRange | RelativeDateRange | undefined) => void;
20
+ handleFilterApply: (filter?: FilterValue<FilterDefinition>) => void;
21
+ handleRangeChange: (range?: DateRange) => void;
22
22
  handleApply: () => void;
23
23
  handleModalOpenClick: () => void;
24
24
  handleRemoveFilterClick: () => void;
@@ -27,8 +27,8 @@ export declare class RawDateRangePicker extends PureComponent<DateRangePickerPro
27
27
  getAddons: () => AddonType[];
28
28
  render(): JSX.Element;
29
29
  }
30
- declare const _default: React.ForwardRefExoticComponent<Pick<DateRangePickerProps, "readOnly" | "texts" | "valueFormatOptions" | "format" | "value" | "onVisibleChange" | "rangeUnits" | "containerClass" | "disableDefaultTexts" | "disabledDate" | "forceAdjacentMonths" | "forceAbsolute" | "footerProps" | "onValueChange" | "onApply" | "onFilterSave" | "popoverProps" | "popoverTrigger" | "ranges" | "relativeFuture" | "relativePast" | "relativeModes" | "savedFilters" | "showRelativePicker" | "showFilter" | "showTime" | "showCustomRange" | "showNowButton" | "validate" | "valueTransformer" | "arrowColor" | "disableAbsoluteTimepickerInRelative" | "rangePickerInputProps" | "allowedFilterTypes" | "renderPopoverTrigger" | "isTruncateMs" | "filterValueSelectionModes" | "filterRangeDisplayMode"> & {
31
- forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
30
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<DateRangePickerProps, "intl"> & {
31
+ forwardedRef?: React.Ref<any> | undefined;
32
32
  } & React.RefAttributes<any>> & {
33
33
  WrappedComponent: React.ComponentType<DateRangePickerProps>;
34
34
  };
@@ -414,8 +414,7 @@ export var RawDateRangePicker = /*#__PURE__*/function (_PureComponent) {
414
414
  };
415
415
 
416
416
  return RawDateRangePicker;
417
- }(PureComponent); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
418
- // @ts-ignore
417
+ }(PureComponent); // @ts-ignore
419
418
 
420
419
  _defineProperty(RawDateRangePicker, "defaultProps", {
421
420
  ranges: [].concat(RELATIVE_PRESETS, ABSOLUTE_PRESETS),
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { Props } from './CustomRangeForm.types';
3
- export declare const setOffsetType: <T, U>(a: U, obj: T) => T;
3
+ export declare const setOffsetType: (a: any, obj: any) => any;
4
4
  declare const CustomRangeForm: React.FC<Props>;
5
5
  export default CustomRangeForm;
@@ -1,6 +1,6 @@
1
1
  import { RelativeMode, Texts, Props as DateRangePickerProps } from '../../../DateRangePicker.types';
2
2
  import { DateRange, RelativeDateRange, RelativeUnits } from '../../../date.types';
3
- export declare type Props = {
3
+ export type Props = {
4
4
  ranges?: DateRange[];
5
5
  currentRange: RelativeDateRange;
6
6
  currentGroup: string | null;
@@ -14,7 +14,7 @@ export declare type Props = {
14
14
  relativeModes: RelativeMode[];
15
15
  rangeUnits: DateRangePickerProps['rangeUnits'];
16
16
  };
17
- export declare type FieldProps = {
17
+ export type FieldProps = {
18
18
  currentRange: RelativeDateRange;
19
19
  currentGroup: string | null;
20
20
  handleChange: (value: RelativeDateRange) => void;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { Props } from './DurationField.types';
3
- export declare const setDurationType: <T, U>(a: U, obj: T) => T;
3
+ export declare const setDurationType: (a: any, obj: any) => any;
4
4
  declare const DurationField: React.FC<Props>;
5
5
  export default DurationField;
@@ -1,4 +1,4 @@
1
1
  import { FieldProps } from '../CustomRangeForm.types';
2
- export declare type Props = {
2
+ export type Props = {
3
3
  handleDurationValueChange: (value?: string | number) => void;
4
4
  } & FieldProps;
@@ -1,4 +1,4 @@
1
1
  import { FieldProps } from '../CustomRangeForm.types';
2
- export declare type Props = {
2
+ export type Props = {
3
3
  handleOffsetValueChange: (value?: string | number) => void;
4
4
  } & FieldProps;
@@ -1,6 +1,6 @@
1
1
  import { DateRange, RelativeDateRange } from '../../../date.types';
2
2
  import { RelativeMode, Texts } from '../../../DateRangePicker.types';
3
- export declare type Props = {
3
+ export type Props = {
4
4
  ranges?: DateRange[];
5
5
  currentRange: RelativeDateRange;
6
6
  currentGroup: string | null;
@@ -1,6 +1,6 @@
1
1
  import { AbsoluteDateRange, DateRange, RelativeDateRange } from '../../../date.types';
2
2
  import { Texts } from '../../../DateRangePicker.types';
3
- export declare type Props = {
3
+ export type Props = {
4
4
  ranges: DateRange[];
5
5
  currentRange: RelativeDateRange;
6
6
  value: DateRange;
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { RangeDropdownProps } from './RangeDropdown.types';
3
- import { RelativeDateRange } from '../../../date.types';
3
+ import { DateRange } from '../../../date.types';
4
4
  /**
5
5
  * Tell whether given date (range) is a lifetime value.
6
6
  *
7
7
  * @param date-value @{type DateRange}
8
8
  * @param fallback whether to accept existing properties, but set to `undefined`, default `false`
9
9
  */
10
- export declare const isLifetime: (range?: import("../../../date.types").AbsoluteDateRange | RelativeDateRange | undefined, fallback?: boolean) => boolean;
10
+ export declare const isLifetime: (range?: DateRange, fallback?: boolean) => boolean;
11
11
  declare const RangeDropdown: React.FC<RangeDropdownProps>;
12
12
  export default RangeDropdown;
@@ -1,6 +1,6 @@
1
1
  import { AbsoluteDateRange, DateRange, RelativeDateRange } from '../../../date.types';
2
2
  import { DateRangePickerProps, Texts } from '../../../DateRangePicker.types';
3
- export declare type RangeDropdownProps = {
3
+ export type RangeDropdownProps = {
4
4
  ranges: DateRange[];
5
5
  currentRange: RelativeDateRange;
6
6
  texts: Texts;
@@ -10,4 +10,4 @@ export declare type RangeDropdownProps = {
10
10
  /**
11
11
  * @deprecated use `DateRangePickerProps`
12
12
  */
13
- export declare type Props = DateRangePickerProps;
13
+ export type Props = DateRangePickerProps;
@@ -1,6 +1,6 @@
1
1
  import { RelativeDateRange } from '../../../../date.types';
2
2
  import { Texts } from '../../../../DateRangePicker.types';
3
- export declare type Props = {
3
+ export type Props = {
4
4
  currentRange: RelativeDateRange;
5
5
  handleDurationValueChange: (value?: string | number) => void;
6
6
  onDurationModifierChange: (modifier: string) => void;
@@ -1,6 +1,6 @@
1
1
  import { RelativeDateRange } from '../../../date.types';
2
2
  import { RelativeMode, Texts } from '../../../DateRangePicker.types';
3
- export declare type TimestampRangeProps = {
3
+ export type TimestampRangeProps = {
4
4
  currentRange: RelativeDateRange;
5
5
  handleChange: (value: RelativeDateRange) => void;
6
6
  handleModeChange: (mode: RelativeMode | null) => void;
@@ -12,4 +12,4 @@ export declare type TimestampRangeProps = {
12
12
  /**
13
13
  * @deprecated
14
14
  */
15
- export declare type Props = TimestampRangeProps;
15
+ export type Props = TimestampRangeProps;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { WrappedComponentProps } from 'react-intl';
3
- declare const _default: React.ForwardRefExoticComponent<Pick<import("./RelativeRangePicker.types").RelativeRangePickerProps & WrappedComponentProps<"intl">, "onChange" | "texts" | "value" | "since" | "rangeUnits" | "ranges" | "relativeModes" | "showCustomRange" | "valueTransformer" | "future" | "past"> & {
4
- forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
3
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<import("./RelativeRangePicker.types").RelativeRangePickerProps & WrappedComponentProps<"intl">, "intl"> & {
4
+ forwardedRef?: React.Ref<any> | undefined;
5
5
  } & React.RefAttributes<any>> & {
6
6
  WrappedComponent: React.ComponentType<import("./RelativeRangePicker.types").RelativeRangePickerProps & WrappedComponentProps<"intl">>;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { IntlShape } from 'react-intl';
2
2
  import { DateRange, RelativeDateRange } from '../date.types';
3
3
  import { DateRangePickerProps, RelativeMode, Texts } from '../DateRangePicker.types';
4
- export declare type RelativeRangePickerProps = {
4
+ export type RelativeRangePickerProps = {
5
5
  ranges?: DateRange[];
6
6
  value: DateRange;
7
7
  onChange: (range: DateRange | undefined) => void;
@@ -15,7 +15,7 @@ export declare type RelativeRangePickerProps = {
15
15
  showCustomRange?: boolean;
16
16
  valueTransformer?: (e: RelativeDateRange | any) => RelativeDateRange | any;
17
17
  };
18
- export declare type State = {
18
+ export type State = {
19
19
  currentGroup: RelativeMode | null;
20
20
  future: boolean;
21
21
  past: boolean;
@@ -28,4 +28,4 @@ export declare type State = {
28
28
  /**
29
29
  * @deprecated use `RelativeRangePickerProps`
30
30
  */
31
- export declare type Props = RelativeRangePickerProps;
31
+ export type Props = RelativeRangePickerProps;
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { DateRange, RelativeDateRange } from '../date.types';
3
2
  import { Props } from './RelativeRangePicker.types';
4
3
  import { RelativeMode } from '../DateRangePicker.types';
5
4
  export declare const setOffsetValue: (value: number | string, currentRange: RelativeDateRange) => RelativeDateRange;
6
5
  export declare const setDurationValue: (value: number | string, currentRange: RelativeDateRange) => RelativeDateRange;
7
- export declare const setFuture: <T, U>(a: U, obj: T) => T;
6
+ export declare const setFuture: (a: any, obj: any) => any;
8
7
  export declare const RANGES_MODE: {
9
8
  PAST: string;
10
9
  FUTURE: string;
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import type startOf from './dateUtils/startOf';
3
3
  import type endOf from './dateUtils/endOf';
4
- export declare type RelativeUnits = 'SECONDS' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS' | 'SINCE' | keyof typeof startOf | keyof typeof endOf;
5
- export declare type RangeKey = 'TODAY' | 'YESTERDAY' | 'TOMORROW' | 'LAST_WEEK' | 'THIS_WEEK' | 'NEXT_WEEK' | 'LAST_7_DAYS' | 'NEXT_7_DAYS' | 'LAST_MONTH' | 'THIS_MONTH' | 'NEXT_MONTH' | 'LAST_3_MONTHS' | 'NEXT_3_MONTHS' | 'LAST_6_MONTHS' | 'NEXT_6_MONTHS' | 'LAST_YEAR' | 'NEXT_YEAR' | 'ALL_TIME';
6
- export declare type NullableDateLimit = null | string | Date;
4
+ export type RelativeUnits = 'SECONDS' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS' | 'SINCE' | keyof typeof startOf | keyof typeof endOf;
5
+ export type RangeKey = 'TODAY' | 'YESTERDAY' | 'TOMORROW' | 'LAST_WEEK' | 'THIS_WEEK' | 'NEXT_WEEK' | 'LAST_7_DAYS' | 'NEXT_7_DAYS' | 'LAST_MONTH' | 'THIS_MONTH' | 'NEXT_MONTH' | 'LAST_3_MONTHS' | 'NEXT_3_MONTHS' | 'LAST_6_MONTHS' | 'NEXT_6_MONTHS' | 'LAST_YEAR' | 'NEXT_YEAR' | 'ALL_TIME';
6
+ export type NullableDateLimit = null | string | Date;
7
7
  export interface DateFilter {
8
8
  key?: string;
9
9
  type: 'ABSOLUTE' | 'RELATIVE' | 'SINCE';
@@ -45,7 +45,7 @@ export interface RelativeDateRange extends DateRangeBase {
45
45
  from?: NullableDateLimit;
46
46
  to?: NullableDateLimit;
47
47
  }
48
- export declare type Days = {
48
+ export type Days = {
49
49
  [key: string]: object;
50
50
  };
51
- export declare type DateRange = AbsoluteDateRange | RelativeDateRange;
51
+ export type DateRange = AbsoluteDateRange | RelativeDateRange;
@@ -1,4 +1,4 @@
1
1
  import { RelativeDateRange, DateFilter } from '../date.types';
2
- export declare type Relative = 'SECONDS' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS';
2
+ export type Relative = 'SECONDS' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS';
3
3
  declare const relativeToAbsolute: (range: RelativeDateRange) => DateFilter;
4
4
  export default relativeToAbsolute;
package/dist/utils.d.ts CHANGED
@@ -5,5 +5,5 @@ import END_OF from './dateUtils/endOf';
5
5
  import { Texts } from './DateRangePicker.types';
6
6
  export { START_OF, END_OF };
7
7
  export declare const normalizeRange: (range: DateRange) => DateRange;
8
- export declare const getDefaultTexts: (intl: IntlShape, disableDefault?: boolean | undefined, texts?: Partial<Texts> | undefined) => Texts;
8
+ export declare const getDefaultTexts: (intl: IntlShape, disableDefault?: boolean, texts?: Partial<Texts>) => Texts;
9
9
  export declare const DEFAULT_RANGE: DateRange;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-date-range-picker",
3
- "version": "0.24.7",
3
+ "version": "0.24.9",
4
4
  "description": "Date-Range-Picker UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -33,25 +33,25 @@
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
35
  "@date-fns/upgrade": "^1.0.3",
36
- "@synerise/ds-badge": "^0.6.37",
37
- "@synerise/ds-button": "^0.18.2",
38
- "@synerise/ds-button-group": "^0.6.30",
39
- "@synerise/ds-data-format": "^0.4.2",
40
- "@synerise/ds-date-picker": "^0.10.17",
41
- "@synerise/ds-dropdown": "^0.17.80",
42
- "@synerise/ds-icon": "^0.58.2",
43
- "@synerise/ds-inline-edit": "^0.6.80",
44
- "@synerise/ds-input": "^0.19.2",
45
- "@synerise/ds-input-number": "^0.8.24",
46
- "@synerise/ds-manageable-list": "^0.26.10",
47
- "@synerise/ds-menu": "^0.17.19",
48
- "@synerise/ds-scrollbar": "^0.6.7",
49
- "@synerise/ds-select": "^0.15.20",
50
- "@synerise/ds-slider": "^0.12.27",
51
- "@synerise/ds-tags": "^0.8.14",
52
- "@synerise/ds-time-picker": "^0.8.8",
53
- "@synerise/ds-tooltip": "^0.14.4",
54
- "@synerise/ds-utils": "^0.24.16",
36
+ "@synerise/ds-badge": "^0.6.38",
37
+ "@synerise/ds-button": "^0.18.3",
38
+ "@synerise/ds-button-group": "^0.6.31",
39
+ "@synerise/ds-data-format": "^0.4.3",
40
+ "@synerise/ds-date-picker": "^0.10.19",
41
+ "@synerise/ds-dropdown": "^0.17.82",
42
+ "@synerise/ds-icon": "^0.58.3",
43
+ "@synerise/ds-inline-edit": "^0.6.82",
44
+ "@synerise/ds-input": "^0.19.3",
45
+ "@synerise/ds-input-number": "^0.8.25",
46
+ "@synerise/ds-manageable-list": "^0.26.12",
47
+ "@synerise/ds-menu": "^0.18.0",
48
+ "@synerise/ds-scrollbar": "^0.6.8",
49
+ "@synerise/ds-select": "^0.15.21",
50
+ "@synerise/ds-slider": "^0.13.0",
51
+ "@synerise/ds-tags": "^0.8.16",
52
+ "@synerise/ds-time-picker": "^0.8.10",
53
+ "@synerise/ds-tooltip": "^0.14.5",
54
+ "@synerise/ds-utils": "^0.24.17",
55
55
  "date-fns": "^2.16.1",
56
56
  "dayjs": "^1.8.35",
57
57
  "lodash": "^4.17.20",
@@ -70,7 +70,7 @@
70
70
  "@testing-library/jest-dom": "5.1.1",
71
71
  "@testing-library/react": "10.0.1",
72
72
  "@testing-library/user-event": "^10.3.1",
73
- "@types/ramda": "^0.27.14"
73
+ "@types/ramda": "^0.28.23"
74
74
  },
75
- "gitHead": "f1f520c4c5ef9f90bacb5d5e0b2e778ceb8fdf79"
75
+ "gitHead": "d944339a738211d8f74b27360481aafd7ef51ddd"
76
76
  }