@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.
Files changed (117) hide show
  1. package/lib/application/QueryBuilderEvent.d.ts.map +1 -0
  2. package/lib/application/QueryBuilderEvent.js.map +1 -0
  3. package/lib/{stores/LegendQueryStorage.js → application/QueryBuilderSetting.d.ts} +6 -5
  4. package/lib/application/QueryBuilderSetting.d.ts.map +1 -0
  5. package/lib/application/QueryBuilderSetting.js +25 -0
  6. package/lib/application/QueryBuilderSetting.js.map +1 -0
  7. package/lib/{stores/QueryBuilderTelemetry.d.ts → application/QueryBuilderTelemetryHelper.d.ts} +5 -8
  8. package/lib/application/QueryBuilderTelemetryHelper.d.ts.map +1 -0
  9. package/lib/{stores/QueryBuilderTelemetry.js → application/QueryBuilderTelemetryHelper.js} +8 -8
  10. package/lib/application/QueryBuilderTelemetryHelper.js.map +1 -0
  11. package/lib/components/QueryBuilder.d.ts +0 -1
  12. package/lib/components/QueryBuilder.d.ts.map +1 -1
  13. package/lib/components/QueryBuilder.js +4 -4
  14. package/lib/components/QueryBuilder.js.map +1 -1
  15. package/lib/{stores/LegendQueryStorage.d.ts → components/QueryBuilderComponentElement.d.ts} +3 -3
  16. package/lib/components/QueryBuilderComponentElement.d.ts.map +1 -0
  17. package/lib/components/QueryBuilderComponentElement.js +20 -0
  18. package/lib/components/QueryBuilderComponentElement.js.map +1 -0
  19. package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
  20. package/lib/components/QueryBuilderConstantExpressionPanel.js +3 -2
  21. package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
  22. package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
  23. package/lib/components/QueryBuilderDiffPanel.js +2 -1
  24. package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
  25. package/lib/components/QueryBuilderNavigationBlocker.d.ts.map +1 -1
  26. package/lib/components/QueryBuilderNavigationBlocker.js +1 -2
  27. package/lib/components/QueryBuilderNavigationBlocker.js.map +1 -1
  28. package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
  29. package/lib/components/QueryBuilderParametersPanel.js +5 -3
  30. package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
  31. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  32. package/lib/components/QueryBuilderSideBar.js +9 -6
  33. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  34. package/lib/components/QueryBuilder_LegendApplicationPlugin.d.ts +2 -1
  35. package/lib/components/QueryBuilder_LegendApplicationPlugin.d.ts.map +1 -1
  36. package/lib/components/QueryBuilder_LegendApplicationPlugin.js +7 -2
  37. package/lib/components/QueryBuilder_LegendApplicationPlugin.js.map +1 -1
  38. package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +1 -1
  39. package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
  40. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +1 -1
  41. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  42. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
  43. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +6 -5
  44. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
  45. package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
  46. package/lib/components/shared/BasicValueSpecificationEditor.js +2 -1
  47. package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
  48. package/lib/components/shared/LambdaEditor.d.ts +0 -5
  49. package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
  50. package/lib/components/shared/LambdaEditor.js +18 -17
  51. package/lib/components/shared/LambdaEditor.js.map +1 -1
  52. package/lib/components/workflows/ClassQueryBuilder.d.ts.map +1 -1
  53. package/lib/components/workflows/ClassQueryBuilder.js +6 -4
  54. package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
  55. package/lib/components/workflows/MappingQueryBuilder.d.ts.map +1 -1
  56. package/lib/components/workflows/MappingQueryBuilder.js +6 -4
  57. package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
  58. package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -1
  59. package/lib/components/workflows/ServiceQueryBuilder.js +3 -2
  60. package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
  61. package/lib/index.css +1 -1
  62. package/lib/index.d.ts +4 -3
  63. package/lib/index.d.ts.map +1 -1
  64. package/lib/index.js +5 -3
  65. package/lib/index.js.map +1 -1
  66. package/lib/package.json +4 -4
  67. package/lib/stores/QueryBuilderChangeDetectionState.js +1 -1
  68. package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -1
  69. package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
  70. package/lib/stores/QueryBuilderResultState.js +8 -20
  71. package/lib/stores/QueryBuilderResultState.js.map +1 -1
  72. package/lib/stores/QueryBuilderState.d.ts +5 -6
  73. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  74. package/lib/stores/QueryBuilderState.js +2 -3
  75. package/lib/stores/QueryBuilderState.js.map +1 -1
  76. package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts +2 -2
  77. package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts.map +1 -1
  78. package/lib/stores/explorer/QueryBuilderPropertySearchState.js +3 -3
  79. package/lib/stores/explorer/QueryBuilderPropertySearchState.js.map +1 -1
  80. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
  81. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +2 -2
  82. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  83. package/package.json +11 -11
  84. package/src/application/QueryBuilderSetting.ts +27 -0
  85. package/src/{stores/QueryBuilderTelemetry.ts → application/QueryBuilderTelemetryHelper.ts} +5 -14
  86. package/src/components/QueryBuilder.tsx +7 -7
  87. package/src/{stores/LegendQueryStorage.ts → components/QueryBuilderComponentElement.ts} +2 -2
  88. package/src/components/QueryBuilderConstantExpressionPanel.tsx +3 -2
  89. package/src/components/QueryBuilderDiffPanel.tsx +2 -1
  90. package/src/components/QueryBuilderNavigationBlocker.tsx +1 -2
  91. package/src/components/QueryBuilderParametersPanel.tsx +5 -3
  92. package/src/components/QueryBuilderSideBar.tsx +9 -6
  93. package/src/components/QueryBuilder_LegendApplicationPlugin.ts +9 -0
  94. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +1 -1
  95. package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +6 -5
  96. package/src/components/shared/BasicValueSpecificationEditor.tsx +4 -3
  97. package/src/components/shared/LambdaEditor.tsx +14 -22
  98. package/src/components/workflows/ClassQueryBuilder.tsx +6 -4
  99. package/src/components/workflows/MappingQueryBuilder.tsx +6 -4
  100. package/src/components/workflows/ServiceQueryBuilder.tsx +3 -2
  101. package/src/index.ts +6 -6
  102. package/src/stores/QueryBuilderChangeDetectionState.ts +1 -1
  103. package/src/stores/QueryBuilderResultState.ts +8 -23
  104. package/src/stores/QueryBuilderState.ts +7 -8
  105. package/src/stores/explorer/QueryBuilderPropertySearchState.ts +4 -4
  106. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +4 -5
  107. package/tsconfig.json +5 -5
  108. package/tsconfig.package.json +1 -2
  109. package/lib/stores/LegendQueryStorage.d.ts.map +0 -1
  110. package/lib/stores/LegendQueryStorage.js.map +0 -1
  111. package/lib/stores/QueryBuilderEvent.d.ts.map +0 -1
  112. package/lib/stores/QueryBuilderEvent.js.map +0 -1
  113. package/lib/stores/QueryBuilderTelemetry.d.ts.map +0 -1
  114. package/lib/stores/QueryBuilderTelemetry.js.map +0 -1
  115. /package/lib/{stores → application}/QueryBuilderEvent.d.ts +0 -0
  116. /package/lib/{stores → application}/QueryBuilderEvent.js +0 -0
  117. /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.TEMPORARY__isLightThemeEnabled
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.TEMPORARY__isLightThemeEnabled,
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
- .TEMPORARY__isLightThemeEnabled
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
- .TEMPORARY__isLightThemeEnabled
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
- .TEMPORARY__isLightThemeEnabled
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 InputActionMeta,
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: InputActionMeta,
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.TEMPORARY__isLightThemeEnabled
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.TEMPORARY__isLightThemeEnabled
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 (backdropSetter) {
224
- if (parserError) {
225
- backdropSetter(true);
226
- } else if (!forceBackdrop) {
227
- // make sure the backdrop is no longer `needed` for blocking by another parser error before hiding it
228
- // NOTE: this has a serious drawback, see the documentation for `forceBackdrop` prop of `LambdaEditor`
229
- // for better context
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, backdropSetter]);
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.TEMPORARY__isLightThemeEnabled
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.TEMPORARY__isLightThemeEnabled,
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.TEMPORARY__isLightThemeEnabled
157
+ !applicationStore.layoutService
158
+ .TEMPORARY__isLightColorThemeEnabled
158
159
  }
159
160
  filterOption={mappingFilterOption}
160
161
  formatOptionLabel={getPackageableElementOptionFormatter({
161
162
  darkMode:
162
163
  !applicationStore.layoutService
163
- .TEMPORARY__isLightThemeEnabled,
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.TEMPORARY__isLightThemeEnabled
187
+ !applicationStore.layoutService
188
+ .TEMPORARY__isLightColorThemeEnabled
187
189
  }
188
190
  filterOption={runtimeFilterOption}
189
191
  formatOptionLabel={getRuntimeOptionFormatter({
190
192
  darkMode:
191
193
  !applicationStore.layoutService
192
- .TEMPORARY__isLightThemeEnabled,
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.TEMPORARY__isLightThemeEnabled
151
+ !applicationStore.layoutService
152
+ .TEMPORARY__isLightColorThemeEnabled
152
153
  }
153
154
  filterOption={mappingFilterOption}
154
155
  formatOptionLabel={getPackageableElementOptionFormatter({
155
156
  darkMode:
156
157
  !applicationStore.layoutService
157
- .TEMPORARY__isLightThemeEnabled,
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.TEMPORARY__isLightThemeEnabled
179
+ !applicationStore.layoutService
180
+ .TEMPORARY__isLightColorThemeEnabled
179
181
  }
180
182
  filterOption={runtimeFilterOption}
181
183
  formatOptionLabel={getRuntimeOptionFormatter({
182
184
  darkMode:
183
185
  !applicationStore.layoutService
184
- .TEMPORARY__isLightThemeEnabled,
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.TEMPORARY__isLightThemeEnabled
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
- .TEMPORARY__isLightThemeEnabled
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
- QueryBuilder,
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 to your query will be lost if you continue. Do you still want to proceed?',
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 { QueryBuilderTelemetry } from './QueryBuilderTelemetry.js';
49
- import { QUERY_BUILDER_EVENT } from './QueryBuilderEvent.js';
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
- QueryBuilderTelemetry.logEvent_QueryRunLaunched(
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
- QueryBuilderTelemetry.logEvent_QueryRunSucceeded(
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
- QueryBuilderTelemetry.logEvent_ExecutionPlanDebugLaunched(
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
- QueryBuilderTelemetry.logEvent_ExecutionPlanGenerationLaunched(
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
- QueryBuilderTelemetry.logEvent_ExecutionPlanDebugSucceeded(
349
+ QueryBuilderTelemetryHelper.logEvent_ExecutionPlanDebugSucceeded(
365
350
  this.queryBuilderState.applicationStore.telemetryService,
366
351
  report,
367
352
  );
368
353
  } else {
369
- QueryBuilderTelemetry.logEvent_ExecutionPlanGenerationSucceeded(
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
- queryCompileState = ActionState.create();
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 { Fuse } from '@finos/legend-art';
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: Fuse<QueryBuilderExplorerTreeNodeData>;
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 Fuse(this.indexedExplorerTreeNodes);
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 Fuse(this.indexedExplorerTreeNodes, {
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 { LEGEND_QUERY_SETTINGS_KEY } from '../../LegendQueryStorage.js';
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.storageService.settingsStore.getBooleanValue(
158
- LEGEND_QUERY_SETTINGS_KEY.EDITOR_SHOW_POST_FILTER,
159
- false,
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
- "isolatedModules": true,
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",
@@ -15,8 +15,7 @@
15
15
  "module": "nodenext",
16
16
  "skipLibCheck": true,
17
17
  "resolveJsonModule": true,
18
- "isolatedModules": true,
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"}