@kusto/monaco-kusto 11.1.0 → 11.2.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.
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 11.1.0(a4f4a803b61d72aca89d2412b0c7849259e4fd91)
3
+ * monaco-kusto version: 11.2.0(be6b4e577d36534aa4f67c4f8534653a06265eff)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
7
 
8
- define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-326a932b'], (function (exports, monaco, main) { 'use strict';
8
+ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-fb7fb4af'], (function (exports, monaco, main) { 'use strict';
9
9
 
10
10
  function _interopNamespaceDefault(e) {
11
11
  var n = Object.create(null);
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 11.1.0(a4f4a803b61d72aca89d2412b0c7849259e4fd91)
3
+ * monaco-kusto version: 11.2.0(be6b4e577d36534aa4f67c4f8534653a06265eff)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
7
 
8
- define('vs/language/kusto/kustoWorker', ['exports', './main-326a932b', './schema-26bd7933'], (function (exports, main, schema) { 'use strict';
8
+ define('vs/language/kusto/kustoWorker', ['exports', './main-fb7fb4af', './schema-ba97d97d'], (function (exports, main, schema) { 'use strict';
9
9
 
10
10
  function _slicedToArray$2(r, e) { return _arrayWithHoles$2(r) || _iterableToArrayLimit$2(r, e) || _unsupportedIterableToArray$3(r, e) || _nonIterableRest$2(); }
11
11
  function _nonIterableRest$2() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -3463,36 +3463,6 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-326a932b', './schema
3463
3463
  );
3464
3464
  }
3465
3465
 
3466
- Kusto.Language.Editor;
3467
- var createSortingText = function createSortingText(priority) {
3468
- return priority.toString().padStart(10, '0');
3469
- };
3470
- function sortByMatchTextKeepingKindOrder(items) {
3471
- var groupedByKind = groupContiguousByKind(items);
3472
- var sortedGroupedItems = sortGroupedItems(groupedByKind);
3473
- return sortedGroupedItems.flat();
3474
- }
3475
- function sortGroupedItems(groupedItems) {
3476
- return groupedItems.map(function (group) {
3477
- return group.sort(function (i1, i2) {
3478
- return i1.MatchText.localeCompare(i2.MatchText);
3479
- });
3480
- });
3481
- }
3482
- function groupContiguousByKind(items) {
3483
- return items.reduce(function (result, item) {
3484
- var _last;
3485
- var lastGroup = last(result);
3486
- var shouldCreateNewGroup = !lastGroup || ((_last = last(lastGroup)) === null || _last === void 0 ? void 0 : _last.Kind) !== item.Kind;
3487
- if (shouldCreateNewGroup) result.push([]);
3488
- last(result).push(item);
3489
- return result;
3490
- }, []);
3491
- }
3492
- function last(array) {
3493
- return array.length > 0 ? array[array.length - 1] : undefined;
3494
- }
3495
-
3496
3466
  var _excluded = ["name", "columns", "entityType", "docstring"];
3497
3467
  var _symbolKindToName;
3498
3468
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
@@ -3770,8 +3740,7 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-326a932b', './schema
3770
3740
  });
3771
3741
  }
3772
3742
  var itemsAsArray = this.toArray(completionItems.Items);
3773
- var sortedArray = sortByMatchTextKeepingKindOrder(itemsAsArray);
3774
- var items = sortedArray.filter(function (item) {
3743
+ var items = itemsAsArray.filter(function (item) {
3775
3744
  return !(item && item.MatchText && disabledItems[item.MatchText] !== undefined && (disabledItems[item.MatchText] === k2.CompletionKind.Unknown || disabledItems[item.MatchText] === item.Kind));
3776
3745
  }).map(function (kItem, index) {
3777
3746
  var v1CompletionOption = new k.CompletionOption(_this._toOptionKind[kItem.Kind] || k.OptionKind.None, kItem.DisplayText);
@@ -3797,7 +3766,7 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-326a932b', './schema
3797
3766
  // Changing the first letter to be lower case, to ignore case-sensitive matching
3798
3767
  lsItem.filterText = kItem.MatchText.charAt(0).toLowerCase() + kItem.MatchText.slice(1);
3799
3768
  lsItem.kind = _this.kustoKindToLsKindV2(kItem.Kind);
3800
- lsItem.sortText = createSortingText(index);
3769
+ lsItem.sortText = kItem.OrderText;
3801
3770
  lsItem.insertTextFormat = format;
3802
3771
  lsItem.detail = helpTopic ? helpTopic.ShortDescription : undefined;
3803
3772
  lsItem.documentation = helpTopic ? {
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 11.1.0(a4f4a803b61d72aca89d2412b0c7849259e4fd91)
3
+ * monaco-kusto version: 11.2.0(be6b4e577d36534aa4f67c4f8534653a06265eff)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
7
 
8
- define('vs/language/kusto/main-326a932b', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/main-fb7fb4af', ['exports'], (function (exports) { 'use strict';
9
9
 
10
10
  /* --------------------------------------------------------------------------------------------
11
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 11.1.0(a4f4a803b61d72aca89d2412b0c7849259e4fd91)
3
+ * monaco-kusto version: 11.2.0(be6b4e577d36534aa4f67c4f8534653a06265eff)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
7
 
8
- define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './schema-26bd7933'], (function (require, exports, monaco, schema) { 'use strict';
8
+ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './schema-ba97d97d'], (function (require, exports, monaco, schema) { 'use strict';
9
9
 
10
10
  function _interopNamespaceDefault(e) {
11
11
  var n = Object.create(null);
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 11.1.0(a4f4a803b61d72aca89d2412b0c7849259e4fd91)
3
+ * monaco-kusto version: 11.2.0(be6b4e577d36534aa4f67c4f8534653a06265eff)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
7
 
8
- define('vs/language/kusto/schema-26bd7933', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/schema-ba97d97d', ['exports'], (function (exports) { 'use strict';
9
9
 
10
10
  // Definition of schema object in the context of language services. This model is exposed to consumers of this library.
11
11
 
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 11.1.0(a4f4a803b61d72aca89d2412b0c7849259e4fd91)
3
+ * monaco-kusto version: 11.2.0(be6b4e577d36534aa4f67c4f8534653a06265eff)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
@@ -8,37 +8,12 @@
8
8
  import * as worker from 'monaco-editor/esm/vs/editor/editor.worker';
9
9
  import * as ls from 'vscode-languageserver-types';
10
10
  import XRegExp from 'xregexp';
11
- import { d as getEntityDataTypeFromCslType, a as getCallName, b as getExpression, g as getCslTypeNameFromClrType } from './schema-33d2a0bc.js';
11
+ import { d as getEntityDataTypeFromCslType, a as getCallName, b as getExpression, g as getCslTypeNameFromClrType } from './schema-42c630bd.js';
12
12
  import '@kusto/language-service/bridge.min';
13
13
  import '@kusto/language-service/Kusto.JavaScript.Client.min';
14
14
  import '@kusto/language-service/newtonsoft.json.min';
15
15
  import '@kusto/language-service-next/Kusto.Language.Bridge.min';
16
16
 
17
- Kusto.Language.Editor;
18
- const createSortingText = priority => {
19
- return priority.toString().padStart(10, '0');
20
- };
21
- function sortByMatchTextKeepingKindOrder(items) {
22
- const groupedByKind = groupContiguousByKind(items);
23
- const sortedGroupedItems = sortGroupedItems(groupedByKind);
24
- return sortedGroupedItems.flat();
25
- }
26
- function sortGroupedItems(groupedItems) {
27
- return groupedItems.map(group => group.sort((i1, i2) => i1.MatchText.localeCompare(i2.MatchText)));
28
- }
29
- function groupContiguousByKind(items) {
30
- return items.reduce((result, item) => {
31
- const lastGroup = last(result);
32
- const shouldCreateNewGroup = !lastGroup || last(lastGroup)?.Kind !== item.Kind;
33
- if (shouldCreateNewGroup) result.push([]);
34
- last(result).push(item);
35
- return result;
36
- }, []);
37
- }
38
- function last(array) {
39
- return array.length > 0 ? array[array.length - 1] : undefined;
40
- }
41
-
42
17
  var k = Kusto.Data.IntelliSense;
43
18
  var parsing = Kusto.Language.Parsing;
44
19
  var k2 = Kusto.Language.Editor;
@@ -305,8 +280,7 @@ class KustoLanguageService {
305
280
  });
306
281
  }
307
282
  const itemsAsArray = this.toArray(completionItems.Items);
308
- const sortedArray = sortByMatchTextKeepingKindOrder(itemsAsArray);
309
- let items = sortedArray.filter(item => !(item && item.MatchText && disabledItems[item.MatchText] !== undefined && (disabledItems[item.MatchText] === k2.CompletionKind.Unknown || disabledItems[item.MatchText] === item.Kind))).map((kItem, index) => {
283
+ let items = itemsAsArray.filter(item => !(item && item.MatchText && disabledItems[item.MatchText] !== undefined && (disabledItems[item.MatchText] === k2.CompletionKind.Unknown || disabledItems[item.MatchText] === item.Kind))).map((kItem, index) => {
310
284
  const v1CompletionOption = new k.CompletionOption(this._toOptionKind[kItem.Kind] || k.OptionKind.None, kItem.DisplayText);
311
285
  const helpTopic = this.getTopic(v1CompletionOption);
312
286
  // If we have AfterText it means that the cursor should not be placed at end of suggested text.
@@ -331,7 +305,7 @@ class KustoLanguageService {
331
305
  // Changing the first letter to be lower case, to ignore case-sensitive matching
332
306
  lsItem.filterText = kItem.MatchText.charAt(0).toLowerCase() + kItem.MatchText.slice(1);
333
307
  lsItem.kind = this.kustoKindToLsKindV2(kItem.Kind);
334
- lsItem.sortText = createSortingText(index);
308
+ lsItem.sortText = kItem.OrderText;
335
309
  lsItem.insertTextFormat = format;
336
310
  lsItem.detail = helpTopic ? helpTopic.ShortDescription : undefined;
337
311
  lsItem.documentation = helpTopic ? {
@@ -41,7 +41,6 @@ var k2 = Kusto.Language.Editor;
41
41
  var sym = Kusto.Language.Symbols;
42
42
  var GlobalState = Kusto.Language.GlobalState;
43
43
  import { getCslTypeNameFromClrType, getEntityDataTypeFromCslType } from './schema';
44
- import { createSortingText, sortByMatchTextKeepingKindOrder } from './competionItemSort';
45
44
  var List = System.Collections.Generic.List$1;
46
45
  function assertNever(x) {
47
46
  throw new Error('Unexpected object: ' + x);
@@ -384,8 +383,7 @@ var KustoLanguageService = /** @class */ (function () {
384
383
  });
385
384
  }
386
385
  var itemsAsArray = this.toArray(completionItems.Items);
387
- var sortedArray = sortByMatchTextKeepingKindOrder(itemsAsArray);
388
- var items = sortedArray
386
+ var items = itemsAsArray
389
387
  .filter(function (item) {
390
388
  return !(item &&
391
389
  item.MatchText &&
@@ -417,7 +415,7 @@ var KustoLanguageService = /** @class */ (function () {
417
415
  // Changing the first letter to be lower case, to ignore case-sensitive matching
418
416
  lsItem.filterText = kItem.MatchText.charAt(0).toLowerCase() + kItem.MatchText.slice(1);
419
417
  lsItem.kind = _this.kustoKindToLsKindV2(kItem.Kind);
420
- lsItem.sortText = createSortingText(index);
418
+ lsItem.sortText = kItem.OrderText;
421
419
  lsItem.insertTextFormat = format;
422
420
  lsItem.detail = helpTopic ? helpTopic.ShortDescription : undefined;
423
421
  lsItem.documentation = helpTopic
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 11.1.0(a4f4a803b61d72aca89d2412b0c7849259e4fd91)
3
+ * monaco-kusto version: 11.2.0(be6b4e577d36534aa4f67c4f8534653a06265eff)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/