@fc-components/monaco-editor 0.1.15 → 0.1.16

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.
@@ -12,7 +12,6 @@ var monacoPromql = require('monaco-promql');
12
12
  var lezerMetricsql = require('@fc-components/lezer-metricsql');
13
13
  var uuid = require('uuid');
14
14
  var css = require('@emotion/css');
15
- var UFuzzy = _interopDefault(require('@leeoniya/ufuzzy'));
16
15
 
17
16
  function _arrayLikeToArray(r, a) {
18
17
  (null == a || a > r.length) && (a = r.length);
@@ -1493,24 +1492,23 @@ function notEmpty(value) {
1493
1492
  return value !== null && value !== undefined;
1494
1493
  }
1495
1494
 
1496
- var metricNamesSearchClient = /*#__PURE__*/new UFuzzy({
1497
- intraMode: 1
1498
- });
1495
+ // const metricNamesSearchClient = new UFuzzy({ intraMode: 1 });
1499
1496
  // we order items like: history, functions, metrics
1500
1497
  function getAllMetricNamesCompletions(dataProvider) {
1501
1498
  var metricNames = dataProvider.getAllMetricNames();
1502
- if (metricNames.length > dataProvider.metricNamesSuggestionLimit) {
1503
- var monacoSettings = dataProvider.monacoSettings;
1504
- monacoSettings.enableAutocompleteSuggestionsUpdate();
1505
- if (monacoSettings.inputInRange) {
1506
- var _metricNamesSearchCli, _metricNamesSearchCli2;
1507
- metricNames = (_metricNamesSearchCli = (_metricNamesSearchCli2 = metricNamesSearchClient.filter(metricNames, monacoSettings.inputInRange)) == null ? void 0 : _metricNamesSearchCli2.slice(0, dataProvider.metricNamesSuggestionLimit).map(function (idx) {
1508
- return metricNames[idx];
1509
- })) != null ? _metricNamesSearchCli : [];
1510
- } else {
1511
- metricNames = metricNames.slice(0, dataProvider.metricNamesSuggestionLimit);
1512
- }
1513
- }
1499
+ // if (metricNames.length > dataProvider.metricNamesSuggestionLimit) {
1500
+ // const { monacoSettings } = dataProvider;
1501
+ // monacoSettings.enableAutocompleteSuggestionsUpdate();
1502
+ // if (monacoSettings.inputInRange) {
1503
+ // metricNames =
1504
+ // metricNamesSearchClient
1505
+ // .filter(metricNames, monacoSettings.inputInRange)
1506
+ // ?.slice(0, dataProvider.metricNamesSuggestionLimit)
1507
+ // .map((idx) => metricNames[idx]) ?? [];
1508
+ // } else {
1509
+ // metricNames = metricNames.slice(0, dataProvider.metricNamesSuggestionLimit);
1510
+ // }
1511
+ // }
1514
1512
  return dataProvider.metricNamesToMetrics(metricNames).map(function (metric) {
1515
1513
  return {
1516
1514
  type: 'METRIC_NAME',
@@ -1734,7 +1732,7 @@ function _getLabelValues() {
1734
1732
  }
1735
1733
  return _context6.a(3, 7);
1736
1734
  case 6:
1737
- if (key === labelName) {
1735
+ if (key === labelName && value) {
1738
1736
  labelValues.add(value);
1739
1737
  }
1740
1738
  case 7: