@atlaskit/editor-plugin-date 20.0.0 → 20.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-date
|
|
2
2
|
|
|
3
|
+
## 20.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a091435114cee`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a091435114cee) -
|
|
8
|
+
Make date picker autofocus and arrow-key focus trapping permanent.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 20.0.0
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -19,7 +19,6 @@ var _reactIntl = require("react-intl");
|
|
|
19
19
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
20
20
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
21
21
|
var _errorMessage = require("@atlaskit/form/error-message");
|
|
22
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
23
22
|
var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
|
|
24
23
|
var _formatParse = require("./utils/formatParse");
|
|
25
24
|
var _internal = require("./utils/internal");
|
|
@@ -137,10 +136,8 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
137
136
|
return;
|
|
138
137
|
}
|
|
139
138
|
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
event.stopPropagation();
|
|
143
|
-
}
|
|
139
|
+
// Focus trap for arrow keys in the input field.
|
|
140
|
+
event.stopPropagation();
|
|
144
141
|
var dispatchAnalyticsEvent = _this.props.dispatchAnalyticsEvent;
|
|
145
142
|
var cursorPos = (_this$inputRef3 = _this.inputRef) === null || _this$inputRef3 === void 0 ? void 0 : _this$inputRef3.selectionStart;
|
|
146
143
|
if (cursorPos === null || cursorPos === undefined) {
|
|
@@ -227,8 +224,7 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
227
224
|
this.inputRef.setSelectionRange(setInputSelectionPos, setInputSelectionPos);
|
|
228
225
|
this.setInputSelectionPos = undefined;
|
|
229
226
|
}
|
|
230
|
-
|
|
231
|
-
if (this.inputRef && shouldFocusInput) {
|
|
227
|
+
if (this.inputRef && !prevProps.autoFocus && this.props.autoFocus) {
|
|
232
228
|
this.focusInput();
|
|
233
229
|
}
|
|
234
230
|
|
|
@@ -7,7 +7,6 @@ import { injectIntl } from 'react-intl';
|
|
|
7
7
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { dateMessages as messages } from '@atlaskit/editor-common/messages';
|
|
9
9
|
import { ErrorMessage } from '@atlaskit/form/error-message';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
10
|
import TextField from '@atlaskit/textfield/text-field';
|
|
12
11
|
import { formatDateType, parseDateType } from './utils/formatParse';
|
|
13
12
|
import { adjustDate, findDateSegmentByPosition, isDatePossiblyValid } from './utils/internal';
|
|
@@ -127,10 +126,8 @@ class DatePickerInput extends React.Component {
|
|
|
127
126
|
return;
|
|
128
127
|
}
|
|
129
128
|
|
|
130
|
-
//
|
|
131
|
-
|
|
132
|
-
event.stopPropagation();
|
|
133
|
-
}
|
|
129
|
+
// Focus trap for arrow keys in the input field.
|
|
130
|
+
event.stopPropagation();
|
|
134
131
|
const {
|
|
135
132
|
dispatchAnalyticsEvent
|
|
136
133
|
} = this.props;
|
|
@@ -220,8 +217,7 @@ class DatePickerInput extends React.Component {
|
|
|
220
217
|
this.inputRef.setSelectionRange(setInputSelectionPos, setInputSelectionPos);
|
|
221
218
|
this.setInputSelectionPos = undefined;
|
|
222
219
|
}
|
|
223
|
-
|
|
224
|
-
if (this.inputRef && shouldFocusInput) {
|
|
220
|
+
if (this.inputRef && !prevProps.autoFocus && this.props.autoFocus) {
|
|
225
221
|
this.focusInput();
|
|
226
222
|
}
|
|
227
223
|
|
|
@@ -14,7 +14,6 @@ import { injectIntl } from 'react-intl';
|
|
|
14
14
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
15
15
|
import { dateMessages as messages } from '@atlaskit/editor-common/messages';
|
|
16
16
|
import { ErrorMessage } from '@atlaskit/form/error-message';
|
|
17
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
18
17
|
import TextField from '@atlaskit/textfield/text-field';
|
|
19
18
|
import { formatDateType, parseDateType } from './utils/formatParse';
|
|
20
19
|
import { adjustDate, findDateSegmentByPosition, isDatePossiblyValid } from './utils/internal';
|
|
@@ -131,10 +130,8 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
131
130
|
return;
|
|
132
131
|
}
|
|
133
132
|
|
|
134
|
-
//
|
|
135
|
-
|
|
136
|
-
event.stopPropagation();
|
|
137
|
-
}
|
|
133
|
+
// Focus trap for arrow keys in the input field.
|
|
134
|
+
event.stopPropagation();
|
|
138
135
|
var dispatchAnalyticsEvent = _this.props.dispatchAnalyticsEvent;
|
|
139
136
|
var cursorPos = (_this$inputRef3 = _this.inputRef) === null || _this$inputRef3 === void 0 ? void 0 : _this$inputRef3.selectionStart;
|
|
140
137
|
if (cursorPos === null || cursorPos === undefined) {
|
|
@@ -221,8 +218,7 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
221
218
|
this.inputRef.setSelectionRange(setInputSelectionPos, setInputSelectionPos);
|
|
222
219
|
this.setInputSelectionPos = undefined;
|
|
223
220
|
}
|
|
224
|
-
|
|
225
|
-
if (this.inputRef && shouldFocusInput) {
|
|
221
|
+
if (this.inputRef && !prevProps.autoFocus && this.props.autoFocus) {
|
|
226
222
|
this.focusInput();
|
|
227
223
|
}
|
|
228
224
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-date",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.1",
|
|
4
4
|
"description": "Date plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/editor-plugin-editor-viewmode": "^20.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-ui-control-registry": "^12.0.0",
|
|
32
32
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
33
|
-
"@atlaskit/editor-shared-styles": "^4.
|
|
33
|
+
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
34
34
|
"@atlaskit/editor-ui-control-model": "^2.9.0",
|
|
35
35
|
"@atlaskit/form": "^17.2.0",
|
|
36
36
|
"@atlaskit/icon": "^37.6.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
40
40
|
"@atlaskit/textfield": "^10.2.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^189.0.0",
|
|
42
42
|
"@atlaskit/tokens": "^16.12.0",
|
|
43
43
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"react-intl": "^7.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^122.
|
|
56
|
+
"@atlaskit/editor-common": "^122.2.0",
|
|
57
57
|
"react": "^18.2.0 || ^19.2.0",
|
|
58
58
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
59
59
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -64,9 +64,6 @@
|
|
|
64
64
|
},
|
|
65
65
|
"platform_editor_adf_with_localid": {
|
|
66
66
|
"type": "boolean"
|
|
67
|
-
},
|
|
68
|
-
"platform_editor_datepicker_focus_fix": {
|
|
69
|
-
"type": "boolean"
|
|
70
67
|
}
|
|
71
68
|
}
|
|
72
69
|
}
|