@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.
- package/CHANGELOG.md +16 -0
- package/dist/AddonCollapse/AddonCollapse.types.d.ts +1 -1
- package/dist/DateRangePicker.types.d.ts +9 -9
- package/dist/Footer/Footer.d.ts +2 -2
- package/dist/Footer/Footer.types.d.ts +1 -1
- package/dist/RangeFilter/Filters/DailyFilter/DailyFilter.d.ts +2 -2
- package/dist/RangeFilter/Filters/DailyFilter/DailyFilter.js +1 -2
- package/dist/RangeFilter/Filters/MonthlyFilter/MonthlyFilter.d.ts +2 -2
- package/dist/RangeFilter/Filters/MonthlyFilter/MonthlyFilter.js +4 -9
- package/dist/RangeFilter/Filters/MonthlyFilter/MonthlyFilter.types.d.ts +3 -3
- package/dist/RangeFilter/Filters/WeeklyFilter/WeeklyFilter.d.ts +0 -1
- package/dist/RangeFilter/Filters/WeeklyFilter/WeeklyFilter.js +1 -2
- package/dist/RangeFilter/Filters/WeeklyFilter/WeeklyFilter.types.d.ts +3 -3
- package/dist/RangeFilter/Filters/new/Daily/Daily.types.d.ts +2 -2
- package/dist/RangeFilter/Filters/new/Filters.types.d.ts +1 -1
- package/dist/RangeFilter/Filters/new/Monthly/Monthly.types.d.ts +4 -4
- package/dist/RangeFilter/Filters/new/Weekly/Weekly.types.d.ts +4 -4
- package/dist/RangeFilter/RangeFilter.d.ts +2 -2
- package/dist/RangeFilter/RangeFilter.js +1 -2
- package/dist/RangeFilter/RangeFilter.types.d.ts +13 -13
- package/dist/RangeFilter/Shared/AddButton/AddButton.types.d.ts +1 -1
- package/dist/RangeFilter/Shared/FilterDropdown/FilterDropdown.types.d.ts +2 -2
- package/dist/RangeFilter/Shared/RangeFilterStatus/RangeFilterStatus.types.d.ts +1 -1
- package/dist/RangeFilter/Shared/SaveFilterForm/SaveFilterForm.styles.d.ts +24 -2
- package/dist/RangeFilter/Shared/SaveFilterForm/SaveFilterForm.types.d.ts +1 -1
- package/dist/RangeFilter/Shared/SelectionCount/SelectionCount.types.d.ts +1 -1
- package/dist/RangeFilter/Shared/SelectionHint/SelectionHint.d.ts +4 -2
- package/dist/RangeFilter/Shared/TimeWindow/Day/Day.js +2 -4
- package/dist/RangeFilter/Shared/TimeWindow/Day/Day.types.d.ts +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/Grid/Grid.types.d.ts +2 -2
- package/dist/RangeFilter/Shared/TimeWindow/Header/Header.d.ts +2 -2
- package/dist/RangeFilter/Shared/TimeWindow/RangeActions/RangeActions.types.d.ts +2 -2
- package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.d.ts +0 -1
- package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types.d.ts +4 -4
- package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.utils.d.ts +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeFormContainer.d.ts +0 -1
- package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeFormContainer.types.d.ts +2 -2
- package/dist/RangeFilter/Shared/TimeWindow/RangeSummary/RangeSummary.types.d.ts +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/TimeWindow.types.d.ts +8 -8
- package/dist/RangeFilter/Shared/TimeWindow/utils.d.ts +1 -1
- package/dist/RangeFilter/Shared/TimeWindow/utils.js +0 -1
- package/dist/RangeFilter/constants.d.ts +4 -4
- package/dist/RangeFilter/utils.d.ts +1 -1
- package/dist/RangeFilter/utils.js +3 -7
- package/dist/RangePicker/RangePicker.js +2 -4
- package/dist/RangePicker/RangePicker.styles.d.ts +24 -2
- package/dist/RangePicker/RangePicker.types.d.ts +2 -2
- package/dist/RangePicker/utils.d.ts +2 -2
- package/dist/RangePickerInput/RangePickerInput.js +1 -1
- package/dist/RangePickerInput/RangePickerInput.types.d.ts +2 -2
- package/dist/RawDateRangePicker.d.ts +5 -5
- package/dist/RawDateRangePicker.js +1 -2
- package/dist/RelativeRangePicker/Elements/CustomRangeForm/CustomRangeForm.d.ts +1 -1
- 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.types.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/CustomRangeForm/OffsetField/OffsetField.types.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/ModeDropdown/ModeDropdown.types.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/RangeButtons/RangeButtons.types.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/RangeDropdown/RangeDropdown.d.ts +2 -2
- package/dist/RelativeRangePicker/Elements/RangeDropdown/RangeDropdown.types.d.ts +2 -2
- package/dist/RelativeRangePicker/Elements/TimestampRange/TimestampDuration/TimestampDuration.types.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/TimestampRange/TimestampRange.types.d.ts +2 -2
- package/dist/RelativeRangePicker/RelativeRangePicker.d.ts +2 -2
- package/dist/RelativeRangePicker/RelativeRangePicker.types.d.ts +3 -3
- package/dist/RelativeRangePicker/utils.d.ts +1 -2
- package/dist/date.types.d.ts +5 -5
- package/dist/dateUtils/relativeToAbsolute.d.ts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +22 -22
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.24.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.24.8...@synerise/ds-date-range-picker@0.24.9) (2023-10-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-date-range-picker
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.24.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.24.7...@synerise/ds-date-range-picker@0.24.8) (2023-10-02)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-date-range-picker
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.24.7](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.24.6...@synerise/ds-date-range-picker@0.24.7) (2023-09-26)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @synerise/ds-date-range-picker
|
|
@@ -9,8 +9,8 @@ import { Props as FooterProps } from './Footer/Footer.types';
|
|
|
9
9
|
import { RangePickerInputProps } from './RangePickerInput/RangePickerInput.types';
|
|
10
10
|
import { DateLimitMode, RangeDisplayMode } from './RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
|
|
11
11
|
export { DateRange } from './date.types';
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export type CustomColorArrow = 'blue' | 'grey' | 'red' | 'green' | 'yellow' | 'pink' | 'mars' | 'orange' | 'fern' | 'cyan' | 'purple' | 'violet';
|
|
13
|
+
export type AdditionalMapper = {
|
|
14
14
|
topLeft: CustomColorArrow;
|
|
15
15
|
topRight: CustomColorArrow;
|
|
16
16
|
bottomLeft: CustomColorArrow;
|
|
@@ -75,25 +75,25 @@ export interface DateRangePickerProps extends WrappedComponentProps {
|
|
|
75
75
|
/**
|
|
76
76
|
* @deprecated use `DateRangePickerProps`
|
|
77
77
|
*/
|
|
78
|
-
export
|
|
79
|
-
export
|
|
78
|
+
export type Props = DateRangePickerProps;
|
|
79
|
+
export type RelativeMode = 'PAST' | 'FUTURE' | 'SINCE';
|
|
80
80
|
export interface State {
|
|
81
81
|
mode: string;
|
|
82
82
|
value: DateRange;
|
|
83
83
|
filter?: FilterDefinition;
|
|
84
84
|
visibleAddonKey?: string | undefined;
|
|
85
85
|
}
|
|
86
|
-
export
|
|
86
|
+
export type Texts = {
|
|
87
87
|
[k in Translations]: string | ReactNode;
|
|
88
88
|
} & {
|
|
89
89
|
[k in TranslationsPlaceholders]: string;
|
|
90
90
|
};
|
|
91
|
-
export
|
|
92
|
-
export
|
|
93
|
-
export
|
|
91
|
+
export type TranslationsPlaceholders = 'endDatePlaceholder' | 'startDatePlaceholder' | 'selectDate' | 'selectTime';
|
|
92
|
+
export type Translations = 'custom' | 'today' | 'yesterday' | 'apply' | 'clear' | 'now' | 'emptyDateError' | 'last7Days' | 'thisWeek' | 'lastWeek' | 'thisMonth' | 'lastMonth' | 'last3Months' | 'last6Months' | 'lastYear' | 'allTime' | 'tomorrow' | 'next7Days' | 'nextWeek' | 'nextMonth' | 'next3Months' | 'next6Months' | 'nextYear' | 'more' | 'relativeDateRange' | 'last' | 'before' | 'after' | 'since' | 'next' | 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'years' | 'timestampLast' | 'timestampNext' | 'timestampTill' | 'filter' | 'startDate' | 'endDate' | 'remove' | 'savedFiltersTrigger' | 'clearRange' | 'copyRange' | 'pasteRange' | 'range' | 'hour';
|
|
93
|
+
export type WithTranslations = {
|
|
94
94
|
texts?: Texts;
|
|
95
95
|
};
|
|
96
|
-
export
|
|
96
|
+
export type AddonType = {
|
|
97
97
|
content: ReactNode;
|
|
98
98
|
key: string;
|
|
99
99
|
};
|
package/dist/Footer/Footer.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Props } from './Footer.types';
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
4
|
-
forwardedRef?:
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
4
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
5
5
|
} & React.RefAttributes<any>> & {
|
|
6
6
|
WrappedComponent: React.ComponentType<Props>;
|
|
7
7
|
};
|
|
@@ -3,7 +3,7 @@ import { WrappedComponentProps } from 'react-intl';
|
|
|
3
3
|
import { DateToFormatOptions } from '@synerise/ds-data-format';
|
|
4
4
|
import { Texts } from '../DateRangePicker.types';
|
|
5
5
|
import { DateRange } from '../date.types';
|
|
6
|
-
export
|
|
6
|
+
export type Props = {
|
|
7
7
|
mode: string;
|
|
8
8
|
dateOnly?: boolean;
|
|
9
9
|
value?: DateRange;
|
|
@@ -11,8 +11,8 @@ export interface Props extends WrappedComponentProps, Partial<RangeActionsMethod
|
|
|
11
11
|
rangeDisplayMode?: RangeDisplayMode;
|
|
12
12
|
valueSelectionModes: ValueSelectionModes;
|
|
13
13
|
}
|
|
14
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
15
|
-
forwardedRef?:
|
|
14
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
15
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
16
16
|
} & React.RefAttributes<any>> & {
|
|
17
17
|
WrappedComponent: React.ComponentType<Props>;
|
|
18
18
|
};
|
|
@@ -37,8 +37,7 @@ var DailyFilter = function DailyFilter(props) {
|
|
|
37
37
|
defaultMessage: 'Every day'
|
|
38
38
|
})
|
|
39
39
|
}
|
|
40
|
-
} //
|
|
41
|
-
// @ts-expect-error: Type 'string' is not assignable to type 'Days'.ts(2322)
|
|
40
|
+
} // @ts-expect-error: Type 'string' is not assignable to type 'Days'.ts(2322)
|
|
42
41
|
,
|
|
43
42
|
days: value[0] ? value[0] : value,
|
|
44
43
|
onChange: function onChange(val) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MonthlyFilterProps } from './MonthlyFilter.types';
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
4
|
-
forwardedRef?:
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<MonthlyFilterProps, "intl"> & {
|
|
4
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
5
5
|
} & React.RefAttributes<any>> & {
|
|
6
6
|
WrappedComponent: React.ComponentType<MonthlyFilterProps>;
|
|
7
7
|
};
|
|
@@ -366,7 +366,6 @@ var MonthlyFilter = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
366
366
|
}),
|
|
367
367
|
canDelete: !disabled && deletableDueToEntriesLimit(key),
|
|
368
368
|
id: item.id,
|
|
369
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
370
369
|
// @ts-ignore
|
|
371
370
|
name: /*#__PURE__*/React.createElement(S.DropdownHeader, {
|
|
372
371
|
onClick: function onClick(event) {
|
|
@@ -389,23 +388,19 @@ var MonthlyFilter = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
389
388
|
key: item.period + "_" + key,
|
|
390
389
|
showSelectAll: true,
|
|
391
390
|
invertibleTime: true,
|
|
392
|
-
numberOfDaysPerRow: 7 //
|
|
393
|
-
// @ts-expect-error: FIXME: Type '{ [day: number]: DenormalizedFilter; }' is not assignable to type 'Days'.
|
|
391
|
+
numberOfDaysPerRow: 7 // @ts-expect-error: FIXME: Type '{ [day: number]: DenormalizedFilter; }' is not assignable to type 'Days'.
|
|
394
392
|
,
|
|
395
|
-
days: item.definition //
|
|
396
|
-
// @ts-expect-error: FIXME: Type '(definition: Month) => void' is not assignable to type '(days: Days) => void'.
|
|
393
|
+
days: item.definition // @ts-expect-error: FIXME: Type '(definition: Month) => void' is not assignable to type '(days: Days) => void'.
|
|
397
394
|
,
|
|
398
395
|
onChange: function onChange(definition) {
|
|
399
396
|
return _this2.handleDefinitionChange(definition, key);
|
|
400
397
|
},
|
|
401
398
|
onRangeClear: onRangeClear,
|
|
402
399
|
onRangeCopy: onRangeCopy,
|
|
403
|
-
onRangePaste: onRangePaste //
|
|
404
|
-
// @ts-expect-error: FIXME: Type 'Partial<FilterDefinition> | undefined' is not assignable to type 'Partial<FilterDefinition>'.
|
|
400
|
+
onRangePaste: onRangePaste // @ts-expect-error: FIXME: Type 'Partial<FilterDefinition> | undefined' is not assignable to type 'Partial<FilterDefinition>'.
|
|
405
401
|
,
|
|
406
402
|
rangeClipboard: rangeClipboard,
|
|
407
|
-
monthlyFilterPeriod: data[key].period //
|
|
408
|
-
// @ts-expect-error: FIXME: Type 'Partial<FilterDefinition> | undefined' is not assignable to type 'Partial<FilterDefinition>'.
|
|
403
|
+
monthlyFilterPeriod: data[key].period // @ts-expect-error: FIXME: Type 'Partial<FilterDefinition> | undefined' is not assignable to type 'Partial<FilterDefinition>'.
|
|
409
404
|
,
|
|
410
405
|
valueSelectionModes: valueSelectionModes,
|
|
411
406
|
renderRangeFormSuffix: renderRangeFormSuffix,
|
|
@@ -6,7 +6,7 @@ import { DenormalizedFilter, FilterDefinition, MonthlySelectValue, WithDisabledP
|
|
|
6
6
|
import { WithTranslations } from '../../../DateRangePicker.types';
|
|
7
7
|
import { RangeDisplayMode, DateLimitMode } from '../../Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
|
|
8
8
|
import { COUNTED_FROM_ENUM, DAYS_OF_PERIOD_ENUM } from '../../constants';
|
|
9
|
-
export
|
|
9
|
+
export type MonthlyFilterProps = {
|
|
10
10
|
maxEntries?: number;
|
|
11
11
|
value: Month[];
|
|
12
12
|
onChange: (definition: Month[]) => void;
|
|
@@ -19,7 +19,7 @@ export declare type MonthlyFilterProps = {
|
|
|
19
19
|
valueSelectionModes?: DateLimitMode[];
|
|
20
20
|
rangeDisplayMode?: RangeDisplayMode;
|
|
21
21
|
} & WithDisabledProp & Partial<RangeActions> & WithTranslations;
|
|
22
|
-
export
|
|
22
|
+
export type Month<T = DenormalizedFilter> = {
|
|
23
23
|
id: string | number;
|
|
24
24
|
period: string;
|
|
25
25
|
periodType?: string;
|
|
@@ -27,7 +27,7 @@ export declare type Month<T = DenormalizedFilter> = {
|
|
|
27
27
|
[day: number]: T;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
export
|
|
30
|
+
export type MonthlyFilterState = {
|
|
31
31
|
visible: {
|
|
32
32
|
[guid: string]: boolean;
|
|
33
33
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { WeeklyFilterProps } from './WeeklyFilter.types';
|
|
3
2
|
declare const WeeklyFilter: ({ value, onChange, onRangeClear, onRangePaste, onRangeCopy, rangeClipboard, intl, valueSelectionModes, rangeDisplayMode, texts, }: WeeklyFilterProps) => JSX.Element;
|
|
4
3
|
export default WeeklyFilter;
|
|
@@ -25,8 +25,7 @@ var WeeklyFilter = function WeeklyFilter(_ref) {
|
|
|
25
25
|
}, []);
|
|
26
26
|
return /*#__PURE__*/React.createElement(S.WeeklyFilterContainer, null, /*#__PURE__*/React.createElement(TimeWindow, {
|
|
27
27
|
texts: texts,
|
|
28
|
-
showSelectAll: true //
|
|
29
|
-
// @ts-expect-error: FIXME: Property 'invertibleTime' does not exist on type
|
|
28
|
+
showSelectAll: true // @ts-expect-error: FIXME: Property 'invertibleTime' does not exist on type
|
|
30
29
|
,
|
|
31
30
|
invertibleTime: true,
|
|
32
31
|
dayFormatter: handleDayFormatter,
|
|
@@ -3,7 +3,7 @@ import { DayOptions, RangeActions } from '../../Shared/TimeWindow/TimeWindow.typ
|
|
|
3
3
|
import { FilterDefinition } from '../../RangeFilter.types';
|
|
4
4
|
import { WithTranslations } from '../../../DateRangePicker.types';
|
|
5
5
|
import { DateLimitMode, RangeDisplayMode } from '../../Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
|
|
6
|
-
export
|
|
6
|
+
export type WeeklyFilterProps = {
|
|
7
7
|
value: Days;
|
|
8
8
|
onChange: (days: Days) => void;
|
|
9
9
|
intl: IntlShape;
|
|
@@ -11,7 +11,7 @@ export declare type WeeklyFilterProps = {
|
|
|
11
11
|
valueSelectionModes: DateLimitMode[];
|
|
12
12
|
rangeDisplayMode?: RangeDisplayMode;
|
|
13
13
|
} & WithTranslations & Partial<RangeActions>;
|
|
14
|
-
export
|
|
15
|
-
export
|
|
14
|
+
export type DayKey = number | string;
|
|
15
|
+
export type Days = {
|
|
16
16
|
[key in DayKey]: DayOptions;
|
|
17
17
|
};
|
|
@@ -2,10 +2,10 @@ import { FilterBaseProps } from '../Filters.types';
|
|
|
2
2
|
import { DateLimitMode } from '../../../Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
|
|
3
3
|
import { DayOptions } from '../../../Shared/TimeWindow/TimeWindow.types';
|
|
4
4
|
import { WithDisabledProp } from '../../../RangeFilter.types';
|
|
5
|
-
export
|
|
5
|
+
export type DailySchedule = DayOptions & {
|
|
6
6
|
mode: DateLimitMode;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type DailyProps = {
|
|
9
9
|
value: DailySchedule[];
|
|
10
10
|
onChange: (value: DailyProps['value']) => void;
|
|
11
11
|
} & FilterBaseProps & WithDisabledProp;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TimePickerProps } from '@synerise/ds-time-picker';
|
|
2
2
|
import type { DateToFormatOptions } from '@synerise/ds-data-format';
|
|
3
3
|
import { DateLimitMode } from '../../Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
|
|
4
|
-
export
|
|
4
|
+
export type FilterBaseProps = {
|
|
5
5
|
maxEntries?: number;
|
|
6
6
|
valueSelectionMode?: DateLimitMode[];
|
|
7
7
|
/**
|
|
@@ -3,14 +3,14 @@ import { DayOptions } from '../../../Shared/TimeWindow/TimeWindow.types';
|
|
|
3
3
|
import { DateLimitMode } from '../../../Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
|
|
4
4
|
import { FilterBaseProps } from '../Filters.types';
|
|
5
5
|
import { WithDisabledProp } from '../../../RangeFilter.types';
|
|
6
|
-
export
|
|
6
|
+
export type MonthlyScheduleDayValue = DayOptions & {
|
|
7
7
|
mode: DateLimitMode;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type MonthlySchedule = {
|
|
10
10
|
[guid: string]: Record<DayOfMonthIndex, MonthlyScheduleDayValue>;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export type DayOfMonthIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31;
|
|
13
|
+
export type MonthlyProps = {
|
|
14
14
|
value: MonthlySchedule;
|
|
15
15
|
periodType: DAYS_OF_PERIOD_ENUM;
|
|
16
16
|
countedFrom: COUNTED_FROM_ENUM;
|
|
@@ -2,14 +2,14 @@ import { DayOptions } from '../../../Shared/TimeWindow/TimeWindow.types';
|
|
|
2
2
|
import { DateLimitMode } from '../../../Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
|
|
3
3
|
import { FilterBaseProps } from '../Filters.types';
|
|
4
4
|
import { WithDisabledProp } from '../../../RangeFilter.types';
|
|
5
|
-
export
|
|
5
|
+
export type WeeklyScheduleDayValue = DayOptions & {
|
|
6
6
|
mode: DateLimitMode;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type WeeklySchedule = {
|
|
9
9
|
[guid: string]: Record<DayOfWeekIndex, WeeklyScheduleDayValue>;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type DayOfWeekIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
12
|
+
export type WeeklyProps = {
|
|
13
13
|
value: WeeklySchedule;
|
|
14
14
|
onChange: (value: WeeklyProps['value']) => void;
|
|
15
15
|
} & FilterBaseProps & WithDisabledProp;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { RangeFilterProps } from './RangeFilter.types';
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
4
|
-
forwardedRef?:
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<RangeFilterProps, "intl"> & {
|
|
4
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
5
5
|
} & React.RefAttributes<any>> & {
|
|
6
6
|
WrappedComponent: React.ComponentType<RangeFilterProps>;
|
|
7
7
|
};
|
|
@@ -217,8 +217,7 @@ var RangeFilter = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
217
217
|
};
|
|
218
218
|
|
|
219
219
|
return RangeFilter;
|
|
220
|
-
}(React.PureComponent); //
|
|
221
|
-
// @ts-ignore
|
|
220
|
+
}(React.PureComponent); // @ts-ignore
|
|
222
221
|
|
|
223
222
|
|
|
224
223
|
_defineProperty(RangeFilter, "defaultProps", {
|
|
@@ -4,11 +4,11 @@ import { SavedFilter } from './Shared/FilterDropdown/FilterDropdown.types';
|
|
|
4
4
|
import { DateLimitMode, RangeDisplayMode } from './Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
|
|
5
5
|
import { Props as DateRangePickerProps, Texts } from '../DateRangePicker.types';
|
|
6
6
|
import { COUNTED_FROM_ENUM, DAYS_OF_PERIOD_ENUM } from './constants';
|
|
7
|
-
export
|
|
7
|
+
export type FilterValue<T = FilterDefinition> = {
|
|
8
8
|
definition?: Partial<T>;
|
|
9
9
|
type: string;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type RangeFilterProps = {
|
|
12
12
|
value: FilterValue | undefined;
|
|
13
13
|
onApply?: (filter: FilterValue) => void;
|
|
14
14
|
onChange?: (filter: FilterValue) => void;
|
|
@@ -23,13 +23,13 @@ export declare type RangeFilterProps = {
|
|
|
23
23
|
rangeDisplayMode?: RangeDisplayMode;
|
|
24
24
|
rangeUnits?: Pick<DateRangePickerProps, 'rangeUnits'>;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type RangeFilterState = {
|
|
27
27
|
previousFilter?: FilterValue;
|
|
28
28
|
[filterType: string]: FilterValue | Partial<FilterDefinition> | string | undefined;
|
|
29
29
|
activeType: string;
|
|
30
30
|
rangeClipboard?: Partial<FilterDefinition>;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type FilterDefinition = {
|
|
33
33
|
start?: string;
|
|
34
34
|
stop?: string;
|
|
35
35
|
inverted?: boolean;
|
|
@@ -40,36 +40,36 @@ export declare type FilterDefinition = {
|
|
|
40
40
|
periodType?: COUNTED_FROM_ENUM;
|
|
41
41
|
mode?: DateLimitMode;
|
|
42
42
|
};
|
|
43
|
-
export
|
|
43
|
+
export type MonthlySelectValue<T> = {
|
|
44
44
|
translationKey?: string;
|
|
45
45
|
value: T;
|
|
46
46
|
};
|
|
47
|
-
export
|
|
47
|
+
export type DenormalizedFilter = {
|
|
48
48
|
start: string;
|
|
49
49
|
stop: string;
|
|
50
50
|
day?: React.ReactText;
|
|
51
51
|
restricted?: boolean;
|
|
52
52
|
};
|
|
53
|
-
export
|
|
53
|
+
export type NormalizedFilter = NormalizedFilterBase & {
|
|
54
54
|
from: string;
|
|
55
55
|
to: string;
|
|
56
56
|
day?: React.ReactText;
|
|
57
57
|
week?: React.ReactText;
|
|
58
58
|
};
|
|
59
|
-
export
|
|
59
|
+
export type NormalizedFilterBase = {
|
|
60
60
|
type?: string;
|
|
61
61
|
nestingType?: string;
|
|
62
62
|
};
|
|
63
|
-
export
|
|
63
|
+
export type WeekFilter = {
|
|
64
64
|
week: number;
|
|
65
65
|
};
|
|
66
|
-
export
|
|
66
|
+
export type WithDisabledProp = {
|
|
67
67
|
disabled?: boolean;
|
|
68
68
|
};
|
|
69
|
-
export
|
|
69
|
+
export type WeeklyFilterDefinition = {
|
|
70
70
|
[key: string]: FilterDefinition;
|
|
71
71
|
};
|
|
72
|
-
export
|
|
72
|
+
export type MonthlyFilterDefinition = {
|
|
73
73
|
definition: {
|
|
74
74
|
[key: string]: FilterDefinition;
|
|
75
75
|
};
|
|
@@ -77,4 +77,4 @@ export declare type MonthlyFilterDefinition = {
|
|
|
77
77
|
period: DAYS_OF_PERIOD_ENUM;
|
|
78
78
|
periodType: COUNTED_FROM_ENUM;
|
|
79
79
|
};
|
|
80
|
-
export
|
|
80
|
+
export type ValueSelectionModes = ['Range', 'Hour'];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FilterValue } from '../../RangeFilter.types';
|
|
3
|
-
export
|
|
3
|
+
export type FilterDropdownProps = {
|
|
4
4
|
filters: SavedFilter[];
|
|
5
5
|
onFilterSelect: (filter: SavedFilter) => void;
|
|
6
6
|
onFilterRemove: (filterId: string) => void;
|
|
7
7
|
label: React.ReactNode | string;
|
|
8
8
|
removeTooltip: React.ReactNode | string;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type SavedFilter = FilterValue & {
|
|
11
11
|
id: string;
|
|
12
12
|
name: string;
|
|
13
13
|
};
|
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import Button from '@synerise/ds-button';
|
|
2
3
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const FormButton: import("styled-components").StyledComponent<typeof Button, any,
|
|
4
|
+
export declare const FormButton: import("styled-components").StyledComponent<typeof Button, any, Omit<Partial<{
|
|
5
|
+
href: string;
|
|
6
|
+
target?: string | undefined;
|
|
7
|
+
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
8
|
+
} & import("antd/lib/button/button").BaseButtonProps & import("antd/lib/_util/type").Omit<import("react").AnchorHTMLAttributes<any>, "type" | "onClick"> & {
|
|
9
|
+
htmlType?: "button" | "submit" | "reset" | undefined;
|
|
10
|
+
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
11
|
+
} & import("antd/lib/_util/type").Omit<import("react").ButtonHTMLAttributes<any>, "type" | "onClick">>, "type"> & {
|
|
12
|
+
type?: string | undefined;
|
|
13
|
+
mode?: string | undefined;
|
|
14
|
+
color?: string | undefined;
|
|
15
|
+
groupVariant?: string | undefined;
|
|
16
|
+
justifyContent?: string | undefined;
|
|
17
|
+
loading?: boolean | {
|
|
18
|
+
delay?: number | undefined;
|
|
19
|
+
} | undefined;
|
|
20
|
+
onClick?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
21
|
+
iconColor?: string | undefined;
|
|
22
|
+
error?: boolean | undefined;
|
|
23
|
+
activated?: boolean | undefined;
|
|
24
|
+
readOnly?: boolean | undefined;
|
|
25
|
+
}, never>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ThemeProps } from '@synerise/ds-core';
|
|
3
|
-
export
|
|
3
|
+
export type SelectionHintProps = {
|
|
4
4
|
message: React.ReactNode | string;
|
|
5
5
|
} & ThemeProps;
|
|
6
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<{
|
|
7
|
+
message: React.ReactNode;
|
|
8
|
+
} & {
|
|
7
9
|
theme?: any;
|
|
8
10
|
}>;
|
|
9
11
|
export default _default;
|
|
@@ -4,11 +4,9 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
7
|
-
import * as React from 'react'; //
|
|
8
|
-
// @ts-ignore
|
|
7
|
+
import * as React from 'react'; // @ts-ignore
|
|
9
8
|
|
|
10
|
-
import dayjs from 'dayjs'; //
|
|
11
|
-
// @ts-ignore
|
|
9
|
+
import dayjs from 'dayjs'; // @ts-ignore
|
|
12
10
|
|
|
13
11
|
import customParseFormatPlugin from 'dayjs/plugin/customParseFormat';
|
|
14
12
|
import Button from '@synerise/ds-button';
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { WrappedComponentProps } from 'react-intl';
|
|
3
3
|
import { GridTexts } from '../Grid/Grid.types';
|
|
4
4
|
import { DayKey } from '../TimeWindow.types';
|
|
5
|
-
export
|
|
5
|
+
export type DayProps = {
|
|
6
6
|
dayKey: DayKey;
|
|
7
7
|
label: React.ReactNode | ((hovered: boolean) => React.ReactNode);
|
|
8
8
|
restricted: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IntlShape } from 'react-intl';
|
|
3
3
|
import { DayKey, Days } from '../TimeWindow.types';
|
|
4
|
-
export
|
|
4
|
+
export type GridProps = {
|
|
5
5
|
keys: number[];
|
|
6
6
|
days: Days;
|
|
7
7
|
showSelectAll: boolean;
|
|
@@ -21,6 +21,6 @@ export declare type GridProps = {
|
|
|
21
21
|
renderDay: (day: DayKey) => React.ReactNode;
|
|
22
22
|
texts?: GridTexts;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export type GridTexts = {
|
|
25
25
|
clear?: string | React.ReactNode;
|
|
26
26
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type Action = {
|
|
3
3
|
label: JSX.Element;
|
|
4
4
|
key: string;
|
|
5
5
|
onClick: () => void;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type HeaderProps = {
|
|
8
8
|
title: string | React.ReactNode;
|
|
9
9
|
actions?: Action[];
|
|
10
10
|
suffix?: React.ReactNode;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { RangeActions } from '../TimeWindow.types';
|
|
3
|
-
export
|
|
3
|
+
export type RangeActionsProps = {
|
|
4
4
|
texts: ActionsTexts;
|
|
5
5
|
} & Partial<RangeActions>;
|
|
6
|
-
export
|
|
6
|
+
export type ActionsTexts = {
|
|
7
7
|
copyRange: string | React.ReactNode;
|
|
8
8
|
clearRange: string | React.ReactNode;
|
|
9
9
|
pasteRange: string | React.ReactNode;
|
package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { WithTranslations } from '../../../../../DateRangePicker.types';
|
|
3
3
|
import { RangeFormContainerProps } from '../RangeFormContainer.types';
|
|
4
4
|
import { WithDisabledProp } from '../../../../RangeFilter.types';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
5
|
+
export type DateLimitMode = 'Hour' | 'Range';
|
|
6
|
+
export type RangeDisplayMode = 'timepicker' | 'slider';
|
|
7
|
+
export type RangeFormProps = {
|
|
8
8
|
mode: DateLimitMode;
|
|
9
9
|
onModeChange: (mode: DateLimitMode) => void;
|
|
10
10
|
title?: React.ReactNode;
|
|
@@ -18,7 +18,7 @@ export declare type RangeFormProps = {
|
|
|
18
18
|
rangeDisplayMode?: RangeDisplayMode;
|
|
19
19
|
isInvertedRange?: boolean;
|
|
20
20
|
} & WithTranslations & WithDisabledProp & Pick<RangeFormContainerProps, 'timePickerProps' | 'valueFormatOptions'>;
|
|
21
|
-
export
|
|
21
|
+
export type RangeFormTexts = {
|
|
22
22
|
range: React.ReactNode | string;
|
|
23
23
|
hour: React.ReactNode | string;
|
|
24
24
|
};
|
package/dist/RangeFilter/Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const numberToDate: (number: number, max: number, isRangeStart?: boolean
|
|
1
|
+
export declare const numberToDate: (number: number, max: number, isRangeStart?: boolean) => Date;
|
|
2
2
|
export declare const dateToNumber: (date: Date) => number;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { RangeFormContainerProps } from './RangeFormContainer.types';
|
|
3
2
|
declare const RangeFormContainer: ({ activeDays, disabled, days, dayKeys, getDayValue, getDayLabel, onDayTimeChange, onMultipleDayTimeChange, hideHeader, headerOptions, monthlyFilter, monthlyFilterPeriod, onRangeClear, onRangePaste, onRangeCopy, onRangeDelete, texts, onChange, valueSelectionModes, rangeDisplayMode, onModeChange, timePickerProps, renderSuffix, timeFormat, valueFormatOptions, }: RangeFormContainerProps) => JSX.Element;
|
|
4
3
|
export default RangeFormContainer;
|
|
@@ -4,8 +4,8 @@ import type { DateToFormatOptions } from '@synerise/ds-data-format';
|
|
|
4
4
|
import { DayKey, RangeActions, TimeWindowProps, TimeWindowTexts } from '../TimeWindow.types';
|
|
5
5
|
import { FilterDefinition, WithDisabledProp } from '../../../RangeFilter.types';
|
|
6
6
|
import { DateLimitMode, RangeDisplayMode } from './RangeForm/RangeForm.types';
|
|
7
|
-
export
|
|
8
|
-
export
|
|
7
|
+
export type DateValue = [Date | undefined, Date | undefined, boolean | undefined];
|
|
8
|
+
export type RangeFormContainerProps = {
|
|
9
9
|
activeDays: DayKey[];
|
|
10
10
|
dayKeys: DayKey | DayKey[];
|
|
11
11
|
getDayLabel: (dayKey: DayKey, long?: boolean) => string | object | React.ReactNode;
|