@kusto/monaco-kusto 13.0.0 → 13.0.1

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.
Files changed (27) hide show
  1. package/README.md +14 -3
  2. package/package.json +6 -4
  3. package/release/dev/Kusto.Language.Bridge.min.js +202 -203
  4. package/release/dev/kustoMode.js +2 -2
  5. package/release/dev/kustoWorker.js +2 -2
  6. package/release/dev/{main-5033cd82.js → main-04597f81.js} +2 -2
  7. package/release/dev/monaco.contribution.js +79 -25
  8. package/release/dev/{schema-a00277a0.js → schema-9c3b6c78.js} +2 -2
  9. package/release/dev/{types-25df5473.js → types-ffd2d452.js} +2 -2
  10. package/release/esm/editorExtensions/KustoIntelliSenseCloser.d.ts +17 -0
  11. package/release/esm/editorExtensions/KustoIntelliSenseCloser.js +42 -0
  12. package/release/esm/{commandHighlighter.js → editorExtensions/commandHighlighter.js} +1 -1
  13. package/release/esm/{globals-34bd2c33.js → globals-a0d2077f.js} +1 -1
  14. package/release/esm/kusto.worker.js +2 -2
  15. package/release/esm/kustoMode.js +2 -2
  16. package/release/esm/monaco.contribution.js +42 -4
  17. package/release/esm/{schema-9ec6976d.js → schema-4f17a725.js} +1 -1
  18. package/release/min/Kusto.Language.Bridge.min.js +202 -203
  19. package/release/min/kustoMode.js +2 -2
  20. package/release/min/kustoWorker.js +2 -2
  21. package/release/min/{main-6c0b27e3.js → main-c88e79ea.js} +2 -2
  22. package/release/min/monaco.contribution.js +2 -2
  23. package/release/min/{schema-cafdbe67.js → schema-7f7acd36.js} +2 -2
  24. package/release/min/{types-8288e7ff.js → types-edb6ea80.js} +2 -2
  25. /package/release/esm/{commandFormatter.d.ts → editorExtensions/commandFormatter.d.ts} +0 -0
  26. /package/release/esm/{commandFormatter.js → editorExtensions/commandFormatter.js} +0 -0
  27. /package/release/esm/{commandHighlighter.d.ts → editorExtensions/commandHighlighter.d.ts} +0 -0
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.0(8b9e3a800e91248ee7909ccf310acdea3bf37bc6)
3
+ * monaco-kusto version: 13.0.1(c583448ef85a6c5416f36c2d537eccb626b81aa8)
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-5033cd82', './types-25df5473'], (function (exports, monaco, main, types$1) { 'use strict';
8
+ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-04597f81', './types-ffd2d452'], (function (exports, monaco, main, types$1) { '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: 13.0.0(8b9e3a800e91248ee7909ccf310acdea3bf37bc6)
3
+ * monaco-kusto version: 13.0.1(c583448ef85a6c5416f36c2d537eccb626b81aa8)
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-5033cd82', './schema-a00277a0'], (function (exports, main, schema) { 'use strict';
8
+ define('vs/language/kusto/kustoWorker', ['exports', './main-04597f81', './schema-9c3b6c78'], (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."); }
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.0(8b9e3a800e91248ee7909ccf310acdea3bf37bc6)
3
+ * monaco-kusto version: 13.0.1(c583448ef85a6c5416f36c2d537eccb626b81aa8)
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-5033cd82', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/main-04597f81', ['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: 13.0.0(8b9e3a800e91248ee7909ccf310acdea3bf37bc6)
3
+ * monaco-kusto version: 13.0.1(c583448ef85a6c5416f36c2d537eccb626b81aa8)
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', './types-25df5473', './schema-a00277a0'], (function (require, exports, monaco, types, schema) { 'use strict';
8
+ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './types-ffd2d452', './schema-9c3b6c78'], (function (require, exports, monaco, types, schema) { 'use strict';
9
9
 
10
10
  function _interopNamespaceDefault(e) {
11
11
  var n = Object.create(null);
@@ -76,13 +76,13 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
76
76
  };
77
77
  }
78
78
 
79
- function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$2(o); }
80
- function _classCallCheck$2(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
81
- function _defineProperties$2(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$2(o.key), o); } }
82
- function _createClass$2(e, r, t) { return r && _defineProperties$2(e.prototype, r), t && _defineProperties$2(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
83
- function _defineProperty$2(e, r, t) { return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
84
- function _toPropertyKey$2(t) { var i = _toPrimitive$2(t, "string"); return "symbol" == _typeof$2(i) ? i : i + ""; }
85
- function _toPrimitive$2(t, r) { if ("object" != _typeof$2(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$2(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
79
+ function _typeof$3(o) { "@babel/helpers - typeof"; return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$3(o); }
80
+ function _classCallCheck$3(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
81
+ function _defineProperties$3(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$3(o.key), o); } }
82
+ function _createClass$3(e, r, t) { return r && _defineProperties$3(e.prototype, r), t && _defineProperties$3(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
83
+ function _defineProperty$3(e, r, t) { return (r = _toPropertyKey$3(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
84
+ function _toPropertyKey$3(t) { var i = _toPrimitive$3(t, "string"); return "symbol" == _typeof$3(i) ? i : i + ""; }
85
+ function _toPrimitive$3(t, r) { if ("object" != _typeof$3(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$3(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
86
86
 
87
87
  /**
88
88
  * Highlights the command that surround cursor location
@@ -94,9 +94,9 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
94
94
  */
95
95
  function KustoCommandHighlighter(editor) {
96
96
  var _this = this;
97
- _classCallCheck$2(this, KustoCommandHighlighter);
98
- _defineProperty$2(this, "disposables", []);
99
- _defineProperty$2(this, "decorations", []);
97
+ _classCallCheck$3(this, KustoCommandHighlighter);
98
+ _defineProperty$3(this, "disposables", []);
99
+ _defineProperty$3(this, "decorations", []);
100
100
  this.editor = editor;
101
101
  // Note that selection update is triggered not only for selection changes, but also just when no text selection is occurring and cursor just moves around.
102
102
  // This case is counted as a 0-length selection starting and ending on the cursor position.
@@ -107,7 +107,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
107
107
  _this.highlightCommandUnderCursor(changeEvent);
108
108
  });
109
109
  }
110
- return _createClass$2(KustoCommandHighlighter, [{
110
+ return _createClass$3(KustoCommandHighlighter, [{
111
111
  key: "getId",
112
112
  value: function getId() {
113
113
  return KustoCommandHighlighter.ID;
@@ -137,22 +137,22 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
137
137
  }
138
138
  }]);
139
139
  }();
140
- _defineProperty$2(KustoCommandHighlighter, "ID", 'editor.contrib.kustoCommandHighlighter');
141
- _defineProperty$2(KustoCommandHighlighter, "CURRENT_COMMAND_HIGHLIGHT", {
140
+ _defineProperty$3(KustoCommandHighlighter, "ID", 'editor.contrib.kustoCommandHighlighter');
141
+ _defineProperty$3(KustoCommandHighlighter, "CURRENT_COMMAND_HIGHLIGHT", {
142
142
  className: 'selectionHighlight'
143
143
  });
144
144
 
145
- function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$1(o); }
146
- function _defineProperties$1(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$1(o.key), o); } }
147
- function _createClass$1(e, r, t) { return r && _defineProperties$1(e.prototype, r), t && _defineProperties$1(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
148
- function _classCallCheck$1(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
149
- function _defineProperty$1(e, r, t) { return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
150
- function _toPropertyKey$1(t) { var i = _toPrimitive$1(t, "string"); return "symbol" == _typeof$1(i) ? i : i + ""; }
151
- function _toPrimitive$1(t, r) { if ("object" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$1(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
152
- var KustoCommandFormatter = /*#__PURE__*/_createClass$1(function KustoCommandFormatter(editor) {
145
+ function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$2(o); }
146
+ function _defineProperties$2(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$2(o.key), o); } }
147
+ function _createClass$2(e, r, t) { return r && _defineProperties$2(e.prototype, r), t && _defineProperties$2(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
148
+ function _classCallCheck$2(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
149
+ function _defineProperty$2(e, r, t) { return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
150
+ function _toPropertyKey$2(t) { var i = _toPrimitive$2(t, "string"); return "symbol" == _typeof$2(i) ? i : i + ""; }
151
+ function _toPrimitive$2(t, r) { if ("object" != _typeof$2(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$2(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
152
+ var KustoCommandFormatter = /*#__PURE__*/_createClass$2(function KustoCommandFormatter(editor) {
153
153
  var _this = this;
154
- _classCallCheck$1(this, KustoCommandFormatter);
155
- _defineProperty$1(this, "actionAdded", false);
154
+ _classCallCheck$2(this, KustoCommandFormatter);
155
+ _defineProperty$2(this, "actionAdded", false);
156
156
  this.editor = editor;
157
157
  // selection also represents no selection - for example the event gets triggered when moving cursor from point
158
158
  // a to point b. in the case start position will equal end position.
@@ -181,6 +181,59 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
181
181
  });
182
182
  });
183
183
 
184
+ function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$1(o); }
185
+ function _classCallCheck$1(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
186
+ function _defineProperties$1(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$1(o.key), o); } }
187
+ function _createClass$1(e, r, t) { return r && _defineProperties$1(e.prototype, r), t && _defineProperties$1(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
188
+ function _defineProperty$1(e, r, t) { return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
189
+ function _toPropertyKey$1(t) { var i = _toPrimitive$1(t, "string"); return "symbol" == _typeof$1(i) ? i : i + ""; }
190
+ function _toPrimitive$1(t, r) { if ("object" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$1(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
191
+ /**
192
+ * Registers a Kusto-specific action to close the IntelliSense suggestions popup.
193
+ *
194
+ * Note:
195
+ * We register the action on the first cursor movement, not on editor creation,
196
+ * because Monaco fires 'onDidCreateEditor' before the keybinding service is fully initialized.
197
+ * Waiting for a cursor event guarantees that the editor is fully ready
198
+ * and allows safe registration of actions with keybindings.
199
+ */
200
+ var KustoIntelliSenseCloser = /*#__PURE__*/function () {
201
+ function KustoIntelliSenseCloser(editor) {
202
+ var _this = this;
203
+ _classCallCheck$1(this, KustoIntelliSenseCloser);
204
+ _defineProperty$1(this, "actionRegistered", false);
205
+ this.editor = editor;
206
+ this.editor.onDidChangeCursorSelection(function () {
207
+ var _this$editor$getModel;
208
+ if (((_this$editor$getModel = _this.editor.getModel()) === null || _this$editor$getModel === void 0 ? void 0 : _this$editor$getModel.getLanguageId()) !== 'kusto') {
209
+ return;
210
+ }
211
+ if (!_this.actionRegistered) {
212
+ _this.registerAction();
213
+ _this.actionRegistered = true;
214
+ }
215
+ });
216
+ }
217
+ return _createClass$1(KustoIntelliSenseCloser, [{
218
+ key: "registerAction",
219
+ value: function registerAction() {
220
+ var _this2 = this;
221
+ this.editor.addAction({
222
+ id: 'kusto.closeIntelliSense',
223
+ label: 'Close IntelliSense',
224
+ keybindings: [monaco__namespace.KeyMod.Shift | monaco__namespace.KeyCode.Enter],
225
+ run: function run(editor) {
226
+ return closeIntelliSense(_this2.editor);
227
+ }
228
+ });
229
+ }
230
+ }]);
231
+ }();
232
+ function closeIntelliSense(editor) {
233
+ var controller = editor.getContribution('editor.contrib.suggestController');
234
+ controller === null || controller === void 0 || controller.cancelSuggestWidget();
235
+ }
236
+
184
237
  var ThemeName = /*#__PURE__*/function (ThemeName) {
185
238
  ThemeName["light"] = "kusto-light";
186
239
  ThemeName["dark"] = "kusto-dark";
@@ -530,6 +583,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
530
583
  new KustoCommandHighlighter(editor);
531
584
  if (isStandaloneCodeEditor(editor)) {
532
585
  new KustoCommandFormatter(editor);
586
+ new KustoIntelliSenseCloser(editor);
533
587
  }
534
588
  triggerSuggestDialogWhenCompletionItemSelected(editor);
535
589
  });
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.0(8b9e3a800e91248ee7909ccf310acdea3bf37bc6)
3
+ * monaco-kusto version: 13.0.1(c583448ef85a6c5416f36c2d537eccb626b81aa8)
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-a00277a0', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/schema-9c3b6c78', ['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,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.0(8b9e3a800e91248ee7909ccf310acdea3bf37bc6)
3
+ * monaco-kusto version: 13.0.1(c583448ef85a6c5416f36c2d537eccb626b81aa8)
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/types-25df5473', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/types-ffd2d452', ['exports'], (function (exports) { 'use strict';
9
9
 
10
10
  var LANGUAGE_ID = 'kusto';
11
11
 
@@ -0,0 +1,17 @@
1
+ import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
2
+ /**
3
+ * Registers a Kusto-specific action to close the IntelliSense suggestions popup.
4
+ *
5
+ * Note:
6
+ * We register the action on the first cursor movement, not on editor creation,
7
+ * because Monaco fires 'onDidCreateEditor' before the keybinding service is fully initialized.
8
+ * Waiting for a cursor event guarantees that the editor is fully ready
9
+ * and allows safe registration of actions with keybindings.
10
+ */
11
+ export default class KustoIntelliSenseCloser {
12
+ private editor;
13
+ private actionRegistered;
14
+ constructor(editor: monaco.editor.IStandaloneCodeEditor);
15
+ private registerAction;
16
+ }
17
+ export declare function closeIntelliSense(editor: monaco.editor.IStandaloneCodeEditor): void;
@@ -0,0 +1,42 @@
1
+ import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
2
+ /**
3
+ * Registers a Kusto-specific action to close the IntelliSense suggestions popup.
4
+ *
5
+ * Note:
6
+ * We register the action on the first cursor movement, not on editor creation,
7
+ * because Monaco fires 'onDidCreateEditor' before the keybinding service is fully initialized.
8
+ * Waiting for a cursor event guarantees that the editor is fully ready
9
+ * and allows safe registration of actions with keybindings.
10
+ */
11
+ var KustoIntelliSenseCloser = /** @class */ (function () {
12
+ function KustoIntelliSenseCloser(editor) {
13
+ var _this = this;
14
+ this.editor = editor;
15
+ this.actionRegistered = false;
16
+ this.editor.onDidChangeCursorSelection(function () {
17
+ var _a;
18
+ if (((_a = _this.editor.getModel()) === null || _a === void 0 ? void 0 : _a.getLanguageId()) !== 'kusto') {
19
+ return;
20
+ }
21
+ if (!_this.actionRegistered) {
22
+ _this.registerAction();
23
+ _this.actionRegistered = true;
24
+ }
25
+ });
26
+ }
27
+ KustoIntelliSenseCloser.prototype.registerAction = function () {
28
+ var _this = this;
29
+ this.editor.addAction({
30
+ id: 'kusto.closeIntelliSense',
31
+ label: 'Close IntelliSense',
32
+ keybindings: [monaco.KeyMod.Shift | monaco.KeyCode.Enter],
33
+ run: function (editor) { return closeIntelliSense(_this.editor); },
34
+ });
35
+ };
36
+ return KustoIntelliSenseCloser;
37
+ }());
38
+ export default KustoIntelliSenseCloser;
39
+ export function closeIntelliSense(editor) {
40
+ var controller = editor.getContribution('editor.contrib.suggestController');
41
+ controller === null || controller === void 0 ? void 0 : controller.cancelSuggestWidget();
42
+ }
@@ -1,4 +1,4 @@
1
- import { getCurrentCommandRange } from './extendedEditor';
1
+ import { getCurrentCommandRange } from '../extendedEditor';
2
2
  /**
3
3
  * Highlights the command that surround cursor location
4
4
  */
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.0(8b9e3a800e91248ee7909ccf310acdea3bf37bc6)
3
+ * monaco-kusto version: 13.0.1(c583448ef85a6c5416f36c2d537eccb626b81aa8)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.0(8b9e3a800e91248ee7909ccf310acdea3bf37bc6)
3
+ * monaco-kusto version: 13.0.1(c583448ef85a6c5416f36c2d537eccb626b81aa8)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
@@ -8,7 +8,7 @@
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-9ec6976d.js';
11
+ import { d as getEntityDataTypeFromCslType, a as getCallName, b as getExpression, g as getCslTypeNameFromClrType } from './schema-4f17a725.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';
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.0(8b9e3a800e91248ee7909ccf310acdea3bf37bc6)
3
+ * monaco-kusto version: 13.0.1(c583448ef85a6c5416f36c2d537eccb626b81aa8)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
@@ -9,7 +9,7 @@ import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
9
9
  import { languages } from 'monaco-editor/esm/vs/editor/editor.api';
10
10
  import * as ls from 'vscode-languageserver-types';
11
11
  import debounce from 'lodash-es/debounce';
12
- import { L as LANGUAGE_ID, T as Token, t as tokenTypes } from './globals-34bd2c33.js';
12
+ import { L as LANGUAGE_ID, T as Token, t as tokenTypes } from './globals-a0d2077f.js';
13
13
 
14
14
  class WorkerManager {
15
15
  constructor(_monacoInstance, defaults) {
@@ -1,15 +1,15 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.0(8b9e3a800e91248ee7909ccf310acdea3bf37bc6)
3
+ * monaco-kusto version: 13.0.1(c583448ef85a6c5416f36c2d537eccb626b81aa8)
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
8
  import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
9
9
  import { editor } from 'monaco-editor/esm/vs/editor/editor.api';
10
- import { T as Token, L as LANGUAGE_ID } from './globals-34bd2c33.js';
11
- import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-9ec6976d.js';
12
- export { s as showSchema } from './schema-9ec6976d.js';
10
+ import { T as Token, L as LANGUAGE_ID } from './globals-a0d2077f.js';
11
+ import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-4f17a725.js';
12
+ export { s as showSchema } from './schema-4f17a725.js';
13
13
 
14
14
  function getCurrentCommandRange(editor, cursorPosition) {
15
15
  const zeroBasedCursorLineNumber = cursorPosition.lineNumber - 1;
@@ -139,6 +139,43 @@ class KustoCommandFormatter {
139
139
  }
140
140
  }
141
141
 
142
+ /**
143
+ * Registers a Kusto-specific action to close the IntelliSense suggestions popup.
144
+ *
145
+ * Note:
146
+ * We register the action on the first cursor movement, not on editor creation,
147
+ * because Monaco fires 'onDidCreateEditor' before the keybinding service is fully initialized.
148
+ * Waiting for a cursor event guarantees that the editor is fully ready
149
+ * and allows safe registration of actions with keybindings.
150
+ */
151
+ class KustoIntelliSenseCloser {
152
+ actionRegistered = false;
153
+ constructor(editor) {
154
+ this.editor = editor;
155
+ this.editor.onDidChangeCursorSelection(() => {
156
+ if (this.editor.getModel()?.getLanguageId() !== 'kusto') {
157
+ return;
158
+ }
159
+ if (!this.actionRegistered) {
160
+ this.registerAction();
161
+ this.actionRegistered = true;
162
+ }
163
+ });
164
+ }
165
+ registerAction() {
166
+ this.editor.addAction({
167
+ id: 'kusto.closeIntelliSense',
168
+ label: 'Close IntelliSense',
169
+ keybindings: [monaco.KeyMod.Shift | monaco.KeyCode.Enter],
170
+ run: editor => closeIntelliSense(this.editor)
171
+ });
172
+ }
173
+ }
174
+ function closeIntelliSense(editor) {
175
+ const controller = editor.getContribution('editor.contrib.suggestController');
176
+ controller?.cancelSuggestWidget();
177
+ }
178
+
142
179
  let ThemeName = /*#__PURE__*/function (ThemeName) {
143
180
  ThemeName["light"] = "kusto-light";
144
181
  ThemeName["dark"] = "kusto-dark";
@@ -454,6 +491,7 @@ monaco.editor.onDidCreateEditor(editor => {
454
491
  new KustoCommandHighlighter(editor);
455
492
  if (isStandaloneCodeEditor(editor)) {
456
493
  new KustoCommandFormatter(editor);
494
+ new KustoIntelliSenseCloser(editor);
457
495
  }
458
496
  triggerSuggestDialogWhenCompletionItemSelected(editor);
459
497
  });
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 13.0.0(8b9e3a800e91248ee7909ccf310acdea3bf37bc6)
3
+ * monaco-kusto version: 13.0.1(c583448ef85a6c5416f36c2d537eccb626b81aa8)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/