@commercetools-uikit/date-range-input 13.0.0 → 13.0.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/README.md +0 -10
- package/dist/commercetools-uikit-date-range-input.cjs.dev.js +2 -7
- package/dist/commercetools-uikit-date-range-input.cjs.prod.js +2 -3
- package/dist/commercetools-uikit-date-range-input.esm.js +2 -7
- package/dist/declarations/src/date-range-input.d.ts +26 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -47,7 +47,6 @@ export default Example;
|
|
|
47
47
|
|
|
48
48
|
| Props | Type | Required | Default | Description |
|
|
49
49
|
| ---------------------- | -------------------------------------------------------------------------------------------- | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
50
|
-
| `intl` | `Object`<br/>[See signature.](#signature-intl) | ✅ | | |
|
|
51
50
|
| `horizontalConstraint` | `union`<br/>Possible values:<br/>`, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'` | | | Horizontal size limit of the input field. |
|
|
52
51
|
| `value` | `Array: MomentInput[]` | ✅ | | The selected date range, must either be an empty array or an array of two strings holding dates formatted as "YYYY-MM-DD". |
|
|
53
52
|
| `onChange` | `Function`<br/>[See signature.](#signature-onChange) | ✅ | | Called when the date range changes. Called with an event containing either an empty array (no value) or an array holding two string in this format: "YYYY-MM-DD".
<br />
Signature: `(event) => void` |
|
|
@@ -64,15 +63,6 @@ export default Example;
|
|
|
64
63
|
|
|
65
64
|
## Signatures
|
|
66
65
|
|
|
67
|
-
### Signature `intl`
|
|
68
|
-
|
|
69
|
-
```ts
|
|
70
|
-
{
|
|
71
|
-
locale: string;
|
|
72
|
-
formatMessage: (message: MessageDescriptor) => void;
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
66
|
### Signature `onChange`
|
|
77
67
|
|
|
78
68
|
```ts
|
|
@@ -509,8 +509,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
|
|
|
509
509
|
}]);
|
|
510
510
|
|
|
511
511
|
return DateRangeCalendar;
|
|
512
|
-
}(react.Component);
|
|
513
|
-
|
|
512
|
+
}(react.Component);
|
|
514
513
|
|
|
515
514
|
DateRangeCalendar.displayName = 'DateRangeCalendar';
|
|
516
515
|
DateRangeCalendar.defaultProps = {
|
|
@@ -522,10 +521,6 @@ DateRangeCalendar.isEmpty = function (range) {
|
|
|
522
521
|
};
|
|
523
522
|
|
|
524
523
|
DateRangeCalendar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
525
|
-
intl: _pt__default["default"].shape({
|
|
526
|
-
locale: _pt__default["default"].string.isRequired,
|
|
527
|
-
formatMessage: _pt__default["default"].func.isRequired
|
|
528
|
-
}).isRequired,
|
|
529
524
|
horizontalConstraint: _pt__default["default"].oneOf([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
|
|
530
525
|
value: _pt__default["default"].arrayOf(_pt__default["default"].any).isRequired,
|
|
531
526
|
onChange: _pt__default["default"].func.isRequired,
|
|
@@ -543,7 +538,7 @@ DateRangeCalendar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
543
538
|
var dateRangeInput = reactIntl.injectIntl(DateRangeCalendar);
|
|
544
539
|
|
|
545
540
|
// NOTE: This string will be replaced on build time with the package version.
|
|
546
|
-
var version = "13.0.
|
|
541
|
+
var version = "13.0.1";
|
|
547
542
|
|
|
548
543
|
exports["default"] = dateRangeInput;
|
|
549
544
|
exports.version = version;
|
|
@@ -508,8 +508,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
|
|
|
508
508
|
}]);
|
|
509
509
|
|
|
510
510
|
return DateRangeCalendar;
|
|
511
|
-
}(react.Component);
|
|
512
|
-
|
|
511
|
+
}(react.Component);
|
|
513
512
|
|
|
514
513
|
DateRangeCalendar.displayName = 'DateRangeCalendar';
|
|
515
514
|
DateRangeCalendar.defaultProps = {
|
|
@@ -524,7 +523,7 @@ DateRangeCalendar.propTypes = {};
|
|
|
524
523
|
var dateRangeInput = reactIntl.injectIntl(DateRangeCalendar);
|
|
525
524
|
|
|
526
525
|
// NOTE: This string will be replaced on build time with the package version.
|
|
527
|
-
var version = "13.0.
|
|
526
|
+
var version = "13.0.1";
|
|
528
527
|
|
|
529
528
|
exports["default"] = dateRangeInput;
|
|
530
529
|
exports.version = version;
|
|
@@ -485,8 +485,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
|
|
|
485
485
|
}]);
|
|
486
486
|
|
|
487
487
|
return DateRangeCalendar;
|
|
488
|
-
}(Component);
|
|
489
|
-
|
|
488
|
+
}(Component);
|
|
490
489
|
|
|
491
490
|
DateRangeCalendar.displayName = 'DateRangeCalendar';
|
|
492
491
|
DateRangeCalendar.defaultProps = {
|
|
@@ -498,10 +497,6 @@ DateRangeCalendar.isEmpty = function (range) {
|
|
|
498
497
|
};
|
|
499
498
|
|
|
500
499
|
DateRangeCalendar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
501
|
-
intl: _pt.shape({
|
|
502
|
-
locale: _pt.string.isRequired,
|
|
503
|
-
formatMessage: _pt.func.isRequired
|
|
504
|
-
}).isRequired,
|
|
505
500
|
horizontalConstraint: _pt.oneOf([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
|
|
506
501
|
value: _pt.arrayOf(_pt.any).isRequired,
|
|
507
502
|
onChange: _pt.func.isRequired,
|
|
@@ -519,6 +514,6 @@ DateRangeCalendar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
519
514
|
var dateRangeInput = injectIntl(DateRangeCalendar);
|
|
520
515
|
|
|
521
516
|
// NOTE: This string will be replaced on build time with the package version.
|
|
522
|
-
var version = "13.0.
|
|
517
|
+
var version = "13.0.1";
|
|
523
518
|
|
|
524
519
|
export { dateRangeInput as default, version };
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { type WrappedComponentProps } from 'react-intl';
|
|
3
|
+
import type { MomentInput } from 'moment';
|
|
4
|
+
declare type TEvent = {
|
|
5
|
+
target: {
|
|
6
|
+
id?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
value?: MomentInput[];
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
declare type TDateRangeCalendarProps = {
|
|
12
|
+
horizontalConstraint?: 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
|
|
13
|
+
value: MomentInput[];
|
|
14
|
+
onChange: (event: TEvent) => void;
|
|
15
|
+
isClearable?: boolean;
|
|
16
|
+
onFocus?: (event: TEvent) => void;
|
|
17
|
+
onBlur?: (event: TEvent) => void;
|
|
18
|
+
id?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
isDisabled?: boolean;
|
|
22
|
+
isReadOnly?: boolean;
|
|
23
|
+
hasError?: boolean;
|
|
24
|
+
hasWarning?: boolean;
|
|
25
|
+
} & WrappedComponentProps;
|
|
26
|
+
declare const _default: import("react").FC<import("react-intl").WithIntlProps<TDateRangeCalendarProps>> & {
|
|
27
|
+
WrappedComponent: import("react").ComponentType<TDateRangeCalendarProps>;
|
|
4
28
|
};
|
|
5
29
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/date-range-input",
|
|
3
3
|
"description": "The `DateRangeInput` component allows the user to select a date range.",
|
|
4
|
-
"version": "13.0.
|
|
4
|
+
"version": "13.0.1",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"@babel/runtime": "7.17.2",
|
|
23
23
|
"@babel/runtime-corejs3": "7.17.2",
|
|
24
24
|
"@commercetools-uikit/accessible-button": "13.0.0",
|
|
25
|
-
"@commercetools-uikit/calendar-utils": "13.0.
|
|
25
|
+
"@commercetools-uikit/calendar-utils": "13.0.1",
|
|
26
26
|
"@commercetools-uikit/constraints": "13.0.0",
|
|
27
27
|
"@commercetools-uikit/design-system": "13.0.0",
|
|
28
28
|
"@commercetools-uikit/hooks": "12.2.9",
|
|
29
29
|
"@commercetools-uikit/icons": "13.0.0",
|
|
30
|
-
"@commercetools-uikit/secondary-icon-button": "13.0.
|
|
31
|
-
"@commercetools-uikit/select-utils": "13.0.
|
|
30
|
+
"@commercetools-uikit/secondary-icon-button": "13.0.1",
|
|
31
|
+
"@commercetools-uikit/select-utils": "13.0.1",
|
|
32
32
|
"@commercetools-uikit/spacings-inline": "13.0.0",
|
|
33
33
|
"@commercetools-uikit/text": "13.0.0",
|
|
34
34
|
"@commercetools-uikit/tooltip": "13.0.0",
|