@atlaskit/jql-editor 5.3.0 → 5.3.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 +8 -0
- package/dist/cjs/analytics/util.js +1 -1
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/errors/index.js +1 -7
- package/dist/cjs/ui/jql-editor-view/index.js +1 -2
- package/dist/es2019/analytics/util.js +1 -1
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/errors/index.js +1 -7
- package/dist/es2019/ui/jql-editor-view/index.js +1 -2
- package/dist/esm/analytics/util.js +1 -1
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/errors/index.js +1 -7
- package/dist/esm/ui/jql-editor-view/index.js +1 -2
- package/package.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/jql-editor
|
|
2
2
|
|
|
3
|
+
## 5.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#159778](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159778)
|
|
8
|
+
[`24eb0515f7011`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/24eb0515f7011) -
|
|
9
|
+
Clean up old code path for accessibility fix in error messages section
|
|
10
|
+
|
|
3
11
|
## 5.3.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useJqlEditorAnalytics = void 0;
|
|
7
7
|
var _jqlEditorCommon = require("@atlaskit/jql-editor-common");
|
|
8
8
|
var useJqlEditorAnalytics = exports.useJqlEditorAnalytics = function useJqlEditorAnalytics(analyticsSource) {
|
|
9
|
-
return (0, _jqlEditorCommon.useJqlPackageAnalytics)(analyticsSource, "@atlaskit/jql-editor", "5.3.
|
|
9
|
+
return (0, _jqlEditorCommon.useJqlPackageAnalytics)(analyticsSource, "@atlaskit/jql-editor", "5.3.1", _jqlEditorCommon.ANALYTICS_CHANNEL);
|
|
10
10
|
};
|
|
@@ -13,7 +13,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
14
14
|
var _form = require("@atlaskit/form");
|
|
15
15
|
var _jqlAst = require("@atlaskit/jql-ast");
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _constants = require("../../../../common/constants");
|
|
18
17
|
var _messages = require("../../../../common/messages");
|
|
19
18
|
var _useEditorTheme = require("../../../../hooks/use-editor-theme");
|
|
@@ -108,16 +107,11 @@ var ErrorMessages = exports.ErrorMessages = function ErrorMessages() {
|
|
|
108
107
|
CustomErrorComponent = _useCustomErrorCompon2[0];
|
|
109
108
|
var childrenToRender = errorMessages != null ? /*#__PURE__*/_react.default.createElement(_format.MessageContainer, null, /*#__PURE__*/_react.default.createElement(_form.ErrorMessage, {
|
|
110
109
|
testId: _constants.JQL_EDITOR_VALIDATION_ID
|
|
111
|
-
},
|
|
110
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
112
111
|
role: "alert",
|
|
113
112
|
id: validationId
|
|
114
113
|
}, /*#__PURE__*/_react.default.createElement(_format.FormatMessages, {
|
|
115
114
|
messages: errorMessages
|
|
116
|
-
})) : /*#__PURE__*/_react.default.createElement("span", {
|
|
117
|
-
role: "alert",
|
|
118
|
-
"aria-describedby": editorId
|
|
119
|
-
}, /*#__PURE__*/_react.default.createElement(_format.FormatMessages, {
|
|
120
|
-
messages: errorMessages
|
|
121
115
|
})))) : null;
|
|
122
116
|
|
|
123
117
|
// Only render CustomErrorComponent if there is an errorMessage
|
|
@@ -10,7 +10,6 @@ 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");
|
|
14
13
|
var _constants = require("../../common/constants");
|
|
15
14
|
var _useEditorTheme = require("../../hooks/use-editor-theme");
|
|
16
15
|
var _useEditorViewIsInvalid = require("../../hooks/use-editor-view-is-invalid");
|
|
@@ -124,7 +123,7 @@ var JQLEditorView = function JQLEditorView(_ref) {
|
|
|
124
123
|
'aria-label': intl.formatMessage(_messages.messages.inputLabel),
|
|
125
124
|
'aria-controls': autocompleteId,
|
|
126
125
|
'aria-owns': autocompleteId,
|
|
127
|
-
'aria-describedby':
|
|
126
|
+
'aria-describedby': editorViewIsInvalid ? validationId : helpContentId
|
|
128
127
|
}, selectedOptionId && {
|
|
129
128
|
'aria-activedescendant': selectedOptionId
|
|
130
129
|
}), editorViewIsInvalid && {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ANALYTICS_CHANNEL, useJqlPackageAnalytics } from '@atlaskit/jql-editor-common';
|
|
2
2
|
export const useJqlEditorAnalytics = analyticsSource => {
|
|
3
|
-
return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "5.3.
|
|
3
|
+
return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "5.3.1", ANALYTICS_CHANNEL);
|
|
4
4
|
};
|
|
@@ -3,7 +3,6 @@ import React, { useEffect } from 'react';
|
|
|
3
3
|
import { di } from 'react-magnetic-di';
|
|
4
4
|
import { ErrorMessage } from '@atlaskit/form';
|
|
5
5
|
import { JQLSyntaxError } from '@atlaskit/jql-ast';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { JQL_EDITOR_INPUT_ID, JQL_EDITOR_VALIDATION_ID } from '../../../../common/constants';
|
|
8
7
|
import { commonMessages } from '../../../../common/messages';
|
|
9
8
|
import { useEditorThemeContext } from '../../../../hooks/use-editor-theme';
|
|
@@ -88,16 +87,11 @@ export const ErrorMessages = () => {
|
|
|
88
87
|
const [CustomErrorComponent] = useCustomErrorComponent();
|
|
89
88
|
const childrenToRender = errorMessages != null ? /*#__PURE__*/React.createElement(MessageContainer, null, /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
90
89
|
testId: JQL_EDITOR_VALIDATION_ID
|
|
91
|
-
},
|
|
90
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
92
91
|
role: "alert",
|
|
93
92
|
id: validationId
|
|
94
93
|
}, /*#__PURE__*/React.createElement(FormatMessages, {
|
|
95
94
|
messages: errorMessages
|
|
96
|
-
})) : /*#__PURE__*/React.createElement("span", {
|
|
97
|
-
role: "alert",
|
|
98
|
-
"aria-describedby": editorId
|
|
99
|
-
}, /*#__PURE__*/React.createElement(FormatMessages, {
|
|
100
|
-
messages: errorMessages
|
|
101
95
|
})))) : null;
|
|
102
96
|
|
|
103
97
|
// Only render CustomErrorComponent if there is an errorMessage
|
|
@@ -1,6 +1,5 @@
|
|
|
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';
|
|
4
3
|
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';
|
|
5
4
|
import { useEditorThemeContext } from '../../hooks/use-editor-theme';
|
|
6
5
|
import { useEditorViewIsInvalid } from '../../hooks/use-editor-view-is-invalid';
|
|
@@ -91,7 +90,7 @@ const JQLEditorView = ({
|
|
|
91
90
|
'aria-label': intl.formatMessage(messages.inputLabel),
|
|
92
91
|
'aria-controls': autocompleteId,
|
|
93
92
|
'aria-owns': autocompleteId,
|
|
94
|
-
'aria-describedby':
|
|
93
|
+
'aria-describedby': editorViewIsInvalid ? validationId : helpContentId,
|
|
95
94
|
...(selectedOptionId && {
|
|
96
95
|
'aria-activedescendant': selectedOptionId
|
|
97
96
|
}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ANALYTICS_CHANNEL, useJqlPackageAnalytics } from '@atlaskit/jql-editor-common';
|
|
2
2
|
export var useJqlEditorAnalytics = function useJqlEditorAnalytics(analyticsSource) {
|
|
3
|
-
return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "5.3.
|
|
3
|
+
return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "5.3.1", ANALYTICS_CHANNEL);
|
|
4
4
|
};
|
|
@@ -6,7 +6,6 @@ import React, { useEffect } from 'react';
|
|
|
6
6
|
import { di } from 'react-magnetic-di';
|
|
7
7
|
import { ErrorMessage } from '@atlaskit/form';
|
|
8
8
|
import { JQLSyntaxError } from '@atlaskit/jql-ast';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { JQL_EDITOR_INPUT_ID, JQL_EDITOR_VALIDATION_ID } from '../../../../common/constants';
|
|
11
10
|
import { commonMessages } from '../../../../common/messages';
|
|
12
11
|
import { useEditorThemeContext } from '../../../../hooks/use-editor-theme';
|
|
@@ -99,16 +98,11 @@ export var ErrorMessages = function ErrorMessages() {
|
|
|
99
98
|
CustomErrorComponent = _useCustomErrorCompon2[0];
|
|
100
99
|
var childrenToRender = errorMessages != null ? /*#__PURE__*/React.createElement(MessageContainer, null, /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
101
100
|
testId: JQL_EDITOR_VALIDATION_ID
|
|
102
|
-
},
|
|
101
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
103
102
|
role: "alert",
|
|
104
103
|
id: validationId
|
|
105
104
|
}, /*#__PURE__*/React.createElement(FormatMessages, {
|
|
106
105
|
messages: errorMessages
|
|
107
|
-
})) : /*#__PURE__*/React.createElement("span", {
|
|
108
|
-
role: "alert",
|
|
109
|
-
"aria-describedby": editorId
|
|
110
|
-
}, /*#__PURE__*/React.createElement(FormatMessages, {
|
|
111
|
-
messages: errorMessages
|
|
112
106
|
})))) : null;
|
|
113
107
|
|
|
114
108
|
// Only render CustomErrorComponent if there is an errorMessage
|
|
@@ -4,7 +4,6 @@ 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';
|
|
8
7
|
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';
|
|
9
8
|
import { useEditorThemeContext } from '../../hooks/use-editor-theme';
|
|
10
9
|
import { useEditorViewIsInvalid } from '../../hooks/use-editor-view-is-invalid';
|
|
@@ -116,7 +115,7 @@ var JQLEditorView = function JQLEditorView(_ref) {
|
|
|
116
115
|
'aria-label': intl.formatMessage(messages.inputLabel),
|
|
117
116
|
'aria-controls': autocompleteId,
|
|
118
117
|
'aria-owns': autocompleteId,
|
|
119
|
-
'aria-describedby':
|
|
118
|
+
'aria-describedby': editorViewIsInvalid ? validationId : helpContentId
|
|
120
119
|
}, selectedOptionId && {
|
|
121
120
|
'aria-activedescendant': selectedOptionId
|
|
122
121
|
}), editorViewIsInvalid && {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/jql-editor",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"description": "This package allows consumers to render an advanced JQL editor component to enable autocomplete-assisted authoring and validation of JQL queries.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -135,9 +135,6 @@
|
|
|
135
135
|
"add_nin_press_interactions": {
|
|
136
136
|
"type": "boolean"
|
|
137
137
|
},
|
|
138
|
-
"jql_editor_a11y": {
|
|
139
|
-
"type": "boolean"
|
|
140
|
-
},
|
|
141
138
|
"dst-a11y__replace-anchor-with-link__jira-platform-": {
|
|
142
139
|
"type": "boolean"
|
|
143
140
|
}
|