@atlaskit/jql-editor 5.10.1 → 5.12.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,23 @@
1
1
  # @atlaskit/jql-editor
2
2
 
3
+ ## 5.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`87b12e64ff750`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/87b12e64ff750) -
8
+ Removed usages of LEGACY icon props
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 5.11.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [`1fd35e2768b70`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1fd35e2768b70) -
19
+ fixing eslint no literal strings
20
+
3
21
  ## 5.10.1
4
22
 
5
23
  ### Patch 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
  };
@@ -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'
@@ -8,11 +8,13 @@ exports.default = exports.JQLEditorReadOnly = void 0;
8
8
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
+ var _reactIntlNext = require("react-intl-next");
11
12
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _compiled = require("@atlaskit/primitives/compiled");
13
14
  var _useEditorTheme = require("../../hooks/use-editor-theme");
14
15
  var _splitTextByNewLine = require("../../utils/split-text-by-new-line");
15
16
  var _readOnlyControlsContent = require("../jql-editor-controls-content/read-only-controls-content");
17
+ var _messages = require("../messages");
16
18
  var _styled = require("./styled");
17
19
  var _excluded = ["isSearch", "isCompact", "defaultRows"]; // eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
18
20
  var JQLEditorLayout = function JQLEditorLayout(props) {
@@ -78,6 +80,8 @@ var JQLEditorReadOnlyWithoutTheme = function JQLEditorReadOnlyWithoutTheme(_ref)
78
80
  defaultRows = _useEditorThemeContex2.defaultRows;
79
81
  var blocks = (0, _splitTextByNewLine.splitTextByNewLine)(query);
80
82
  var lineNumbersVisible = blocks.length > 1;
83
+ var _useIntl = (0, _reactIntlNext.useIntl)(),
84
+ formatMessage = _useIntl.formatMessage;
81
85
  return /*#__PURE__*/_react.default.createElement(_styled.EditorMain, null, /*#__PURE__*/_react.default.createElement(_styled.ReadOnlyEditorViewContainer, null, /*#__PURE__*/_react.default.createElement(_styled.LineNumberToolbar, {
82
86
  lineNumbersVisible: lineNumbersVisible
83
87
  }), /*#__PURE__*/_react.default.createElement(_styled.ReadOnlyEditorView, {
@@ -96,7 +100,7 @@ var JQLEditorReadOnlyWithoutTheme = function JQLEditorReadOnlyWithoutTheme(_ref)
96
100
  "aria-controls": "dummy-jql-editor-auto-complete-id"
97
101
  // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
98
102
  ,
99
- "aria-label": "JQL query",
103
+ "aria-label": (0, _platformFeatureFlags.fg)('enghealth-46329-no-literal-strings') ? formatMessage(_messages.messages.inputLabel) : 'JQL query',
100
104
  defaultRows: defaultRows
101
105
  }, blocks.map(function (block, index) {
102
106
  return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
@@ -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
  };
@@ -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'
@@ -1,11 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
+ import { useIntl } from 'react-intl-next';
3
4
  import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { Box } from '@atlaskit/primitives/compiled';
5
6
  import { EditorThemeContext, useEditorTheme, useEditorThemeContext } from '../../hooks/use-editor-theme';
6
7
  import { splitTextByNewLine } from '../../utils/split-text-by-new-line';
7
8
  // eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
8
9
  import { ReadOnlyControlsContent } from '../jql-editor-controls-content/read-only-controls-content';
10
+ import { messages } from '../messages';
9
11
  import { EditorControls, EditorFooter, EditorMain, EditorView, EditorViewContainer, LineNumberToolbar, ReadOnlyEditorView, ReadOnlyEditorViewContainer } from './styled';
10
12
  const JQLEditorLayout = props => {
11
13
  const {
@@ -75,6 +77,9 @@ const JQLEditorReadOnlyWithoutTheme = ({
75
77
  } = useEditorThemeContext();
76
78
  const blocks = splitTextByNewLine(query);
77
79
  const lineNumbersVisible = blocks.length > 1;
80
+ const {
81
+ formatMessage
82
+ } = useIntl();
78
83
  return /*#__PURE__*/React.createElement(EditorMain, null, /*#__PURE__*/React.createElement(ReadOnlyEditorViewContainer, null, /*#__PURE__*/React.createElement(LineNumberToolbar, {
79
84
  lineNumbersVisible: lineNumbersVisible
80
85
  }), /*#__PURE__*/React.createElement(ReadOnlyEditorView, {
@@ -93,7 +98,7 @@ const JQLEditorReadOnlyWithoutTheme = ({
93
98
  "aria-controls": "dummy-jql-editor-auto-complete-id"
94
99
  // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
95
100
  ,
96
- "aria-label": "JQL query",
101
+ "aria-label": fg('enghealth-46329-no-literal-strings') ? formatMessage(messages.inputLabel) : 'JQL query',
97
102
  defaultRows: defaultRows
98
103
  }, blocks.map((block, index) => /*#__PURE__*/React.createElement(Box, {
99
104
  as: "p",
@@ -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
  };
@@ -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'
@@ -2,12 +2,14 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  var _excluded = ["isSearch", "isCompact", "defaultRows"];
4
4
  import React from 'react';
5
+ import { useIntl } from 'react-intl-next';
5
6
  import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { Box } from '@atlaskit/primitives/compiled';
7
8
  import { EditorThemeContext, useEditorTheme, useEditorThemeContext } from '../../hooks/use-editor-theme';
8
9
  import { splitTextByNewLine } from '../../utils/split-text-by-new-line';
9
10
  // eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
10
11
  import { ReadOnlyControlsContent } from '../jql-editor-controls-content/read-only-controls-content';
12
+ import { messages } from '../messages';
11
13
  import { EditorControls, EditorFooter, EditorMain, EditorView, EditorViewContainer, LineNumberToolbar, ReadOnlyEditorView, ReadOnlyEditorViewContainer } from './styled';
12
14
  var JQLEditorLayout = function JQLEditorLayout(props) {
13
15
  var _useEditorThemeContex = useEditorThemeContext(),
@@ -72,6 +74,8 @@ var JQLEditorReadOnlyWithoutTheme = function JQLEditorReadOnlyWithoutTheme(_ref)
72
74
  defaultRows = _useEditorThemeContex2.defaultRows;
73
75
  var blocks = splitTextByNewLine(query);
74
76
  var lineNumbersVisible = blocks.length > 1;
77
+ var _useIntl = useIntl(),
78
+ formatMessage = _useIntl.formatMessage;
75
79
  return /*#__PURE__*/React.createElement(EditorMain, null, /*#__PURE__*/React.createElement(ReadOnlyEditorViewContainer, null, /*#__PURE__*/React.createElement(LineNumberToolbar, {
76
80
  lineNumbersVisible: lineNumbersVisible
77
81
  }), /*#__PURE__*/React.createElement(ReadOnlyEditorView, {
@@ -90,7 +94,7 @@ var JQLEditorReadOnlyWithoutTheme = function JQLEditorReadOnlyWithoutTheme(_ref)
90
94
  "aria-controls": "dummy-jql-editor-auto-complete-id"
91
95
  // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
92
96
  ,
93
- "aria-label": "JQL query",
97
+ "aria-label": fg('enghealth-46329-no-literal-strings') ? formatMessage(messages.inputLabel) : 'JQL query',
94
98
  defaultRows: defaultRows
95
99
  }, blocks.map(function (block, index) {
96
100
  return /*#__PURE__*/React.createElement(Box, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/jql-editor",
3
- "version": "5.10.1",
3
+ "version": "5.12.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",
@@ -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.1.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.12.0",
57
57
  "@babel/runtime": "^7.0.0",
58
58
  "@emotion/react": "^11.7.1",
59
59
  "@emotion/styled": "^11.0.0",
@@ -152,6 +152,9 @@
152
152
  },
153
153
  "jira_ai_agent_avatar_with_apptype_for_jql": {
154
154
  "type": "boolean"
155
+ },
156
+ "enghealth-46329-no-literal-strings": {
157
+ "type": "boolean"
155
158
  }
156
159
  }
157
160
  }