@atlaskit/datetime-picker 12.10.2 → 12.10.4
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 +12 -0
- package/dist/cjs/components/date-picker.js +13 -13
- package/dist/cjs/components/date-time-picker.js +15 -20
- package/dist/cjs/components/time-picker.js +10 -12
- package/dist/cjs/internal/fixed-layer.js +2 -3
- package/dist/cjs/internal/index.js +5 -10
- package/dist/cjs/internal/single-value.js +2 -3
- package/dist/es2019/components/date-picker.js +8 -6
- package/dist/es2019/components/date-time-picker.js +8 -9
- package/dist/es2019/components/time-picker.js +5 -5
- package/dist/esm/components/date-picker.js +10 -8
- package/dist/esm/components/date-time-picker.js +10 -11
- package/dist/esm/components/time-picker.js +7 -7
- package/dist/types/components/date-picker.d.ts +10 -10
- package/dist/types/components/date-time-picker.d.ts +9 -9
- package/dist/types/components/time-picker.d.ts +12 -12
- package/dist/types-ts4.5/components/date-picker.d.ts +10 -10
- package/dist/types-ts4.5/components/date-time-picker.d.ts +9 -9
- package/dist/types-ts4.5/components/time-picker.d.ts +12 -12
- package/package.json +9 -7
- package/report.api.md +20 -20
- package/tmp/api-report-tmp.d.ts +20 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 12.10.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#42445](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42445) [`5645b5a1132`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5645b5a1132) - Fix TS errors for forge-ui in AFM
|
|
8
|
+
|
|
9
|
+
## 12.10.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#41628](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41628) [`b05664f7aba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b05664f7aba) - Use feature flag to toggle if we enable UNSAFE_LAYERING
|
|
14
|
+
|
|
3
15
|
## 12.10.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -39,7 +39,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
39
39
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
40
40
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
41
41
|
var packageName = "@atlaskit/datetime-picker";
|
|
42
|
-
var packageVersion = "12.10.
|
|
42
|
+
var packageVersion = "12.10.4";
|
|
43
43
|
function getValidDate(iso) {
|
|
44
44
|
var date = (0, _dateFns.parseISO)(iso);
|
|
45
45
|
return (0, _dateFns.isValid)(date) ? {
|
|
@@ -61,7 +61,9 @@ var menuStyles = (0, _react2.css)({
|
|
|
61
61
|
var Menu = function Menu(_ref) {
|
|
62
62
|
var selectProps = _ref.selectProps,
|
|
63
63
|
innerProps = _ref.innerProps;
|
|
64
|
-
return (0, _react2.jsx)(_layering.UNSAFE_LAYERING,
|
|
64
|
+
return (0, _react2.jsx)(_layering.UNSAFE_LAYERING, {
|
|
65
|
+
isDisabled: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.layering_qmiw3') ? false : true
|
|
66
|
+
}, (0, _react2.jsx)(_fixedLayer.default, {
|
|
65
67
|
inputValue: selectProps.inputValue,
|
|
66
68
|
containerRef: selectProps.calendarContainerRef,
|
|
67
69
|
content: (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
@@ -103,9 +105,9 @@ var datePickerDefaultProps = {
|
|
|
103
105
|
// These disables are here for proper typing when used as defaults. They
|
|
104
106
|
// should *not* use the `noop` function.
|
|
105
107
|
/* eslint-disable @repo/internal/react/use-noop */
|
|
106
|
-
onBlur: function onBlur(
|
|
107
|
-
onChange: function onChange(
|
|
108
|
-
onFocus: function onFocus(
|
|
108
|
+
onBlur: function onBlur(_event) {},
|
|
109
|
+
onChange: function onChange(_value) {},
|
|
110
|
+
onFocus: function onFocus(_event) {},
|
|
109
111
|
/* eslint-enable @repo/internal/react/use-noop */
|
|
110
112
|
selectProps: {},
|
|
111
113
|
spacing: 'default',
|
|
@@ -113,7 +115,7 @@ var datePickerDefaultProps = {
|
|
|
113
115
|
// Not including a default prop for value as it will
|
|
114
116
|
// Make the component a controlled component
|
|
115
117
|
};
|
|
116
|
-
var DatePicker = /*#__PURE__*/function (_Component) {
|
|
118
|
+
var DatePicker = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Component) {
|
|
117
119
|
(0, _inherits2.default)(DatePicker, _Component);
|
|
118
120
|
var _super = _createSuper(DatePicker);
|
|
119
121
|
function DatePicker(props) {
|
|
@@ -274,11 +276,11 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
274
276
|
event.preventDefault();
|
|
275
277
|
if (!_this.isDateDisabled(calendarValue)) {
|
|
276
278
|
var _this$getSafeState3 = _this.getSafeState(),
|
|
277
|
-
|
|
279
|
+
_value2 = _this$getSafeState3.value;
|
|
278
280
|
// Get a safe `calendarValue` in case the value exceeds the maximum
|
|
279
281
|
// allowed by ISO 8601
|
|
280
282
|
var safeCalendarValue = _this.getSafeCalendarValue(calendarValue);
|
|
281
|
-
var valueChanged = safeCalendarValue !==
|
|
283
|
+
var valueChanged = safeCalendarValue !== _value2;
|
|
282
284
|
_this.setState({
|
|
283
285
|
selectInputValue: '',
|
|
284
286
|
isOpen: false,
|
|
@@ -307,7 +309,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
307
309
|
_this.setState(changedState);
|
|
308
310
|
_this.props.onChange('');
|
|
309
311
|
});
|
|
310
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onSelectChange", function (
|
|
312
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onSelectChange", function (_value, action) {
|
|
311
313
|
// Used for native clear event in React Select
|
|
312
314
|
// Triggered when clicking ClearIndicator or backspace with no value
|
|
313
315
|
if (action.action === 'clear') {
|
|
@@ -533,9 +535,8 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
533
535
|
}]);
|
|
534
536
|
return DatePicker;
|
|
535
537
|
}(_react.Component);
|
|
536
|
-
exports.DatePickerWithoutAnalytics = DatePicker;
|
|
537
538
|
(0, _defineProperty2.default)(DatePicker, "defaultProps", datePickerDefaultProps);
|
|
538
|
-
var _default = (0, _analyticsNext.withAnalyticsContext)({
|
|
539
|
+
var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
539
540
|
componentName: 'datePicker',
|
|
540
541
|
packageName: packageName,
|
|
541
542
|
packageVersion: packageVersion
|
|
@@ -549,5 +550,4 @@ var _default = (0, _analyticsNext.withAnalyticsContext)({
|
|
|
549
550
|
packageVersion: packageVersion
|
|
550
551
|
}
|
|
551
552
|
})
|
|
552
|
-
})(DatePicker));
|
|
553
|
-
exports.default = _default;
|
|
553
|
+
})(DatePicker));
|
|
@@ -31,7 +31,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
31
31
|
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; }
|
|
32
32
|
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; } /** @jsx jsx */
|
|
33
33
|
var packageName = "@atlaskit/datetime-picker";
|
|
34
|
-
var packageVersion = "12.10.
|
|
34
|
+
var packageVersion = "12.10.4";
|
|
35
35
|
var isInvalidBorderStyles = (0, _react2.css)({
|
|
36
36
|
borderColor: "var(--ds-border-danger, ".concat(_colors.R400, ")")
|
|
37
37
|
});
|
|
@@ -98,16 +98,15 @@ var timePickerContainerStyles = (0, _react2.css)({
|
|
|
98
98
|
});
|
|
99
99
|
var iconContainerStyles = (0, _react2.css)({
|
|
100
100
|
display: 'flex',
|
|
101
|
-
paddingTop: "var(--ds-space-075, 6px)",
|
|
102
|
-
paddingRight: "var(--ds-space-100, 8px)",
|
|
103
|
-
paddingBottom: "var(--ds-space-075, 6px)",
|
|
104
|
-
paddingLeft: "var(--ds-space-050, 4px)",
|
|
105
|
-
// ICON_PADDING (2) * 2
|
|
106
101
|
alignItems: 'center',
|
|
107
102
|
flexBasis: 'inherit',
|
|
108
103
|
backgroundColor: 'inherit',
|
|
109
104
|
border: 'none',
|
|
110
105
|
color: "var(--ds-text-subtlest, ".concat(_colors.N70, ")"),
|
|
106
|
+
paddingBlockEnd: "var(--ds-space-075, 6px)",
|
|
107
|
+
paddingBlockStart: "var(--ds-space-075, 6px)",
|
|
108
|
+
paddingInlineEnd: "var(--ds-space-100, 8px)",
|
|
109
|
+
paddingInlineStart: "var(--ds-space-050, 4px)",
|
|
111
110
|
transition: "color 150ms",
|
|
112
111
|
'&:hover': {
|
|
113
112
|
color: "var(--ds-text-subtle, ".concat(_colors.N500, ")")
|
|
@@ -137,9 +136,9 @@ var dateTimePickerDefaultProps = {
|
|
|
137
136
|
// These disables are here for proper typing when used as defaults. They
|
|
138
137
|
// should *not* use the `noop` function.
|
|
139
138
|
/* eslint-disable @repo/internal/react/use-noop */
|
|
140
|
-
onBlur: function onBlur(
|
|
141
|
-
onChange: function onChange(
|
|
142
|
-
onFocus: function onFocus(
|
|
139
|
+
onBlur: function onBlur(_event) {},
|
|
140
|
+
onChange: function onChange(_value) {},
|
|
141
|
+
onFocus: function onFocus(_event) {},
|
|
143
142
|
/* eslint-enable @repo/internal/react/use-noop */
|
|
144
143
|
innerProps: {},
|
|
145
144
|
id: '',
|
|
@@ -157,11 +156,9 @@ var dateTimePickerDefaultProps = {
|
|
|
157
156
|
// Make the component a controlled component
|
|
158
157
|
};
|
|
159
158
|
|
|
160
|
-
var datePickerDefaultAriaLabel = 'Date';
|
|
161
|
-
exports.
|
|
162
|
-
var
|
|
163
|
-
exports.timePickerDefaultAriaLabel = timePickerDefaultAriaLabel;
|
|
164
|
-
var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
159
|
+
var datePickerDefaultAriaLabel = exports.datePickerDefaultAriaLabel = 'Date';
|
|
160
|
+
var timePickerDefaultAriaLabel = exports.timePickerDefaultAriaLabel = 'Time';
|
|
161
|
+
var DateTimePicker = exports.DateTimePickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
165
162
|
(0, _inherits2.default)(DateTimePicker, _React$Component);
|
|
166
163
|
var _super = _createSuper(DateTimePicker);
|
|
167
164
|
function DateTimePicker() {
|
|
@@ -243,8 +240,8 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
243
240
|
zoneValue: zoneValue
|
|
244
241
|
});
|
|
245
242
|
if (dateValue && timeValue) {
|
|
246
|
-
var
|
|
247
|
-
var _this$parseValue = this.parseValue(
|
|
243
|
+
var _value2 = (0, _internal.formatDateTimeZoneIntoIso)(dateValue, timeValue, zoneValue);
|
|
244
|
+
var _this$parseValue = this.parseValue(_value2, dateValue, timeValue, zoneValue),
|
|
248
245
|
parsedZone = _this$parseValue.zoneValue;
|
|
249
246
|
var valueWithValidZone = (0, _internal.formatDateTimeZoneIntoIso)(dateValue, timeValue, parsedZone);
|
|
250
247
|
this.setState({
|
|
@@ -356,9 +353,8 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
356
353
|
}]);
|
|
357
354
|
return DateTimePicker;
|
|
358
355
|
}(_react.default.Component);
|
|
359
|
-
exports.DateTimePickerWithoutAnalytics = DateTimePicker;
|
|
360
356
|
(0, _defineProperty2.default)(DateTimePicker, "defaultProps", dateTimePickerDefaultProps);
|
|
361
|
-
var _default = (0, _analyticsNext.withAnalyticsContext)({
|
|
357
|
+
var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
362
358
|
componentName: 'dateTimePicker',
|
|
363
359
|
packageName: packageName,
|
|
364
360
|
packageVersion: packageVersion
|
|
@@ -372,5 +368,4 @@ var _default = (0, _analyticsNext.withAnalyticsContext)({
|
|
|
372
368
|
packageVersion: packageVersion
|
|
373
369
|
}
|
|
374
370
|
})
|
|
375
|
-
})(DateTimePicker));
|
|
376
|
-
exports.default = _default;
|
|
371
|
+
})(DateTimePicker));
|
|
@@ -37,7 +37,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
37
37
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
38
38
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
39
|
var packageName = "@atlaskit/datetime-picker";
|
|
40
|
-
var packageVersion = "12.10.
|
|
40
|
+
var packageVersion = "12.10.4";
|
|
41
41
|
var menuStyles = {
|
|
42
42
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
43
43
|
position: 'static',
|
|
@@ -72,11 +72,11 @@ var timePickerDefaultProps = {
|
|
|
72
72
|
// These disables are here for proper typing when used as defaults. They
|
|
73
73
|
// should *not* use the `noop` function.
|
|
74
74
|
/* eslint-disable @repo/internal/react/use-noop */
|
|
75
|
-
onBlur: function onBlur(
|
|
76
|
-
onChange: function onChange(
|
|
77
|
-
onFocus: function onFocus(
|
|
75
|
+
onBlur: function onBlur(_event) {},
|
|
76
|
+
onChange: function onChange(_value) {},
|
|
77
|
+
onFocus: function onFocus(_event) {},
|
|
78
78
|
/* eslint-enable @repo/internal/react/use-noop */
|
|
79
|
-
parseInputValue: function parseInputValue(time,
|
|
79
|
+
parseInputValue: function parseInputValue(time, _timeFormat) {
|
|
80
80
|
return (0, _parseTime.default)(time);
|
|
81
81
|
},
|
|
82
82
|
selectProps: {},
|
|
@@ -87,7 +87,7 @@ var timePickerDefaultProps = {
|
|
|
87
87
|
// Not including a default prop for value as it will
|
|
88
88
|
// Make the component a controlled component
|
|
89
89
|
};
|
|
90
|
-
var TimePicker = /*#__PURE__*/function (_React$Component) {
|
|
90
|
+
var TimePicker = exports.TimePickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
91
91
|
(0, _inherits2.default)(TimePicker, _React$Component);
|
|
92
92
|
var _super = _createSuper(TimePicker);
|
|
93
93
|
function TimePicker() {
|
|
@@ -130,10 +130,10 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
130
130
|
if (_this.props.timeIsEditable) {
|
|
131
131
|
var _this$props = _this.props,
|
|
132
132
|
parseInputValue = _this$props.parseInputValue,
|
|
133
|
-
|
|
133
|
+
_timeFormat2 = _this$props.timeFormat;
|
|
134
134
|
var sanitizedInput;
|
|
135
135
|
try {
|
|
136
|
-
sanitizedInput = parseInputValue(inputValue,
|
|
136
|
+
sanitizedInput = parseInputValue(inputValue, _timeFormat2 || _internal.defaultTimeFormat);
|
|
137
137
|
} catch (e) {
|
|
138
138
|
return; // do nothing, the main validation should happen in the form
|
|
139
139
|
}
|
|
@@ -339,9 +339,8 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
339
339
|
}]);
|
|
340
340
|
return TimePicker;
|
|
341
341
|
}(_react.default.Component);
|
|
342
|
-
exports.TimePickerWithoutAnalytics = TimePicker;
|
|
343
342
|
(0, _defineProperty2.default)(TimePicker, "defaultProps", timePickerDefaultProps);
|
|
344
|
-
var _default = (0, _analyticsNext.withAnalyticsContext)({
|
|
343
|
+
var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
345
344
|
componentName: 'timePicker',
|
|
346
345
|
packageName: packageName,
|
|
347
346
|
packageVersion: packageVersion
|
|
@@ -355,5 +354,4 @@ var _default = (0, _analyticsNext.withAnalyticsContext)({
|
|
|
355
354
|
packageVersion: packageVersion
|
|
356
355
|
}
|
|
357
356
|
})
|
|
358
|
-
})(TimePicker));
|
|
359
|
-
exports.default = _default;
|
|
357
|
+
})(TimePicker));
|
|
@@ -28,7 +28,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
28
28
|
* Scroll is locked outside the layer to prevent the layered content from detaching from the
|
|
29
29
|
* container ref.
|
|
30
30
|
*/
|
|
31
|
-
var FixedLayer = /*#__PURE__*/function (_React$Component) {
|
|
31
|
+
var FixedLayer = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
32
32
|
(0, _inherits2.default)(FixedLayer, _React$Component);
|
|
33
33
|
var _super = _createSuper(FixedLayer);
|
|
34
34
|
function FixedLayer() {
|
|
@@ -100,5 +100,4 @@ var FixedLayer = /*#__PURE__*/function (_React$Component) {
|
|
|
100
100
|
}
|
|
101
101
|
}]);
|
|
102
102
|
return FixedLayer;
|
|
103
|
-
}(_react.default.Component);
|
|
104
|
-
exports.default = FixedLayer;
|
|
103
|
+
}(_react.default.Component);
|
|
@@ -10,21 +10,16 @@ exports.placeholderDatetime = void 0;
|
|
|
10
10
|
/**
|
|
11
11
|
* This component is used to hide portions of Select component.
|
|
12
12
|
*/
|
|
13
|
-
var EmptyComponent = function EmptyComponent() {
|
|
13
|
+
var EmptyComponent = exports.EmptyComponent = function EmptyComponent() {
|
|
14
14
|
return null;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
// This date was chosen to clearly show date and time formats (day > 12)
|
|
18
18
|
// e.g. 18/02/1993 vs. 2/18/1993 and 1:00 PM vs 13:00
|
|
19
|
-
exports.
|
|
20
|
-
var
|
|
21
|
-
exports.
|
|
22
|
-
var
|
|
23
|
-
exports.defaultTimes = defaultTimes;
|
|
24
|
-
var defaultTimeFormat = 'h:mma';
|
|
25
|
-
exports.defaultTimeFormat = defaultTimeFormat;
|
|
26
|
-
var defaultDateFormat = 'YYYY/MM/DD';
|
|
27
|
-
exports.defaultDateFormat = defaultDateFormat;
|
|
19
|
+
var placeholderDatetime = exports.placeholderDatetime = new Date(1993, 1, 18, 13);
|
|
20
|
+
var defaultTimes = exports.defaultTimes = ['09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30', '18:00'];
|
|
21
|
+
var defaultTimeFormat = exports.defaultTimeFormat = 'h:mma';
|
|
22
|
+
var defaultDateFormat = exports.defaultDateFormat = 'YYYY/MM/DD';
|
|
28
23
|
function padToTwo(number) {
|
|
29
24
|
return number <= 99 ? "0".concat(number).slice(-2) : "".concat(number);
|
|
30
25
|
}
|
|
@@ -14,7 +14,7 @@ var _excluded = ["children"];
|
|
|
14
14
|
* This creates a functional component that `react-select` will use to make the
|
|
15
15
|
* SingleValue part of the different pickers.
|
|
16
16
|
*/
|
|
17
|
-
var makeSingleValue = function makeSingleValue(_ref) {
|
|
17
|
+
var makeSingleValue = exports.makeSingleValue = function makeSingleValue(_ref) {
|
|
18
18
|
var lang = _ref.lang;
|
|
19
19
|
return function (_ref2) {
|
|
20
20
|
var children = _ref2.children,
|
|
@@ -25,5 +25,4 @@ var makeSingleValue = function makeSingleValue(_ref) {
|
|
|
25
25
|
}
|
|
26
26
|
}), children);
|
|
27
27
|
};
|
|
28
|
-
};
|
|
29
|
-
exports.makeSingleValue = makeSingleValue;
|
|
28
|
+
};
|
|
@@ -19,7 +19,7 @@ import FixedLayer from '../internal/fixed-layer';
|
|
|
19
19
|
import { makeSingleValue } from '../internal/single-value';
|
|
20
20
|
import { convertTokens } from './utils';
|
|
21
21
|
const packageName = "@atlaskit/datetime-picker";
|
|
22
|
-
const packageVersion = "12.10.
|
|
22
|
+
const packageVersion = "12.10.4";
|
|
23
23
|
function getValidDate(iso) {
|
|
24
24
|
const date = parseISO(iso);
|
|
25
25
|
return isValid(date) ? {
|
|
@@ -41,7 +41,9 @@ const menuStyles = css({
|
|
|
41
41
|
const Menu = ({
|
|
42
42
|
selectProps,
|
|
43
43
|
innerProps
|
|
44
|
-
}) => jsx(UNSAFE_LAYERING,
|
|
44
|
+
}) => jsx(UNSAFE_LAYERING, {
|
|
45
|
+
isDisabled: getBooleanFF('platform.design-system-team.layering_qmiw3') ? false : true
|
|
46
|
+
}, jsx(FixedLayer, {
|
|
45
47
|
inputValue: selectProps.inputValue,
|
|
46
48
|
containerRef: selectProps.calendarContainerRef,
|
|
47
49
|
content: jsx("div", _extends({
|
|
@@ -80,9 +82,9 @@ const datePickerDefaultProps = {
|
|
|
80
82
|
// These disables are here for proper typing when used as defaults. They
|
|
81
83
|
// should *not* use the `noop` function.
|
|
82
84
|
/* eslint-disable @repo/internal/react/use-noop */
|
|
83
|
-
onBlur:
|
|
84
|
-
onChange:
|
|
85
|
-
onFocus:
|
|
85
|
+
onBlur: _event => {},
|
|
86
|
+
onChange: _value => {},
|
|
87
|
+
onFocus: _event => {},
|
|
86
88
|
/* eslint-enable @repo/internal/react/use-noop */
|
|
87
89
|
selectProps: {},
|
|
88
90
|
spacing: 'default',
|
|
@@ -287,7 +289,7 @@ class DatePicker extends Component {
|
|
|
287
289
|
this.setState(changedState);
|
|
288
290
|
this.props.onChange('');
|
|
289
291
|
});
|
|
290
|
-
_defineProperty(this, "onSelectChange", (
|
|
292
|
+
_defineProperty(this, "onSelectChange", (_value, action) => {
|
|
291
293
|
// Used for native clear event in React Select
|
|
292
294
|
// Triggered when clicking ClearIndicator or backspace with no value
|
|
293
295
|
if (action.action === 'clear') {
|
|
@@ -15,7 +15,7 @@ import DatePicker from './date-picker';
|
|
|
15
15
|
import TimePicker from './time-picker';
|
|
16
16
|
import { convertTokens } from './utils';
|
|
17
17
|
const packageName = "@atlaskit/datetime-picker";
|
|
18
|
-
const packageVersion = "12.10.
|
|
18
|
+
const packageVersion = "12.10.4";
|
|
19
19
|
const isInvalidBorderStyles = css({
|
|
20
20
|
borderColor: `var(--ds-border-danger, ${R400})`
|
|
21
21
|
});
|
|
@@ -82,16 +82,15 @@ const timePickerContainerStyles = css({
|
|
|
82
82
|
});
|
|
83
83
|
const iconContainerStyles = css({
|
|
84
84
|
display: 'flex',
|
|
85
|
-
paddingTop: "var(--ds-space-075, 6px)",
|
|
86
|
-
paddingRight: "var(--ds-space-100, 8px)",
|
|
87
|
-
paddingBottom: "var(--ds-space-075, 6px)",
|
|
88
|
-
paddingLeft: "var(--ds-space-050, 4px)",
|
|
89
|
-
// ICON_PADDING (2) * 2
|
|
90
85
|
alignItems: 'center',
|
|
91
86
|
flexBasis: 'inherit',
|
|
92
87
|
backgroundColor: 'inherit',
|
|
93
88
|
border: 'none',
|
|
94
89
|
color: `var(--ds-text-subtlest, ${N70})`,
|
|
90
|
+
paddingBlockEnd: "var(--ds-space-075, 6px)",
|
|
91
|
+
paddingBlockStart: "var(--ds-space-075, 6px)",
|
|
92
|
+
paddingInlineEnd: "var(--ds-space-100, 8px)",
|
|
93
|
+
paddingInlineStart: "var(--ds-space-050, 4px)",
|
|
95
94
|
transition: `color 150ms`,
|
|
96
95
|
'&:hover': {
|
|
97
96
|
color: `var(--ds-text-subtle, ${N500})`
|
|
@@ -120,9 +119,9 @@ const dateTimePickerDefaultProps = {
|
|
|
120
119
|
// These disables are here for proper typing when used as defaults. They
|
|
121
120
|
// should *not* use the `noop` function.
|
|
122
121
|
/* eslint-disable @repo/internal/react/use-noop */
|
|
123
|
-
onBlur:
|
|
124
|
-
onChange:
|
|
125
|
-
onFocus:
|
|
122
|
+
onBlur: _event => {},
|
|
123
|
+
onChange: _value => {},
|
|
124
|
+
onFocus: _event => {},
|
|
126
125
|
/* eslint-enable @repo/internal/react/use-noop */
|
|
127
126
|
innerProps: {},
|
|
128
127
|
id: '',
|
|
@@ -16,7 +16,7 @@ import parseTime from '../internal/parse-time';
|
|
|
16
16
|
import { makeSingleValue } from '../internal/single-value';
|
|
17
17
|
import { convertTokens } from './utils';
|
|
18
18
|
const packageName = "@atlaskit/datetime-picker";
|
|
19
|
-
const packageVersion = "12.10.
|
|
19
|
+
const packageVersion = "12.10.4";
|
|
20
20
|
const menuStyles = {
|
|
21
21
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
22
22
|
position: 'static',
|
|
@@ -50,11 +50,11 @@ const timePickerDefaultProps = {
|
|
|
50
50
|
// These disables are here for proper typing when used as defaults. They
|
|
51
51
|
// should *not* use the `noop` function.
|
|
52
52
|
/* eslint-disable @repo/internal/react/use-noop */
|
|
53
|
-
onBlur:
|
|
54
|
-
onChange:
|
|
55
|
-
onFocus:
|
|
53
|
+
onBlur: _event => {},
|
|
54
|
+
onChange: _value => {},
|
|
55
|
+
onFocus: _event => {},
|
|
56
56
|
/* eslint-enable @repo/internal/react/use-noop */
|
|
57
|
-
parseInputValue: (time,
|
|
57
|
+
parseInputValue: (time, _timeFormat) => parseTime(time),
|
|
58
58
|
selectProps: {},
|
|
59
59
|
spacing: 'default',
|
|
60
60
|
times: defaultTimes,
|
|
@@ -30,7 +30,7 @@ import FixedLayer from '../internal/fixed-layer';
|
|
|
30
30
|
import { makeSingleValue } from '../internal/single-value';
|
|
31
31
|
import { convertTokens } from './utils';
|
|
32
32
|
var packageName = "@atlaskit/datetime-picker";
|
|
33
|
-
var packageVersion = "12.10.
|
|
33
|
+
var packageVersion = "12.10.4";
|
|
34
34
|
function getValidDate(iso) {
|
|
35
35
|
var date = parseISO(iso);
|
|
36
36
|
return isValid(date) ? {
|
|
@@ -52,7 +52,9 @@ var menuStyles = css({
|
|
|
52
52
|
var Menu = function Menu(_ref) {
|
|
53
53
|
var selectProps = _ref.selectProps,
|
|
54
54
|
innerProps = _ref.innerProps;
|
|
55
|
-
return jsx(UNSAFE_LAYERING,
|
|
55
|
+
return jsx(UNSAFE_LAYERING, {
|
|
56
|
+
isDisabled: getBooleanFF('platform.design-system-team.layering_qmiw3') ? false : true
|
|
57
|
+
}, jsx(FixedLayer, {
|
|
56
58
|
inputValue: selectProps.inputValue,
|
|
57
59
|
containerRef: selectProps.calendarContainerRef,
|
|
58
60
|
content: jsx("div", _extends({
|
|
@@ -94,9 +96,9 @@ var datePickerDefaultProps = {
|
|
|
94
96
|
// These disables are here for proper typing when used as defaults. They
|
|
95
97
|
// should *not* use the `noop` function.
|
|
96
98
|
/* eslint-disable @repo/internal/react/use-noop */
|
|
97
|
-
onBlur: function onBlur(
|
|
98
|
-
onChange: function onChange(
|
|
99
|
-
onFocus: function onFocus(
|
|
99
|
+
onBlur: function onBlur(_event) {},
|
|
100
|
+
onChange: function onChange(_value) {},
|
|
101
|
+
onFocus: function onFocus(_event) {},
|
|
100
102
|
/* eslint-enable @repo/internal/react/use-noop */
|
|
101
103
|
selectProps: {},
|
|
102
104
|
spacing: 'default',
|
|
@@ -265,11 +267,11 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
265
267
|
event.preventDefault();
|
|
266
268
|
if (!_this.isDateDisabled(calendarValue)) {
|
|
267
269
|
var _this$getSafeState3 = _this.getSafeState(),
|
|
268
|
-
|
|
270
|
+
_value2 = _this$getSafeState3.value;
|
|
269
271
|
// Get a safe `calendarValue` in case the value exceeds the maximum
|
|
270
272
|
// allowed by ISO 8601
|
|
271
273
|
var safeCalendarValue = _this.getSafeCalendarValue(calendarValue);
|
|
272
|
-
var valueChanged = safeCalendarValue !==
|
|
274
|
+
var valueChanged = safeCalendarValue !== _value2;
|
|
273
275
|
_this.setState({
|
|
274
276
|
selectInputValue: '',
|
|
275
277
|
isOpen: false,
|
|
@@ -298,7 +300,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
298
300
|
_this.setState(changedState);
|
|
299
301
|
_this.props.onChange('');
|
|
300
302
|
});
|
|
301
|
-
_defineProperty(_assertThisInitialized(_this), "onSelectChange", function (
|
|
303
|
+
_defineProperty(_assertThisInitialized(_this), "onSelectChange", function (_value, action) {
|
|
302
304
|
// Used for native clear event in React Select
|
|
303
305
|
// Triggered when clicking ClearIndicator or backspace with no value
|
|
304
306
|
if (action.action === 'clear') {
|
|
@@ -25,7 +25,7 @@ import DatePicker from './date-picker';
|
|
|
25
25
|
import TimePicker from './time-picker';
|
|
26
26
|
import { convertTokens } from './utils';
|
|
27
27
|
var packageName = "@atlaskit/datetime-picker";
|
|
28
|
-
var packageVersion = "12.10.
|
|
28
|
+
var packageVersion = "12.10.4";
|
|
29
29
|
var isInvalidBorderStyles = css({
|
|
30
30
|
borderColor: "var(--ds-border-danger, ".concat(R400, ")")
|
|
31
31
|
});
|
|
@@ -92,16 +92,15 @@ var timePickerContainerStyles = css({
|
|
|
92
92
|
});
|
|
93
93
|
var iconContainerStyles = css({
|
|
94
94
|
display: 'flex',
|
|
95
|
-
paddingTop: "var(--ds-space-075, 6px)",
|
|
96
|
-
paddingRight: "var(--ds-space-100, 8px)",
|
|
97
|
-
paddingBottom: "var(--ds-space-075, 6px)",
|
|
98
|
-
paddingLeft: "var(--ds-space-050, 4px)",
|
|
99
|
-
// ICON_PADDING (2) * 2
|
|
100
95
|
alignItems: 'center',
|
|
101
96
|
flexBasis: 'inherit',
|
|
102
97
|
backgroundColor: 'inherit',
|
|
103
98
|
border: 'none',
|
|
104
99
|
color: "var(--ds-text-subtlest, ".concat(N70, ")"),
|
|
100
|
+
paddingBlockEnd: "var(--ds-space-075, 6px)",
|
|
101
|
+
paddingBlockStart: "var(--ds-space-075, 6px)",
|
|
102
|
+
paddingInlineEnd: "var(--ds-space-100, 8px)",
|
|
103
|
+
paddingInlineStart: "var(--ds-space-050, 4px)",
|
|
105
104
|
transition: "color 150ms",
|
|
106
105
|
'&:hover': {
|
|
107
106
|
color: "var(--ds-text-subtle, ".concat(N500, ")")
|
|
@@ -131,9 +130,9 @@ var dateTimePickerDefaultProps = {
|
|
|
131
130
|
// These disables are here for proper typing when used as defaults. They
|
|
132
131
|
// should *not* use the `noop` function.
|
|
133
132
|
/* eslint-disable @repo/internal/react/use-noop */
|
|
134
|
-
onBlur: function onBlur(
|
|
135
|
-
onChange: function onChange(
|
|
136
|
-
onFocus: function onFocus(
|
|
133
|
+
onBlur: function onBlur(_event) {},
|
|
134
|
+
onChange: function onChange(_value) {},
|
|
135
|
+
onFocus: function onFocus(_event) {},
|
|
137
136
|
/* eslint-enable @repo/internal/react/use-noop */
|
|
138
137
|
innerProps: {},
|
|
139
138
|
id: '',
|
|
@@ -235,8 +234,8 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
235
234
|
zoneValue: zoneValue
|
|
236
235
|
});
|
|
237
236
|
if (dateValue && timeValue) {
|
|
238
|
-
var
|
|
239
|
-
var _this$parseValue = this.parseValue(
|
|
237
|
+
var _value2 = formatDateTimeZoneIntoIso(dateValue, timeValue, zoneValue);
|
|
238
|
+
var _this$parseValue = this.parseValue(_value2, dateValue, timeValue, zoneValue),
|
|
240
239
|
parsedZone = _this$parseValue.zoneValue;
|
|
241
240
|
var valueWithValidZone = formatDateTimeZoneIntoIso(dateValue, timeValue, parsedZone);
|
|
242
241
|
this.setState({
|
|
@@ -29,7 +29,7 @@ import parseTime from '../internal/parse-time';
|
|
|
29
29
|
import { makeSingleValue } from '../internal/single-value';
|
|
30
30
|
import { convertTokens } from './utils';
|
|
31
31
|
var packageName = "@atlaskit/datetime-picker";
|
|
32
|
-
var packageVersion = "12.10.
|
|
32
|
+
var packageVersion = "12.10.4";
|
|
33
33
|
var menuStyles = {
|
|
34
34
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
35
35
|
position: 'static',
|
|
@@ -64,11 +64,11 @@ var timePickerDefaultProps = {
|
|
|
64
64
|
// These disables are here for proper typing when used as defaults. They
|
|
65
65
|
// should *not* use the `noop` function.
|
|
66
66
|
/* eslint-disable @repo/internal/react/use-noop */
|
|
67
|
-
onBlur: function onBlur(
|
|
68
|
-
onChange: function onChange(
|
|
69
|
-
onFocus: function onFocus(
|
|
67
|
+
onBlur: function onBlur(_event) {},
|
|
68
|
+
onChange: function onChange(_value) {},
|
|
69
|
+
onFocus: function onFocus(_event) {},
|
|
70
70
|
/* eslint-enable @repo/internal/react/use-noop */
|
|
71
|
-
parseInputValue: function parseInputValue(time,
|
|
71
|
+
parseInputValue: function parseInputValue(time, _timeFormat) {
|
|
72
72
|
return parseTime(time);
|
|
73
73
|
},
|
|
74
74
|
selectProps: {},
|
|
@@ -122,10 +122,10 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
122
122
|
if (_this.props.timeIsEditable) {
|
|
123
123
|
var _this$props = _this.props,
|
|
124
124
|
parseInputValue = _this$props.parseInputValue,
|
|
125
|
-
|
|
125
|
+
_timeFormat2 = _this$props.timeFormat;
|
|
126
126
|
var sanitizedInput;
|
|
127
127
|
try {
|
|
128
|
-
sanitizedInput = parseInputValue(inputValue,
|
|
128
|
+
sanitizedInput = parseInputValue(inputValue, _timeFormat2 || defaultTimeFormat);
|
|
129
129
|
} catch (e) {
|
|
130
130
|
return; // do nothing, the main validation should happen in the form
|
|
131
131
|
}
|
|
@@ -183,9 +183,9 @@ declare const datePickerDefaultProps: {
|
|
|
183
183
|
isDisabled: boolean;
|
|
184
184
|
isInvalid: boolean;
|
|
185
185
|
name: string;
|
|
186
|
-
onBlur: (
|
|
187
|
-
onChange: (
|
|
188
|
-
onFocus: (
|
|
186
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
187
|
+
onChange: (_value: string) => void;
|
|
188
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
189
189
|
selectProps: {};
|
|
190
190
|
spacing: Spacing;
|
|
191
191
|
locale: string;
|
|
@@ -205,9 +205,9 @@ declare class DatePicker extends Component<DatePickerProps, State> {
|
|
|
205
205
|
isDisabled: boolean;
|
|
206
206
|
isInvalid: boolean;
|
|
207
207
|
name: string;
|
|
208
|
-
onBlur: (
|
|
209
|
-
onChange: (
|
|
210
|
-
onFocus: (
|
|
208
|
+
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
209
|
+
onChange: (_value: string) => void;
|
|
210
|
+
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
211
211
|
selectProps: {};
|
|
212
212
|
spacing: Spacing;
|
|
213
213
|
locale: string;
|
|
@@ -245,7 +245,7 @@ declare class DatePicker extends Component<DatePickerProps, State> {
|
|
|
245
245
|
getSafeCalendarValue: (calendarValue: string) => string;
|
|
246
246
|
onInputKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
247
247
|
onClear: () => void;
|
|
248
|
-
onSelectChange: (
|
|
248
|
+
onSelectChange: (_value: ValueType<OptionType>, action: ActionMeta) => void;
|
|
249
249
|
refCalendar: (ref: CalendarRef | null) => void;
|
|
250
250
|
handleSelectInputChange: (selectInputValue: string, actionMeta: InputActionMeta) => void;
|
|
251
251
|
getContainerRef: (ref: HTMLElement | null) => void;
|
|
@@ -282,9 +282,9 @@ declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit
|
|
|
282
282
|
isDisabled: boolean;
|
|
283
283
|
isInvalid: boolean;
|
|
284
284
|
name: string;
|
|
285
|
-
onBlur: (
|
|
286
|
-
onChange: (
|
|
287
|
-
onFocus: (
|
|
285
|
+
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
286
|
+
onChange: (_value: string) => void;
|
|
287
|
+
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
288
288
|
selectProps: {};
|
|
289
289
|
spacing: Spacing;
|
|
290
290
|
locale: string;
|
|
@@ -128,9 +128,9 @@ declare const dateTimePickerDefaultProps: {
|
|
|
128
128
|
autoFocus: boolean;
|
|
129
129
|
isDisabled: boolean;
|
|
130
130
|
name: string;
|
|
131
|
-
onBlur: (
|
|
132
|
-
onChange: (
|
|
133
|
-
onFocus: (
|
|
131
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
132
|
+
onChange: (_value: string) => void;
|
|
133
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
134
134
|
innerProps: {};
|
|
135
135
|
id: string;
|
|
136
136
|
defaultValue: string;
|
|
@@ -152,9 +152,9 @@ declare class DateTimePicker extends React.Component<DateTimePickerProps, State>
|
|
|
152
152
|
autoFocus: boolean;
|
|
153
153
|
isDisabled: boolean;
|
|
154
154
|
name: string;
|
|
155
|
-
onBlur: (
|
|
156
|
-
onChange: (
|
|
157
|
-
onFocus: (
|
|
155
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
156
|
+
onChange: (_value: string) => void;
|
|
157
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
158
158
|
innerProps: {};
|
|
159
159
|
id: string;
|
|
160
160
|
defaultValue: string;
|
|
@@ -199,9 +199,9 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DateTimeP
|
|
|
199
199
|
autoFocus: boolean;
|
|
200
200
|
isDisabled: boolean;
|
|
201
201
|
name: string;
|
|
202
|
-
onBlur: (
|
|
203
|
-
onChange: (
|
|
204
|
-
onFocus: (
|
|
202
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
203
|
+
onChange: (_value: string) => void;
|
|
204
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
205
205
|
innerProps: {};
|
|
206
206
|
id: string;
|
|
207
207
|
defaultValue: string;
|
|
@@ -134,10 +134,10 @@ declare const timePickerDefaultProps: {
|
|
|
134
134
|
isDisabled: boolean;
|
|
135
135
|
isInvalid: boolean;
|
|
136
136
|
name: string;
|
|
137
|
-
onBlur: (
|
|
138
|
-
onChange: (
|
|
139
|
-
onFocus: (
|
|
140
|
-
parseInputValue: (time: string,
|
|
137
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
138
|
+
onChange: (_value: string) => void;
|
|
139
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
140
|
+
parseInputValue: (time: string, _timeFormat: string) => string | Date;
|
|
141
141
|
selectProps: {};
|
|
142
142
|
spacing: Spacing;
|
|
143
143
|
times: string[];
|
|
@@ -157,10 +157,10 @@ declare class TimePicker extends React.Component<TimePickerProps, State> {
|
|
|
157
157
|
isDisabled: boolean;
|
|
158
158
|
isInvalid: boolean;
|
|
159
159
|
name: string;
|
|
160
|
-
onBlur: (
|
|
161
|
-
onChange: (
|
|
162
|
-
onFocus: (
|
|
163
|
-
parseInputValue: (time: string,
|
|
160
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
161
|
+
onChange: (_value: string) => void;
|
|
162
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
163
|
+
parseInputValue: (time: string, _timeFormat: string) => string | Date;
|
|
164
164
|
selectProps: {};
|
|
165
165
|
spacing: Spacing;
|
|
166
166
|
times: string[];
|
|
@@ -199,10 +199,10 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePicke
|
|
|
199
199
|
isDisabled: boolean;
|
|
200
200
|
isInvalid: boolean;
|
|
201
201
|
name: string;
|
|
202
|
-
onBlur: (
|
|
203
|
-
onChange: (
|
|
204
|
-
onFocus: (
|
|
205
|
-
parseInputValue: (time: string,
|
|
202
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
203
|
+
onChange: (_value: string) => void;
|
|
204
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
205
|
+
parseInputValue: (time: string, _timeFormat: string) => string | Date;
|
|
206
206
|
selectProps: {};
|
|
207
207
|
spacing: Spacing;
|
|
208
208
|
times: string[];
|
|
@@ -183,9 +183,9 @@ declare const datePickerDefaultProps: {
|
|
|
183
183
|
isDisabled: boolean;
|
|
184
184
|
isInvalid: boolean;
|
|
185
185
|
name: string;
|
|
186
|
-
onBlur: (
|
|
187
|
-
onChange: (
|
|
188
|
-
onFocus: (
|
|
186
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
187
|
+
onChange: (_value: string) => void;
|
|
188
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
189
189
|
selectProps: {};
|
|
190
190
|
spacing: Spacing;
|
|
191
191
|
locale: string;
|
|
@@ -205,9 +205,9 @@ declare class DatePicker extends Component<DatePickerProps, State> {
|
|
|
205
205
|
isDisabled: boolean;
|
|
206
206
|
isInvalid: boolean;
|
|
207
207
|
name: string;
|
|
208
|
-
onBlur: (
|
|
209
|
-
onChange: (
|
|
210
|
-
onFocus: (
|
|
208
|
+
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
209
|
+
onChange: (_value: string) => void;
|
|
210
|
+
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
211
211
|
selectProps: {};
|
|
212
212
|
spacing: Spacing;
|
|
213
213
|
locale: string;
|
|
@@ -245,7 +245,7 @@ declare class DatePicker extends Component<DatePickerProps, State> {
|
|
|
245
245
|
getSafeCalendarValue: (calendarValue: string) => string;
|
|
246
246
|
onInputKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
247
247
|
onClear: () => void;
|
|
248
|
-
onSelectChange: (
|
|
248
|
+
onSelectChange: (_value: ValueType<OptionType>, action: ActionMeta) => void;
|
|
249
249
|
refCalendar: (ref: CalendarRef | null) => void;
|
|
250
250
|
handleSelectInputChange: (selectInputValue: string, actionMeta: InputActionMeta) => void;
|
|
251
251
|
getContainerRef: (ref: HTMLElement | null) => void;
|
|
@@ -282,9 +282,9 @@ declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit
|
|
|
282
282
|
isDisabled: boolean;
|
|
283
283
|
isInvalid: boolean;
|
|
284
284
|
name: string;
|
|
285
|
-
onBlur: (
|
|
286
|
-
onChange: (
|
|
287
|
-
onFocus: (
|
|
285
|
+
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
286
|
+
onChange: (_value: string) => void;
|
|
287
|
+
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
288
288
|
selectProps: {};
|
|
289
289
|
spacing: Spacing;
|
|
290
290
|
locale: string;
|
|
@@ -128,9 +128,9 @@ declare const dateTimePickerDefaultProps: {
|
|
|
128
128
|
autoFocus: boolean;
|
|
129
129
|
isDisabled: boolean;
|
|
130
130
|
name: string;
|
|
131
|
-
onBlur: (
|
|
132
|
-
onChange: (
|
|
133
|
-
onFocus: (
|
|
131
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
132
|
+
onChange: (_value: string) => void;
|
|
133
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
134
134
|
innerProps: {};
|
|
135
135
|
id: string;
|
|
136
136
|
defaultValue: string;
|
|
@@ -152,9 +152,9 @@ declare class DateTimePicker extends React.Component<DateTimePickerProps, State>
|
|
|
152
152
|
autoFocus: boolean;
|
|
153
153
|
isDisabled: boolean;
|
|
154
154
|
name: string;
|
|
155
|
-
onBlur: (
|
|
156
|
-
onChange: (
|
|
157
|
-
onFocus: (
|
|
155
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
156
|
+
onChange: (_value: string) => void;
|
|
157
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
158
158
|
innerProps: {};
|
|
159
159
|
id: string;
|
|
160
160
|
defaultValue: string;
|
|
@@ -199,9 +199,9 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DateTimeP
|
|
|
199
199
|
autoFocus: boolean;
|
|
200
200
|
isDisabled: boolean;
|
|
201
201
|
name: string;
|
|
202
|
-
onBlur: (
|
|
203
|
-
onChange: (
|
|
204
|
-
onFocus: (
|
|
202
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
203
|
+
onChange: (_value: string) => void;
|
|
204
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
205
205
|
innerProps: {};
|
|
206
206
|
id: string;
|
|
207
207
|
defaultValue: string;
|
|
@@ -134,10 +134,10 @@ declare const timePickerDefaultProps: {
|
|
|
134
134
|
isDisabled: boolean;
|
|
135
135
|
isInvalid: boolean;
|
|
136
136
|
name: string;
|
|
137
|
-
onBlur: (
|
|
138
|
-
onChange: (
|
|
139
|
-
onFocus: (
|
|
140
|
-
parseInputValue: (time: string,
|
|
137
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
138
|
+
onChange: (_value: string) => void;
|
|
139
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
140
|
+
parseInputValue: (time: string, _timeFormat: string) => string | Date;
|
|
141
141
|
selectProps: {};
|
|
142
142
|
spacing: Spacing;
|
|
143
143
|
times: string[];
|
|
@@ -157,10 +157,10 @@ declare class TimePicker extends React.Component<TimePickerProps, State> {
|
|
|
157
157
|
isDisabled: boolean;
|
|
158
158
|
isInvalid: boolean;
|
|
159
159
|
name: string;
|
|
160
|
-
onBlur: (
|
|
161
|
-
onChange: (
|
|
162
|
-
onFocus: (
|
|
163
|
-
parseInputValue: (time: string,
|
|
160
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
161
|
+
onChange: (_value: string) => void;
|
|
162
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
163
|
+
parseInputValue: (time: string, _timeFormat: string) => string | Date;
|
|
164
164
|
selectProps: {};
|
|
165
165
|
spacing: Spacing;
|
|
166
166
|
times: string[];
|
|
@@ -199,10 +199,10 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePicke
|
|
|
199
199
|
isDisabled: boolean;
|
|
200
200
|
isInvalid: boolean;
|
|
201
201
|
name: string;
|
|
202
|
-
onBlur: (
|
|
203
|
-
onChange: (
|
|
204
|
-
onFocus: (
|
|
205
|
-
parseInputValue: (time: string,
|
|
202
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
203
|
+
onChange: (_value: string) => void;
|
|
204
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
205
|
+
parseInputValue: (time: string, _timeFormat: string) => string | Date;
|
|
206
206
|
selectProps: {};
|
|
207
207
|
spacing: Spacing;
|
|
208
208
|
times: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "12.10.
|
|
3
|
+
"version": "12.10.4",
|
|
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/"
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
38
38
|
"@atlaskit/icon": "^21.12.0",
|
|
39
39
|
"@atlaskit/layering": "^0.2.0",
|
|
40
|
-
"@atlaskit/locale": "^2.
|
|
40
|
+
"@atlaskit/locale": "^2.6.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
42
42
|
"@atlaskit/popper": "^5.5.0",
|
|
43
43
|
"@atlaskit/select": "^16.7.0",
|
|
44
44
|
"@atlaskit/theme": "^12.6.0",
|
|
45
|
-
"@atlaskit/tokens": "^1.
|
|
45
|
+
"@atlaskit/tokens": "^1.28.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"@emotion/react": "^11.7.1",
|
|
48
48
|
"date-fns": "^2.17.0",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@af/accessibility-testing": "*",
|
|
57
|
-
"@atlaskit/button": "^16.
|
|
57
|
+
"@atlaskit/button": "^16.13.0",
|
|
58
58
|
"@atlaskit/docs": "*",
|
|
59
59
|
"@atlaskit/form": "^8.11.0",
|
|
60
|
-
"@atlaskit/modal-dialog": "^12.
|
|
61
|
-
"@atlaskit/popup": "^1.
|
|
60
|
+
"@atlaskit/modal-dialog": "^12.8.0",
|
|
61
|
+
"@atlaskit/popup": "^1.11.0",
|
|
62
62
|
"@atlaskit/range": "^7.1.0",
|
|
63
63
|
"@atlaskit/section-message": "^6.4.0",
|
|
64
64
|
"@atlaskit/ssr": "*",
|
|
@@ -68,7 +68,6 @@
|
|
|
68
68
|
"@atlaskit/webdriver-runner": "*",
|
|
69
69
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
70
70
|
"@atlassian/feature-flags-test-utils": "*",
|
|
71
|
-
"@emotion/react": "^11.7.1",
|
|
72
71
|
"@testing-library/react": "^12.1.5",
|
|
73
72
|
"@testing-library/user-event": "^14.4.3",
|
|
74
73
|
"@types/testing-library__jest-dom": "^5.14.5",
|
|
@@ -98,6 +97,9 @@
|
|
|
98
97
|
}
|
|
99
98
|
},
|
|
100
99
|
"platform-feature-flags": {
|
|
100
|
+
"platform.design-system-team.layering_qmiw3": {
|
|
101
|
+
"type": "boolean"
|
|
102
|
+
},
|
|
101
103
|
"platform.design-system-team.border-checkbox_nyoiu": {
|
|
102
104
|
"type": "boolean"
|
|
103
105
|
},
|
package/report.api.md
CHANGED
|
@@ -90,9 +90,9 @@ export const DatePicker: ForwardRefExoticComponent<
|
|
|
90
90
|
isDisabled: boolean;
|
|
91
91
|
isInvalid: boolean;
|
|
92
92
|
name: string;
|
|
93
|
-
onBlur: (
|
|
94
|
-
onChange: (
|
|
95
|
-
onFocus: (
|
|
93
|
+
onBlur: (_event: FocusEvent_2<HTMLInputElement>) => void;
|
|
94
|
+
onChange: (_value: string) => void;
|
|
95
|
+
onFocus: (_event: FocusEvent_2<HTMLInputElement>) => void;
|
|
96
96
|
selectProps: {};
|
|
97
97
|
spacing: Spacing;
|
|
98
98
|
locale: string;
|
|
@@ -156,9 +156,9 @@ const datePickerDefaultProps: {
|
|
|
156
156
|
isDisabled: boolean;
|
|
157
157
|
isInvalid: boolean;
|
|
158
158
|
name: string;
|
|
159
|
-
onBlur: (
|
|
160
|
-
onChange: (
|
|
161
|
-
onFocus: (
|
|
159
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
160
|
+
onChange: (_value: string) => void;
|
|
161
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
162
162
|
selectProps: {};
|
|
163
163
|
spacing: Spacing;
|
|
164
164
|
locale: string;
|
|
@@ -240,9 +240,9 @@ export const DateTimePicker: React_2.ForwardRefExoticComponent<
|
|
|
240
240
|
autoFocus: boolean;
|
|
241
241
|
isDisabled: boolean;
|
|
242
242
|
name: string;
|
|
243
|
-
onBlur: (
|
|
244
|
-
onChange: (
|
|
245
|
-
onFocus: (
|
|
243
|
+
onBlur: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
244
|
+
onChange: (_value: string) => void;
|
|
245
|
+
onFocus: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
246
246
|
innerProps: {};
|
|
247
247
|
id: string;
|
|
248
248
|
defaultValue: string;
|
|
@@ -297,9 +297,9 @@ const dateTimePickerDefaultProps: {
|
|
|
297
297
|
autoFocus: boolean;
|
|
298
298
|
isDisabled: boolean;
|
|
299
299
|
name: string;
|
|
300
|
-
onBlur: (
|
|
301
|
-
onChange: (
|
|
302
|
-
onFocus: (
|
|
300
|
+
onBlur: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
301
|
+
onChange: (_value: string) => void;
|
|
302
|
+
onFocus: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
303
303
|
innerProps: {};
|
|
304
304
|
id: string;
|
|
305
305
|
defaultValue: string;
|
|
@@ -407,12 +407,12 @@ export const TimePicker: React_2.ForwardRefExoticComponent<
|
|
|
407
407
|
isDisabled: boolean;
|
|
408
408
|
isInvalid: boolean;
|
|
409
409
|
name: string;
|
|
410
|
-
onBlur: (
|
|
411
|
-
onChange: (
|
|
412
|
-
onFocus: (
|
|
410
|
+
onBlur: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
411
|
+
onChange: (_value: string) => void;
|
|
412
|
+
onFocus: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
413
413
|
parseInputValue: (
|
|
414
414
|
time: string,
|
|
415
|
-
|
|
415
|
+
_timeFormat: string,
|
|
416
416
|
) => Date | string;
|
|
417
417
|
selectProps: {};
|
|
418
418
|
spacing: Spacing;
|
|
@@ -468,10 +468,10 @@ const timePickerDefaultProps: {
|
|
|
468
468
|
isDisabled: boolean;
|
|
469
469
|
isInvalid: boolean;
|
|
470
470
|
name: string;
|
|
471
|
-
onBlur: (
|
|
472
|
-
onChange: (
|
|
473
|
-
onFocus: (
|
|
474
|
-
parseInputValue: (time: string,
|
|
471
|
+
onBlur: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
472
|
+
onChange: (_value: string) => void;
|
|
473
|
+
onFocus: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
474
|
+
parseInputValue: (time: string, _timeFormat: string) => Date | string;
|
|
475
475
|
selectProps: {};
|
|
476
476
|
spacing: Spacing;
|
|
477
477
|
times: string[];
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -34,9 +34,9 @@ innerProps: {};
|
|
|
34
34
|
isDisabled: boolean;
|
|
35
35
|
isInvalid: boolean;
|
|
36
36
|
name: string;
|
|
37
|
-
onBlur: (
|
|
38
|
-
onChange: (
|
|
39
|
-
onFocus: (
|
|
37
|
+
onBlur: (_event: FocusEvent_2<HTMLInputElement>) => void;
|
|
38
|
+
onChange: (_value: string) => void;
|
|
39
|
+
onFocus: (_event: FocusEvent_2<HTMLInputElement>) => void;
|
|
40
40
|
selectProps: {};
|
|
41
41
|
spacing: Spacing;
|
|
42
42
|
locale: string;
|
|
@@ -57,9 +57,9 @@ const datePickerDefaultProps: {
|
|
|
57
57
|
isDisabled: boolean;
|
|
58
58
|
isInvalid: boolean;
|
|
59
59
|
name: string;
|
|
60
|
-
onBlur: (
|
|
61
|
-
onChange: (
|
|
62
|
-
onFocus: (
|
|
60
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
61
|
+
onChange: (_value: string) => void;
|
|
62
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
63
63
|
selectProps: {};
|
|
64
64
|
spacing: Spacing;
|
|
65
65
|
locale: string;
|
|
@@ -109,9 +109,9 @@ export const DateTimePicker: React_2.ForwardRefExoticComponent<Pick<Pick<Omit<Da
|
|
|
109
109
|
autoFocus: boolean;
|
|
110
110
|
isDisabled: boolean;
|
|
111
111
|
name: string;
|
|
112
|
-
onBlur: (
|
|
113
|
-
onChange: (
|
|
114
|
-
onFocus: (
|
|
112
|
+
onBlur: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
113
|
+
onChange: (_value: string) => void;
|
|
114
|
+
onFocus: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
115
115
|
innerProps: {};
|
|
116
116
|
id: string;
|
|
117
117
|
defaultValue: string;
|
|
@@ -132,9 +132,9 @@ const dateTimePickerDefaultProps: {
|
|
|
132
132
|
autoFocus: boolean;
|
|
133
133
|
isDisabled: boolean;
|
|
134
134
|
name: string;
|
|
135
|
-
onBlur: (
|
|
136
|
-
onChange: (
|
|
137
|
-
onFocus: (
|
|
135
|
+
onBlur: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
136
|
+
onChange: (_value: string) => void;
|
|
137
|
+
onFocus: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
138
138
|
innerProps: {};
|
|
139
139
|
id: string;
|
|
140
140
|
defaultValue: string;
|
|
@@ -199,10 +199,10 @@ export const TimePicker: React_2.ForwardRefExoticComponent<Pick<Pick<Omit<TimePi
|
|
|
199
199
|
isDisabled: boolean;
|
|
200
200
|
isInvalid: boolean;
|
|
201
201
|
name: string;
|
|
202
|
-
onBlur: (
|
|
203
|
-
onChange: (
|
|
204
|
-
onFocus: (
|
|
205
|
-
parseInputValue: (time: string,
|
|
202
|
+
onBlur: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
203
|
+
onChange: (_value: string) => void;
|
|
204
|
+
onFocus: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
205
|
+
parseInputValue: (time: string, _timeFormat: string) => Date | string;
|
|
206
206
|
selectProps: {};
|
|
207
207
|
spacing: Spacing;
|
|
208
208
|
times: string[];
|
|
@@ -222,10 +222,10 @@ const timePickerDefaultProps: {
|
|
|
222
222
|
isDisabled: boolean;
|
|
223
223
|
isInvalid: boolean;
|
|
224
224
|
name: string;
|
|
225
|
-
onBlur: (
|
|
226
|
-
onChange: (
|
|
227
|
-
onFocus: (
|
|
228
|
-
parseInputValue: (time: string,
|
|
225
|
+
onBlur: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
226
|
+
onChange: (_value: string) => void;
|
|
227
|
+
onFocus: (_event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
228
|
+
parseInputValue: (time: string, _timeFormat: string) => Date | string;
|
|
229
229
|
selectProps: {};
|
|
230
230
|
spacing: Spacing;
|
|
231
231
|
times: string[];
|