@finos/legend-query-builder 4.14.78 → 4.14.80

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/lib/__lib__/QueryBuilderEvent.d.ts +7 -1
  2. package/lib/__lib__/QueryBuilderEvent.d.ts.map +1 -1
  3. package/lib/__lib__/QueryBuilderEvent.js +7 -1
  4. package/lib/__lib__/QueryBuilderEvent.js.map +1 -1
  5. package/lib/__lib__/QueryBuilderSetting.d.ts +2 -1
  6. package/lib/__lib__/QueryBuilderSetting.d.ts.map +1 -1
  7. package/lib/__lib__/QueryBuilderSetting.js +4 -0
  8. package/lib/__lib__/QueryBuilderSetting.js.map +1 -1
  9. package/lib/__lib__/QueryBuilderTelemetryHelper.d.ts +9 -0
  10. package/lib/__lib__/QueryBuilderTelemetryHelper.d.ts.map +1 -1
  11. package/lib/__lib__/QueryBuilderTelemetryHelper.js +18 -0
  12. package/lib/__lib__/QueryBuilderTelemetryHelper.js.map +1 -1
  13. package/lib/components/QueryBuilder.d.ts.map +1 -1
  14. package/lib/components/QueryBuilder.js +3 -3
  15. package/lib/components/QueryBuilder.js.map +1 -1
  16. package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
  17. package/lib/components/explorer/QueryBuilderExplorerPanel.js +3 -1
  18. package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
  19. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
  20. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +8 -3
  21. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
  22. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
  23. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js +10 -1
  24. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js.map +1 -1
  25. package/lib/index.css +2 -2
  26. package/lib/index.css.map +1 -1
  27. package/lib/package.json +1 -1
  28. package/lib/stores/QueryBuilderState.d.ts +1 -1
  29. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  30. package/lib/stores/QueryBuilderState.js +8 -1
  31. package/lib/stores/QueryBuilderState.js.map +1 -1
  32. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts.map +1 -1
  33. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js +2 -0
  34. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/__lib__/QueryBuilderEvent.ts +10 -1
  37. package/src/__lib__/QueryBuilderSetting.ts +4 -0
  38. package/src/__lib__/QueryBuilderTelemetryHelper.ts +36 -0
  39. package/src/components/QueryBuilder.tsx +4 -13
  40. package/src/components/explorer/QueryBuilderExplorerPanel.tsx +5 -0
  41. package/src/components/explorer/QueryBuilderFunctionsExplorerPanel.tsx +13 -3
  42. package/src/components/fetch-structure/QueryBuilderGraphFetchTreePanel.tsx +14 -1
  43. package/src/stores/QueryBuilderState.ts +13 -1
  44. package/src/stores/fetch-structure/QueryBuilderFetchStructureState.ts +4 -0
@@ -108,6 +108,7 @@ import {
108
108
  } from './QueryBuilderExecutionContextState.js';
109
109
  import type { QueryBuilderConfig } from '../graph-manager/QueryBuilderConfig.js';
110
110
  import { QUERY_BUILDER_EVENT } from '../__lib__/QueryBuilderEvent.js';
111
+ import { QUERY_BUILDER_SETTING_KEY } from '../__lib__/QueryBuilderSetting.js';
111
112
  import { QueryBuilderChangeHistoryState } from './QueryBuilderChangeHistoryState.js';
112
113
  import { type QueryBuilderWorkflowState } from './query-workflow/QueryBuilderWorkFlowState.js';
113
114
 
@@ -150,12 +151,12 @@ export abstract class QueryBuilderState implements CommandRegistrar {
150
151
  textEditorState: QueryBuilderTextEditorState;
151
152
  unsupportedQueryState: QueryBuilderUnsupportedQueryState;
152
153
  changeHistoryState: QueryBuilderChangeHistoryState;
154
+ isQueryChatOpened: boolean;
153
155
  showFunctionsExplorerPanel = false;
154
156
  showParametersPanel = false;
155
157
  isEditingWatermark = false;
156
158
  isCheckingEntitlments = false;
157
159
  isCalendarEnabled = false;
158
- isQueryChatOpened = false;
159
160
  isLocalModeEnabled = false;
160
161
  INTERNAL__enableInitializingDefaultSimpleExpressionValue = false;
161
162
 
@@ -265,6 +266,13 @@ export abstract class QueryBuilderState implements CommandRegistrar {
265
266
 
266
267
  this.workflowState = workflowState;
267
268
  this.sourceInfo = sourceInfo;
269
+ //extra check for only QA currently.
270
+ this.isQueryChatOpened =
271
+ (!this.config?.TEMPORARY__disableQueryBuilderChat &&
272
+ this.applicationStore.settingService.getBooleanValue(
273
+ QUERY_BUILDER_SETTING_KEY.SHOW_QUERY_CHAT_PANEL,
274
+ )) ??
275
+ false;
268
276
  }
269
277
 
270
278
  get isMappingReadOnly(): boolean {
@@ -365,6 +373,10 @@ export abstract class QueryBuilderState implements CommandRegistrar {
365
373
 
366
374
  setIsQueryChatOpened(val: boolean): void {
367
375
  this.isQueryChatOpened = val;
376
+ this.applicationStore.settingService.persistValue(
377
+ QUERY_BUILDER_SETTING_KEY.SHOW_QUERY_CHAT_PANEL,
378
+ val,
379
+ );
368
380
  }
369
381
 
370
382
  setIsLocalModeEnabled(val: boolean): void {
@@ -28,6 +28,7 @@ import {
28
28
  FETCH_STRUCTURE_IMPLEMENTATION,
29
29
  type QueryBuilderFetchStructureImplementationState,
30
30
  } from './QueryBuilderFetchStructureImplementationState.js';
31
+ import { QueryBuilderTelemetryHelper } from '../../__lib__/QueryBuilderTelemetryHelper.js';
31
32
 
32
33
  export const onChangeFetchStructureImplementation =
33
34
  (
@@ -36,6 +37,9 @@ export const onChangeFetchStructureImplementation =
36
37
  ): (() => void) =>
37
38
  (): void => {
38
39
  if (fetchStructureState.implementation.type !== implementationType) {
40
+ QueryBuilderTelemetryHelper.logEvent_ToggleFetchStructure(
41
+ fetchStructureState.queryBuilderState.applicationStore.telemetryService,
42
+ );
39
43
  fetchStructureState.implementation.checkBeforeChangingImplementation(
40
44
  () => {
41
45
  fetchStructureState.changeImplementation(implementationType);