@finos/legend-query-builder 0.6.33 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/application/QueryBuilderEvent.d.ts.map +1 -0
- package/lib/application/QueryBuilderEvent.js.map +1 -0
- package/lib/{stores/LegendQueryStorage.js → application/QueryBuilderSetting.d.ts} +6 -5
- package/lib/application/QueryBuilderSetting.d.ts.map +1 -0
- package/lib/application/QueryBuilderSetting.js +25 -0
- package/lib/application/QueryBuilderSetting.js.map +1 -0
- package/lib/{stores/QueryBuilderTelemetry.d.ts → application/QueryBuilderTelemetryHelper.d.ts} +5 -8
- package/lib/application/QueryBuilderTelemetryHelper.d.ts.map +1 -0
- package/lib/{stores/QueryBuilderTelemetry.js → application/QueryBuilderTelemetryHelper.js} +8 -8
- package/lib/application/QueryBuilderTelemetryHelper.js.map +1 -0
- package/lib/{components/QueryBuilder_TestID.d.ts → application/QueryBuilderTesting.d.ts} +1 -1
- package/lib/application/QueryBuilderTesting.d.ts.map +1 -0
- package/lib/{components/QueryBuilder_TestID.js → application/QueryBuilderTesting.js} +1 -1
- package/lib/application/QueryBuilderTesting.js.map +1 -0
- package/lib/components/QueryBuilder.d.ts +0 -1
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +5 -5
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/{stores/LegendQueryStorage.d.ts → components/QueryBuilderComponentElement.d.ts} +3 -3
- package/lib/components/QueryBuilderComponentElement.d.ts.map +1 -0
- package/lib/components/QueryBuilderComponentElement.js +20 -0
- package/lib/components/QueryBuilderComponentElement.js.map +1 -0
- package/lib/components/QueryBuilderComponentTestUtils.js +1 -1
- package/lib/components/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.js +4 -3
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +2 -1
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderNavigationBlocker.d.ts.map +1 -1
- package/lib/components/QueryBuilderNavigationBlocker.js +1 -2
- package/lib/components/QueryBuilderNavigationBlocker.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +6 -4
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +1 -1
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +10 -7
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilder_LegendApplicationPlugin.d.ts +2 -1
- package/lib/components/QueryBuilder_LegendApplicationPlugin.d.ts.map +1 -1
- package/lib/components/QueryBuilder_LegendApplicationPlugin.js +7 -2
- package/lib/components/QueryBuilder_LegendApplicationPlugin.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +2 -2
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +7 -6
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +2 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts +0 -5
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +19 -18
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.js +6 -4
- package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
- package/lib/components/workflows/MappingQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/MappingQueryBuilder.js +6 -4
- package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.js +3 -2
- package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +5 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -4
- package/lib/index.js.map +1 -1
- package/lib/package.json +4 -4
- package/lib/stores/QueryBuilderChangeDetectionState.js +1 -1
- package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +8 -20
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +5 -6
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +2 -3
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts +2 -2
- package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchState.js +3 -3
- package/lib/stores/explorer/QueryBuilderPropertySearchState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +2 -2
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/package.json +11 -11
- package/src/application/QueryBuilderSetting.ts +27 -0
- package/src/{stores/QueryBuilderTelemetry.ts → application/QueryBuilderTelemetryHelper.ts} +5 -14
- package/src/components/QueryBuilder.tsx +8 -8
- package/src/{stores/LegendQueryStorage.ts → components/QueryBuilderComponentElement.ts} +2 -2
- package/src/components/QueryBuilderComponentTestUtils.tsx +1 -1
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +4 -3
- package/src/components/QueryBuilderDiffPanel.tsx +2 -1
- package/src/components/QueryBuilderNavigationBlocker.tsx +1 -2
- package/src/components/QueryBuilderParametersPanel.tsx +6 -4
- package/src/components/QueryBuilderResultPanel.tsx +1 -1
- package/src/components/QueryBuilderSideBar.tsx +10 -7
- package/src/components/QueryBuilder_LegendApplicationPlugin.ts +9 -0
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +1 -1
- package/src/components/explorer/QueryBuilderPropertySearchPanel.tsx +1 -1
- package/src/components/fetch-structure/QueryBuilderGraphFetchTreePanel.tsx +1 -1
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +1 -1
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +1 -1
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +1 -1
- package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +7 -6
- package/src/components/filter/QueryBuilderFilterPanel.tsx +1 -1
- package/src/components/shared/BasicValueSpecificationEditor.tsx +4 -3
- package/src/components/shared/LambdaEditor.tsx +15 -23
- package/src/components/workflows/ClassQueryBuilder.tsx +6 -4
- package/src/components/workflows/MappingQueryBuilder.tsx +6 -4
- package/src/components/workflows/ServiceQueryBuilder.tsx +3 -2
- package/src/index.ts +7 -7
- package/src/stores/QueryBuilderChangeDetectionState.ts +1 -1
- package/src/stores/QueryBuilderResultState.ts +8 -23
- package/src/stores/QueryBuilderState.ts +7 -8
- package/src/stores/explorer/QueryBuilderPropertySearchState.ts +4 -4
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +4 -5
- package/tsconfig.json +6 -6
- package/tsconfig.package.json +1 -2
- package/lib/components/QueryBuilder_TestID.d.ts.map +0 -1
- package/lib/components/QueryBuilder_TestID.js.map +0 -1
- package/lib/stores/LegendQueryStorage.d.ts.map +0 -1
- package/lib/stores/LegendQueryStorage.js.map +0 -1
- package/lib/stores/QueryBuilderEvent.d.ts.map +0 -1
- package/lib/stores/QueryBuilderEvent.js.map +0 -1
- package/lib/stores/QueryBuilderTelemetry.d.ts.map +0 -1
- package/lib/stores/QueryBuilderTelemetry.js.map +0 -1
- /package/lib/{stores → application}/QueryBuilderEvent.d.ts +0 -0
- /package/lib/{stores → application}/QueryBuilderEvent.js +0 -0
- /package/src/{stores → application}/QueryBuilderEvent.ts +0 -0
- /package/src/{components/QueryBuilder_TestID.ts → application/QueryBuilderTesting.ts} +0 -0
@@ -87,7 +87,7 @@ import {
|
|
87
87
|
instanceValue_setValues,
|
88
88
|
} from '../stores/shared/ValueSpecificationModifierHelper.js';
|
89
89
|
import { PARAMETER_SUBMIT_ACTION } from '../stores/shared/LambdaParameterState.js';
|
90
|
-
import { QUERY_BUILDER_TEST_ID } from '
|
90
|
+
import { QUERY_BUILDER_TEST_ID } from '../application/QueryBuilderTesting.js';
|
91
91
|
|
92
92
|
const QueryBuilderGridResultContextMenu = observer(
|
93
93
|
forwardRef<
|
@@ -26,7 +26,7 @@ import {
|
|
26
26
|
} from '@finos/legend-art';
|
27
27
|
import { observer } from 'mobx-react-lite';
|
28
28
|
import type { QueryBuilderState } from '../stores/QueryBuilderState.js';
|
29
|
-
import { QUERY_BUILDER_TEST_ID } from '
|
29
|
+
import { QUERY_BUILDER_TEST_ID } from '../application/QueryBuilderTesting.js';
|
30
30
|
import {
|
31
31
|
type Class,
|
32
32
|
type Mapping,
|
@@ -180,13 +180,14 @@ export const QueryBuilderClassSelector = observer(
|
|
180
180
|
onChange={changeClass}
|
181
181
|
value={selectedClassOption}
|
182
182
|
darkMode={
|
183
|
-
!applicationStore.layoutService
|
183
|
+
!applicationStore.layoutService
|
184
|
+
.TEMPORARY__isLightColorThemeEnabled
|
184
185
|
}
|
185
186
|
filterOption={elementFilterOption}
|
186
187
|
formatOptionLabel={getPackageableElementOptionFormatter({
|
187
188
|
darkMode:
|
188
189
|
!applicationStore.layoutService
|
189
|
-
.
|
190
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
190
191
|
graph: queryBuilderState.graphManagerState.graph,
|
191
192
|
})}
|
192
193
|
/>
|
@@ -342,13 +343,14 @@ const BasicQueryBuilderSetup = observer(
|
|
342
343
|
onChange={changeMapping}
|
343
344
|
value={selectedMappingOption}
|
344
345
|
darkMode={
|
345
|
-
!applicationStore.layoutService
|
346
|
+
!applicationStore.layoutService
|
347
|
+
.TEMPORARY__isLightColorThemeEnabled
|
346
348
|
}
|
347
349
|
filterOption={mappingFilterOption}
|
348
350
|
formatOptionLabel={getPackageableElementOptionFormatter({
|
349
351
|
darkMode:
|
350
352
|
!applicationStore.layoutService
|
351
|
-
.
|
353
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
352
354
|
graph: queryBuilderState.graphManagerState.graph,
|
353
355
|
})}
|
354
356
|
/>
|
@@ -376,13 +378,14 @@ const BasicQueryBuilderSetup = observer(
|
|
376
378
|
onChange={changeRuntime}
|
377
379
|
value={selectedRuntimeOption}
|
378
380
|
darkMode={
|
379
|
-
!applicationStore.layoutService
|
381
|
+
!applicationStore.layoutService
|
382
|
+
.TEMPORARY__isLightColorThemeEnabled
|
380
383
|
}
|
381
384
|
filterOption={runtimeFilterOption}
|
382
385
|
formatOptionLabel={getRuntimeOptionFormatter({
|
383
386
|
darkMode:
|
384
387
|
!applicationStore.layoutService
|
385
|
-
.
|
388
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
386
389
|
pureModel: queryBuilderState.graphManagerState.graph,
|
387
390
|
})}
|
388
391
|
/>
|
@@ -16,11 +16,14 @@
|
|
16
16
|
|
17
17
|
import {
|
18
18
|
collectKeyedCommandConfigEntriesFromConfig,
|
19
|
+
collectSettingConfigurationEntriesFromConfig,
|
19
20
|
LegendApplicationPlugin,
|
21
|
+
type SettingConfigurationEntry,
|
20
22
|
type KeyedCommandConfigEntry,
|
21
23
|
type LegendApplicationPluginManager,
|
22
24
|
} from '@finos/legend-application';
|
23
25
|
import packageJson from '../../package.json';
|
26
|
+
import { QUERY_BUILDER_SETTING_CONFIG } from '../application/QueryBuilderSetting.js';
|
24
27
|
import { QUERY_BUILDER_COMMAND_CONFIG } from '../stores/QueryBuilderCommand.js';
|
25
28
|
import type { QueryBuilderState } from '../stores/QueryBuilderState.js';
|
26
29
|
|
@@ -47,6 +50,12 @@ export class QueryBuilder_LegendApplicationPlugin extends LegendApplicationPlugi
|
|
47
50
|
);
|
48
51
|
}
|
49
52
|
|
53
|
+
override getExtraSettingConfigurationEntries(): SettingConfigurationEntry[] {
|
54
|
+
return collectSettingConfigurationEntriesFromConfig(
|
55
|
+
QUERY_BUILDER_SETTING_CONFIG,
|
56
|
+
);
|
57
|
+
}
|
58
|
+
|
50
59
|
getCheckEntitlementsEditorRender(): CheckEntitlementEditorRender | undefined {
|
51
60
|
return undefined;
|
52
61
|
}
|
@@ -91,7 +91,7 @@ import {
|
|
91
91
|
} from '@finos/legend-graph';
|
92
92
|
import { useApplicationStore } from '@finos/legend-application';
|
93
93
|
import { getClassPropertyIcon } from '../shared/ElementIconUtils.js';
|
94
|
-
import { QUERY_BUILDER_TEST_ID } from '
|
94
|
+
import { QUERY_BUILDER_TEST_ID } from '../../application/QueryBuilderTesting.js';
|
95
95
|
import { filterByType, guaranteeNonNullable } from '@finos/legend-shared';
|
96
96
|
import { QueryBuilderPropertySearchPanel } from './QueryBuilderPropertySearchPanel.js';
|
97
97
|
import { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
@@ -57,7 +57,7 @@ import {
|
|
57
57
|
renderPropertyTypeIcon,
|
58
58
|
} from './QueryBuilderExplorerPanel.js';
|
59
59
|
import { QueryBuilderPropertyInfoTooltip } from '../shared/QueryBuilderPropertyInfoTooltip.js';
|
60
|
-
import { QUERY_BUILDER_TEST_ID } from '
|
60
|
+
import { QUERY_BUILDER_TEST_ID } from '../../application/QueryBuilderTesting.js';
|
61
61
|
import { TextSearchAdvancedConfigMenu } from '@finos/legend-application';
|
62
62
|
|
63
63
|
const prettyPropertyNameFromNodeId = (name: string): string => {
|
@@ -30,7 +30,7 @@ import {
|
|
30
30
|
InfoCircleIcon,
|
31
31
|
PanelDropZone,
|
32
32
|
} from '@finos/legend-art';
|
33
|
-
import { QUERY_BUILDER_TEST_ID } from '
|
33
|
+
import { QUERY_BUILDER_TEST_ID } from '../../application/QueryBuilderTesting.js';
|
34
34
|
import { isNonNullable } from '@finos/legend-shared';
|
35
35
|
import {
|
36
36
|
type QueryBuilderGraphFetchTreeData,
|
@@ -79,7 +79,7 @@ import {
|
|
79
79
|
QueryBuilderDerivationProjectionColumnState,
|
80
80
|
} from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
|
81
81
|
import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
|
82
|
-
import { QUERY_BUILDER_TEST_ID } from '
|
82
|
+
import { QUERY_BUILDER_TEST_ID } from '../../application/QueryBuilderTesting.js';
|
83
83
|
import { isTypeCompatibleForAssignment } from '../../stores/QueryBuilderValueSpecificationHelper.js';
|
84
84
|
import { QUERY_BUILDER_GROUP_OPERATION } from '../../stores/QueryBuilderGroupOperationHelper.js';
|
85
85
|
import { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
@@ -85,7 +85,7 @@ const ColumnSortEditor = observer(
|
|
85
85
|
onChange={onChange}
|
86
86
|
value={value}
|
87
87
|
darkMode={
|
88
|
-
!applicationStore.layoutService.
|
88
|
+
!applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
|
89
89
|
}
|
90
90
|
/>
|
91
91
|
<div className="query-builder__projection__options__sort__sortby">
|
@@ -53,7 +53,7 @@ import {
|
|
53
53
|
} from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
|
54
54
|
import { QueryBuilderPropertyExpressionBadge } from '../QueryBuilderPropertyExpressionEditor.js';
|
55
55
|
import { QueryResultModifierModal } from './QueryBuilderResultModifierPanel.js';
|
56
|
-
import { QUERY_BUILDER_TEST_ID } from '
|
56
|
+
import { QUERY_BUILDER_TEST_ID } from '../../application/QueryBuilderTesting.js';
|
57
57
|
import { flowResult } from 'mobx';
|
58
58
|
import { useApplicationStore } from '@finos/legend-application';
|
59
59
|
import {
|
@@ -62,7 +62,7 @@ import { QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE } from '../../stores/fetch-str
|
|
62
62
|
import type { QueryBuilderTDSColumnState } from '../../stores/fetch-structure/tds/QueryBuilderTDSColumnState.js';
|
63
63
|
import type { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
64
64
|
import { COLUMN_SORT_TYPE } from '../../stores/fetch-structure/tds/QueryResultSetModifierState.js';
|
65
|
-
import { QUERY_BUILDER_TEST_ID } from '
|
65
|
+
import { QUERY_BUILDER_TEST_ID } from '../../application/QueryBuilderTesting.js';
|
66
66
|
|
67
67
|
// helpers
|
68
68
|
const createWindowColumnState = (
|
@@ -161,7 +161,7 @@ const TDSColumnSelectorEditor = observer(
|
|
161
161
|
onChange={onChange}
|
162
162
|
value={value}
|
163
163
|
darkMode={
|
164
|
-
!applicationStore.layoutService.
|
164
|
+
!applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
|
165
165
|
}
|
166
166
|
/>
|
167
167
|
<button
|
@@ -271,7 +271,8 @@ const QueryBuilderWindowColumnModalEditor = observer(
|
|
271
271
|
'query-builder__olap__modal',
|
272
272
|
{
|
273
273
|
'query-editor--light':
|
274
|
-
applicationStore.layoutService
|
274
|
+
applicationStore.layoutService
|
275
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
275
276
|
},
|
276
277
|
])}
|
277
278
|
>
|
@@ -318,7 +319,7 @@ const QueryBuilderWindowColumnModalEditor = observer(
|
|
318
319
|
}}
|
319
320
|
darkMode={
|
320
321
|
!applicationStore.layoutService
|
321
|
-
.
|
322
|
+
.TEMPORARY__isLightColorThemeEnabled
|
322
323
|
}
|
323
324
|
/>
|
324
325
|
</div>
|
@@ -434,7 +435,7 @@ const QueryBuilderWindowColumnModalEditor = observer(
|
|
434
435
|
}}
|
435
436
|
darkMode={
|
436
437
|
!applicationStore.layoutService
|
437
|
-
.
|
438
|
+
.TEMPORARY__isLightColorThemeEnabled
|
438
439
|
}
|
439
440
|
/>
|
440
441
|
</div>
|
@@ -645,7 +646,7 @@ const TDSColumnReferenceEditor = observer(
|
|
645
646
|
value={value}
|
646
647
|
darkMode={
|
647
648
|
!applicationStore.layoutService
|
648
|
-
.
|
649
|
+
.TEMPORARY__isLightColorThemeEnabled
|
649
650
|
}
|
650
651
|
/>
|
651
652
|
</div>
|
@@ -68,7 +68,7 @@ import {
|
|
68
68
|
debounce,
|
69
69
|
UnsupportedOperationError,
|
70
70
|
} from '@finos/legend-shared';
|
71
|
-
import { QUERY_BUILDER_TEST_ID } from '
|
71
|
+
import { QUERY_BUILDER_TEST_ID } from '../../application/QueryBuilderTesting.js';
|
72
72
|
import { useApplicationStore } from '@finos/legend-application';
|
73
73
|
import type { ValueSpecification } from '@finos/legend-graph';
|
74
74
|
import {
|
@@ -17,7 +17,7 @@
|
|
17
17
|
import { useApplicationStore } from '@finos/legend-application';
|
18
18
|
import {
|
19
19
|
type TooltipPlacement,
|
20
|
-
type
|
20
|
+
type InputActionData,
|
21
21
|
Tooltip,
|
22
22
|
DollarIcon,
|
23
23
|
clsx,
|
@@ -241,7 +241,7 @@ const StringPrimitiveInstanceValueEditor = observer(
|
|
241
241
|
};
|
242
242
|
const handleInputChange = (
|
243
243
|
inputValue: string,
|
244
|
-
actionChange:
|
244
|
+
actionChange: InputActionData,
|
245
245
|
): void => {
|
246
246
|
if (actionChange.action === 'input-change') {
|
247
247
|
updateValueSpec(inputValue);
|
@@ -279,7 +279,8 @@ const StringPrimitiveInstanceValueEditor = observer(
|
|
279
279
|
inputValue={value}
|
280
280
|
onInputChange={handleInputChange}
|
281
281
|
darkMode={
|
282
|
-
!applicationStore.layoutService
|
282
|
+
!applicationStore.layoutService
|
283
|
+
.TEMPORARY__isLightColorThemeEnabled
|
283
284
|
}
|
284
285
|
isLoading={isLoading}
|
285
286
|
allowCreateWhileLoading={true}
|
@@ -51,7 +51,7 @@ import {
|
|
51
51
|
TAB_SIZE,
|
52
52
|
useApplicationStore,
|
53
53
|
} from '@finos/legend-application';
|
54
|
-
import { QUERY_BUILDER_TEST_ID } from '
|
54
|
+
import { QUERY_BUILDER_TEST_ID } from '../../application/QueryBuilderTesting.js';
|
55
55
|
|
56
56
|
const LambdaErrorFeedback: React.FC<{
|
57
57
|
error?: EngineError | undefined;
|
@@ -97,7 +97,6 @@ const LambdaEditorInline = observer(
|
|
97
97
|
disableExpansion?: boolean | undefined;
|
98
98
|
forceExpansion?: boolean | undefined;
|
99
99
|
disablePopUp?: boolean | undefined;
|
100
|
-
backdropSetter?: ((val: boolean) => void) | undefined;
|
101
100
|
openInPopUp: () => void;
|
102
101
|
onEditorFocus?: (() => void) | undefined;
|
103
102
|
}) => {
|
@@ -110,7 +109,6 @@ const LambdaEditorInline = observer(
|
|
110
109
|
onExpectedTypeLabelSelect,
|
111
110
|
matchedExpectedType,
|
112
111
|
forceBackdrop,
|
113
|
-
backdropSetter,
|
114
112
|
disableExpansion,
|
115
113
|
forceExpansion,
|
116
114
|
disablePopUp,
|
@@ -185,7 +183,8 @@ const LambdaEditorInline = observer(
|
|
185
183
|
const _editor = monacoEditorAPI.create(element, {
|
186
184
|
...getBaseTextEditorOptions(),
|
187
185
|
language: EDITOR_LANGUAGE.PURE,
|
188
|
-
theme: applicationStore.layoutService
|
186
|
+
theme: applicationStore.layoutService
|
187
|
+
.TEMPORARY__isLightColorThemeEnabled
|
189
188
|
? EDITOR_THEME.TEMPORARY__VSCODE_LIGHT
|
190
189
|
: EDITOR_THEME.LEGEND,
|
191
190
|
...lambdaEditorOptions,
|
@@ -220,17 +219,15 @@ const LambdaEditorInline = observer(
|
|
220
219
|
|
221
220
|
// set backdrop to force user to fix parser error when it happens
|
222
221
|
useEffect(() => {
|
223
|
-
if (
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
backdropSetter(false);
|
231
|
-
}
|
222
|
+
if (parserError) {
|
223
|
+
applicationStore.layoutService.setShowBackdrop(true);
|
224
|
+
} else if (!forceBackdrop) {
|
225
|
+
// make sure the backdrop is no longer `needed` for blocking by another parser error before hiding it
|
226
|
+
// NOTE: this has a serious drawback, see the documentation for `forceBackdrop` prop of `LambdaEditor`
|
227
|
+
// for better context
|
228
|
+
applicationStore.layoutService.setShowBackdrop(false);
|
232
229
|
}
|
233
|
-
}, [parserError, forceBackdrop
|
230
|
+
}, [applicationStore, parserError, forceBackdrop]);
|
234
231
|
|
235
232
|
if (editor) {
|
236
233
|
/**
|
@@ -464,7 +461,8 @@ const LambdaEditorPopUp = observer(
|
|
464
461
|
const _editor = monacoEditorAPI.create(element, {
|
465
462
|
...getBaseTextEditorOptions(),
|
466
463
|
language: EDITOR_LANGUAGE.PURE,
|
467
|
-
theme: applicationStore.layoutService
|
464
|
+
theme: applicationStore.layoutService
|
465
|
+
.TEMPORARY__isLightColorThemeEnabled
|
468
466
|
? EDITOR_THEME.TEMPORARY__VSCODE_LIGHT
|
469
467
|
: EDITOR_THEME.LEGEND,
|
470
468
|
});
|
@@ -595,7 +593,8 @@ const LambdaEditorPopUp = observer(
|
|
595
593
|
},
|
596
594
|
{
|
597
595
|
'lambda-editor--light':
|
598
|
-
applicationStore.layoutService
|
596
|
+
applicationStore.layoutService
|
597
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
599
598
|
},
|
600
599
|
)}
|
601
600
|
>
|
@@ -671,11 +670,6 @@ export const LambdaEditor = observer(
|
|
671
670
|
* input will still be captured.
|
672
671
|
*/
|
673
672
|
forceBackdrop: boolean;
|
674
|
-
/**
|
675
|
-
* (de)activator for backdrop that is usually used to block any background interactions
|
676
|
-
* while there is a parser error in the editor
|
677
|
-
*/
|
678
|
-
backdropSetter?: ((val: boolean) => void) | undefined;
|
679
673
|
/**
|
680
674
|
* To whether or not disable expasipn toggler
|
681
675
|
*/
|
@@ -706,7 +700,6 @@ export const LambdaEditor = observer(
|
|
706
700
|
lambdaEditorState,
|
707
701
|
disabled,
|
708
702
|
forceBackdrop,
|
709
|
-
backdropSetter,
|
710
703
|
expectedType,
|
711
704
|
onExpectedTypeLabelSelect,
|
712
705
|
matchedExpectedType,
|
@@ -780,7 +773,6 @@ export const LambdaEditor = observer(
|
|
780
773
|
matchedExpectedType={matchedExpectedType}
|
781
774
|
onExpectedTypeLabelSelect={onExpectedTypeLabelSelect}
|
782
775
|
forceBackdrop={forceBackdrop}
|
783
|
-
backdropSetter={backdropSetter}
|
784
776
|
disableExpansion={disableExpansion}
|
785
777
|
forceExpansion={
|
786
778
|
disableExpansion !== undefined
|
@@ -154,13 +154,14 @@ const ClassQueryBuilderSetupPanelContent = observer(
|
|
154
154
|
onChange={changeMapping}
|
155
155
|
value={selectedMappingOption}
|
156
156
|
darkMode={
|
157
|
-
!applicationStore.layoutService
|
157
|
+
!applicationStore.layoutService
|
158
|
+
.TEMPORARY__isLightColorThemeEnabled
|
158
159
|
}
|
159
160
|
filterOption={mappingFilterOption}
|
160
161
|
formatOptionLabel={getPackageableElementOptionFormatter({
|
161
162
|
darkMode:
|
162
163
|
!applicationStore.layoutService
|
163
|
-
.
|
164
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
164
165
|
graph: queryBuilderState.graphManagerState.graph,
|
165
166
|
})}
|
166
167
|
/>
|
@@ -183,13 +184,14 @@ const ClassQueryBuilderSetupPanelContent = observer(
|
|
183
184
|
onChange={changeRuntime}
|
184
185
|
value={selectedRuntimeOption}
|
185
186
|
darkMode={
|
186
|
-
!applicationStore.layoutService
|
187
|
+
!applicationStore.layoutService
|
188
|
+
.TEMPORARY__isLightColorThemeEnabled
|
187
189
|
}
|
188
190
|
filterOption={runtimeFilterOption}
|
189
191
|
formatOptionLabel={getRuntimeOptionFormatter({
|
190
192
|
darkMode:
|
191
193
|
!applicationStore.layoutService
|
192
|
-
.
|
194
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
193
195
|
pureModel: queryBuilderState.graphManagerState.graph,
|
194
196
|
})}
|
195
197
|
/>
|
@@ -148,13 +148,14 @@ const MappingQueryBuilderSetupPanelContent = observer(
|
|
148
148
|
onChange={changeMapping}
|
149
149
|
value={selectedMappingOption}
|
150
150
|
darkMode={
|
151
|
-
!applicationStore.layoutService
|
151
|
+
!applicationStore.layoutService
|
152
|
+
.TEMPORARY__isLightColorThemeEnabled
|
152
153
|
}
|
153
154
|
filterOption={mappingFilterOption}
|
154
155
|
formatOptionLabel={getPackageableElementOptionFormatter({
|
155
156
|
darkMode:
|
156
157
|
!applicationStore.layoutService
|
157
|
-
.
|
158
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
158
159
|
graph: queryBuilderState.graphManagerState.graph,
|
159
160
|
})}
|
160
161
|
/>
|
@@ -175,13 +176,14 @@ const MappingQueryBuilderSetupPanelContent = observer(
|
|
175
176
|
onChange={changeRuntime}
|
176
177
|
value={selectedRuntimeOption}
|
177
178
|
darkMode={
|
178
|
-
!applicationStore.layoutService
|
179
|
+
!applicationStore.layoutService
|
180
|
+
.TEMPORARY__isLightColorThemeEnabled
|
179
181
|
}
|
180
182
|
filterOption={runtimeFilterOption}
|
181
183
|
formatOptionLabel={getRuntimeOptionFormatter({
|
182
184
|
darkMode:
|
183
185
|
!applicationStore.layoutService
|
184
|
-
.
|
186
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
185
187
|
pureModel: queryBuilderState.graphManagerState.graph,
|
186
188
|
})}
|
187
189
|
/>
|
@@ -122,7 +122,8 @@ const ServiceQueryBuilderSetupPanelContent = observer(
|
|
122
122
|
onChange={onServiceOptionChange}
|
123
123
|
value={selectedServiceOption}
|
124
124
|
darkMode={
|
125
|
-
!applicationStore.layoutService
|
125
|
+
!applicationStore.layoutService
|
126
|
+
.TEMPORARY__isLightColorThemeEnabled
|
126
127
|
}
|
127
128
|
/>
|
128
129
|
</div>
|
@@ -149,7 +150,7 @@ const ServiceQueryBuilderSetupPanelContent = observer(
|
|
149
150
|
value={selectedExecutionContextOption}
|
150
151
|
darkMode={
|
151
152
|
!applicationStore.layoutService
|
152
|
-
.
|
153
|
+
.TEMPORARY__isLightColorThemeEnabled
|
153
154
|
}
|
154
155
|
/>
|
155
156
|
</div>
|
package/src/index.ts
CHANGED
@@ -14,19 +14,21 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
+
// application
|
18
|
+
export * from './application/QueryBuilderTelemetryHelper.js';
|
19
|
+
export * from './application/QueryBuilderEvent.js';
|
20
|
+
|
17
21
|
export * from './stores/QueryBuilderBootstraper.js';
|
18
22
|
export { QueryBuilder_GraphManagerPreset } from './graphManager/QueryBuilder_GraphManagerPreset.js';
|
19
23
|
|
20
|
-
export { QUERY_BUILDER_TEST_ID } from './
|
24
|
+
export { QUERY_BUILDER_TEST_ID } from './application/QueryBuilderTesting.js';
|
21
25
|
export {
|
22
26
|
type CheckEntitlementEditorRender,
|
23
27
|
QueryBuilder_LegendApplicationPlugin,
|
24
28
|
} from './components/QueryBuilder_LegendApplicationPlugin.js';
|
25
29
|
export { QueryBuilderNavigationBlocker } from './components/QueryBuilderNavigationBlocker.js';
|
26
|
-
export {
|
27
|
-
|
28
|
-
QUERY_BUILDER_BACKDROP_CONTAINER_ID,
|
29
|
-
} from './components/QueryBuilder.js';
|
30
|
+
export { QueryBuilder } from './components/QueryBuilder.js';
|
31
|
+
export { QUERY_BUILDER_COMPONENT_ELEMENT_ID } from './components/QueryBuilderComponentElement.js';
|
30
32
|
export { QueryBuilderState } from './stores/QueryBuilderState.js';
|
31
33
|
|
32
34
|
export { QueryBuilderPropertySearchState } from './stores/explorer/QueryBuilderPropertySearchState.js';
|
@@ -49,8 +51,6 @@ export * from './stores/ServiceInfo.js';
|
|
49
51
|
export * from './components/ServiceQuerySetupUtils.js';
|
50
52
|
export * from './components/QuerySetupUtils.js';
|
51
53
|
export * from './components/QueryBuilderTextEditor.js';
|
52
|
-
export * from './stores/QueryBuilderTelemetry.js';
|
53
|
-
export * from './stores/QueryBuilderEvent.js';
|
54
54
|
|
55
55
|
export { TEST__setUpQueryBuilder } from './components/QueryBuilderComponentTestUtils.js';
|
56
56
|
|
@@ -145,7 +145,7 @@ export class QueryBuilderChangeDetectionState {
|
|
145
145
|
if (this.hasChanged) {
|
146
146
|
this.querybuilderState.applicationStore.alertService.setActionAlertInfo({
|
147
147
|
message:
|
148
|
-
'Unsaved changes
|
148
|
+
'Unsaved changes will be lost if you continue. Do you still want to proceed?',
|
149
149
|
type: ActionAlertType.CAUTION,
|
150
150
|
actions: [
|
151
151
|
{
|
@@ -45,8 +45,8 @@ import {
|
|
45
45
|
getExecutionQueryFromRawLambda,
|
46
46
|
} from './shared/LambdaParameterState.js';
|
47
47
|
import type { LambdaFunctionBuilderOption } from './QueryBuilderValueSpecificationBuilderHelper.js';
|
48
|
-
import {
|
49
|
-
import { QUERY_BUILDER_EVENT } from '
|
48
|
+
import { QueryBuilderTelemetryHelper } from '../application/QueryBuilderTelemetryHelper.js';
|
49
|
+
import { QUERY_BUILDER_EVENT } from '../application/QueryBuilderEvent.js';
|
50
50
|
|
51
51
|
const DEFAULT_LIMIT = 1000;
|
52
52
|
|
@@ -226,13 +226,8 @@ export class QueryBuilderResultState {
|
|
226
226
|
this.queryBuilderState.graphManagerState,
|
227
227
|
);
|
228
228
|
|
229
|
-
|
229
|
+
QueryBuilderTelemetryHelper.logEvent_QueryRunLaunched(
|
230
230
|
this.queryBuilderState.applicationStore.telemetryService,
|
231
|
-
this.queryBuilderState.applicationContext
|
232
|
-
? {
|
233
|
-
applicationContext: this.queryBuilderState.applicationContext,
|
234
|
-
}
|
235
|
-
: {},
|
236
231
|
);
|
237
232
|
|
238
233
|
const stopWatch = new StopWatch();
|
@@ -263,7 +258,7 @@ export class QueryBuilderResultState {
|
|
263
258
|
stopWatch,
|
264
259
|
report.timings,
|
265
260
|
);
|
266
|
-
|
261
|
+
QueryBuilderTelemetryHelper.logEvent_QueryRunSucceeded(
|
267
262
|
this.queryBuilderState.applicationStore.telemetryService,
|
268
263
|
report,
|
269
264
|
);
|
@@ -303,13 +298,8 @@ export class QueryBuilderResultState {
|
|
303
298
|
);
|
304
299
|
|
305
300
|
if (debug) {
|
306
|
-
|
301
|
+
QueryBuilderTelemetryHelper.logEvent_ExecutionPlanDebugLaunched(
|
307
302
|
this.queryBuilderState.applicationStore.telemetryService,
|
308
|
-
this.queryBuilderState.applicationContext
|
309
|
-
? {
|
310
|
-
applicationContext: this.queryBuilderState.applicationContext,
|
311
|
-
}
|
312
|
-
: {},
|
313
303
|
);
|
314
304
|
const debugResult =
|
315
305
|
(yield this.queryBuilderState.graphManagerState.graphManager.debugExecutionPlanGeneration(
|
@@ -322,13 +312,8 @@ export class QueryBuilderResultState {
|
|
322
312
|
rawPlan = debugResult.plan;
|
323
313
|
this.executionPlanState.setDebugText(debugResult.debug);
|
324
314
|
} else {
|
325
|
-
|
315
|
+
QueryBuilderTelemetryHelper.logEvent_ExecutionPlanGenerationLaunched(
|
326
316
|
this.queryBuilderState.applicationStore.telemetryService,
|
327
|
-
this.queryBuilderState.applicationContext
|
328
|
-
? {
|
329
|
-
applicationContext: this.queryBuilderState.applicationContext,
|
330
|
-
}
|
331
|
-
: {},
|
332
317
|
);
|
333
318
|
rawPlan =
|
334
319
|
(yield this.queryBuilderState.graphManagerState.graphManager.generateExecutionPlan(
|
@@ -361,12 +346,12 @@ export class QueryBuilderResultState {
|
|
361
346
|
report.timings,
|
362
347
|
);
|
363
348
|
if (debug) {
|
364
|
-
|
349
|
+
QueryBuilderTelemetryHelper.logEvent_ExecutionPlanDebugSucceeded(
|
365
350
|
this.queryBuilderState.applicationStore.telemetryService,
|
366
351
|
report,
|
367
352
|
);
|
368
353
|
} else {
|
369
|
-
|
354
|
+
QueryBuilderTelemetryHelper.logEvent_ExecutionPlanGenerationSucceeded(
|
370
355
|
this.queryBuilderState.applicationStore.telemetryService,
|
371
356
|
report,
|
372
357
|
);
|
@@ -80,10 +80,13 @@ import { QueryBuilderConstantsState } from './QueryBuilderConstantsState.js';
|
|
80
80
|
import { QueryBuilderCheckEntitlementsState } from './entitlements/QueryBuilderCheckEntitlementsState.js';
|
81
81
|
|
82
82
|
export abstract class QueryBuilderState implements CommandRegistrar {
|
83
|
-
applicationStore: GenericLegendApplicationStore;
|
84
|
-
graphManagerState: GraphManagerState;
|
83
|
+
readonly applicationStore: GenericLegendApplicationStore;
|
84
|
+
readonly graphManagerState: GraphManagerState;
|
85
|
+
|
86
|
+
readonly changeDetectionState: QueryBuilderChangeDetectionState;
|
87
|
+
readonly queryCompileState = ActionState.create();
|
88
|
+
readonly observableContext: ObserverContext;
|
85
89
|
|
86
|
-
changeDetectionState: QueryBuilderChangeDetectionState;
|
87
90
|
explorerState: QueryBuilderExplorerState;
|
88
91
|
functionsExplorerState: QueryFunctionsExplorerState;
|
89
92
|
parametersState: QueryBuilderParametersState;
|
@@ -98,10 +101,8 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
98
101
|
resultState: QueryBuilderResultState;
|
99
102
|
textEditorState: QueryBuilderTextEditorState;
|
100
103
|
unsupportedQueryState: QueryBuilderUnsupportedQueryState;
|
101
|
-
observableContext: ObserverContext;
|
102
|
-
titleOfQuery: string | undefined;
|
103
104
|
|
104
|
-
|
105
|
+
titleOfQuery: string | undefined;
|
105
106
|
showFunctionsExplorerPanel = false;
|
106
107
|
showParametersPanel = false;
|
107
108
|
isEditingWatermark = false;
|
@@ -111,8 +112,6 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
111
112
|
mapping?: Mapping | undefined;
|
112
113
|
runtimeValue?: Runtime | undefined;
|
113
114
|
|
114
|
-
applicationContext?: string | undefined;
|
115
|
-
|
116
115
|
// NOTE: this makes it so that we need to import components in stores code,
|
117
116
|
// we probably want to refactor to an extension mechanism
|
118
117
|
TEMPORARY__setupPanelContentRenderer?: (() => React.ReactNode) | undefined;
|
@@ -51,7 +51,7 @@ import {
|
|
51
51
|
QueryBuilderExplorerTreeSubTypeNodeData,
|
52
52
|
} from './QueryBuilderExplorerState.js';
|
53
53
|
import type { QueryBuilderState } from '../QueryBuilderState.js';
|
54
|
-
import {
|
54
|
+
import { FuzzySearchEngine } from '@finos/legend-art';
|
55
55
|
import { TextSearchAdvancedConfigState } from '@finos/legend-application';
|
56
56
|
|
57
57
|
export class QueryBuilderPropertySearchState {
|
@@ -71,7 +71,7 @@ export class QueryBuilderPropertySearchState {
|
|
71
71
|
indexedExplorerTreeNodes: QueryBuilderExplorerTreeNodeData[] = [];
|
72
72
|
|
73
73
|
// search
|
74
|
-
searchEngine:
|
74
|
+
searchEngine: FuzzySearchEngine<QueryBuilderExplorerTreeNodeData>;
|
75
75
|
searchConfigurationState: TextSearchAdvancedConfigState;
|
76
76
|
searchState = ActionState.create();
|
77
77
|
searchText = '';
|
@@ -115,7 +115,7 @@ export class QueryBuilderPropertySearchState {
|
|
115
115
|
this.searchConfigurationState = new TextSearchAdvancedConfigState(
|
116
116
|
(): void => this.search(),
|
117
117
|
);
|
118
|
-
this.searchEngine = new
|
118
|
+
this.searchEngine = new FuzzySearchEngine(this.indexedExplorerTreeNodes);
|
119
119
|
}
|
120
120
|
|
121
121
|
setIsSearchPanelOpen(val: boolean): void {
|
@@ -294,7 +294,7 @@ export class QueryBuilderPropertySearchState {
|
|
294
294
|
}
|
295
295
|
|
296
296
|
// indexing
|
297
|
-
this.searchEngine = new
|
297
|
+
this.searchEngine = new FuzzySearchEngine(this.indexedExplorerTreeNodes, {
|
298
298
|
includeScore: true,
|
299
299
|
shouldSort: true,
|
300
300
|
// Ignore location when computing the search score
|