@atlaskit/jql-editor 5.10.1 → 5.11.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
|
@@ -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":
|
|
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,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":
|
|
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",
|
|
@@ -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":
|
|
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.
|
|
3
|
+
"version": "5.11.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",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/avatar": "^25.6.0",
|
|
39
39
|
"@atlaskit/button": "^23.9.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
41
|
-
"@atlaskit/form": "^15.
|
|
41
|
+
"@atlaskit/form": "^15.2.0",
|
|
42
42
|
"@atlaskit/icon": "^29.3.0",
|
|
43
43
|
"@atlaskit/jql-ast": "^3.3.0",
|
|
44
44
|
"@atlaskit/jql-autocomplete": "^2.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
|
}
|