@synerise/ds-date-range-picker 0.26.13 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.27.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.26.13...@synerise/ds-date-range-picker@0.27.0) (2024-03-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **input:** support autoresize to stretch to parent ([329c866](https://github.com/Synerise/synerise-design/commit/329c866cb54921ad1260ae217cb8c471e43b986e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [0.26.13](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.26.12...@synerise/ds-date-range-picker@0.26.13) (2024-03-04)
|
|
7
18
|
|
|
8
19
|
|
package/dist/Footer/Footer.d.ts
CHANGED
|
@@ -1,8 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<{
|
|
3
|
+
mode: string;
|
|
4
|
+
dateOnly?: boolean | undefined;
|
|
5
|
+
value?: import("../date.types").DateRange | undefined;
|
|
6
|
+
canApply?: boolean | undefined;
|
|
7
|
+
canSwitchMode?: boolean | undefined;
|
|
8
|
+
onApply?: ((date?: Date | import("../date.types").DateRange | undefined) => void) | undefined;
|
|
9
|
+
onSwitchMode?: (() => void) | undefined;
|
|
10
|
+
message?: React.ReactNode;
|
|
11
|
+
texts: import("../DateRangePicker.types").Texts;
|
|
12
|
+
format?: string | undefined;
|
|
13
|
+
valueFormatOptions?: import("@synerise/ds-data-format").DateToFormatOptions | undefined;
|
|
14
|
+
showTime?: boolean | undefined;
|
|
15
|
+
displayDateContainerClass?: string | undefined;
|
|
16
|
+
} & import("react-intl").WrappedComponentProps<"intl">, "intl"> & {
|
|
4
17
|
forwardedRef?: React.Ref<any> | undefined;
|
|
5
18
|
} & React.RefAttributes<any>> & {
|
|
6
|
-
WrappedComponent: React.ComponentType<
|
|
19
|
+
WrappedComponent: React.ComponentType<{
|
|
20
|
+
mode: string;
|
|
21
|
+
dateOnly?: boolean | undefined;
|
|
22
|
+
value?: import("../date.types").DateRange | undefined;
|
|
23
|
+
canApply?: boolean | undefined;
|
|
24
|
+
canSwitchMode?: boolean | undefined;
|
|
25
|
+
onApply?: ((date?: Date | import("../date.types").DateRange | undefined) => void) | undefined;
|
|
26
|
+
onSwitchMode?: (() => void) | undefined;
|
|
27
|
+
message?: React.ReactNode;
|
|
28
|
+
texts: import("../DateRangePicker.types").Texts;
|
|
29
|
+
format?: string | undefined;
|
|
30
|
+
valueFormatOptions?: import("@synerise/ds-data-format").DateToFormatOptions | undefined;
|
|
31
|
+
showTime?: boolean | undefined;
|
|
32
|
+
displayDateContainerClass?: string | undefined;
|
|
33
|
+
} & import("react-intl").WrappedComponentProps<"intl">>;
|
|
7
34
|
};
|
|
8
35
|
export default _default;
|
package/dist/Footer/Footer.js
CHANGED
|
@@ -10,7 +10,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
10
10
|
|
|
11
11
|
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; }
|
|
12
12
|
|
|
13
|
-
import
|
|
13
|
+
import React, { useMemo, useCallback } from 'react';
|
|
14
14
|
import { injectIntl } from 'react-intl';
|
|
15
15
|
import Button from '@synerise/ds-button';
|
|
16
16
|
import Tooltip from '@synerise/ds-tooltip';
|
|
@@ -21,7 +21,7 @@ import fnsFormat from '../dateUtils/format';
|
|
|
21
21
|
import getDateFromString from '../dateUtils/getDateFromString';
|
|
22
22
|
import * as CONST from '../constants';
|
|
23
23
|
import { isLifetime } from '../RelativeRangePicker/Elements/RangeDropdown/RangeDropdown';
|
|
24
|
-
import { toIsoStringWithoutZone } from
|
|
24
|
+
import { toIsoStringWithoutZone } from '../utils';
|
|
25
25
|
|
|
26
26
|
var Footer = function Footer(_ref) {
|
|
27
27
|
var canApply = _ref.canApply,
|
|
@@ -45,7 +45,7 @@ var Footer = function Footer(_ref) {
|
|
|
45
45
|
formatValue = _useDataFormat.formatValue;
|
|
46
46
|
|
|
47
47
|
var footerFormat = format || (showTime ? 'MMM D, YYYY, HH:mm' : 'MMM D, YYYY');
|
|
48
|
-
var footerDateToString =
|
|
48
|
+
var footerDateToString = useCallback(function (date) {
|
|
49
49
|
if (format || typeof date === 'string') {
|
|
50
50
|
return fnsFormat(getDateFromString(date), footerFormat, intl.locale);
|
|
51
51
|
}
|
|
@@ -53,7 +53,7 @@ var Footer = function Footer(_ref) {
|
|
|
53
53
|
var parseDate = new Date(toIsoStringWithoutZone(date));
|
|
54
54
|
return formatValue(parseDate, _objectSpread({}, getDefaultDataTimeOptions(showTime), {}, valueFormatOptions));
|
|
55
55
|
}, [footerFormat, format, formatValue, intl.locale, valueFormatOptions, showTime]);
|
|
56
|
-
var ChosenRange =
|
|
56
|
+
var ChosenRange = useMemo(function () {
|
|
57
57
|
if ((value == null ? void 0 : value.key) === CONST.ALL_TIME || value && isLifetime(value)) {
|
|
58
58
|
var _texts$value$translat;
|
|
59
59
|
|
|
@@ -8,7 +8,7 @@ export var Container = styled.div.withConfig({
|
|
|
8
8
|
export var ClearIconWrapper = styled.div.withConfig({
|
|
9
9
|
displayName: "RangePickerInputstyles__ClearIconWrapper",
|
|
10
10
|
componentId: "sc-1b9h1ef-1"
|
|
11
|
-
})(["
|
|
11
|
+
})(["margin-left:3px;.ds-icon > svg{fill:", ";}&:hover{.ds-icon > svg{fill:", ";}}"], function (props) {
|
|
12
12
|
return props.theme.palette['red-600'];
|
|
13
13
|
}, function (props) {
|
|
14
14
|
return props.theme.palette['red-600'];
|
|
@@ -16,7 +16,7 @@ export var ClearIconWrapper = styled.div.withConfig({
|
|
|
16
16
|
export var DefaultIconWrapper = styled.div.withConfig({
|
|
17
17
|
displayName: "RangePickerInputstyles__DefaultIconWrapper",
|
|
18
18
|
componentId: "sc-1b9h1ef-2"
|
|
19
|
-
})(["
|
|
19
|
+
})(["margin-left:3px;&&:hover{.ds-icon > svg{fill:", ";}}"], function (props) {
|
|
20
20
|
return props.theme.palette['grey-600'];
|
|
21
21
|
});
|
|
22
22
|
|
|
@@ -10,6 +10,7 @@ import Button from '@synerise/ds-button';
|
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import Menu from '@synerise/ds-menu';
|
|
12
12
|
import { InputGroup } from '@synerise/ds-input';
|
|
13
|
+
import { InputGroupItem } from '@synerise/ds-input/dist/InputGroup.styles';
|
|
13
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
|
|
14
15
|
export var Container = styled.div.withConfig({
|
|
15
16
|
displayName: "RelativeRangePickerstyles__Container",
|
|
@@ -40,7 +41,7 @@ export var CustomForm = styled.div.withConfig({
|
|
|
40
41
|
export var InputSelectGroup = styled(InputGroup).withConfig({
|
|
41
42
|
displayName: "RelativeRangePickerstyles__InputSelectGroup",
|
|
42
43
|
componentId: "sc-17ul7sp-6"
|
|
43
|
-
})(["&&,.ant-input-group.ant-input-group-compact&&{display:flex;align-items:center;.ant-input-number{display:flex;flex:1;}.ds-select-wrapper{width:122px;}height:32px;}"]);
|
|
44
|
+
})(["&&,.ant-input-group.ant-input-group-compact&&{display:flex;align-items:center;.ant-input-number{display:flex;flex:1;}.ds-select-wrapper{width:122px;}height:32px;", "{min-width:unset;}}"], InputGroupItem);
|
|
44
45
|
export var ModeDropdownTrigger = styled(function (_ref) {
|
|
45
46
|
var children = _ref.children,
|
|
46
47
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-date-range-picker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
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.6.
|
|
38
|
-
"@synerise/ds-button": "^0.19.
|
|
39
|
-
"@synerise/ds-button-group": "^0.6.
|
|
37
|
+
"@synerise/ds-badge": "^0.6.52",
|
|
38
|
+
"@synerise/ds-button": "^0.19.3",
|
|
39
|
+
"@synerise/ds-button-group": "^0.6.43",
|
|
40
40
|
"@synerise/ds-data-format": "^0.4.8",
|
|
41
|
-
"@synerise/ds-date-picker": "^0.10.
|
|
42
|
-
"@synerise/ds-dropdown": "^0.17.
|
|
43
|
-
"@synerise/ds-icon": "^0.60.
|
|
44
|
-
"@synerise/ds-inline-edit": "^0.6.
|
|
45
|
-
"@synerise/ds-input": "^0.
|
|
46
|
-
"@synerise/ds-input-number": "^0.9.
|
|
47
|
-
"@synerise/ds-manageable-list": "^0.26.
|
|
48
|
-
"@synerise/ds-menu": "^0.18.
|
|
49
|
-
"@synerise/ds-scrollbar": "^0.8.
|
|
50
|
-
"@synerise/ds-select": "^0.15.
|
|
51
|
-
"@synerise/ds-slider": "^0.13.
|
|
52
|
-
"@synerise/ds-tags": "^0.8.
|
|
53
|
-
"@synerise/ds-time-picker": "^0.9.
|
|
54
|
-
"@synerise/ds-tooltip": "^0.14.
|
|
55
|
-
"@synerise/ds-utils": "^0.
|
|
41
|
+
"@synerise/ds-date-picker": "^0.10.38",
|
|
42
|
+
"@synerise/ds-dropdown": "^0.17.99",
|
|
43
|
+
"@synerise/ds-icon": "^0.60.3",
|
|
44
|
+
"@synerise/ds-inline-edit": "^0.6.99",
|
|
45
|
+
"@synerise/ds-input": "^0.20.0",
|
|
46
|
+
"@synerise/ds-input-number": "^0.9.7",
|
|
47
|
+
"@synerise/ds-manageable-list": "^0.26.30",
|
|
48
|
+
"@synerise/ds-menu": "^0.18.15",
|
|
49
|
+
"@synerise/ds-scrollbar": "^0.8.3",
|
|
50
|
+
"@synerise/ds-select": "^0.15.38",
|
|
51
|
+
"@synerise/ds-slider": "^0.13.17",
|
|
52
|
+
"@synerise/ds-tags": "^0.8.33",
|
|
53
|
+
"@synerise/ds-time-picker": "^0.9.17",
|
|
54
|
+
"@synerise/ds-tooltip": "^0.14.20",
|
|
55
|
+
"@synerise/ds-utils": "^0.25.0",
|
|
56
56
|
"date-fns": "^2.16.1",
|
|
57
57
|
"date-fns-tz": "1.1.4",
|
|
58
58
|
"dayjs": "^1.8.35",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"@testing-library/user-event": "^10.3.1",
|
|
75
75
|
"@types/ramda": "^0.28.23"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "6b8da853a2bb4e993d89e9b0b3041216f0c9c976"
|
|
78
78
|
}
|