@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.
- package/dist/monaco-editor.cjs.development.js +15 -17
- package/dist/monaco-editor.cjs.development.js.map +1 -1
- package/dist/monaco-editor.cjs.production.min.js +1 -1
- package/dist/monaco-editor.cjs.production.min.js.map +1 -1
- package/dist/monaco-editor.esm.js +15 -17
- package/dist/monaco-editor.esm.js.map +1 -1
- package/dist/promql/completion/DataProvider.d.ts +1 -1
- package/package.json +1 -1
- package/src/promql/completion/DataProvider.ts +2 -1
- package/src/promql/completion/completions.ts +17 -17
|
@@ -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
|
-
|
|
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
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
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:
|