@atlaskit/jql-editor 5.12.0 → 5.12.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 +7 -0
- package/dist/cjs/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +1 -1
- package/dist/cjs/state/hydration/util.js +1 -1
- package/dist/cjs/ui/jql-editor-layout/index.js +2 -0
- package/dist/cjs/ui/jql-editor-view/index.js +1 -0
- package/dist/es2019/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +1 -1
- package/dist/es2019/state/hydration/util.js +1 -1
- package/dist/es2019/ui/jql-editor-layout/index.js +2 -0
- package/dist/es2019/ui/jql-editor-view/index.js +1 -0
- package/dist/esm/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +1 -1
- package/dist/esm/state/hydration/util.js +1 -1
- package/dist/esm/ui/jql-editor-layout/index.js +2 -0
- package/dist/esm/ui/jql-editor-view/index.js +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/jql-editor
|
|
2
2
|
|
|
3
|
+
## 5.12.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`97eb8bff0959d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/97eb8bff0959d) -
|
|
8
|
+
Add data-vc html attributes to jql editor elements
|
|
9
|
+
|
|
3
10
|
## 5.12.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -38,7 +38,7 @@ var replaceRichInlineNodes = exports.replaceRichInlineNodes = function replaceRi
|
|
|
38
38
|
var astNodes = getValueNodes(ast, fieldName, value.id);
|
|
39
39
|
|
|
40
40
|
// If not found as direct value and it's a team, try to find in membersOf function arguments
|
|
41
|
-
if (astNodes.length === 0 && value.type === 'team' && (0, _platformFeatureFlags.fg)('
|
|
41
|
+
if (astNodes.length === 0 && value.type === 'team' && (0, _platformFeatureFlags.fg)('jira-membersof-team-support')) {
|
|
42
42
|
astNodes = getMembersOfArgumentNodes(ast, value.id);
|
|
43
43
|
}
|
|
44
44
|
astNodes.forEach(function (astNode) {
|
|
@@ -79,7 +79,7 @@ var ValidQueryVisitor = exports.ValidQueryVisitor = /*#__PURE__*/function (_Abst
|
|
|
79
79
|
// Only include membersOf function as it has arguments that need hydration
|
|
80
80
|
// Other functions like currentUser() don't have hydratable arguments
|
|
81
81
|
var functionName = functionOperand.function.value.toLowerCase();
|
|
82
|
-
if (functionName !== 'membersof' || !(0, _platformFeatureFlags.fg)('
|
|
82
|
+
if (functionName !== 'membersof' || !(0, _platformFeatureFlags.fg)('jira-membersof-team-support')) {
|
|
83
83
|
return '';
|
|
84
84
|
}
|
|
85
85
|
var args = functionOperand.arguments.map(function (arg) {
|
|
@@ -11,6 +11,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
13
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
14
|
+
var _constants = require("../../common/constants");
|
|
14
15
|
var _useEditorTheme = require("../../hooks/use-editor-theme");
|
|
15
16
|
var _splitTextByNewLine = require("../../utils/split-text-by-new-line");
|
|
16
17
|
var _readOnlyControlsContent = require("../jql-editor-controls-content/read-only-controls-content");
|
|
@@ -39,6 +40,7 @@ var JQLEditorLayout = function JQLEditorLayout(props) {
|
|
|
39
40
|
onEditorViewTransitionEnd = props.onEditorViewTransitionEnd;
|
|
40
41
|
return /*#__PURE__*/_react.default.createElement(_styled.EditorMain, {
|
|
41
42
|
id: mainId,
|
|
43
|
+
"data-vc": _constants.JQL_EDITOR_MAIN_ID,
|
|
42
44
|
ref: onEditorMainRef
|
|
43
45
|
}, /*#__PURE__*/_react.default.createElement(_styled.EditorViewContainer, {
|
|
44
46
|
editorViewHasFocus: editorViewHasFocus,
|
|
@@ -111,6 +111,7 @@ var JQLEditorView = function JQLEditorView(_ref) {
|
|
|
111
111
|
var getAttributes = (0, _react.useCallback)(function () {
|
|
112
112
|
return _objectSpread(_objectSpread({
|
|
113
113
|
id: editorId,
|
|
114
|
+
'data-vc': _constants.JQL_EDITOR_INPUT_ID,
|
|
114
115
|
'data-testid': 'jql-editor-input',
|
|
115
116
|
// Disable grammarly
|
|
116
117
|
'data-gramm': 'false',
|
|
@@ -17,7 +17,7 @@ export const replaceRichInlineNodes = (editorState, hydratedValues) => {
|
|
|
17
17
|
let astNodes = getValueNodes(ast, fieldName, value.id);
|
|
18
18
|
|
|
19
19
|
// If not found as direct value and it's a team, try to find in membersOf function arguments
|
|
20
|
-
if (astNodes.length === 0 && value.type === 'team' && fg('
|
|
20
|
+
if (astNodes.length === 0 && value.type === 'team' && fg('jira-membersof-team-support')) {
|
|
21
21
|
astNodes = getMembersOfArgumentNodes(ast, value.id);
|
|
22
22
|
}
|
|
23
23
|
astNodes.forEach(astNode => {
|
|
@@ -55,7 +55,7 @@ export class ValidQueryVisitor extends AbstractJastVisitor {
|
|
|
55
55
|
// Only include membersOf function as it has arguments that need hydration
|
|
56
56
|
// Other functions like currentUser() don't have hydratable arguments
|
|
57
57
|
const functionName = functionOperand.function.value.toLowerCase();
|
|
58
|
-
if (functionName !== 'membersof' || !fg('
|
|
58
|
+
if (functionName !== 'membersof' || !fg('jira-membersof-team-support')) {
|
|
59
59
|
return '';
|
|
60
60
|
}
|
|
61
61
|
const args = functionOperand.arguments.map(arg => arg.text).join(', ');
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { useIntl } from 'react-intl-next';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
|
+
import { JQL_EDITOR_MAIN_ID } from '../../common/constants';
|
|
6
7
|
import { EditorThemeContext, useEditorTheme, useEditorThemeContext } from '../../hooks/use-editor-theme';
|
|
7
8
|
import { splitTextByNewLine } from '../../utils/split-text-by-new-line';
|
|
8
9
|
// eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
|
|
@@ -34,6 +35,7 @@ const JQLEditorLayout = props => {
|
|
|
34
35
|
} = props;
|
|
35
36
|
return /*#__PURE__*/React.createElement(EditorMain, {
|
|
36
37
|
id: mainId,
|
|
38
|
+
"data-vc": JQL_EDITOR_MAIN_ID,
|
|
37
39
|
ref: onEditorMainRef
|
|
38
40
|
}, /*#__PURE__*/React.createElement(EditorViewContainer, {
|
|
39
41
|
editorViewHasFocus: editorViewHasFocus,
|
|
@@ -31,7 +31,7 @@ export var replaceRichInlineNodes = function replaceRichInlineNodes(editorState,
|
|
|
31
31
|
var astNodes = getValueNodes(ast, fieldName, value.id);
|
|
32
32
|
|
|
33
33
|
// If not found as direct value and it's a team, try to find in membersOf function arguments
|
|
34
|
-
if (astNodes.length === 0 && value.type === 'team' && fg('
|
|
34
|
+
if (astNodes.length === 0 && value.type === 'team' && fg('jira-membersof-team-support')) {
|
|
35
35
|
astNodes = getMembersOfArgumentNodes(ast, value.id);
|
|
36
36
|
}
|
|
37
37
|
astNodes.forEach(function (astNode) {
|
|
@@ -73,7 +73,7 @@ export var ValidQueryVisitor = /*#__PURE__*/function (_AbstractJastVisitor) {
|
|
|
73
73
|
// Only include membersOf function as it has arguments that need hydration
|
|
74
74
|
// Other functions like currentUser() don't have hydratable arguments
|
|
75
75
|
var functionName = functionOperand.function.value.toLowerCase();
|
|
76
|
-
if (functionName !== 'membersof' || !fg('
|
|
76
|
+
if (functionName !== 'membersof' || !fg('jira-membersof-team-support')) {
|
|
77
77
|
return '';
|
|
78
78
|
}
|
|
79
79
|
var args = functionOperand.arguments.map(function (arg) {
|
|
@@ -5,6 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
+
import { JQL_EDITOR_MAIN_ID } from '../../common/constants';
|
|
8
9
|
import { EditorThemeContext, useEditorTheme, useEditorThemeContext } from '../../hooks/use-editor-theme';
|
|
9
10
|
import { splitTextByNewLine } from '../../utils/split-text-by-new-line';
|
|
10
11
|
// eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
|
|
@@ -33,6 +34,7 @@ var JQLEditorLayout = function JQLEditorLayout(props) {
|
|
|
33
34
|
onEditorViewTransitionEnd = props.onEditorViewTransitionEnd;
|
|
34
35
|
return /*#__PURE__*/React.createElement(EditorMain, {
|
|
35
36
|
id: mainId,
|
|
37
|
+
"data-vc": JQL_EDITOR_MAIN_ID,
|
|
36
38
|
ref: onEditorMainRef
|
|
37
39
|
}, /*#__PURE__*/React.createElement(EditorViewContainer, {
|
|
38
40
|
editorViewHasFocus: editorViewHasFocus,
|
|
@@ -104,6 +104,7 @@ var JQLEditorView = function JQLEditorView(_ref) {
|
|
|
104
104
|
var getAttributes = useCallback(function () {
|
|
105
105
|
return _objectSpread(_objectSpread({
|
|
106
106
|
id: editorId,
|
|
107
|
+
'data-vc': JQL_EDITOR_INPUT_ID,
|
|
107
108
|
'data-testid': 'jql-editor-input',
|
|
108
109
|
// Disable grammarly
|
|
109
110
|
'data-gramm': 'false',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/jql-editor",
|
|
3
|
-
"version": "5.12.
|
|
3
|
+
"version": "5.12.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",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/teams-avatar": "^2.4.0",
|
|
54
54
|
"@atlaskit/theme": "^21.0.0",
|
|
55
55
|
"@atlaskit/tokens": "^9.1.0",
|
|
56
|
-
"@atlaskit/tooltip": "^20.
|
|
56
|
+
"@atlaskit/tooltip": "^20.14.0",
|
|
57
57
|
"@babel/runtime": "^7.0.0",
|
|
58
58
|
"@emotion/react": "^11.7.1",
|
|
59
59
|
"@emotion/styled": "^11.0.0",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"jira_update_jql_teams": {
|
|
145
145
|
"type": "boolean"
|
|
146
146
|
},
|
|
147
|
-
"
|
|
147
|
+
"jira-membersof-team-support": {
|
|
148
148
|
"type": "boolean"
|
|
149
149
|
},
|
|
150
150
|
"list_lovability_improving_filters": {
|