@atlaskit/jql-editor 5.11.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 CHANGED
@@ -1,5 +1,23 @@
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
+
10
+ ## 5.12.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`87b12e64ff750`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/87b12e64ff750) -
15
+ Removed usages of LEGACY icon props
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 5.11.0
4
22
 
5
23
  ### 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", "0.0.0-development", _jqlEditorCommon.ANALYTICS_CHANNEL);
9
+ return (0, _jqlEditorCommon.useJqlPackageAnalytics)(analyticsSource, "@atlaskit/jql-editor", "5.12.0", _jqlEditorCommon.ANALYTICS_CHANNEL);
10
10
  };
@@ -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)('jira_update_jql_membersof_teams')) {
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)('jira_update_jql_membersof_teams')) {
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) {
@@ -71,9 +71,7 @@ var BaseSearch = exports.BaseSearch = function BaseSearch(_ref) {
71
71
  xcss: iconStyle
72
72
  }, /*#__PURE__*/_react.default.createElement(_search.default, {
73
73
  color: "currentColor",
74
- label: '',
75
- LEGACY_size: 'medium',
76
- LEGACY_margin: "-4px"
74
+ label: ''
77
75
  }))
78
76
  }, (0, _platformFeatureFlags.fg)('add_nin_press_interactions') && {
79
77
  interactionName: 'jql-editor-base-search-button'
@@ -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',
@@ -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", "0.0.0-development", ANALYTICS_CHANNEL);
3
+ return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "5.12.0", ANALYTICS_CHANNEL);
4
4
  };
@@ -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('jira_update_jql_membersof_teams')) {
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('jira_update_jql_membersof_teams')) {
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(', ');
@@ -62,9 +62,7 @@ export const BaseSearch = ({
62
62
  xcss: iconStyle
63
63
  }, /*#__PURE__*/React.createElement(SearchIcon, {
64
64
  color: "currentColor",
65
- label: '',
66
- LEGACY_size: 'medium',
67
- LEGACY_margin: "-4px"
65
+ label: ''
68
66
  }))
69
67
  }, fg('add_nin_press_interactions') && {
70
68
  interactionName: 'jql-editor-base-search-button'
@@ -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,
@@ -79,6 +79,7 @@ const JQLEditorView = ({
79
79
  const getAttributes = useCallback(() => {
80
80
  return {
81
81
  id: editorId,
82
+ 'data-vc': JQL_EDITOR_INPUT_ID,
82
83
  'data-testid': 'jql-editor-input',
83
84
  // Disable grammarly
84
85
  'data-gramm': 'false',
@@ -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", "0.0.0-development", ANALYTICS_CHANNEL);
3
+ return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "5.12.0", ANALYTICS_CHANNEL);
4
4
  };
@@ -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('jira_update_jql_membersof_teams')) {
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('jira_update_jql_membersof_teams')) {
76
+ if (functionName !== 'membersof' || !fg('jira-membersof-team-support')) {
77
77
  return '';
78
78
  }
79
79
  var args = functionOperand.arguments.map(function (arg) {
@@ -61,9 +61,7 @@ export var BaseSearch = function BaseSearch(_ref) {
61
61
  xcss: iconStyle
62
62
  }, /*#__PURE__*/React.createElement(SearchIcon, {
63
63
  color: "currentColor",
64
- label: '',
65
- LEGACY_size: 'medium',
66
- LEGACY_margin: "-4px"
64
+ label: ''
67
65
  }))
68
66
  }, fg('add_nin_press_interactions') && {
69
67
  interactionName: 'jql-editor-base-search-button'
@@ -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.11.0",
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",
@@ -35,16 +35,16 @@
35
35
  "@atlaskit/afm-i18n-platform-jql-jql-editor": "2.10.0",
36
36
  "@atlaskit/analytics-gas-types": "^5.1.0",
37
37
  "@atlaskit/analytics-next": "^11.1.0",
38
- "@atlaskit/avatar": "^25.6.0",
38
+ "@atlaskit/avatar": "^25.7.0",
39
39
  "@atlaskit/button": "^23.9.0",
40
40
  "@atlaskit/editor-prosemirror": "^7.2.0",
41
- "@atlaskit/form": "^15.2.0",
42
- "@atlaskit/icon": "^29.3.0",
41
+ "@atlaskit/form": "^15.3.0",
42
+ "@atlaskit/icon": "^29.4.0",
43
43
  "@atlaskit/jql-ast": "^3.3.0",
44
44
  "@atlaskit/jql-autocomplete": "^2.0.0",
45
45
  "@atlaskit/jql-editor-common": "^3.0.0",
46
46
  "@atlaskit/jql-parser": "^2.0.0",
47
- "@atlaskit/link": "^3.2.0",
47
+ "@atlaskit/link": "^3.3.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
49
  "@atlaskit/popper": "^7.1.0",
50
50
  "@atlaskit/primitives": "^17.0.0",
@@ -52,8 +52,8 @@
52
52
  "@atlaskit/spinner": "^19.0.0",
53
53
  "@atlaskit/teams-avatar": "^2.4.0",
54
54
  "@atlaskit/theme": "^21.0.0",
55
- "@atlaskit/tokens": "^9.0.0",
56
- "@atlaskit/tooltip": "^20.11.0",
55
+ "@atlaskit/tokens": "^9.1.0",
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
- "jira_update_jql_membersof_teams": {
147
+ "jira-membersof-team-support": {
148
148
  "type": "boolean"
149
149
  },
150
150
  "list_lovability_improving_filters": {