@atlaskit/jql-editor 4.6.0 → 4.7.0

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,24 @@
1
1
  # @atlaskit/jql-editor
2
2
 
3
+ ## 4.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#136871](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136871)
8
+ [`c663f9f8a9171`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c663f9f8a9171) -
9
+ Add support for React 18
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 4.6.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [`c2faa85c89bec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c2faa85c89bec) -
20
+ a11y fixes for read only loading states
21
+
3
22
  ## 4.6.0
4
23
 
5
24
  ### 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", "4.6.0", _jqlEditorCommon.ANALYTICS_CHANNEL);
9
+ return (0, _jqlEditorCommon.useJqlPackageAnalytics)(analyticsSource, "@atlaskit/jql-editor", "4.7.0", _jqlEditorCommon.ANALYTICS_CHANNEL);
10
10
  };
@@ -20,8 +20,11 @@ var _baseSyntaxHelp = require("../base-syntax-help");
20
20
  var ReadOnlyControlsContent = exports.ReadOnlyControlsContent = function ReadOnlyControlsContent() {
21
21
  var _useEditorThemeContex = (0, _useEditorTheme.useEditorThemeContext)(),
22
22
  isSearch = _useEditorThemeContex.isSearch;
23
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_baseExpandToggle.BaseExpandToggle, {
24
- label: '',
23
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_baseExpandToggle.BaseExpandToggle
24
+ // The label here is for avoiding a11y violations only
25
+ // This component ReadOnlyControlsContent is only used as a fallback for a loading state
26
+ , {
27
+ label: 'Editor',
25
28
  editorId: '',
26
29
  expanded: false,
27
30
  onClick: _noop.default,
@@ -30,8 +33,11 @@ var ReadOnlyControlsContent = exports.ReadOnlyControlsContent = function ReadOnl
30
33
  label: '',
31
34
  onClick: _noop.default,
32
35
  isDisabled: true
33
- }), isSearch && /*#__PURE__*/_react.default.createElement(_baseSearch.BaseSearch, {
34
- label: '',
36
+ }), isSearch && /*#__PURE__*/_react.default.createElement(_baseSearch.BaseSearch
37
+ // The label here is for avoiding a11y violations only
38
+ // This component ReadOnlyControlsContent is only used as a fallback for a loading state
39
+ , {
40
+ label: 'Search',
35
41
  onSearch: _noop.default,
36
42
  isDisabled: true
37
43
  }));
@@ -81,6 +81,13 @@ var JQLEditorReadOnlyWithoutTheme = function JQLEditorReadOnlyWithoutTheme(_ref)
81
81
  expandedRows: expandedRows,
82
82
  lineNumbersVisible: lineNumbersVisible,
83
83
  isCompact: isCompact
84
+ // aria-expanded and aria-controls here are placeholders only. This is to avoid a11y violations.
85
+ // This component JQLEditorReadOnlyWithoutTheme is only a loading state
86
+ // Therefore the autocomplete combobox is never shown to the users
87
+ ,
88
+ "aria-expanded": false,
89
+ "aria-controls": "dummy-jql-editor-auto-complete-id",
90
+ "aria-label": "JQL query"
84
91
  }, blocks.map(function (block, index) {
85
92
  return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
86
93
  as: "p",
@@ -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", "4.6.0", ANALYTICS_CHANNEL);
3
+ return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "4.7.0", ANALYTICS_CHANNEL);
4
4
  };
@@ -11,8 +11,11 @@ export const ReadOnlyControlsContent = () => {
11
11
  const {
12
12
  isSearch
13
13
  } = useEditorThemeContext();
14
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BaseExpandToggle, {
15
- label: '',
14
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BaseExpandToggle
15
+ // The label here is for avoiding a11y violations only
16
+ // This component ReadOnlyControlsContent is only used as a fallback for a loading state
17
+ , {
18
+ label: 'Editor',
16
19
  editorId: '',
17
20
  expanded: false,
18
21
  onClick: noop,
@@ -21,8 +24,11 @@ export const ReadOnlyControlsContent = () => {
21
24
  label: '',
22
25
  onClick: noop,
23
26
  isDisabled: true
24
- }), isSearch && /*#__PURE__*/React.createElement(BaseSearch, {
25
- label: '',
27
+ }), isSearch && /*#__PURE__*/React.createElement(BaseSearch
28
+ // The label here is for avoiding a11y violations only
29
+ // This component ReadOnlyControlsContent is only used as a fallback for a loading state
30
+ , {
31
+ label: 'Search',
26
32
  onSearch: noop,
27
33
  isDisabled: true
28
34
  }));
@@ -78,6 +78,13 @@ const JQLEditorReadOnlyWithoutTheme = ({
78
78
  expandedRows: expandedRows,
79
79
  lineNumbersVisible: lineNumbersVisible,
80
80
  isCompact: isCompact
81
+ // aria-expanded and aria-controls here are placeholders only. This is to avoid a11y violations.
82
+ // This component JQLEditorReadOnlyWithoutTheme is only a loading state
83
+ // Therefore the autocomplete combobox is never shown to the users
84
+ ,
85
+ "aria-expanded": false,
86
+ "aria-controls": "dummy-jql-editor-auto-complete-id",
87
+ "aria-label": "JQL query"
81
88
  }, blocks.map((block, index) => /*#__PURE__*/React.createElement(Box, {
82
89
  as: "p",
83
90
  key: index
@@ -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", "4.6.0", ANALYTICS_CHANNEL);
3
+ return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "4.7.0", ANALYTICS_CHANNEL);
4
4
  };
@@ -10,8 +10,11 @@ import { BaseSyntaxHelp } from '../base-syntax-help';
10
10
  export var ReadOnlyControlsContent = function ReadOnlyControlsContent() {
11
11
  var _useEditorThemeContex = useEditorThemeContext(),
12
12
  isSearch = _useEditorThemeContex.isSearch;
13
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BaseExpandToggle, {
14
- label: '',
13
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BaseExpandToggle
14
+ // The label here is for avoiding a11y violations only
15
+ // This component ReadOnlyControlsContent is only used as a fallback for a loading state
16
+ , {
17
+ label: 'Editor',
15
18
  editorId: '',
16
19
  expanded: false,
17
20
  onClick: noop,
@@ -20,8 +23,11 @@ export var ReadOnlyControlsContent = function ReadOnlyControlsContent() {
20
23
  label: '',
21
24
  onClick: noop,
22
25
  isDisabled: true
23
- }), isSearch && /*#__PURE__*/React.createElement(BaseSearch, {
24
- label: '',
26
+ }), isSearch && /*#__PURE__*/React.createElement(BaseSearch
27
+ // The label here is for avoiding a11y violations only
28
+ // This component ReadOnlyControlsContent is only used as a fallback for a loading state
29
+ , {
30
+ label: 'Search',
25
31
  onSearch: noop,
26
32
  isDisabled: true
27
33
  }));
@@ -75,6 +75,13 @@ var JQLEditorReadOnlyWithoutTheme = function JQLEditorReadOnlyWithoutTheme(_ref)
75
75
  expandedRows: expandedRows,
76
76
  lineNumbersVisible: lineNumbersVisible,
77
77
  isCompact: isCompact
78
+ // aria-expanded and aria-controls here are placeholders only. This is to avoid a11y violations.
79
+ // This component JQLEditorReadOnlyWithoutTheme is only a loading state
80
+ // Therefore the autocomplete combobox is never shown to the users
81
+ ,
82
+ "aria-expanded": false,
83
+ "aria-controls": "dummy-jql-editor-auto-complete-id",
84
+ "aria-label": "JQL query"
78
85
  }, blocks.map(function (block, index) {
79
86
  return /*#__PURE__*/React.createElement(Box, {
80
87
  as: "p",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/jql-editor",
3
- "version": "4.6.0",
3
+ "version": "4.7.0",
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",
@@ -9,12 +9,11 @@
9
9
  },
10
10
  "atlassian": {
11
11
  "team": "Jira Platform: Search Experience / Empanada",
12
- "inPublicMirror": true,
13
- "releaseModel": "continuous",
14
12
  "website": {
15
13
  "name": "JQL Editor",
16
14
  "category": "JQL"
17
- }
15
+ },
16
+ "runReact18": true
18
17
  },
19
18
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
20
19
  "main": "dist/cjs/index.js",
@@ -45,9 +44,9 @@
45
44
  "@atlaskit/icon": "^22.15.0",
46
45
  "@atlaskit/jql-ast": "^3.3.0",
47
46
  "@atlaskit/jql-autocomplete": "^2.0.0",
48
- "@atlaskit/jql-editor-common": "^2.0.0",
47
+ "@atlaskit/jql-editor-common": "^2.1.0",
49
48
  "@atlaskit/jql-parser": "^2.0.0",
50
- "@atlaskit/primitives": "^12.0.1",
49
+ "@atlaskit/primitives": "^12.1.0",
51
50
  "@atlaskit/spinner": "^16.3.0",
52
51
  "@atlaskit/theme": "^13.0.0",
53
52
  "@atlaskit/tokens": "^1.59.0",
@@ -68,13 +67,13 @@
68
67
  "uuid": "^3.1.0"
69
68
  },
70
69
  "peerDependencies": {
71
- "react": "^16.8.0",
72
- "react-dom": "^16.8.0"
70
+ "react": "^16.8.0 || ^17.0.0 || ~18.2.0",
71
+ "react-dom": "^16.8.0 || ^17.0.0 || ~18.2.0"
73
72
  },
74
73
  "devDependencies": {
75
74
  "@af/integration-testing": "*",
76
75
  "@atlaskit/docs": "*",
77
- "@atlaskit/jql-editor-autocomplete-rest": "^2.0.0",
76
+ "@atlaskit/jql-editor-autocomplete-rest": "^2.1.0",
78
77
  "@atlaskit/visual-regression": "*",
79
78
  "@storybook/addon-actions": "^5.2.5",
80
79
  "@storybook/addon-knobs": "^5.3.18",