@finos/legend-query-builder 0.6.32 → 1.0.0
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/application/QueryBuilderEvent.d.ts.map +1 -0
- package/lib/application/QueryBuilderEvent.js.map +1 -0
- package/lib/application/QueryBuilderSetting.d.ts +21 -0
- 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.d.ts +0 -1
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +4 -2
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderComponentElement.d.ts +19 -0
- 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/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.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 +5 -3
- package/lib/components/QueryBuilderParametersPanel.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 +2 -2
- package/lib/components/QueryBuilderTextEditor.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/QueryBuilderPropertySearchPanel.js +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.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/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +6 -5
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.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 +18 -17
- 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 +4 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -3
- 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/QueryBuilderTextEditorState.js +1 -1
- package/lib/stores/QueryBuilderTextEditorState.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 +4 -1
- 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 +9 -4
- package/src/components/QueryBuilderComponentElement.ts +19 -0
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +3 -2
- package/src/components/QueryBuilderDiffPanel.tsx +2 -1
- package/src/components/QueryBuilderNavigationBlocker.tsx +1 -2
- package/src/components/QueryBuilderParametersPanel.tsx +5 -3
- package/src/components/QueryBuilderSideBar.tsx +9 -6
- package/src/components/QueryBuilderTextEditor.tsx +13 -5
- package/src/components/QueryBuilder_LegendApplicationPlugin.ts +9 -0
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +1 -1
- package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +6 -5
- package/src/components/shared/BasicValueSpecificationEditor.tsx +4 -3
- package/src/components/shared/LambdaEditor.tsx +14 -22
- 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 +6 -6
- package/src/stores/QueryBuilderChangeDetectionState.ts +1 -1
- package/src/stores/QueryBuilderResultState.ts +8 -23
- package/src/stores/QueryBuilderState.ts +7 -8
- package/src/stores/QueryBuilderTextEditorState.ts +1 -1
- package/src/stores/explorer/QueryBuilderPropertySearchState.ts +4 -4
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +6 -1
- package/tsconfig.json +5 -4
- package/tsconfig.package.json +1 -2
- 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
|
@@ -175,12 +175,13 @@ const VariableExpressionEditor = observer(
|
|
|
175
175
|
onChange={changeType}
|
|
176
176
|
value={selectedType}
|
|
177
177
|
darkMode={
|
|
178
|
-
!applicationStore.layoutService
|
|
178
|
+
!applicationStore.layoutService
|
|
179
|
+
.TEMPORARY__isLightColorThemeEnabled
|
|
179
180
|
}
|
|
180
181
|
formatOptionLabel={getPackageableElementOptionFormatter({
|
|
181
182
|
darkMode:
|
|
182
183
|
!applicationStore.layoutService
|
|
183
|
-
.
|
|
184
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
|
184
185
|
graph: queryBuilderState.graphManagerState.graph,
|
|
185
186
|
})}
|
|
186
187
|
/>
|
|
@@ -204,7 +205,8 @@ const VariableExpressionEditor = observer(
|
|
|
204
205
|
)
|
|
205
206
|
}
|
|
206
207
|
darkMode={
|
|
207
|
-
!applicationStore.layoutService
|
|
208
|
+
!applicationStore.layoutService
|
|
209
|
+
.TEMPORARY__isLightColorThemeEnabled
|
|
208
210
|
}
|
|
209
211
|
/>
|
|
210
212
|
</div>
|
|
@@ -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
|
/>
|
|
@@ -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,
|
|
@@ -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"
|
|
@@ -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
|
}
|
|
@@ -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">
|
|
@@ -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>
|
|
@@ -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}
|
|
@@ -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,6 +14,10 @@
|
|
|
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
|
|
|
@@ -23,10 +27,8 @@ export {
|
|
|
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;
|
|
@@ -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);
|
|
@@ -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
|
|
@@ -96,6 +96,7 @@ import { QueryBuilderWindowState } from './window/QueryBuilderWindowState.js';
|
|
|
96
96
|
import type { QueryBuilderTDS_WindowOperator } from './window/operators/QueryBuilderTDS_WindowOperator.js';
|
|
97
97
|
import { getQueryBuilderCoreWindowOperators } from './window/QueryBuilderWindowGroupByOperatorLoader.js';
|
|
98
98
|
import type { QueryBuilderTDSColumnState } from './QueryBuilderTDSColumnState.js';
|
|
99
|
+
import { QUERY_BUILDER_SETTING_KEY } from '../../../application/QueryBuilderSetting.js';
|
|
99
100
|
|
|
100
101
|
export class QueryBuilderTDSState
|
|
101
102
|
extends QueryBuilderFetchStructureImplementationState
|
|
@@ -107,7 +108,7 @@ export class QueryBuilderTDSState
|
|
|
107
108
|
readonly resultSetModifierState: QueryResultSetModifierState;
|
|
108
109
|
projectionColumns: QueryBuilderProjectionColumnState[] = [];
|
|
109
110
|
isConvertDerivationProjectionObjects = false;
|
|
110
|
-
showPostFilterPanel
|
|
111
|
+
showPostFilterPanel: boolean;
|
|
111
112
|
showWindowFuncPanel = false;
|
|
112
113
|
|
|
113
114
|
postFilterOperators: QueryBuilderPostFilterOperator[] =
|
|
@@ -152,6 +153,10 @@ export class QueryBuilderTDSState
|
|
|
152
153
|
this,
|
|
153
154
|
this.windowFuncOperators,
|
|
154
155
|
);
|
|
156
|
+
this.showPostFilterPanel =
|
|
157
|
+
this.queryBuilderState.applicationStore.settingService.getBooleanValue(
|
|
158
|
+
QUERY_BUILDER_SETTING_KEY.SHOW_POST_FILTER_PANEL,
|
|
159
|
+
) ?? false;
|
|
155
160
|
}
|
|
156
161
|
|
|
157
162
|
get type(): string {
|