@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,71 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2021-2026 GoodData Corporation
|
|
3
|
-
import { forwardRef, useCallback, useImperativeHandle, useState } from "react";
|
|
4
|
-
import classNames from "classnames";
|
|
5
|
-
//more info in README.md
|
|
6
|
-
import { makeStyles } from "../theme/styles.js";
|
|
7
|
-
import { useAutofocus } from "./hooks/useAutofocus.js";
|
|
8
|
-
import { useMonaco } from "./hooks/useMonaco.js";
|
|
9
|
-
import { MonacoStyles } from "./MonacoEditor.styles.js";
|
|
10
|
-
const useStyles = makeStyles()(() => ({
|
|
11
|
-
editor: {
|
|
12
|
-
display: "flex",
|
|
13
|
-
position: "relative",
|
|
14
|
-
textAlign: "initial",
|
|
15
|
-
width: "100%",
|
|
16
|
-
height: "100%",
|
|
17
|
-
},
|
|
18
|
-
inline: {
|
|
19
|
-
width: "100%",
|
|
20
|
-
height: "100%",
|
|
21
|
-
},
|
|
22
|
-
content: {
|
|
23
|
-
width: "100%",
|
|
24
|
-
},
|
|
25
|
-
}));
|
|
26
|
-
export const MainClass = "maql-editor";
|
|
27
|
-
export const MainClassContent = "maql-editor-content";
|
|
28
|
-
export const MonacoEditor = forwardRef(function MonacoEditor({ icons, options, autofocus = false, className = "", language = "", languageConfiguration, defaultValue = "", themeName = "", themeData, onEditorMount = () => { }, onEditorUpdate = () => { }, inline = false, readonly = false, }, ref) {
|
|
29
|
-
const [element, setElement] = useState(null);
|
|
30
|
-
const [uniqueId] = useState(`${MainClassContent}-${Math.random().toString(36).slice(2)}`);
|
|
31
|
-
const { width, height, onContentSizeChange } = useContentSize(inline);
|
|
32
|
-
const editor = useMonaco(element, {
|
|
33
|
-
className: [MainClass, className].join(" "),
|
|
34
|
-
options,
|
|
35
|
-
language,
|
|
36
|
-
languageConfiguration,
|
|
37
|
-
defaultValue,
|
|
38
|
-
themeName,
|
|
39
|
-
themeData,
|
|
40
|
-
inline,
|
|
41
|
-
readonly,
|
|
42
|
-
onEditorMount,
|
|
43
|
-
onEditorUpdate,
|
|
44
|
-
onContentSizeChange,
|
|
45
|
-
});
|
|
46
|
-
useImperativeHandle(ref, () => editor, [
|
|
47
|
-
editor,
|
|
48
|
-
]);
|
|
49
|
-
const { classes } = useStyles();
|
|
50
|
-
useAutofocus(element, editor, autofocus || false);
|
|
51
|
-
return (_jsxs("section", { id: uniqueId, className: classNames(classes.editor, MainClassContent, inline && classes.inline), style: getStyles(width, height, inline), children: [_jsx(MonacoStyles, { id: uniqueId, icons: icons, themeData: themeData, options: options }), _jsx("div", { ref: (ref) => setElement(ref), className: classes.content })] }));
|
|
52
|
-
});
|
|
53
|
-
function useContentSize(inline) {
|
|
54
|
-
const [height, setHeight] = useState(0);
|
|
55
|
-
const [width, setWidth] = useState(0);
|
|
56
|
-
const onContentSizeChange = useCallback(
|
|
57
|
-
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
58
|
-
(...[, , currentWidth, currentHeight]) => {
|
|
59
|
-
if (inline) {
|
|
60
|
-
setWidth(currentWidth);
|
|
61
|
-
setHeight(currentHeight);
|
|
62
|
-
}
|
|
63
|
-
}, [inline]);
|
|
64
|
-
return { width, height, onContentSizeChange };
|
|
65
|
-
}
|
|
66
|
-
function getStyles(width, height, inline) {
|
|
67
|
-
if (inline && width > 0 && height > 0) {
|
|
68
|
-
return { height, width };
|
|
69
|
-
}
|
|
70
|
-
return {};
|
|
71
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type * as monaco from "monaco-editor/editor/editor.api.js";
|
|
2
|
-
import { type IStandaloneEditorConstructionOptions } from "./MonacoEditor.js";
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export interface IMaqlEditorIcon {
|
|
7
|
-
base64: string;
|
|
8
|
-
width?: number;
|
|
9
|
-
height?: number;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export interface IMaqlEditorIcons {
|
|
15
|
-
fact?: IMaqlEditorIcon;
|
|
16
|
-
metric?: IMaqlEditorIcon;
|
|
17
|
-
dataset?: IMaqlEditorIcon;
|
|
18
|
-
label?: IMaqlEditorIcon;
|
|
19
|
-
attribute?: IMaqlEditorIcon;
|
|
20
|
-
keyword?: IMaqlEditorIcon;
|
|
21
|
-
function?: IMaqlEditorIcon;
|
|
22
|
-
detail?: IMaqlEditorIcon;
|
|
23
|
-
next?: IMaqlEditorIcon;
|
|
24
|
-
prev?: IMaqlEditorIcon;
|
|
25
|
-
close?: IMaqlEditorIcon;
|
|
26
|
-
}
|
|
27
|
-
export declare const DecoratorHovered = "hovered-decorator";
|
|
28
|
-
export declare const DecoratorClassName = "decorator";
|
|
29
|
-
export declare const DecoratorItemClassName = "decorator-item";
|
|
30
|
-
type Decorators = {
|
|
31
|
-
[key: string]: {
|
|
32
|
-
decoratorItem: Array<string>;
|
|
33
|
-
decorator: Array<string>;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export declare const DecoratorFact = "fact";
|
|
37
|
-
export declare const DecoratorAttribute = "attribute";
|
|
38
|
-
export declare const DecoratorDateAttribute = "dateAttribute";
|
|
39
|
-
export declare const DecoratorComputedAttribute = "computedAttribute";
|
|
40
|
-
export declare const DecoratorLabel = "label";
|
|
41
|
-
export declare const DecoratorDateLabel = "dateLabel";
|
|
42
|
-
export declare const DecoratorMetric = "metric";
|
|
43
|
-
export declare const DecoratorDataset = "dataset";
|
|
44
|
-
export declare const DecoratorParameter = "parameter";
|
|
45
|
-
export declare const Decorators: Decorators;
|
|
46
|
-
export declare function MonacoStyles({ id, icons, themeData, options, }: {
|
|
47
|
-
id: string;
|
|
48
|
-
icons?: IMaqlEditorIcons;
|
|
49
|
-
themeData?: monaco.editor.IStandaloneThemeData;
|
|
50
|
-
options?: Partial<IStandaloneEditorConstructionOptions>;
|
|
51
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
export {};
|
|
53
|
-
//# sourceMappingURL=MonacoEditor.styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MonacoEditor.styles.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/monaco/MonacoEditor.styles.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,oCAAoC,CAAC;AAMlE,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,mBAAmB,CAAC;AAI9E;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AACpD,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAC9C,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AAEvD,KAAK,UAAU,GAAG;IACd,CAAC,GAAG,EAAE,MAAM,GAAG;QACX,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7B,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;KAC5B,CAAC;CACL,CAAC;AACF,eAAO,MAAM,aAAa,SAAS,CAAC;AACpC,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAC9C,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AACtD,eAAO,MAAM,0BAA0B,sBAAsB,CAAC;AAC9D,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAC9C,eAAO,MAAM,eAAe,WAAW,CAAC;AACxC,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAC9C,eAAO,MAAM,UAAU,EAAE,UAyCxB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EACzB,EAAE,EACF,KAAK,EACL,SAAS,EACT,OAAY,GACf,EAAE;IACC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC,oCAAoC,CAAC,CAAC;CAC3D,2CAIA"}
|
|
@@ -1,427 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2021-2026 GoodData Corporation
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
import { GlobalStyles } from "tss-react";
|
|
5
|
-
import { makeStyles } from "../theme/styles.js";
|
|
6
|
-
const useStyles = makeStyles()(() => ({}));
|
|
7
|
-
export const DecoratorHovered = "hovered-decorator";
|
|
8
|
-
export const DecoratorClassName = "decorator";
|
|
9
|
-
export const DecoratorItemClassName = "decorator-item";
|
|
10
|
-
export const DecoratorFact = "fact";
|
|
11
|
-
export const DecoratorAttribute = "attribute";
|
|
12
|
-
export const DecoratorDateAttribute = "dateAttribute";
|
|
13
|
-
export const DecoratorComputedAttribute = "computedAttribute";
|
|
14
|
-
export const DecoratorLabel = "label";
|
|
15
|
-
export const DecoratorDateLabel = "dateLabel";
|
|
16
|
-
export const DecoratorMetric = "metric";
|
|
17
|
-
export const DecoratorDataset = "dataset";
|
|
18
|
-
export const DecoratorParameter = "parameter";
|
|
19
|
-
export const Decorators = {
|
|
20
|
-
[DecoratorFact]: {
|
|
21
|
-
decoratorItem: [DecoratorItemClassName, DecoratorFact],
|
|
22
|
-
decorator: [DecoratorClassName, DecoratorFact],
|
|
23
|
-
},
|
|
24
|
-
[DecoratorAttribute]: {
|
|
25
|
-
decoratorItem: [DecoratorItemClassName, DecoratorAttribute],
|
|
26
|
-
decorator: [DecoratorClassName, DecoratorAttribute],
|
|
27
|
-
},
|
|
28
|
-
[DecoratorDateAttribute]: {
|
|
29
|
-
decoratorItem: [DecoratorItemClassName, DecoratorDateAttribute],
|
|
30
|
-
decorator: [DecoratorClassName, DecoratorDateAttribute],
|
|
31
|
-
},
|
|
32
|
-
[DecoratorComputedAttribute]: {
|
|
33
|
-
decoratorItem: [DecoratorItemClassName, DecoratorComputedAttribute],
|
|
34
|
-
decorator: [DecoratorClassName, DecoratorComputedAttribute],
|
|
35
|
-
},
|
|
36
|
-
[DecoratorLabel]: {
|
|
37
|
-
decoratorItem: [DecoratorItemClassName, DecoratorLabel],
|
|
38
|
-
decorator: [DecoratorClassName, DecoratorLabel],
|
|
39
|
-
},
|
|
40
|
-
[DecoratorDateLabel]: {
|
|
41
|
-
decoratorItem: [DecoratorItemClassName, DecoratorDateLabel],
|
|
42
|
-
decorator: [DecoratorClassName, DecoratorDateLabel],
|
|
43
|
-
},
|
|
44
|
-
[DecoratorMetric]: {
|
|
45
|
-
decoratorItem: [DecoratorItemClassName, DecoratorMetric],
|
|
46
|
-
decorator: [DecoratorClassName, DecoratorMetric],
|
|
47
|
-
},
|
|
48
|
-
[DecoratorDataset]: {
|
|
49
|
-
decoratorItem: [DecoratorItemClassName, DecoratorDataset],
|
|
50
|
-
decorator: [DecoratorClassName, DecoratorDataset],
|
|
51
|
-
},
|
|
52
|
-
[DecoratorParameter]: {
|
|
53
|
-
decoratorItem: [DecoratorItemClassName, DecoratorParameter],
|
|
54
|
-
decorator: [DecoratorClassName, DecoratorParameter],
|
|
55
|
-
},
|
|
56
|
-
default: {
|
|
57
|
-
decoratorItem: [DecoratorItemClassName, "unknown"],
|
|
58
|
-
decorator: [DecoratorClassName, "unknown"],
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
export function MonacoStyles({ id, icons, themeData, options = {}, }) {
|
|
62
|
-
const styles = useMonacoStyles(id, options, icons, themeData);
|
|
63
|
-
return _jsx(GlobalStyles, { styles: styles });
|
|
64
|
-
}
|
|
65
|
-
const linePaddingLeft = 16;
|
|
66
|
-
function useMonacoStyles(id, _options, icons, themeData) {
|
|
67
|
-
const { theme } = useStyles();
|
|
68
|
-
return useMemo(() => {
|
|
69
|
-
const customIcon = {
|
|
70
|
-
display: "block",
|
|
71
|
-
};
|
|
72
|
-
const editorLines = {
|
|
73
|
-
".lines-content": {
|
|
74
|
-
paddingLeft: `${linePaddingLeft}px`,
|
|
75
|
-
},
|
|
76
|
-
textarea: {
|
|
77
|
-
marginLeft: `${linePaddingLeft + 1}px`,
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
const editor = {
|
|
81
|
-
".bracket-match": {
|
|
82
|
-
backgroundColor: theme.content.colors.bracketMatch,
|
|
83
|
-
border: "none",
|
|
84
|
-
},
|
|
85
|
-
".monaco-scrollable-element": {
|
|
86
|
-
borderLeft: "none",
|
|
87
|
-
},
|
|
88
|
-
".line-numbers": {
|
|
89
|
-
color: theme.content.colors.lineNumber,
|
|
90
|
-
},
|
|
91
|
-
".active-line-number.line-numbers": {
|
|
92
|
-
color: theme.content.colors.activeLineNumber,
|
|
93
|
-
},
|
|
94
|
-
".monaco-scrollable-element > .scrollbar > .slider ": {
|
|
95
|
-
background: theme.content.colors.slider,
|
|
96
|
-
"&:hover": {
|
|
97
|
-
background: theme.content.colors.sliderHover,
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
".codicon-folding-expanded, .codicon-folding-collapsed": {
|
|
101
|
-
width: "16px !important",
|
|
102
|
-
height: "16px !important",
|
|
103
|
-
margin: "3px 0 !important",
|
|
104
|
-
fontSize: "100%",
|
|
105
|
-
},
|
|
106
|
-
...editorLines,
|
|
107
|
-
};
|
|
108
|
-
const suggestionWidget = {
|
|
109
|
-
".suggest-widget": {
|
|
110
|
-
height: "auto !important",
|
|
111
|
-
boxShadow: theme.suggestion.shadow,
|
|
112
|
-
borderColor: `${theme.suggestion.colors.line} !important`,
|
|
113
|
-
".monaco-list .monaco-list-row": {
|
|
114
|
-
fontFamily: theme.suggestion.font,
|
|
115
|
-
background: theme.suggestion.colors.background,
|
|
116
|
-
color: theme.globals.colors.font,
|
|
117
|
-
fontSize: `${theme.suggestion.item.fontSize}px !important`,
|
|
118
|
-
".label-name": {
|
|
119
|
-
"&:hover, &:focus, &:active": {
|
|
120
|
-
textDecoration: "none",
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
"&.focused, &.selected, &.focused:hover, &.selected:hover": {
|
|
124
|
-
background: theme.suggestion.colors.selectedBackground,
|
|
125
|
-
color: theme.globals.colors.font,
|
|
126
|
-
},
|
|
127
|
-
"&:hover:not(.selected):not(.focused)": {
|
|
128
|
-
background: `${theme.suggestion.colors.selectedBackground} !important`,
|
|
129
|
-
color: theme.globals.colors.font,
|
|
130
|
-
},
|
|
131
|
-
".monaco-highlighted-label .highlight, &.focused .monaco-highlighted-label .highlight": {
|
|
132
|
-
background: theme.suggestion.colors.highlightedBackground,
|
|
133
|
-
color: theme.globals.colors.font,
|
|
134
|
-
},
|
|
135
|
-
"&.focused .readMore": {
|
|
136
|
-
display: "inline-block !important",
|
|
137
|
-
visibility: "visible !important",
|
|
138
|
-
"&[aria-hidden='true']": {
|
|
139
|
-
display: "none !important",
|
|
140
|
-
},
|
|
141
|
-
"&:before": {
|
|
142
|
-
padding: "3px 0",
|
|
143
|
-
display: "block",
|
|
144
|
-
backgroundPosition: "center",
|
|
145
|
-
...createIconDefinition(icons?.detail),
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
"&.focused:hover .details-label, &.focused .details-label": {
|
|
149
|
-
width: "calc(100% - 32px) !important",
|
|
150
|
-
},
|
|
151
|
-
"& > .contents": {
|
|
152
|
-
paddingLeft: "10px",
|
|
153
|
-
},
|
|
154
|
-
".details-label": {
|
|
155
|
-
fontSize: `${theme.suggestion.label.fontSize}px`,
|
|
156
|
-
fontFamily: theme.globals.font,
|
|
157
|
-
color: theme.suggestion.colors.active,
|
|
158
|
-
},
|
|
159
|
-
".suggest-icon": {
|
|
160
|
-
marginRight: "5px",
|
|
161
|
-
"&.codicon-symbol-field:before": {
|
|
162
|
-
...customIcon,
|
|
163
|
-
...createIconDefinition(icons?.fact),
|
|
164
|
-
},
|
|
165
|
-
"&.codicon-symbol-variable:before": {
|
|
166
|
-
...customIcon,
|
|
167
|
-
...createIconDefinition(icons?.metric),
|
|
168
|
-
},
|
|
169
|
-
"&.codicon-symbol-constant:before": {
|
|
170
|
-
...customIcon,
|
|
171
|
-
...createIconDefinition(icons?.dataset),
|
|
172
|
-
},
|
|
173
|
-
"&.codicon-symbol-text:before": {
|
|
174
|
-
...customIcon,
|
|
175
|
-
...createIconDefinition(icons?.label),
|
|
176
|
-
},
|
|
177
|
-
"&.codicon-symbol-enum:before": {
|
|
178
|
-
...customIcon,
|
|
179
|
-
...createIconDefinition(icons?.attribute),
|
|
180
|
-
},
|
|
181
|
-
"&.codicon-symbol-keyword:before": {
|
|
182
|
-
...customIcon,
|
|
183
|
-
...createIconDefinition(icons?.keyword),
|
|
184
|
-
},
|
|
185
|
-
"&.codicon-symbol-function:before": {
|
|
186
|
-
...customIcon,
|
|
187
|
-
...createIconDefinition(icons?.function),
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
};
|
|
193
|
-
const suggestionsDetails = {
|
|
194
|
-
".suggest-details": {
|
|
195
|
-
fontFamily: theme.globals.font,
|
|
196
|
-
minHeight: `${2 * theme.detail.padding + theme.detail.header.size}px`,
|
|
197
|
-
borderColor: `${theme.detail.colors.border} !important`,
|
|
198
|
-
boxShadow: `0 1px 20px ${theme.globals.colors.shadow}`,
|
|
199
|
-
".monaco-scrollable-element .body": {
|
|
200
|
-
color: theme.globals.colors.font,
|
|
201
|
-
background: theme.detail.colors.background,
|
|
202
|
-
padding: `${theme.detail.padding}px`,
|
|
203
|
-
".header": {
|
|
204
|
-
fontSize: `${theme.detail.header.fontSize}px`,
|
|
205
|
-
lineHeight: `${theme.detail.header.lineHeight}px`,
|
|
206
|
-
color: theme.detail.colors.header,
|
|
207
|
-
".codicon-close": {
|
|
208
|
-
width: "auto !important",
|
|
209
|
-
height: "auto !important",
|
|
210
|
-
fontFamily: theme.detail.header.close.font,
|
|
211
|
-
fontSize: `${theme.detail.header.close.size}px`,
|
|
212
|
-
top: `${theme.detail.padding}px`,
|
|
213
|
-
right: `${theme.detail.padding}px`,
|
|
214
|
-
"&::before": {
|
|
215
|
-
content: '"\\e62d"',
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
p: {
|
|
219
|
-
margin: `0 ${theme.detail.padding * 2}px 0 0`,
|
|
220
|
-
padding: 0,
|
|
221
|
-
},
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
};
|
|
226
|
-
const decorators = Object.keys(Decorators).reduce((prev, name) => {
|
|
227
|
-
const item = Decorators[name];
|
|
228
|
-
prev[`.${item.decorator.join(".")}`] = {
|
|
229
|
-
background: themeData?.colors[`editor.variable.${name}.background`] ?? "#cecece",
|
|
230
|
-
color: themeData?.colors[`editor.variable.${name}.color`] ?? "#7e7e7e",
|
|
231
|
-
...theme.decorator,
|
|
232
|
-
};
|
|
233
|
-
prev[`.${item.decoratorItem.join(".")}`] = {
|
|
234
|
-
color: themeData?.colors[`editor.variable.${name}.color`] ?? "#000000",
|
|
235
|
-
};
|
|
236
|
-
return prev;
|
|
237
|
-
}, {});
|
|
238
|
-
const errorsView = {
|
|
239
|
-
".zone-widget-container.peekview-widget": {
|
|
240
|
-
borderTopWidth: `${theme.errorsBar.border.topWidth}px !important`,
|
|
241
|
-
borderTopColor: `${theme.errorsBar.colors.error} !important`,
|
|
242
|
-
borderBottomColor: `${theme.errorsBar.colors.error} !important`,
|
|
243
|
-
left: theme.errorsBar.left,
|
|
244
|
-
width: `calc(100% - ${theme.errorsBar.left}px)`,
|
|
245
|
-
background: `${theme.errorsBar.colors.bodyBackground} !important`,
|
|
246
|
-
".head": {
|
|
247
|
-
background: `${theme.errorsBar.colors.headBackground} !important`,
|
|
248
|
-
".peekview-title": {
|
|
249
|
-
marginLeft: `${theme.errorsBar.paddingHorizontal}px !important`,
|
|
250
|
-
},
|
|
251
|
-
".filename": {
|
|
252
|
-
display: "none",
|
|
253
|
-
},
|
|
254
|
-
".dirname": {
|
|
255
|
-
fontSize: `${theme.errorsBar.sizes.headerFontSize}px !important`,
|
|
256
|
-
lineHeight: `${theme.errorsBar.sizes.lineHeight}px !important`,
|
|
257
|
-
fontFamily: theme.errorsBar.font,
|
|
258
|
-
color: `${theme.errorsBar.colors.font} !important`,
|
|
259
|
-
},
|
|
260
|
-
},
|
|
261
|
-
".body": {
|
|
262
|
-
borderColor: `${theme.errorsBar.colors.error} !important`,
|
|
263
|
-
background: `${theme.errorsBar.colors.bodyBackground} !important`,
|
|
264
|
-
".monaco-scrollable-element": {
|
|
265
|
-
border: "none !important",
|
|
266
|
-
width: "auto !important",
|
|
267
|
-
".descriptioncontainer": {
|
|
268
|
-
paddingLeft: `${theme.errorsBar.paddingHorizontal}px !important`,
|
|
269
|
-
paddingRight: `${theme.errorsBar.paddingHorizontal}px !important`,
|
|
270
|
-
paddingTop: `${theme.errorsBar.paddingVertical}px !important`,
|
|
271
|
-
},
|
|
272
|
-
},
|
|
273
|
-
".message": {
|
|
274
|
-
fontFamily: `${theme.errorsBar.font} !important`,
|
|
275
|
-
fontSize: `${theme.errorsBar.sizes.bodyFontSize}px !important`,
|
|
276
|
-
color: `${theme.errorsBar.colors.body} !important`,
|
|
277
|
-
"& > div::first-letter": {
|
|
278
|
-
textTransform: "uppercase",
|
|
279
|
-
},
|
|
280
|
-
},
|
|
281
|
-
},
|
|
282
|
-
".codicon-marker-navigation-next:before": {
|
|
283
|
-
...customIcon,
|
|
284
|
-
...createIconDefinition(icons?.next),
|
|
285
|
-
},
|
|
286
|
-
".codicon-marker-navigation-previous:before": {
|
|
287
|
-
...customIcon,
|
|
288
|
-
...createIconDefinition(icons?.prev),
|
|
289
|
-
},
|
|
290
|
-
".codicon-close:before": {
|
|
291
|
-
...customIcon,
|
|
292
|
-
...createIconDefinition(icons?.close),
|
|
293
|
-
},
|
|
294
|
-
},
|
|
295
|
-
};
|
|
296
|
-
const hoverView = {
|
|
297
|
-
".monaco-hover": {
|
|
298
|
-
border: theme.hoverBar.border,
|
|
299
|
-
borderRadius: theme.hoverBar.sizes.borderRadius,
|
|
300
|
-
background: theme.hoverBar.colors.background,
|
|
301
|
-
boxShadow: theme.hoverBar.boxShadow,
|
|
302
|
-
fontFamily: theme.hoverBar.font,
|
|
303
|
-
".monaco-scrollable-element": {
|
|
304
|
-
border: "none !important",
|
|
305
|
-
},
|
|
306
|
-
".monaco-hover-content": {
|
|
307
|
-
".hover-row": {
|
|
308
|
-
borderTop: "none !important",
|
|
309
|
-
".marker.hover-contents": {
|
|
310
|
-
fontFamily: `${theme.hoverBar.font} !important`,
|
|
311
|
-
margin: theme.hoverBar.margin,
|
|
312
|
-
padding: theme.hoverBar.padding,
|
|
313
|
-
borderRadius: theme.hoverBar.sizes.borderRadiusInner,
|
|
314
|
-
background: theme.hoverBar.colors.errorBackground,
|
|
315
|
-
color: theme.hoverBar.colors.errorText,
|
|
316
|
-
fontSize: `${theme.hoverBar.sizes.font}px !important`,
|
|
317
|
-
"&::first-letter": {
|
|
318
|
-
textTransform: "uppercase",
|
|
319
|
-
},
|
|
320
|
-
},
|
|
321
|
-
},
|
|
322
|
-
".hover-row.status-bar": {
|
|
323
|
-
display: "none",
|
|
324
|
-
},
|
|
325
|
-
},
|
|
326
|
-
},
|
|
327
|
-
};
|
|
328
|
-
const hoverDecorator = {
|
|
329
|
-
[`.${DecoratorHovered}`]: {
|
|
330
|
-
background: `${theme.hoverMetric.colors.hover} !important`,
|
|
331
|
-
...theme.decorator,
|
|
332
|
-
},
|
|
333
|
-
};
|
|
334
|
-
return {
|
|
335
|
-
[`#${id} .monaco-editor.vs`]: {
|
|
336
|
-
...editor,
|
|
337
|
-
...suggestionWidget,
|
|
338
|
-
...suggestionsDetails,
|
|
339
|
-
...decorators,
|
|
340
|
-
...hoverDecorator,
|
|
341
|
-
...errorsView,
|
|
342
|
-
...hoverView,
|
|
343
|
-
},
|
|
344
|
-
};
|
|
345
|
-
}, [
|
|
346
|
-
id,
|
|
347
|
-
icons?.attribute,
|
|
348
|
-
icons?.detail,
|
|
349
|
-
icons?.fact,
|
|
350
|
-
icons?.function,
|
|
351
|
-
icons?.keyword,
|
|
352
|
-
icons?.label,
|
|
353
|
-
icons?.metric,
|
|
354
|
-
icons?.dataset,
|
|
355
|
-
icons?.next,
|
|
356
|
-
icons?.prev,
|
|
357
|
-
icons?.close,
|
|
358
|
-
theme.content.colors.activeLineNumber,
|
|
359
|
-
theme.content.colors.lineNumber,
|
|
360
|
-
theme.content.colors.slider,
|
|
361
|
-
theme.content.colors.sliderHover,
|
|
362
|
-
theme.content.colors.bracketMatch,
|
|
363
|
-
theme.detail.colors.background,
|
|
364
|
-
theme.detail.colors.border,
|
|
365
|
-
theme.detail.colors.header,
|
|
366
|
-
theme.detail.header.close.font,
|
|
367
|
-
theme.detail.header.close.size,
|
|
368
|
-
theme.detail.header.fontSize,
|
|
369
|
-
theme.detail.header.lineHeight,
|
|
370
|
-
theme.detail.header.size,
|
|
371
|
-
theme.detail.padding,
|
|
372
|
-
theme.globals.colors.font,
|
|
373
|
-
theme.globals.colors.shadow,
|
|
374
|
-
theme.globals.font,
|
|
375
|
-
theme.suggestion.colors.active,
|
|
376
|
-
theme.suggestion.colors.background,
|
|
377
|
-
theme.suggestion.colors.highlightedBackground,
|
|
378
|
-
theme.suggestion.colors.line,
|
|
379
|
-
theme.suggestion.colors.selectedBackground,
|
|
380
|
-
theme.suggestion.font,
|
|
381
|
-
theme.suggestion.item.fontSize,
|
|
382
|
-
theme.suggestion.label.fontSize,
|
|
383
|
-
theme.suggestion.shadow,
|
|
384
|
-
theme.errorsBar.colors.error,
|
|
385
|
-
theme.errorsBar.colors.headBackground,
|
|
386
|
-
theme.errorsBar.colors.bodyBackground,
|
|
387
|
-
theme.errorsBar.colors.font,
|
|
388
|
-
theme.errorsBar.colors.body,
|
|
389
|
-
theme.errorsBar.border.topWidth,
|
|
390
|
-
theme.errorsBar.sizes.lineHeight,
|
|
391
|
-
theme.errorsBar.sizes.headerFontSize,
|
|
392
|
-
theme.errorsBar.sizes.bodyFontSize,
|
|
393
|
-
theme.errorsBar.left,
|
|
394
|
-
theme.errorsBar.font,
|
|
395
|
-
theme.errorsBar.paddingHorizontal,
|
|
396
|
-
theme.errorsBar.paddingVertical,
|
|
397
|
-
theme.hoverBar.border,
|
|
398
|
-
theme.hoverBar.sizes.borderRadius,
|
|
399
|
-
theme.hoverBar.colors.background,
|
|
400
|
-
theme.hoverBar.boxShadow,
|
|
401
|
-
theme.hoverBar.font,
|
|
402
|
-
theme.hoverBar.margin,
|
|
403
|
-
theme.hoverBar.padding,
|
|
404
|
-
theme.hoverBar.sizes.borderRadiusInner,
|
|
405
|
-
theme.hoverBar.sizes.font,
|
|
406
|
-
theme.hoverBar.colors.errorBackground,
|
|
407
|
-
theme.hoverBar.colors.errorText,
|
|
408
|
-
theme.hoverMetric.colors.hover,
|
|
409
|
-
theme.decorator,
|
|
410
|
-
themeData?.colors,
|
|
411
|
-
]);
|
|
412
|
-
}
|
|
413
|
-
function createIconDefinition(icon) {
|
|
414
|
-
const def = {};
|
|
415
|
-
if (icon) {
|
|
416
|
-
def["content"] = '""';
|
|
417
|
-
def["backgroundImage"] = `url("data:image/svg+xml;base64,${icon.base64}")`;
|
|
418
|
-
def["backgroundRepeat"] = "no-repeat";
|
|
419
|
-
if (icon.width) {
|
|
420
|
-
def["width"] = `${icon.width}px`;
|
|
421
|
-
}
|
|
422
|
-
if (icon.height) {
|
|
423
|
-
def["height"] = `${icon.height}px`;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
return def;
|
|
427
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAutofocus.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/monaco/hooks/useAutofocus.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,wBAAgB,YAAY,CACxB,OAAO,EAAE,cAAc,GAAG,IAAI,EAC9B,MAAM,EAAE,qBAAqB,GAAG,IAAI,EACpC,SAAS,EAAE,OAAO,GACnB,IAAI,CAgBN"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDefaultValue.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/monaco/hooks/useDefaultValue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAahG"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import { useEffect } from "react";
|
|
3
|
-
export function useDefaultValue(editor, defaultValue) {
|
|
4
|
-
useEffect(() => {
|
|
5
|
-
if (!editor) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
const editorModel = editor.getModel();
|
|
9
|
-
const currentValue = editorModel?.getValue();
|
|
10
|
-
if (defaultValue !== currentValue) {
|
|
11
|
-
editor.setValue(defaultValue);
|
|
12
|
-
}
|
|
13
|
-
}, [defaultValue, editor]);
|
|
14
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { IMonacoEditorProps, IStandaloneCodeEditor } from "../MonacoEditor.js";
|
|
2
|
-
export declare function useEditorInit(element: HTMLDivElement | null, editor: IStandaloneCodeEditor | null, setEditor: (editor: IStandaloneCodeEditor) => void, props: Omit<IMonacoEditorProps, "autofocus" | "icons">): void;
|
|
3
|
-
//# sourceMappingURL=useEditorInit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useEditorInit.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/monaco/hooks/useEditorInit.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAER,kBAAkB,EAClB,qBAAqB,EAGxB,MAAM,oBAAoB,CAAC;AAK5B,wBAAgB,aAAa,CACzB,OAAO,EAAE,cAAc,GAAG,IAAI,EAC9B,MAAM,EAAE,qBAAqB,GAAG,IAAI,EACpC,SAAS,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,IAAI,EAClD,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,OAAO,CAAC,GACvD,IAAI,CAoEN"}
|