@gooddata/sdk-ui-metric-component 11.67.0-alpha.1 → 11.67.0-alpha.3
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/NOTICE +943 -2401
- package/esm/MaqlEditor/codemirror/CodeEditor.d.ts +52 -0
- package/esm/MaqlEditor/codemirror/CodeEditor.d.ts.map +1 -0
- package/esm/MaqlEditor/codemirror/CodeEditor.js +170 -0
- package/esm/MaqlEditor/codemirror/CodeEditor.styles.d.ts +95 -0
- package/esm/MaqlEditor/codemirror/CodeEditor.styles.d.ts.map +1 -0
- package/esm/MaqlEditor/codemirror/CodeEditor.styles.js +536 -0
- package/esm/MaqlEditor/codemirror/ContextMenu.d.ts +52 -0
- package/esm/MaqlEditor/codemirror/ContextMenu.d.ts.map +1 -0
- package/esm/MaqlEditor/codemirror/ContextMenu.js +204 -0
- package/esm/MaqlEditor/codemirror/baseExtensions.d.ts +22 -0
- package/esm/MaqlEditor/codemirror/baseExtensions.d.ts.map +1 -0
- package/esm/MaqlEditor/codemirror/baseExtensions.js +95 -0
- package/esm/MaqlEditor/codemirror/commands.d.ts +21 -0
- package/esm/MaqlEditor/codemirror/commands.d.ts.map +1 -0
- package/esm/MaqlEditor/codemirror/commands.js +98 -0
- package/esm/MaqlEditor/codemirror/hooks/useAutofocus.d.ts +7 -0
- package/esm/MaqlEditor/codemirror/hooks/useAutofocus.d.ts.map +1 -0
- package/esm/MaqlEditor/{monaco → codemirror}/hooks/useAutofocus.js +4 -0
- package/esm/MaqlEditor/codemirror/lsp.d.ts +28 -0
- package/esm/MaqlEditor/codemirror/lsp.d.ts.map +1 -0
- package/esm/MaqlEditor/codemirror/lsp.js +70 -0
- package/esm/MaqlEditor/codemirror/markdown.d.ts +11 -0
- package/esm/MaqlEditor/codemirror/markdown.d.ts.map +1 -0
- package/esm/MaqlEditor/codemirror/markdown.js +28 -0
- package/esm/MaqlEditor/codemirror/types.d.ts +8 -0
- package/esm/MaqlEditor/codemirror/types.d.ts.map +1 -0
- package/esm/MaqlEditor/codemirror/types.js +2 -0
- package/esm/MaqlEditor/hooks/useCodeTheme.d.ts +15 -2
- package/esm/MaqlEditor/hooks/useCodeTheme.d.ts.map +1 -1
- package/esm/MaqlEditor/hooks/useCodeTheme.js +36 -43
- package/esm/MaqlEditor/hooks/useCopyToClipboard.d.ts +7 -2
- package/esm/MaqlEditor/hooks/useCopyToClipboard.d.ts.map +1 -1
- package/esm/MaqlEditor/hooks/useCopyToClipboard.js +53 -10
- package/esm/MaqlEditor/maql/MaqlEditor.d.ts +25 -9
- package/esm/MaqlEditor/maql/MaqlEditor.d.ts.map +1 -1
- package/esm/MaqlEditor/maql/MaqlEditor.js +179 -30
- package/esm/MaqlEditor/maql/MaqlEditor.styles.d.ts.map +1 -1
- package/esm/MaqlEditor/maql/MaqlEditor.styles.js +13 -17
- package/esm/MaqlEditor/maql/MaqlEditor.tooltip.d.ts.map +1 -1
- package/esm/MaqlEditor/maql/MaqlEditor.tooltip.js +15 -20
- package/esm/MaqlEditor/maql/extensions/completion.d.ts +101 -0
- package/esm/MaqlEditor/maql/extensions/completion.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/extensions/completion.js +420 -0
- package/esm/MaqlEditor/maql/extensions/decorations.d.ts +19 -0
- package/esm/MaqlEditor/maql/extensions/decorations.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/extensions/decorations.js +137 -0
- package/esm/MaqlEditor/maql/extensions/formatting.d.ts +22 -0
- package/esm/MaqlEditor/maql/extensions/formatting.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/extensions/formatting.js +78 -0
- package/esm/MaqlEditor/maql/extensions/hover.d.ts +22 -0
- package/esm/MaqlEditor/maql/extensions/hover.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/extensions/hover.js +98 -0
- package/esm/MaqlEditor/maql/extensions/semanticTokens.d.ts +15 -0
- package/esm/MaqlEditor/maql/extensions/semanticTokens.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/extensions/semanticTokens.js +79 -0
- package/esm/MaqlEditor/maql/extensions/validation.d.ts +41 -0
- package/esm/MaqlEditor/maql/extensions/validation.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/extensions/validation.js +202 -0
- package/esm/MaqlEditor/maql/hooks/hover/doHover.d.ts +19 -4
- package/esm/MaqlEditor/maql/hooks/hover/doHover.d.ts.map +1 -1
- package/esm/MaqlEditor/maql/hooks/hover/doHover.js +71 -61
- package/esm/MaqlEditor/maql/maqlLanguage.d.ts +16 -0
- package/esm/MaqlEditor/maql/maqlLanguage.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/maqlLanguage.js +72 -0
- package/esm/MaqlEditor/mock/editor-shim.d.ts +7 -0
- package/esm/MaqlEditor/mock/editor-shim.d.ts.map +1 -0
- package/esm/MaqlEditor/mock/{monaco-shim.js → editor-shim.js} +27 -1
- package/esm/MaqlEditor/sql/SqlEditor.d.ts +15 -7
- package/esm/MaqlEditor/sql/SqlEditor.d.ts.map +1 -1
- package/esm/MaqlEditor/sql/SqlEditor.js +55 -30
- package/esm/MaqlEditor/sql/formatter.d.ts +6 -5
- package/esm/MaqlEditor/sql/formatter.d.ts.map +1 -1
- package/esm/MaqlEditor/sql/formatter.js +14 -14
- package/esm/MaqlEditor/sql/sqlLanguage.d.ts +3 -0
- package/esm/MaqlEditor/sql/sqlLanguage.d.ts.map +1 -0
- package/esm/MaqlEditor/sql/sqlLanguage.js +19 -0
- package/esm/MaqlEditor/statusBar/SuggestionStatusBar.d.ts +5 -2
- package/esm/MaqlEditor/statusBar/SuggestionStatusBar.d.ts.map +1 -1
- package/esm/MaqlEditor/statusBar/SuggestionStatusBar.js +20 -8
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorEditor.d.ts.map +1 -1
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorEditor.js +28 -27
- package/esm/MetricComponent/Form/MaqlEditorField/suggestionDetailsFunctions.d.ts +0 -1
- package/esm/MetricComponent/Form/MaqlEditorField/suggestionDetailsFunctions.d.ts.map +1 -1
- package/esm/MetricComponent/Form/MaqlEditorField/suggestionDetailsFunctions.js +4 -29
- package/esm/MetricComponent/Form/MaqlResult/MaqlSql.d.ts.map +1 -1
- package/esm/MetricComponent/Form/MaqlResult/MaqlSql.js +4 -2
- package/esm/MetricComponent/Form/maqlFieldFunctions.d.ts +2 -5
- package/esm/MetricComponent/Form/maqlFieldFunctions.d.ts.map +1 -1
- package/esm/MetricComponent/Form/maqlFieldFunctions.js +1 -4
- package/esm/index.d.ts +3 -3
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/sdk-ui-metric-component.d.ts +50 -39
- package/esm/shared/permissions.d.ts.map +1 -1
- package/esm/shared/permissions.js +1 -0
- package/esm/translations/en-US.json +36 -0
- package/package.json +33 -30
- package/esm/MaqlEditor/hooks/useAutoformat.d.ts +0 -3
- package/esm/MaqlEditor/hooks/useAutoformat.d.ts.map +0 -1
- package/esm/MaqlEditor/hooks/useAutoformat.js +0 -15
- package/esm/MaqlEditor/hooks/useCleanCallback.d.ts +0 -4
- package/esm/MaqlEditor/hooks/useCleanCallback.d.ts.map +0 -1
- package/esm/MaqlEditor/hooks/useCleanCallback.js +0 -12
- package/esm/MaqlEditor/hooks/useMountCallback.d.ts +0 -13
- package/esm/MaqlEditor/hooks/useMountCallback.d.ts.map +0 -1
- package/esm/MaqlEditor/hooks/useMountCallback.js +0 -26
- package/esm/MaqlEditor/hooks/useUpdateCallback.d.ts +0 -19
- package/esm/MaqlEditor/hooks/useUpdateCallback.d.ts.map +0 -1
- package/esm/MaqlEditor/hooks/useUpdateCallback.js +0 -63
- package/esm/MaqlEditor/hooks/useValueCallbacks.d.ts +0 -6
- package/esm/MaqlEditor/hooks/useValueCallbacks.d.ts.map +0 -1
- package/esm/MaqlEditor/hooks/useValueCallbacks.js +0 -14
- package/esm/MaqlEditor/maql/formatter.d.ts +0 -6
- package/esm/MaqlEditor/maql/formatter.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/formatter.js +0 -14
- package/esm/MaqlEditor/maql/hooks/hover/useHoverEvent.d.ts +0 -4
- package/esm/MaqlEditor/maql/hooks/hover/useHoverEvent.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/hooks/hover/useHoverEvent.js +0 -32
- package/esm/MaqlEditor/maql/hooks/useAutocomplete.d.ts +0 -4
- package/esm/MaqlEditor/maql/hooks/useAutocomplete.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/hooks/useAutocomplete.js +0 -60
- package/esm/MaqlEditor/maql/hooks/useDecoration.d.ts +0 -4
- package/esm/MaqlEditor/maql/hooks/useDecoration.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/hooks/useDecoration.js +0 -73
- package/esm/MaqlEditor/maql/hooks/useDocumentFormatting.d.ts +0 -3
- package/esm/MaqlEditor/maql/hooks/useDocumentFormatting.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/hooks/useDocumentFormatting.js +0 -29
- package/esm/MaqlEditor/maql/hooks/useHover.d.ts +0 -6
- package/esm/MaqlEditor/maql/hooks/useHover.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/hooks/useHover.js +0 -77
- package/esm/MaqlEditor/maql/hooks/useLanguageConfiguration.d.ts +0 -4
- package/esm/MaqlEditor/maql/hooks/useLanguageConfiguration.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/hooks/useLanguageConfiguration.js +0 -21
- package/esm/MaqlEditor/maql/hooks/useMonaco.d.ts +0 -21
- package/esm/MaqlEditor/maql/hooks/useMonaco.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/hooks/useMonaco.js +0 -75
- package/esm/MaqlEditor/maql/hooks/useSemanticHighlight.d.ts +0 -4
- package/esm/MaqlEditor/maql/hooks/useSemanticHighlight.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/hooks/useSemanticHighlight.js +0 -33
- package/esm/MaqlEditor/maql/hooks/useSyntaxHighlight.d.ts +0 -2
- package/esm/MaqlEditor/maql/hooks/useSyntaxHighlight.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/hooks/useSyntaxHighlight.js +0 -28
- package/esm/MaqlEditor/maql/hooks/useValidation.d.ts +0 -4
- package/esm/MaqlEditor/maql/hooks/useValidation.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/hooks/useValidation.js +0 -56
- package/esm/MaqlEditor/maql/monacoConverter.d.ts +0 -80
- package/esm/MaqlEditor/maql/monacoConverter.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/monacoConverter.js +0 -528
- package/esm/MaqlEditor/maql/utils.d.ts +0 -4
- package/esm/MaqlEditor/maql/utils.d.ts.map +0 -1
- package/esm/MaqlEditor/maql/utils.js +0 -6
- package/esm/MaqlEditor/mock/monaco-shim.d.ts +0 -5
- package/esm/MaqlEditor/mock/monaco-shim.d.ts.map +0 -1
- package/esm/MaqlEditor/monaco/MonacoEditor.d.ts +0 -64
- package/esm/MaqlEditor/monaco/MonacoEditor.d.ts.map +0 -1
- package/esm/MaqlEditor/monaco/MonacoEditor.js +0 -71
- package/esm/MaqlEditor/monaco/MonacoEditor.styles.d.ts +0 -53
- package/esm/MaqlEditor/monaco/MonacoEditor.styles.d.ts.map +0 -1
- package/esm/MaqlEditor/monaco/MonacoEditor.styles.js +0 -427
- package/esm/MaqlEditor/monaco/hooks/useAutofocus.d.ts +0 -3
- package/esm/MaqlEditor/monaco/hooks/useAutofocus.d.ts.map +0 -1
- package/esm/MaqlEditor/monaco/hooks/useDefaultValue.d.ts +0 -3
- package/esm/MaqlEditor/monaco/hooks/useDefaultValue.d.ts.map +0 -1
- package/esm/MaqlEditor/monaco/hooks/useDefaultValue.js +0 -14
- package/esm/MaqlEditor/monaco/hooks/useEditorInit.d.ts +0 -3
- package/esm/MaqlEditor/monaco/hooks/useEditorInit.d.ts.map +0 -1
- package/esm/MaqlEditor/monaco/hooks/useEditorInit.js +0 -84
- package/esm/MaqlEditor/monaco/hooks/useEditorOptions.d.ts +0 -3
- package/esm/MaqlEditor/monaco/hooks/useEditorOptions.d.ts.map +0 -1
- package/esm/MaqlEditor/monaco/hooks/useEditorOptions.js +0 -51
- package/esm/MaqlEditor/monaco/hooks/useMonaco.d.ts +0 -3
- package/esm/MaqlEditor/monaco/hooks/useMonaco.d.ts.map +0 -1
- package/esm/MaqlEditor/monaco/hooks/useMonaco.js +0 -24
- package/esm/MaqlEditor/monaco/monacoContributions.d.ts +0 -74
- package/esm/MaqlEditor/monaco/monacoContributions.d.ts.map +0 -1
- package/esm/MaqlEditor/monaco/monacoContributions.js +0 -88
- package/esm/MaqlEditor/monaco/monacoWorkers.d.ts +0 -53
- package/esm/MaqlEditor/monaco/monacoWorkers.d.ts.map +0 -1
- package/esm/MaqlEditor/monaco/monacoWorkers.js +0 -176
- package/esm/MaqlEditor/sql/hooks/useDocumentFormatting.d.ts +0 -2
- package/esm/MaqlEditor/sql/hooks/useDocumentFormatting.d.ts.map +0 -1
- package/esm/MaqlEditor/sql/hooks/useDocumentFormatting.js +0 -26
- package/esm/MaqlEditor/sql/hooks/useLanguageConfiguration.d.ts +0 -4
- package/esm/MaqlEditor/sql/hooks/useLanguageConfiguration.d.ts.map +0 -1
- package/esm/MaqlEditor/sql/hooks/useLanguageConfiguration.js +0 -29
- package/esm/MaqlEditor/sql/hooks/useMonaco.d.ts +0 -14
- package/esm/MaqlEditor/sql/hooks/useMonaco.d.ts.map +0 -1
- package/esm/MaqlEditor/sql/hooks/useMonaco.js +0 -26
- package/esm/MaqlEditor/sql/hooks/useSyntaxHighlight.d.ts +0 -2
- package/esm/MaqlEditor/sql/hooks/useSyntaxHighlight.d.ts.map +0 -1
- package/esm/MaqlEditor/sql/hooks/useSyntaxHighlight.js +0 -796
- package/esm/MaqlEditor/sql/utils.d.ts +0 -4
- package/esm/MaqlEditor/sql/utils.d.ts.map +0 -1
- package/esm/MaqlEditor/sql/utils.js +0 -6
- package/worker/monaco-editor-worker.js +0 -33
- package/worker/monaco-editor-worker.source.js +0 -1
|
@@ -1,528 +0,0 @@
|
|
|
1
|
-
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { Command, CompletionItemKind, CompletionItemLabelDetails, InsertReplaceEdit, InsertTextFormat, MarkupContent, MarkupKind, Range, } from "vscode-languageserver-types";
|
|
3
|
-
function isProtocolCompletionItem(item) {
|
|
4
|
-
return typeof item === "object" && item !== null && "data" in item;
|
|
5
|
-
}
|
|
6
|
-
function isRangeReplace(value) {
|
|
7
|
-
return value.insert !== undefined;
|
|
8
|
-
}
|
|
9
|
-
function isString(value) {
|
|
10
|
-
return typeof value === "string" || value instanceof String;
|
|
11
|
-
}
|
|
12
|
-
function isNumber(value) {
|
|
13
|
-
return typeof value === "number" || value instanceof Number;
|
|
14
|
-
}
|
|
15
|
-
function isStringArray(value) {
|
|
16
|
-
return Array.isArray(value) && value.every(isString);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Converts Monaco editor structures to the language server protocol ones.
|
|
20
|
-
*/
|
|
21
|
-
export class MonacoToProtocolConverter {
|
|
22
|
-
_monaco;
|
|
23
|
-
constructor(_monaco) {
|
|
24
|
-
this._monaco = _monaco;
|
|
25
|
-
}
|
|
26
|
-
asPosition(lineNumber, column) {
|
|
27
|
-
const line = lineNumber === undefined || lineNumber === null ? undefined : lineNumber - 1;
|
|
28
|
-
const character = column === undefined || column === null ? undefined : column - 1;
|
|
29
|
-
return { line, character };
|
|
30
|
-
}
|
|
31
|
-
asRange(range) {
|
|
32
|
-
if (range === undefined) {
|
|
33
|
-
return undefined;
|
|
34
|
-
}
|
|
35
|
-
if (range === null) {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
if (isRangeReplace(range)) {
|
|
39
|
-
return this.asRange(range.insert);
|
|
40
|
-
}
|
|
41
|
-
const start = this.asPosition(range.startLineNumber, range.startColumn);
|
|
42
|
-
const end = this.asPosition(range.endLineNumber, range.endColumn);
|
|
43
|
-
return { start, end };
|
|
44
|
-
}
|
|
45
|
-
asCompletionItem(item) {
|
|
46
|
-
const result = { label: item.label };
|
|
47
|
-
const protocolItem = isProtocolCompletionItem(item) ? item : undefined;
|
|
48
|
-
if (item.detail) {
|
|
49
|
-
result.detail = item.detail;
|
|
50
|
-
}
|
|
51
|
-
if (item.documentation) {
|
|
52
|
-
if (typeof item.documentation === "string") {
|
|
53
|
-
result.documentation = item.documentation;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
result.documentation = this.asDocumentation(protocolItem?.documentationFormat ?? MarkupKind.Markdown, item.documentation);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (item.filterText) {
|
|
60
|
-
result.filterText = item.filterText;
|
|
61
|
-
}
|
|
62
|
-
this.fillPrimaryInsertText(result, item);
|
|
63
|
-
if (isNumber(item.kind)) {
|
|
64
|
-
result.kind = this.asCompletionItemKind(item.kind, protocolItem?.originalItemKind);
|
|
65
|
-
}
|
|
66
|
-
if (item.sortText) {
|
|
67
|
-
result.sortText = item.sortText;
|
|
68
|
-
}
|
|
69
|
-
if (item.additionalTextEdits) {
|
|
70
|
-
result.additionalTextEdits = this.asTextEdits(item.additionalTextEdits);
|
|
71
|
-
}
|
|
72
|
-
if (item.commitCharacters) {
|
|
73
|
-
result.commitCharacters = item.commitCharacters.slice();
|
|
74
|
-
}
|
|
75
|
-
if (item.command) {
|
|
76
|
-
result.command = this.asCommand(item.command);
|
|
77
|
-
}
|
|
78
|
-
if (item.preselect === true || item.preselect === false) {
|
|
79
|
-
result.preselect = item.preselect;
|
|
80
|
-
}
|
|
81
|
-
if (protocolItem) {
|
|
82
|
-
if (protocolItem.data !== undefined) {
|
|
83
|
-
result.data = protocolItem.data;
|
|
84
|
-
}
|
|
85
|
-
if (protocolItem.deprecated === true || protocolItem.deprecated === false) {
|
|
86
|
-
result.deprecated = protocolItem.deprecated;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (item.tags) {
|
|
90
|
-
result.tags = item.tags.slice();
|
|
91
|
-
}
|
|
92
|
-
return result;
|
|
93
|
-
}
|
|
94
|
-
asFormattingOptions(options) {
|
|
95
|
-
return { tabSize: options.tabSize, insertSpaces: options.insertSpaces };
|
|
96
|
-
}
|
|
97
|
-
asTextEdit(edit) {
|
|
98
|
-
return {
|
|
99
|
-
range: this.asRange(edit.range),
|
|
100
|
-
newText: edit.text || "",
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
asTextEdits(items) {
|
|
104
|
-
if (!items) {
|
|
105
|
-
return undefined;
|
|
106
|
-
}
|
|
107
|
-
return items.map((item) => this.asTextEdit(item));
|
|
108
|
-
}
|
|
109
|
-
asCommand(item) {
|
|
110
|
-
if (item) {
|
|
111
|
-
const args = item.arguments || [];
|
|
112
|
-
return Command.create(item.title, item.id, ...args);
|
|
113
|
-
}
|
|
114
|
-
return undefined;
|
|
115
|
-
}
|
|
116
|
-
asCompletionItemKind(value, original) {
|
|
117
|
-
if (original !== undefined) {
|
|
118
|
-
return original;
|
|
119
|
-
}
|
|
120
|
-
const kinds = this._monaco.languages.CompletionItemKind;
|
|
121
|
-
switch (value) {
|
|
122
|
-
case kinds.Method:
|
|
123
|
-
return CompletionItemKind.Method;
|
|
124
|
-
case kinds.Function:
|
|
125
|
-
return CompletionItemKind.Function;
|
|
126
|
-
case kinds.Constructor:
|
|
127
|
-
return CompletionItemKind.Constructor;
|
|
128
|
-
case kinds.Field:
|
|
129
|
-
return CompletionItemKind.Field;
|
|
130
|
-
case kinds.Variable:
|
|
131
|
-
return CompletionItemKind.Variable;
|
|
132
|
-
case kinds.Class:
|
|
133
|
-
return CompletionItemKind.Class;
|
|
134
|
-
case kinds.Struct:
|
|
135
|
-
return CompletionItemKind.Struct;
|
|
136
|
-
case kinds.Interface:
|
|
137
|
-
return CompletionItemKind.Interface;
|
|
138
|
-
case kinds.Module:
|
|
139
|
-
return CompletionItemKind.Module;
|
|
140
|
-
case kinds.Property:
|
|
141
|
-
return CompletionItemKind.Property;
|
|
142
|
-
case kinds.Event:
|
|
143
|
-
return CompletionItemKind.Event;
|
|
144
|
-
case kinds.Operator:
|
|
145
|
-
return CompletionItemKind.Operator;
|
|
146
|
-
case kinds.Unit:
|
|
147
|
-
return CompletionItemKind.Unit;
|
|
148
|
-
case kinds.Value:
|
|
149
|
-
return CompletionItemKind.Value;
|
|
150
|
-
case kinds.Constant:
|
|
151
|
-
return CompletionItemKind.Constant;
|
|
152
|
-
case kinds.Enum:
|
|
153
|
-
return CompletionItemKind.Enum;
|
|
154
|
-
case kinds.EnumMember:
|
|
155
|
-
return CompletionItemKind.EnumMember;
|
|
156
|
-
case kinds.Keyword:
|
|
157
|
-
return CompletionItemKind.Keyword;
|
|
158
|
-
case kinds.Text:
|
|
159
|
-
return CompletionItemKind.Text;
|
|
160
|
-
case kinds.Color:
|
|
161
|
-
return CompletionItemKind.Color;
|
|
162
|
-
case kinds.File:
|
|
163
|
-
return CompletionItemKind.File;
|
|
164
|
-
case kinds.Reference:
|
|
165
|
-
return CompletionItemKind.Reference;
|
|
166
|
-
case kinds.Customcolor:
|
|
167
|
-
return CompletionItemKind.Color;
|
|
168
|
-
case kinds.Folder:
|
|
169
|
-
return CompletionItemKind.Folder;
|
|
170
|
-
case kinds.TypeParameter:
|
|
171
|
-
return CompletionItemKind.TypeParameter;
|
|
172
|
-
case kinds.Snippet:
|
|
173
|
-
return CompletionItemKind.Snippet;
|
|
174
|
-
default:
|
|
175
|
-
return (value + 1);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
asDocumentation(format, documentation) {
|
|
179
|
-
switch (format) {
|
|
180
|
-
case MarkupKind.PlainText:
|
|
181
|
-
return { kind: format, value: documentation };
|
|
182
|
-
case MarkupKind.Markdown:
|
|
183
|
-
return { kind: format, value: documentation.value };
|
|
184
|
-
default:
|
|
185
|
-
return `Unsupported Markup content received. Kind is: ${format}`;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
fillPrimaryInsertText(target, source) {
|
|
189
|
-
// insertTextRules is a bit set; the snippet flag is tested with a bitmask, as upstream does.
|
|
190
|
-
const snippetRule = this._monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet;
|
|
191
|
-
const hasSnippetRule = source.insertTextRules !== undefined && (source.insertTextRules & snippetRule) !== 0;
|
|
192
|
-
const format = source.insertTextRules !== undefined && !hasSnippetRule
|
|
193
|
-
? InsertTextFormat.Snippet
|
|
194
|
-
: InsertTextFormat.PlainText;
|
|
195
|
-
target.insertTextFormat = format;
|
|
196
|
-
const text = source.insertText;
|
|
197
|
-
const range = source.range ? this.asRange(source.range) : undefined;
|
|
198
|
-
if (source.fromEdit && text && range) {
|
|
199
|
-
target.textEdit = { newText: text, range };
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
target.insertText = text;
|
|
203
|
-
}
|
|
204
|
-
target.insertTextMode = source.insertTextMode;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Converts language server protocol structures to the Monaco editor ones.
|
|
209
|
-
*/
|
|
210
|
-
export class ProtocolToMonacoConverter {
|
|
211
|
-
_monaco;
|
|
212
|
-
constructor(_monaco) {
|
|
213
|
-
this._monaco = _monaco;
|
|
214
|
-
}
|
|
215
|
-
asTextEdit(edit) {
|
|
216
|
-
return {
|
|
217
|
-
range: this.asRange(edit.range),
|
|
218
|
-
text: edit.newText,
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
asTextEdits(items) {
|
|
222
|
-
if (!items) {
|
|
223
|
-
return undefined;
|
|
224
|
-
}
|
|
225
|
-
return items.map((item) => this.asTextEdit(item));
|
|
226
|
-
}
|
|
227
|
-
asCommand(command) {
|
|
228
|
-
if (!command) {
|
|
229
|
-
return undefined;
|
|
230
|
-
}
|
|
231
|
-
return {
|
|
232
|
-
id: command.command,
|
|
233
|
-
title: command.title,
|
|
234
|
-
arguments: command.arguments,
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
asHover(hover) {
|
|
238
|
-
if (!hover) {
|
|
239
|
-
return undefined;
|
|
240
|
-
}
|
|
241
|
-
return {
|
|
242
|
-
contents: this.asHoverContent(hover.contents),
|
|
243
|
-
range: this.asRange(hover.range),
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
asHoverContent(contents) {
|
|
247
|
-
if (Array.isArray(contents)) {
|
|
248
|
-
return contents.map((content) => this.asMarkdownString(content));
|
|
249
|
-
}
|
|
250
|
-
return [this.asMarkdownString(contents)];
|
|
251
|
-
}
|
|
252
|
-
asDocumentation(value) {
|
|
253
|
-
if (isString(value)) {
|
|
254
|
-
return value;
|
|
255
|
-
}
|
|
256
|
-
if (value.kind === MarkupKind.PlainText) {
|
|
257
|
-
return value.value;
|
|
258
|
-
}
|
|
259
|
-
return this.asMarkdownString(value);
|
|
260
|
-
}
|
|
261
|
-
asMarkdownString(content) {
|
|
262
|
-
if (MarkupContent.is(content)) {
|
|
263
|
-
return { value: content.value };
|
|
264
|
-
}
|
|
265
|
-
if (isString(content)) {
|
|
266
|
-
return { value: content };
|
|
267
|
-
}
|
|
268
|
-
const { language, value } = content;
|
|
269
|
-
return { value: "```" + language + "\n" + value + "\n```" };
|
|
270
|
-
}
|
|
271
|
-
asSeverity(severity) {
|
|
272
|
-
if (severity === 1) {
|
|
273
|
-
return this._monaco.MarkerSeverity.Error;
|
|
274
|
-
}
|
|
275
|
-
if (severity === 2) {
|
|
276
|
-
return this._monaco.MarkerSeverity.Warning;
|
|
277
|
-
}
|
|
278
|
-
if (severity === 3) {
|
|
279
|
-
return this._monaco.MarkerSeverity.Info;
|
|
280
|
-
}
|
|
281
|
-
return this._monaco.MarkerSeverity.Hint;
|
|
282
|
-
}
|
|
283
|
-
asDiagnostics(diagnostics) {
|
|
284
|
-
if (!diagnostics) {
|
|
285
|
-
return undefined;
|
|
286
|
-
}
|
|
287
|
-
return diagnostics.map((diagnostic) => this.asDiagnostic(diagnostic));
|
|
288
|
-
}
|
|
289
|
-
asDiagnostic(diagnostic) {
|
|
290
|
-
return {
|
|
291
|
-
code: typeof diagnostic.code === "number" ? diagnostic.code.toString() : diagnostic.code,
|
|
292
|
-
severity: this.asSeverity(diagnostic.severity),
|
|
293
|
-
message: diagnostic.message,
|
|
294
|
-
source: diagnostic.source,
|
|
295
|
-
startLineNumber: diagnostic.range.start.line + 1,
|
|
296
|
-
startColumn: diagnostic.range.start.character + 1,
|
|
297
|
-
endLineNumber: diagnostic.range.end.line + 1,
|
|
298
|
-
endColumn: diagnostic.range.end.character + 1,
|
|
299
|
-
relatedInformation: this.asRelatedInformations(diagnostic.relatedInformation),
|
|
300
|
-
tags: diagnostic.tags,
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
asRelatedInformations(relatedInformation) {
|
|
304
|
-
if (!relatedInformation) {
|
|
305
|
-
return undefined;
|
|
306
|
-
}
|
|
307
|
-
return relatedInformation.map((item) => this.asRelatedInformation(item));
|
|
308
|
-
}
|
|
309
|
-
asRelatedInformation(relatedInformation) {
|
|
310
|
-
return {
|
|
311
|
-
resource: this._monaco.Uri.parse(relatedInformation.location.uri),
|
|
312
|
-
startLineNumber: relatedInformation.location.range.start.line + 1,
|
|
313
|
-
startColumn: relatedInformation.location.range.start.character + 1,
|
|
314
|
-
endLineNumber: relatedInformation.location.range.end.line + 1,
|
|
315
|
-
endColumn: relatedInformation.location.range.end.character + 1,
|
|
316
|
-
message: relatedInformation.message,
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
asCompletionResult(result, defaultMonacoRange) {
|
|
320
|
-
if (!result) {
|
|
321
|
-
return { incomplete: false, suggestions: [] };
|
|
322
|
-
}
|
|
323
|
-
if (Array.isArray(result)) {
|
|
324
|
-
return {
|
|
325
|
-
incomplete: false,
|
|
326
|
-
suggestions: result.map((item) => this.asCompletionItem(item, defaultMonacoRange)),
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
const defaultRange = this.getCompletionItemDefaultRange(result);
|
|
330
|
-
return {
|
|
331
|
-
incomplete: result.isIncomplete,
|
|
332
|
-
suggestions: result.items.map((item) => this.asCompletionItem(item, defaultMonacoRange, defaultRange, result.itemDefaults)),
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
asCompletionItem(item, defaultMonacoRange, defaultRange, itemDefaults) {
|
|
336
|
-
const result = { label: this.asCompletionItemLabel(item) };
|
|
337
|
-
if (item.detail) {
|
|
338
|
-
result.detail = item.detail;
|
|
339
|
-
}
|
|
340
|
-
if (item.documentation) {
|
|
341
|
-
result.documentation = this.asDocumentation(item.documentation);
|
|
342
|
-
result.documentationFormat = isString(item.documentation) ? undefined : item.documentation.kind;
|
|
343
|
-
}
|
|
344
|
-
if (item.filterText) {
|
|
345
|
-
result.filterText = item.filterText;
|
|
346
|
-
}
|
|
347
|
-
const insertText = this.asCompletionInsertText(item, defaultRange, itemDefaults?.insertTextFormat);
|
|
348
|
-
result.insertText = insertText.insertText;
|
|
349
|
-
result.range = insertText.range ?? defaultMonacoRange;
|
|
350
|
-
result.fromEdit = insertText.fromEdit;
|
|
351
|
-
if (insertText.isSnippet) {
|
|
352
|
-
result.insertTextRules = this._monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet;
|
|
353
|
-
}
|
|
354
|
-
if (isNumber(item.kind)) {
|
|
355
|
-
const [itemKind, original] = this.asCompletionItemKind(item.kind);
|
|
356
|
-
result.kind = itemKind;
|
|
357
|
-
if (original) {
|
|
358
|
-
result.originalItemKind = original;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
if (item.sortText) {
|
|
362
|
-
result.sortText = item.sortText;
|
|
363
|
-
}
|
|
364
|
-
if (item.additionalTextEdits) {
|
|
365
|
-
result.additionalTextEdits = this.asTextEdits(item.additionalTextEdits);
|
|
366
|
-
}
|
|
367
|
-
if (isStringArray(item.commitCharacters)) {
|
|
368
|
-
result.commitCharacters = item.commitCharacters.slice();
|
|
369
|
-
}
|
|
370
|
-
if (item.command) {
|
|
371
|
-
result.command = this.asCommand(item.command);
|
|
372
|
-
}
|
|
373
|
-
if (item.deprecated === true || item.deprecated === false) {
|
|
374
|
-
result.deprecated = item.deprecated;
|
|
375
|
-
}
|
|
376
|
-
if (item.preselect === true || item.preselect === false) {
|
|
377
|
-
result.preselect = item.preselect;
|
|
378
|
-
}
|
|
379
|
-
const data = item.data ?? itemDefaults?.data;
|
|
380
|
-
if (data !== undefined) {
|
|
381
|
-
result.data = data;
|
|
382
|
-
}
|
|
383
|
-
const insertTextMode = item.insertTextMode ?? itemDefaults?.insertTextMode;
|
|
384
|
-
if (insertTextMode) {
|
|
385
|
-
result.insertTextMode = insertTextMode;
|
|
386
|
-
}
|
|
387
|
-
if (item.tags) {
|
|
388
|
-
result.tags = item.tags;
|
|
389
|
-
}
|
|
390
|
-
return result;
|
|
391
|
-
}
|
|
392
|
-
getCompletionItemDefaultRange(list) {
|
|
393
|
-
const rangeDefaults = list.itemDefaults?.editRange;
|
|
394
|
-
if (Range.is(rangeDefaults)) {
|
|
395
|
-
return this.asRange(rangeDefaults);
|
|
396
|
-
}
|
|
397
|
-
return rangeDefaults === undefined
|
|
398
|
-
? undefined
|
|
399
|
-
: { insert: this.asRange(rangeDefaults.insert), replace: this.asRange(rangeDefaults.replace) };
|
|
400
|
-
}
|
|
401
|
-
asCompletionItemLabel(item) {
|
|
402
|
-
if (CompletionItemLabelDetails.is(item.labelDetails)) {
|
|
403
|
-
return {
|
|
404
|
-
label: item.label,
|
|
405
|
-
detail: item.labelDetails.detail,
|
|
406
|
-
description: item.labelDetails.description,
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
return item.label;
|
|
410
|
-
}
|
|
411
|
-
asCompletionItemKind(value) {
|
|
412
|
-
const kinds = this._monaco.languages.CompletionItemKind;
|
|
413
|
-
if (CompletionItemKind.Text <= value && value <= CompletionItemKind.TypeParameter) {
|
|
414
|
-
switch (value) {
|
|
415
|
-
case CompletionItemKind.Text:
|
|
416
|
-
return [kinds.Text, undefined];
|
|
417
|
-
case CompletionItemKind.Method:
|
|
418
|
-
return [kinds.Method, undefined];
|
|
419
|
-
case CompletionItemKind.Function:
|
|
420
|
-
return [kinds.Function, undefined];
|
|
421
|
-
case CompletionItemKind.Constructor:
|
|
422
|
-
return [kinds.Constructor, undefined];
|
|
423
|
-
case CompletionItemKind.Field:
|
|
424
|
-
return [kinds.Field, undefined];
|
|
425
|
-
case CompletionItemKind.Variable:
|
|
426
|
-
return [kinds.Variable, undefined];
|
|
427
|
-
case CompletionItemKind.Class:
|
|
428
|
-
return [kinds.Class, undefined];
|
|
429
|
-
case CompletionItemKind.Interface:
|
|
430
|
-
return [kinds.Interface, undefined];
|
|
431
|
-
case CompletionItemKind.Module:
|
|
432
|
-
return [kinds.Module, undefined];
|
|
433
|
-
case CompletionItemKind.Property:
|
|
434
|
-
return [kinds.Property, undefined];
|
|
435
|
-
case CompletionItemKind.Unit:
|
|
436
|
-
return [kinds.Unit, undefined];
|
|
437
|
-
case CompletionItemKind.Value:
|
|
438
|
-
return [kinds.Value, undefined];
|
|
439
|
-
case CompletionItemKind.Enum:
|
|
440
|
-
return [kinds.Enum, undefined];
|
|
441
|
-
case CompletionItemKind.Keyword:
|
|
442
|
-
return [kinds.Keyword, undefined];
|
|
443
|
-
case CompletionItemKind.Snippet:
|
|
444
|
-
return [kinds.Snippet, undefined];
|
|
445
|
-
case CompletionItemKind.Color:
|
|
446
|
-
return [kinds.Color, undefined];
|
|
447
|
-
case CompletionItemKind.File:
|
|
448
|
-
return [kinds.File, undefined];
|
|
449
|
-
case CompletionItemKind.Reference:
|
|
450
|
-
return [kinds.Reference, undefined];
|
|
451
|
-
case CompletionItemKind.Folder:
|
|
452
|
-
return [kinds.Folder, undefined];
|
|
453
|
-
case CompletionItemKind.EnumMember:
|
|
454
|
-
return [kinds.EnumMember, undefined];
|
|
455
|
-
case CompletionItemKind.Constant:
|
|
456
|
-
return [kinds.Constant, undefined];
|
|
457
|
-
case CompletionItemKind.Struct:
|
|
458
|
-
return [kinds.Struct, undefined];
|
|
459
|
-
case CompletionItemKind.Event:
|
|
460
|
-
return [kinds.Event, undefined];
|
|
461
|
-
case CompletionItemKind.Operator:
|
|
462
|
-
return [kinds.Operator, undefined];
|
|
463
|
-
case CompletionItemKind.TypeParameter:
|
|
464
|
-
return [kinds.TypeParameter, undefined];
|
|
465
|
-
default:
|
|
466
|
-
return [value - 1, undefined];
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
return [CompletionItemKind.Text, value];
|
|
470
|
-
}
|
|
471
|
-
asCompletionInsertText(item, defaultRange, defaultInsertTextFormat) {
|
|
472
|
-
const insertTextFormat = item.insertTextFormat ?? defaultInsertTextFormat;
|
|
473
|
-
const isSnippet = insertTextFormat === InsertTextFormat.Snippet;
|
|
474
|
-
if (item.textEdit !== undefined || defaultRange !== undefined) {
|
|
475
|
-
const [range, newText] = item.textEdit === undefined
|
|
476
|
-
? [defaultRange, item.textEditText ?? item.label]
|
|
477
|
-
: this.getCompletionRangeAndText(item.textEdit);
|
|
478
|
-
return { insertText: newText, range, fromEdit: true, isSnippet };
|
|
479
|
-
}
|
|
480
|
-
if (item.insertText) {
|
|
481
|
-
return { isSnippet, insertText: item.insertText, fromEdit: false, range: defaultRange };
|
|
482
|
-
}
|
|
483
|
-
return { insertText: item.label, range: defaultRange, fromEdit: false, isSnippet: false };
|
|
484
|
-
}
|
|
485
|
-
getCompletionRangeAndText(value) {
|
|
486
|
-
if (InsertReplaceEdit.is(value)) {
|
|
487
|
-
return [
|
|
488
|
-
{ insert: this.asRange(value.insert), replace: this.asRange(value.replace) },
|
|
489
|
-
value.newText,
|
|
490
|
-
];
|
|
491
|
-
}
|
|
492
|
-
return [this.asRange(value.range), value.newText];
|
|
493
|
-
}
|
|
494
|
-
asRange(range) {
|
|
495
|
-
if (range === undefined) {
|
|
496
|
-
return undefined;
|
|
497
|
-
}
|
|
498
|
-
if (range === null) {
|
|
499
|
-
return null;
|
|
500
|
-
}
|
|
501
|
-
const start = this.asPosition(range.start);
|
|
502
|
-
const end = this.asPosition(range.end);
|
|
503
|
-
if (start instanceof this._monaco.Position && end instanceof this._monaco.Position) {
|
|
504
|
-
return new this._monaco.Range(start.lineNumber, start.column, end.lineNumber, end.column);
|
|
505
|
-
}
|
|
506
|
-
return {
|
|
507
|
-
startLineNumber: start?.lineNumber,
|
|
508
|
-
startColumn: start?.column,
|
|
509
|
-
endLineNumber: end?.lineNumber,
|
|
510
|
-
endColumn: end?.column,
|
|
511
|
-
};
|
|
512
|
-
}
|
|
513
|
-
asPosition(position) {
|
|
514
|
-
if (position === undefined) {
|
|
515
|
-
return undefined;
|
|
516
|
-
}
|
|
517
|
-
if (position === null) {
|
|
518
|
-
return null;
|
|
519
|
-
}
|
|
520
|
-
const { line, character } = position;
|
|
521
|
-
const lineNumber = line === undefined ? undefined : line + 1;
|
|
522
|
-
const column = character === undefined ? undefined : character + 1;
|
|
523
|
-
if (lineNumber !== undefined && column !== undefined) {
|
|
524
|
-
return new this._monaco.Position(lineNumber, column);
|
|
525
|
-
}
|
|
526
|
-
return { lineNumber, column };
|
|
527
|
-
}
|
|
528
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { TextDocument } from "vscode-languageserver-textdocument";
|
|
2
|
-
import { type IReadOnlyModel, type Range } from "../monaco/MonacoEditor.js";
|
|
3
|
-
export declare function createDocument(model: IReadOnlyModel, range?: Range): TextDocument;
|
|
4
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/maql/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAG5E,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,YAAY,CAOjF"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import { TextDocument } from "vscode-languageserver-textdocument";
|
|
3
|
-
const MODEL_URI = "inmemory://model.maql";
|
|
4
|
-
export function createDocument(model, range) {
|
|
5
|
-
return TextDocument.create(MODEL_URI, model.getLanguageId(), model.getVersionId(), range ? model.getValueInRange(range) : model.getValue());
|
|
6
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monaco-shim.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/mock/monaco-shim.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAmCrC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { type Ref } from "react";
|
|
2
|
-
import type * as monaco from "monaco-editor/editor/editor.api.js";
|
|
3
|
-
import { type IMaqlEditorIcons } from "./MonacoEditor.styles.js";
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
export type Monaco = typeof monaco;
|
|
8
|
-
export interface IMonacoEditorProps {
|
|
9
|
-
inline?: boolean;
|
|
10
|
-
readonly?: boolean;
|
|
11
|
-
options?: Partial<IStandaloneEditorConstructionOptions>;
|
|
12
|
-
icons?: IMaqlEditorIcons;
|
|
13
|
-
autofocus?: boolean;
|
|
14
|
-
className?: string;
|
|
15
|
-
language?: string;
|
|
16
|
-
languageConfiguration?: monaco.languages.LanguageConfiguration;
|
|
17
|
-
defaultValue?: string;
|
|
18
|
-
themeName?: string;
|
|
19
|
-
themeData?: IStandaloneThemeData;
|
|
20
|
-
onEditorMount?: (editor: IStandaloneCodeEditor, monaco: Monaco) => void;
|
|
21
|
-
onEditorUpdate?: (editor: IStandaloneCodeEditor, monaco: Monaco) => void;
|
|
22
|
-
onContentSizeChange?: (editor: IStandaloneCodeEditor, monaco: Monaco, width: number, height: number) => void;
|
|
23
|
-
heightOffset?: number;
|
|
24
|
-
ref?: Ref<IStandaloneCodeEditor | null>;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
export type IDisposable = monaco.IDisposable;
|
|
30
|
-
/**
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
export type IStandaloneCodeEditor = monaco.editor.IStandaloneCodeEditor;
|
|
34
|
-
/**
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
37
|
-
export type IStandaloneEditorConstructionOptions = monaco.editor.IStandaloneEditorConstructionOptions;
|
|
38
|
-
/**
|
|
39
|
-
* @internal
|
|
40
|
-
*/
|
|
41
|
-
export type IEditorContribution = monaco.editor.IEditorContribution;
|
|
42
|
-
export type IStandaloneThemeData = monaco.editor.IStandaloneThemeData;
|
|
43
|
-
export type IMarkerData = monaco.editor.IMarkerData;
|
|
44
|
-
export type IReadOnlyModel = monaco.editor.IReadOnlyModel;
|
|
45
|
-
export type FormattingOptions = monaco.languages.FormattingOptions;
|
|
46
|
-
export type Range = monaco.Range;
|
|
47
|
-
export type ISuggestContribution = IEditorContribution & {
|
|
48
|
-
widget: {
|
|
49
|
-
value: {
|
|
50
|
-
onDidShow: (handler: () => void) => void;
|
|
51
|
-
onDidHide: (handler: () => void) => void;
|
|
52
|
-
element: {
|
|
53
|
-
domNode: HTMLElement;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
export type IMarkersContribution = IEditorContribution & {
|
|
59
|
-
close(focusEditor?: boolean): void;
|
|
60
|
-
};
|
|
61
|
-
export declare const MainClass = "maql-editor";
|
|
62
|
-
export declare const MainClassContent = "maql-editor-content";
|
|
63
|
-
export declare const MonacoEditor: import("react").ForwardRefExoticComponent<Omit<IMonacoEditorProps, "ref"> & import("react").RefAttributes<monaco.editor.IStandaloneCodeEditor | null>>;
|
|
64
|
-
//# sourceMappingURL=MonacoEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MonacoEditor.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/monaco/MonacoEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,GAAG,EAA0D,MAAM,OAAO,CAAC;AAGzF,OAAO,KAAK,KAAK,MAAM,MAAM,oCAAoC,CAAC;AAOlE,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,0BAA0B,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC;AAEnC,MAAM,WAAW,kBAAkB;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC,oCAAoC,CAAC,CAAC;IACxD,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,qBAAqB,CAAC;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,mBAAmB,CAAC,EAAE,CAClB,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,KACb,IAAI,CAAC;IACV,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,GAAG,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,MAAM,CAAC,MAAM,CAAC,oCAAoC,CAAC;AAEtG;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC;AACpE,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC;AACtE,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC;AACpD,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,SAAS,CAAC,iBAAiB,CAAC;AACnE,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AACjC,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG;IACrD,MAAM,EAAE;QACJ,KAAK,EAAE;YACH,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;YACzC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;YACzC,OAAO,EAAE;gBACL,OAAO,EAAE,WAAW,CAAC;aACxB,CAAC;SACL,CAAC;KACL,CAAC;CACL,CAAC;AACF,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG;IACrD,KAAK,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACtC,CAAC;AAmBF,eAAO,MAAM,SAAS,gBAAgB,CAAC;AACvC,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD,eAAO,MAAM,YAAY,wJAwDxB,CAAC"}
|