@atlaskit/jql-editor 4.7.3 → 4.8.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 +17 -0
- package/dist/cjs/analytics/util.js +1 -1
- package/dist/cjs/plugins/autocomplete/components/autocomplete-option/index.js +4 -3
- package/dist/cjs/ui/jql-editor-controls-content/base-expand-toggle/index.js +22 -7
- package/dist/cjs/ui/jql-editor-controls-content/base-search/index.js +28 -5
- package/dist/cjs/ui/jql-editor-controls-content/base-syntax-help/index.js +33 -5
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/infos/index.js +11 -4
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/warnings/index.js +11 -4
- package/dist/cjs/ui/jql-editor-layout/index.js +3 -1
- package/dist/cjs/ui/jql-editor-layout/styled.js +3 -1
- package/dist/es2019/analytics/util.js +1 -1
- package/dist/es2019/plugins/autocomplete/components/autocomplete-option/index.js +3 -2
- package/dist/es2019/ui/jql-editor-controls-content/base-expand-toggle/index.js +24 -9
- package/dist/es2019/ui/jql-editor-controls-content/base-search/index.js +28 -5
- package/dist/es2019/ui/jql-editor-controls-content/base-syntax-help/index.js +33 -6
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/infos/index.js +11 -4
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/warnings/index.js +11 -4
- package/dist/es2019/ui/jql-editor-layout/index.js +3 -1
- package/dist/es2019/ui/jql-editor-layout/styled.js +3 -1
- package/dist/esm/analytics/util.js +1 -1
- package/dist/esm/plugins/autocomplete/components/autocomplete-option/index.js +3 -2
- package/dist/esm/ui/jql-editor-controls-content/base-expand-toggle/index.js +24 -9
- package/dist/esm/ui/jql-editor-controls-content/base-search/index.js +28 -5
- package/dist/esm/ui/jql-editor-controls-content/base-syntax-help/index.js +35 -6
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/infos/index.js +11 -4
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/warnings/index.js +11 -4
- package/dist/esm/ui/jql-editor-layout/index.js +3 -1
- package/dist/esm/ui/jql-editor-layout/styled.js +3 -1
- package/dist/types/ui/jql-editor-layout/styled.d.ts +1 -0
- package/dist/types-ts4.5/ui/jql-editor-layout/styled.d.ts +1 -0
- package/package.json +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/jql-editor
|
|
2
2
|
|
|
3
|
+
## 4.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#142408](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/142408)
|
|
8
|
+
[`90a34a6487eb3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/90a34a6487eb3) -
|
|
9
|
+
Enable new icons behind a feature flag.
|
|
10
|
+
|
|
11
|
+
## 4.7.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#141027](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/141027)
|
|
16
|
+
[`54b27406e5181`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/54b27406e5181) -
|
|
17
|
+
[ux] Update icons and buttons on jql
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 4.7.3
|
|
4
21
|
|
|
5
22
|
### 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", "4.
|
|
9
|
+
return (0, _jqlEditorCommon.useJqlPackageAnalytics)(analyticsSource, "@atlaskit/jql-editor", "4.8.0", _jqlEditorCommon.ANALYTICS_CHANNEL);
|
|
10
10
|
};
|
|
@@ -13,7 +13,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _deburr = _interopRequireDefault(require("lodash/deburr"));
|
|
14
14
|
var _noop = _interopRequireDefault(require("lodash/noop"));
|
|
15
15
|
var _icon = _interopRequireDefault(require("@atlaskit/icon"));
|
|
16
|
-
var
|
|
16
|
+
var _informationEditorPanel = _interopRequireDefault(require("@atlaskit/icon/core/migration/information--editor-panel"));
|
|
17
17
|
var _jqlAst = require("@atlaskit/jql-ast");
|
|
18
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
19
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
@@ -158,10 +158,11 @@ var AutocompleteOption = /*#__PURE__*/(0, _react.forwardRef)(function (props, re
|
|
|
158
158
|
}), isDeprecated ? /*#__PURE__*/_react.default.createElement(_styled.DeprecatedOptionContainer, null, optionName, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
159
159
|
content: deprecatedTooltipContent,
|
|
160
160
|
position: 'right'
|
|
161
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
161
|
+
}, /*#__PURE__*/_react.default.createElement(_informationEditorPanel.default, {
|
|
162
|
+
spacing: "spacious",
|
|
162
163
|
testId: "jql-editor-deprecated-icon",
|
|
163
164
|
label: "",
|
|
164
|
-
|
|
165
|
+
color: "var(--ds-icon, ".concat(_colors.N400, ")")
|
|
165
166
|
}))) : optionName, fieldType && /*#__PURE__*/_react.default.createElement(_styled.FieldType, null, fieldTypeIcon && /*#__PURE__*/_react.default.createElement(_styled.FieldTypeIcon, null, fieldTypeIcon), fieldType));
|
|
166
167
|
var tooltipContent = /*#__PURE__*/_react.default.createElement(_styled.TooltipContent, null, name);
|
|
167
168
|
if (overflows) {
|
|
@@ -7,25 +7,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.BaseExpandToggle = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
10
|
+
var _new = require("@atlaskit/button/new");
|
|
11
|
+
var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-diagonal"));
|
|
12
|
+
var _shrinkDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/shrink-diagonal"));
|
|
10
13
|
var _actualSize = _interopRequireDefault(require("@atlaskit/icon/glyph/media-services/actual-size"));
|
|
11
14
|
var _fitToPage = _interopRequireDefault(require("@atlaskit/icon/glyph/media-services/fit-to-page"));
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
17
|
var _styled = require("./styled");
|
|
14
18
|
// Atlaskit doesn't provide a circle variation of the expand/collapse icons so we have to implement our own
|
|
15
19
|
var ExpandCircleIcon = function ExpandCircleIcon(_ref) {
|
|
16
20
|
var isDisabled = _ref.isDisabled;
|
|
17
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_growDiagonal.default, {
|
|
18
22
|
label: '',
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
LEGACY_size: 'small',
|
|
24
|
+
color: isDisabled ? "var(--ds-icon-disabled, ".concat(_colors.N50, ")") : "var(--ds-icon, ".concat(_colors.N500, ")"),
|
|
25
|
+
LEGACY_fallbackIcon: _actualSize.default
|
|
21
26
|
});
|
|
22
27
|
};
|
|
23
28
|
var CollapseCircleIcon = function CollapseCircleIcon(_ref2) {
|
|
24
29
|
var isDisabled = _ref2.isDisabled;
|
|
25
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_shrinkDiagonal.default, {
|
|
26
31
|
label: '',
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
LEGACY_size: 'small',
|
|
33
|
+
color: isDisabled ? "var(--ds-icon-disabled, ".concat(_colors.N50, ")") : "var(--ds-icon, ".concat(_colors.N500, ")"),
|
|
34
|
+
LEGACY_fallbackIcon: _fitToPage.default
|
|
29
35
|
});
|
|
30
36
|
};
|
|
31
37
|
var BaseExpandToggle = exports.BaseExpandToggle = function BaseExpandToggle(_ref3) {
|
|
@@ -40,7 +46,16 @@ var BaseExpandToggle = exports.BaseExpandToggle = function BaseExpandToggle(_ref
|
|
|
40
46
|
} else {
|
|
41
47
|
Icon = ExpandCircleIcon;
|
|
42
48
|
}
|
|
43
|
-
return
|
|
49
|
+
return (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? /*#__PURE__*/_react.default.createElement(_new.IconButton, {
|
|
50
|
+
appearance: 'subtle',
|
|
51
|
+
spacing: "compact",
|
|
52
|
+
"aria-expanded": expanded,
|
|
53
|
+
"aria-controls": editorId,
|
|
54
|
+
label: label,
|
|
55
|
+
isDisabled: isDisabled,
|
|
56
|
+
onClick: onClick,
|
|
57
|
+
icon: expanded ? _shrinkDiagonal.default : _growDiagonal.default
|
|
58
|
+
}) : /*#__PURE__*/_react.default.createElement(_styled.ExpandToggleContainer, null, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
44
59
|
appearance: 'subtle',
|
|
45
60
|
"aria-expanded": expanded,
|
|
46
61
|
"aria-controls": editorId,
|
|
@@ -8,13 +8,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.BaseSearch = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _button = require("@atlaskit/button");
|
|
11
|
-
var
|
|
11
|
+
var _new = require("@atlaskit/button/new");
|
|
12
|
+
var _searchEditorSearch = _interopRequireDefault(require("@atlaskit/icon/core/migration/search--editor-search"));
|
|
13
|
+
var _search = _interopRequireDefault(require("@atlaskit/icon/core/search"));
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
|
+
var _primitives = require("@atlaskit/primitives");
|
|
12
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
18
|
var style = {
|
|
15
19
|
// Fixes an issue where loading button makes the editor flicker with a scrollbar
|
|
16
20
|
overflow: 'hidden'
|
|
17
21
|
};
|
|
22
|
+
// Fixes icon margin issus after new icon migration
|
|
23
|
+
var iconStyle = (0, _primitives.xcss)({
|
|
24
|
+
margin: 'space.050',
|
|
25
|
+
display: 'flex'
|
|
26
|
+
});
|
|
18
27
|
var BaseSearch = exports.BaseSearch = function BaseSearch(_ref) {
|
|
19
28
|
var isDisabled = _ref.isDisabled,
|
|
20
29
|
isSearching = _ref.isSearching,
|
|
@@ -26,7 +35,17 @@ var BaseSearch = exports.BaseSearch = function BaseSearch(_ref) {
|
|
|
26
35
|
e.preventDefault();
|
|
27
36
|
}
|
|
28
37
|
}, []);
|
|
29
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
38
|
+
return (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? /*#__PURE__*/_react.default.createElement(_new.IconButton, {
|
|
39
|
+
label: label,
|
|
40
|
+
isDisabled: isDisabled,
|
|
41
|
+
testId: "jql-editor-search",
|
|
42
|
+
appearance: 'primary',
|
|
43
|
+
spacing: "compact",
|
|
44
|
+
onClick: onSearch,
|
|
45
|
+
onKeyDown: preventRepeatClick,
|
|
46
|
+
isLoading: isSearching,
|
|
47
|
+
icon: _search.default
|
|
48
|
+
}) : /*#__PURE__*/_react.default.createElement(_button.LoadingButton, {
|
|
30
49
|
"aria-label": label,
|
|
31
50
|
isDisabled: isDisabled,
|
|
32
51
|
testId: "jql-editor-search"
|
|
@@ -38,9 +57,13 @@ var BaseSearch = exports.BaseSearch = function BaseSearch(_ref) {
|
|
|
38
57
|
onClick: onSearch,
|
|
39
58
|
onKeyDown: preventRepeatClick,
|
|
40
59
|
isLoading: isSearching,
|
|
41
|
-
iconBefore: /*#__PURE__*/_react.default.createElement(
|
|
60
|
+
iconBefore: /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
61
|
+
xcss: iconStyle
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement(_searchEditorSearch.default, {
|
|
63
|
+
color: "currentColor",
|
|
42
64
|
label: '',
|
|
43
|
-
|
|
44
|
-
|
|
65
|
+
LEGACY_size: 'medium',
|
|
66
|
+
LEGACY_margin: "-4px"
|
|
67
|
+
}))
|
|
45
68
|
});
|
|
46
69
|
};
|
|
@@ -5,17 +5,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.BaseSyntaxHelp = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
9
10
|
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
11
|
+
var _new = require("@atlaskit/button/new");
|
|
12
|
+
var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/core/question-circle"));
|
|
10
13
|
var _question = _interopRequireDefault(require("@atlaskit/icon/glyph/question"));
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
|
+
var _primitives = require("@atlaskit/primitives");
|
|
11
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
17
|
var _styled = require("./styled");
|
|
18
|
+
// Fixes icon margin issus after new icon migration
|
|
19
|
+
var iconStyle = (0, _primitives.xcss)({
|
|
20
|
+
margin: 'space.025',
|
|
21
|
+
display: 'inline-flex'
|
|
22
|
+
});
|
|
13
23
|
var BaseSyntaxHelp = exports.BaseSyntaxHelp = function BaseSyntaxHelp(_ref) {
|
|
14
24
|
var describedby = _ref.describedby,
|
|
15
25
|
isDisabled = _ref.isDisabled,
|
|
16
26
|
label = _ref.label,
|
|
17
27
|
onClick = _ref.onClick;
|
|
18
|
-
return
|
|
28
|
+
return (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? /*#__PURE__*/_react.default.createElement(_new.LinkIconButton, {
|
|
29
|
+
"aria-describedby": describedby,
|
|
30
|
+
label: label,
|
|
31
|
+
isDisabled: isDisabled,
|
|
32
|
+
appearance: "subtle",
|
|
33
|
+
spacing: "compact",
|
|
34
|
+
onClick: onClick,
|
|
35
|
+
target: "blank",
|
|
36
|
+
href: "https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Advanced+searching",
|
|
37
|
+
icon: function icon(iconProps) {
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(_questionCircle.default, (0, _extends2.default)({}, iconProps, {
|
|
39
|
+
color: "var(--ds-icon-subtle, #626F86)"
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
}) : /*#__PURE__*/_react.default.createElement(_styled.SyntaxHelpContainer, null, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
19
43
|
"aria-describedby": describedby,
|
|
20
44
|
"aria-label": label,
|
|
21
45
|
isDisabled: isDisabled,
|
|
@@ -23,11 +47,15 @@ var BaseSyntaxHelp = exports.BaseSyntaxHelp = function BaseSyntaxHelp(_ref) {
|
|
|
23
47
|
spacing: 'none',
|
|
24
48
|
target: 'blank',
|
|
25
49
|
href: "https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Advanced+searching",
|
|
26
|
-
iconBefore: /*#__PURE__*/_react.default.createElement(
|
|
50
|
+
iconBefore: /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
51
|
+
xcss: iconStyle
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_questionCircle.default, {
|
|
27
53
|
label: '',
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
54
|
+
color: isDisabled ? "var(--ds-icon-disabled, ".concat(_colors.N0, ")") : "var(--ds-icon-inverse, ".concat(_colors.N0, ")"),
|
|
55
|
+
LEGACY_size: 'small',
|
|
56
|
+
LEGACY_fallbackIcon: _question.default,
|
|
57
|
+
LEGACY_margin: "-2px"
|
|
58
|
+
})),
|
|
31
59
|
onClick: onClick
|
|
32
60
|
}));
|
|
33
61
|
};
|
|
@@ -10,6 +10,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _form = require("@atlaskit/form");
|
|
12
12
|
var _info = _interopRequireDefault(require("@atlaskit/icon/glyph/info"));
|
|
13
|
+
var _information = _interopRequireDefault(require("@atlaskit/icon/utility/information"));
|
|
14
|
+
var _primitives = require("@atlaskit/primitives");
|
|
13
15
|
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
14
16
|
var _useEditorViewHasInfos = require("../../../../hooks/use-editor-view-has-infos");
|
|
15
17
|
var _state = require("../../../../state");
|
|
@@ -32,9 +34,14 @@ var InfoMessages = exports.InfoMessages = function InfoMessages() {
|
|
|
32
34
|
var infoMessage = useFormattedInfoMessage();
|
|
33
35
|
return infoMessage != null ? /*#__PURE__*/_react.default.createElement(_format.MessageContainer, null, /*#__PURE__*/_react.default.createElement(_form.HelperMessage, {
|
|
34
36
|
testId: "jql-editor-info-message"
|
|
35
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
37
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
38
|
+
as: "span",
|
|
39
|
+
paddingInlineEnd: "space.050"
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_information.default, {
|
|
36
41
|
label: "",
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
color: "var(--ds-icon-information, ".concat(colors.B500, ")"),
|
|
43
|
+
LEGACY_size: "small",
|
|
44
|
+
LEGACY_fallbackIcon: _info.default,
|
|
45
|
+
LEGACY_margin: "0 -4px 0 0"
|
|
46
|
+
})), infoMessage)) : null;
|
|
40
47
|
};
|
|
@@ -11,6 +11,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _form = require("@atlaskit/form");
|
|
13
13
|
var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/warning"));
|
|
14
|
+
var _warning2 = _interopRequireDefault(require("@atlaskit/icon/utility/warning"));
|
|
15
|
+
var _primitives = require("@atlaskit/primitives");
|
|
14
16
|
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
15
17
|
var _useEditorViewHasWarnings = require("../../../../hooks/use-editor-view-has-warnings");
|
|
16
18
|
var _state = require("../../../../state");
|
|
@@ -101,9 +103,14 @@ var WarningMessages = exports.WarningMessages = function WarningMessages() {
|
|
|
101
103
|
var warningMessage = useFormattedWarningMessage();
|
|
102
104
|
return warningMessage != null ? /*#__PURE__*/_react.default.createElement(_format.MessageContainer, null, /*#__PURE__*/_react.default.createElement(_form.HelperMessage, {
|
|
103
105
|
testId: "jql-editor-warning-message"
|
|
104
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
106
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
107
|
+
as: "span",
|
|
108
|
+
paddingInlineEnd: "space.050"
|
|
109
|
+
}, /*#__PURE__*/_react.default.createElement(_warning2.default, {
|
|
105
110
|
label: "",
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
111
|
+
color: "var(--ds-icon-warning, ".concat(colors.Y400, ")"),
|
|
112
|
+
LEGACY_size: "small",
|
|
113
|
+
LEGACY_fallbackIcon: _warning.default,
|
|
114
|
+
LEGACY_margin: "0 -4px 0 0"
|
|
115
|
+
})), warningMessage)) : null;
|
|
109
116
|
};
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.JQLEditorReadOnly = void 0;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
11
|
var _primitives = require("@atlaskit/primitives");
|
|
11
12
|
var _useEditorTheme = require("../../hooks/use-editor-theme");
|
|
12
13
|
var _splitTextByNewLine = require("../../utils/split-text-by-new-line");
|
|
@@ -53,7 +54,8 @@ var JQLEditorLayout = function JQLEditorLayout(props) {
|
|
|
53
54
|
onTransitionEnd: onEditorViewTransitionEnd
|
|
54
55
|
}), /*#__PURE__*/_react.default.createElement(_styled.EditorControls, {
|
|
55
56
|
isSearch: isSearch,
|
|
56
|
-
isCompact: isCompact
|
|
57
|
+
isCompact: isCompact,
|
|
58
|
+
isVisualRefresh: (0, _platformFeatureFlags.fg)('platform-component-visual-refresh')
|
|
57
59
|
}, EditorControlsContent)), /*#__PURE__*/_react.default.createElement(_styled.EditorFooter, null, EditorFooterContent));
|
|
58
60
|
};
|
|
59
61
|
/**
|
|
@@ -152,6 +152,8 @@ var EditorControls = exports.EditorControls = _styled.default.div(function (prop
|
|
|
152
152
|
position: 'sticky',
|
|
153
153
|
top: 0,
|
|
154
154
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
155
|
-
height: "".concat(rowHeight + 2 * getEditorInputVerticalPadding(props.isCompact), "px")
|
|
155
|
+
height: "".concat(rowHeight + 2 * getEditorInputVerticalPadding(props.isCompact), "px"),
|
|
156
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
157
|
+
gap: props.isVisualRefresh ? "var(--ds-space-025, 2px)" : 'unset'
|
|
156
158
|
};
|
|
157
159
|
});
|
|
@@ -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.
|
|
3
|
+
return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "4.8.0", ANALYTICS_CHANNEL);
|
|
4
4
|
};
|
|
@@ -3,7 +3,7 @@ import React, { forwardRef, useCallback, useMemo, useState } from 'react';
|
|
|
3
3
|
import deburr from 'lodash/deburr';
|
|
4
4
|
import noop from 'lodash/noop';
|
|
5
5
|
import Icon from '@atlaskit/icon';
|
|
6
|
-
import InfoIcon from '@atlaskit/icon/
|
|
6
|
+
import InfoIcon from '@atlaskit/icon/core/migration/information--editor-panel';
|
|
7
7
|
import { normaliseJqlString } from '@atlaskit/jql-ast';
|
|
8
8
|
import { N400 } from '@atlaskit/theme/colors';
|
|
9
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -143,9 +143,10 @@ const AutocompleteOption = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
143
143
|
content: deprecatedTooltipContent,
|
|
144
144
|
position: 'right'
|
|
145
145
|
}, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
146
|
+
spacing: "spacious",
|
|
146
147
|
testId: "jql-editor-deprecated-icon",
|
|
147
148
|
label: "",
|
|
148
|
-
|
|
149
|
+
color: `var(--ds-icon, ${N400})`
|
|
149
150
|
}))) : optionName, fieldType && /*#__PURE__*/React.createElement(FieldType, null, fieldTypeIcon && /*#__PURE__*/React.createElement(FieldTypeIcon, null, fieldTypeIcon), fieldType));
|
|
150
151
|
const tooltipContent = /*#__PURE__*/React.createElement(TooltipContent, null, name);
|
|
151
152
|
if (overflows) {
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Button from '@atlaskit/button';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
4
|
+
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
5
|
+
import ShrinkDiagonalIcon from '@atlaskit/icon/core/shrink-diagonal';
|
|
6
|
+
import LegacyMediaServicesActualSizeIcon from '@atlaskit/icon/glyph/media-services/actual-size';
|
|
7
|
+
import LegacyMediaServicesFitToPageIcon from '@atlaskit/icon/glyph/media-services/fit-to-page';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
9
|
import { N50, N500 } from '@atlaskit/theme/colors';
|
|
6
10
|
import { ExpandToggleContainer } from './styled';
|
|
7
11
|
|
|
8
12
|
// Atlaskit doesn't provide a circle variation of the expand/collapse icons so we have to implement our own
|
|
9
13
|
const ExpandCircleIcon = ({
|
|
10
14
|
isDisabled
|
|
11
|
-
}) => /*#__PURE__*/React.createElement(
|
|
15
|
+
}) => /*#__PURE__*/React.createElement(GrowDiagonalIcon, {
|
|
12
16
|
label: '',
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
LEGACY_size: 'small',
|
|
18
|
+
color: isDisabled ? `var(--ds-icon-disabled, ${N50})` : `var(--ds-icon, ${N500})`,
|
|
19
|
+
LEGACY_fallbackIcon: LegacyMediaServicesActualSizeIcon
|
|
15
20
|
});
|
|
16
21
|
const CollapseCircleIcon = ({
|
|
17
22
|
isDisabled
|
|
18
|
-
}) => /*#__PURE__*/React.createElement(
|
|
23
|
+
}) => /*#__PURE__*/React.createElement(ShrinkDiagonalIcon, {
|
|
19
24
|
label: '',
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
LEGACY_size: 'small',
|
|
26
|
+
color: isDisabled ? `var(--ds-icon-disabled, ${N50})` : `var(--ds-icon, ${N500})`,
|
|
27
|
+
LEGACY_fallbackIcon: LegacyMediaServicesFitToPageIcon
|
|
22
28
|
});
|
|
23
29
|
export const BaseExpandToggle = ({
|
|
24
30
|
expanded,
|
|
@@ -33,7 +39,16 @@ export const BaseExpandToggle = ({
|
|
|
33
39
|
} else {
|
|
34
40
|
Icon = ExpandCircleIcon;
|
|
35
41
|
}
|
|
36
|
-
return
|
|
42
|
+
return fg('platform-component-visual-refresh') ? /*#__PURE__*/React.createElement(IconButton, {
|
|
43
|
+
appearance: 'subtle',
|
|
44
|
+
spacing: "compact",
|
|
45
|
+
"aria-expanded": expanded,
|
|
46
|
+
"aria-controls": editorId,
|
|
47
|
+
label: label,
|
|
48
|
+
isDisabled: isDisabled,
|
|
49
|
+
onClick: onClick,
|
|
50
|
+
icon: expanded ? ShrinkDiagonalIcon : GrowDiagonalIcon
|
|
51
|
+
}) : /*#__PURE__*/React.createElement(ExpandToggleContainer, null, /*#__PURE__*/React.createElement(Button, {
|
|
37
52
|
appearance: 'subtle',
|
|
38
53
|
"aria-expanded": expanded,
|
|
39
54
|
"aria-controls": editorId,
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { LoadingButton } from '@atlaskit/button';
|
|
3
|
-
import
|
|
3
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
4
|
+
import SearchIconOld from '@atlaskit/icon/core/migration/search--editor-search';
|
|
5
|
+
import SearchIcon from '@atlaskit/icon/core/search';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
4
8
|
const style = {
|
|
5
9
|
// Fixes an issue where loading button makes the editor flicker with a scrollbar
|
|
6
10
|
overflow: 'hidden'
|
|
7
11
|
};
|
|
12
|
+
// Fixes icon margin issus after new icon migration
|
|
13
|
+
const iconStyle = xcss({
|
|
14
|
+
margin: 'space.050',
|
|
15
|
+
display: 'flex'
|
|
16
|
+
});
|
|
8
17
|
export const BaseSearch = ({
|
|
9
18
|
isDisabled,
|
|
10
19
|
isSearching,
|
|
@@ -17,7 +26,17 @@ export const BaseSearch = ({
|
|
|
17
26
|
e.preventDefault();
|
|
18
27
|
}
|
|
19
28
|
}, []);
|
|
20
|
-
return /*#__PURE__*/React.createElement(
|
|
29
|
+
return fg('platform-component-visual-refresh') ? /*#__PURE__*/React.createElement(IconButton, {
|
|
30
|
+
label: label,
|
|
31
|
+
isDisabled: isDisabled,
|
|
32
|
+
testId: "jql-editor-search",
|
|
33
|
+
appearance: 'primary',
|
|
34
|
+
spacing: "compact",
|
|
35
|
+
onClick: onSearch,
|
|
36
|
+
onKeyDown: preventRepeatClick,
|
|
37
|
+
isLoading: isSearching,
|
|
38
|
+
icon: SearchIcon
|
|
39
|
+
}) : /*#__PURE__*/React.createElement(LoadingButton, {
|
|
21
40
|
"aria-label": label,
|
|
22
41
|
isDisabled: isDisabled,
|
|
23
42
|
testId: "jql-editor-search"
|
|
@@ -29,9 +48,13 @@ export const BaseSearch = ({
|
|
|
29
48
|
onClick: onSearch,
|
|
30
49
|
onKeyDown: preventRepeatClick,
|
|
31
50
|
isLoading: isSearching,
|
|
32
|
-
iconBefore: /*#__PURE__*/React.createElement(
|
|
51
|
+
iconBefore: /*#__PURE__*/React.createElement(Box, {
|
|
52
|
+
xcss: iconStyle
|
|
53
|
+
}, /*#__PURE__*/React.createElement(SearchIconOld, {
|
|
54
|
+
color: "currentColor",
|
|
33
55
|
label: '',
|
|
34
|
-
|
|
35
|
-
|
|
56
|
+
LEGACY_size: 'medium',
|
|
57
|
+
LEGACY_margin: "-4px"
|
|
58
|
+
}))
|
|
36
59
|
});
|
|
37
60
|
};
|
|
@@ -1,15 +1,38 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import Button from '@atlaskit/button';
|
|
3
|
-
import
|
|
4
|
+
import { LinkIconButton } from '@atlaskit/button/new';
|
|
5
|
+
import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
6
|
+
import LegacyQuestionIcon from '@atlaskit/icon/glyph/question';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
4
9
|
import { N0 } from '@atlaskit/theme/colors';
|
|
5
10
|
import { SyntaxHelpContainer } from './styled';
|
|
11
|
+
|
|
12
|
+
// Fixes icon margin issus after new icon migration
|
|
13
|
+
const iconStyle = xcss({
|
|
14
|
+
margin: 'space.025',
|
|
15
|
+
display: 'inline-flex'
|
|
16
|
+
});
|
|
6
17
|
export const BaseSyntaxHelp = ({
|
|
7
18
|
describedby,
|
|
8
19
|
isDisabled,
|
|
9
20
|
label,
|
|
10
21
|
onClick
|
|
11
22
|
}) => {
|
|
12
|
-
return
|
|
23
|
+
return fg('platform-component-visual-refresh') ? /*#__PURE__*/React.createElement(LinkIconButton, {
|
|
24
|
+
"aria-describedby": describedby,
|
|
25
|
+
label: label,
|
|
26
|
+
isDisabled: isDisabled,
|
|
27
|
+
appearance: "subtle",
|
|
28
|
+
spacing: "compact",
|
|
29
|
+
onClick: onClick,
|
|
30
|
+
target: "blank",
|
|
31
|
+
href: "https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Advanced+searching",
|
|
32
|
+
icon: iconProps => /*#__PURE__*/React.createElement(QuestionCircleIcon, _extends({}, iconProps, {
|
|
33
|
+
color: "var(--ds-icon-subtle, #626F86)"
|
|
34
|
+
}))
|
|
35
|
+
}) : /*#__PURE__*/React.createElement(SyntaxHelpContainer, null, /*#__PURE__*/React.createElement(Button, {
|
|
13
36
|
"aria-describedby": describedby,
|
|
14
37
|
"aria-label": label,
|
|
15
38
|
isDisabled: isDisabled,
|
|
@@ -17,11 +40,15 @@ export const BaseSyntaxHelp = ({
|
|
|
17
40
|
spacing: 'none',
|
|
18
41
|
target: 'blank',
|
|
19
42
|
href: "https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Advanced+searching",
|
|
20
|
-
iconBefore: /*#__PURE__*/React.createElement(
|
|
43
|
+
iconBefore: /*#__PURE__*/React.createElement(Box, {
|
|
44
|
+
xcss: iconStyle
|
|
45
|
+
}, /*#__PURE__*/React.createElement(QuestionCircleIcon, {
|
|
21
46
|
label: '',
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
47
|
+
color: isDisabled ? `var(--ds-icon-disabled, ${N0})` : `var(--ds-icon-inverse, ${N0})`,
|
|
48
|
+
LEGACY_size: 'small',
|
|
49
|
+
LEGACY_fallbackIcon: LegacyQuestionIcon,
|
|
50
|
+
LEGACY_margin: "-2px"
|
|
51
|
+
})),
|
|
25
52
|
onClick: onClick
|
|
26
53
|
}));
|
|
27
54
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HelperMessage } from '@atlaskit/form';
|
|
3
|
-
import
|
|
3
|
+
import LegacyInfoIcon from '@atlaskit/icon/glyph/info';
|
|
4
|
+
import InfoIcon from '@atlaskit/icon/utility/information';
|
|
5
|
+
import { Box } from '@atlaskit/primitives';
|
|
4
6
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
7
|
import { useEditorViewHasInfos } from '../../../../hooks/use-editor-view-has-infos';
|
|
6
8
|
import { useExternalMessages } from '../../../../state';
|
|
@@ -21,9 +23,14 @@ export const InfoMessages = () => {
|
|
|
21
23
|
const infoMessage = useFormattedInfoMessage();
|
|
22
24
|
return infoMessage != null ? /*#__PURE__*/React.createElement(MessageContainer, null, /*#__PURE__*/React.createElement(HelperMessage, {
|
|
23
25
|
testId: "jql-editor-info-message"
|
|
26
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
27
|
+
as: "span",
|
|
28
|
+
paddingInlineEnd: "space.050"
|
|
24
29
|
}, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
25
30
|
label: "",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
color: `var(--ds-icon-information, ${colors.B500})`,
|
|
32
|
+
LEGACY_size: "small",
|
|
33
|
+
LEGACY_fallbackIcon: LegacyInfoIcon,
|
|
34
|
+
LEGACY_margin: "0 -4px 0 0"
|
|
35
|
+
})), infoMessage)) : null;
|
|
29
36
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { HelperMessage } from '@atlaskit/form';
|
|
3
|
-
import
|
|
3
|
+
import LegacyWarningIcon from '@atlaskit/icon/glyph/warning';
|
|
4
|
+
import WarningIcon from '@atlaskit/icon/utility/warning';
|
|
5
|
+
import { Box } from '@atlaskit/primitives';
|
|
4
6
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
7
|
import { useEditorViewHasWarnings } from '../../../../hooks/use-editor-view-has-warnings';
|
|
6
8
|
import { useExternalMessages, useHydratedDeprecations, useIntl } from '../../../../state';
|
|
@@ -75,9 +77,14 @@ export const WarningMessages = () => {
|
|
|
75
77
|
const warningMessage = useFormattedWarningMessage();
|
|
76
78
|
return warningMessage != null ? /*#__PURE__*/React.createElement(MessageContainer, null, /*#__PURE__*/React.createElement(HelperMessage, {
|
|
77
79
|
testId: "jql-editor-warning-message"
|
|
80
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
81
|
+
as: "span",
|
|
82
|
+
paddingInlineEnd: "space.050"
|
|
78
83
|
}, /*#__PURE__*/React.createElement(WarningIcon, {
|
|
79
84
|
label: "",
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
color: `var(--ds-icon-warning, ${colors.Y400})`,
|
|
86
|
+
LEGACY_size: "small",
|
|
87
|
+
LEGACY_fallbackIcon: LegacyWarningIcon,
|
|
88
|
+
LEGACY_margin: "0 -4px 0 0"
|
|
89
|
+
})), warningMessage)) : null;
|
|
83
90
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { Box } from '@atlaskit/primitives';
|
|
3
4
|
import { EditorThemeContext, useEditorTheme, useEditorThemeContext } from '../../hooks/use-editor-theme';
|
|
4
5
|
import { splitTextByNewLine } from '../../utils/split-text-by-new-line';
|
|
@@ -48,7 +49,8 @@ const JQLEditorLayout = props => {
|
|
|
48
49
|
onTransitionEnd: onEditorViewTransitionEnd
|
|
49
50
|
}), /*#__PURE__*/React.createElement(EditorControls, {
|
|
50
51
|
isSearch: isSearch,
|
|
51
|
-
isCompact: isCompact
|
|
52
|
+
isCompact: isCompact,
|
|
53
|
+
isVisualRefresh: fg('platform-component-visual-refresh')
|
|
52
54
|
}, EditorControlsContent)), /*#__PURE__*/React.createElement(EditorFooter, null, EditorFooterContent));
|
|
53
55
|
};
|
|
54
56
|
/**
|
|
@@ -250,5 +250,7 @@ export const EditorControls = styled.div(props => ({
|
|
|
250
250
|
position: 'sticky',
|
|
251
251
|
top: 0,
|
|
252
252
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
253
|
-
height: `${rowHeight + 2 * getEditorInputVerticalPadding(props.isCompact)}px
|
|
253
|
+
height: `${rowHeight + 2 * getEditorInputVerticalPadding(props.isCompact)}px`,
|
|
254
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
255
|
+
gap: props.isVisualRefresh ? "var(--ds-space-025, 2px)" : 'unset'
|
|
254
256
|
}));
|
|
@@ -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.
|
|
3
|
+
return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "4.8.0", ANALYTICS_CHANNEL);
|
|
4
4
|
};
|
|
@@ -5,7 +5,7 @@ import React, { forwardRef, useCallback, useMemo, useState } from 'react';
|
|
|
5
5
|
import deburr from 'lodash/deburr';
|
|
6
6
|
import noop from 'lodash/noop';
|
|
7
7
|
import Icon from '@atlaskit/icon';
|
|
8
|
-
import InfoIcon from '@atlaskit/icon/
|
|
8
|
+
import InfoIcon from '@atlaskit/icon/core/migration/information--editor-panel';
|
|
9
9
|
import { normaliseJqlString } from '@atlaskit/jql-ast';
|
|
10
10
|
import { N400 } from '@atlaskit/theme/colors';
|
|
11
11
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -149,9 +149,10 @@ var AutocompleteOption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
149
149
|
content: deprecatedTooltipContent,
|
|
150
150
|
position: 'right'
|
|
151
151
|
}, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
152
|
+
spacing: "spacious",
|
|
152
153
|
testId: "jql-editor-deprecated-icon",
|
|
153
154
|
label: "",
|
|
154
|
-
|
|
155
|
+
color: "var(--ds-icon, ".concat(N400, ")")
|
|
155
156
|
}))) : optionName, fieldType && /*#__PURE__*/React.createElement(FieldType, null, fieldTypeIcon && /*#__PURE__*/React.createElement(FieldTypeIcon, null, fieldTypeIcon), fieldType));
|
|
156
157
|
var tooltipContent = /*#__PURE__*/React.createElement(TooltipContent, null, name);
|
|
157
158
|
if (overflows) {
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Button from '@atlaskit/button';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
4
|
+
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
5
|
+
import ShrinkDiagonalIcon from '@atlaskit/icon/core/shrink-diagonal';
|
|
6
|
+
import LegacyMediaServicesActualSizeIcon from '@atlaskit/icon/glyph/media-services/actual-size';
|
|
7
|
+
import LegacyMediaServicesFitToPageIcon from '@atlaskit/icon/glyph/media-services/fit-to-page';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
9
|
import { N50, N500 } from '@atlaskit/theme/colors';
|
|
6
10
|
import { ExpandToggleContainer } from './styled';
|
|
7
11
|
|
|
8
12
|
// Atlaskit doesn't provide a circle variation of the expand/collapse icons so we have to implement our own
|
|
9
13
|
var ExpandCircleIcon = function ExpandCircleIcon(_ref) {
|
|
10
14
|
var isDisabled = _ref.isDisabled;
|
|
11
|
-
return /*#__PURE__*/React.createElement(
|
|
15
|
+
return /*#__PURE__*/React.createElement(GrowDiagonalIcon, {
|
|
12
16
|
label: '',
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
LEGACY_size: 'small',
|
|
18
|
+
color: isDisabled ? "var(--ds-icon-disabled, ".concat(N50, ")") : "var(--ds-icon, ".concat(N500, ")"),
|
|
19
|
+
LEGACY_fallbackIcon: LegacyMediaServicesActualSizeIcon
|
|
15
20
|
});
|
|
16
21
|
};
|
|
17
22
|
var CollapseCircleIcon = function CollapseCircleIcon(_ref2) {
|
|
18
23
|
var isDisabled = _ref2.isDisabled;
|
|
19
|
-
return /*#__PURE__*/React.createElement(
|
|
24
|
+
return /*#__PURE__*/React.createElement(ShrinkDiagonalIcon, {
|
|
20
25
|
label: '',
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
LEGACY_size: 'small',
|
|
27
|
+
color: isDisabled ? "var(--ds-icon-disabled, ".concat(N50, ")") : "var(--ds-icon, ".concat(N500, ")"),
|
|
28
|
+
LEGACY_fallbackIcon: LegacyMediaServicesFitToPageIcon
|
|
23
29
|
});
|
|
24
30
|
};
|
|
25
31
|
export var BaseExpandToggle = function BaseExpandToggle(_ref3) {
|
|
@@ -34,7 +40,16 @@ export var BaseExpandToggle = function BaseExpandToggle(_ref3) {
|
|
|
34
40
|
} else {
|
|
35
41
|
Icon = ExpandCircleIcon;
|
|
36
42
|
}
|
|
37
|
-
return
|
|
43
|
+
return fg('platform-component-visual-refresh') ? /*#__PURE__*/React.createElement(IconButton, {
|
|
44
|
+
appearance: 'subtle',
|
|
45
|
+
spacing: "compact",
|
|
46
|
+
"aria-expanded": expanded,
|
|
47
|
+
"aria-controls": editorId,
|
|
48
|
+
label: label,
|
|
49
|
+
isDisabled: isDisabled,
|
|
50
|
+
onClick: onClick,
|
|
51
|
+
icon: expanded ? ShrinkDiagonalIcon : GrowDiagonalIcon
|
|
52
|
+
}) : /*#__PURE__*/React.createElement(ExpandToggleContainer, null, /*#__PURE__*/React.createElement(Button, {
|
|
38
53
|
appearance: 'subtle',
|
|
39
54
|
"aria-expanded": expanded,
|
|
40
55
|
"aria-controls": editorId,
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { LoadingButton } from '@atlaskit/button';
|
|
3
|
-
import
|
|
3
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
4
|
+
import SearchIconOld from '@atlaskit/icon/core/migration/search--editor-search';
|
|
5
|
+
import SearchIcon from '@atlaskit/icon/core/search';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
4
8
|
var style = {
|
|
5
9
|
// Fixes an issue where loading button makes the editor flicker with a scrollbar
|
|
6
10
|
overflow: 'hidden'
|
|
7
11
|
};
|
|
12
|
+
// Fixes icon margin issus after new icon migration
|
|
13
|
+
var iconStyle = xcss({
|
|
14
|
+
margin: 'space.050',
|
|
15
|
+
display: 'flex'
|
|
16
|
+
});
|
|
8
17
|
export var BaseSearch = function BaseSearch(_ref) {
|
|
9
18
|
var isDisabled = _ref.isDisabled,
|
|
10
19
|
isSearching = _ref.isSearching,
|
|
@@ -16,7 +25,17 @@ export var BaseSearch = function BaseSearch(_ref) {
|
|
|
16
25
|
e.preventDefault();
|
|
17
26
|
}
|
|
18
27
|
}, []);
|
|
19
|
-
return /*#__PURE__*/React.createElement(
|
|
28
|
+
return fg('platform-component-visual-refresh') ? /*#__PURE__*/React.createElement(IconButton, {
|
|
29
|
+
label: label,
|
|
30
|
+
isDisabled: isDisabled,
|
|
31
|
+
testId: "jql-editor-search",
|
|
32
|
+
appearance: 'primary',
|
|
33
|
+
spacing: "compact",
|
|
34
|
+
onClick: onSearch,
|
|
35
|
+
onKeyDown: preventRepeatClick,
|
|
36
|
+
isLoading: isSearching,
|
|
37
|
+
icon: SearchIcon
|
|
38
|
+
}) : /*#__PURE__*/React.createElement(LoadingButton, {
|
|
20
39
|
"aria-label": label,
|
|
21
40
|
isDisabled: isDisabled,
|
|
22
41
|
testId: "jql-editor-search"
|
|
@@ -28,9 +47,13 @@ export var BaseSearch = function BaseSearch(_ref) {
|
|
|
28
47
|
onClick: onSearch,
|
|
29
48
|
onKeyDown: preventRepeatClick,
|
|
30
49
|
isLoading: isSearching,
|
|
31
|
-
iconBefore: /*#__PURE__*/React.createElement(
|
|
50
|
+
iconBefore: /*#__PURE__*/React.createElement(Box, {
|
|
51
|
+
xcss: iconStyle
|
|
52
|
+
}, /*#__PURE__*/React.createElement(SearchIconOld, {
|
|
53
|
+
color: "currentColor",
|
|
32
54
|
label: '',
|
|
33
|
-
|
|
34
|
-
|
|
55
|
+
LEGACY_size: 'medium',
|
|
56
|
+
LEGACY_margin: "-4px"
|
|
57
|
+
}))
|
|
35
58
|
});
|
|
36
59
|
};
|
|
@@ -1,14 +1,39 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import Button from '@atlaskit/button';
|
|
3
|
-
import
|
|
4
|
+
import { LinkIconButton } from '@atlaskit/button/new';
|
|
5
|
+
import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
6
|
+
import LegacyQuestionIcon from '@atlaskit/icon/glyph/question';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
4
9
|
import { N0 } from '@atlaskit/theme/colors';
|
|
5
10
|
import { SyntaxHelpContainer } from './styled';
|
|
11
|
+
|
|
12
|
+
// Fixes icon margin issus after new icon migration
|
|
13
|
+
var iconStyle = xcss({
|
|
14
|
+
margin: 'space.025',
|
|
15
|
+
display: 'inline-flex'
|
|
16
|
+
});
|
|
6
17
|
export var BaseSyntaxHelp = function BaseSyntaxHelp(_ref) {
|
|
7
18
|
var describedby = _ref.describedby,
|
|
8
19
|
isDisabled = _ref.isDisabled,
|
|
9
20
|
label = _ref.label,
|
|
10
21
|
onClick = _ref.onClick;
|
|
11
|
-
return
|
|
22
|
+
return fg('platform-component-visual-refresh') ? /*#__PURE__*/React.createElement(LinkIconButton, {
|
|
23
|
+
"aria-describedby": describedby,
|
|
24
|
+
label: label,
|
|
25
|
+
isDisabled: isDisabled,
|
|
26
|
+
appearance: "subtle",
|
|
27
|
+
spacing: "compact",
|
|
28
|
+
onClick: onClick,
|
|
29
|
+
target: "blank",
|
|
30
|
+
href: "https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Advanced+searching",
|
|
31
|
+
icon: function icon(iconProps) {
|
|
32
|
+
return /*#__PURE__*/React.createElement(QuestionCircleIcon, _extends({}, iconProps, {
|
|
33
|
+
color: "var(--ds-icon-subtle, #626F86)"
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
}) : /*#__PURE__*/React.createElement(SyntaxHelpContainer, null, /*#__PURE__*/React.createElement(Button, {
|
|
12
37
|
"aria-describedby": describedby,
|
|
13
38
|
"aria-label": label,
|
|
14
39
|
isDisabled: isDisabled,
|
|
@@ -16,11 +41,15 @@ export var BaseSyntaxHelp = function BaseSyntaxHelp(_ref) {
|
|
|
16
41
|
spacing: 'none',
|
|
17
42
|
target: 'blank',
|
|
18
43
|
href: "https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Advanced+searching",
|
|
19
|
-
iconBefore: /*#__PURE__*/React.createElement(
|
|
44
|
+
iconBefore: /*#__PURE__*/React.createElement(Box, {
|
|
45
|
+
xcss: iconStyle
|
|
46
|
+
}, /*#__PURE__*/React.createElement(QuestionCircleIcon, {
|
|
20
47
|
label: '',
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
48
|
+
color: isDisabled ? "var(--ds-icon-disabled, ".concat(N0, ")") : "var(--ds-icon-inverse, ".concat(N0, ")"),
|
|
49
|
+
LEGACY_size: 'small',
|
|
50
|
+
LEGACY_fallbackIcon: LegacyQuestionIcon,
|
|
51
|
+
LEGACY_margin: "-2px"
|
|
52
|
+
})),
|
|
24
53
|
onClick: onClick
|
|
25
54
|
}));
|
|
26
55
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { HelperMessage } from '@atlaskit/form';
|
|
4
|
-
import
|
|
4
|
+
import LegacyInfoIcon from '@atlaskit/icon/glyph/info';
|
|
5
|
+
import InfoIcon from '@atlaskit/icon/utility/information';
|
|
6
|
+
import { Box } from '@atlaskit/primitives';
|
|
5
7
|
import * as colors from '@atlaskit/theme/colors';
|
|
6
8
|
import { useEditorViewHasInfos } from '../../../../hooks/use-editor-view-has-infos';
|
|
7
9
|
import { useExternalMessages } from '../../../../state';
|
|
@@ -22,9 +24,14 @@ export var InfoMessages = function InfoMessages() {
|
|
|
22
24
|
var infoMessage = useFormattedInfoMessage();
|
|
23
25
|
return infoMessage != null ? /*#__PURE__*/React.createElement(MessageContainer, null, /*#__PURE__*/React.createElement(HelperMessage, {
|
|
24
26
|
testId: "jql-editor-info-message"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
28
|
+
as: "span",
|
|
29
|
+
paddingInlineEnd: "space.050"
|
|
25
30
|
}, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
26
31
|
label: "",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
color: "var(--ds-icon-information, ".concat(colors.B500, ")"),
|
|
33
|
+
LEGACY_size: "small",
|
|
34
|
+
LEGACY_fallbackIcon: LegacyInfoIcon,
|
|
35
|
+
LEGACY_margin: "0 -4px 0 0"
|
|
36
|
+
})), infoMessage)) : null;
|
|
30
37
|
};
|
|
@@ -2,7 +2,9 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import React, { useCallback } from 'react';
|
|
4
4
|
import { HelperMessage } from '@atlaskit/form';
|
|
5
|
-
import
|
|
5
|
+
import LegacyWarningIcon from '@atlaskit/icon/glyph/warning';
|
|
6
|
+
import WarningIcon from '@atlaskit/icon/utility/warning';
|
|
7
|
+
import { Box } from '@atlaskit/primitives';
|
|
6
8
|
import * as colors from '@atlaskit/theme/colors';
|
|
7
9
|
import { useEditorViewHasWarnings } from '../../../../hooks/use-editor-view-has-warnings';
|
|
8
10
|
import { useExternalMessages, useHydratedDeprecations, useIntl } from '../../../../state';
|
|
@@ -91,9 +93,14 @@ export var WarningMessages = function WarningMessages() {
|
|
|
91
93
|
var warningMessage = useFormattedWarningMessage();
|
|
92
94
|
return warningMessage != null ? /*#__PURE__*/React.createElement(MessageContainer, null, /*#__PURE__*/React.createElement(HelperMessage, {
|
|
93
95
|
testId: "jql-editor-warning-message"
|
|
96
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
97
|
+
as: "span",
|
|
98
|
+
paddingInlineEnd: "space.050"
|
|
94
99
|
}, /*#__PURE__*/React.createElement(WarningIcon, {
|
|
95
100
|
label: "",
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
101
|
+
color: "var(--ds-icon-warning, ".concat(colors.Y400, ")"),
|
|
102
|
+
LEGACY_size: "small",
|
|
103
|
+
LEGACY_fallbackIcon: LegacyWarningIcon,
|
|
104
|
+
LEGACY_margin: "0 -4px 0 0"
|
|
105
|
+
})), warningMessage)) : null;
|
|
99
106
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
var _excluded = ["isSearch", "isCompact"];
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { Box } from '@atlaskit/primitives';
|
|
5
6
|
import { EditorThemeContext, useEditorTheme, useEditorThemeContext } from '../../hooks/use-editor-theme';
|
|
6
7
|
import { splitTextByNewLine } from '../../utils/split-text-by-new-line';
|
|
@@ -47,7 +48,8 @@ var JQLEditorLayout = function JQLEditorLayout(props) {
|
|
|
47
48
|
onTransitionEnd: onEditorViewTransitionEnd
|
|
48
49
|
}), /*#__PURE__*/React.createElement(EditorControls, {
|
|
49
50
|
isSearch: isSearch,
|
|
50
|
-
isCompact: isCompact
|
|
51
|
+
isCompact: isCompact,
|
|
52
|
+
isVisualRefresh: fg('platform-component-visual-refresh')
|
|
51
53
|
}, EditorControlsContent)), /*#__PURE__*/React.createElement(EditorFooter, null, EditorFooterContent));
|
|
52
54
|
};
|
|
53
55
|
/**
|
|
@@ -148,6 +148,8 @@ export var EditorControls = styled.div(function (props) {
|
|
|
148
148
|
position: 'sticky',
|
|
149
149
|
top: 0,
|
|
150
150
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
151
|
-
height: "".concat(rowHeight + 2 * getEditorInputVerticalPadding(props.isCompact), "px")
|
|
151
|
+
height: "".concat(rowHeight + 2 * getEditorInputVerticalPadding(props.isCompact), "px"),
|
|
152
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
153
|
+
gap: props.isVisualRefresh ? "var(--ds-space-025, 2px)" : 'unset'
|
|
152
154
|
};
|
|
153
155
|
});
|
|
@@ -60,5 +60,6 @@ export declare const EditorControls: import("@emotion/styled").StyledComponent<{
|
|
|
60
60
|
} & {
|
|
61
61
|
isSearch: boolean;
|
|
62
62
|
isCompact: boolean;
|
|
63
|
+
isVisualRefresh?: boolean | undefined;
|
|
63
64
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
64
65
|
export {};
|
|
@@ -60,5 +60,6 @@ export declare const EditorControls: import("@emotion/styled").StyledComponent<{
|
|
|
60
60
|
} & {
|
|
61
61
|
isSearch: boolean;
|
|
62
62
|
isCompact: boolean;
|
|
63
|
+
isVisualRefresh?: boolean | undefined;
|
|
63
64
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
64
65
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/jql-editor",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.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",
|
|
@@ -46,10 +46,11 @@
|
|
|
46
46
|
"@atlaskit/jql-autocomplete": "^2.0.0",
|
|
47
47
|
"@atlaskit/jql-editor-common": "^2.1.0",
|
|
48
48
|
"@atlaskit/jql-parser": "^2.0.0",
|
|
49
|
+
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
49
50
|
"@atlaskit/primitives": "^12.1.0",
|
|
50
51
|
"@atlaskit/spinner": "^16.3.0",
|
|
51
52
|
"@atlaskit/theme": "^13.0.0",
|
|
52
|
-
"@atlaskit/tokens": "^1.
|
|
53
|
+
"@atlaskit/tokens": "^1.60.0",
|
|
53
54
|
"@atlaskit/tooltip": "^18.7.0",
|
|
54
55
|
"@babel/runtime": "^7.0.0",
|
|
55
56
|
"@emotion/react": "^11.7.1",
|
|
@@ -121,5 +122,10 @@
|
|
|
121
122
|
"util"
|
|
122
123
|
]
|
|
123
124
|
}
|
|
125
|
+
},
|
|
126
|
+
"platform-feature-flags": {
|
|
127
|
+
"platform-component-visual-refresh": {
|
|
128
|
+
"type": "boolean"
|
|
129
|
+
}
|
|
124
130
|
}
|
|
125
131
|
}
|