@synerise/ds-date-range-picker 0.28.8 → 0.29.1
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 +22 -0
- package/dist/Footer/Footer.d.ts +6 -6
- package/dist/RangeFilter/Filters/MonthlyFilter/MonthlyFilter.styles.d.ts +1 -1
- package/dist/RangeFilter/Shared/FilterDropdown/FilterDropdown.styles.d.ts +2 -5
- package/dist/RangeFilter/Shared/FilterDropdown/FilterDropdown.styles.js +3 -3
- package/dist/RangeFilter/Shared/RangeFilterStatus/RangeFilterStatus.styles.d.ts +48 -48
- package/dist/RangeFilter/Shared/TimeWindow/RangeActions/RangeActions.styles.d.ts +2 -5
- package/dist/RangeFilter/Shared/TimeWindow/RangeActions/RangeActions.styles.js +3 -3
- package/dist/RelativeRangePicker/Elements/ModeDropdown/ModeDropdown.js +2 -5
- package/dist/RelativeRangePicker/Elements/RangeDropdown/RangeDropdown.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/RangeDropdown/RangeDropdown.js +8 -10
- package/dist/RelativeRangePicker/Elements/TimestampRange/TimestampRange.d.ts +1 -1
- package/dist/RelativeRangePicker/Elements/TimestampRange/TimestampRange.js +10 -5
- package/dist/RelativeRangePicker/RelativeRangePicker.styles.d.ts +3 -4
- package/dist/RelativeRangePicker/RelativeRangePicker.styles.js +5 -5
- package/dist/RelativeRangePicker/utils/findRangeByKey.utils.d.ts +2 -0
- package/dist/RelativeRangePicker/utils/findRangeByKey.utils.js +5 -0
- package/dist/RelativeRangePicker/utils/index.d.ts +1 -0
- package/dist/RelativeRangePicker/utils/index.js +2 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -1
- package/package.json +22 -28
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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.29.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.29.0...@synerise/ds-date-range-picker@0.29.1) (2024-07-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **date-picker:** fixes of types ([1b09748](https://github.com/Synerise/synerise-design/commit/1b097484782a5dc37e71711d7308511eb8103a45))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [0.29.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.28.8...@synerise/ds-date-range-picker@0.29.0) (2024-07-02)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **date-range-picker:** swapped Menu.Item and ListItem ([38c5996](https://github.com/Synerise/synerise-design/commit/38c5996b4f0a4539a96e467b1133905dd325a160))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [0.28.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.28.7...@synerise/ds-date-range-picker@0.28.8) (2024-06-27)
|
|
7
29
|
|
|
8
30
|
|
package/dist/Footer/Footer.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import React from 'react';
|
|
|
2
2
|
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<{
|
|
3
3
|
mode: string;
|
|
4
4
|
dateOnly?: boolean | undefined;
|
|
5
|
-
value?: import("
|
|
5
|
+
value?: import("..").DateRange | undefined;
|
|
6
6
|
canApply?: boolean | undefined;
|
|
7
7
|
canSwitchMode?: boolean | undefined;
|
|
8
|
-
onApply?: ((date?: Date | import("
|
|
8
|
+
onApply?: ((date?: Date | import("..").DateRange | undefined) => void) | undefined;
|
|
9
9
|
onSwitchMode?: (() => void) | undefined;
|
|
10
10
|
message?: React.ReactNode;
|
|
11
|
-
texts: import("
|
|
11
|
+
texts: import("..").DateRangePickerTexts;
|
|
12
12
|
format?: string | undefined;
|
|
13
13
|
valueFormatOptions?: import("@synerise/ds-data-format").DateToFormatOptions | undefined;
|
|
14
14
|
showTime?: boolean | undefined;
|
|
@@ -19,13 +19,13 @@ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omi
|
|
|
19
19
|
WrappedComponent: React.ComponentType<{
|
|
20
20
|
mode: string;
|
|
21
21
|
dateOnly?: boolean | undefined;
|
|
22
|
-
value?: import("
|
|
22
|
+
value?: import("..").DateRange | undefined;
|
|
23
23
|
canApply?: boolean | undefined;
|
|
24
24
|
canSwitchMode?: boolean | undefined;
|
|
25
|
-
onApply?: ((date?: Date | import("
|
|
25
|
+
onApply?: ((date?: Date | import("..").DateRange | undefined) => void) | undefined;
|
|
26
26
|
onSwitchMode?: (() => void) | undefined;
|
|
27
27
|
message?: React.ReactNode;
|
|
28
|
-
texts: import("
|
|
28
|
+
texts: import("..").DateRangePickerTexts;
|
|
29
29
|
format?: string | undefined;
|
|
30
30
|
valueFormatOptions?: import("@synerise/ds-data-format").DateToFormatOptions | undefined;
|
|
31
31
|
showTime?: boolean | undefined;
|
|
@@ -8,5 +8,5 @@ export declare const DropdownHeader: import("styled-components").StyledComponent
|
|
|
8
8
|
export declare const DropdownDeleteBtn: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
9
|
export declare const AddContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
10
|
export declare const AddButton: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
-
export declare const Select: import("styled-components").StyledComponent<({ className, style, expanded, dropdownProps, dropdownOverlayStyle, inputStyle, size, disabled, autoFocus, hideIcon, error, input, placeholder, dataSource, initialValue, }: InlineSelectProps) => import("react").JSX.Element, any, InlineSelectProps
|
|
11
|
+
export declare const Select: import("styled-components").StyledComponent<({ className, style, expanded, dropdownProps, dropdownOverlayStyle, inputStyle, size, disabled, autoFocus, hideIcon, error, input, placeholder, dataSource, initialValue, onValueChange, }: InlineSelectProps<import("@synerise/ds-list-item").ListItemProps>) => import("react").JSX.Element, any, InlineSelectProps<import("@synerise/ds-list-item").ListItemProps>, never>;
|
|
12
12
|
export declare const PeriodMode: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { MenuItemProps } from '@synerise/ds-menu/dist/Elements/Item/MenuItem.types';
|
|
5
|
-
export declare const DropdownMenu: import("styled-components").StyledComponent<typeof Menu, any, AntdMenuProps, never>;
|
|
6
|
-
export declare const DropdownMenuItem: import("styled-components").StyledComponent<import("react").FC<import("@synerise/ds-menu/dist/Elements/SubMenu/SubMenu.types").SubMenuProps & MenuItemProps>, any, MenuItemProps, never>;
|
|
2
|
+
export declare const DropdownMenu: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const DropdownMenuItem: import("styled-components").StyledComponent<(props: import("@synerise/ds-list-item").ListItemProps) => import("react").JSX.Element, any, {}, never>;
|
|
7
4
|
export declare const RemoveIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Menu from '@synerise/ds-menu';
|
|
2
1
|
import styled from 'styled-components';
|
|
3
|
-
|
|
2
|
+
import ListItem from '@synerise/ds-list-item';
|
|
3
|
+
export var DropdownMenu = styled.div.withConfig({
|
|
4
4
|
displayName: "FilterDropdownstyles__DropdownMenu",
|
|
5
5
|
componentId: "lh8m5i-0"
|
|
6
6
|
})(["padding:8px;"]);
|
|
7
|
-
export var DropdownMenuItem = styled(
|
|
7
|
+
export var DropdownMenuItem = styled(ListItem).withConfig({
|
|
8
8
|
displayName: "FilterDropdownstyles__DropdownMenuItem",
|
|
9
9
|
componentId: "lh8m5i-1"
|
|
10
10
|
})(["max-height:32px;min-width:200px;"]);
|
|
@@ -51,54 +51,54 @@ export declare const ContentItem: import("styled-components").StyledComponent<im
|
|
|
51
51
|
unselectable?: "on" | "off" | undefined;
|
|
52
52
|
inputMode?: "text" | "search" | "email" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined;
|
|
53
53
|
is?: string | undefined;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
54
|
+
"aria-activedescendant"?: string | undefined;
|
|
55
|
+
"aria-atomic"?: boolean | "true" | "false" | undefined;
|
|
56
|
+
"aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
|
|
57
|
+
"aria-busy"?: boolean | "true" | "false" | undefined;
|
|
58
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
59
|
+
"aria-colcount"?: number | undefined;
|
|
60
|
+
"aria-colindex"?: number | undefined;
|
|
61
|
+
"aria-colspan"?: number | undefined;
|
|
62
|
+
"aria-controls"?: string | undefined;
|
|
63
|
+
"aria-current"?: boolean | "time" | "date" | "true" | "false" | "page" | "step" | "location" | undefined;
|
|
64
|
+
"aria-describedby"?: string | undefined;
|
|
65
|
+
"aria-details"?: string | undefined;
|
|
66
|
+
"aria-disabled"?: boolean | "true" | "false" | undefined;
|
|
67
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
68
|
+
"aria-errormessage"?: string | undefined;
|
|
69
|
+
"aria-expanded"?: boolean | "true" | "false" | undefined;
|
|
70
|
+
"aria-flowto"?: string | undefined;
|
|
71
|
+
"aria-grabbed"?: boolean | "true" | "false" | undefined;
|
|
72
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false" | undefined;
|
|
73
|
+
"aria-hidden"?: boolean | "true" | "false" | undefined;
|
|
74
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
75
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
76
|
+
"aria-label"?: string | undefined;
|
|
77
|
+
"aria-labelledby"?: string | undefined;
|
|
78
|
+
"aria-level"?: number | undefined;
|
|
79
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
80
|
+
"aria-modal"?: boolean | "true" | "false" | undefined;
|
|
81
|
+
"aria-multiline"?: boolean | "true" | "false" | undefined;
|
|
82
|
+
"aria-multiselectable"?: boolean | "true" | "false" | undefined;
|
|
83
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
84
|
+
"aria-owns"?: string | undefined;
|
|
85
|
+
"aria-placeholder"?: string | undefined;
|
|
86
|
+
"aria-posinset"?: number | undefined;
|
|
87
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
88
|
+
"aria-readonly"?: boolean | "true" | "false" | undefined;
|
|
89
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
90
|
+
"aria-required"?: boolean | "true" | "false" | undefined;
|
|
91
|
+
"aria-roledescription"?: string | undefined;
|
|
92
|
+
"aria-rowcount"?: number | undefined;
|
|
93
|
+
"aria-rowindex"?: number | undefined;
|
|
94
|
+
"aria-rowspan"?: number | undefined;
|
|
95
|
+
"aria-selected"?: boolean | "true" | "false" | undefined;
|
|
96
|
+
"aria-setsize"?: number | undefined;
|
|
97
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
98
|
+
"aria-valuemax"?: number | undefined;
|
|
99
|
+
"aria-valuemin"?: number | undefined;
|
|
100
|
+
"aria-valuenow"?: number | undefined;
|
|
101
|
+
"aria-valuetext"?: string | undefined;
|
|
102
102
|
children?: import("react").ReactNode;
|
|
103
103
|
dangerouslySetInnerHTML?: {
|
|
104
104
|
__html: string | TrustedHTML;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { MenuItemProps } from '@synerise/ds-menu/dist/Elements/Item/MenuItem.types';
|
|
5
|
-
export declare const ActionsMenu: import("styled-components").StyledComponent<typeof Menu, any, AntdMenuProps, never>;
|
|
6
|
-
export declare const ActionItem: import("styled-components").StyledComponent<import("react").FC<import("@synerise/ds-menu/dist/Elements/SubMenu/SubMenu.types").SubMenuProps & MenuItemProps>, any, MenuItemProps, never>;
|
|
2
|
+
export declare const ActionsMenu: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const ActionItem: import("styled-components").StyledComponent<(props: import("@synerise/ds-list-item").ListItemProps) => import("react").JSX.Element, any, {}, never>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ListItem from '@synerise/ds-list-item';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
export var ActionsMenu = styled
|
|
3
|
+
export var ActionsMenu = styled.div.withConfig({
|
|
4
4
|
displayName: "RangeActionsstyles__ActionsMenu",
|
|
5
5
|
componentId: "sc-59f159-0"
|
|
6
6
|
})(["padding:8px;"]);
|
|
7
|
-
export var ActionItem = styled(
|
|
7
|
+
export var ActionItem = styled(ListItem).withConfig({
|
|
8
8
|
displayName: "RangeActionsstyles__ActionItem",
|
|
9
9
|
componentId: "sc-59f159-1"
|
|
10
10
|
})(["max-height:32px;"]);
|
|
@@ -11,8 +11,7 @@ var MODE_TRANSLATION_KEYS = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
var ModeDrop = function ModeDrop(_ref) {
|
|
14
|
-
var
|
|
15
|
-
currentGroup = _ref.currentGroup,
|
|
14
|
+
var currentGroup = _ref.currentGroup,
|
|
16
15
|
onModeChange = _ref.onModeChange,
|
|
17
16
|
modes = _ref.modes,
|
|
18
17
|
texts = _ref.texts;
|
|
@@ -33,9 +32,7 @@ var ModeDrop = function ModeDrop(_ref) {
|
|
|
33
32
|
visible: dropVisible,
|
|
34
33
|
ref: overlayRef,
|
|
35
34
|
width: 180
|
|
36
|
-
}, /*#__PURE__*/React.createElement(S.DropMenu, {
|
|
37
|
-
selectedKeys: currentRange ? [currentRange.key] : []
|
|
38
|
-
}, modes.map(function (mode) {
|
|
35
|
+
}, /*#__PURE__*/React.createElement(S.DropMenu, null, modes.map(function (mode) {
|
|
39
36
|
return /*#__PURE__*/React.createElement(S.DropMenuItem, {
|
|
40
37
|
key: mode,
|
|
41
38
|
onClick: function onClick() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import find from 'ramda/src/find';
|
|
3
3
|
import { isEqual } from 'lodash';
|
|
4
4
|
import Icon, { AngleDownS, CheckS } from '@synerise/ds-icon';
|
|
@@ -7,6 +7,7 @@ import Scrollbar from '@synerise/ds-scrollbar';
|
|
|
7
7
|
import { theme } from '@synerise/ds-core';
|
|
8
8
|
import * as S from '../../RelativeRangePicker.styles';
|
|
9
9
|
import { ALL_TIME } from '../../../constants';
|
|
10
|
+
import { findRangeByKey } from '../../utils';
|
|
10
11
|
var MAX_ITEMS_COUNT = 7;
|
|
11
12
|
var ITEMS_HEIGHT = 32;
|
|
12
13
|
var DROPDOWN_WIDTH = 160;
|
|
@@ -53,11 +54,9 @@ var RangeDropdown = function RangeDropdown(_ref) {
|
|
|
53
54
|
useOnClickOutside(dropdownRef, function () {
|
|
54
55
|
setDropVisible(false);
|
|
55
56
|
});
|
|
56
|
-
var onMenuItemClick = React.useCallback(function (
|
|
57
|
-
var
|
|
58
|
-
onChange(
|
|
59
|
-
return range.key === key;
|
|
60
|
-
}, ranges));
|
|
57
|
+
var onMenuItemClick = React.useCallback(function (itemData) {
|
|
58
|
+
var range = findRangeByKey(ranges, itemData.key);
|
|
59
|
+
onChange(range);
|
|
61
60
|
setDropVisible(false);
|
|
62
61
|
}, [onChange, ranges]);
|
|
63
62
|
if (!ranges || ranges.length === 0) return null;
|
|
@@ -79,13 +78,12 @@ var RangeDropdown = function RangeDropdown(_ref) {
|
|
|
79
78
|
width: DROPDOWN_WIDTH - DROPDOWN_PADDING
|
|
80
79
|
},
|
|
81
80
|
absolute: true
|
|
82
|
-
}, /*#__PURE__*/React.createElement(S.DropMenu, {
|
|
83
|
-
onClick: onMenuItemClick,
|
|
84
|
-
selectedKeys: []
|
|
85
|
-
}, ranges.map(function (range) {
|
|
81
|
+
}, /*#__PURE__*/React.createElement(S.DropMenu, null, ranges.map(function (range) {
|
|
86
82
|
var selected = (currentRange == null ? void 0 : currentRange.key) === range.key || isLifetime(currentRange) && range.key === ALL_TIME;
|
|
87
83
|
return /*#__PURE__*/React.createElement(S.DropMenuItem, {
|
|
84
|
+
onClick: onMenuItemClick,
|
|
88
85
|
key: range.key || range.id,
|
|
86
|
+
itemKey: range.key || range.id,
|
|
89
87
|
suffixel: selected && /*#__PURE__*/React.createElement(Icon, {
|
|
90
88
|
component: /*#__PURE__*/React.createElement(CheckS, null),
|
|
91
89
|
color: theme.palette['green-600']
|
|
@@ -5,8 +5,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
7
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
8
|
-
import
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { useIntl } from 'react-intl';
|
|
9
10
|
import DatePicker from '@synerise/ds-date-picker/dist/DatePicker';
|
|
11
|
+
import { getDefaultTexts } from '@synerise/ds-date-picker/dist/utils/getDefaultTexts';
|
|
10
12
|
import * as S from '../../RelativeRangePicker.styles';
|
|
11
13
|
import TimestampDuration from './TimestampDuration/TimestampDuration';
|
|
12
14
|
import { CUSTOM_RANGE_KEY, DURATION_MODIFIERS } from '../../../constants';
|
|
@@ -52,6 +54,8 @@ var TimestampRange = function TimestampRange(_ref) {
|
|
|
52
54
|
error = _React$useState4[0],
|
|
53
55
|
setError = _React$useState4[1];
|
|
54
56
|
|
|
57
|
+
var intl = useIntl();
|
|
58
|
+
var allTexts = getDefaultTexts(intl, texts);
|
|
55
59
|
React.useEffect(function () {
|
|
56
60
|
setError(!timestamp);
|
|
57
61
|
}, [timestamp]);
|
|
@@ -87,6 +91,7 @@ var TimestampRange = function TimestampRange(_ref) {
|
|
|
87
91
|
return /*#__PURE__*/React.createElement(S.DatePickerWrapper, {
|
|
88
92
|
error: error
|
|
89
93
|
}, /*#__PURE__*/React.createElement(DatePicker, {
|
|
94
|
+
intl: intl,
|
|
90
95
|
value: timestamp,
|
|
91
96
|
onValueChange: function onValueChange(value) {
|
|
92
97
|
setError(!value);
|
|
@@ -107,10 +112,10 @@ var TimestampRange = function TimestampRange(_ref) {
|
|
|
107
112
|
disabledHours: [],
|
|
108
113
|
disabledMinutes: [],
|
|
109
114
|
texts: {
|
|
110
|
-
apply:
|
|
111
|
-
now:
|
|
112
|
-
clearTooltip:
|
|
113
|
-
inputPlaceholder:
|
|
115
|
+
apply: allTexts.apply,
|
|
116
|
+
now: allTexts.now,
|
|
117
|
+
clearTooltip: allTexts.clearTooltip,
|
|
118
|
+
inputPlaceholder: allTexts.inputPlaceholder
|
|
114
119
|
},
|
|
115
120
|
showTime: true,
|
|
116
121
|
error: error,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Menu from '@synerise/ds-menu';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import { Props as InputGroupProps } from '@synerise/ds-input/dist/InputGroup.types';
|
|
4
3
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
4
|
export declare const Header: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -14,8 +13,8 @@ export declare const RangeFormColumn: import("styled-components").StyledComponen
|
|
|
14
13
|
export declare const DatePickerWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
15
14
|
error: boolean;
|
|
16
15
|
}, never>;
|
|
17
|
-
export declare const DropMenu: import("styled-components").StyledComponent<
|
|
18
|
-
export declare const DropMenuItem: import("styled-components").StyledComponent<
|
|
16
|
+
export declare const DropMenu: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
+
export declare const DropMenuItem: import("styled-components").StyledComponent<(props: import("@synerise/ds-list-item").ListItemProps) => React.JSX.Element, any, {}, never>;
|
|
19
18
|
export declare const OverlayWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
20
19
|
visible?: boolean | undefined;
|
|
21
20
|
width?: number | undefined;
|
|
@@ -5,10 +5,10 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
5
5
|
|
|
6
6
|
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; }
|
|
7
7
|
|
|
8
|
+
import React from 'react';
|
|
8
9
|
import styled from 'styled-components';
|
|
9
10
|
import Button from '@synerise/ds-button';
|
|
10
|
-
import
|
|
11
|
-
import Menu from '@synerise/ds-menu';
|
|
11
|
+
import ListItem from '@synerise/ds-list-item';
|
|
12
12
|
import { InputGroup } from '@synerise/ds-input';
|
|
13
13
|
import { InputGroupItem } from '@synerise/ds-input/dist/InputGroup.styles';
|
|
14
14
|
// import 'antd/lib/input/style/index.css' // this style might be in imported scopes as we use input; not needed here, but worth to mention this
|
|
@@ -80,11 +80,11 @@ export var DatePickerWrapper = styled.div.withConfig({
|
|
|
80
80
|
displayName: "RelativeRangePickerstyles__DatePickerWrapper",
|
|
81
81
|
componentId: "sc-17ul7sp-10"
|
|
82
82
|
})(["width:224px;"]);
|
|
83
|
-
export var DropMenu = styled
|
|
83
|
+
export var DropMenu = styled.div.withConfig({
|
|
84
84
|
displayName: "RelativeRangePickerstyles__DropMenu",
|
|
85
85
|
componentId: "sc-17ul7sp-11"
|
|
86
86
|
})(["padding:0 8px 0 0;"]);
|
|
87
|
-
export var DropMenuItem = styled(
|
|
87
|
+
export var DropMenuItem = styled(ListItem).withConfig({
|
|
88
88
|
displayName: "RelativeRangePickerstyles__DropMenuItem",
|
|
89
89
|
componentId: "sc-17ul7sp-12"
|
|
90
90
|
})(["max-height:32px;.ds-icon{margin-right:-6px;}"]);
|
|
@@ -94,7 +94,7 @@ export var OverlayWrapper = styled.div.withConfig({
|
|
|
94
94
|
})(["position:absolute;bottom:40px;padding:8px 0 8px 8px;background-color:", ";display:", ";z-index:15;box-shadow:0 4px 12px 0 rgba(35,41,54,0.09);", " &,& > ul{border-radius:3px;}.scrollbar-container > .ps__rail-y > .ps__thumb-y{transform:translateX(1px) !important;}"], function (props) {
|
|
95
95
|
return props.theme.palette.white;
|
|
96
96
|
}, function (props) {
|
|
97
|
-
return props.visible ? '
|
|
97
|
+
return props.visible ? 'block' : 'none';
|
|
98
98
|
}, function (props) {
|
|
99
99
|
return !!props.width && "width:" + props.width + "px;";
|
|
100
100
|
});
|
|
@@ -6,3 +6,4 @@ export { setOffsetValue } from './setOffsetValue.utils';
|
|
|
6
6
|
export { getDefaultCustomRange } from './getDefaultCustomRange.utils';
|
|
7
7
|
export { getCurrentGroupFromProps } from './getCurrentGroupFromProps.utils';
|
|
8
8
|
export { isAbsolute } from './isAbsolute.utils';
|
|
9
|
+
export { findRangeByKey } from './findRangeByKey.utils';
|
|
@@ -5,4 +5,5 @@ export { setDurationValue } from './setDurationValue.utils';
|
|
|
5
5
|
export { setOffsetValue } from './setOffsetValue.utils';
|
|
6
6
|
export { getDefaultCustomRange } from './getDefaultCustomRange.utils';
|
|
7
7
|
export { getCurrentGroupFromProps } from './getCurrentGroupFromProps.utils';
|
|
8
|
-
export { isAbsolute } from './isAbsolute.utils';
|
|
8
|
+
export { isAbsolute } from './isAbsolute.utils';
|
|
9
|
+
export { findRangeByKey } from './findRangeByKey.utils';
|
package/dist/index.d.ts
CHANGED
|
@@ -8,3 +8,6 @@ export { default } from './DateRangePicker';
|
|
|
8
8
|
export { fnsFormat } from './fns';
|
|
9
9
|
export type { WeeklyProps, WeeklyScheduleDayValue, WeeklySchedule, DayOfWeekIndex, } from './RangeFilter/Filters/new/Weekly/Weekly.types';
|
|
10
10
|
export { getDisabledTimeOptions } from './RangePicker/utils';
|
|
11
|
+
export type { AbsoluteDateRange, RelativeDateRange, DateRange, DateRangePreset, RelativeDateRangePreset, AbsoluteDateRangePreset, } from './date.types';
|
|
12
|
+
export type { DateRangePickerProps, Texts as DateRangePickerTexts } from './DateRangePicker.types';
|
|
13
|
+
export { DEFAULT_RANGE_END, DEFAULT_RANGE_START } from './RangeFilter/constants';
|
package/dist/index.js
CHANGED
|
@@ -8,4 +8,5 @@ import * as _CONST from './constants';
|
|
|
8
8
|
export { _CONST as CONST };
|
|
9
9
|
export { default } from './DateRangePicker';
|
|
10
10
|
export { fnsFormat } from './fns';
|
|
11
|
-
export { getDisabledTimeOptions } from './RangePicker/utils';
|
|
11
|
+
export { getDisabledTimeOptions } from './RangePicker/utils';
|
|
12
|
+
export { DEFAULT_RANGE_END, DEFAULT_RANGE_START } from './RangeFilter/constants';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-date-range-picker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.1",
|
|
4
4
|
"description": "Date-Range-Picker UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,25 +34,25 @@
|
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@date-fns/upgrade": "^1.0.3",
|
|
37
|
-
"@synerise/ds-badge": "^0.
|
|
38
|
-
"@synerise/ds-button": "^0.21.
|
|
39
|
-
"@synerise/ds-button-group": "^0.7.
|
|
40
|
-
"@synerise/ds-data-format": "^0.5.
|
|
41
|
-
"@synerise/ds-date-picker": "^0.11.
|
|
42
|
-
"@synerise/ds-dropdown": "^0.18.
|
|
43
|
-
"@synerise/ds-icon": "^0.
|
|
44
|
-
"@synerise/ds-inline-edit": "^0.
|
|
45
|
-
"@synerise/ds-input": "^0.
|
|
46
|
-
"@synerise/ds-input-number": "^0.9.
|
|
47
|
-
"@synerise/ds-
|
|
48
|
-
"@synerise/ds-
|
|
49
|
-
"@synerise/ds-scrollbar": "^0.11.
|
|
50
|
-
"@synerise/ds-select": "^0.16.
|
|
51
|
-
"@synerise/ds-slider": "^0.13.
|
|
52
|
-
"@synerise/ds-tags": "^0.9.
|
|
53
|
-
"@synerise/ds-time-picker": "^0.10.
|
|
54
|
-
"@synerise/ds-tooltip": "^0.14.
|
|
55
|
-
"@synerise/ds-utils": "^0.
|
|
37
|
+
"@synerise/ds-badge": "^0.8.0",
|
|
38
|
+
"@synerise/ds-button": "^0.21.2",
|
|
39
|
+
"@synerise/ds-button-group": "^0.7.4",
|
|
40
|
+
"@synerise/ds-data-format": "^0.5.1",
|
|
41
|
+
"@synerise/ds-date-picker": "^0.11.6",
|
|
42
|
+
"@synerise/ds-dropdown": "^0.18.4",
|
|
43
|
+
"@synerise/ds-icon": "^0.64.0",
|
|
44
|
+
"@synerise/ds-inline-edit": "^0.8.0",
|
|
45
|
+
"@synerise/ds-input": "^0.23.1",
|
|
46
|
+
"@synerise/ds-input-number": "^0.9.23",
|
|
47
|
+
"@synerise/ds-list-item": "^0.4.0",
|
|
48
|
+
"@synerise/ds-manageable-list": "^0.26.59",
|
|
49
|
+
"@synerise/ds-scrollbar": "^0.11.3",
|
|
50
|
+
"@synerise/ds-select": "^0.16.6",
|
|
51
|
+
"@synerise/ds-slider": "^0.13.30",
|
|
52
|
+
"@synerise/ds-tags": "^0.9.4",
|
|
53
|
+
"@synerise/ds-time-picker": "^0.10.14",
|
|
54
|
+
"@synerise/ds-tooltip": "^0.14.32",
|
|
55
|
+
"@synerise/ds-utils": "^0.28.0",
|
|
56
56
|
"date-fns": "^2.16.1",
|
|
57
57
|
"date-fns-tz": "1.1.4",
|
|
58
58
|
"dayjs": "^1.8.35",
|
|
@@ -65,14 +65,8 @@
|
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@synerise/ds-core": "*",
|
|
67
67
|
"antd": "4.7.0",
|
|
68
|
-
"react": ">=16.9.0
|
|
68
|
+
"react": ">=16.9.0 <= 17.0.2",
|
|
69
69
|
"styled-components": "5.0.1"
|
|
70
70
|
},
|
|
71
|
-
"
|
|
72
|
-
"@testing-library/jest-dom": "5.1.1",
|
|
73
|
-
"@testing-library/react": "10.0.1",
|
|
74
|
-
"@testing-library/user-event": "^10.3.1",
|
|
75
|
-
"@types/ramda": "^0.28.23"
|
|
76
|
-
},
|
|
77
|
-
"gitHead": "587eb113074985ae21e4f0c25ec33c3e3e2e072b"
|
|
71
|
+
"gitHead": "6e5e5202d6c6f1c2caf6bfef799009813b437b3d"
|
|
78
72
|
}
|