@finos/legend-query-builder 0.6.33 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/application/QueryBuilderEvent.d.ts.map +1 -0
- package/lib/application/QueryBuilderEvent.js.map +1 -0
- package/lib/{stores/LegendQueryStorage.js → application/QueryBuilderSetting.d.ts} +6 -5
- package/lib/application/QueryBuilderSetting.d.ts.map +1 -0
- package/lib/application/QueryBuilderSetting.js +25 -0
- package/lib/application/QueryBuilderSetting.js.map +1 -0
- package/lib/{stores/QueryBuilderTelemetry.d.ts → application/QueryBuilderTelemetryHelper.d.ts} +5 -8
- package/lib/application/QueryBuilderTelemetryHelper.d.ts.map +1 -0
- package/lib/{stores/QueryBuilderTelemetry.js → application/QueryBuilderTelemetryHelper.js} +8 -8
- package/lib/application/QueryBuilderTelemetryHelper.js.map +1 -0
- package/lib/components/QueryBuilder.d.ts +0 -1
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +4 -4
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/{stores/LegendQueryStorage.d.ts → components/QueryBuilderComponentElement.d.ts} +3 -3
- package/lib/components/QueryBuilderComponentElement.d.ts.map +1 -0
- package/lib/components/QueryBuilderComponentElement.js +20 -0
- package/lib/components/QueryBuilderComponentElement.js.map +1 -0
- package/lib/components/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/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/explorer/QueryBuilderPropertySearchState.d.ts +2 -2
- package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchState.js +3 -3
- package/lib/stores/explorer/QueryBuilderPropertySearchState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +2 -2
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/package.json +11 -11
- package/src/application/QueryBuilderSetting.ts +27 -0
- package/src/{stores/QueryBuilderTelemetry.ts → application/QueryBuilderTelemetryHelper.ts} +5 -14
- package/src/components/QueryBuilder.tsx +7 -7
- package/src/{stores/LegendQueryStorage.ts → components/QueryBuilderComponentElement.ts} +2 -2
- 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/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/explorer/QueryBuilderPropertySearchState.ts +4 -4
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +4 -5
- package/tsconfig.json +5 -5
- package/tsconfig.package.json +1 -2
- package/lib/stores/LegendQueryStorage.d.ts.map +0 -1
- package/lib/stores/LegendQueryStorage.js.map +0 -1
- package/lib/stores/QueryBuilderEvent.d.ts.map +0 -1
- package/lib/stores/QueryBuilderEvent.js.map +0 -1
- package/lib/stores/QueryBuilderTelemetry.d.ts.map +0 -1
- package/lib/stores/QueryBuilderTelemetry.js.map +0 -1
- /package/lib/{stores → application}/QueryBuilderEvent.d.ts +0 -0
- /package/lib/{stores → application}/QueryBuilderEvent.js +0 -0
- /package/src/{stores → application}/QueryBuilderEvent.ts +0 -0
@@ -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;
|
@@ -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,7 +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 {
|
99
|
+
import { QUERY_BUILDER_SETTING_KEY } from '../../../application/QueryBuilderSetting.js';
|
100
100
|
|
101
101
|
export class QueryBuilderTDSState
|
102
102
|
extends QueryBuilderFetchStructureImplementationState
|
@@ -154,10 +154,9 @@ export class QueryBuilderTDSState
|
|
154
154
|
this.windowFuncOperators,
|
155
155
|
);
|
156
156
|
this.showPostFilterPanel =
|
157
|
-
this.queryBuilderState.applicationStore.
|
158
|
-
|
159
|
-
|
160
|
-
);
|
157
|
+
this.queryBuilderState.applicationStore.settingService.getBooleanValue(
|
158
|
+
QUERY_BUILDER_SETTING_KEY.SHOW_POST_FILTER_PANEL,
|
159
|
+
) ?? false;
|
161
160
|
}
|
162
161
|
|
163
162
|
get type(): string {
|
package/tsconfig.json
CHANGED
@@ -15,8 +15,7 @@
|
|
15
15
|
"module": "nodenext",
|
16
16
|
"skipLibCheck": true,
|
17
17
|
"resolveJsonModule": true,
|
18
|
-
"
|
19
|
-
"importsNotUsedAsValues": "error",
|
18
|
+
"verbatimModuleSyntax": true,
|
20
19
|
"strict": true,
|
21
20
|
"noImplicitOverride": true,
|
22
21
|
"noUncheckedIndexedAccess": true,
|
@@ -34,6 +33,10 @@
|
|
34
33
|
],
|
35
34
|
"files": [
|
36
35
|
"./src/index.ts",
|
36
|
+
"./src/application/QueryBuilderEvent.ts",
|
37
|
+
"./src/application/QueryBuilderSetting.ts",
|
38
|
+
"./src/application/QueryBuilderTelemetryHelper.ts",
|
39
|
+
"./src/components/QueryBuilderComponentElement.ts",
|
37
40
|
"./src/components/QueryBuilder_LegendApplicationPlugin.ts",
|
38
41
|
"./src/components/QueryBuilder_TestID.ts",
|
39
42
|
"./src/components/QuerySetupUtils.ts",
|
@@ -48,13 +51,11 @@
|
|
48
51
|
"./src/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts",
|
49
52
|
"./src/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.ts",
|
50
53
|
"./src/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts",
|
51
|
-
"./src/stores/LegendQueryStorage.ts",
|
52
54
|
"./src/stores/QueryBuilderBootstraper.ts",
|
53
55
|
"./src/stores/QueryBuilderChangeDetectionState.ts",
|
54
56
|
"./src/stores/QueryBuilderCommand.ts",
|
55
57
|
"./src/stores/QueryBuilderConfig.ts",
|
56
58
|
"./src/stores/QueryBuilderConstantsState.ts",
|
57
|
-
"./src/stores/QueryBuilderEvent.ts",
|
58
59
|
"./src/stores/QueryBuilderGroupOperationHelper.ts",
|
59
60
|
"./src/stores/QueryBuilderParametersState.ts",
|
60
61
|
"./src/stores/QueryBuilderPreviewDataHelper.ts",
|
@@ -63,7 +64,6 @@
|
|
63
64
|
"./src/stores/QueryBuilderState.ts",
|
64
65
|
"./src/stores/QueryBuilderStateBuilder.ts",
|
65
66
|
"./src/stores/QueryBuilderStateTestUtils.ts",
|
66
|
-
"./src/stores/QueryBuilderTelemetry.ts",
|
67
67
|
"./src/stores/QueryBuilderTextEditorState.ts",
|
68
68
|
"./src/stores/QueryBuilderTypeaheadHelper.ts",
|
69
69
|
"./src/stores/QueryBuilderUnsupportedQueryState.ts",
|
package/tsconfig.package.json
CHANGED
@@ -15,8 +15,7 @@
|
|
15
15
|
"module": "nodenext",
|
16
16
|
"skipLibCheck": true,
|
17
17
|
"resolveJsonModule": true,
|
18
|
-
"
|
19
|
-
"importsNotUsedAsValues": "error",
|
18
|
+
"verbatimModuleSyntax": true,
|
20
19
|
"strict": true,
|
21
20
|
"noImplicitOverride": true,
|
22
21
|
"noUncheckedIndexedAccess": true,
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryStorage.d.ts","sourceRoot":"","sources":["../../src/stores/LegendQueryStorage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,yBAAyB;IACnC,uBAAuB,0BAA0B;CAClD"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryStorage.js","sourceRoot":"","sources":["../../src/stores/LegendQueryStorage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,yBAEX;AAFD,WAAY,yBAAyB;IACnC,8EAAiD,CAAA;AACnD,CAAC,EAFW,yBAAyB,GAAzB,yBAAyB,KAAzB,yBAAyB,QAEpC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderEvent.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderEvent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,mBAAmB;IAC7B,iBAAiB,sCAAsC;IACvD,+BAA+B,0CAA0C;IACzE,4BAA4B,uCAAuC;IAEnE,kBAAkB,uCAAuC;IACzD,gCAAgC,2CAA2C;IAC3E,6BAA6B,wCAAwC;IACrE,6BAA6B,+CAA+C;CAC7E"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderEvent.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderEvent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,8EAAuD,CAAA;IACvD,gGAAyE,CAAA;IACzE,0FAAmE,CAAA;IAEnE,gFAAyD,CAAA;IACzD,kGAA2E,CAAA;IAC3E,4FAAqE,CAAA;IACrE,mGAA4E,CAAA;AAC9E,CAAC,EATW,mBAAmB,GAAnB,mBAAmB,KAAnB,mBAAmB,QAS9B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderTelemetry.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderTelemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,KAAK,kCAAkC,GAAG;IACxC,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,KAAK,4BAA4B,GAAG,2BAA2B,GAAG;IAChE,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,qBAAa,qBAAqB;IAChC,MAAM,CAAC,yBAAyB,CAC9B,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,kCAAkC,GACvC,IAAI;IAIP,MAAM,CAAC,wCAAwC,CAC7C,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,kCAAkC,GACvC,IAAI;IAOP,MAAM,CAAC,mCAAmC,CACxC,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,kCAAkC,GACvC,IAAI;IAOP,MAAM,CAAC,0BAA0B,CAC/B,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,4BAA4B,GACjC,IAAI;IAIP,MAAM,CAAC,yCAAyC,CAC9C,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,4BAA4B,GACjC,IAAI;IAOP,MAAM,CAAC,oCAAoC,CACzC,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,4BAA4B,GACjC,IAAI;CAMR"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderTelemetry.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderTelemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAU7D,MAAM,OAAO,qBAAqB;IAChC,MAAM,CAAC,yBAAyB,CAC9B,gBAAkC,EAClC,IAAwC;QAExC,gBAAgB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,CAAC,wCAAwC,CAC7C,gBAAkC,EAClC,IAAwC;QAExC,gBAAgB,CAAC,QAAQ,CACvB,mBAAmB,CAAC,+BAA+B,EACnD,IAAI,CACL,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,mCAAmC,CACxC,gBAAkC,EAClC,IAAwC;QAExC,gBAAgB,CAAC,QAAQ,CACvB,mBAAmB,CAAC,4BAA4B,EAChD,IAAI,CACL,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,0BAA0B,CAC/B,gBAAkC,EAClC,IAAkC;QAElC,gBAAgB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAC1E,CAAC;IAED,MAAM,CAAC,yCAAyC,CAC9C,gBAAkC,EAClC,IAAkC;QAElC,gBAAgB,CAAC,QAAQ,CACvB,mBAAmB,CAAC,gCAAgC,EACpD,IAAI,CACL,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,oCAAoC,CACzC,gBAAkC,EAClC,IAAkC;QAElC,gBAAgB,CAAC,QAAQ,CACvB,mBAAmB,CAAC,6BAA6B,EACjD,IAAI,CACL,CAAC;IACJ,CAAC;CACF"}
|
File without changes
|
File without changes
|
File without changes
|