@finos/legend-query-builder 0.6.31 → 0.6.32
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 +1 -1
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/QueryBuilderComponentTestUtils.js +2 -2
- package/lib/components/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.js +3 -2
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +1 -1
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderNavigationBlocker.js +4 -4
- package/lib/components/QueryBuilderNavigationBlocker.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +4 -3
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +4 -4
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +9 -6
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.js +1 -1
- package/lib/components/QueryBuilderTextEditor.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +2 -2
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +3 -3
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.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/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +9 -6
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +3 -3
- 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 +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/LambdaEditor.js +3 -3
- 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/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js +2 -2
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +3 -3
- package/lib/stores/QueryBuilderChangeDetectionState.js +1 -1
- package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.js +1 -1
- package/lib/stores/QueryBuilderConstantsState.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +6 -6
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +10 -10
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderTextEditorState.js +3 -3
- package/lib/stores/QueryBuilderTextEditorState.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js +4 -4
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +3 -3
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +3 -3
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js +2 -2
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/package.json +10 -10
- package/src/components/QueryBuilder.tsx +3 -1
- package/src/components/QueryBuilderComponentTestUtils.tsx +5 -2
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +6 -2
- package/src/components/QueryBuilderDiffPanel.tsx +1 -1
- package/src/components/QueryBuilderNavigationBlocker.tsx +4 -4
- package/src/components/QueryBuilderParametersPanel.tsx +9 -3
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +1 -1
- package/src/components/QueryBuilderResultPanel.tsx +4 -4
- package/src/components/QueryBuilderSideBar.tsx +18 -6
- package/src/components/QueryBuilderTextEditor.tsx +1 -1
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +2 -2
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +3 -3
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +3 -1
- package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +13 -6
- package/src/components/filter/QueryBuilderFilterPanel.tsx +3 -3
- package/src/components/shared/BasicValueSpecificationEditor.tsx +3 -1
- package/src/components/shared/LambdaEditor.tsx +3 -3
- package/src/components/workflows/ClassQueryBuilder.tsx +12 -4
- package/src/components/workflows/MappingQueryBuilder.tsx +12 -4
- package/src/components/workflows/ServiceQueryBuilder.tsx +7 -2
- package/src/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.ts +2 -2
- package/src/stores/QueryBuilderChangeDetectionState.ts +1 -1
- package/src/stores/QueryBuilderConstantsState.ts +3 -1
- package/src/stores/QueryBuilderResultState.ts +12 -6
- package/src/stores/QueryBuilderState.ts +16 -10
- package/src/stores/QueryBuilderTextEditorState.ts +3 -3
- package/src/stores/explorer/QueryBuilderExplorerState.ts +6 -4
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +3 -3
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +1 -1
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +3 -3
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +1 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.ts +2 -2
- package/src/stores/filter/QueryBuilderFilterState.ts +3 -1
|
@@ -179,10 +179,14 @@ export const QueryBuilderClassSelector = observer(
|
|
|
179
179
|
options={classOptions}
|
|
180
180
|
onChange={changeClass}
|
|
181
181
|
value={selectedClassOption}
|
|
182
|
-
darkMode={
|
|
182
|
+
darkMode={
|
|
183
|
+
!applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
184
|
+
}
|
|
183
185
|
filterOption={elementFilterOption}
|
|
184
186
|
formatOptionLabel={getPackageableElementOptionFormatter({
|
|
185
|
-
darkMode:
|
|
187
|
+
darkMode:
|
|
188
|
+
!applicationStore.layoutService
|
|
189
|
+
.TEMPORARY__isLightThemeEnabled,
|
|
186
190
|
graph: queryBuilderState.graphManagerState.graph,
|
|
187
191
|
})}
|
|
188
192
|
/>
|
|
@@ -337,10 +341,14 @@ const BasicQueryBuilderSetup = observer(
|
|
|
337
341
|
options={mappingOptions}
|
|
338
342
|
onChange={changeMapping}
|
|
339
343
|
value={selectedMappingOption}
|
|
340
|
-
darkMode={
|
|
344
|
+
darkMode={
|
|
345
|
+
!applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
346
|
+
}
|
|
341
347
|
filterOption={mappingFilterOption}
|
|
342
348
|
formatOptionLabel={getPackageableElementOptionFormatter({
|
|
343
|
-
darkMode:
|
|
349
|
+
darkMode:
|
|
350
|
+
!applicationStore.layoutService
|
|
351
|
+
.TEMPORARY__isLightThemeEnabled,
|
|
344
352
|
graph: queryBuilderState.graphManagerState.graph,
|
|
345
353
|
})}
|
|
346
354
|
/>
|
|
@@ -367,10 +375,14 @@ const BasicQueryBuilderSetup = observer(
|
|
|
367
375
|
options={runtimeOptions}
|
|
368
376
|
onChange={changeRuntime}
|
|
369
377
|
value={selectedRuntimeOption}
|
|
370
|
-
darkMode={
|
|
378
|
+
darkMode={
|
|
379
|
+
!applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
380
|
+
}
|
|
371
381
|
filterOption={runtimeFilterOption}
|
|
372
382
|
formatOptionLabel={getRuntimeOptionFormatter({
|
|
373
|
-
darkMode:
|
|
383
|
+
darkMode:
|
|
384
|
+
!applicationStore.layoutService
|
|
385
|
+
.TEMPORARY__isLightThemeEnabled,
|
|
374
386
|
pureModel: queryBuilderState.graphManagerState.graph,
|
|
375
387
|
})}
|
|
376
388
|
/>
|
|
@@ -48,7 +48,7 @@ export const QueryBuilderTextEditor = observer(
|
|
|
48
48
|
const discardChanges = (): void => {
|
|
49
49
|
queryBuilderState.textEditorState.setMode(undefined);
|
|
50
50
|
// force close the backdrop just in case changes are discarded when there are grammar issues
|
|
51
|
-
applicationStore.setShowBackdrop(false);
|
|
51
|
+
applicationStore.layoutService.setShowBackdrop(false);
|
|
52
52
|
};
|
|
53
53
|
const mode = queryTextEditorState.mode;
|
|
54
54
|
useEffect(() => {
|
|
@@ -488,7 +488,7 @@ const QueryBuilderExplorerTreeNodeContainer = observer(
|
|
|
488
488
|
!(
|
|
489
489
|
node instanceof QueryBuilderExplorerTreePropertyNodeData ||
|
|
490
490
|
node instanceof QueryBuilderExplorerTreeRootNodeData
|
|
491
|
-
) || applicationStore.showBackdrop
|
|
491
|
+
) || applicationStore.layoutService.showBackdrop
|
|
492
492
|
}
|
|
493
493
|
menuProps={{ elevation: 7 }}
|
|
494
494
|
onOpen={onContextMenuOpen}
|
|
@@ -852,7 +852,7 @@ export const QueryBuilderExplorerPanel = observer(
|
|
|
852
852
|
<div
|
|
853
853
|
data-testid={QUERY_BUILDER_TEST_ID.QUERY_BUILDER_EXPLORER}
|
|
854
854
|
className={clsx('panel query-builder__explorer', {
|
|
855
|
-
backdrop__element: applicationStore.showBackdrop,
|
|
855
|
+
backdrop__element: applicationStore.layoutService.showBackdrop,
|
|
856
856
|
})}
|
|
857
857
|
>
|
|
858
858
|
<div className="panel__header">
|
|
@@ -308,7 +308,7 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
|
308
308
|
) {
|
|
309
309
|
node.condition.setValue(item.variable);
|
|
310
310
|
} else {
|
|
311
|
-
applicationStore.notifyWarning(
|
|
311
|
+
applicationStore.notificationService.notifyWarning(
|
|
312
312
|
`Incompatible parameter type ${parameterType?.name}. ${parameterType?.name} is not compatible with type ${conditionValueType?.name}.`,
|
|
313
313
|
);
|
|
314
314
|
}
|
|
@@ -508,7 +508,7 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
|
|
|
508
508
|
);
|
|
509
509
|
} catch (error) {
|
|
510
510
|
assertErrorThrown(error);
|
|
511
|
-
applicationStore.notifyWarning(error.message);
|
|
511
|
+
applicationStore.notificationService.notifyWarning(error.message);
|
|
512
512
|
return;
|
|
513
513
|
}
|
|
514
514
|
if (node instanceof QueryBuilderPostFilterTreeGroupNodeData) {
|
|
@@ -842,7 +842,7 @@ const QueryBuilderPostFilterPanelContent = observer(
|
|
|
842
842
|
);
|
|
843
843
|
} catch (error) {
|
|
844
844
|
assertErrorThrown(error);
|
|
845
|
-
applicationStore.notifyError(error.message);
|
|
845
|
+
applicationStore.notificationService.notifyError(error.message);
|
|
846
846
|
return;
|
|
847
847
|
}
|
|
848
848
|
// NOTE: unfocus the current node when DnD a new node to the tree
|
|
@@ -84,7 +84,9 @@ const ColumnSortEditor = observer(
|
|
|
84
84
|
}
|
|
85
85
|
onChange={onChange}
|
|
86
86
|
value={value}
|
|
87
|
-
darkMode={
|
|
87
|
+
darkMode={
|
|
88
|
+
!applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
89
|
+
}
|
|
88
90
|
/>
|
|
89
91
|
<div className="query-builder__projection__options__sort__sortby">
|
|
90
92
|
{sortType.toLowerCase()}
|
|
@@ -160,7 +160,9 @@ const TDSColumnSelectorEditor = observer(
|
|
|
160
160
|
disabled={options.length < 1}
|
|
161
161
|
onChange={onChange}
|
|
162
162
|
value={value}
|
|
163
|
-
darkMode={
|
|
163
|
+
darkMode={
|
|
164
|
+
!applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
165
|
+
}
|
|
164
166
|
/>
|
|
165
167
|
<button
|
|
166
168
|
className="query-builder__olap__tds__column__remove-btn btn--dark btn--caution"
|
|
@@ -269,7 +271,7 @@ const QueryBuilderWindowColumnModalEditor = observer(
|
|
|
269
271
|
'query-builder__olap__modal',
|
|
270
272
|
{
|
|
271
273
|
'query-editor--light':
|
|
272
|
-
applicationStore.TEMPORARY__isLightThemeEnabled,
|
|
274
|
+
applicationStore.layoutService.TEMPORARY__isLightThemeEnabled,
|
|
273
275
|
},
|
|
274
276
|
])}
|
|
275
277
|
>
|
|
@@ -315,7 +317,8 @@ const QueryBuilderWindowColumnModalEditor = observer(
|
|
|
315
317
|
label: windowOpColumn.columnName,
|
|
316
318
|
}}
|
|
317
319
|
darkMode={
|
|
318
|
-
!applicationStore.
|
|
320
|
+
!applicationStore.layoutService
|
|
321
|
+
.TEMPORARY__isLightThemeEnabled
|
|
319
322
|
}
|
|
320
323
|
/>
|
|
321
324
|
</div>
|
|
@@ -430,7 +433,8 @@ const QueryBuilderWindowColumnModalEditor = observer(
|
|
|
430
433
|
label: sortByState.columnState.columnName,
|
|
431
434
|
}}
|
|
432
435
|
darkMode={
|
|
433
|
-
!applicationStore.
|
|
436
|
+
!applicationStore.layoutService
|
|
437
|
+
.TEMPORARY__isLightThemeEnabled
|
|
434
438
|
}
|
|
435
439
|
/>
|
|
436
440
|
</div>
|
|
@@ -639,7 +643,10 @@ const TDSColumnReferenceEditor = observer(
|
|
|
639
643
|
disabled={options.length < 1}
|
|
640
644
|
onChange={onChange}
|
|
641
645
|
value={value}
|
|
642
|
-
darkMode={
|
|
646
|
+
darkMode={
|
|
647
|
+
!applicationStore.layoutService
|
|
648
|
+
.TEMPORARY__isLightThemeEnabled
|
|
649
|
+
}
|
|
643
650
|
/>
|
|
644
651
|
</div>
|
|
645
652
|
</div>
|
|
@@ -1131,7 +1138,7 @@ export const QueryBuilderTDSWindowPanel = observer(
|
|
|
1131
1138
|
tdsWindowState.addWindowColumn(newWindowState);
|
|
1132
1139
|
} catch (error) {
|
|
1133
1140
|
assertErrorThrown(error);
|
|
1134
|
-
applicationStore.notifyError(error.message);
|
|
1141
|
+
applicationStore.notificationService.notifyError(error.message);
|
|
1135
1142
|
return;
|
|
1136
1143
|
}
|
|
1137
1144
|
},
|
|
@@ -162,7 +162,7 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
|
162
162
|
if (isTypeCompatibleForAssignment(parameterType, conditionValueType)) {
|
|
163
163
|
node.condition.setValue(item.variable);
|
|
164
164
|
} else {
|
|
165
|
-
applicationStore.notifyWarning(
|
|
165
|
+
applicationStore.notificationService.notifyWarning(
|
|
166
166
|
`Incompatible parameter type ${parameterType?.name}. ${parameterType?.name} is not compatible with type ${conditionValueType.name}.`,
|
|
167
167
|
);
|
|
168
168
|
}
|
|
@@ -423,7 +423,7 @@ const QueryBuilderFilterTreeNodeContainer = observer(
|
|
|
423
423
|
);
|
|
424
424
|
} catch (error) {
|
|
425
425
|
assertErrorThrown(error);
|
|
426
|
-
applicationStore.notifyWarning(error.message);
|
|
426
|
+
applicationStore.notificationService.notifyWarning(error.message);
|
|
427
427
|
return;
|
|
428
428
|
}
|
|
429
429
|
if (node instanceof QueryBuilderFilterTreeGroupNodeData) {
|
|
@@ -759,7 +759,7 @@ export const QueryBuilderFilterPanel = observer(
|
|
|
759
759
|
);
|
|
760
760
|
} catch (error) {
|
|
761
761
|
assertErrorThrown(error);
|
|
762
|
-
applicationStore.notifyWarning(error.message);
|
|
762
|
+
applicationStore.notificationService.notifyWarning(error.message);
|
|
763
763
|
return;
|
|
764
764
|
}
|
|
765
765
|
// NOTE: unfocus the current node when DnD a new node to the tree
|
|
@@ -278,7 +278,9 @@ const StringPrimitiveInstanceValueEditor = observer(
|
|
|
278
278
|
value={selectedValue}
|
|
279
279
|
inputValue={value}
|
|
280
280
|
onInputChange={handleInputChange}
|
|
281
|
-
darkMode={
|
|
281
|
+
darkMode={
|
|
282
|
+
!applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
283
|
+
}
|
|
282
284
|
isLoading={isLoading}
|
|
283
285
|
allowCreateWhileLoading={true}
|
|
284
286
|
noOptionsMessage={noOptionsMessage}
|
|
@@ -185,7 +185,7 @@ const LambdaEditorInline = observer(
|
|
|
185
185
|
const _editor = monacoEditorAPI.create(element, {
|
|
186
186
|
...getBaseTextEditorOptions(),
|
|
187
187
|
language: EDITOR_LANGUAGE.PURE,
|
|
188
|
-
theme: applicationStore.TEMPORARY__isLightThemeEnabled
|
|
188
|
+
theme: applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
189
189
|
? EDITOR_THEME.TEMPORARY__VSCODE_LIGHT
|
|
190
190
|
: EDITOR_THEME.LEGEND,
|
|
191
191
|
...lambdaEditorOptions,
|
|
@@ -464,7 +464,7 @@ const LambdaEditorPopUp = observer(
|
|
|
464
464
|
const _editor = monacoEditorAPI.create(element, {
|
|
465
465
|
...getBaseTextEditorOptions(),
|
|
466
466
|
language: EDITOR_LANGUAGE.PURE,
|
|
467
|
-
theme: applicationStore.TEMPORARY__isLightThemeEnabled
|
|
467
|
+
theme: applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
468
468
|
? EDITOR_THEME.TEMPORARY__VSCODE_LIGHT
|
|
469
469
|
: EDITOR_THEME.LEGEND,
|
|
470
470
|
});
|
|
@@ -595,7 +595,7 @@ const LambdaEditorPopUp = observer(
|
|
|
595
595
|
},
|
|
596
596
|
{
|
|
597
597
|
'lambda-editor--light':
|
|
598
|
-
applicationStore.TEMPORARY__isLightThemeEnabled,
|
|
598
|
+
applicationStore.layoutService.TEMPORARY__isLightThemeEnabled,
|
|
599
599
|
},
|
|
600
600
|
)}
|
|
601
601
|
>
|
|
@@ -153,10 +153,14 @@ const ClassQueryBuilderSetupPanelContent = observer(
|
|
|
153
153
|
options={mappingOptions}
|
|
154
154
|
onChange={changeMapping}
|
|
155
155
|
value={selectedMappingOption}
|
|
156
|
-
darkMode={
|
|
156
|
+
darkMode={
|
|
157
|
+
!applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
158
|
+
}
|
|
157
159
|
filterOption={mappingFilterOption}
|
|
158
160
|
formatOptionLabel={getPackageableElementOptionFormatter({
|
|
159
|
-
darkMode:
|
|
161
|
+
darkMode:
|
|
162
|
+
!applicationStore.layoutService
|
|
163
|
+
.TEMPORARY__isLightThemeEnabled,
|
|
160
164
|
graph: queryBuilderState.graphManagerState.graph,
|
|
161
165
|
})}
|
|
162
166
|
/>
|
|
@@ -178,10 +182,14 @@ const ClassQueryBuilderSetupPanelContent = observer(
|
|
|
178
182
|
options={runtimeOptions}
|
|
179
183
|
onChange={changeRuntime}
|
|
180
184
|
value={selectedRuntimeOption}
|
|
181
|
-
darkMode={
|
|
185
|
+
darkMode={
|
|
186
|
+
!applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
187
|
+
}
|
|
182
188
|
filterOption={runtimeFilterOption}
|
|
183
189
|
formatOptionLabel={getRuntimeOptionFormatter({
|
|
184
|
-
darkMode:
|
|
190
|
+
darkMode:
|
|
191
|
+
!applicationStore.layoutService
|
|
192
|
+
.TEMPORARY__isLightThemeEnabled,
|
|
185
193
|
pureModel: queryBuilderState.graphManagerState.graph,
|
|
186
194
|
})}
|
|
187
195
|
/>
|
|
@@ -147,10 +147,14 @@ const MappingQueryBuilderSetupPanelContent = observer(
|
|
|
147
147
|
options={mappingOptions}
|
|
148
148
|
onChange={changeMapping}
|
|
149
149
|
value={selectedMappingOption}
|
|
150
|
-
darkMode={
|
|
150
|
+
darkMode={
|
|
151
|
+
!applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
152
|
+
}
|
|
151
153
|
filterOption={mappingFilterOption}
|
|
152
154
|
formatOptionLabel={getPackageableElementOptionFormatter({
|
|
153
|
-
darkMode:
|
|
155
|
+
darkMode:
|
|
156
|
+
!applicationStore.layoutService
|
|
157
|
+
.TEMPORARY__isLightThemeEnabled,
|
|
154
158
|
graph: queryBuilderState.graphManagerState.graph,
|
|
155
159
|
})}
|
|
156
160
|
/>
|
|
@@ -170,10 +174,14 @@ const MappingQueryBuilderSetupPanelContent = observer(
|
|
|
170
174
|
options={runtimeOptions}
|
|
171
175
|
onChange={changeRuntime}
|
|
172
176
|
value={selectedRuntimeOption}
|
|
173
|
-
darkMode={
|
|
177
|
+
darkMode={
|
|
178
|
+
!applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
179
|
+
}
|
|
174
180
|
filterOption={runtimeFilterOption}
|
|
175
181
|
formatOptionLabel={getRuntimeOptionFormatter({
|
|
176
|
-
darkMode:
|
|
182
|
+
darkMode:
|
|
183
|
+
!applicationStore.layoutService
|
|
184
|
+
.TEMPORARY__isLightThemeEnabled,
|
|
177
185
|
pureModel: queryBuilderState.graphManagerState.graph,
|
|
178
186
|
})}
|
|
179
187
|
/>
|
|
@@ -121,7 +121,9 @@ const ServiceQueryBuilderSetupPanelContent = observer(
|
|
|
121
121
|
}
|
|
122
122
|
onChange={onServiceOptionChange}
|
|
123
123
|
value={selectedServiceOption}
|
|
124
|
-
darkMode={
|
|
124
|
+
darkMode={
|
|
125
|
+
!applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
|
|
126
|
+
}
|
|
125
127
|
/>
|
|
126
128
|
</div>
|
|
127
129
|
{/* We will display mapping and runtime selector for single-execution and execution context for multi-execution */}
|
|
@@ -145,7 +147,10 @@ const ServiceQueryBuilderSetupPanelContent = observer(
|
|
|
145
147
|
}
|
|
146
148
|
onChange={onExecutionContextOptionChange}
|
|
147
149
|
value={selectedExecutionContextOption}
|
|
148
|
-
darkMode={
|
|
150
|
+
darkMode={
|
|
151
|
+
!applicationStore.layoutService
|
|
152
|
+
.TEMPORARY__isLightThemeEnabled
|
|
153
|
+
}
|
|
149
154
|
/>
|
|
150
155
|
</div>
|
|
151
156
|
</>
|
|
@@ -87,7 +87,7 @@ export class V1_QueryBuilder_PureGraphManagerExtension extends QueryBuilder_Pure
|
|
|
87
87
|
graph,
|
|
88
88
|
graph,
|
|
89
89
|
this.graphManager.graphBuilderExtensions,
|
|
90
|
-
this.graphManager.
|
|
90
|
+
this.graphManager.logService,
|
|
91
91
|
).build();
|
|
92
92
|
// build include index for compatible runtime analysis
|
|
93
93
|
v1Mappings.forEach((element) => {
|
|
@@ -185,7 +185,7 @@ export class V1_QueryBuilder_PureGraphManagerExtension extends QueryBuilder_Pure
|
|
|
185
185
|
graph,
|
|
186
186
|
graph,
|
|
187
187
|
this.graphManager.graphBuilderExtensions,
|
|
188
|
-
this.graphManager.
|
|
188
|
+
this.graphManager.logService,
|
|
189
189
|
).build();
|
|
190
190
|
|
|
191
191
|
graphBuilderInput
|
|
@@ -143,7 +143,7 @@ export class QueryBuilderChangeDetectionState {
|
|
|
143
143
|
|
|
144
144
|
alertUnsavedChanges(onProceed: () => void): void {
|
|
145
145
|
if (this.hasChanged) {
|
|
146
|
-
this.querybuilderState.applicationStore.setActionAlertInfo({
|
|
146
|
+
this.querybuilderState.applicationStore.alertService.setActionAlertInfo({
|
|
147
147
|
message:
|
|
148
148
|
'Unsaved changes to your query will be lost if you continue. Do you still want to proceed?',
|
|
149
149
|
type: ActionAlertType.CAUTION,
|
|
@@ -77,7 +77,9 @@ export class QueryBuilderConstantExpressionState implements Hashable {
|
|
|
77
77
|
this.setValueSpec(valSpec);
|
|
78
78
|
} catch (error) {
|
|
79
79
|
assertErrorThrown(error);
|
|
80
|
-
this.queryBuilderState.applicationStore.notifyError(
|
|
80
|
+
this.queryBuilderState.applicationStore.notificationService.notifyError(
|
|
81
|
+
error.message,
|
|
82
|
+
);
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
85
|
}
|
|
@@ -197,11 +197,13 @@ export class QueryBuilderResultState {
|
|
|
197
197
|
this.exportDataState.pass();
|
|
198
198
|
} catch (error) {
|
|
199
199
|
assertErrorThrown(error);
|
|
200
|
-
this.queryBuilderState.applicationStore.
|
|
200
|
+
this.queryBuilderState.applicationStore.logService.error(
|
|
201
201
|
LogEvent.create(GRAPH_MANAGER_EVENT.EXECUTION_FAILURE),
|
|
202
202
|
error,
|
|
203
203
|
);
|
|
204
|
-
this.queryBuilderState.applicationStore.notifyError(
|
|
204
|
+
this.queryBuilderState.applicationStore.notificationService.notifyError(
|
|
205
|
+
error,
|
|
206
|
+
);
|
|
205
207
|
this.exportDataState.fail();
|
|
206
208
|
}
|
|
207
209
|
}
|
|
@@ -268,11 +270,13 @@ export class QueryBuilderResultState {
|
|
|
268
270
|
}
|
|
269
271
|
} catch (error) {
|
|
270
272
|
assertErrorThrown(error);
|
|
271
|
-
this.queryBuilderState.applicationStore.
|
|
273
|
+
this.queryBuilderState.applicationStore.logService.error(
|
|
272
274
|
LogEvent.create(GRAPH_MANAGER_EVENT.EXECUTION_FAILURE),
|
|
273
275
|
error,
|
|
274
276
|
);
|
|
275
|
-
this.queryBuilderState.applicationStore.notifyError(
|
|
277
|
+
this.queryBuilderState.applicationStore.notificationService.notifyError(
|
|
278
|
+
error,
|
|
279
|
+
);
|
|
276
280
|
} finally {
|
|
277
281
|
this.setIsRunningQuery(false);
|
|
278
282
|
this.pressedRunQuery.complete();
|
|
@@ -369,11 +373,13 @@ export class QueryBuilderResultState {
|
|
|
369
373
|
}
|
|
370
374
|
} catch (error) {
|
|
371
375
|
assertErrorThrown(error);
|
|
372
|
-
this.queryBuilderState.applicationStore.
|
|
376
|
+
this.queryBuilderState.applicationStore.logService.error(
|
|
373
377
|
LogEvent.create(GRAPH_MANAGER_EVENT.EXECUTION_FAILURE),
|
|
374
378
|
error,
|
|
375
379
|
);
|
|
376
|
-
this.queryBuilderState.applicationStore.notifyError(
|
|
380
|
+
this.queryBuilderState.applicationStore.notificationService.notifyError(
|
|
381
|
+
error,
|
|
382
|
+
);
|
|
377
383
|
} finally {
|
|
378
384
|
this.isGeneratingPlan = false;
|
|
379
385
|
}
|
|
@@ -268,7 +268,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
registerCommands(): void {
|
|
271
|
-
this.applicationStore.
|
|
271
|
+
this.applicationStore.commandService.registerCommand({
|
|
272
272
|
key: QUERY_BUILDER_COMMAND_KEY.COMPILE,
|
|
273
273
|
action: () => {
|
|
274
274
|
flowResult(this.compileQuery()).catch(
|
|
@@ -291,7 +291,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
|
291
291
|
|
|
292
292
|
deregisterCommands(): void {
|
|
293
293
|
[QUERY_BUILDER_COMMAND_KEY.COMPILE].forEach((key) =>
|
|
294
|
-
this.applicationStore.
|
|
294
|
+
this.applicationStore.commandService.deregisterCommand(key),
|
|
295
295
|
);
|
|
296
296
|
}
|
|
297
297
|
|
|
@@ -439,7 +439,9 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
|
439
439
|
await onSaveQuery(query);
|
|
440
440
|
} catch (error) {
|
|
441
441
|
assertErrorThrown(error);
|
|
442
|
-
this.applicationStore.notifyError(
|
|
442
|
+
this.applicationStore.notificationService.notifyError(
|
|
443
|
+
`Can't save query: ${error.message}`,
|
|
444
|
+
);
|
|
443
445
|
}
|
|
444
446
|
}
|
|
445
447
|
|
|
@@ -457,10 +459,12 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
|
457
459
|
this.graphManagerState.graph,
|
|
458
460
|
{ keepSourceInformation: true },
|
|
459
461
|
)) as string;
|
|
460
|
-
this.applicationStore.notifySuccess(
|
|
462
|
+
this.applicationStore.notificationService.notifySuccess(
|
|
463
|
+
'Compiled successfully',
|
|
464
|
+
);
|
|
461
465
|
} catch (error) {
|
|
462
466
|
assertErrorThrown(error);
|
|
463
|
-
this.applicationStore.
|
|
467
|
+
this.applicationStore.logService.error(
|
|
464
468
|
LogEvent.create(GRAPH_MANAGER_EVENT.COMPILATION_FAILURE),
|
|
465
469
|
error,
|
|
466
470
|
);
|
|
@@ -476,7 +480,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
|
476
480
|
|
|
477
481
|
// decide if we need to fall back to text mode for debugging
|
|
478
482
|
if (fallbackToTextModeForDebugging) {
|
|
479
|
-
this.applicationStore.notifyWarning(
|
|
483
|
+
this.applicationStore.notificationService.notifyWarning(
|
|
480
484
|
'Compilation failed and error cannot be located in form mode. Redirected to text mode for debugging.',
|
|
481
485
|
);
|
|
482
486
|
this.textEditorState.openModal(QueryBuilderTextEditorMode.TEXT);
|
|
@@ -487,7 +491,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
|
487
491
|
// of query builder text-mode
|
|
488
492
|
// See https://github.com/finos/legend-studio/issues/319
|
|
489
493
|
} else {
|
|
490
|
-
this.applicationStore.notifyWarning(
|
|
494
|
+
this.applicationStore.notificationService.notifyWarning(
|
|
491
495
|
`Compilation failed: ${error.message}`,
|
|
492
496
|
);
|
|
493
497
|
}
|
|
@@ -503,15 +507,17 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
|
503
507
|
this.graphManagerState.graph,
|
|
504
508
|
{ keepSourceInformation: true },
|
|
505
509
|
)) as string;
|
|
506
|
-
this.applicationStore.notifySuccess(
|
|
510
|
+
this.applicationStore.notificationService.notifySuccess(
|
|
511
|
+
'Compiled successfully',
|
|
512
|
+
);
|
|
507
513
|
} catch (error) {
|
|
508
514
|
assertErrorThrown(error);
|
|
509
515
|
if (error instanceof CompilationError) {
|
|
510
|
-
this.applicationStore.
|
|
516
|
+
this.applicationStore.logService.error(
|
|
511
517
|
LogEvent.create(GRAPH_MANAGER_EVENT.COMPILATION_FAILURE),
|
|
512
518
|
error,
|
|
513
519
|
);
|
|
514
|
-
this.applicationStore.notifyWarning(
|
|
520
|
+
this.applicationStore.notificationService.notifyWarning(
|
|
515
521
|
`Compilation failed: ${error.message}`,
|
|
516
522
|
);
|
|
517
523
|
const errorElementCoordinates = extractSourceInformationCoordinates(
|
|
@@ -118,7 +118,7 @@ export class QueryBuilderTextEditorState extends LambdaEditorState {
|
|
|
118
118
|
if (error instanceof ParserError) {
|
|
119
119
|
this.setParserError(error);
|
|
120
120
|
}
|
|
121
|
-
this.queryBuilderState.applicationStore.
|
|
121
|
+
this.queryBuilderState.applicationStore.logService.error(
|
|
122
122
|
LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE),
|
|
123
123
|
error,
|
|
124
124
|
);
|
|
@@ -156,7 +156,7 @@ export class QueryBuilderTextEditorState extends LambdaEditorState {
|
|
|
156
156
|
this.isConvertingLambdaToString = false;
|
|
157
157
|
} catch (error) {
|
|
158
158
|
assertErrorThrown(error);
|
|
159
|
-
this.queryBuilderState.applicationStore.
|
|
159
|
+
this.queryBuilderState.applicationStore.logService.error(
|
|
160
160
|
LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE),
|
|
161
161
|
error,
|
|
162
162
|
);
|
|
@@ -194,7 +194,7 @@ export class QueryBuilderTextEditorState extends LambdaEditorState {
|
|
|
194
194
|
if (this.mode === QueryBuilderTextEditorMode.TEXT) {
|
|
195
195
|
yield flowResult(this.convertLambdaGrammarStringToObject());
|
|
196
196
|
if (this.parserError) {
|
|
197
|
-
this.queryBuilderState.applicationStore.notifyError(
|
|
197
|
+
this.queryBuilderState.applicationStore.notificationService.notifyError(
|
|
198
198
|
`Can't parse query. Please fix error before closing: ${this.parserError.message}`,
|
|
199
199
|
);
|
|
200
200
|
} else {
|
|
@@ -679,7 +679,9 @@ export class QueryBuilderExplorerState {
|
|
|
679
679
|
this.refreshTreeData();
|
|
680
680
|
} catch (error) {
|
|
681
681
|
assertErrorThrown(error);
|
|
682
|
-
this.queryBuilderState.applicationStore.notifyError(
|
|
682
|
+
this.queryBuilderState.applicationStore.notificationService.notifyError(
|
|
683
|
+
error.message,
|
|
684
|
+
);
|
|
683
685
|
} finally {
|
|
684
686
|
this.mappingModelCoverageAnalysisState.complete();
|
|
685
687
|
}
|
|
@@ -691,7 +693,7 @@ export class QueryBuilderExplorerState {
|
|
|
691
693
|
): GeneratorFn<void> {
|
|
692
694
|
const runtime = this.queryBuilderState.runtimeValue;
|
|
693
695
|
if (!runtime) {
|
|
694
|
-
this.queryBuilderState.applicationStore.notifyWarning(
|
|
696
|
+
this.queryBuilderState.applicationStore.notificationService.notifyWarning(
|
|
695
697
|
`Can't preview data for property '${node.property.name}': runtime is not specified`,
|
|
696
698
|
);
|
|
697
699
|
return;
|
|
@@ -704,7 +706,7 @@ export class QueryBuilderExplorerState {
|
|
|
704
706
|
return;
|
|
705
707
|
}
|
|
706
708
|
if (this.previewDataState.isGeneratingPreviewData) {
|
|
707
|
-
this.queryBuilderState.applicationStore.notifyWarning(
|
|
709
|
+
this.queryBuilderState.applicationStore.notificationService.notifyWarning(
|
|
708
710
|
`Can't preview data for property '${node.property.name}': another preview request is being executed`,
|
|
709
711
|
);
|
|
710
712
|
return;
|
|
@@ -786,7 +788,7 @@ export class QueryBuilderExplorerState {
|
|
|
786
788
|
}
|
|
787
789
|
} catch (error) {
|
|
788
790
|
assertErrorThrown(error);
|
|
789
|
-
this.queryBuilderState.applicationStore.notifyWarning(
|
|
791
|
+
this.queryBuilderState.applicationStore.notificationService.notifyWarning(
|
|
790
792
|
`Can't preview data for property '${node.property.name}'. Error: ${error.message}`,
|
|
791
793
|
);
|
|
792
794
|
this.previewDataState.setPreviewData(undefined);
|
|
@@ -181,7 +181,7 @@ export class QueryBuilderGraphFetchTreeState
|
|
|
181
181
|
},
|
|
182
182
|
): void {
|
|
183
183
|
if (!this.treeData) {
|
|
184
|
-
this.queryBuilderState.applicationStore.notifyWarning(
|
|
184
|
+
this.queryBuilderState.applicationStore.notificationService.notifyWarning(
|
|
185
185
|
`Can't add property: graph-fetch tree has not been properly initialized`,
|
|
186
186
|
);
|
|
187
187
|
return;
|
|
@@ -211,7 +211,7 @@ export class QueryBuilderGraphFetchTreeState
|
|
|
211
211
|
|
|
212
212
|
fetchProperties(nodes: QueryBuilderExplorerTreePropertyNodeData[]): void {
|
|
213
213
|
if (!this.treeData) {
|
|
214
|
-
this.queryBuilderState.applicationStore.notifyWarning(
|
|
214
|
+
this.queryBuilderState.applicationStore.notificationService.notifyWarning(
|
|
215
215
|
`Can't add property: graph-fetch tree has not been properly initialized`,
|
|
216
216
|
);
|
|
217
217
|
return;
|
|
@@ -224,7 +224,7 @@ export class QueryBuilderGraphFetchTreeState
|
|
|
224
224
|
|
|
225
225
|
checkBeforeChangingImplementation(onChange: () => void): void {
|
|
226
226
|
if (this.treeData?.rootIds.length) {
|
|
227
|
-
this.queryBuilderState.applicationStore.setActionAlertInfo({
|
|
227
|
+
this.queryBuilderState.applicationStore.alertService.setActionAlertInfo({
|
|
228
228
|
message:
|
|
229
229
|
'Current graph-fetch will be lost when switching to projection mode. Do you still want to proceed?',
|
|
230
230
|
type: ActionAlertType.CAUTION,
|
|
@@ -253,7 +253,7 @@ export const addQueryBuilderPropertyNode = (
|
|
|
253
253
|
parentExplorerTreeNode.parentId,
|
|
254
254
|
);
|
|
255
255
|
} else {
|
|
256
|
-
queryBuilderState.applicationStore.notifyError(
|
|
256
|
+
queryBuilderState.applicationStore.notificationService.notifyError(
|
|
257
257
|
`Can't cast the root class of graph fetch structure to its subtype`,
|
|
258
258
|
);
|
|
259
259
|
return;
|
|
@@ -360,7 +360,7 @@ export class QueryBuilderTDSState
|
|
|
360
360
|
});
|
|
361
361
|
} catch (error) {
|
|
362
362
|
assertErrorThrown(error);
|
|
363
|
-
this.queryBuilderState.applicationStore.
|
|
363
|
+
this.queryBuilderState.applicationStore.logService.error(
|
|
364
364
|
LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE),
|
|
365
365
|
error,
|
|
366
366
|
);
|
|
@@ -609,7 +609,7 @@ export class QueryBuilderTDSState
|
|
|
609
609
|
}
|
|
610
610
|
|
|
611
611
|
checkBeforeClearingColumns(onChange: () => void): void {
|
|
612
|
-
this.queryBuilderState.applicationStore.setActionAlertInfo({
|
|
612
|
+
this.queryBuilderState.applicationStore.alertService.setActionAlertInfo({
|
|
613
613
|
message:
|
|
614
614
|
'You will be clearing all projection columns. Do you still want to proceed?',
|
|
615
615
|
type: ActionAlertType.CAUTION,
|
|
@@ -637,7 +637,7 @@ export class QueryBuilderTDSState
|
|
|
637
637
|
// but we make the assumption that if there is no projection column, there should
|
|
638
638
|
// not be any post-filter at all
|
|
639
639
|
) {
|
|
640
|
-
this.queryBuilderState.applicationStore.setActionAlertInfo({
|
|
640
|
+
this.queryBuilderState.applicationStore.alertService.setActionAlertInfo({
|
|
641
641
|
message:
|
|
642
642
|
this.showPostFilterPanel && this.postFilterState.nodes.size > 0
|
|
643
643
|
? 'With graph-fetch mode, post filter is not supported. Current projection columns and post filters will be lost when switching to the graph-fetch mode. Do you still want to proceed?'
|
|
@@ -452,7 +452,7 @@ export class PostFilterConditionState implements Hashable {
|
|
|
452
452
|
}
|
|
453
453
|
} catch (error) {
|
|
454
454
|
assertErrorThrown(error);
|
|
455
|
-
this.postFilterState.tdsState.queryBuilderState.applicationStore.notifyError(
|
|
455
|
+
this.postFilterState.tdsState.queryBuilderState.applicationStore.notificationService.notifyError(
|
|
456
456
|
`Can't drag column '${columnState.columnName}' due to: ${error.message}`,
|
|
457
457
|
);
|
|
458
458
|
}
|