@atlaskit/jql-editor 6.2.2 → 6.2.3
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 +8 -0
- package/dist/cjs/state/index.js +3 -0
- package/dist/cjs/ui/jql-editor-view/index.js +4 -1
- package/dist/es2019/state/index.js +3 -0
- package/dist/es2019/ui/jql-editor-view/index.js +4 -0
- package/dist/esm/state/index.js +3 -0
- package/dist/esm/ui/jql-editor-view/index.js +4 -1
- package/dist/types/state/index.d.ts +37 -872
- package/dist/types-ts4.5/state/index.d.ts +37 -872
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/jql-editor
|
|
2
2
|
|
|
3
|
+
## 6.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ef04a3969cfd2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef04a3969cfd2) -
|
|
8
|
+
Fixes a bug where it was not possible to focus the JQL Editor using the `tab` key when it was
|
|
9
|
+
contained by certain components, such as the Atlaskit Popup component.
|
|
10
|
+
|
|
3
11
|
## 6.2.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/state/index.js
CHANGED
|
@@ -87,6 +87,9 @@ var initialState = exports.initialState = {
|
|
|
87
87
|
var isLineNumbersVisible = function isLineNumbersVisible(editorState) {
|
|
88
88
|
return editorState.doc.childCount > 1;
|
|
89
89
|
};
|
|
90
|
+
|
|
91
|
+
// Explicit type declaration for actions is required for IsoDec compliance
|
|
92
|
+
|
|
90
93
|
var actions = exports.actions = {
|
|
91
94
|
onEditorViewBlur: function onEditorViewBlur() {
|
|
92
95
|
return function (_ref) {
|
|
@@ -10,6 +10,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _throttle = _interopRequireDefault(require("lodash/throttle"));
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
14
|
var _constants = require("../../common/constants");
|
|
14
15
|
var _useEditorTheme = require("../../hooks/use-editor-theme");
|
|
15
16
|
var _useEditorViewIsInvalid = require("../../hooks/use-editor-view-is-invalid");
|
|
@@ -109,7 +110,7 @@ var JQLEditorView = function JQLEditorView(_ref) {
|
|
|
109
110
|
|
|
110
111
|
// Compute HTML attributes to be applied to the Prosemirror editor view
|
|
111
112
|
var getAttributes = (0, _react.useCallback)(function () {
|
|
112
|
-
return _objectSpread(_objectSpread({
|
|
113
|
+
return _objectSpread(_objectSpread(_objectSpread({
|
|
113
114
|
id: editorId,
|
|
114
115
|
'data-vc': _constants.JQL_EDITOR_INPUT_ID,
|
|
115
116
|
'data-testid': 'jql-editor-input',
|
|
@@ -128,6 +129,8 @@ var JQLEditorView = function JQLEditorView(_ref) {
|
|
|
128
129
|
'aria-activedescendant': selectedOptionId
|
|
129
130
|
}), editorViewIsInvalid && {
|
|
130
131
|
'aria-invalid': 'true'
|
|
132
|
+
}), (0, _platformFeatureFlags.fg)('empanda_jql-editor_fix_tab_select_in_popup') && {
|
|
133
|
+
tabindex: '0'
|
|
131
134
|
});
|
|
132
135
|
}, [editorId, isAutocompleteOpen, intl, autocompleteId, editorViewIsInvalid, validationId, helpContentId, selectedOptionId]);
|
|
133
136
|
|
|
@@ -74,6 +74,9 @@ export const initialState = {
|
|
|
74
74
|
* Line numbers should be shown if there are more than 1 paragraph blocks in the document.
|
|
75
75
|
*/
|
|
76
76
|
const isLineNumbersVisible = editorState => editorState.doc.childCount > 1;
|
|
77
|
+
|
|
78
|
+
// Explicit type declaration for actions is required for IsoDec compliance
|
|
79
|
+
|
|
77
80
|
export const actions = {
|
|
78
81
|
onEditorViewBlur: () => ({
|
|
79
82
|
setState,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
2
2
|
import throttle from 'lodash/throttle';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { JQL_EDITOR_AUTOCOMPLETE_ID, JQL_EDITOR_HELP_CONTENT_ID, JQL_EDITOR_INPUT_ID, JQL_EDITOR_MAIN_ID, JQL_EDITOR_VALIDATION_ID } from '../../common/constants';
|
|
4
5
|
import { useEditorThemeContext } from '../../hooks/use-editor-theme';
|
|
5
6
|
import { useEditorViewIsInvalid } from '../../hooks/use-editor-view-is-invalid';
|
|
@@ -97,6 +98,9 @@ const JQLEditorView = ({
|
|
|
97
98
|
}),
|
|
98
99
|
...(editorViewIsInvalid && {
|
|
99
100
|
'aria-invalid': 'true'
|
|
101
|
+
}),
|
|
102
|
+
...(fg('empanda_jql-editor_fix_tab_select_in_popup') && {
|
|
103
|
+
tabindex: '0'
|
|
100
104
|
})
|
|
101
105
|
};
|
|
102
106
|
}, [editorId, isAutocompleteOpen, intl, autocompleteId, editorViewIsInvalid, validationId, helpContentId, selectedOptionId]);
|
package/dist/esm/state/index.js
CHANGED
|
@@ -81,6 +81,9 @@ export var initialState = {
|
|
|
81
81
|
var isLineNumbersVisible = function isLineNumbersVisible(editorState) {
|
|
82
82
|
return editorState.doc.childCount > 1;
|
|
83
83
|
};
|
|
84
|
+
|
|
85
|
+
// Explicit type declaration for actions is required for IsoDec compliance
|
|
86
|
+
|
|
84
87
|
export var actions = {
|
|
85
88
|
onEditorViewBlur: function onEditorViewBlur() {
|
|
86
89
|
return function (_ref) {
|
|
@@ -4,6 +4,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
6
6
|
import throttle from 'lodash/throttle';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { JQL_EDITOR_AUTOCOMPLETE_ID, JQL_EDITOR_HELP_CONTENT_ID, JQL_EDITOR_INPUT_ID, JQL_EDITOR_MAIN_ID, JQL_EDITOR_VALIDATION_ID } from '../../common/constants';
|
|
8
9
|
import { useEditorThemeContext } from '../../hooks/use-editor-theme';
|
|
9
10
|
import { useEditorViewIsInvalid } from '../../hooks/use-editor-view-is-invalid';
|
|
@@ -102,7 +103,7 @@ var JQLEditorView = function JQLEditorView(_ref) {
|
|
|
102
103
|
|
|
103
104
|
// Compute HTML attributes to be applied to the Prosemirror editor view
|
|
104
105
|
var getAttributes = useCallback(function () {
|
|
105
|
-
return _objectSpread(_objectSpread({
|
|
106
|
+
return _objectSpread(_objectSpread(_objectSpread({
|
|
106
107
|
id: editorId,
|
|
107
108
|
'data-vc': JQL_EDITOR_INPUT_ID,
|
|
108
109
|
'data-testid': 'jql-editor-input',
|
|
@@ -121,6 +122,8 @@ var JQLEditorView = function JQLEditorView(_ref) {
|
|
|
121
122
|
'aria-activedescendant': selectedOptionId
|
|
122
123
|
}), editorViewIsInvalid && {
|
|
123
124
|
'aria-invalid': 'true'
|
|
125
|
+
}), fg('empanda_jql-editor_fix_tab_select_in_popup') && {
|
|
126
|
+
tabindex: '0'
|
|
124
127
|
});
|
|
125
128
|
}, [editorId, isAutocompleteOpen, intl, autocompleteId, editorViewIsInvalid, validationId, helpContentId, selectedOptionId]);
|
|
126
129
|
|