@finos/legend-query-builder 4.19.21 → 4.19.23
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/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +65 -50
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts +2 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +2 -2
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +11 -7
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +4 -13
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/sql-playground/SQLPlaygroundEditor.d.ts.map +1 -1
- package/lib/components/sql-playground/SQLPlaygroundEditor.js +4 -4
- package/lib/components/sql-playground/SQLPlaygroundEditor.js.map +1 -1
- package/lib/data-access-overview.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/query-workflow/QueryBuilderWorkFlowState.d.ts +10 -0
- package/lib/stores/query-workflow/QueryBuilderWorkFlowState.d.ts.map +1 -1
- package/lib/stores/query-workflow/QueryBuilderWorkFlowState.js +16 -0
- package/lib/stores/query-workflow/QueryBuilderWorkFlowState.js.map +1 -1
- package/package.json +11 -11
- package/src/components/QueryBuilder.tsx +392 -365
- package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +3 -1
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +383 -371
- package/src/components/shared/LambdaEditor.tsx +10 -13
- package/src/components/sql-playground/SQLPlaygroundEditor.tsx +6 -5
- package/src/index.ts +1 -0
- package/src/stores/query-workflow/QueryBuilderWorkFlowState.ts +19 -0
|
@@ -42,8 +42,8 @@ import {
|
|
|
42
42
|
clearMarkers,
|
|
43
43
|
setErrorMarkers,
|
|
44
44
|
CODE_EDITOR_LANGUAGE,
|
|
45
|
-
CODE_EDITOR_THEME,
|
|
46
45
|
PURE_CODE_EDITOR_WORD_SEPARATORS,
|
|
46
|
+
getCodeEditorThemeForAppTheme,
|
|
47
47
|
type CompletionItem,
|
|
48
48
|
} from '@finos/legend-code-editor';
|
|
49
49
|
import { disposeCodeEditor } from '@finos/legend-lego/code-editor';
|
|
@@ -273,10 +273,9 @@ const LambdaEditor_Inner = observer(
|
|
|
273
273
|
const _editor = monacoEditorAPI.create(element, {
|
|
274
274
|
...getBaseCodeEditorOptions(),
|
|
275
275
|
language: CODE_EDITOR_LANGUAGE.PURE,
|
|
276
|
-
theme:
|
|
277
|
-
.TEMPORARY__isLightColorThemeEnabled
|
|
278
|
-
|
|
279
|
-
: CODE_EDITOR_THEME.DEFAULT_DARK,
|
|
276
|
+
theme: getCodeEditorThemeForAppTheme(
|
|
277
|
+
applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled,
|
|
278
|
+
),
|
|
280
279
|
...lambdaEditorOptions,
|
|
281
280
|
});
|
|
282
281
|
setEditor(_editor);
|
|
@@ -311,10 +310,9 @@ const LambdaEditor_Inner = observer(
|
|
|
311
310
|
useEffect(() => {
|
|
312
311
|
if (editor) {
|
|
313
312
|
editor.updateOptions({
|
|
314
|
-
theme:
|
|
315
|
-
.TEMPORARY__isLightColorThemeEnabled
|
|
316
|
-
|
|
317
|
-
: CODE_EDITOR_THEME.DEFAULT_DARK,
|
|
313
|
+
theme: getCodeEditorThemeForAppTheme(
|
|
314
|
+
applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled,
|
|
315
|
+
),
|
|
318
316
|
});
|
|
319
317
|
}
|
|
320
318
|
}, [
|
|
@@ -608,10 +606,9 @@ const LambdaEditor_PopUp = observer(
|
|
|
608
606
|
const _editor = monacoEditorAPI.create(element, {
|
|
609
607
|
...getBaseCodeEditorOptions(),
|
|
610
608
|
language: CODE_EDITOR_LANGUAGE.PURE,
|
|
611
|
-
theme:
|
|
612
|
-
.TEMPORARY__isLightColorThemeEnabled
|
|
613
|
-
|
|
614
|
-
: CODE_EDITOR_THEME.DEFAULT_DARK,
|
|
609
|
+
theme: getCodeEditorThemeForAppTheme(
|
|
610
|
+
applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled,
|
|
611
|
+
),
|
|
615
612
|
});
|
|
616
613
|
setEditor(_editor);
|
|
617
614
|
}
|
|
@@ -20,8 +20,8 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
20
20
|
import { useCommands } from '@finos/legend-application';
|
|
21
21
|
import {
|
|
22
22
|
CODE_EDITOR_LANGUAGE,
|
|
23
|
-
CODE_EDITOR_THEME,
|
|
24
23
|
getBaseCodeEditorOptions,
|
|
24
|
+
getCodeEditorThemeForAppTheme,
|
|
25
25
|
} from '@finos/legend-code-editor';
|
|
26
26
|
import {
|
|
27
27
|
editor as monacoEditorAPI,
|
|
@@ -79,10 +79,11 @@ export const PlaygroundSQLCodeEditor = observer(
|
|
|
79
79
|
playgroundState.setTheme(enableDarkMode ? 'dark' : 'light');
|
|
80
80
|
const newEditor = monacoEditorAPI.create(element, {
|
|
81
81
|
...getBaseCodeEditorOptions(),
|
|
82
|
-
theme
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
// NOTE: Monaco themes are global, so this theme applies to every
|
|
83
|
+
// editor on the page and must match the application's theme
|
|
84
|
+
theme: getCodeEditorThemeForAppTheme(
|
|
85
|
+
playgroundState.theme === 'light',
|
|
86
|
+
),
|
|
86
87
|
language: CODE_EDITOR_LANGUAGE.SQL,
|
|
87
88
|
padding: {
|
|
88
89
|
top: 10,
|
package/src/index.ts
CHANGED
|
@@ -53,6 +53,7 @@ export {
|
|
|
53
53
|
getTDSColumnDerivedProperyFromType,
|
|
54
54
|
buildTDSSortTypeExpression,
|
|
55
55
|
} from './stores/fetch-structure/tds/QueryBuilderTDSHelper.js';
|
|
56
|
+
export { QueryBuilderTDSState } from './stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
|
56
57
|
export { type ExportDataInfo } from './stores/QueryBuilderResultState.js';
|
|
57
58
|
export { QueryBuilderPropertySearchState } from './stores/explorer/QueryBuilderPropertySearchState.js';
|
|
58
59
|
export {
|
|
@@ -34,6 +34,25 @@ export abstract class QueryBuilderWorkflowState {
|
|
|
34
34
|
state: QueryBuilderState,
|
|
35
35
|
): FetchStructureLayoutConfig;
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Whether the header shows its Advanced and Help menus; a workflow that
|
|
39
|
+
* embeds the query builder for a part of a query, e.g. a Legend Cube data
|
|
40
|
+
* space source, hides them
|
|
41
|
+
*/
|
|
42
|
+
get showHeaderMenus(): boolean {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Whether a projection column can be given an aggregate operator */
|
|
47
|
+
get showProjectionAggregation(): boolean {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Whether the projection shows its query options: sort, distinct, limit and dates */
|
|
52
|
+
get showQueryOptions(): boolean {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
37
56
|
updateActionConfig(actionConfig: QueryBuilderActionConfig): void {
|
|
38
57
|
this.actionConfig = actionConfig;
|
|
39
58
|
}
|