@atlaskit/datetime-picker 17.1.5 → 17.1.7
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 +14 -0
- package/dist/cjs/components/date-picker-class.js +3 -66
- package/dist/cjs/components/date-picker-fc.js +3 -3
- package/dist/cjs/components/date-time-picker-class.js +1 -1
- package/dist/cjs/components/date-time-picker-fc.js +44 -44
- package/dist/cjs/components/time-picker.js +54 -54
- package/dist/cjs/internal/single-value.js +3 -8
- package/dist/es2019/components/date-picker-class.js +3 -67
- package/dist/es2019/components/date-picker-fc.js +3 -3
- package/dist/es2019/components/date-time-picker-class.js +1 -1
- package/dist/es2019/components/date-time-picker-fc.js +2 -2
- package/dist/es2019/components/time-picker.js +2 -2
- package/dist/es2019/internal/single-value.js +1 -4
- package/dist/esm/components/date-picker-class.js +3 -66
- package/dist/esm/components/date-picker-fc.js +3 -3
- package/dist/esm/components/date-time-picker-class.js +1 -1
- package/dist/esm/components/date-time-picker-fc.js +44 -44
- package/dist/esm/components/time-picker.js +54 -54
- package/dist/esm/internal/single-value.js +3 -8
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 17.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`329c88647d73e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/329c88647d73e) -
|
|
8
|
+
Improve accessible description of date picker.
|
|
9
|
+
|
|
10
|
+
## 17.1.6
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`a8247416bb21a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a8247416bb21a) -
|
|
15
|
+
Improve accessible description of date picker.
|
|
16
|
+
|
|
3
17
|
## 17.1.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -40,7 +40,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
40
40
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
41
41
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /// <reference types="node" />
|
|
42
42
|
var packageName = "@atlaskit/datetime-picker";
|
|
43
|
-
var packageVersion = "
|
|
43
|
+
var packageVersion = "17.1.6";
|
|
44
44
|
var datePickerDefaultProps = {
|
|
45
45
|
defaultIsOpen: false,
|
|
46
46
|
defaultValue: '',
|
|
@@ -530,7 +530,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
530
530
|
type: "hidden",
|
|
531
531
|
value: value,
|
|
532
532
|
"data-testid": testId && "".concat(testId, "--input")
|
|
533
|
-
}),
|
|
533
|
+
}), /*#__PURE__*/React.createElement(_useId.IdProvider, null, function (_ref3) {
|
|
534
534
|
var valueId = _ref3.id;
|
|
535
535
|
return /*#__PURE__*/React.createElement(_select.default, (0, _extends2.default)({
|
|
536
536
|
appearance: _this2.props.appearance,
|
|
@@ -597,70 +597,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
597
597
|
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
|
|
598
598
|
menuInnerWrapper: calendarProps.menuInnerWrapper
|
|
599
599
|
}));
|
|
600
|
-
})
|
|
601
|
-
appearance: this.props.appearance,
|
|
602
|
-
"aria-describedby": ariaDescribedBy,
|
|
603
|
-
label: label || undefined,
|
|
604
|
-
autoFocus: autoFocus,
|
|
605
|
-
clearControlLabel: clearControlLabel,
|
|
606
|
-
closeMenuOnSelect: true,
|
|
607
|
-
enableAnimation: false,
|
|
608
|
-
inputId: id,
|
|
609
|
-
inputValue: actualSelectInputValue,
|
|
610
|
-
isDisabled: isDisabled,
|
|
611
|
-
isRequired: isRequired,
|
|
612
|
-
menuIsOpen: menuIsOpen,
|
|
613
|
-
onBlur: this.onSelectBlur,
|
|
614
|
-
onChange: this.onSelectChange,
|
|
615
|
-
onFocus: this.onSelectFocus,
|
|
616
|
-
onInputChange: this.handleSelectInputChange,
|
|
617
|
-
placeholder: (0, _datePickerMigration.getPlaceholder)({
|
|
618
|
-
placeholder: this.props.placeholder,
|
|
619
|
-
l10n: this.state.l10n
|
|
620
|
-
})
|
|
621
|
-
// @ts-ignore -- Argument of type 'StylesConfig<OptionType, false, GroupBase<OptionType>>' is not assignable to parameter of type 'StylesConfig<OptionType, boolean, GroupBase<OptionType>>'
|
|
622
|
-
,
|
|
623
|
-
styles: mergedStyles,
|
|
624
|
-
value: initialValue
|
|
625
|
-
}, selectProps, {
|
|
626
|
-
// For some reason, this and the below `styles` type error _only_ show
|
|
627
|
-
// up when you alter some of the properties in the `selectComponents`
|
|
628
|
-
// object. These errors are still present, and I suspect have always
|
|
629
|
-
// been present, without changing the unrelated code. Ignoring as the
|
|
630
|
-
// component still works as expected despite this error. And also
|
|
631
|
-
// because the select refresh team may solve it later.
|
|
632
|
-
components: _objectSpread(_objectSpread({}, selectComponents), {}, {
|
|
633
|
-
SingleValue: (0, _singleValue.makeSingleValue)({
|
|
634
|
-
lang: this.props.locale
|
|
635
|
-
})
|
|
636
|
-
})
|
|
637
|
-
// These are below the spread because I don't know what is in
|
|
638
|
-
// selectProps or not and what wil be overwritten
|
|
639
|
-
,
|
|
640
|
-
isClearable: true,
|
|
641
|
-
isInvalid: isInvalid,
|
|
642
|
-
spacing: spacing,
|
|
643
|
-
testId: testId
|
|
644
|
-
// These aren't part of `Select`'s API, but we're using them here.
|
|
645
|
-
// @ts-ignore -- Property 'calendarContainerRef' does not exist on type 'IntrinsicAttributes & LibraryManagedAttributes<(<Option extends unknown = OptionType, IsMulti extends boolean = false>(props: AtlaskitSelectProps<Option, IsMulti> & { ...; }) => Element), AtlaskitSelectProps<...> & { ...; }>'.
|
|
646
|
-
,
|
|
647
|
-
calendarContainerRef: calendarProps.calendarContainerRef,
|
|
648
|
-
calendarDisabled: calendarProps.calendarDisabled,
|
|
649
|
-
calendarDisabledDateFilter: calendarProps.calendarDisabledDateFilter,
|
|
650
|
-
calendarLocale: calendarProps.calendarLocale,
|
|
651
|
-
calendarMaxDate: calendarProps.calendarMaxDate,
|
|
652
|
-
calendarMinDate: calendarProps.calendarMinDate,
|
|
653
|
-
calendarRef: calendarProps.calendarRef,
|
|
654
|
-
calendarValue: calendarProps.calendarValue,
|
|
655
|
-
calendarView: calendarProps.calendarView,
|
|
656
|
-
calendarWeekStartDay: calendarProps.calendarWeekStartDay,
|
|
657
|
-
nextMonthLabel: nextMonthLabel,
|
|
658
|
-
onCalendarChange: calendarProps.onCalendarChange,
|
|
659
|
-
onCalendarSelect: calendarProps.onCalendarSelect,
|
|
660
|
-
previousMonthLabel: previousMonthLabel,
|
|
661
|
-
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
|
|
662
|
-
menuInnerWrapper: calendarProps.menuInnerWrapper
|
|
663
|
-
})), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(_useId.IdProvider, {
|
|
600
|
+
}), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(_useId.IdProvider, {
|
|
664
601
|
prefix: "open-calendar-label--"
|
|
665
602
|
}, function (_ref4) {
|
|
666
603
|
var openCalendarLabelId = _ref4.id;
|
|
@@ -37,7 +37,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
37
37
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
38
38
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
39
39
|
var packageName = "@atlaskit/datetime-picker";
|
|
40
|
-
var packageVersion = "
|
|
40
|
+
var packageVersion = "17.1.6";
|
|
41
41
|
var styles = {
|
|
42
42
|
pickerContainerStyle: "_kqswh2mm",
|
|
43
43
|
dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -60,7 +60,7 @@ var analyticsAttributes = {
|
|
|
60
60
|
* - [Code](https://atlassian.design/components/datetime-picker/date-picker/code)
|
|
61
61
|
* - [Usage](https://atlassian.design/components/datetime-picker/date-picker/usage)
|
|
62
62
|
*/
|
|
63
|
-
var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props,
|
|
63
|
+
var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, _forwardedRef) {
|
|
64
64
|
var containerRef = (0, _react.useRef)(null);
|
|
65
65
|
var calendarRef = (0, _react.useRef)(null);
|
|
66
66
|
var calendarButtonRef = (0, _react.useRef)(null);
|
|
@@ -547,7 +547,7 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, forwardedR
|
|
|
547
547
|
"data-testid": testId && "".concat(testId, "--input")
|
|
548
548
|
}), /*#__PURE__*/React.createElement(_select.default, (0, _extends2.default)({
|
|
549
549
|
appearance: appearance,
|
|
550
|
-
"aria-describedby":
|
|
550
|
+
"aria-describedby": ariaDescribedBy ? "".concat(ariaDescribedBy, " ").concat(valueId) : valueId,
|
|
551
551
|
label: label || undefined,
|
|
552
552
|
autoFocus: autoFocus,
|
|
553
553
|
clearControlLabel: clearControlLabel,
|
|
@@ -35,7 +35,7 @@ var DatePicker = (0, _ffComponent.componentWithCondition)(function () {
|
|
|
35
35
|
return (0, _platformFeatureFlags.fg)('dst-date-picker-use-functional-component');
|
|
36
36
|
}, _datePickerFc.default, _datePickerClass.default);
|
|
37
37
|
var packageName = "@atlaskit/datetime-picker";
|
|
38
|
-
var packageVersion = "
|
|
38
|
+
var packageVersion = "17.1.6";
|
|
39
39
|
var compiledStyles = {
|
|
40
40
|
datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
|
|
41
41
|
timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
|
|
@@ -38,7 +38,7 @@ var DatePicker = (0, _ffComponent.componentWithCondition)(function () {
|
|
|
38
38
|
return (0, _platformFeatureFlags.fg)('dst-date-picker-use-functional-component');
|
|
39
39
|
}, _datePickerFc.default, _datePickerClass.default);
|
|
40
40
|
var packageName = "@atlaskit/datetime-picker";
|
|
41
|
-
var packageVersion = "
|
|
41
|
+
var packageVersion = "17.1.6";
|
|
42
42
|
var analyticsAttributes = {
|
|
43
43
|
componentName: 'dateTimePicker',
|
|
44
44
|
packageName: packageName,
|
|
@@ -77,45 +77,45 @@ var timePickerDefaultAriaLabel = exports.timePickerDefaultAriaLabel = 'Time';
|
|
|
77
77
|
* - [Code](https://atlassian.design/components/datetime-picker/code)
|
|
78
78
|
* - [Usage](https://atlassian.design/components/datetime-picker/usage)
|
|
79
79
|
*/
|
|
80
|
-
var DateTimePicker = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
81
|
-
var ariaDescribedBy =
|
|
82
|
-
|
|
83
|
-
appearance =
|
|
84
|
-
|
|
85
|
-
autoFocus =
|
|
86
|
-
|
|
87
|
-
clearControlLabel =
|
|
88
|
-
|
|
89
|
-
datePickerPropsWithSelectProps =
|
|
90
|
-
|
|
91
|
-
defaultValue =
|
|
92
|
-
|
|
93
|
-
id =
|
|
94
|
-
|
|
95
|
-
innerProps =
|
|
96
|
-
|
|
97
|
-
isDisabled =
|
|
98
|
-
|
|
99
|
-
isInvalid =
|
|
100
|
-
|
|
101
|
-
isRequired =
|
|
102
|
-
|
|
103
|
-
name =
|
|
104
|
-
|
|
105
|
-
onBlur =
|
|
106
|
-
|
|
107
|
-
onChangeProp =
|
|
108
|
-
|
|
109
|
-
onFocus =
|
|
110
|
-
providedParseValue =
|
|
111
|
-
|
|
112
|
-
spacing =
|
|
113
|
-
|
|
114
|
-
locale =
|
|
115
|
-
testId =
|
|
116
|
-
|
|
117
|
-
timePickerPropsWithSelectProps =
|
|
118
|
-
providedValue =
|
|
80
|
+
var DateTimePicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, _ref) {
|
|
81
|
+
var ariaDescribedBy = _ref2['aria-describedby'],
|
|
82
|
+
_ref2$appearance = _ref2.appearance,
|
|
83
|
+
appearance = _ref2$appearance === void 0 ? 'default' : _ref2$appearance,
|
|
84
|
+
_ref2$autoFocus = _ref2.autoFocus,
|
|
85
|
+
autoFocus = _ref2$autoFocus === void 0 ? false : _ref2$autoFocus,
|
|
86
|
+
_ref2$clearControlLab = _ref2.clearControlLabel,
|
|
87
|
+
clearControlLabel = _ref2$clearControlLab === void 0 ? 'clear' : _ref2$clearControlLab,
|
|
88
|
+
_ref2$datePickerProps = _ref2.datePickerProps,
|
|
89
|
+
datePickerPropsWithSelectProps = _ref2$datePickerProps === void 0 ? {} : _ref2$datePickerProps,
|
|
90
|
+
_ref2$defaultValue = _ref2.defaultValue,
|
|
91
|
+
defaultValue = _ref2$defaultValue === void 0 ? '' : _ref2$defaultValue,
|
|
92
|
+
_ref2$id = _ref2.id,
|
|
93
|
+
id = _ref2$id === void 0 ? '' : _ref2$id,
|
|
94
|
+
_ref2$innerProps = _ref2.innerProps,
|
|
95
|
+
innerProps = _ref2$innerProps === void 0 ? {} : _ref2$innerProps,
|
|
96
|
+
_ref2$isDisabled = _ref2.isDisabled,
|
|
97
|
+
isDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled,
|
|
98
|
+
_ref2$isInvalid = _ref2.isInvalid,
|
|
99
|
+
isInvalid = _ref2$isInvalid === void 0 ? false : _ref2$isInvalid,
|
|
100
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
101
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired,
|
|
102
|
+
_ref2$name = _ref2.name,
|
|
103
|
+
name = _ref2$name === void 0 ? '' : _ref2$name,
|
|
104
|
+
_ref2$onBlur = _ref2.onBlur,
|
|
105
|
+
onBlur = _ref2$onBlur === void 0 ? function (_event) {} : _ref2$onBlur,
|
|
106
|
+
_ref2$onChange = _ref2.onChange,
|
|
107
|
+
onChangeProp = _ref2$onChange === void 0 ? function (_value) {} : _ref2$onChange,
|
|
108
|
+
_ref2$onFocus = _ref2.onFocus,
|
|
109
|
+
onFocus = _ref2$onFocus === void 0 ? function (_event) {} : _ref2$onFocus,
|
|
110
|
+
providedParseValue = _ref2.parseValue,
|
|
111
|
+
_ref2$spacing = _ref2.spacing,
|
|
112
|
+
spacing = _ref2$spacing === void 0 ? 'default' : _ref2$spacing,
|
|
113
|
+
_ref2$locale = _ref2.locale,
|
|
114
|
+
locale = _ref2$locale === void 0 ? 'en-US' : _ref2$locale,
|
|
115
|
+
testId = _ref2.testId,
|
|
116
|
+
_ref2$timePickerProps = _ref2.timePickerProps,
|
|
117
|
+
timePickerPropsWithSelectProps = _ref2$timePickerProps === void 0 ? {} : _ref2$timePickerProps,
|
|
118
|
+
providedValue = _ref2.value;
|
|
119
119
|
var _useState = (0, _react.useState)((datePickerPropsWithSelectProps === null || datePickerPropsWithSelectProps === void 0 ? void 0 : datePickerPropsWithSelectProps.defaultValue) || ''),
|
|
120
120
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
121
121
|
dateValue = _useState2[0],
|
|
@@ -242,10 +242,10 @@ var DateTimePicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
242
242
|
action: 'selectedDate',
|
|
243
243
|
actionSubject: 'datePicker'
|
|
244
244
|
}, analyticsAttributes));
|
|
245
|
-
var onValueChange = function onValueChange(
|
|
246
|
-
var providedDateValue =
|
|
247
|
-
providedTimeValue =
|
|
248
|
-
providedZoneValue =
|
|
245
|
+
var onValueChange = function onValueChange(_ref3) {
|
|
246
|
+
var providedDateValue = _ref3.providedDateValue,
|
|
247
|
+
providedTimeValue = _ref3.providedTimeValue,
|
|
248
|
+
providedZoneValue = _ref3.providedZoneValue;
|
|
249
249
|
setDateValue(providedDateValue);
|
|
250
250
|
setTimeValue(providedTimeValue);
|
|
251
251
|
setZoneValue(providedZoneValue);
|
|
@@ -26,7 +26,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
26
26
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27
27
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28
28
|
var packageName = "@atlaskit/datetime-picker";
|
|
29
|
-
var packageVersion = "
|
|
29
|
+
var packageVersion = "17.1.6";
|
|
30
30
|
var menuStyles = {
|
|
31
31
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
32
32
|
position: 'static',
|
|
@@ -50,60 +50,60 @@ var analyticsAttributes = {
|
|
|
50
50
|
* - [Code](https://atlassian.design/components/datetime-picker/time-picker/code)
|
|
51
51
|
* - [Usage](https://atlassian.design/components/datetime-picker/time-picker/usage)
|
|
52
52
|
*/
|
|
53
|
-
var TimePicker = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
54
|
-
var ariaDescribedBy =
|
|
55
|
-
|
|
56
|
-
appearance =
|
|
57
|
-
|
|
58
|
-
autoFocus =
|
|
59
|
-
|
|
60
|
-
clearControlLabel =
|
|
61
|
-
|
|
62
|
-
defaultIsOpen =
|
|
63
|
-
|
|
64
|
-
defaultValue =
|
|
65
|
-
formatDisplayLabel =
|
|
66
|
-
|
|
67
|
-
hideIcon =
|
|
68
|
-
|
|
69
|
-
id =
|
|
70
|
-
|
|
71
|
-
innerProps =
|
|
72
|
-
|
|
73
|
-
isDisabled =
|
|
74
|
-
|
|
75
|
-
isInvalid =
|
|
76
|
-
|
|
77
|
-
isRequired =
|
|
78
|
-
providedIsOpen =
|
|
79
|
-
|
|
80
|
-
label =
|
|
81
|
-
|
|
82
|
-
locale =
|
|
83
|
-
|
|
84
|
-
name =
|
|
85
|
-
|
|
86
|
-
providedOnBlur =
|
|
87
|
-
|
|
88
|
-
providedOnChange =
|
|
89
|
-
|
|
90
|
-
providedOnFocus =
|
|
91
|
-
|
|
92
|
-
parseInputValue =
|
|
53
|
+
var TimePicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, _ref) {
|
|
54
|
+
var ariaDescribedBy = _ref2['aria-describedby'],
|
|
55
|
+
_ref2$appearance = _ref2.appearance,
|
|
56
|
+
appearance = _ref2$appearance === void 0 ? 'default' : _ref2$appearance,
|
|
57
|
+
_ref2$autoFocus = _ref2.autoFocus,
|
|
58
|
+
autoFocus = _ref2$autoFocus === void 0 ? false : _ref2$autoFocus,
|
|
59
|
+
_ref2$clearControlLab = _ref2.clearControlLabel,
|
|
60
|
+
clearControlLabel = _ref2$clearControlLab === void 0 ? 'clear timepicker' : _ref2$clearControlLab,
|
|
61
|
+
_ref2$defaultIsOpen = _ref2.defaultIsOpen,
|
|
62
|
+
defaultIsOpen = _ref2$defaultIsOpen === void 0 ? false : _ref2$defaultIsOpen,
|
|
63
|
+
_ref2$defaultValue = _ref2.defaultValue,
|
|
64
|
+
defaultValue = _ref2$defaultValue === void 0 ? '' : _ref2$defaultValue,
|
|
65
|
+
formatDisplayLabel = _ref2.formatDisplayLabel,
|
|
66
|
+
_ref2$hideIcon = _ref2.hideIcon,
|
|
67
|
+
hideIcon = _ref2$hideIcon === void 0 ? false : _ref2$hideIcon,
|
|
68
|
+
_ref2$id = _ref2.id,
|
|
69
|
+
id = _ref2$id === void 0 ? '' : _ref2$id,
|
|
70
|
+
_ref2$innerProps = _ref2.innerProps,
|
|
71
|
+
innerProps = _ref2$innerProps === void 0 ? {} : _ref2$innerProps,
|
|
72
|
+
_ref2$isDisabled = _ref2.isDisabled,
|
|
73
|
+
isDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled,
|
|
74
|
+
_ref2$isInvalid = _ref2.isInvalid,
|
|
75
|
+
isInvalid = _ref2$isInvalid === void 0 ? false : _ref2$isInvalid,
|
|
76
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
77
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired,
|
|
78
|
+
providedIsOpen = _ref2.isOpen,
|
|
79
|
+
_ref2$label = _ref2.label,
|
|
80
|
+
label = _ref2$label === void 0 ? '' : _ref2$label,
|
|
81
|
+
_ref2$locale = _ref2.locale,
|
|
82
|
+
locale = _ref2$locale === void 0 ? 'en-US' : _ref2$locale,
|
|
83
|
+
_ref2$name = _ref2.name,
|
|
84
|
+
name = _ref2$name === void 0 ? '' : _ref2$name,
|
|
85
|
+
_ref2$onBlur = _ref2.onBlur,
|
|
86
|
+
providedOnBlur = _ref2$onBlur === void 0 ? _noop.default : _ref2$onBlur,
|
|
87
|
+
_ref2$onChange = _ref2.onChange,
|
|
88
|
+
providedOnChange = _ref2$onChange === void 0 ? _noop.default : _ref2$onChange,
|
|
89
|
+
_ref2$onFocus = _ref2.onFocus,
|
|
90
|
+
providedOnFocus = _ref2$onFocus === void 0 ? _noop.default : _ref2$onFocus,
|
|
91
|
+
_ref2$parseInputValue = _ref2.parseInputValue,
|
|
92
|
+
parseInputValue = _ref2$parseInputValue === void 0 ? function (time, _timeFormat) {
|
|
93
93
|
return (0, _parseTime.default)(time);
|
|
94
|
-
} :
|
|
95
|
-
placeholder =
|
|
96
|
-
|
|
97
|
-
selectProps =
|
|
98
|
-
|
|
99
|
-
spacing =
|
|
100
|
-
testId =
|
|
101
|
-
timeFormat =
|
|
102
|
-
|
|
103
|
-
timeIsEditable =
|
|
104
|
-
|
|
105
|
-
times =
|
|
106
|
-
providedValue =
|
|
94
|
+
} : _ref2$parseInputValue,
|
|
95
|
+
placeholder = _ref2.placeholder,
|
|
96
|
+
_ref2$selectProps = _ref2.selectProps,
|
|
97
|
+
selectProps = _ref2$selectProps === void 0 ? {} : _ref2$selectProps,
|
|
98
|
+
_ref2$spacing = _ref2.spacing,
|
|
99
|
+
spacing = _ref2$spacing === void 0 ? 'default' : _ref2$spacing,
|
|
100
|
+
testId = _ref2.testId,
|
|
101
|
+
timeFormat = _ref2.timeFormat,
|
|
102
|
+
_ref2$timeIsEditable = _ref2.timeIsEditable,
|
|
103
|
+
timeIsEditable = _ref2$timeIsEditable === void 0 ? false : _ref2$timeIsEditable,
|
|
104
|
+
_ref2$times = _ref2.times,
|
|
105
|
+
times = _ref2$times === void 0 ? _internal.defaultTimes : _ref2$times,
|
|
106
|
+
providedValue = _ref2.value;
|
|
107
107
|
var _useState = (0, _react.useState)(null),
|
|
108
108
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
109
109
|
containerRef = _useState2[0],
|
|
@@ -6,14 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.makeSingleValue = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
10
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
11
|
var _select = require("@atlaskit/select");
|
|
14
12
|
var _excluded = ["children", "className", "clearValue", "cx", "data", "getStyles", "getValue", "hasValue", "isDisabled", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue"];
|
|
15
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
13
|
/**
|
|
18
14
|
* This creates a functional component that `react-select` will use to make the
|
|
19
15
|
* SingleValue part of the different pickers.
|
|
@@ -49,11 +45,10 @@ function makeSingleValue(_ref) {
|
|
|
49
45
|
getStyles: getStyles,
|
|
50
46
|
getValue: getValue,
|
|
51
47
|
hasValue: hasValue,
|
|
52
|
-
innerProps:
|
|
53
|
-
id: id
|
|
54
|
-
} : {}), {}, {
|
|
48
|
+
innerProps: {
|
|
49
|
+
id: id,
|
|
55
50
|
lang: lang
|
|
56
|
-
}
|
|
51
|
+
},
|
|
57
52
|
isDisabled: isDisabled,
|
|
58
53
|
isMulti: isMulti,
|
|
59
54
|
isRtl: isRtl,
|
|
@@ -23,7 +23,7 @@ import { Menu } from '../internal/menu';
|
|
|
23
23
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
24
24
|
import { makeSingleValue } from '../internal/single-value';
|
|
25
25
|
const packageName = "@atlaskit/datetime-picker";
|
|
26
|
-
const packageVersion = "
|
|
26
|
+
const packageVersion = "17.1.6";
|
|
27
27
|
const datePickerDefaultProps = {
|
|
28
28
|
defaultIsOpen: false,
|
|
29
29
|
defaultValue: '',
|
|
@@ -509,7 +509,7 @@ class DatePickerComponent extends Component {
|
|
|
509
509
|
type: "hidden",
|
|
510
510
|
value: value,
|
|
511
511
|
"data-testid": testId && `${testId}--input`
|
|
512
|
-
}),
|
|
512
|
+
}), /*#__PURE__*/React.createElement(IdProvider, null, ({
|
|
513
513
|
id: valueId
|
|
514
514
|
}) => /*#__PURE__*/React.createElement(Select, _extends({
|
|
515
515
|
appearance: this.props.appearance,
|
|
@@ -576,71 +576,7 @@ class DatePickerComponent extends Component {
|
|
|
576
576
|
previousMonthLabel: previousMonthLabel,
|
|
577
577
|
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
|
|
578
578
|
menuInnerWrapper: calendarProps.menuInnerWrapper
|
|
579
|
-
})))
|
|
580
|
-
appearance: this.props.appearance,
|
|
581
|
-
"aria-describedby": ariaDescribedBy,
|
|
582
|
-
label: label || undefined,
|
|
583
|
-
autoFocus: autoFocus,
|
|
584
|
-
clearControlLabel: clearControlLabel,
|
|
585
|
-
closeMenuOnSelect: true,
|
|
586
|
-
enableAnimation: false,
|
|
587
|
-
inputId: id,
|
|
588
|
-
inputValue: actualSelectInputValue,
|
|
589
|
-
isDisabled: isDisabled,
|
|
590
|
-
isRequired: isRequired,
|
|
591
|
-
menuIsOpen: menuIsOpen,
|
|
592
|
-
onBlur: this.onSelectBlur,
|
|
593
|
-
onChange: this.onSelectChange,
|
|
594
|
-
onFocus: this.onSelectFocus,
|
|
595
|
-
onInputChange: this.handleSelectInputChange,
|
|
596
|
-
placeholder: getPlaceholder({
|
|
597
|
-
placeholder: this.props.placeholder,
|
|
598
|
-
l10n: this.state.l10n
|
|
599
|
-
})
|
|
600
|
-
// @ts-ignore -- Argument of type 'StylesConfig<OptionType, false, GroupBase<OptionType>>' is not assignable to parameter of type 'StylesConfig<OptionType, boolean, GroupBase<OptionType>>'
|
|
601
|
-
,
|
|
602
|
-
styles: mergedStyles,
|
|
603
|
-
value: initialValue
|
|
604
|
-
}, selectProps, {
|
|
605
|
-
// For some reason, this and the below `styles` type error _only_ show
|
|
606
|
-
// up when you alter some of the properties in the `selectComponents`
|
|
607
|
-
// object. These errors are still present, and I suspect have always
|
|
608
|
-
// been present, without changing the unrelated code. Ignoring as the
|
|
609
|
-
// component still works as expected despite this error. And also
|
|
610
|
-
// because the select refresh team may solve it later.
|
|
611
|
-
components: {
|
|
612
|
-
...selectComponents,
|
|
613
|
-
SingleValue: makeSingleValue({
|
|
614
|
-
lang: this.props.locale
|
|
615
|
-
})
|
|
616
|
-
}
|
|
617
|
-
// These are below the spread because I don't know what is in
|
|
618
|
-
// selectProps or not and what wil be overwritten
|
|
619
|
-
,
|
|
620
|
-
isClearable: true,
|
|
621
|
-
isInvalid: isInvalid,
|
|
622
|
-
spacing: spacing,
|
|
623
|
-
testId: testId
|
|
624
|
-
// These aren't part of `Select`'s API, but we're using them here.
|
|
625
|
-
// @ts-ignore -- Property 'calendarContainerRef' does not exist on type 'IntrinsicAttributes & LibraryManagedAttributes<(<Option extends unknown = OptionType, IsMulti extends boolean = false>(props: AtlaskitSelectProps<Option, IsMulti> & { ...; }) => Element), AtlaskitSelectProps<...> & { ...; }>'.
|
|
626
|
-
,
|
|
627
|
-
calendarContainerRef: calendarProps.calendarContainerRef,
|
|
628
|
-
calendarDisabled: calendarProps.calendarDisabled,
|
|
629
|
-
calendarDisabledDateFilter: calendarProps.calendarDisabledDateFilter,
|
|
630
|
-
calendarLocale: calendarProps.calendarLocale,
|
|
631
|
-
calendarMaxDate: calendarProps.calendarMaxDate,
|
|
632
|
-
calendarMinDate: calendarProps.calendarMinDate,
|
|
633
|
-
calendarRef: calendarProps.calendarRef,
|
|
634
|
-
calendarValue: calendarProps.calendarValue,
|
|
635
|
-
calendarView: calendarProps.calendarView,
|
|
636
|
-
calendarWeekStartDay: calendarProps.calendarWeekStartDay,
|
|
637
|
-
nextMonthLabel: nextMonthLabel,
|
|
638
|
-
onCalendarChange: calendarProps.onCalendarChange,
|
|
639
|
-
onCalendarSelect: calendarProps.onCalendarSelect,
|
|
640
|
-
previousMonthLabel: previousMonthLabel,
|
|
641
|
-
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
|
|
642
|
-
menuInnerWrapper: calendarProps.menuInnerWrapper
|
|
643
|
-
})), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(IdProvider, {
|
|
579
|
+
}))), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(IdProvider, {
|
|
644
580
|
prefix: "open-calendar-label--"
|
|
645
581
|
}, ({
|
|
646
582
|
id: openCalendarLabelId
|
|
@@ -23,7 +23,7 @@ import { Menu } from '../internal/menu';
|
|
|
23
23
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
24
24
|
import { makeSingleValue } from '../internal/single-value';
|
|
25
25
|
const packageName = "@atlaskit/datetime-picker";
|
|
26
|
-
const packageVersion = "
|
|
26
|
+
const packageVersion = "17.1.6";
|
|
27
27
|
const styles = {
|
|
28
28
|
pickerContainerStyle: "_kqswh2mm",
|
|
29
29
|
dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -46,7 +46,7 @@ const analyticsAttributes = {
|
|
|
46
46
|
* - [Code](https://atlassian.design/components/datetime-picker/date-picker/code)
|
|
47
47
|
* - [Usage](https://atlassian.design/components/datetime-picker/date-picker/usage)
|
|
48
48
|
*/
|
|
49
|
-
const DatePicker = /*#__PURE__*/forwardRef((props,
|
|
49
|
+
const DatePicker = /*#__PURE__*/forwardRef((props, _forwardedRef) => {
|
|
50
50
|
const containerRef = useRef(null);
|
|
51
51
|
const calendarRef = useRef(null);
|
|
52
52
|
const calendarButtonRef = useRef(null);
|
|
@@ -474,7 +474,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
474
474
|
"data-testid": testId && `${testId}--input`
|
|
475
475
|
}), /*#__PURE__*/React.createElement(Select, _extends({
|
|
476
476
|
appearance: appearance,
|
|
477
|
-
"aria-describedby":
|
|
477
|
+
"aria-describedby": ariaDescribedBy ? `${ariaDescribedBy} ${valueId}` : valueId,
|
|
478
478
|
label: label || undefined,
|
|
479
479
|
autoFocus: autoFocus,
|
|
480
480
|
clearControlLabel: clearControlLabel,
|
|
@@ -19,7 +19,7 @@ import DatePickerNew from './date-picker-fc';
|
|
|
19
19
|
import TimePicker from './time-picker';
|
|
20
20
|
const DatePicker = componentWithCondition(() => fg('dst-date-picker-use-functional-component'), DatePickerNew, DatePickerOld);
|
|
21
21
|
const packageName = "@atlaskit/datetime-picker";
|
|
22
|
-
const packageVersion = "
|
|
22
|
+
const packageVersion = "17.1.6";
|
|
23
23
|
const compiledStyles = {
|
|
24
24
|
datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
|
|
25
25
|
timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
|
|
@@ -22,7 +22,7 @@ import DatePickerNew from './date-picker-fc';
|
|
|
22
22
|
import TimePicker from './time-picker';
|
|
23
23
|
const DatePicker = componentWithCondition(() => fg('dst-date-picker-use-functional-component'), DatePickerNew, DatePickerOld);
|
|
24
24
|
const packageName = "@atlaskit/datetime-picker";
|
|
25
|
-
const packageVersion = "
|
|
25
|
+
const packageVersion = "17.1.6";
|
|
26
26
|
const analyticsAttributes = {
|
|
27
27
|
componentName: 'dateTimePicker',
|
|
28
28
|
packageName,
|
|
@@ -86,7 +86,7 @@ const DateTimePicker = /*#__PURE__*/forwardRef(({
|
|
|
86
86
|
testId,
|
|
87
87
|
timePickerProps: timePickerPropsWithSelectProps = {},
|
|
88
88
|
value: providedValue
|
|
89
|
-
},
|
|
89
|
+
}, _ref) => {
|
|
90
90
|
const [dateValue, setDateValue] = useState((datePickerPropsWithSelectProps === null || datePickerPropsWithSelectProps === void 0 ? void 0 : datePickerPropsWithSelectProps.defaultValue) || '');
|
|
91
91
|
const [isFocused, setIsFocused] = useState(false);
|
|
92
92
|
const [timeValue, setTimeValue] = useState((timePickerPropsWithSelectProps === null || timePickerPropsWithSelectProps === void 0 ? void 0 : timePickerPropsWithSelectProps.defaultValue) || '');
|
|
@@ -11,7 +11,7 @@ import parseTime from '../internal/parse-time';
|
|
|
11
11
|
import { convertTokens } from '../internal/parse-tokens';
|
|
12
12
|
import { makeSingleValue } from '../internal/single-value';
|
|
13
13
|
const packageName = "@atlaskit/datetime-picker";
|
|
14
|
-
const packageVersion = "
|
|
14
|
+
const packageVersion = "17.1.6";
|
|
15
15
|
const menuStyles = {
|
|
16
16
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
17
17
|
position: 'static',
|
|
@@ -65,7 +65,7 @@ const TimePicker = /*#__PURE__*/forwardRef(({
|
|
|
65
65
|
timeIsEditable = false,
|
|
66
66
|
times = defaultTimes,
|
|
67
67
|
value: providedValue
|
|
68
|
-
},
|
|
68
|
+
}, _ref) => {
|
|
69
69
|
const [containerRef, setContainerRef] = useState(null);
|
|
70
70
|
/**
|
|
71
71
|
* When being cleared from the icon the TimePicker is blurred.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { components } from '@atlaskit/select';
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -40,9 +39,7 @@ export const makeSingleValue =
|
|
|
40
39
|
getValue: getValue,
|
|
41
40
|
hasValue: hasValue,
|
|
42
41
|
innerProps: {
|
|
43
|
-
|
|
44
|
-
id
|
|
45
|
-
} : {}),
|
|
42
|
+
id,
|
|
46
43
|
lang
|
|
47
44
|
},
|
|
48
45
|
isDisabled: isDisabled,
|
|
@@ -32,7 +32,7 @@ import { Menu } from '../internal/menu';
|
|
|
32
32
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
33
33
|
import { makeSingleValue } from '../internal/single-value';
|
|
34
34
|
var packageName = "@atlaskit/datetime-picker";
|
|
35
|
-
var packageVersion = "
|
|
35
|
+
var packageVersion = "17.1.6";
|
|
36
36
|
var datePickerDefaultProps = {
|
|
37
37
|
defaultIsOpen: false,
|
|
38
38
|
defaultValue: '',
|
|
@@ -522,7 +522,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
522
522
|
type: "hidden",
|
|
523
523
|
value: value,
|
|
524
524
|
"data-testid": testId && "".concat(testId, "--input")
|
|
525
|
-
}),
|
|
525
|
+
}), /*#__PURE__*/React.createElement(IdProvider, null, function (_ref3) {
|
|
526
526
|
var valueId = _ref3.id;
|
|
527
527
|
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
528
528
|
appearance: _this2.props.appearance,
|
|
@@ -589,70 +589,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
589
589
|
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
|
|
590
590
|
menuInnerWrapper: calendarProps.menuInnerWrapper
|
|
591
591
|
}));
|
|
592
|
-
})
|
|
593
|
-
appearance: this.props.appearance,
|
|
594
|
-
"aria-describedby": ariaDescribedBy,
|
|
595
|
-
label: label || undefined,
|
|
596
|
-
autoFocus: autoFocus,
|
|
597
|
-
clearControlLabel: clearControlLabel,
|
|
598
|
-
closeMenuOnSelect: true,
|
|
599
|
-
enableAnimation: false,
|
|
600
|
-
inputId: id,
|
|
601
|
-
inputValue: actualSelectInputValue,
|
|
602
|
-
isDisabled: isDisabled,
|
|
603
|
-
isRequired: isRequired,
|
|
604
|
-
menuIsOpen: menuIsOpen,
|
|
605
|
-
onBlur: this.onSelectBlur,
|
|
606
|
-
onChange: this.onSelectChange,
|
|
607
|
-
onFocus: this.onSelectFocus,
|
|
608
|
-
onInputChange: this.handleSelectInputChange,
|
|
609
|
-
placeholder: getPlaceholder({
|
|
610
|
-
placeholder: this.props.placeholder,
|
|
611
|
-
l10n: this.state.l10n
|
|
612
|
-
})
|
|
613
|
-
// @ts-ignore -- Argument of type 'StylesConfig<OptionType, false, GroupBase<OptionType>>' is not assignable to parameter of type 'StylesConfig<OptionType, boolean, GroupBase<OptionType>>'
|
|
614
|
-
,
|
|
615
|
-
styles: mergedStyles,
|
|
616
|
-
value: initialValue
|
|
617
|
-
}, selectProps, {
|
|
618
|
-
// For some reason, this and the below `styles` type error _only_ show
|
|
619
|
-
// up when you alter some of the properties in the `selectComponents`
|
|
620
|
-
// object. These errors are still present, and I suspect have always
|
|
621
|
-
// been present, without changing the unrelated code. Ignoring as the
|
|
622
|
-
// component still works as expected despite this error. And also
|
|
623
|
-
// because the select refresh team may solve it later.
|
|
624
|
-
components: _objectSpread(_objectSpread({}, selectComponents), {}, {
|
|
625
|
-
SingleValue: makeSingleValue({
|
|
626
|
-
lang: this.props.locale
|
|
627
|
-
})
|
|
628
|
-
})
|
|
629
|
-
// These are below the spread because I don't know what is in
|
|
630
|
-
// selectProps or not and what wil be overwritten
|
|
631
|
-
,
|
|
632
|
-
isClearable: true,
|
|
633
|
-
isInvalid: isInvalid,
|
|
634
|
-
spacing: spacing,
|
|
635
|
-
testId: testId
|
|
636
|
-
// These aren't part of `Select`'s API, but we're using them here.
|
|
637
|
-
// @ts-ignore -- Property 'calendarContainerRef' does not exist on type 'IntrinsicAttributes & LibraryManagedAttributes<(<Option extends unknown = OptionType, IsMulti extends boolean = false>(props: AtlaskitSelectProps<Option, IsMulti> & { ...; }) => Element), AtlaskitSelectProps<...> & { ...; }>'.
|
|
638
|
-
,
|
|
639
|
-
calendarContainerRef: calendarProps.calendarContainerRef,
|
|
640
|
-
calendarDisabled: calendarProps.calendarDisabled,
|
|
641
|
-
calendarDisabledDateFilter: calendarProps.calendarDisabledDateFilter,
|
|
642
|
-
calendarLocale: calendarProps.calendarLocale,
|
|
643
|
-
calendarMaxDate: calendarProps.calendarMaxDate,
|
|
644
|
-
calendarMinDate: calendarProps.calendarMinDate,
|
|
645
|
-
calendarRef: calendarProps.calendarRef,
|
|
646
|
-
calendarValue: calendarProps.calendarValue,
|
|
647
|
-
calendarView: calendarProps.calendarView,
|
|
648
|
-
calendarWeekStartDay: calendarProps.calendarWeekStartDay,
|
|
649
|
-
nextMonthLabel: nextMonthLabel,
|
|
650
|
-
onCalendarChange: calendarProps.onCalendarChange,
|
|
651
|
-
onCalendarSelect: calendarProps.onCalendarSelect,
|
|
652
|
-
previousMonthLabel: previousMonthLabel,
|
|
653
|
-
shouldSetFocusOnCurrentDay: calendarProps.shouldSetFocusOnCurrentDay,
|
|
654
|
-
menuInnerWrapper: calendarProps.menuInnerWrapper
|
|
655
|
-
})), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(IdProvider, {
|
|
592
|
+
}), shouldShowCalendarButton && !isDisabled ? /*#__PURE__*/React.createElement(IdProvider, {
|
|
656
593
|
prefix: "open-calendar-label--"
|
|
657
594
|
}, function (_ref4) {
|
|
658
595
|
var openCalendarLabelId = _ref4.id;
|
|
@@ -29,7 +29,7 @@ import { Menu } from '../internal/menu';
|
|
|
29
29
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
30
30
|
import { makeSingleValue } from '../internal/single-value';
|
|
31
31
|
var packageName = "@atlaskit/datetime-picker";
|
|
32
|
-
var packageVersion = "
|
|
32
|
+
var packageVersion = "17.1.6";
|
|
33
33
|
var styles = {
|
|
34
34
|
pickerContainerStyle: "_kqswh2mm",
|
|
35
35
|
dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -52,7 +52,7 @@ var analyticsAttributes = {
|
|
|
52
52
|
* - [Code](https://atlassian.design/components/datetime-picker/date-picker/code)
|
|
53
53
|
* - [Usage](https://atlassian.design/components/datetime-picker/date-picker/usage)
|
|
54
54
|
*/
|
|
55
|
-
var DatePicker = /*#__PURE__*/forwardRef(function (props,
|
|
55
|
+
var DatePicker = /*#__PURE__*/forwardRef(function (props, _forwardedRef) {
|
|
56
56
|
var containerRef = useRef(null);
|
|
57
57
|
var calendarRef = useRef(null);
|
|
58
58
|
var calendarButtonRef = useRef(null);
|
|
@@ -539,7 +539,7 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
539
539
|
"data-testid": testId && "".concat(testId, "--input")
|
|
540
540
|
}), /*#__PURE__*/React.createElement(Select, _extends({
|
|
541
541
|
appearance: appearance,
|
|
542
|
-
"aria-describedby":
|
|
542
|
+
"aria-describedby": ariaDescribedBy ? "".concat(ariaDescribedBy, " ").concat(valueId) : valueId,
|
|
543
543
|
label: label || undefined,
|
|
544
544
|
autoFocus: autoFocus,
|
|
545
545
|
clearControlLabel: clearControlLabel,
|
|
@@ -30,7 +30,7 @@ var DatePicker = componentWithCondition(function () {
|
|
|
30
30
|
return fg('dst-date-picker-use-functional-component');
|
|
31
31
|
}, DatePickerNew, DatePickerOld);
|
|
32
32
|
var packageName = "@atlaskit/datetime-picker";
|
|
33
|
-
var packageVersion = "
|
|
33
|
+
var packageVersion = "17.1.6";
|
|
34
34
|
var compiledStyles = {
|
|
35
35
|
datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
|
|
36
36
|
timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
|
|
@@ -31,7 +31,7 @@ var DatePicker = componentWithCondition(function () {
|
|
|
31
31
|
return fg('dst-date-picker-use-functional-component');
|
|
32
32
|
}, DatePickerNew, DatePickerOld);
|
|
33
33
|
var packageName = "@atlaskit/datetime-picker";
|
|
34
|
-
var packageVersion = "
|
|
34
|
+
var packageVersion = "17.1.6";
|
|
35
35
|
var analyticsAttributes = {
|
|
36
36
|
componentName: 'dateTimePicker',
|
|
37
37
|
packageName: packageName,
|
|
@@ -70,45 +70,45 @@ export var timePickerDefaultAriaLabel = 'Time';
|
|
|
70
70
|
* - [Code](https://atlassian.design/components/datetime-picker/code)
|
|
71
71
|
* - [Usage](https://atlassian.design/components/datetime-picker/usage)
|
|
72
72
|
*/
|
|
73
|
-
var DateTimePicker = /*#__PURE__*/forwardRef(function (
|
|
74
|
-
var ariaDescribedBy =
|
|
75
|
-
|
|
76
|
-
appearance =
|
|
77
|
-
|
|
78
|
-
autoFocus =
|
|
79
|
-
|
|
80
|
-
clearControlLabel =
|
|
81
|
-
|
|
82
|
-
datePickerPropsWithSelectProps =
|
|
83
|
-
|
|
84
|
-
defaultValue =
|
|
85
|
-
|
|
86
|
-
id =
|
|
87
|
-
|
|
88
|
-
innerProps =
|
|
89
|
-
|
|
90
|
-
isDisabled =
|
|
91
|
-
|
|
92
|
-
isInvalid =
|
|
93
|
-
|
|
94
|
-
isRequired =
|
|
95
|
-
|
|
96
|
-
name =
|
|
97
|
-
|
|
98
|
-
onBlur =
|
|
99
|
-
|
|
100
|
-
onChangeProp =
|
|
101
|
-
|
|
102
|
-
onFocus =
|
|
103
|
-
providedParseValue =
|
|
104
|
-
|
|
105
|
-
spacing =
|
|
106
|
-
|
|
107
|
-
locale =
|
|
108
|
-
testId =
|
|
109
|
-
|
|
110
|
-
timePickerPropsWithSelectProps =
|
|
111
|
-
providedValue =
|
|
73
|
+
var DateTimePicker = /*#__PURE__*/forwardRef(function (_ref2, _ref) {
|
|
74
|
+
var ariaDescribedBy = _ref2['aria-describedby'],
|
|
75
|
+
_ref2$appearance = _ref2.appearance,
|
|
76
|
+
appearance = _ref2$appearance === void 0 ? 'default' : _ref2$appearance,
|
|
77
|
+
_ref2$autoFocus = _ref2.autoFocus,
|
|
78
|
+
autoFocus = _ref2$autoFocus === void 0 ? false : _ref2$autoFocus,
|
|
79
|
+
_ref2$clearControlLab = _ref2.clearControlLabel,
|
|
80
|
+
clearControlLabel = _ref2$clearControlLab === void 0 ? 'clear' : _ref2$clearControlLab,
|
|
81
|
+
_ref2$datePickerProps = _ref2.datePickerProps,
|
|
82
|
+
datePickerPropsWithSelectProps = _ref2$datePickerProps === void 0 ? {} : _ref2$datePickerProps,
|
|
83
|
+
_ref2$defaultValue = _ref2.defaultValue,
|
|
84
|
+
defaultValue = _ref2$defaultValue === void 0 ? '' : _ref2$defaultValue,
|
|
85
|
+
_ref2$id = _ref2.id,
|
|
86
|
+
id = _ref2$id === void 0 ? '' : _ref2$id,
|
|
87
|
+
_ref2$innerProps = _ref2.innerProps,
|
|
88
|
+
innerProps = _ref2$innerProps === void 0 ? {} : _ref2$innerProps,
|
|
89
|
+
_ref2$isDisabled = _ref2.isDisabled,
|
|
90
|
+
isDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled,
|
|
91
|
+
_ref2$isInvalid = _ref2.isInvalid,
|
|
92
|
+
isInvalid = _ref2$isInvalid === void 0 ? false : _ref2$isInvalid,
|
|
93
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
94
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired,
|
|
95
|
+
_ref2$name = _ref2.name,
|
|
96
|
+
name = _ref2$name === void 0 ? '' : _ref2$name,
|
|
97
|
+
_ref2$onBlur = _ref2.onBlur,
|
|
98
|
+
onBlur = _ref2$onBlur === void 0 ? function (_event) {} : _ref2$onBlur,
|
|
99
|
+
_ref2$onChange = _ref2.onChange,
|
|
100
|
+
onChangeProp = _ref2$onChange === void 0 ? function (_value) {} : _ref2$onChange,
|
|
101
|
+
_ref2$onFocus = _ref2.onFocus,
|
|
102
|
+
onFocus = _ref2$onFocus === void 0 ? function (_event) {} : _ref2$onFocus,
|
|
103
|
+
providedParseValue = _ref2.parseValue,
|
|
104
|
+
_ref2$spacing = _ref2.spacing,
|
|
105
|
+
spacing = _ref2$spacing === void 0 ? 'default' : _ref2$spacing,
|
|
106
|
+
_ref2$locale = _ref2.locale,
|
|
107
|
+
locale = _ref2$locale === void 0 ? 'en-US' : _ref2$locale,
|
|
108
|
+
testId = _ref2.testId,
|
|
109
|
+
_ref2$timePickerProps = _ref2.timePickerProps,
|
|
110
|
+
timePickerPropsWithSelectProps = _ref2$timePickerProps === void 0 ? {} : _ref2$timePickerProps,
|
|
111
|
+
providedValue = _ref2.value;
|
|
112
112
|
var _useState = useState((datePickerPropsWithSelectProps === null || datePickerPropsWithSelectProps === void 0 ? void 0 : datePickerPropsWithSelectProps.defaultValue) || ''),
|
|
113
113
|
_useState2 = _slicedToArray(_useState, 2),
|
|
114
114
|
dateValue = _useState2[0],
|
|
@@ -235,10 +235,10 @@ var DateTimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
235
235
|
action: 'selectedDate',
|
|
236
236
|
actionSubject: 'datePicker'
|
|
237
237
|
}, analyticsAttributes));
|
|
238
|
-
var onValueChange = function onValueChange(
|
|
239
|
-
var providedDateValue =
|
|
240
|
-
providedTimeValue =
|
|
241
|
-
providedZoneValue =
|
|
238
|
+
var onValueChange = function onValueChange(_ref3) {
|
|
239
|
+
var providedDateValue = _ref3.providedDateValue,
|
|
240
|
+
providedTimeValue = _ref3.providedTimeValue,
|
|
241
|
+
providedZoneValue = _ref3.providedZoneValue;
|
|
242
242
|
setDateValue(providedDateValue);
|
|
243
243
|
setTimeValue(providedTimeValue);
|
|
244
244
|
setZoneValue(providedZoneValue);
|
|
@@ -17,7 +17,7 @@ import parseTime from '../internal/parse-time';
|
|
|
17
17
|
import { convertTokens } from '../internal/parse-tokens';
|
|
18
18
|
import { makeSingleValue } from '../internal/single-value';
|
|
19
19
|
var packageName = "@atlaskit/datetime-picker";
|
|
20
|
-
var packageVersion = "
|
|
20
|
+
var packageVersion = "17.1.6";
|
|
21
21
|
var menuStyles = {
|
|
22
22
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
23
23
|
position: 'static',
|
|
@@ -41,60 +41,60 @@ var analyticsAttributes = {
|
|
|
41
41
|
* - [Code](https://atlassian.design/components/datetime-picker/time-picker/code)
|
|
42
42
|
* - [Usage](https://atlassian.design/components/datetime-picker/time-picker/usage)
|
|
43
43
|
*/
|
|
44
|
-
var TimePicker = /*#__PURE__*/forwardRef(function (
|
|
45
|
-
var ariaDescribedBy =
|
|
46
|
-
|
|
47
|
-
appearance =
|
|
48
|
-
|
|
49
|
-
autoFocus =
|
|
50
|
-
|
|
51
|
-
clearControlLabel =
|
|
52
|
-
|
|
53
|
-
defaultIsOpen =
|
|
54
|
-
|
|
55
|
-
defaultValue =
|
|
56
|
-
formatDisplayLabel =
|
|
57
|
-
|
|
58
|
-
hideIcon =
|
|
59
|
-
|
|
60
|
-
id =
|
|
61
|
-
|
|
62
|
-
innerProps =
|
|
63
|
-
|
|
64
|
-
isDisabled =
|
|
65
|
-
|
|
66
|
-
isInvalid =
|
|
67
|
-
|
|
68
|
-
isRequired =
|
|
69
|
-
providedIsOpen =
|
|
70
|
-
|
|
71
|
-
label =
|
|
72
|
-
|
|
73
|
-
locale =
|
|
74
|
-
|
|
75
|
-
name =
|
|
76
|
-
|
|
77
|
-
providedOnBlur =
|
|
78
|
-
|
|
79
|
-
providedOnChange =
|
|
80
|
-
|
|
81
|
-
providedOnFocus =
|
|
82
|
-
|
|
83
|
-
parseInputValue =
|
|
44
|
+
var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, _ref) {
|
|
45
|
+
var ariaDescribedBy = _ref2['aria-describedby'],
|
|
46
|
+
_ref2$appearance = _ref2.appearance,
|
|
47
|
+
appearance = _ref2$appearance === void 0 ? 'default' : _ref2$appearance,
|
|
48
|
+
_ref2$autoFocus = _ref2.autoFocus,
|
|
49
|
+
autoFocus = _ref2$autoFocus === void 0 ? false : _ref2$autoFocus,
|
|
50
|
+
_ref2$clearControlLab = _ref2.clearControlLabel,
|
|
51
|
+
clearControlLabel = _ref2$clearControlLab === void 0 ? 'clear timepicker' : _ref2$clearControlLab,
|
|
52
|
+
_ref2$defaultIsOpen = _ref2.defaultIsOpen,
|
|
53
|
+
defaultIsOpen = _ref2$defaultIsOpen === void 0 ? false : _ref2$defaultIsOpen,
|
|
54
|
+
_ref2$defaultValue = _ref2.defaultValue,
|
|
55
|
+
defaultValue = _ref2$defaultValue === void 0 ? '' : _ref2$defaultValue,
|
|
56
|
+
formatDisplayLabel = _ref2.formatDisplayLabel,
|
|
57
|
+
_ref2$hideIcon = _ref2.hideIcon,
|
|
58
|
+
hideIcon = _ref2$hideIcon === void 0 ? false : _ref2$hideIcon,
|
|
59
|
+
_ref2$id = _ref2.id,
|
|
60
|
+
id = _ref2$id === void 0 ? '' : _ref2$id,
|
|
61
|
+
_ref2$innerProps = _ref2.innerProps,
|
|
62
|
+
innerProps = _ref2$innerProps === void 0 ? {} : _ref2$innerProps,
|
|
63
|
+
_ref2$isDisabled = _ref2.isDisabled,
|
|
64
|
+
isDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled,
|
|
65
|
+
_ref2$isInvalid = _ref2.isInvalid,
|
|
66
|
+
isInvalid = _ref2$isInvalid === void 0 ? false : _ref2$isInvalid,
|
|
67
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
68
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired,
|
|
69
|
+
providedIsOpen = _ref2.isOpen,
|
|
70
|
+
_ref2$label = _ref2.label,
|
|
71
|
+
label = _ref2$label === void 0 ? '' : _ref2$label,
|
|
72
|
+
_ref2$locale = _ref2.locale,
|
|
73
|
+
locale = _ref2$locale === void 0 ? 'en-US' : _ref2$locale,
|
|
74
|
+
_ref2$name = _ref2.name,
|
|
75
|
+
name = _ref2$name === void 0 ? '' : _ref2$name,
|
|
76
|
+
_ref2$onBlur = _ref2.onBlur,
|
|
77
|
+
providedOnBlur = _ref2$onBlur === void 0 ? __noop : _ref2$onBlur,
|
|
78
|
+
_ref2$onChange = _ref2.onChange,
|
|
79
|
+
providedOnChange = _ref2$onChange === void 0 ? __noop : _ref2$onChange,
|
|
80
|
+
_ref2$onFocus = _ref2.onFocus,
|
|
81
|
+
providedOnFocus = _ref2$onFocus === void 0 ? __noop : _ref2$onFocus,
|
|
82
|
+
_ref2$parseInputValue = _ref2.parseInputValue,
|
|
83
|
+
parseInputValue = _ref2$parseInputValue === void 0 ? function (time, _timeFormat) {
|
|
84
84
|
return parseTime(time);
|
|
85
|
-
} :
|
|
86
|
-
placeholder =
|
|
87
|
-
|
|
88
|
-
selectProps =
|
|
89
|
-
|
|
90
|
-
spacing =
|
|
91
|
-
testId =
|
|
92
|
-
timeFormat =
|
|
93
|
-
|
|
94
|
-
timeIsEditable =
|
|
95
|
-
|
|
96
|
-
times =
|
|
97
|
-
providedValue =
|
|
85
|
+
} : _ref2$parseInputValue,
|
|
86
|
+
placeholder = _ref2.placeholder,
|
|
87
|
+
_ref2$selectProps = _ref2.selectProps,
|
|
88
|
+
selectProps = _ref2$selectProps === void 0 ? {} : _ref2$selectProps,
|
|
89
|
+
_ref2$spacing = _ref2.spacing,
|
|
90
|
+
spacing = _ref2$spacing === void 0 ? 'default' : _ref2$spacing,
|
|
91
|
+
testId = _ref2.testId,
|
|
92
|
+
timeFormat = _ref2.timeFormat,
|
|
93
|
+
_ref2$timeIsEditable = _ref2.timeIsEditable,
|
|
94
|
+
timeIsEditable = _ref2$timeIsEditable === void 0 ? false : _ref2$timeIsEditable,
|
|
95
|
+
_ref2$times = _ref2.times,
|
|
96
|
+
times = _ref2$times === void 0 ? defaultTimes : _ref2$times,
|
|
97
|
+
providedValue = _ref2.value;
|
|
98
98
|
var _useState = useState(null),
|
|
99
99
|
_useState2 = _slicedToArray(_useState, 2),
|
|
100
100
|
containerRef = _useState2[0],
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
3
|
var _excluded = ["children", "className", "clearValue", "cx", "data", "getStyles", "getValue", "hasValue", "isDisabled", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue"];
|
|
5
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
4
|
import React from 'react';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
5
|
import { components } from '@atlaskit/select';
|
|
10
6
|
|
|
11
7
|
/**
|
|
@@ -43,11 +39,10 @@ function makeSingleValue(_ref) {
|
|
|
43
39
|
getStyles: getStyles,
|
|
44
40
|
getValue: getValue,
|
|
45
41
|
hasValue: hasValue,
|
|
46
|
-
innerProps:
|
|
47
|
-
id: id
|
|
48
|
-
} : {}), {}, {
|
|
42
|
+
innerProps: {
|
|
43
|
+
id: id,
|
|
49
44
|
lang: lang
|
|
50
|
-
}
|
|
45
|
+
},
|
|
51
46
|
isDisabled: isDisabled,
|
|
52
47
|
isMulti: isMulti,
|
|
53
48
|
isRtl: isRtl,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "17.1.
|
|
3
|
+
"version": "17.1.7",
|
|
4
4
|
"description": "A date time picker allows the user to select an associated date and time.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/button": "^23.5.0",
|
|
37
37
|
"@atlaskit/calendar": "^17.1.0",
|
|
38
38
|
"@atlaskit/css": "^0.15.0",
|
|
39
|
-
"@atlaskit/ds-lib": "^5.
|
|
39
|
+
"@atlaskit/ds-lib": "^5.2.0",
|
|
40
40
|
"@atlaskit/icon": "^28.5.0",
|
|
41
41
|
"@atlaskit/layering": "^3.2.0",
|
|
42
42
|
"@atlaskit/locale": "^3.0.0",
|
|
@@ -113,9 +113,6 @@
|
|
|
113
113
|
},
|
|
114
114
|
"platform-visual-refresh-icons": {
|
|
115
115
|
"type": "boolean"
|
|
116
|
-
},
|
|
117
|
-
"platform-dtp_a11y_fix-dsp-23950": {
|
|
118
|
-
"type": "boolean"
|
|
119
116
|
}
|
|
120
117
|
},
|
|
121
118
|
"homepage": "https://atlassian.design/components/datetime-picker/"
|