@finos/legend-query-builder 0.6.31 → 0.6.33
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +3 -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.d.ts.map +1 -1
- package/lib/components/QueryBuilderTextEditor.js +3 -3
- 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/LegendQueryStorage.d.ts +19 -0
- package/lib/stores/LegendQueryStorage.d.ts.map +1 -0
- package/lib/stores/LegendQueryStorage.js +20 -0
- package/lib/stores/LegendQueryStorage.js.map +1 -0
- 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 +4 -4
- 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.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +7 -4
- 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 +8 -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 +14 -6
- 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/LegendQueryStorage.ts +19 -0
- 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 +4 -4
- 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 +10 -4
- 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
- package/tsconfig.json +1 -0
@@ -169,7 +169,7 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
169
169
|
isDefaultDatePropagationSupported(nextExpression, queryBuilderState) &&
|
170
170
|
nextExpression.func.value.genericType.value.rawType instanceof Class
|
171
171
|
) {
|
172
|
-
queryBuilderState.applicationStore.setActionAlertInfo({
|
172
|
+
queryBuilderState.applicationStore.alertService.setActionAlertInfo({
|
173
173
|
message:
|
174
174
|
'You have just changed a milestoning date in the property expression chain, this date will be propagated down the rest of the chain. Do you want to proceed? Otherwise, you can choose to propagate the default milestoning dates instead.',
|
175
175
|
type: ActionAlertType.CAUTION,
|
@@ -188,7 +188,7 @@ const QueryBuilderGridResultContextMenu = observer(
|
|
188
188
|
);
|
189
189
|
} catch (error) {
|
190
190
|
assertErrorThrown(error);
|
191
|
-
applicationStore.notifyWarning(error.message);
|
191
|
+
applicationStore.notificationService.notifyWarning(error.message);
|
192
192
|
return;
|
193
193
|
}
|
194
194
|
postFilterState.addNodeFromNode(
|
@@ -278,11 +278,11 @@ const QueryBuilderGridResultContextMenu = observer(
|
|
278
278
|
};
|
279
279
|
|
280
280
|
const handleCopyCellValue = applicationStore.guardUnhandledError(() =>
|
281
|
-
applicationStore.copyTextToClipboard(event?.value),
|
281
|
+
applicationStore.clipboardService.copyTextToClipboard(event?.value),
|
282
282
|
);
|
283
283
|
|
284
284
|
const handleCopyRowValue = applicationStore.guardUnhandledError(() =>
|
285
|
-
applicationStore.copyTextToClipboard(
|
285
|
+
applicationStore.clipboardService.copyTextToClipboard(
|
286
286
|
Object.values(event?.data).toString(),
|
287
287
|
),
|
288
288
|
);
|
@@ -456,7 +456,7 @@ export const QueryBuilderResultPanel = observer(
|
|
456
456
|
};
|
457
457
|
|
458
458
|
const confirmExport = (format: EXECUTION_SERIALIZATION_FORMAT): void => {
|
459
|
-
applicationStore.setActionAlertInfo({
|
459
|
+
applicationStore.alertService.setActionAlertInfo({
|
460
460
|
message: USER_ATTESTATION_MESSAGE,
|
461
461
|
type: ActionAlertType.CAUTION,
|
462
462
|
actions: [
|
@@ -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
|
/>
|
@@ -22,6 +22,7 @@ import {
|
|
22
22
|
Modal,
|
23
23
|
ModalBody,
|
24
24
|
ModalFooter,
|
25
|
+
ModalFooterButton,
|
25
26
|
ModalFooterStatus,
|
26
27
|
ModalHeader,
|
27
28
|
PanelLoadingIndicator,
|
@@ -48,7 +49,7 @@ export const QueryBuilderTextEditor = observer(
|
|
48
49
|
const discardChanges = (): void => {
|
49
50
|
queryBuilderState.textEditorState.setMode(undefined);
|
50
51
|
// force close the backdrop just in case changes are discarded when there are grammar issues
|
51
|
-
applicationStore.setShowBackdrop(false);
|
52
|
+
applicationStore.layoutService.setShowBackdrop(false);
|
52
53
|
};
|
53
54
|
const mode = queryTextEditorState.mode;
|
54
55
|
useEffect(() => {
|
@@ -120,13 +121,20 @@ export const QueryBuilderTextEditor = observer(
|
|
120
121
|
.isInProgress && (
|
121
122
|
<ModalFooterStatus>Closing Query...</ModalFooterStatus>
|
122
123
|
)}
|
124
|
+
{queryBuilderState.queryCompileState.isInProgress && (
|
125
|
+
<ModalFooterStatus>
|
126
|
+
<div className="loading-icon__container--spinning">
|
127
|
+
<RefreshIcon />
|
128
|
+
</div>
|
129
|
+
Compiling Query...
|
130
|
+
</ModalFooterStatus>
|
131
|
+
)}
|
123
132
|
{mode === QueryBuilderTextEditorMode.TEXT && (
|
124
|
-
<
|
125
|
-
className="btn
|
133
|
+
<ModalFooterButton
|
134
|
+
className="btn--caution"
|
126
135
|
onClick={discardChanges}
|
127
|
-
|
128
|
-
|
129
|
-
</button>
|
136
|
+
text="Discard Changes"
|
137
|
+
/>
|
130
138
|
)}
|
131
139
|
<button
|
132
140
|
className="btn btn--dark"
|
@@ -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
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
export enum LEGEND_QUERY_SETTINGS_KEY {
|
18
|
+
EDITOR_SHOW_POST_FILTER = 'editor.showPostFilter',
|
19
|
+
}
|
@@ -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(
|
@@ -109,7 +109,7 @@ export class QueryBuilderTextEditorState extends LambdaEditorState {
|
|
109
109
|
(yield this.queryBuilderState.graphManagerState.graphManager.pureCodeToLambda(
|
110
110
|
this.fullLambdaString,
|
111
111
|
this.lambdaId,
|
112
|
-
{ pruneSourceInformation:
|
112
|
+
{ pruneSourceInformation: false },
|
113
113
|
)) as RawLambda;
|
114
114
|
this.setParserError(undefined);
|
115
115
|
this.rawLambdaState.setLambda(lambda);
|
@@ -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 {
|