@atlaskit/jql-autocomplete
Advanced tools
Comparing version
# @atlaskit/jql-autocomplete | ||
## 2.0.1 | ||
### Patch Changes | ||
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2` | ||
## 2.0.0 | ||
@@ -7,3 +13,3 @@ | ||
- [`978cfcda881`](https://bitbucket.org/atlassian/atlassian-frontend/commits/978cfcda881) - Migrate `jql-autocomplete` package to the `@atlaskit` namespace. Any consumers should update their imports to `@atlaskit/jql-autocomplete`. | ||
- [#39978](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39978) [`978cfcda881`](https://bitbucket.org/atlassian/atlassian-frontend/commits/978cfcda881) - Migrate `jql-autocomplete` package to the `@atlaskit` namespace. Any consumers should update their imports to `@atlaskit/jql-autocomplete`. | ||
@@ -18,3 +24,3 @@ ### Patch Changes | ||
- [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json | ||
- [#38162](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38162) [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json | ||
@@ -25,3 +31,3 @@ ## 1.2.5 | ||
- [`046f9e95899`](https://bitbucket.org/atlassian/atlassian-frontend/commits/046f9e95899) - Use deep import for antlr4-c3 dependency to mitigate lack of tree-shaking. | ||
- [#38404](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38404) [`046f9e95899`](https://bitbucket.org/atlassian/atlassian-frontend/commits/046f9e95899) - Use deep import for antlr4-c3 dependency to mitigate lack of tree-shaking. | ||
@@ -34,3 +40,3 @@ ## 1.2.4 | ||
- [`7926dc060ff`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7926dc060ff) - Clamp antlr4ts version to 0.5.0-alpha.4 | ||
- [#36690](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36690) [`7926dc060ff`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7926dc060ff) - Clamp antlr4ts version to 0.5.0-alpha.4 | ||
@@ -43,3 +49,3 @@ ## 1.2.3 | ||
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8 | ||
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8 | ||
@@ -50,3 +56,3 @@ ## 1.2.2 | ||
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5` | ||
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5` | ||
@@ -57,3 +63,3 @@ ## 1.2.1 | ||
- [`5fbee461cc7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5fbee461cc7) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change. | ||
- [#33285](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33285) [`5fbee461cc7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5fbee461cc7) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change. | ||
@@ -64,3 +70,3 @@ ## 1.2.0 | ||
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump | ||
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump | ||
@@ -71,3 +77,3 @@ ## 1.1.9 | ||
- [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5` | ||
- [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874) [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5` | ||
@@ -80,3 +86,3 @@ ## 1.1.8 | ||
- [`5a4217aeed6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5a4217aeed6) - Add polyfill for node assert and util modules. | ||
- [#25232](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/25232) [`5a4217aeed6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5a4217aeed6) - Add polyfill for node assert and util modules. | ||
@@ -83,0 +89,0 @@ ## 1.1.7 |
@@ -24,3 +24,3 @@ "use strict"; | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
var BaseAutocomplete = /*#__PURE__*/function () { | ||
var BaseAutocomplete = exports.BaseAutocomplete = /*#__PURE__*/function () { | ||
/** | ||
@@ -391,3 +391,2 @@ * A delimiter token instructs us that we want to get suggestions for the **next** token in the | ||
return BaseAutocomplete; | ||
}(); | ||
exports.BaseAutocomplete = BaseAutocomplete; | ||
}(); |
@@ -10,3 +10,3 @@ "use strict"; | ||
var _Interval = require("antlr4ts/misc/Interval"); | ||
var getMatchedText = function getMatchedText(tokenStream, startTokenIndex, stopToken, caretSelectionRange) { | ||
var getMatchedText = exports.getMatchedText = function getMatchedText(tokenStream, startTokenIndex, stopToken, caretSelectionRange) { | ||
var matchedText = tokenStream.getText(_Interval.Interval.of(startTokenIndex, stopToken.tokenIndex)); | ||
@@ -24,3 +24,2 @@ var _caretSelectionRange = (0, _slicedToArray2.default)(caretSelectionRange, 1), | ||
return matchedText; | ||
}; | ||
exports.getMatchedText = getMatchedText; | ||
}; |
@@ -1,5 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
"use strict"; |
@@ -8,12 +8,10 @@ "use strict"; | ||
var _jqlParser = require("@atlaskit/jql-parser"); | ||
var WHERE_CLAUSE = 'where'; | ||
exports.WHERE_CLAUSE = WHERE_CLAUSE; | ||
var ORDER_BY_CLAUSE = 'orderBy'; | ||
var WHERE_CLAUSE = exports.WHERE_CLAUSE = 'where'; | ||
var ORDER_BY_CLAUSE = exports.ORDER_BY_CLAUSE = 'orderBy'; | ||
// TODO: do something with this | ||
exports.ORDER_BY_CLAUSE = ORDER_BY_CLAUSE; | ||
var operators = ['=', '!=', '>', '<', '>=', '<=', 'in', 'not in', '~', '!~', 'is', 'is not', 'was', 'was in', 'was not in', 'was not', 'changed']; | ||
exports.operators = operators; | ||
var predicateOperators = ['after', 'before', 'on', 'during', 'by', 'from', 'to']; | ||
var operators = exports.operators = ['=', '!=', '>', '<', '>=', '<=', 'in', 'not in', '~', '!~', 'is', 'is not', 'was', 'was in', 'was not in', 'was not', 'changed']; | ||
var predicateOperators = exports.predicateOperators = ['after', 'before', 'on', 'during', 'by', 'from', 'to']; | ||
/** | ||
@@ -23,4 +21,3 @@ * Here we maintain an opinionated subset of rules we believe need to leverage context data. | ||
*/ | ||
exports.predicateOperators = predicateOperators; | ||
var rulesWithContext = [_jqlParser.JQLParser.RULE_jqlField, _jqlParser.JQLParser.RULE_jqlEqualsOperator, _jqlParser.JQLParser.RULE_jqlLikeOperator, _jqlParser.JQLParser.RULE_jqlComparisonOperator, _jqlParser.JQLParser.RULE_jqlInOperator, _jqlParser.JQLParser.RULE_jqlIsOperator, _jqlParser.JQLParser.RULE_jqlWasOperator, _jqlParser.JQLParser.RULE_jqlWasInOperator, _jqlParser.JQLParser.RULE_jqlChangedOperator, _jqlParser.JQLParser.RULE_jqlValue, _jqlParser.JQLParser.RULE_jqlListStart, _jqlParser.JQLParser.RULE_jqlFunction]; | ||
var rulesWithContext = exports.rulesWithContext = [_jqlParser.JQLParser.RULE_jqlField, _jqlParser.JQLParser.RULE_jqlEqualsOperator, _jqlParser.JQLParser.RULE_jqlLikeOperator, _jqlParser.JQLParser.RULE_jqlComparisonOperator, _jqlParser.JQLParser.RULE_jqlInOperator, _jqlParser.JQLParser.RULE_jqlIsOperator, _jqlParser.JQLParser.RULE_jqlWasOperator, _jqlParser.JQLParser.RULE_jqlWasInOperator, _jqlParser.JQLParser.RULE_jqlChangedOperator, _jqlParser.JQLParser.RULE_jqlValue, _jqlParser.JQLParser.RULE_jqlListStart, _jqlParser.JQLParser.RULE_jqlFunction]; | ||
@@ -30,4 +27,2 @@ /** | ||
*/ | ||
exports.rulesWithContext = rulesWithContext; | ||
var unclosedStringTokens = [_jqlParser.JQLParser.UNCLOSED_QUOTE_STRING, _jqlParser.JQLParser.UNCLOSED_SQUOTE_STRING]; | ||
exports.unclosedStringTokens = unclosedStringTokens; | ||
var unclosedStringTokens = exports.unclosedStringTokens = [_jqlParser.JQLParser.UNCLOSED_QUOTE_STRING, _jqlParser.JQLParser.UNCLOSED_SQUOTE_STRING]; |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _jqlParser = require("@atlaskit/jql-parser"); | ||
var defaultIgnoredTokens = new Set([_jqlParser.JQLLexer.EOF, _jqlParser.JQLLexer.LPAREN, _jqlParser.JQLLexer.RPAREN, _jqlParser.JQLLexer.LBRACKET, _jqlParser.JQLLexer.RBRACKET, _jqlParser.JQLLexer.STRING, _jqlParser.JQLLexer.QUOTE_STRING, _jqlParser.JQLLexer.SQUOTE_STRING, _jqlParser.JQLLexer.POSNUMBER, _jqlParser.JQLLexer.NEGNUMBER, _jqlParser.JQLLexer.BANG, _jqlParser.JQLLexer.CUSTOMFIELD, _jqlParser.JQLLexer.COMMA]); | ||
var defaultIgnoredTokens = exports.defaultIgnoredTokens = new Set([_jqlParser.JQLLexer.EOF, _jqlParser.JQLLexer.LPAREN, _jqlParser.JQLLexer.RPAREN, _jqlParser.JQLLexer.LBRACKET, _jqlParser.JQLLexer.RBRACKET, _jqlParser.JQLLexer.STRING, _jqlParser.JQLLexer.QUOTE_STRING, _jqlParser.JQLLexer.SQUOTE_STRING, _jqlParser.JQLLexer.POSNUMBER, _jqlParser.JQLLexer.NEGNUMBER, _jqlParser.JQLLexer.BANG, _jqlParser.JQLLexer.CUSTOMFIELD, _jqlParser.JQLLexer.COMMA]); | ||
@@ -32,6 +32,4 @@ /** | ||
*/ | ||
exports.defaultIgnoredTokens = defaultIgnoredTokens; | ||
var unhandledRules = [_jqlParser.JQLParser.RULE_jqlFieldProperty // stop field from being suggested after whitespace | ||
var unhandledRules = exports.unhandledRules = [_jqlParser.JQLParser.RULE_jqlFieldProperty // stop field from being suggested after whitespace | ||
]; | ||
exports.unhandledRules = unhandledRules; | ||
var operatorRules = [_jqlParser.JQLParser.RULE_jqlEqualsOperator, _jqlParser.JQLParser.RULE_jqlLikeOperator, _jqlParser.JQLParser.RULE_jqlComparisonOperator, _jqlParser.JQLParser.RULE_jqlInOperator, _jqlParser.JQLParser.RULE_jqlIsOperator, _jqlParser.JQLParser.RULE_jqlWasOperator, _jqlParser.JQLParser.RULE_jqlWasInOperator, _jqlParser.JQLParser.RULE_jqlChangedOperator]; | ||
@@ -53,8 +51,6 @@ var operandRules = [_jqlParser.JQLParser.RULE_jqlValue, _jqlParser.JQLParser.RULE_jqlFunction, | ||
*/ | ||
var defaultPreferredRules = new Set([_jqlParser.JQLParser.RULE_jqlField].concat(operatorRules, operandRules, unhandledRules, [ | ||
var defaultPreferredRules = exports.defaultPreferredRules = new Set([_jqlParser.JQLParser.RULE_jqlField].concat(operatorRules, operandRules, unhandledRules, [ | ||
// Disable token suggestions for predicate operands. | ||
// To be removed when we build proper autocomplete support. | ||
_jqlParser.JQLParser.RULE_jqlPredicateOperand])); | ||
exports.defaultPreferredRules = defaultPreferredRules; | ||
var defaultDelimiterTokens = new Set([_jqlParser.JQLLexer.LPAREN, _jqlParser.JQLLexer.COMMA]); | ||
exports.defaultDelimiterTokens = defaultDelimiterTokens; | ||
var defaultDelimiterTokens = exports.defaultDelimiterTokens = new Set([_jqlParser.JQLLexer.LPAREN, _jqlParser.JQLLexer.COMMA]); |
@@ -22,4 +22,4 @@ "use strict"; | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
var JQLAutocomplete = /*#__PURE__*/function (_BaseAutocomplete) { | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
var JQLAutocomplete = exports.JQLAutocomplete = /*#__PURE__*/function (_BaseAutocomplete) { | ||
(0, _inherits2.default)(JQLAutocomplete, _BaseAutocomplete); | ||
@@ -243,3 +243,2 @@ var _super = _createSuper(JQLAutocomplete); | ||
return JQLAutocomplete; | ||
}(_baseAutocomplete.BaseAutocomplete); | ||
exports.JQLAutocomplete = JQLAutocomplete; | ||
}(_baseAutocomplete.BaseAutocomplete); |
@@ -19,3 +19,3 @@ "use strict"; | ||
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) { (0, _defineProperty2.default)(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; } | ||
var RuleContextVisitor = /*#__PURE__*/(0, _createClass2.default)(function RuleContextVisitor(ruleSuggestion, ruleList, rule, tokenStream, maybeCaretToken) { | ||
var RuleContextVisitor = exports.RuleContextVisitor = /*#__PURE__*/(0, _createClass2.default)(function RuleContextVisitor(ruleSuggestion, ruleList, rule, tokenStream, maybeCaretToken) { | ||
var _this = this; | ||
@@ -263,3 +263,2 @@ (0, _classCallCheck2.default)(this, RuleContextVisitor); | ||
this.replacePositionStart = _ruleSuggestion$repla[0]; | ||
}); | ||
exports.RuleContextVisitor = RuleContextVisitor; | ||
}); |
@@ -9,17 +9,13 @@ "use strict"; | ||
var _constants = require("./constants"); | ||
var isPredicateOperand = function isPredicateOperand(ruleStack) { | ||
var isPredicateOperand = exports.isPredicateOperand = function isPredicateOperand(ruleStack) { | ||
return ruleStack.includes(_jqlParser.JQLParser.RULE_jqlPredicateOperand); | ||
}; | ||
exports.isPredicateOperand = isPredicateOperand; | ||
var getPositionFromParserRule = function getPositionFromParserRule(ctx) { | ||
var getPositionFromParserRule = exports.getPositionFromParserRule = function getPositionFromParserRule(ctx) { | ||
return [ctx.start.startIndex, ctx.stop ? ctx.stop.stopIndex + 1 : ctx.start.stopIndex + 1]; | ||
}; | ||
exports.getPositionFromParserRule = getPositionFromParserRule; | ||
var normalizeText = function normalizeText(text) { | ||
var normalizeText = exports.normalizeText = function normalizeText(text) { | ||
return text.toLowerCase().replace(/\s+/g, ' ').trim(); | ||
}; | ||
exports.normalizeText = normalizeText; | ||
var isOperator = function isOperator(maybeOperator) { | ||
var isOperator = exports.isOperator = function isOperator(maybeOperator) { | ||
return _constants.operators.includes(maybeOperator); | ||
}; | ||
exports.isOperator = isOperator; | ||
}; |
@@ -1,5 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
"use strict"; |
@@ -27,3 +27,2 @@ import { JQLLexer, JQLParser } from '@atlaskit/jql-parser'; | ||
]; | ||
const operatorRules = [JQLParser.RULE_jqlEqualsOperator, JQLParser.RULE_jqlLikeOperator, JQLParser.RULE_jqlComparisonOperator, JQLParser.RULE_jqlInOperator, JQLParser.RULE_jqlIsOperator, JQLParser.RULE_jqlWasOperator, JQLParser.RULE_jqlWasInOperator, JQLParser.RULE_jqlChangedOperator]; | ||
@@ -30,0 +29,0 @@ const operandRules = [JQLParser.RULE_jqlValue, JQLParser.RULE_jqlFunction, |
@@ -27,3 +27,2 @@ import { JQLLexer, JQLParser } from '@atlaskit/jql-parser'; | ||
]; | ||
var operatorRules = [JQLParser.RULE_jqlEqualsOperator, JQLParser.RULE_jqlLikeOperator, JQLParser.RULE_jqlComparisonOperator, JQLParser.RULE_jqlInOperator, JQLParser.RULE_jqlIsOperator, JQLParser.RULE_jqlWasOperator, JQLParser.RULE_jqlWasInOperator, JQLParser.RULE_jqlChangedOperator]; | ||
@@ -30,0 +29,0 @@ var operandRules = [JQLParser.RULE_jqlValue, JQLParser.RULE_jqlFunction, |
@@ -8,3 +8,3 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
import { CharStreams, CommonTokenStream } from 'antlr4ts'; | ||
@@ -11,0 +11,0 @@ import { JQLLexer, JQLParser } from '@atlaskit/jql-parser'; |
{ | ||
"name": "@atlaskit/jql-autocomplete", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "JQL autocomplete engine", | ||
@@ -19,3 +19,3 @@ "author": "Atlassian Pty Ltd", | ||
}, | ||
"repository": "https://bitbucket.org/atlassian/atlassian-frontend", | ||
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror", | ||
"main": "dist/cjs/index.js", | ||
@@ -49,3 +49,3 @@ "module": "dist/esm/index.js", | ||
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0", | ||
"typescript": "~4.9.5", | ||
"typescript": "~5.4.2", | ||
"wait-for-expect": "^1.2.0" | ||
@@ -95,2 +95,2 @@ }, | ||
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0" | ||
} | ||
} |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
215364
-1.67%70
-1.41%3754
-2.97%