@finos/legend-query-builder 0.6.30 → 0.6.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. package/lib/components/QueryBuilder.d.ts.map +1 -1
  2. package/lib/components/QueryBuilder.js +1 -1
  3. package/lib/components/QueryBuilder.js.map +1 -1
  4. package/lib/components/QueryBuilderComponentTestUtils.d.ts.map +1 -1
  5. package/lib/components/QueryBuilderComponentTestUtils.js +2 -2
  6. package/lib/components/QueryBuilderComponentTestUtils.js.map +1 -1
  7. package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
  8. package/lib/components/QueryBuilderConstantExpressionPanel.js +3 -2
  9. package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
  10. package/lib/components/QueryBuilderDiffPanel.js +1 -1
  11. package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
  12. package/lib/components/QueryBuilderNavigationBlocker.js +4 -4
  13. package/lib/components/QueryBuilderNavigationBlocker.js.map +1 -1
  14. package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
  15. package/lib/components/QueryBuilderParametersPanel.js +4 -3
  16. package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
  17. package/lib/components/QueryBuilderPropertyExpressionEditor.js +1 -1
  18. package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
  19. package/lib/components/QueryBuilderResultPanel.js +4 -4
  20. package/lib/components/QueryBuilderResultPanel.js.map +1 -1
  21. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  22. package/lib/components/QueryBuilderSideBar.js +9 -6
  23. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  24. package/lib/components/QueryBuilderTextEditor.js +1 -1
  25. package/lib/components/QueryBuilderTextEditor.js.map +1 -1
  26. package/lib/components/explorer/QueryBuilderExplorerPanel.js +2 -2
  27. package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
  28. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +3 -3
  29. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  30. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  31. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +1 -1
  32. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  33. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
  34. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +9 -6
  35. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
  36. package/lib/components/filter/QueryBuilderFilterPanel.js +3 -3
  37. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  38. package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
  39. package/lib/components/shared/BasicValueSpecificationEditor.js +1 -1
  40. package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
  41. package/lib/components/shared/CustomDatePicker.d.ts.map +1 -1
  42. package/lib/components/shared/CustomDatePicker.js +3 -7
  43. package/lib/components/shared/CustomDatePicker.js.map +1 -1
  44. package/lib/components/shared/LambdaEditor.js +3 -3
  45. package/lib/components/shared/LambdaEditor.js.map +1 -1
  46. package/lib/components/workflows/ClassQueryBuilder.d.ts.map +1 -1
  47. package/lib/components/workflows/ClassQueryBuilder.js +6 -4
  48. package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
  49. package/lib/components/workflows/MappingQueryBuilder.d.ts.map +1 -1
  50. package/lib/components/workflows/MappingQueryBuilder.js +6 -4
  51. package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
  52. package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -1
  53. package/lib/components/workflows/ServiceQueryBuilder.js +3 -2
  54. package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
  55. package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js +2 -2
  56. package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js.map +1 -1
  57. package/lib/index.css +2 -2
  58. package/lib/index.css.map +1 -1
  59. package/lib/package.json +7 -7
  60. package/lib/stores/QueryBuilderChangeDetectionState.js +1 -1
  61. package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -1
  62. package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -1
  63. package/lib/stores/QueryBuilderConstantsState.js +1 -1
  64. package/lib/stores/QueryBuilderConstantsState.js.map +1 -1
  65. package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
  66. package/lib/stores/QueryBuilderResultState.js +11 -16
  67. package/lib/stores/QueryBuilderResultState.js.map +1 -1
  68. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  69. package/lib/stores/QueryBuilderState.js +10 -10
  70. package/lib/stores/QueryBuilderState.js.map +1 -1
  71. package/lib/stores/QueryBuilderTelemetry.d.ts +1 -1
  72. package/lib/stores/QueryBuilderTelemetry.d.ts.map +1 -1
  73. package/lib/stores/QueryBuilderTextEditorState.js +3 -3
  74. package/lib/stores/QueryBuilderTextEditorState.js.map +1 -1
  75. package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
  76. package/lib/stores/explorer/QueryBuilderExplorerState.js +4 -4
  77. package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
  78. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +3 -3
  79. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
  80. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +1 -1
  81. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
  82. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +3 -3
  83. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  84. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +1 -1
  85. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
  86. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js +2 -2
  87. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js.map +1 -1
  88. package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
  89. package/lib/stores/filter/QueryBuilderFilterState.js +1 -1
  90. package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
  91. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +3 -2
  92. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
  93. package/lib/stores/shared/ValueSpecificationEditorHelper.js +32 -22
  94. package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
  95. package/package.json +14 -14
  96. package/src/components/QueryBuilder.tsx +3 -1
  97. package/src/components/QueryBuilderComponentTestUtils.tsx +5 -2
  98. package/src/components/QueryBuilderConstantExpressionPanel.tsx +6 -2
  99. package/src/components/QueryBuilderDiffPanel.tsx +1 -1
  100. package/src/components/QueryBuilderNavigationBlocker.tsx +4 -4
  101. package/src/components/QueryBuilderParametersPanel.tsx +9 -3
  102. package/src/components/QueryBuilderPropertyExpressionEditor.tsx +1 -1
  103. package/src/components/QueryBuilderResultPanel.tsx +4 -4
  104. package/src/components/QueryBuilderSideBar.tsx +18 -6
  105. package/src/components/QueryBuilderTextEditor.tsx +1 -1
  106. package/src/components/explorer/QueryBuilderExplorerPanel.tsx +2 -2
  107. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +3 -3
  108. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +3 -1
  109. package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +13 -6
  110. package/src/components/filter/QueryBuilderFilterPanel.tsx +3 -3
  111. package/src/components/shared/BasicValueSpecificationEditor.tsx +3 -1
  112. package/src/components/shared/CustomDatePicker.tsx +9 -16
  113. package/src/components/shared/LambdaEditor.tsx +3 -3
  114. package/src/components/workflows/ClassQueryBuilder.tsx +12 -4
  115. package/src/components/workflows/MappingQueryBuilder.tsx +12 -4
  116. package/src/components/workflows/ServiceQueryBuilder.tsx +7 -2
  117. package/src/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.ts +2 -2
  118. package/src/stores/QueryBuilderChangeDetectionState.ts +1 -1
  119. package/src/stores/QueryBuilderConstantsState.ts +3 -1
  120. package/src/stores/QueryBuilderResultState.ts +23 -16
  121. package/src/stores/QueryBuilderState.ts +16 -10
  122. package/src/stores/QueryBuilderTelemetry.ts +1 -1
  123. package/src/stores/QueryBuilderTextEditorState.ts +3 -3
  124. package/src/stores/explorer/QueryBuilderExplorerState.ts +6 -4
  125. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +3 -3
  126. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +1 -1
  127. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +3 -3
  128. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +1 -1
  129. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.ts +2 -2
  130. package/src/stores/filter/QueryBuilderFilterState.ts +3 -1
  131. package/src/stores/shared/ValueSpecificationEditorHelper.ts +54 -50
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-query-builder",
3
- "version": "0.6.30",
3
+ "version": "0.6.32",
4
4
  "description": "Legend query builder core",
5
5
  "keywords": [
6
6
  "legend",
@@ -45,33 +45,33 @@
45
45
  "@ag-grid-community/core": "29.1.0",
46
46
  "@ag-grid-community/react": "29.1.0",
47
47
  "@ag-grid-community/styles": "29.1.0",
48
- "@finos/legend-application": "11.0.2",
49
- "@finos/legend-art": "5.0.30",
50
- "@finos/legend-graph": "23.0.2",
51
- "@finos/legend-server-depot": "4.4.3",
52
- "@finos/legend-shared": "6.2.23",
53
- "@finos/legend-storage": "3.0.38",
48
+ "@finos/legend-application": "12.0.0",
49
+ "@finos/legend-art": "5.0.32",
50
+ "@finos/legend-graph": "23.1.0",
51
+ "@finos/legend-server-depot": "4.4.5",
52
+ "@finos/legend-shared": "8.0.0",
53
+ "@finos/legend-storage": "3.0.40",
54
54
  "@testing-library/react": "14.0.0",
55
55
  "@types/papaparse": "5.3.7",
56
56
  "@types/react": "18.0.28",
57
57
  "@types/react-dom": "18.0.11",
58
58
  "mobx": "6.8.0",
59
- "mobx-react-lite": "3.4.0",
60
- "monaco-editor": "0.36.0",
61
- "papaparse": "5.3.2",
59
+ "mobx-react-lite": "3.4.3",
60
+ "monaco-editor": "0.36.1",
61
+ "papaparse": "5.4.0",
62
62
  "react": "18.2.0",
63
63
  "react-dnd": "16.0.1",
64
64
  "react-dom": "18.2.0",
65
65
  "serializr": "3.0.2"
66
66
  },
67
67
  "devDependencies": {
68
- "@finos/legend-dev-utils": "2.0.43",
69
- "@jest/globals": "29.4.3",
68
+ "@finos/legend-dev-utils": "2.0.45",
69
+ "@jest/globals": "29.5.0",
70
70
  "cross-env": "7.0.3",
71
71
  "eslint": "8.35.0",
72
- "jest": "29.4.3",
72
+ "jest": "29.5.0",
73
73
  "npm-run-all": "4.1.5",
74
- "rimraf": "4.1.2",
74
+ "rimraf": "4.4.0",
75
75
  "sass": "1.58.3",
76
76
  "typescript": "4.9.5"
77
77
  },
@@ -258,7 +258,9 @@ export const QueryBuilder = observer(
258
258
  );
259
259
  const openQueryTutorial = (): void => {
260
260
  if (queryDocEntry?.url) {
261
- applicationStore.navigator.visitAddress(queryDocEntry.url);
261
+ applicationStore.navigationService.navigator.visitAddress(
262
+ queryDocEntry.url,
263
+ );
262
264
  }
263
265
  };
264
266
  const toggleShowFunctionPanel = (): void => {
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { type RenderResult, render, waitFor } from '@testing-library/react';
18
- import { createSpy, Log } from '@finos/legend-shared';
18
+ import { createSpy, LogService } from '@finos/legend-shared';
19
19
  import {
20
20
  type RawMappingModelCoverageAnalysisResult,
21
21
  type RawLambda,
@@ -55,7 +55,10 @@ export const TEST__setUpQueryBuilder = async (
55
55
  }> => {
56
56
  const pluginManager = TEST__LegendApplicationPluginManager.create();
57
57
  pluginManager.usePresets([new QueryBuilder_GraphManagerPreset()]).install();
58
- const graphManagerState = new GraphManagerState(pluginManager, new Log());
58
+ const graphManagerState = new GraphManagerState(
59
+ pluginManager,
60
+ new LogService(),
61
+ );
59
62
  await graphManagerState.initializeSystem();
60
63
  await graphManagerState.graphManager.buildGraph(
61
64
  graphManagerState.graph,
@@ -144,9 +144,13 @@ const QueryBuilderConstantExpressionEditor = observer(
144
144
  options={typeOptions}
145
145
  onChange={changeType}
146
146
  value={selectedType}
147
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
147
+ darkMode={
148
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
149
+ }
148
150
  formatOptionLabel={getPackageableElementOptionFormatter({
149
- darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
151
+ darkMode:
152
+ !applicationStore.layoutService
153
+ .TEMPORARY__isLightThemeEnabled,
150
154
  graph: queryBuilderState.graphManagerState.graph,
151
155
  })}
152
156
  />
@@ -64,7 +64,7 @@ const TextDiffView = observer(
64
64
  const element = editorRef.current;
65
65
  const _editor = monacoEditorAPI.createDiffEditor(element, {
66
66
  ...getBaseTextEditorOptions(),
67
- theme: applicationStore.TEMPORARY__isLightThemeEnabled
67
+ theme: applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
68
68
  ? EDITOR_THEME.TEMPORARY__VSCODE_LIGHT
69
69
  : EDITOR_THEME.LEGEND,
70
70
  readOnly: true,
@@ -29,10 +29,10 @@ export const QueryBuilderNavigationBlocker = observer(
29
29
  const applicationStore = useApplicationStore();
30
30
 
31
31
  useEffect(() => {
32
- applicationStore.navigator.blockNavigation(
32
+ applicationStore.navigationService.navigator.blockNavigation(
33
33
  [(): boolean => queryBuilderState.changeDetectionState.hasChanged],
34
34
  (onProceed: () => void): void => {
35
- applicationStore.setActionAlertInfo({
35
+ applicationStore.alertService.setActionAlertInfo({
36
36
  // TODO?: should we make this message generic like the `BeforeUnloadEvent` message?
37
37
  message:
38
38
  'Unsaved changes to your query will be lost if you continue. Do you still want to proceed?',
@@ -52,12 +52,12 @@ export const QueryBuilderNavigationBlocker = observer(
52
52
  });
53
53
  },
54
54
  () =>
55
- applicationStore.notifyWarning(
55
+ applicationStore.notificationService.notifyWarning(
56
56
  `Navigation from the query builder is blocked`,
57
57
  ),
58
58
  );
59
59
  return (): void => {
60
- applicationStore.navigator.unblockNavigation();
60
+ applicationStore.navigationService.navigator.unblockNavigation();
61
61
  };
62
62
  }, [applicationStore, queryBuilderState]);
63
63
 
@@ -174,9 +174,13 @@ const VariableExpressionEditor = observer(
174
174
  options={typeOptions}
175
175
  onChange={changeType}
176
176
  value={selectedType}
177
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
177
+ darkMode={
178
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
179
+ }
178
180
  formatOptionLabel={getPackageableElementOptionFormatter({
179
- darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
181
+ darkMode:
182
+ !applicationStore.layoutService
183
+ .TEMPORARY__isLightThemeEnabled,
180
184
  graph: queryBuilderState.graphManagerState.graph,
181
185
  })}
182
186
  />
@@ -199,7 +203,9 @@ const VariableExpressionEditor = observer(
199
203
  selectedMultiplicity.value,
200
204
  )
201
205
  }
202
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
206
+ darkMode={
207
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
208
+ }
203
209
  />
204
210
  </div>
205
211
  </ModalBody>
@@ -169,7 +169,7 @@ const DerivedPropertyParameterValueEditor = observer(
169
169
  isDefaultDatePropagationSupported(nextExpression, queryBuilderState) &&
170
170
  nextExpression.func.value.genericType.value.rawType instanceof Class
171
171
  ) {
172
- queryBuilderState.applicationStore.setActionAlertInfo({
172
+ queryBuilderState.applicationStore.alertService.setActionAlertInfo({
173
173
  message:
174
174
  'You have just changed a milestoning date in the property expression chain, this date will be propagated down the rest of the chain. Do you want to proceed? Otherwise, you can choose to propagate the default milestoning dates instead.',
175
175
  type: ActionAlertType.CAUTION,
@@ -188,7 +188,7 @@ const QueryBuilderGridResultContextMenu = observer(
188
188
  );
189
189
  } catch (error) {
190
190
  assertErrorThrown(error);
191
- applicationStore.notifyWarning(error.message);
191
+ applicationStore.notificationService.notifyWarning(error.message);
192
192
  return;
193
193
  }
194
194
  postFilterState.addNodeFromNode(
@@ -278,11 +278,11 @@ const QueryBuilderGridResultContextMenu = observer(
278
278
  };
279
279
 
280
280
  const handleCopyCellValue = applicationStore.guardUnhandledError(() =>
281
- applicationStore.copyTextToClipboard(event?.value),
281
+ applicationStore.clipboardService.copyTextToClipboard(event?.value),
282
282
  );
283
283
 
284
284
  const handleCopyRowValue = applicationStore.guardUnhandledError(() =>
285
- applicationStore.copyTextToClipboard(
285
+ applicationStore.clipboardService.copyTextToClipboard(
286
286
  Object.values(event?.data).toString(),
287
287
  ),
288
288
  );
@@ -456,7 +456,7 @@ export const QueryBuilderResultPanel = observer(
456
456
  };
457
457
 
458
458
  const confirmExport = (format: EXECUTION_SERIALIZATION_FORMAT): void => {
459
- applicationStore.setActionAlertInfo({
459
+ applicationStore.alertService.setActionAlertInfo({
460
460
  message: USER_ATTESTATION_MESSAGE,
461
461
  type: ActionAlertType.CAUTION,
462
462
  actions: [
@@ -179,10 +179,14 @@ export const QueryBuilderClassSelector = observer(
179
179
  options={classOptions}
180
180
  onChange={changeClass}
181
181
  value={selectedClassOption}
182
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
182
+ darkMode={
183
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
184
+ }
183
185
  filterOption={elementFilterOption}
184
186
  formatOptionLabel={getPackageableElementOptionFormatter({
185
- darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
187
+ darkMode:
188
+ !applicationStore.layoutService
189
+ .TEMPORARY__isLightThemeEnabled,
186
190
  graph: queryBuilderState.graphManagerState.graph,
187
191
  })}
188
192
  />
@@ -337,10 +341,14 @@ const BasicQueryBuilderSetup = observer(
337
341
  options={mappingOptions}
338
342
  onChange={changeMapping}
339
343
  value={selectedMappingOption}
340
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
344
+ darkMode={
345
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
346
+ }
341
347
  filterOption={mappingFilterOption}
342
348
  formatOptionLabel={getPackageableElementOptionFormatter({
343
- darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
349
+ darkMode:
350
+ !applicationStore.layoutService
351
+ .TEMPORARY__isLightThemeEnabled,
344
352
  graph: queryBuilderState.graphManagerState.graph,
345
353
  })}
346
354
  />
@@ -367,10 +375,14 @@ const BasicQueryBuilderSetup = observer(
367
375
  options={runtimeOptions}
368
376
  onChange={changeRuntime}
369
377
  value={selectedRuntimeOption}
370
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
378
+ darkMode={
379
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
380
+ }
371
381
  filterOption={runtimeFilterOption}
372
382
  formatOptionLabel={getRuntimeOptionFormatter({
373
- darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
383
+ darkMode:
384
+ !applicationStore.layoutService
385
+ .TEMPORARY__isLightThemeEnabled,
374
386
  pureModel: queryBuilderState.graphManagerState.graph,
375
387
  })}
376
388
  />
@@ -48,7 +48,7 @@ export const QueryBuilderTextEditor = observer(
48
48
  const discardChanges = (): void => {
49
49
  queryBuilderState.textEditorState.setMode(undefined);
50
50
  // force close the backdrop just in case changes are discarded when there are grammar issues
51
- applicationStore.setShowBackdrop(false);
51
+ applicationStore.layoutService.setShowBackdrop(false);
52
52
  };
53
53
  const mode = queryTextEditorState.mode;
54
54
  useEffect(() => {
@@ -488,7 +488,7 @@ const QueryBuilderExplorerTreeNodeContainer = observer(
488
488
  !(
489
489
  node instanceof QueryBuilderExplorerTreePropertyNodeData ||
490
490
  node instanceof QueryBuilderExplorerTreeRootNodeData
491
- ) || applicationStore.showBackdrop
491
+ ) || applicationStore.layoutService.showBackdrop
492
492
  }
493
493
  menuProps={{ elevation: 7 }}
494
494
  onOpen={onContextMenuOpen}
@@ -852,7 +852,7 @@ export const QueryBuilderExplorerPanel = observer(
852
852
  <div
853
853
  data-testid={QUERY_BUILDER_TEST_ID.QUERY_BUILDER_EXPLORER}
854
854
  className={clsx('panel query-builder__explorer', {
855
- backdrop__element: applicationStore.showBackdrop,
855
+ backdrop__element: applicationStore.layoutService.showBackdrop,
856
856
  })}
857
857
  >
858
858
  <div className="panel__header">
@@ -308,7 +308,7 @@ const QueryBuilderPostFilterConditionEditor = observer(
308
308
  ) {
309
309
  node.condition.setValue(item.variable);
310
310
  } else {
311
- applicationStore.notifyWarning(
311
+ applicationStore.notificationService.notifyWarning(
312
312
  `Incompatible parameter type ${parameterType?.name}. ${parameterType?.name} is not compatible with type ${conditionValueType?.name}.`,
313
313
  );
314
314
  }
@@ -508,7 +508,7 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
508
508
  );
509
509
  } catch (error) {
510
510
  assertErrorThrown(error);
511
- applicationStore.notifyWarning(error.message);
511
+ applicationStore.notificationService.notifyWarning(error.message);
512
512
  return;
513
513
  }
514
514
  if (node instanceof QueryBuilderPostFilterTreeGroupNodeData) {
@@ -842,7 +842,7 @@ const QueryBuilderPostFilterPanelContent = observer(
842
842
  );
843
843
  } catch (error) {
844
844
  assertErrorThrown(error);
845
- applicationStore.notifyError(error.message);
845
+ applicationStore.notificationService.notifyError(error.message);
846
846
  return;
847
847
  }
848
848
  // NOTE: unfocus the current node when DnD a new node to the tree
@@ -84,7 +84,9 @@ const ColumnSortEditor = observer(
84
84
  }
85
85
  onChange={onChange}
86
86
  value={value}
87
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
87
+ darkMode={
88
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
89
+ }
88
90
  />
89
91
  <div className="query-builder__projection__options__sort__sortby">
90
92
  {sortType.toLowerCase()}
@@ -160,7 +160,9 @@ const TDSColumnSelectorEditor = observer(
160
160
  disabled={options.length < 1}
161
161
  onChange={onChange}
162
162
  value={value}
163
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
163
+ darkMode={
164
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
165
+ }
164
166
  />
165
167
  <button
166
168
  className="query-builder__olap__tds__column__remove-btn btn--dark btn--caution"
@@ -269,7 +271,7 @@ const QueryBuilderWindowColumnModalEditor = observer(
269
271
  'query-builder__olap__modal',
270
272
  {
271
273
  'query-editor--light':
272
- applicationStore.TEMPORARY__isLightThemeEnabled,
274
+ applicationStore.layoutService.TEMPORARY__isLightThemeEnabled,
273
275
  },
274
276
  ])}
275
277
  >
@@ -315,7 +317,8 @@ const QueryBuilderWindowColumnModalEditor = observer(
315
317
  label: windowOpColumn.columnName,
316
318
  }}
317
319
  darkMode={
318
- !applicationStore.TEMPORARY__isLightThemeEnabled
320
+ !applicationStore.layoutService
321
+ .TEMPORARY__isLightThemeEnabled
319
322
  }
320
323
  />
321
324
  </div>
@@ -430,7 +433,8 @@ const QueryBuilderWindowColumnModalEditor = observer(
430
433
  label: sortByState.columnState.columnName,
431
434
  }}
432
435
  darkMode={
433
- !applicationStore.TEMPORARY__isLightThemeEnabled
436
+ !applicationStore.layoutService
437
+ .TEMPORARY__isLightThemeEnabled
434
438
  }
435
439
  />
436
440
  </div>
@@ -639,7 +643,10 @@ const TDSColumnReferenceEditor = observer(
639
643
  disabled={options.length < 1}
640
644
  onChange={onChange}
641
645
  value={value}
642
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
646
+ darkMode={
647
+ !applicationStore.layoutService
648
+ .TEMPORARY__isLightThemeEnabled
649
+ }
643
650
  />
644
651
  </div>
645
652
  </div>
@@ -1131,7 +1138,7 @@ export const QueryBuilderTDSWindowPanel = observer(
1131
1138
  tdsWindowState.addWindowColumn(newWindowState);
1132
1139
  } catch (error) {
1133
1140
  assertErrorThrown(error);
1134
- applicationStore.notifyError(error.message);
1141
+ applicationStore.notificationService.notifyError(error.message);
1135
1142
  return;
1136
1143
  }
1137
1144
  },
@@ -162,7 +162,7 @@ const QueryBuilderFilterConditionEditor = observer(
162
162
  if (isTypeCompatibleForAssignment(parameterType, conditionValueType)) {
163
163
  node.condition.setValue(item.variable);
164
164
  } else {
165
- applicationStore.notifyWarning(
165
+ applicationStore.notificationService.notifyWarning(
166
166
  `Incompatible parameter type ${parameterType?.name}. ${parameterType?.name} is not compatible with type ${conditionValueType.name}.`,
167
167
  );
168
168
  }
@@ -423,7 +423,7 @@ const QueryBuilderFilterTreeNodeContainer = observer(
423
423
  );
424
424
  } catch (error) {
425
425
  assertErrorThrown(error);
426
- applicationStore.notifyWarning(error.message);
426
+ applicationStore.notificationService.notifyWarning(error.message);
427
427
  return;
428
428
  }
429
429
  if (node instanceof QueryBuilderFilterTreeGroupNodeData) {
@@ -759,7 +759,7 @@ export const QueryBuilderFilterPanel = observer(
759
759
  );
760
760
  } catch (error) {
761
761
  assertErrorThrown(error);
762
- applicationStore.notifyWarning(error.message);
762
+ applicationStore.notificationService.notifyWarning(error.message);
763
763
  return;
764
764
  }
765
765
  // NOTE: unfocus the current node when DnD a new node to the tree
@@ -278,7 +278,9 @@ const StringPrimitiveInstanceValueEditor = observer(
278
278
  value={selectedValue}
279
279
  inputValue={value}
280
280
  onInputChange={handleInputChange}
281
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
281
+ darkMode={
282
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
283
+ }
282
284
  isLoading={isLoading}
283
285
  allowCreateWhileLoading={true}
284
286
  noOptionsMessage={noOptionsMessage}
@@ -48,7 +48,10 @@ import {
48
48
  UnsupportedOperationError,
49
49
  } from '@finos/legend-shared';
50
50
  import { useEffect, useRef, useState } from 'react';
51
- import { buildPrimitiveInstanceValue } from '../../stores/shared/ValueSpecificationEditorHelper.js';
51
+ import {
52
+ buildPrimitiveInstanceValue,
53
+ createSupportedFunctionExpression,
54
+ } from '../../stores/shared/ValueSpecificationEditorHelper.js';
52
55
  import {
53
56
  functionExpression_addParameterValue,
54
57
  instanceValue_setValue,
@@ -329,26 +332,16 @@ const buildPureDateFunctionExpression = (
329
332
  } else {
330
333
  switch (datePickerOption.value) {
331
334
  case CUSTOM_DATE_PICKER_OPTION.TODAY: {
332
- const todaySFE = new SimpleFunctionExpression(
335
+ return createSupportedFunctionExpression(
333
336
  SUPPORTED_FUNCTIONS.TODAY,
337
+ PrimitiveType.STRICTDATE,
334
338
  );
335
- valueSpecification_setGenericType(
336
- todaySFE,
337
- GenericTypeExplicitReference.create(
338
- new GenericType(PrimitiveType.STRICTDATE),
339
- ),
340
- );
341
- return todaySFE;
342
339
  }
343
340
  case CUSTOM_DATE_PICKER_OPTION.NOW: {
344
- const nowSFE = new SimpleFunctionExpression(SUPPORTED_FUNCTIONS.NOW);
345
- valueSpecification_setGenericType(
346
- nowSFE,
347
- GenericTypeExplicitReference.create(
348
- new GenericType(PrimitiveType.DATETIME),
349
- ),
341
+ return createSupportedFunctionExpression(
342
+ SUPPORTED_FUNCTIONS.NOW,
343
+ PrimitiveType.DATETIME,
350
344
  );
351
- return nowSFE;
352
345
  }
353
346
  case CUSTOM_DATE_OPTION_REFERENCE_MOMENT.FIRST_DAY_OF_YEAR: {
354
347
  const firstDayOfYearSFE = new SimpleFunctionExpression(
@@ -185,7 +185,7 @@ const LambdaEditorInline = observer(
185
185
  const _editor = monacoEditorAPI.create(element, {
186
186
  ...getBaseTextEditorOptions(),
187
187
  language: EDITOR_LANGUAGE.PURE,
188
- theme: applicationStore.TEMPORARY__isLightThemeEnabled
188
+ theme: applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
189
189
  ? EDITOR_THEME.TEMPORARY__VSCODE_LIGHT
190
190
  : EDITOR_THEME.LEGEND,
191
191
  ...lambdaEditorOptions,
@@ -464,7 +464,7 @@ const LambdaEditorPopUp = observer(
464
464
  const _editor = monacoEditorAPI.create(element, {
465
465
  ...getBaseTextEditorOptions(),
466
466
  language: EDITOR_LANGUAGE.PURE,
467
- theme: applicationStore.TEMPORARY__isLightThemeEnabled
467
+ theme: applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
468
468
  ? EDITOR_THEME.TEMPORARY__VSCODE_LIGHT
469
469
  : EDITOR_THEME.LEGEND,
470
470
  });
@@ -595,7 +595,7 @@ const LambdaEditorPopUp = observer(
595
595
  },
596
596
  {
597
597
  'lambda-editor--light':
598
- applicationStore.TEMPORARY__isLightThemeEnabled,
598
+ applicationStore.layoutService.TEMPORARY__isLightThemeEnabled,
599
599
  },
600
600
  )}
601
601
  >
@@ -153,10 +153,14 @@ const ClassQueryBuilderSetupPanelContent = observer(
153
153
  options={mappingOptions}
154
154
  onChange={changeMapping}
155
155
  value={selectedMappingOption}
156
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
156
+ darkMode={
157
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
158
+ }
157
159
  filterOption={mappingFilterOption}
158
160
  formatOptionLabel={getPackageableElementOptionFormatter({
159
- darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
161
+ darkMode:
162
+ !applicationStore.layoutService
163
+ .TEMPORARY__isLightThemeEnabled,
160
164
  graph: queryBuilderState.graphManagerState.graph,
161
165
  })}
162
166
  />
@@ -178,10 +182,14 @@ const ClassQueryBuilderSetupPanelContent = observer(
178
182
  options={runtimeOptions}
179
183
  onChange={changeRuntime}
180
184
  value={selectedRuntimeOption}
181
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
185
+ darkMode={
186
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
187
+ }
182
188
  filterOption={runtimeFilterOption}
183
189
  formatOptionLabel={getRuntimeOptionFormatter({
184
- darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
190
+ darkMode:
191
+ !applicationStore.layoutService
192
+ .TEMPORARY__isLightThemeEnabled,
185
193
  pureModel: queryBuilderState.graphManagerState.graph,
186
194
  })}
187
195
  />
@@ -147,10 +147,14 @@ const MappingQueryBuilderSetupPanelContent = observer(
147
147
  options={mappingOptions}
148
148
  onChange={changeMapping}
149
149
  value={selectedMappingOption}
150
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
150
+ darkMode={
151
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
152
+ }
151
153
  filterOption={mappingFilterOption}
152
154
  formatOptionLabel={getPackageableElementOptionFormatter({
153
- darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
155
+ darkMode:
156
+ !applicationStore.layoutService
157
+ .TEMPORARY__isLightThemeEnabled,
154
158
  graph: queryBuilderState.graphManagerState.graph,
155
159
  })}
156
160
  />
@@ -170,10 +174,14 @@ const MappingQueryBuilderSetupPanelContent = observer(
170
174
  options={runtimeOptions}
171
175
  onChange={changeRuntime}
172
176
  value={selectedRuntimeOption}
173
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
177
+ darkMode={
178
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
179
+ }
174
180
  filterOption={runtimeFilterOption}
175
181
  formatOptionLabel={getRuntimeOptionFormatter({
176
- darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
182
+ darkMode:
183
+ !applicationStore.layoutService
184
+ .TEMPORARY__isLightThemeEnabled,
177
185
  pureModel: queryBuilderState.graphManagerState.graph,
178
186
  })}
179
187
  />
@@ -121,7 +121,9 @@ const ServiceQueryBuilderSetupPanelContent = observer(
121
121
  }
122
122
  onChange={onServiceOptionChange}
123
123
  value={selectedServiceOption}
124
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
124
+ darkMode={
125
+ !applicationStore.layoutService.TEMPORARY__isLightThemeEnabled
126
+ }
125
127
  />
126
128
  </div>
127
129
  {/* We will display mapping and runtime selector for single-execution and execution context for multi-execution */}
@@ -145,7 +147,10 @@ const ServiceQueryBuilderSetupPanelContent = observer(
145
147
  }
146
148
  onChange={onExecutionContextOptionChange}
147
149
  value={selectedExecutionContextOption}
148
- darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
150
+ darkMode={
151
+ !applicationStore.layoutService
152
+ .TEMPORARY__isLightThemeEnabled
153
+ }
149
154
  />
150
155
  </div>
151
156
  </>
@@ -87,7 +87,7 @@ export class V1_QueryBuilder_PureGraphManagerExtension extends QueryBuilder_Pure
87
87
  graph,
88
88
  graph,
89
89
  this.graphManager.graphBuilderExtensions,
90
- this.graphManager.log,
90
+ this.graphManager.logService,
91
91
  ).build();
92
92
  // build include index for compatible runtime analysis
93
93
  v1Mappings.forEach((element) => {
@@ -185,7 +185,7 @@ export class V1_QueryBuilder_PureGraphManagerExtension extends QueryBuilder_Pure
185
185
  graph,
186
186
  graph,
187
187
  this.graphManager.graphBuilderExtensions,
188
- this.graphManager.log,
188
+ this.graphManager.logService,
189
189
  ).build();
190
190
 
191
191
  graphBuilderInput
@@ -143,7 +143,7 @@ export class QueryBuilderChangeDetectionState {
143
143
 
144
144
  alertUnsavedChanges(onProceed: () => void): void {
145
145
  if (this.hasChanged) {
146
- this.querybuilderState.applicationStore.setActionAlertInfo({
146
+ this.querybuilderState.applicationStore.alertService.setActionAlertInfo({
147
147
  message:
148
148
  'Unsaved changes to your query will be lost if you continue. Do you still want to proceed?',
149
149
  type: ActionAlertType.CAUTION,
@@ -77,7 +77,9 @@ export class QueryBuilderConstantExpressionState implements Hashable {
77
77
  this.setValueSpec(valSpec);
78
78
  } catch (error) {
79
79
  assertErrorThrown(error);
80
- this.queryBuilderState.applicationStore.notifyError(error.message);
80
+ this.queryBuilderState.applicationStore.notificationService.notifyError(
81
+ error.message,
82
+ );
81
83
  }
82
84
  }
83
85
  }