@atlaskit/jql-editor 4.12.1 → 4.12.2
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 +8 -0
- package/dist/cjs/analytics/listener/helpers/logger.js +1 -2
- package/dist/cjs/analytics/listener/jql-editor-analytics-listener.js +6 -9
- package/dist/cjs/analytics/util.js +1 -1
- package/dist/cjs/plugins/autocomplete/components/autocomplete-option/styled.js +1 -1
- package/dist/cjs/plugins/autocomplete/index.js +1 -2
- package/dist/cjs/plugins/autocomplete/view.js +9 -12
- package/dist/cjs/plugins/common/plugin-keymap.js +1 -2
- package/dist/cjs/plugins/common/react-plugin-view.js +1 -2
- package/dist/cjs/plugins/jql-ast/JQLEditorErrorStrategy.js +8 -9
- package/dist/cjs/plugins/jql-syntax-highlighting/visitor.js +14 -17
- package/dist/cjs/plugins/rich-inline-nodes/util/react-node-view.js +1 -2
- package/dist/cjs/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +16 -19
- package/dist/cjs/plugins/validation-tooltip/view.js +1 -2
- package/dist/cjs/state/hydration/util.js +16 -19
- package/dist/cjs/state/util.js +20 -23
- package/dist/cjs/ui/error-boundary/index.js +6 -9
- package/dist/es2019/analytics/util.js +1 -1
- package/dist/es2019/plugins/autocomplete/components/autocomplete-option/styled.js +1 -1
- package/dist/esm/analytics/listener/helpers/logger.js +1 -2
- package/dist/esm/analytics/listener/jql-editor-analytics-listener.js +6 -9
- package/dist/esm/analytics/util.js +1 -1
- package/dist/esm/plugins/autocomplete/components/autocomplete-option/styled.js +1 -1
- package/dist/esm/plugins/autocomplete/index.js +1 -2
- package/dist/esm/plugins/autocomplete/view.js +9 -12
- package/dist/esm/plugins/common/plugin-keymap.js +1 -2
- package/dist/esm/plugins/common/react-plugin-view.js +1 -2
- package/dist/esm/plugins/jql-ast/JQLEditorErrorStrategy.js +8 -9
- package/dist/esm/plugins/jql-syntax-highlighting/visitor.js +14 -17
- package/dist/esm/plugins/rich-inline-nodes/util/react-node-view.js +1 -2
- package/dist/esm/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +16 -19
- package/dist/esm/plugins/validation-tooltip/view.js +1 -2
- package/dist/esm/state/hydration/util.js +16 -19
- package/dist/esm/state/util.js +20 -23
- package/dist/esm/ui/error-boundary/index.js +6 -9
- package/package.json +1 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import { AbstractJastVisitor } from '@atlaskit/jql-ast';
|
|
11
10
|
|
|
@@ -23,61 +22,59 @@ import { AbstractJastVisitor } from '@atlaskit/jql-ast';
|
|
|
23
22
|
* - Equivalent query: "project = EM and status in (Done)"
|
|
24
23
|
*/
|
|
25
24
|
export var ValidQueryVisitor = /*#__PURE__*/function (_AbstractJastVisitor) {
|
|
26
|
-
_inherits(ValidQueryVisitor, _AbstractJastVisitor);
|
|
27
|
-
var _super = _createSuper(ValidQueryVisitor);
|
|
28
25
|
function ValidQueryVisitor() {
|
|
29
26
|
var _this;
|
|
30
27
|
_classCallCheck(this, ValidQueryVisitor);
|
|
31
28
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
32
29
|
args[_key] = arguments[_key];
|
|
33
30
|
}
|
|
34
|
-
_this =
|
|
35
|
-
_defineProperty(
|
|
31
|
+
_this = _callSuper(this, ValidQueryVisitor, [].concat(args));
|
|
32
|
+
_defineProperty(_this, "visitQuery", function (query) {
|
|
36
33
|
if (!query.where) {
|
|
37
34
|
return '';
|
|
38
35
|
}
|
|
39
|
-
return query.where.accept(
|
|
36
|
+
return query.where.accept(_this);
|
|
40
37
|
});
|
|
41
|
-
_defineProperty(
|
|
38
|
+
_defineProperty(_this, "visitCompoundClause", function (compoundClause) {
|
|
42
39
|
return compoundClause.clauses.map(function (clause) {
|
|
43
|
-
return clause.accept(
|
|
40
|
+
return clause.accept(_this);
|
|
44
41
|
}).filter(function (value) {
|
|
45
42
|
return !!value;
|
|
46
43
|
}).join(' and ');
|
|
47
44
|
});
|
|
48
|
-
_defineProperty(
|
|
45
|
+
_defineProperty(_this, "visitTerminalClause", function (terminalClause) {
|
|
49
46
|
var field = terminalClause.field,
|
|
50
47
|
operator = terminalClause.operator,
|
|
51
48
|
operand = terminalClause.operand;
|
|
52
49
|
if (!operator || !operand) {
|
|
53
50
|
return '';
|
|
54
51
|
}
|
|
55
|
-
var operandValue = operand.accept(
|
|
52
|
+
var operandValue = operand.accept(_this);
|
|
56
53
|
if (!operandValue) {
|
|
57
54
|
return '';
|
|
58
55
|
}
|
|
59
56
|
return "".concat(field.text, " ").concat(operator.value, " ").concat(operandValue);
|
|
60
57
|
});
|
|
61
|
-
_defineProperty(
|
|
62
|
-
return notClause.clause.accept(
|
|
58
|
+
_defineProperty(_this, "visitNotClause", function (notClause) {
|
|
59
|
+
return notClause.clause.accept(_this);
|
|
63
60
|
});
|
|
64
|
-
_defineProperty(
|
|
61
|
+
_defineProperty(_this, "visitValueOperand", function (valueOperand) {
|
|
65
62
|
return valueOperand.text;
|
|
66
63
|
});
|
|
67
|
-
_defineProperty(
|
|
64
|
+
_defineProperty(_this, "visitListOperand", function (listOperand) {
|
|
68
65
|
return "(".concat(listOperand.values.map(function (value) {
|
|
69
|
-
return value.accept(
|
|
66
|
+
return value.accept(_this);
|
|
70
67
|
}).filter(function (value) {
|
|
71
68
|
return !!value;
|
|
72
69
|
}).join(', '), ")");
|
|
73
70
|
});
|
|
74
71
|
return _this;
|
|
75
72
|
}
|
|
76
|
-
|
|
73
|
+
_inherits(ValidQueryVisitor, _AbstractJastVisitor);
|
|
74
|
+
return _createClass(ValidQueryVisitor, [{
|
|
77
75
|
key: "defaultResult",
|
|
78
76
|
value: function defaultResult() {
|
|
79
77
|
return '';
|
|
80
78
|
}
|
|
81
79
|
}]);
|
|
82
|
-
return ValidQueryVisitor;
|
|
83
80
|
}(AbstractJastVisitor);
|
package/dist/esm/state/util.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -117,53 +116,51 @@ export var getFieldNodes = function getFieldNodes(ast) {
|
|
|
117
116
|
return visitor.fields;
|
|
118
117
|
};
|
|
119
118
|
var FindFieldsVisitor = /*#__PURE__*/function (_AbstractJastVisitor) {
|
|
120
|
-
_inherits(FindFieldsVisitor, _AbstractJastVisitor);
|
|
121
|
-
var _super = _createSuper(FindFieldsVisitor);
|
|
122
119
|
function FindFieldsVisitor() {
|
|
123
120
|
var _this;
|
|
124
121
|
_classCallCheck(this, FindFieldsVisitor);
|
|
125
122
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
126
123
|
args[_key] = arguments[_key];
|
|
127
124
|
}
|
|
128
|
-
_this =
|
|
129
|
-
_defineProperty(
|
|
130
|
-
_defineProperty(
|
|
125
|
+
_this = _callSuper(this, FindFieldsVisitor, [].concat(args));
|
|
126
|
+
_defineProperty(_this, "fields", new Set());
|
|
127
|
+
_defineProperty(_this, "visitQuery", function (query) {
|
|
131
128
|
if (query.where !== undefined) {
|
|
132
|
-
query.where.accept(
|
|
129
|
+
query.where.accept(_this);
|
|
133
130
|
}
|
|
134
131
|
if (query.orderBy !== undefined) {
|
|
135
|
-
query.orderBy.accept(
|
|
132
|
+
query.orderBy.accept(_this);
|
|
136
133
|
}
|
|
137
134
|
});
|
|
138
|
-
_defineProperty(
|
|
135
|
+
_defineProperty(_this, "visitOrderBy", function (orderBy) {
|
|
139
136
|
orderBy.fields.map(function (orderByField) {
|
|
140
|
-
return orderByField.accept(
|
|
137
|
+
return orderByField.accept(_this);
|
|
141
138
|
});
|
|
142
139
|
});
|
|
143
|
-
_defineProperty(
|
|
144
|
-
orderByField.field.accept(
|
|
140
|
+
_defineProperty(_this, "visitOrderByField", function (orderByField) {
|
|
141
|
+
orderByField.field.accept(_this);
|
|
145
142
|
});
|
|
146
|
-
_defineProperty(
|
|
143
|
+
_defineProperty(_this, "visitCompoundClause", function (compoundClause) {
|
|
147
144
|
compoundClause.clauses.map(function (clause) {
|
|
148
|
-
return clause.accept(
|
|
145
|
+
return clause.accept(_this);
|
|
149
146
|
});
|
|
150
147
|
});
|
|
151
|
-
_defineProperty(
|
|
152
|
-
terminalClause.field.accept(
|
|
148
|
+
_defineProperty(_this, "visitTerminalClause", function (terminalClause) {
|
|
149
|
+
terminalClause.field.accept(_this);
|
|
153
150
|
});
|
|
154
|
-
_defineProperty(
|
|
155
|
-
notClause.clause.accept(
|
|
151
|
+
_defineProperty(_this, "visitNotClause", function (notClause) {
|
|
152
|
+
notClause.clause.accept(_this);
|
|
156
153
|
});
|
|
157
|
-
_defineProperty(
|
|
154
|
+
_defineProperty(_this, "visitField", function (field) {
|
|
158
155
|
_this.fields.add(field.value.toLowerCase());
|
|
159
156
|
});
|
|
160
157
|
return _this;
|
|
161
158
|
}
|
|
162
|
-
|
|
159
|
+
_inherits(FindFieldsVisitor, _AbstractJastVisitor);
|
|
160
|
+
return _createClass(FindFieldsVisitor, [{
|
|
163
161
|
key: "defaultResult",
|
|
164
162
|
value: function defaultResult() {
|
|
165
163
|
return;
|
|
166
164
|
}
|
|
167
165
|
}]);
|
|
168
|
-
return FindFieldsVisitor;
|
|
169
166
|
}(AbstractJastVisitor);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React, { Component } from 'react';
|
|
11
10
|
|
|
@@ -14,21 +13,20 @@ import { JQLEditorReadOnly } from '../jql-editor-layout';
|
|
|
14
13
|
// eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
|
|
15
14
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
16
15
|
var ErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
17
|
-
_inherits(ErrorBoundary, _Component);
|
|
18
|
-
var _super = _createSuper(ErrorBoundary);
|
|
19
16
|
function ErrorBoundary() {
|
|
20
17
|
var _this;
|
|
21
18
|
_classCallCheck(this, ErrorBoundary);
|
|
22
19
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
20
|
args[_key] = arguments[_key];
|
|
24
21
|
}
|
|
25
|
-
_this =
|
|
26
|
-
_defineProperty(
|
|
22
|
+
_this = _callSuper(this, ErrorBoundary, [].concat(args));
|
|
23
|
+
_defineProperty(_this, "state", {
|
|
27
24
|
error: null
|
|
28
25
|
});
|
|
29
26
|
return _this;
|
|
30
27
|
}
|
|
31
|
-
|
|
28
|
+
_inherits(ErrorBoundary, _Component);
|
|
29
|
+
return _createClass(ErrorBoundary, [{
|
|
32
30
|
key: "componentDidCatch",
|
|
33
31
|
value: function componentDidCatch(error) {
|
|
34
32
|
this.setState({
|
|
@@ -51,7 +49,6 @@ var ErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
|
51
49
|
});
|
|
52
50
|
}
|
|
53
51
|
}]);
|
|
54
|
-
return ErrorBoundary;
|
|
55
52
|
}(Component);
|
|
56
53
|
export var withErrorBoundary = function withErrorBoundary(WrappedComponent) {
|
|
57
54
|
return function (props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/jql-editor",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.2",
|
|
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",
|