@atlaskit/datetime-picker 13.7.0 → 13.7.2
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 +16 -0
- package/dist/cjs/components/date-picker.js +23 -13
- package/dist/cjs/components/date-time-picker.js +21 -11
- package/dist/cjs/components/time-picker.js +21 -11
- package/dist/cjs/internal/parse-time.js +2 -2
- package/dist/es2019/components/date-picker.js +20 -9
- package/dist/es2019/components/date-time-picker.js +17 -6
- package/dist/es2019/components/time-picker.js +17 -6
- package/dist/es2019/internal/parse-time.js +1 -1
- package/dist/esm/components/date-picker.js +26 -15
- package/dist/esm/components/date-time-picker.js +23 -12
- package/dist/esm/components/time-picker.js +23 -12
- package/dist/esm/internal/parse-time.js +1 -1
- package/dist/types/components/date-picker.d.ts +15 -6
- package/dist/types/components/date-time-picker.d.ts +13 -4
- package/dist/types/components/time-picker.d.ts +13 -4
- package/dist/types/internal/parse-time.d.ts +1 -1
- package/dist/types-ts4.5/components/date-picker.d.ts +15 -6
- package/dist/types-ts4.5/components/date-time-picker.d.ts +13 -4
- package/dist/types-ts4.5/components/time-picker.d.ts +13 -4
- package/dist/types-ts4.5/internal/parse-time.d.ts +1 -1
- package/package.json +4 -4
- package/extract-react-types/date-picker-props.tsx +0 -5
- package/extract-react-types/time-picker-props.tsx +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 13.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#120049](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/120049)
|
|
8
|
+
[`77504ff274f72`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/77504ff274f72) -
|
|
9
|
+
DSP-19576: Assign names to anonymous default exports
|
|
10
|
+
|
|
11
|
+
## 13.7.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#118692](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/118692)
|
|
16
|
+
[`754f67840e782`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/754f67840e782) -
|
|
17
|
+
Remove remnants of `extract-react-types`.
|
|
18
|
+
|
|
3
19
|
## 13.7.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -38,7 +38,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
38
38
|
* @jsxRuntime classic
|
|
39
39
|
*/ /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
40
40
|
var packageName = "@atlaskit/datetime-picker";
|
|
41
|
-
var packageVersion = "13.7.
|
|
41
|
+
var packageVersion = "13.7.2";
|
|
42
42
|
var datePickerDefaultProps = {
|
|
43
43
|
appearance: 'default',
|
|
44
44
|
autoFocus: false,
|
|
@@ -69,12 +69,12 @@ var datePickerDefaultProps = {
|
|
|
69
69
|
// Not including a default prop for value as it will
|
|
70
70
|
// Make the component a controlled component
|
|
71
71
|
};
|
|
72
|
-
var
|
|
73
|
-
(0, _inherits2.default)(
|
|
74
|
-
var _super = _createSuper(
|
|
75
|
-
function
|
|
72
|
+
var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Component) {
|
|
73
|
+
(0, _inherits2.default)(DatePickerComponent, _Component);
|
|
74
|
+
var _super = _createSuper(DatePickerComponent);
|
|
75
|
+
function DatePickerComponent(props) {
|
|
76
76
|
var _this;
|
|
77
|
-
(0, _classCallCheck2.default)(this,
|
|
77
|
+
(0, _classCallCheck2.default)(this, DatePickerComponent);
|
|
78
78
|
_this = _super.call(this, props);
|
|
79
79
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "calendarRef", null);
|
|
80
80
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "containerRef", null);
|
|
@@ -229,7 +229,7 @@ var DatePicker = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Co
|
|
|
229
229
|
case 'backspace':
|
|
230
230
|
case 'delete':
|
|
231
231
|
{
|
|
232
|
-
var inputCount = (0, _platformFeatureFlags.
|
|
232
|
+
var inputCount = (0, _platformFeatureFlags.fg)('platform.design-system-team.date-picker-input-a11y-fix_cbbxs') ? 1 : 0;
|
|
233
233
|
if (value && event.target instanceof HTMLInputElement && event.target.value.length <= inputCount) {
|
|
234
234
|
// If being cleared from keyboard, don't change behaviour
|
|
235
235
|
_this.setState({
|
|
@@ -365,7 +365,7 @@ var DatePicker = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Co
|
|
|
365
365
|
};
|
|
366
366
|
return _this;
|
|
367
367
|
}
|
|
368
|
-
(0, _createClass2.default)(
|
|
368
|
+
(0, _createClass2.default)(DatePickerComponent, [{
|
|
369
369
|
key: "render",
|
|
370
370
|
value: function render() {
|
|
371
371
|
var _this$props3 = this.props,
|
|
@@ -396,7 +396,7 @@ var DatePicker = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Co
|
|
|
396
396
|
isOpen = _this$getSafeState6.isOpen,
|
|
397
397
|
selectInputValue = _this$getSafeState6.selectInputValue;
|
|
398
398
|
var actualSelectInputValue;
|
|
399
|
-
if ((0, _platformFeatureFlags.
|
|
399
|
+
if ((0, _platformFeatureFlags.fg)('platform.design-system-team.date-picker-input-a11y-fix_cbbxs')) {
|
|
400
400
|
actualSelectInputValue = selectInputValue || (value ? this.formatDate(value) : undefined);
|
|
401
401
|
} else {
|
|
402
402
|
actualSelectInputValue = selectInputValue;
|
|
@@ -507,10 +507,19 @@ var DatePicker = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Co
|
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
509
|
}]);
|
|
510
|
-
return
|
|
510
|
+
return DatePickerComponent;
|
|
511
511
|
}(_react.Component);
|
|
512
|
-
(0, _defineProperty2.default)(
|
|
513
|
-
|
|
512
|
+
(0, _defineProperty2.default)(DatePickerComponent, "defaultProps", datePickerDefaultProps);
|
|
513
|
+
/**
|
|
514
|
+
* __Date picker__
|
|
515
|
+
*
|
|
516
|
+
* A date picker allows the user to select a particular date.
|
|
517
|
+
*
|
|
518
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/date-picker/examples)
|
|
519
|
+
* - [Code](https://atlassian.design/components/datetime-picker/date-picker/code)
|
|
520
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/date-picker/usage)
|
|
521
|
+
*/
|
|
522
|
+
var DatePicker = (0, _analyticsNext.withAnalyticsContext)({
|
|
514
523
|
componentName: 'datePicker',
|
|
515
524
|
packageName: packageName,
|
|
516
525
|
packageVersion: packageVersion
|
|
@@ -524,4 +533,5 @@ var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
|
524
533
|
packageVersion: packageVersion
|
|
525
534
|
}
|
|
526
535
|
})
|
|
527
|
-
})(
|
|
536
|
+
})(DatePickerComponent));
|
|
537
|
+
var _default = exports.default = DatePicker;
|
|
@@ -33,7 +33,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
33
33
|
* @jsxRuntime classic
|
|
34
34
|
*/ /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
35
35
|
var packageName = "@atlaskit/datetime-picker";
|
|
36
|
-
var packageVersion = "13.7.
|
|
36
|
+
var packageVersion = "13.7.2";
|
|
37
37
|
// Make DatePicker 50% the width of DateTimePicker
|
|
38
38
|
// If rendering an icon container, shrink the TimePicker
|
|
39
39
|
var datePickerContainerStyles = (0, _react2.css)({
|
|
@@ -107,12 +107,12 @@ var dateTimePickerDefaultProps = {
|
|
|
107
107
|
};
|
|
108
108
|
var datePickerDefaultAriaLabel = exports.datePickerDefaultAriaLabel = 'Date';
|
|
109
109
|
var timePickerDefaultAriaLabel = exports.timePickerDefaultAriaLabel = 'Time';
|
|
110
|
-
var
|
|
111
|
-
(0, _inherits2.default)(
|
|
112
|
-
var _super = _createSuper(
|
|
113
|
-
function
|
|
110
|
+
var DateTimePickerComponent = exports.DateTimePickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
111
|
+
(0, _inherits2.default)(DateTimePickerComponent, _React$Component);
|
|
112
|
+
var _super = _createSuper(DateTimePickerComponent);
|
|
113
|
+
function DateTimePickerComponent() {
|
|
114
114
|
var _this;
|
|
115
|
-
(0, _classCallCheck2.default)(this,
|
|
115
|
+
(0, _classCallCheck2.default)(this, DateTimePickerComponent);
|
|
116
116
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
117
117
|
args[_key] = arguments[_key];
|
|
118
118
|
}
|
|
@@ -160,7 +160,7 @@ var DateTimePicker = exports.DateTimePickerWithoutAnalytics = /*#__PURE__*/funct
|
|
|
160
160
|
});
|
|
161
161
|
return _this;
|
|
162
162
|
}
|
|
163
|
-
(0, _createClass2.default)(
|
|
163
|
+
(0, _createClass2.default)(DateTimePickerComponent, [{
|
|
164
164
|
key: "parseValue",
|
|
165
165
|
value: function parseValue(value, dateValue, timeValue, zoneValue) {
|
|
166
166
|
if (this.props.parseValue) {
|
|
@@ -302,10 +302,19 @@ var DateTimePicker = exports.DateTimePickerWithoutAnalytics = /*#__PURE__*/funct
|
|
|
302
302
|
})) : null);
|
|
303
303
|
}
|
|
304
304
|
}]);
|
|
305
|
-
return
|
|
305
|
+
return DateTimePickerComponent;
|
|
306
306
|
}(_react.default.Component);
|
|
307
|
-
(0, _defineProperty2.default)(
|
|
308
|
-
|
|
307
|
+
(0, _defineProperty2.default)(DateTimePickerComponent, "defaultProps", dateTimePickerDefaultProps);
|
|
308
|
+
/**
|
|
309
|
+
* __Date time picker__
|
|
310
|
+
*
|
|
311
|
+
* A date time picker allows the user to select an associated date and time.
|
|
312
|
+
*
|
|
313
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/examples)
|
|
314
|
+
* - [Code](https://atlassian.design/components/datetime-picker/code)
|
|
315
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/usage)
|
|
316
|
+
*/
|
|
317
|
+
var DateTimePicker = (0, _analyticsNext.withAnalyticsContext)({
|
|
309
318
|
componentName: 'dateTimePicker',
|
|
310
319
|
packageName: packageName,
|
|
311
320
|
packageVersion: packageVersion
|
|
@@ -319,4 +328,5 @@ var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
|
319
328
|
packageVersion: packageVersion
|
|
320
329
|
}
|
|
321
330
|
})
|
|
322
|
-
})(
|
|
331
|
+
})(DateTimePickerComponent));
|
|
332
|
+
var _default = exports.default = DateTimePicker;
|
|
@@ -36,7 +36,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
36
36
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // eslint-disable-next-line no-restricted-imports
|
|
37
37
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
38
38
|
var packageName = "@atlaskit/datetime-picker";
|
|
39
|
-
var packageVersion = "13.7.
|
|
39
|
+
var packageVersion = "13.7.2";
|
|
40
40
|
var menuStyles = {
|
|
41
41
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
42
42
|
position: 'static',
|
|
@@ -75,12 +75,12 @@ var timePickerDefaultProps = {
|
|
|
75
75
|
// Not including a default prop for value as it will
|
|
76
76
|
// Make the component a controlled component
|
|
77
77
|
};
|
|
78
|
-
var
|
|
79
|
-
(0, _inherits2.default)(
|
|
80
|
-
var _super = _createSuper(
|
|
81
|
-
function
|
|
78
|
+
var TimePickerComponent = exports.TimePickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
79
|
+
(0, _inherits2.default)(TimePickerComponent, _React$Component);
|
|
80
|
+
var _super = _createSuper(TimePickerComponent);
|
|
81
|
+
function TimePickerComponent() {
|
|
82
82
|
var _this;
|
|
83
|
-
(0, _classCallCheck2.default)(this,
|
|
83
|
+
(0, _classCallCheck2.default)(this, TimePickerComponent);
|
|
84
84
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
85
85
|
args[_key] = arguments[_key];
|
|
86
86
|
}
|
|
@@ -193,7 +193,7 @@ var TimePicker = exports.TimePickerWithoutAnalytics = /*#__PURE__*/function (_Re
|
|
|
193
193
|
});
|
|
194
194
|
return _this;
|
|
195
195
|
}
|
|
196
|
-
(0, _createClass2.default)(
|
|
196
|
+
(0, _createClass2.default)(TimePickerComponent, [{
|
|
197
197
|
key: "render",
|
|
198
198
|
value: function render() {
|
|
199
199
|
var _this2 = this;
|
|
@@ -328,10 +328,19 @@ var TimePicker = exports.TimePickerWithoutAnalytics = /*#__PURE__*/function (_Re
|
|
|
328
328
|
}, otherSelectProps)));
|
|
329
329
|
}
|
|
330
330
|
}]);
|
|
331
|
-
return
|
|
331
|
+
return TimePickerComponent;
|
|
332
332
|
}(_react.default.Component);
|
|
333
|
-
(0, _defineProperty2.default)(
|
|
334
|
-
|
|
333
|
+
(0, _defineProperty2.default)(TimePickerComponent, "defaultProps", timePickerDefaultProps);
|
|
334
|
+
/**
|
|
335
|
+
* __Time picker__
|
|
336
|
+
*
|
|
337
|
+
* A time picker allows the user to select a specific time.
|
|
338
|
+
*
|
|
339
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/time-picker/examples)
|
|
340
|
+
* - [Code](https://atlassian.design/components/datetime-picker/time-picker/code)
|
|
341
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/time-picker/usage)
|
|
342
|
+
*/
|
|
343
|
+
var TimePicker = (0, _analyticsNext.withAnalyticsContext)({
|
|
335
344
|
componentName: 'timePicker',
|
|
336
345
|
packageName: packageName,
|
|
337
346
|
packageVersion: packageVersion
|
|
@@ -345,4 +354,5 @@ var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
|
345
354
|
packageVersion: packageVersion
|
|
346
355
|
}
|
|
347
356
|
})
|
|
348
|
-
})(
|
|
357
|
+
})(TimePickerComponent));
|
|
358
|
+
var _default = exports.default = TimePicker;
|
|
@@ -7,7 +7,7 @@ exports.assignToDate = assignToDate;
|
|
|
7
7
|
exports.checkHour = checkHour;
|
|
8
8
|
exports.checkMinuteSecond = checkMinuteSecond;
|
|
9
9
|
exports.convertTo24hrTime = convertTo24hrTime;
|
|
10
|
-
exports.default =
|
|
10
|
+
exports.default = parseTime;
|
|
11
11
|
exports.formatSemi24 = formatSemi24;
|
|
12
12
|
exports.isValid = isValid;
|
|
13
13
|
exports.removeSpacer = removeSpacer;
|
|
@@ -115,7 +115,7 @@ function assignToDate(time) {
|
|
|
115
115
|
dateTime.setSeconds(time.seconds || 0, 0);
|
|
116
116
|
return dateTime;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function parseTime(time) {
|
|
119
119
|
var trimmedTime = time.toString().trim();
|
|
120
120
|
if (!isValid(trimmedTime)) {
|
|
121
121
|
throw RangeError('invalid time format');
|
|
@@ -13,7 +13,7 @@ import pick from 'lodash/pick';
|
|
|
13
13
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
14
14
|
import CalendarIcon from '@atlaskit/icon/glyph/calendar';
|
|
15
15
|
import { createLocalizationProvider } from '@atlaskit/locale';
|
|
16
|
-
import {
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import Select, { mergeStyles } from '@atlaskit/select';
|
|
18
18
|
import { defaultDateFormat, EmptyComponent, padToTwo, placeholderDatetime } from '../internal';
|
|
19
19
|
import { Menu } from '../internal/menu';
|
|
@@ -21,7 +21,7 @@ import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date'
|
|
|
21
21
|
import { convertTokens } from '../internal/parse-tokens';
|
|
22
22
|
import { makeSingleValue } from '../internal/single-value';
|
|
23
23
|
const packageName = "@atlaskit/datetime-picker";
|
|
24
|
-
const packageVersion = "13.7.
|
|
24
|
+
const packageVersion = "13.7.2";
|
|
25
25
|
const datePickerDefaultProps = {
|
|
26
26
|
appearance: 'default',
|
|
27
27
|
autoFocus: false,
|
|
@@ -50,7 +50,7 @@ const datePickerDefaultProps = {
|
|
|
50
50
|
// Not including a default prop for value as it will
|
|
51
51
|
// Make the component a controlled component
|
|
52
52
|
};
|
|
53
|
-
class
|
|
53
|
+
class DatePickerComponent extends Component {
|
|
54
54
|
constructor(props) {
|
|
55
55
|
super(props);
|
|
56
56
|
_defineProperty(this, "calendarRef", null);
|
|
@@ -210,7 +210,7 @@ class DatePicker extends Component {
|
|
|
210
210
|
case 'backspace':
|
|
211
211
|
case 'delete':
|
|
212
212
|
{
|
|
213
|
-
const inputCount =
|
|
213
|
+
const inputCount = fg('platform.design-system-team.date-picker-input-a11y-fix_cbbxs') ? 1 : 0;
|
|
214
214
|
if (value && event.target instanceof HTMLInputElement && event.target.value.length <= inputCount) {
|
|
215
215
|
// If being cleared from keyboard, don't change behaviour
|
|
216
216
|
this.setState({
|
|
@@ -396,7 +396,7 @@ class DatePicker extends Component {
|
|
|
396
396
|
selectInputValue
|
|
397
397
|
} = this.getSafeState();
|
|
398
398
|
let actualSelectInputValue;
|
|
399
|
-
if (
|
|
399
|
+
if (fg('platform.design-system-team.date-picker-input-a11y-fix_cbbxs')) {
|
|
400
400
|
actualSelectInputValue = selectInputValue || (value ? this.formatDate(value) : undefined);
|
|
401
401
|
} else {
|
|
402
402
|
actualSelectInputValue = selectInputValue;
|
|
@@ -497,9 +497,19 @@ class DatePicker extends Component {
|
|
|
497
497
|
);
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
_defineProperty(
|
|
501
|
-
export {
|
|
502
|
-
|
|
500
|
+
_defineProperty(DatePickerComponent, "defaultProps", datePickerDefaultProps);
|
|
501
|
+
export { DatePickerComponent as DatePickerWithoutAnalytics };
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* __Date picker__
|
|
505
|
+
*
|
|
506
|
+
* A date picker allows the user to select a particular date.
|
|
507
|
+
*
|
|
508
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/date-picker/examples)
|
|
509
|
+
* - [Code](https://atlassian.design/components/datetime-picker/date-picker/code)
|
|
510
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/date-picker/usage)
|
|
511
|
+
*/
|
|
512
|
+
const DatePicker = withAnalyticsContext({
|
|
503
513
|
componentName: 'datePicker',
|
|
504
514
|
packageName,
|
|
505
515
|
packageVersion
|
|
@@ -513,4 +523,5 @@ export default withAnalyticsContext({
|
|
|
513
523
|
packageVersion
|
|
514
524
|
}
|
|
515
525
|
})
|
|
516
|
-
})(
|
|
526
|
+
})(DatePickerComponent));
|
|
527
|
+
export default DatePicker;
|
|
@@ -20,7 +20,7 @@ import { convertTokens } from '../internal/parse-tokens';
|
|
|
20
20
|
import DatePicker from './date-picker';
|
|
21
21
|
import TimePicker from './time-picker';
|
|
22
22
|
const packageName = "@atlaskit/datetime-picker";
|
|
23
|
-
const packageVersion = "13.7.
|
|
23
|
+
const packageVersion = "13.7.2";
|
|
24
24
|
// Make DatePicker 50% the width of DateTimePicker
|
|
25
25
|
// If rendering an icon container, shrink the TimePicker
|
|
26
26
|
const datePickerContainerStyles = css({
|
|
@@ -93,7 +93,7 @@ const dateTimePickerDefaultProps = {
|
|
|
93
93
|
};
|
|
94
94
|
export const datePickerDefaultAriaLabel = 'Date';
|
|
95
95
|
export const timePickerDefaultAriaLabel = 'Time';
|
|
96
|
-
class
|
|
96
|
+
class DateTimePickerComponent extends React.Component {
|
|
97
97
|
constructor(...args) {
|
|
98
98
|
super(...args);
|
|
99
99
|
_defineProperty(this, "state", {
|
|
@@ -291,9 +291,19 @@ class DateTimePicker extends React.Component {
|
|
|
291
291
|
})) : null);
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
_defineProperty(
|
|
295
|
-
export {
|
|
296
|
-
|
|
294
|
+
_defineProperty(DateTimePickerComponent, "defaultProps", dateTimePickerDefaultProps);
|
|
295
|
+
export { DateTimePickerComponent as DateTimePickerWithoutAnalytics };
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* __Date time picker__
|
|
299
|
+
*
|
|
300
|
+
* A date time picker allows the user to select an associated date and time.
|
|
301
|
+
*
|
|
302
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/examples)
|
|
303
|
+
* - [Code](https://atlassian.design/components/datetime-picker/code)
|
|
304
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/usage)
|
|
305
|
+
*/
|
|
306
|
+
const DateTimePicker = withAnalyticsContext({
|
|
297
307
|
componentName: 'dateTimePicker',
|
|
298
308
|
packageName,
|
|
299
309
|
packageVersion
|
|
@@ -307,4 +317,5 @@ export default withAnalyticsContext({
|
|
|
307
317
|
packageVersion
|
|
308
318
|
}
|
|
309
319
|
})
|
|
310
|
-
})(
|
|
320
|
+
})(DateTimePickerComponent));
|
|
321
|
+
export default DateTimePicker;
|
|
@@ -16,7 +16,7 @@ import parseTime from '../internal/parse-time';
|
|
|
16
16
|
import { convertTokens } from '../internal/parse-tokens';
|
|
17
17
|
import { makeSingleValue } from '../internal/single-value';
|
|
18
18
|
const packageName = "@atlaskit/datetime-picker";
|
|
19
|
-
const packageVersion = "13.7.
|
|
19
|
+
const packageVersion = "13.7.2";
|
|
20
20
|
const menuStyles = {
|
|
21
21
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
22
22
|
position: 'static',
|
|
@@ -53,7 +53,7 @@ const timePickerDefaultProps = {
|
|
|
53
53
|
// Not including a default prop for value as it will
|
|
54
54
|
// Make the component a controlled component
|
|
55
55
|
};
|
|
56
|
-
class
|
|
56
|
+
class TimePickerComponent extends React.Component {
|
|
57
57
|
constructor(...args) {
|
|
58
58
|
super(...args);
|
|
59
59
|
_defineProperty(this, "containerRef", null);
|
|
@@ -304,9 +304,19 @@ class TimePicker extends React.Component {
|
|
|
304
304
|
}, otherSelectProps)));
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
_defineProperty(
|
|
308
|
-
export {
|
|
309
|
-
|
|
307
|
+
_defineProperty(TimePickerComponent, "defaultProps", timePickerDefaultProps);
|
|
308
|
+
export { TimePickerComponent as TimePickerWithoutAnalytics };
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* __Time picker__
|
|
312
|
+
*
|
|
313
|
+
* A time picker allows the user to select a specific time.
|
|
314
|
+
*
|
|
315
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/time-picker/examples)
|
|
316
|
+
* - [Code](https://atlassian.design/components/datetime-picker/time-picker/code)
|
|
317
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/time-picker/usage)
|
|
318
|
+
*/
|
|
319
|
+
const TimePicker = withAnalyticsContext({
|
|
310
320
|
componentName: 'timePicker',
|
|
311
321
|
packageName,
|
|
312
322
|
packageVersion
|
|
@@ -320,4 +330,5 @@ export default withAnalyticsContext({
|
|
|
320
330
|
packageVersion
|
|
321
331
|
}
|
|
322
332
|
})
|
|
323
|
-
})(
|
|
333
|
+
})(TimePickerComponent));
|
|
334
|
+
export default TimePicker;
|
|
@@ -102,7 +102,7 @@ export function assignToDate(time) {
|
|
|
102
102
|
dateTime.setSeconds(time.seconds || 0, 0);
|
|
103
103
|
return dateTime;
|
|
104
104
|
}
|
|
105
|
-
export default function (time) {
|
|
105
|
+
export default function parseTime(time) {
|
|
106
106
|
const trimmedTime = time.toString().trim();
|
|
107
107
|
if (!isValid(trimmedTime)) {
|
|
108
108
|
throw RangeError('invalid time format');
|
|
@@ -24,7 +24,7 @@ import pick from 'lodash/pick';
|
|
|
24
24
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
25
25
|
import CalendarIcon from '@atlaskit/icon/glyph/calendar';
|
|
26
26
|
import { createLocalizationProvider } from '@atlaskit/locale';
|
|
27
|
-
import {
|
|
27
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
28
28
|
import Select, { mergeStyles } from '@atlaskit/select';
|
|
29
29
|
import { defaultDateFormat, EmptyComponent, padToTwo, placeholderDatetime } from '../internal';
|
|
30
30
|
import { Menu } from '../internal/menu';
|
|
@@ -32,7 +32,7 @@ import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date'
|
|
|
32
32
|
import { convertTokens } from '../internal/parse-tokens';
|
|
33
33
|
import { makeSingleValue } from '../internal/single-value';
|
|
34
34
|
var packageName = "@atlaskit/datetime-picker";
|
|
35
|
-
var packageVersion = "13.7.
|
|
35
|
+
var packageVersion = "13.7.2";
|
|
36
36
|
var datePickerDefaultProps = {
|
|
37
37
|
appearance: 'default',
|
|
38
38
|
autoFocus: false,
|
|
@@ -63,12 +63,12 @@ var datePickerDefaultProps = {
|
|
|
63
63
|
// Not including a default prop for value as it will
|
|
64
64
|
// Make the component a controlled component
|
|
65
65
|
};
|
|
66
|
-
var
|
|
67
|
-
_inherits(
|
|
68
|
-
var _super = _createSuper(
|
|
69
|
-
function
|
|
66
|
+
var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
67
|
+
_inherits(DatePickerComponent, _Component);
|
|
68
|
+
var _super = _createSuper(DatePickerComponent);
|
|
69
|
+
function DatePickerComponent(props) {
|
|
70
70
|
var _this;
|
|
71
|
-
_classCallCheck(this,
|
|
71
|
+
_classCallCheck(this, DatePickerComponent);
|
|
72
72
|
_this = _super.call(this, props);
|
|
73
73
|
_defineProperty(_assertThisInitialized(_this), "calendarRef", null);
|
|
74
74
|
_defineProperty(_assertThisInitialized(_this), "containerRef", null);
|
|
@@ -223,7 +223,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
223
223
|
case 'backspace':
|
|
224
224
|
case 'delete':
|
|
225
225
|
{
|
|
226
|
-
var inputCount =
|
|
226
|
+
var inputCount = fg('platform.design-system-team.date-picker-input-a11y-fix_cbbxs') ? 1 : 0;
|
|
227
227
|
if (value && event.target instanceof HTMLInputElement && event.target.value.length <= inputCount) {
|
|
228
228
|
// If being cleared from keyboard, don't change behaviour
|
|
229
229
|
_this.setState({
|
|
@@ -359,7 +359,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
359
359
|
};
|
|
360
360
|
return _this;
|
|
361
361
|
}
|
|
362
|
-
_createClass(
|
|
362
|
+
_createClass(DatePickerComponent, [{
|
|
363
363
|
key: "render",
|
|
364
364
|
value: function render() {
|
|
365
365
|
var _this$props3 = this.props,
|
|
@@ -390,7 +390,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
390
390
|
isOpen = _this$getSafeState6.isOpen,
|
|
391
391
|
selectInputValue = _this$getSafeState6.selectInputValue;
|
|
392
392
|
var actualSelectInputValue;
|
|
393
|
-
if (
|
|
393
|
+
if (fg('platform.design-system-team.date-picker-input-a11y-fix_cbbxs')) {
|
|
394
394
|
actualSelectInputValue = selectInputValue || (value ? this.formatDate(value) : undefined);
|
|
395
395
|
} else {
|
|
396
396
|
actualSelectInputValue = selectInputValue;
|
|
@@ -501,11 +501,21 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
}]);
|
|
504
|
-
return
|
|
504
|
+
return DatePickerComponent;
|
|
505
505
|
}(Component);
|
|
506
|
-
_defineProperty(
|
|
507
|
-
export {
|
|
508
|
-
|
|
506
|
+
_defineProperty(DatePickerComponent, "defaultProps", datePickerDefaultProps);
|
|
507
|
+
export { DatePickerComponent as DatePickerWithoutAnalytics };
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* __Date picker__
|
|
511
|
+
*
|
|
512
|
+
* A date picker allows the user to select a particular date.
|
|
513
|
+
*
|
|
514
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/date-picker/examples)
|
|
515
|
+
* - [Code](https://atlassian.design/components/datetime-picker/date-picker/code)
|
|
516
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/date-picker/usage)
|
|
517
|
+
*/
|
|
518
|
+
var DatePicker = withAnalyticsContext({
|
|
509
519
|
componentName: 'datePicker',
|
|
510
520
|
packageName: packageName,
|
|
511
521
|
packageVersion: packageVersion
|
|
@@ -519,4 +529,5 @@ export default withAnalyticsContext({
|
|
|
519
529
|
packageVersion: packageVersion
|
|
520
530
|
}
|
|
521
531
|
})
|
|
522
|
-
})(
|
|
532
|
+
})(DatePickerComponent));
|
|
533
|
+
export default DatePicker;
|
|
@@ -30,7 +30,7 @@ import { convertTokens } from '../internal/parse-tokens';
|
|
|
30
30
|
import DatePicker from './date-picker';
|
|
31
31
|
import TimePicker from './time-picker';
|
|
32
32
|
var packageName = "@atlaskit/datetime-picker";
|
|
33
|
-
var packageVersion = "13.7.
|
|
33
|
+
var packageVersion = "13.7.2";
|
|
34
34
|
// Make DatePicker 50% the width of DateTimePicker
|
|
35
35
|
// If rendering an icon container, shrink the TimePicker
|
|
36
36
|
var datePickerContainerStyles = css({
|
|
@@ -104,12 +104,12 @@ var dateTimePickerDefaultProps = {
|
|
|
104
104
|
};
|
|
105
105
|
export var datePickerDefaultAriaLabel = 'Date';
|
|
106
106
|
export var timePickerDefaultAriaLabel = 'Time';
|
|
107
|
-
var
|
|
108
|
-
_inherits(
|
|
109
|
-
var _super = _createSuper(
|
|
110
|
-
function
|
|
107
|
+
var DateTimePickerComponent = /*#__PURE__*/function (_React$Component) {
|
|
108
|
+
_inherits(DateTimePickerComponent, _React$Component);
|
|
109
|
+
var _super = _createSuper(DateTimePickerComponent);
|
|
110
|
+
function DateTimePickerComponent() {
|
|
111
111
|
var _this;
|
|
112
|
-
_classCallCheck(this,
|
|
112
|
+
_classCallCheck(this, DateTimePickerComponent);
|
|
113
113
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
114
114
|
args[_key] = arguments[_key];
|
|
115
115
|
}
|
|
@@ -157,7 +157,7 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
157
157
|
});
|
|
158
158
|
return _this;
|
|
159
159
|
}
|
|
160
|
-
_createClass(
|
|
160
|
+
_createClass(DateTimePickerComponent, [{
|
|
161
161
|
key: "parseValue",
|
|
162
162
|
value: function parseValue(value, dateValue, timeValue, zoneValue) {
|
|
163
163
|
if (this.props.parseValue) {
|
|
@@ -299,11 +299,21 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
299
299
|
})) : null);
|
|
300
300
|
}
|
|
301
301
|
}]);
|
|
302
|
-
return
|
|
302
|
+
return DateTimePickerComponent;
|
|
303
303
|
}(React.Component);
|
|
304
|
-
_defineProperty(
|
|
305
|
-
export {
|
|
306
|
-
|
|
304
|
+
_defineProperty(DateTimePickerComponent, "defaultProps", dateTimePickerDefaultProps);
|
|
305
|
+
export { DateTimePickerComponent as DateTimePickerWithoutAnalytics };
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* __Date time picker__
|
|
309
|
+
*
|
|
310
|
+
* A date time picker allows the user to select an associated date and time.
|
|
311
|
+
*
|
|
312
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/examples)
|
|
313
|
+
* - [Code](https://atlassian.design/components/datetime-picker/code)
|
|
314
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/usage)
|
|
315
|
+
*/
|
|
316
|
+
var DateTimePicker = withAnalyticsContext({
|
|
307
317
|
componentName: 'dateTimePicker',
|
|
308
318
|
packageName: packageName,
|
|
309
319
|
packageVersion: packageVersion
|
|
@@ -317,4 +327,5 @@ export default withAnalyticsContext({
|
|
|
317
327
|
packageVersion: packageVersion
|
|
318
328
|
}
|
|
319
329
|
})
|
|
320
|
-
})(
|
|
330
|
+
})(DateTimePickerComponent));
|
|
331
|
+
export default DateTimePicker;
|
|
@@ -28,7 +28,7 @@ import parseTime from '../internal/parse-time';
|
|
|
28
28
|
import { convertTokens } from '../internal/parse-tokens';
|
|
29
29
|
import { makeSingleValue } from '../internal/single-value';
|
|
30
30
|
var packageName = "@atlaskit/datetime-picker";
|
|
31
|
-
var packageVersion = "13.7.
|
|
31
|
+
var packageVersion = "13.7.2";
|
|
32
32
|
var menuStyles = {
|
|
33
33
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
34
34
|
position: 'static',
|
|
@@ -67,12 +67,12 @@ var timePickerDefaultProps = {
|
|
|
67
67
|
// Not including a default prop for value as it will
|
|
68
68
|
// Make the component a controlled component
|
|
69
69
|
};
|
|
70
|
-
var
|
|
71
|
-
_inherits(
|
|
72
|
-
var _super = _createSuper(
|
|
73
|
-
function
|
|
70
|
+
var TimePickerComponent = /*#__PURE__*/function (_React$Component) {
|
|
71
|
+
_inherits(TimePickerComponent, _React$Component);
|
|
72
|
+
var _super = _createSuper(TimePickerComponent);
|
|
73
|
+
function TimePickerComponent() {
|
|
74
74
|
var _this;
|
|
75
|
-
_classCallCheck(this,
|
|
75
|
+
_classCallCheck(this, TimePickerComponent);
|
|
76
76
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
77
77
|
args[_key] = arguments[_key];
|
|
78
78
|
}
|
|
@@ -185,7 +185,7 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
185
185
|
});
|
|
186
186
|
return _this;
|
|
187
187
|
}
|
|
188
|
-
_createClass(
|
|
188
|
+
_createClass(TimePickerComponent, [{
|
|
189
189
|
key: "render",
|
|
190
190
|
value: function render() {
|
|
191
191
|
var _this2 = this;
|
|
@@ -320,11 +320,21 @@ var TimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
320
320
|
}, otherSelectProps)));
|
|
321
321
|
}
|
|
322
322
|
}]);
|
|
323
|
-
return
|
|
323
|
+
return TimePickerComponent;
|
|
324
324
|
}(React.Component);
|
|
325
|
-
_defineProperty(
|
|
326
|
-
export {
|
|
327
|
-
|
|
325
|
+
_defineProperty(TimePickerComponent, "defaultProps", timePickerDefaultProps);
|
|
326
|
+
export { TimePickerComponent as TimePickerWithoutAnalytics };
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* __Time picker__
|
|
330
|
+
*
|
|
331
|
+
* A time picker allows the user to select a specific time.
|
|
332
|
+
*
|
|
333
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/time-picker/examples)
|
|
334
|
+
* - [Code](https://atlassian.design/components/datetime-picker/time-picker/code)
|
|
335
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/time-picker/usage)
|
|
336
|
+
*/
|
|
337
|
+
var TimePicker = withAnalyticsContext({
|
|
328
338
|
componentName: 'timePicker',
|
|
329
339
|
packageName: packageName,
|
|
330
340
|
packageVersion: packageVersion
|
|
@@ -338,4 +348,5 @@ export default withAnalyticsContext({
|
|
|
338
348
|
packageVersion: packageVersion
|
|
339
349
|
}
|
|
340
350
|
})
|
|
341
|
-
})(
|
|
351
|
+
})(TimePickerComponent));
|
|
352
|
+
export default TimePicker;
|
|
@@ -102,7 +102,7 @@ export function assignToDate(time) {
|
|
|
102
102
|
dateTime.setSeconds(time.seconds || 0, 0);
|
|
103
103
|
return dateTime;
|
|
104
104
|
}
|
|
105
|
-
export default function (time) {
|
|
105
|
+
export default function parseTime(time) {
|
|
106
106
|
var trimmedTime = time.toString().trim();
|
|
107
107
|
if (!isValid(trimmedTime)) {
|
|
108
108
|
throw RangeError('invalid time format');
|
|
@@ -46,7 +46,7 @@ declare const datePickerDefaultProps: {
|
|
|
46
46
|
spacing: Spacing;
|
|
47
47
|
locale: string;
|
|
48
48
|
};
|
|
49
|
-
declare class
|
|
49
|
+
declare class DatePickerComponent extends Component<DatePickerProps, State> {
|
|
50
50
|
static defaultProps: {
|
|
51
51
|
appearance: Appearance;
|
|
52
52
|
autoFocus: boolean;
|
|
@@ -123,8 +123,17 @@ declare class DatePicker extends Component<DatePickerProps, State> {
|
|
|
123
123
|
getPlaceholder: () => string;
|
|
124
124
|
render(): jsx.JSX.Element;
|
|
125
125
|
}
|
|
126
|
-
export {
|
|
127
|
-
|
|
126
|
+
export { DatePickerComponent as DatePickerWithoutAnalytics };
|
|
127
|
+
/**
|
|
128
|
+
* __Date picker__
|
|
129
|
+
*
|
|
130
|
+
* A date picker allows the user to select a particular date.
|
|
131
|
+
*
|
|
132
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/date-picker/examples)
|
|
133
|
+
* - [Code](https://atlassian.design/components/datetime-picker/date-picker/code)
|
|
134
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/date-picker/usage)
|
|
135
|
+
*/
|
|
136
|
+
declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "testId" | "placeholder" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "value" | "isOpen" | "parseInputValue" | "formatDisplayLabel" | "dateFormat"> & Partial<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "icon" | "disabled" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "locale" | "autoFocus" | "defaultIsOpen" | "name" | "spacing" | "isInvalid" | "hideIcon">> & Partial<Pick<{
|
|
128
137
|
appearance: Appearance;
|
|
129
138
|
autoFocus: boolean;
|
|
130
139
|
defaultIsOpen: boolean;
|
|
@@ -139,11 +148,11 @@ declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit
|
|
|
139
148
|
isInvalid: boolean;
|
|
140
149
|
label: string;
|
|
141
150
|
name: string;
|
|
142
|
-
onBlur: (_event:
|
|
151
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
143
152
|
onChange: (_value: string) => void;
|
|
144
|
-
onFocus: (_event:
|
|
153
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
145
154
|
selectProps: {};
|
|
146
155
|
spacing: Spacing;
|
|
147
156
|
locale: string;
|
|
148
157
|
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "testId" | "label" | "icon" | "disabled" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "value" | "autoFocus" | "defaultIsOpen" | "isOpen" | "name" | "parseInputValue" | "formatDisplayLabel" | "spacing" | "isInvalid" | "hideIcon" | "dateFormat"> & import("react").RefAttributes<any>>;
|
|
149
|
-
export default
|
|
158
|
+
export default DatePicker;
|
|
@@ -36,7 +36,7 @@ declare const dateTimePickerDefaultProps: {
|
|
|
36
36
|
};
|
|
37
37
|
export declare const datePickerDefaultAriaLabel = "Date";
|
|
38
38
|
export declare const timePickerDefaultAriaLabel = "Time";
|
|
39
|
-
declare class
|
|
39
|
+
declare class DateTimePickerComponent extends React.Component<DateTimePickerProps, State> {
|
|
40
40
|
static defaultProps: DateTimePickerProps;
|
|
41
41
|
state: State;
|
|
42
42
|
getSafeState: () => {
|
|
@@ -63,6 +63,15 @@ declare class DateTimePicker extends React.Component<DateTimePickerProps, State>
|
|
|
63
63
|
}): void;
|
|
64
64
|
render(): jsx.JSX.Element;
|
|
65
65
|
}
|
|
66
|
-
export {
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
export { DateTimePickerComponent as DateTimePickerWithoutAnalytics };
|
|
67
|
+
/**
|
|
68
|
+
* __Date time picker__
|
|
69
|
+
*
|
|
70
|
+
* A date time picker allows the user to select an associated date and time.
|
|
71
|
+
*
|
|
72
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/examples)
|
|
73
|
+
* - [Code](https://atlassian.design/components/datetime-picker/code)
|
|
74
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/usage)
|
|
75
|
+
*/
|
|
76
|
+
declare const DateTimePicker: React.ForwardRefExoticComponent<Pick<Pick<Pick<Omit<DateTimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<DateTimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "times" | "testId" | "appearance" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "locale" | "value" | "autoFocus" | "name" | "spacing" | "isInvalid" | "dateFormat" | "timeIsEditable" | "timeFormat" | "datePickerProps" | "timePickerProps" | "parseValue" | "datePickerSelectProps" | "timePickerSelectProps">> & Partial<Pick<DateTimePickerProps, "ref" | "createAnalyticsEvent">>, "times" | "testId" | "appearance" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "locale" | "createAnalyticsEvent" | "value" | "autoFocus" | "name" | "spacing" | "isInvalid" | "dateFormat" | "timeIsEditable" | "timeFormat" | "datePickerProps" | "timePickerProps" | "parseValue" | "datePickerSelectProps" | "timePickerSelectProps"> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "times" | "testId" | "appearance" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "locale" | "analyticsContext" | "createAnalyticsEvent" | "value" | "autoFocus" | "name" | "spacing" | "isInvalid" | "dateFormat" | "timeIsEditable" | "timeFormat" | "datePickerProps" | "timePickerProps" | "parseValue" | "datePickerSelectProps" | "timePickerSelectProps"> & React.RefAttributes<any>>;
|
|
77
|
+
export default DateTimePicker;
|
|
@@ -35,7 +35,7 @@ declare const timePickerDefaultProps: {
|
|
|
35
35
|
timeIsEditable: boolean;
|
|
36
36
|
locale: string;
|
|
37
37
|
};
|
|
38
|
-
declare class
|
|
38
|
+
declare class TimePickerComponent extends React.Component<TimePickerProps, State> {
|
|
39
39
|
containerRef: HTMLElement | null;
|
|
40
40
|
static defaultProps: {
|
|
41
41
|
appearance: Appearance;
|
|
@@ -79,8 +79,17 @@ declare class TimePicker extends React.Component<TimePickerProps, State> {
|
|
|
79
79
|
onSelectKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
80
80
|
render(): JSX.Element;
|
|
81
81
|
}
|
|
82
|
-
export {
|
|
83
|
-
|
|
82
|
+
export { TimePickerComponent as TimePickerWithoutAnalytics };
|
|
83
|
+
/**
|
|
84
|
+
* __Time picker__
|
|
85
|
+
*
|
|
86
|
+
* A time picker allows the user to select a specific time.
|
|
87
|
+
*
|
|
88
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/time-picker/examples)
|
|
89
|
+
* - [Code](https://atlassian.design/components/datetime-picker/time-picker/code)
|
|
90
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/time-picker/usage)
|
|
91
|
+
*/
|
|
92
|
+
declare const TimePicker: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "testId" | "placeholder" | "value" | "isOpen" | "formatDisplayLabel" | "timeFormat"> & Partial<Pick<Omit<TimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "times" | "label" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "locale" | "autoFocus" | "defaultIsOpen" | "name" | "parseInputValue" | "spacing" | "isInvalid" | "hideIcon" | "timeIsEditable">> & Partial<Pick<{
|
|
84
93
|
appearance: Appearance;
|
|
85
94
|
autoFocus: boolean;
|
|
86
95
|
defaultIsOpen: boolean;
|
|
@@ -102,4 +111,4 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePicke
|
|
|
102
111
|
timeIsEditable: boolean;
|
|
103
112
|
locale: string;
|
|
104
113
|
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "times" | "testId" | "label" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "locale" | "analyticsContext" | "value" | "autoFocus" | "defaultIsOpen" | "isOpen" | "name" | "parseInputValue" | "formatDisplayLabel" | "spacing" | "isInvalid" | "hideIcon" | "timeIsEditable" | "timeFormat"> & React.RefAttributes<any>>;
|
|
105
|
-
export default
|
|
114
|
+
export default TimePicker;
|
|
@@ -10,5 +10,5 @@ export declare function checkHour(hour: string, meridiem: string): string | null
|
|
|
10
10
|
export declare function checkMinuteSecond(value: string): string | null;
|
|
11
11
|
export declare function convertTo24hrTime(time: string): TimeObject | null;
|
|
12
12
|
export declare function assignToDate(time: TimeObject): Date;
|
|
13
|
-
export default function (time: string): string | Date;
|
|
13
|
+
export default function parseTime(time: string): string | Date;
|
|
14
14
|
export {};
|
|
@@ -46,7 +46,7 @@ declare const datePickerDefaultProps: {
|
|
|
46
46
|
spacing: Spacing;
|
|
47
47
|
locale: string;
|
|
48
48
|
};
|
|
49
|
-
declare class
|
|
49
|
+
declare class DatePickerComponent extends Component<DatePickerProps, State> {
|
|
50
50
|
static defaultProps: {
|
|
51
51
|
appearance: Appearance;
|
|
52
52
|
autoFocus: boolean;
|
|
@@ -123,8 +123,17 @@ declare class DatePicker extends Component<DatePickerProps, State> {
|
|
|
123
123
|
getPlaceholder: () => string;
|
|
124
124
|
render(): jsx.JSX.Element;
|
|
125
125
|
}
|
|
126
|
-
export {
|
|
127
|
-
|
|
126
|
+
export { DatePickerComponent as DatePickerWithoutAnalytics };
|
|
127
|
+
/**
|
|
128
|
+
* __Date picker__
|
|
129
|
+
*
|
|
130
|
+
* A date picker allows the user to select a particular date.
|
|
131
|
+
*
|
|
132
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/date-picker/examples)
|
|
133
|
+
* - [Code](https://atlassian.design/components/datetime-picker/date-picker/code)
|
|
134
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/date-picker/usage)
|
|
135
|
+
*/
|
|
136
|
+
declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "testId" | "placeholder" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "value" | "isOpen" | "parseInputValue" | "formatDisplayLabel" | "dateFormat"> & Partial<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "label" | "icon" | "disabled" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "locale" | "autoFocus" | "defaultIsOpen" | "name" | "spacing" | "isInvalid" | "hideIcon">> & Partial<Pick<{
|
|
128
137
|
appearance: Appearance;
|
|
129
138
|
autoFocus: boolean;
|
|
130
139
|
defaultIsOpen: boolean;
|
|
@@ -139,11 +148,11 @@ declare const _default: import("react").ForwardRefExoticComponent<Pick<Pick<Omit
|
|
|
139
148
|
isInvalid: boolean;
|
|
140
149
|
label: string;
|
|
141
150
|
name: string;
|
|
142
|
-
onBlur: (_event:
|
|
151
|
+
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
143
152
|
onChange: (_value: string) => void;
|
|
144
|
-
onFocus: (_event:
|
|
153
|
+
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
145
154
|
selectProps: {};
|
|
146
155
|
spacing: Spacing;
|
|
147
156
|
locale: string;
|
|
148
157
|
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "testId" | "label" | "icon" | "disabled" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "value" | "autoFocus" | "defaultIsOpen" | "isOpen" | "name" | "parseInputValue" | "formatDisplayLabel" | "spacing" | "isInvalid" | "hideIcon" | "dateFormat"> & import("react").RefAttributes<any>>;
|
|
149
|
-
export default
|
|
158
|
+
export default DatePicker;
|
|
@@ -36,7 +36,7 @@ declare const dateTimePickerDefaultProps: {
|
|
|
36
36
|
};
|
|
37
37
|
export declare const datePickerDefaultAriaLabel = "Date";
|
|
38
38
|
export declare const timePickerDefaultAriaLabel = "Time";
|
|
39
|
-
declare class
|
|
39
|
+
declare class DateTimePickerComponent extends React.Component<DateTimePickerProps, State> {
|
|
40
40
|
static defaultProps: DateTimePickerProps;
|
|
41
41
|
state: State;
|
|
42
42
|
getSafeState: () => {
|
|
@@ -63,6 +63,15 @@ declare class DateTimePicker extends React.Component<DateTimePickerProps, State>
|
|
|
63
63
|
}): void;
|
|
64
64
|
render(): jsx.JSX.Element;
|
|
65
65
|
}
|
|
66
|
-
export {
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
export { DateTimePickerComponent as DateTimePickerWithoutAnalytics };
|
|
67
|
+
/**
|
|
68
|
+
* __Date time picker__
|
|
69
|
+
*
|
|
70
|
+
* A date time picker allows the user to select an associated date and time.
|
|
71
|
+
*
|
|
72
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/examples)
|
|
73
|
+
* - [Code](https://atlassian.design/components/datetime-picker/code)
|
|
74
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/usage)
|
|
75
|
+
*/
|
|
76
|
+
declare const DateTimePicker: React.ForwardRefExoticComponent<Pick<Pick<Pick<Omit<DateTimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<DateTimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "times" | "testId" | "appearance" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "locale" | "value" | "autoFocus" | "name" | "spacing" | "isInvalid" | "dateFormat" | "timeIsEditable" | "timeFormat" | "datePickerProps" | "timePickerProps" | "parseValue" | "datePickerSelectProps" | "timePickerSelectProps">> & Partial<Pick<DateTimePickerProps, "ref" | "createAnalyticsEvent">>, "times" | "testId" | "appearance" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "locale" | "createAnalyticsEvent" | "value" | "autoFocus" | "name" | "spacing" | "isInvalid" | "dateFormat" | "timeIsEditable" | "timeFormat" | "datePickerProps" | "timePickerProps" | "parseValue" | "datePickerSelectProps" | "timePickerSelectProps"> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "times" | "testId" | "appearance" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "locale" | "analyticsContext" | "createAnalyticsEvent" | "value" | "autoFocus" | "name" | "spacing" | "isInvalid" | "dateFormat" | "timeIsEditable" | "timeFormat" | "datePickerProps" | "timePickerProps" | "parseValue" | "datePickerSelectProps" | "timePickerSelectProps"> & React.RefAttributes<any>>;
|
|
77
|
+
export default DateTimePicker;
|
|
@@ -35,7 +35,7 @@ declare const timePickerDefaultProps: {
|
|
|
35
35
|
timeIsEditable: boolean;
|
|
36
36
|
locale: string;
|
|
37
37
|
};
|
|
38
|
-
declare class
|
|
38
|
+
declare class TimePickerComponent extends React.Component<TimePickerProps, State> {
|
|
39
39
|
containerRef: HTMLElement | null;
|
|
40
40
|
static defaultProps: {
|
|
41
41
|
appearance: Appearance;
|
|
@@ -79,8 +79,17 @@ declare class TimePicker extends React.Component<TimePickerProps, State> {
|
|
|
79
79
|
onSelectKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
80
80
|
render(): JSX.Element;
|
|
81
81
|
}
|
|
82
|
-
export {
|
|
83
|
-
|
|
82
|
+
export { TimePickerComponent as TimePickerWithoutAnalytics };
|
|
83
|
+
/**
|
|
84
|
+
* __Time picker__
|
|
85
|
+
*
|
|
86
|
+
* A time picker allows the user to select a specific time.
|
|
87
|
+
*
|
|
88
|
+
* - [Examples](https://atlassian.design/components/datetime-picker/time-picker/examples)
|
|
89
|
+
* - [Code](https://atlassian.design/components/datetime-picker/time-picker/code)
|
|
90
|
+
* - [Usage](https://atlassian.design/components/datetime-picker/time-picker/usage)
|
|
91
|
+
*/
|
|
92
|
+
declare const TimePicker: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "testId" | "placeholder" | "value" | "isOpen" | "formatDisplayLabel" | "timeFormat"> & Partial<Pick<Omit<TimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "times" | "label" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "defaultValue" | "id" | "onFocus" | "onBlur" | "onChange" | "locale" | "autoFocus" | "defaultIsOpen" | "name" | "parseInputValue" | "spacing" | "isInvalid" | "hideIcon" | "timeIsEditable">> & Partial<Pick<{
|
|
84
93
|
appearance: Appearance;
|
|
85
94
|
autoFocus: boolean;
|
|
86
95
|
defaultIsOpen: boolean;
|
|
@@ -102,4 +111,4 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<TimePicke
|
|
|
102
111
|
timeIsEditable: boolean;
|
|
103
112
|
locale: string;
|
|
104
113
|
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "times" | "testId" | "label" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "locale" | "analyticsContext" | "value" | "autoFocus" | "defaultIsOpen" | "isOpen" | "name" | "parseInputValue" | "formatDisplayLabel" | "spacing" | "isInvalid" | "hideIcon" | "timeIsEditable" | "timeFormat"> & React.RefAttributes<any>>;
|
|
105
|
-
export default
|
|
114
|
+
export default TimePicker;
|
|
@@ -10,5 +10,5 @@ export declare function checkHour(hour: string, meridiem: string): string | null
|
|
|
10
10
|
export declare function checkMinuteSecond(value: string): string | null;
|
|
11
11
|
export declare function convertTo24hrTime(time: string): TimeObject | null;
|
|
12
12
|
export declare function assignToDate(time: TimeObject): Date;
|
|
13
|
-
export default function (time: string): string | Date;
|
|
13
|
+
export default function parseTime(time: string): string | Date;
|
|
14
14
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "13.7.
|
|
3
|
+
"version": "13.7.2",
|
|
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/"
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
43
43
|
"@atlaskit/calendar": "^14.3.0",
|
|
44
44
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
45
|
-
"@atlaskit/icon": "^22.
|
|
45
|
+
"@atlaskit/icon": "^22.6.0",
|
|
46
46
|
"@atlaskit/layering": "^0.3.0",
|
|
47
47
|
"@atlaskit/locale": "^2.7.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
49
49
|
"@atlaskit/popper": "^6.1.0",
|
|
50
50
|
"@atlaskit/select": "^17.11.0",
|
|
51
51
|
"@atlaskit/theme": "^12.11.0",
|
|
52
|
-
"@atlaskit/tokens": "^1.
|
|
52
|
+
"@atlaskit/tokens": "^1.54.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@emotion/react": "^11.7.1",
|
|
55
55
|
"date-fns": "^2.17.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@af/accessibility-testing": "*",
|
|
64
64
|
"@af/integration-testing": "*",
|
|
65
65
|
"@af/visual-regression": "*",
|
|
66
|
-
"@atlaskit/button": "^18.
|
|
66
|
+
"@atlaskit/button": "^18.4.0",
|
|
67
67
|
"@atlaskit/docs": "*",
|
|
68
68
|
"@atlaskit/form": "^10.4.0",
|
|
69
69
|
"@atlaskit/modal-dialog": "^12.14.0",
|