@atlaskit/datetime-picker 13.3.3 → 13.3.5
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 +9 -7
- package/dist/cjs/components/date-time-picker.js +1 -1
- package/dist/cjs/components/time-picker.js +1 -1
- package/dist/es2019/components/date-picker.js +9 -7
- package/dist/es2019/components/date-time-picker.js +1 -1
- package/dist/es2019/components/time-picker.js +1 -1
- package/dist/esm/components/date-picker.js +9 -7
- package/dist/esm/components/date-time-picker.js +1 -1
- package/dist/esm/components/time-picker.js +1 -1
- package/dist/types/components/date-picker.d.ts +4 -4
- package/dist/types-ts4.5/components/date-picker.d.ts +4 -4
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 13.3.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#95171](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/95171) [`22defdb991da`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/22defdb991da) - [ux] Open date picker calendar when enter or space is pressed while input is focused and calendar is closed.
|
|
8
|
+
|
|
9
|
+
## 13.3.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#93577](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93577) [`af88f34ad1bc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/af88f34ad1bc) - This removes the `platform.design-system-team.move-onblur-event-to-input-container_3z82c` feature flag. The blur event on `DatePicker` should fire after the calendar is closed.
|
|
14
|
+
|
|
3
15
|
## 13.3.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -36,7 +36,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
36
36
|
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); }; }
|
|
37
37
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
38
38
|
var packageName = "@atlaskit/datetime-picker";
|
|
39
|
-
var packageVersion = "13.3.
|
|
39
|
+
var packageVersion = "13.3.5";
|
|
40
40
|
var datePickerDefaultProps = {
|
|
41
41
|
appearance: 'default',
|
|
42
42
|
autoFocus: false,
|
|
@@ -144,9 +144,7 @@ var DatePicker = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Co
|
|
|
144
144
|
_this.setState({
|
|
145
145
|
isOpen: false
|
|
146
146
|
});
|
|
147
|
-
|
|
148
|
-
_this.props.onBlur(event);
|
|
149
|
-
}
|
|
147
|
+
_this.props.onBlur(event);
|
|
150
148
|
}
|
|
151
149
|
});
|
|
152
150
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onSelectBlur", function (event) {
|
|
@@ -165,9 +163,6 @@ var DatePicker = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Co
|
|
|
165
163
|
isFocused: false
|
|
166
164
|
});
|
|
167
165
|
}
|
|
168
|
-
if (!(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.move-onblur-event-to-input-container_3z82c')) {
|
|
169
|
-
_this.props.onBlur(event);
|
|
170
|
-
}
|
|
171
166
|
});
|
|
172
167
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onSelectFocus", function (event) {
|
|
173
168
|
var _this$getSafeState = _this.getSafeState(),
|
|
@@ -210,6 +205,13 @@ var DatePicker = exports.DatePickerWithoutAnalytics = /*#__PURE__*/function (_Co
|
|
|
210
205
|
value = _this$getSafeState2.value,
|
|
211
206
|
calendarValue = _this$getSafeState2.calendarValue;
|
|
212
207
|
var keyPressed = event.key.toLowerCase();
|
|
208
|
+
|
|
209
|
+
// If the input is focused and the calendar is not visible, handle space and enter clicks
|
|
210
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team-date-picker-input-focus-fix_awmzp') && !_this.state.isOpen && (keyPressed === 'enter' || keyPressed === ' ')) {
|
|
211
|
+
_this.setState({
|
|
212
|
+
isOpen: true
|
|
213
|
+
});
|
|
214
|
+
}
|
|
213
215
|
switch (keyPressed) {
|
|
214
216
|
case 'escape':
|
|
215
217
|
// Yes, this is not ideal. The alternative is to be able to place a ref
|
|
@@ -31,7 +31,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
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 = "13.3.
|
|
34
|
+
var packageVersion = "13.3.5";
|
|
35
35
|
// Make DatePicker 50% the width of DateTimePicker
|
|
36
36
|
// If rendering an icon container, shrink the TimePicker
|
|
37
37
|
var datePickerContainerStyles = (0, _react2.css)({
|
|
@@ -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.3.
|
|
39
|
+
var packageVersion = "13.3.5";
|
|
40
40
|
var menuStyles = {
|
|
41
41
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
42
42
|
position: 'static',
|
|
@@ -16,7 +16,7 @@ import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date'
|
|
|
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.3.
|
|
19
|
+
const packageVersion = "13.3.5";
|
|
20
20
|
const datePickerDefaultProps = {
|
|
21
21
|
appearance: 'default',
|
|
22
22
|
autoFocus: false,
|
|
@@ -120,9 +120,7 @@ class DatePicker extends Component {
|
|
|
120
120
|
this.setState({
|
|
121
121
|
isOpen: false
|
|
122
122
|
});
|
|
123
|
-
|
|
124
|
-
this.props.onBlur(event);
|
|
125
|
-
}
|
|
123
|
+
this.props.onBlur(event);
|
|
126
124
|
}
|
|
127
125
|
});
|
|
128
126
|
_defineProperty(this, "onSelectBlur", event => {
|
|
@@ -141,9 +139,6 @@ class DatePicker extends Component {
|
|
|
141
139
|
isFocused: false
|
|
142
140
|
});
|
|
143
141
|
}
|
|
144
|
-
if (!getBooleanFF('platform.design-system-team.move-onblur-event-to-input-container_3z82c')) {
|
|
145
|
-
this.props.onBlur(event);
|
|
146
|
-
}
|
|
147
142
|
});
|
|
148
143
|
_defineProperty(this, "onSelectFocus", event => {
|
|
149
144
|
const {
|
|
@@ -188,6 +183,13 @@ class DatePicker extends Component {
|
|
|
188
183
|
calendarValue
|
|
189
184
|
} = this.getSafeState();
|
|
190
185
|
const keyPressed = event.key.toLowerCase();
|
|
186
|
+
|
|
187
|
+
// If the input is focused and the calendar is not visible, handle space and enter clicks
|
|
188
|
+
if (getBooleanFF('platform.design-system-team-date-picker-input-focus-fix_awmzp') && !this.state.isOpen && (keyPressed === 'enter' || keyPressed === ' ')) {
|
|
189
|
+
this.setState({
|
|
190
|
+
isOpen: true
|
|
191
|
+
});
|
|
192
|
+
}
|
|
191
193
|
switch (keyPressed) {
|
|
192
194
|
case 'escape':
|
|
193
195
|
// Yes, this is not ideal. The alternative is to be able to place a ref
|
|
@@ -15,7 +15,7 @@ import { convertTokens } from '../internal/parse-tokens';
|
|
|
15
15
|
import DatePicker from './date-picker';
|
|
16
16
|
import TimePicker from './time-picker';
|
|
17
17
|
const packageName = "@atlaskit/datetime-picker";
|
|
18
|
-
const packageVersion = "13.3.
|
|
18
|
+
const packageVersion = "13.3.5";
|
|
19
19
|
// Make DatePicker 50% the width of DateTimePicker
|
|
20
20
|
// If rendering an icon container, shrink the TimePicker
|
|
21
21
|
const datePickerContainerStyles = css({
|
|
@@ -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.3.
|
|
19
|
+
const packageVersion = "13.3.5";
|
|
20
20
|
const menuStyles = {
|
|
21
21
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
22
22
|
position: 'static',
|
|
@@ -27,7 +27,7 @@ import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date'
|
|
|
27
27
|
import { convertTokens } from '../internal/parse-tokens';
|
|
28
28
|
import { makeSingleValue } from '../internal/single-value';
|
|
29
29
|
var packageName = "@atlaskit/datetime-picker";
|
|
30
|
-
var packageVersion = "13.3.
|
|
30
|
+
var packageVersion = "13.3.5";
|
|
31
31
|
var datePickerDefaultProps = {
|
|
32
32
|
appearance: 'default',
|
|
33
33
|
autoFocus: false,
|
|
@@ -135,9 +135,7 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
135
135
|
_this.setState({
|
|
136
136
|
isOpen: false
|
|
137
137
|
});
|
|
138
|
-
|
|
139
|
-
_this.props.onBlur(event);
|
|
140
|
-
}
|
|
138
|
+
_this.props.onBlur(event);
|
|
141
139
|
}
|
|
142
140
|
});
|
|
143
141
|
_defineProperty(_assertThisInitialized(_this), "onSelectBlur", function (event) {
|
|
@@ -156,9 +154,6 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
156
154
|
isFocused: false
|
|
157
155
|
});
|
|
158
156
|
}
|
|
159
|
-
if (!getBooleanFF('platform.design-system-team.move-onblur-event-to-input-container_3z82c')) {
|
|
160
|
-
_this.props.onBlur(event);
|
|
161
|
-
}
|
|
162
157
|
});
|
|
163
158
|
_defineProperty(_assertThisInitialized(_this), "onSelectFocus", function (event) {
|
|
164
159
|
var _this$getSafeState = _this.getSafeState(),
|
|
@@ -201,6 +196,13 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
201
196
|
value = _this$getSafeState2.value,
|
|
202
197
|
calendarValue = _this$getSafeState2.calendarValue;
|
|
203
198
|
var keyPressed = event.key.toLowerCase();
|
|
199
|
+
|
|
200
|
+
// If the input is focused and the calendar is not visible, handle space and enter clicks
|
|
201
|
+
if (getBooleanFF('platform.design-system-team-date-picker-input-focus-fix_awmzp') && !_this.state.isOpen && (keyPressed === 'enter' || keyPressed === ' ')) {
|
|
202
|
+
_this.setState({
|
|
203
|
+
isOpen: true
|
|
204
|
+
});
|
|
205
|
+
}
|
|
204
206
|
switch (keyPressed) {
|
|
205
207
|
case 'escape':
|
|
206
208
|
// Yes, this is not ideal. The alternative is to be able to place a ref
|
|
@@ -25,7 +25,7 @@ import { convertTokens } from '../internal/parse-tokens';
|
|
|
25
25
|
import DatePicker from './date-picker';
|
|
26
26
|
import TimePicker from './time-picker';
|
|
27
27
|
var packageName = "@atlaskit/datetime-picker";
|
|
28
|
-
var packageVersion = "13.3.
|
|
28
|
+
var packageVersion = "13.3.5";
|
|
29
29
|
// Make DatePicker 50% the width of DateTimePicker
|
|
30
30
|
// If rendering an icon container, shrink the TimePicker
|
|
31
31
|
var datePickerContainerStyles = css({
|
|
@@ -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.3.
|
|
31
|
+
var packageVersion = "13.3.5";
|
|
32
32
|
var menuStyles = {
|
|
33
33
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
34
34
|
position: 'static',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import { CalendarRef } from '@atlaskit/calendar';
|
|
5
|
-
import { LocalizationProvider } from '@atlaskit/locale';
|
|
6
|
-
import { ActionMeta, DropdownIndicatorProps, InputActionMeta, OptionType, ValueType } from '@atlaskit/select';
|
|
7
|
-
import { Appearance, DatePickerBaseProps, Spacing } from '../types';
|
|
4
|
+
import { type CalendarRef } from '@atlaskit/calendar';
|
|
5
|
+
import { type LocalizationProvider } from '@atlaskit/locale';
|
|
6
|
+
import { type ActionMeta, type DropdownIndicatorProps, type InputActionMeta, type OptionType, type ValueType } from '@atlaskit/select';
|
|
7
|
+
import { type Appearance, type DatePickerBaseProps, type Spacing } from '../types';
|
|
8
8
|
type DatePickerProps = typeof datePickerDefaultProps & DatePickerBaseProps;
|
|
9
9
|
interface State {
|
|
10
10
|
isOpen: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import { CalendarRef } from '@atlaskit/calendar';
|
|
5
|
-
import { LocalizationProvider } from '@atlaskit/locale';
|
|
6
|
-
import { ActionMeta, DropdownIndicatorProps, InputActionMeta, OptionType, ValueType } from '@atlaskit/select';
|
|
7
|
-
import { Appearance, DatePickerBaseProps, Spacing } from '../types';
|
|
4
|
+
import { type CalendarRef } from '@atlaskit/calendar';
|
|
5
|
+
import { type LocalizationProvider } from '@atlaskit/locale';
|
|
6
|
+
import { type ActionMeta, type DropdownIndicatorProps, type InputActionMeta, type OptionType, type ValueType } from '@atlaskit/select';
|
|
7
|
+
import { type Appearance, type DatePickerBaseProps, type Spacing } from '../types';
|
|
8
8
|
type DatePickerProps = typeof datePickerDefaultProps & DatePickerBaseProps;
|
|
9
9
|
interface State {
|
|
10
10
|
isOpen: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "13.3.
|
|
3
|
+
"version": "13.3.5",
|
|
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/"
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
44
44
|
"@atlaskit/icon": "^22.1.0",
|
|
45
45
|
"@atlaskit/layering": "^0.2.0",
|
|
46
|
-
"@atlaskit/locale": "^2.
|
|
46
|
+
"@atlaskit/locale": "^2.7.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
48
48
|
"@atlaskit/popper": "^5.5.0",
|
|
49
|
-
"@atlaskit/select": "^17.
|
|
49
|
+
"@atlaskit/select": "^17.7.0",
|
|
50
50
|
"@atlaskit/theme": "^12.7.0",
|
|
51
51
|
"@atlaskit/tokens": "^1.44.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@atlaskit/button": "^17.14.0",
|
|
66
66
|
"@atlaskit/docs": "*",
|
|
67
67
|
"@atlaskit/form": "^9.3.0",
|
|
68
|
-
"@atlaskit/modal-dialog": "^12.
|
|
69
|
-
"@atlaskit/popup": "^1.
|
|
68
|
+
"@atlaskit/modal-dialog": "^12.12.0",
|
|
69
|
+
"@atlaskit/popup": "^1.15.0",
|
|
70
70
|
"@atlaskit/range": "^7.1.0",
|
|
71
71
|
"@atlaskit/section-message": "^6.4.0",
|
|
72
72
|
"@atlaskit/ssr": "*",
|
|
@@ -116,9 +116,6 @@
|
|
|
116
116
|
"platform.design-system-team.date-picker-input-a11y-fix_cbbxs": {
|
|
117
117
|
"type": "boolean"
|
|
118
118
|
},
|
|
119
|
-
"platform.design-system-team.move-onblur-event-to-input-container_3z82c": {
|
|
120
|
-
"type": "boolean"
|
|
121
|
-
},
|
|
122
119
|
"platform.design-system-team-date-picker-input-focus-fix_awmzp": {
|
|
123
120
|
"type": "boolean"
|
|
124
121
|
}
|