@finos/legend-application-query 5.2.6 → 5.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/lib/components/QueryBuilder.d.ts.map +1 -1
  2. package/lib/components/QueryBuilder.js +22 -11
  3. package/lib/components/QueryBuilder.js.map +1 -1
  4. package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
  5. package/lib/components/QueryBuilderResultPanel.js +12 -7
  6. package/lib/components/QueryBuilderResultPanel.js.map +1 -1
  7. package/lib/components/QueryBuilderSetupPanel.js +1 -1
  8. package/lib/components/QueryBuilderSetupPanel.js.map +1 -1
  9. package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts +1 -2
  10. package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
  11. package/lib/components/explorer/QueryBuilderExplorerPanel.js +14 -16
  12. package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
  13. package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +2 -2
  14. package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
  15. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
  16. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js +22 -105
  17. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js.map +1 -1
  18. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +1 -2
  19. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
  20. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js +8 -10
  21. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js.map +1 -1
  22. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  23. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +23 -17
  24. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  25. package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts +2 -2
  26. package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts.map +1 -1
  27. package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js +15 -12
  28. package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js.map +1 -1
  29. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +2 -2
  30. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  31. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +23 -28
  32. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  33. package/lib/components/filter/QueryBuilderFilterPanel.js +7 -7
  34. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  35. package/lib/components/shared/QueryBuilderPanelIssueCountBadge.d.ts.map +1 -1
  36. package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js +1 -1
  37. package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js.map +1 -1
  38. package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts.map +1 -1
  39. package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js +5 -3
  40. package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -1
  41. package/lib/index.css +2 -2
  42. package/lib/index.css.map +1 -1
  43. package/lib/package.json +7 -7
  44. package/lib/stores/QueryBuilderPreviewDataHelper.d.ts.map +1 -1
  45. package/lib/stores/QueryBuilderPreviewDataHelper.js +17 -14
  46. package/lib/stores/QueryBuilderPreviewDataHelper.js.map +1 -1
  47. package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
  48. package/lib/stores/QueryBuilderPropertyEditorState.js +34 -24
  49. package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
  50. package/lib/stores/QueryBuilderState.d.ts +1 -2
  51. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  52. package/lib/stores/QueryBuilderState.js +17 -26
  53. package/lib/stores/QueryBuilderState.js.map +1 -1
  54. package/lib/stores/QueryBuilderStateBuilder.d.ts +124 -0
  55. package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -0
  56. package/lib/stores/QueryBuilderStateBuilder.js +310 -0
  57. package/lib/stores/QueryBuilderStateBuilder.js.map +1 -0
  58. package/lib/stores/{QueryBuilderTestUtils.d.ts → QueryBuilderStateTestUtils.d.ts} +2 -2
  59. package/lib/stores/QueryBuilderStateTestUtils.d.ts.map +1 -0
  60. package/lib/stores/{QueryBuilderTestUtils.js → QueryBuilderStateTestUtils.js} +2 -2
  61. package/lib/stores/QueryBuilderStateTestUtils.js.map +1 -0
  62. package/lib/stores/QueryBuilderTypeaheadHelper.d.ts.map +1 -1
  63. package/lib/stores/QueryBuilderTypeaheadHelper.js +14 -12
  64. package/lib/stores/QueryBuilderTypeaheadHelper.js.map +1 -1
  65. package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts +3 -11
  66. package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
  67. package/lib/stores/QueryBuilderValueSpecificationBuilder.js +10 -319
  68. package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
  69. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts +27 -0
  70. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -0
  71. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +153 -0
  72. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -0
  73. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +37 -1
  74. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
  75. package/lib/stores/QueryBuilderValueSpecificationHelper.js +79 -2
  76. package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
  77. package/lib/stores/explorer/QueryBuilderExplorerState.d.ts +12 -11
  78. package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
  79. package/lib/stores/explorer/QueryBuilderExplorerState.js +53 -20
  80. package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
  81. package/lib/stores/explorer/QueryBuilderPropertySearchPanelState.d.ts +1 -1
  82. package/lib/stores/explorer/QueryBuilderPropertySearchPanelState.d.ts.map +1 -1
  83. package/lib/stores/explorer/QueryBuilderPropertySearchPanelState.js +3 -1
  84. package/lib/stores/explorer/QueryBuilderPropertySearchPanelState.js.map +1 -1
  85. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +17 -0
  86. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
  87. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +10 -0
  88. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
  89. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts +3 -20
  90. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts.map +1 -1
  91. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js +31 -73
  92. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js.map +1 -1
  93. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +17 -4
  94. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
  95. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +110 -21
  96. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
  97. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts +20 -0
  98. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -0
  99. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +62 -0
  100. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -0
  101. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts +2 -1
  102. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts.map +1 -1
  103. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +3 -8
  104. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
  105. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.d.ts +9 -2
  106. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.d.ts.map +1 -1
  107. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.js +28 -5
  108. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.js.map +1 -1
  109. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js +2 -2
  110. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js.map +1 -1
  111. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts +10 -2
  112. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts.map +1 -1
  113. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js +102 -39
  114. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js.map +1 -1
  115. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.d.ts +25 -0
  116. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -0
  117. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.js +186 -0
  118. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.js.map +1 -0
  119. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts +9 -4
  120. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
  121. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js +129 -13
  122. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
  123. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.d.ts +20 -0
  124. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +1 -0
  125. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.js +96 -0
  126. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.js.map +1 -0
  127. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js +1 -1
  128. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js.map +1 -1
  129. package/lib/stores/fetch-structure/projection/post-filter/{QueryBuilderPostFilterValueSpecificationProcessor.d.ts → QueryBuilderPostFilterStateBuilder.d.ts} +4 -3
  130. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.d.ts.map +1 -0
  131. package/lib/stores/fetch-structure/projection/post-filter/{QueryBuilderPostFilterValueSpecificationProcessor.js → QueryBuilderPostFilterStateBuilder.js} +30 -21
  132. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -0
  133. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.d.ts.map +1 -1
  134. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js +1 -4
  135. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js.map +1 -1
  136. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +1 -1
  137. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
  138. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +1 -1
  139. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
  140. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +1 -1
  141. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
  142. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +1 -1
  143. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
  144. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +1 -1
  145. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -1
  146. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js +1 -1
  147. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -1
  148. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +1 -1
  149. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -1
  150. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +1 -1
  151. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
  152. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +1 -1
  153. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -1
  154. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +1 -1
  155. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
  156. package/lib/stores/filter/QueryBuilderFilterStateBuilder.d.ts +19 -0
  157. package/lib/stores/filter/QueryBuilderFilterStateBuilder.d.ts.map +1 -0
  158. package/lib/stores/filter/QueryBuilderFilterStateBuilder.js +74 -0
  159. package/lib/stores/filter/QueryBuilderFilterStateBuilder.js.map +1 -0
  160. package/lib/stores/filter/{QueryBuilderValueSpecificationBuilder.d.ts → QueryBuilderFilterValueSpecificationBuilder.d.ts} +1 -1
  161. package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts.map +1 -0
  162. package/lib/stores/filter/{QueryBuilderValueSpecificationBuilder.js → QueryBuilderFilterValueSpecificationBuilder.js} +1 -1
  163. package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js.map +1 -0
  164. package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.d.ts.map +1 -1
  165. package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.js +5 -5
  166. package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.js.map +1 -1
  167. package/package.json +14 -14
  168. package/src/components/QueryBuilder.tsx +47 -28
  169. package/src/components/QueryBuilderResultPanel.tsx +21 -14
  170. package/src/components/QueryBuilderSetupPanel.tsx +1 -1
  171. package/src/components/explorer/QueryBuilderExplorerPanel.tsx +23 -38
  172. package/src/components/explorer/QueryBuilderPropertySearchPanel.tsx +2 -2
  173. package/src/components/fetch-structure/QueryBuilderFetchStructurePanel.tsx +41 -175
  174. package/src/components/fetch-structure/QueryBuilderGraphFetchTreePanel.tsx +9 -12
  175. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +62 -28
  176. package/src/components/fetch-structure/QueryBuilderProjectionPanel.tsx +74 -48
  177. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +33 -41
  178. package/src/components/filter/QueryBuilderFilterPanel.tsx +7 -7
  179. package/src/components/shared/QueryBuilderPanelIssueCountBadge.tsx +3 -1
  180. package/src/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +5 -8
  181. package/src/stores/QueryBuilderPreviewDataHelper.ts +27 -18
  182. package/src/stores/QueryBuilderPropertyEditorState.ts +40 -31
  183. package/src/stores/QueryBuilderState.ts +26 -32
  184. package/src/stores/QueryBuilderStateBuilder.ts +584 -0
  185. package/src/stores/{QueryBuilderTestUtils.ts → QueryBuilderStateTestUtils.ts} +1 -1
  186. package/src/stores/QueryBuilderTypeaheadHelper.ts +23 -16
  187. package/src/stores/QueryBuilderValueSpecificationBuilder.ts +24 -584
  188. package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +248 -0
  189. package/src/stores/QueryBuilderValueSpecificationHelper.ts +114 -0
  190. package/src/stores/explorer/QueryBuilderExplorerState.ts +73 -33
  191. package/src/stores/explorer/QueryBuilderPropertySearchPanelState.ts +3 -1
  192. package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +33 -2
  193. package/src/stores/fetch-structure/QueryBuilderFetchStructureState.ts +53 -118
  194. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +166 -26
  195. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +131 -0
  196. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +10 -19
  197. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.ts +68 -4
  198. package/src/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.ts +2 -2
  199. package/src/stores/fetch-structure/projection/QueryBuilderProjectionState.ts +172 -67
  200. package/src/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.ts +426 -0
  201. package/src/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +266 -21
  202. package/src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.ts +228 -0
  203. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.ts +1 -1
  204. package/src/stores/fetch-structure/projection/post-filter/{QueryBuilderPostFilterValueSpecificationProcessor.ts → QueryBuilderPostFilterStateBuilder.ts} +68 -48
  205. package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.ts +1 -11
  206. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +1 -1
  207. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +1 -1
  208. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +1 -1
  209. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +1 -1
  210. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +1 -1
  211. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +1 -1
  212. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +1 -1
  213. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +1 -1
  214. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +1 -1
  215. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +1 -1
  216. package/src/stores/filter/QueryBuilderFilterStateBuilder.ts +155 -0
  217. package/src/stores/filter/{QueryBuilderValueSpecificationBuilder.ts → QueryBuilderFilterValueSpecificationBuilder.ts} +0 -0
  218. package/src/stores/filter/operators/QueryBuilderFilterOperatorHelper.ts +5 -5
  219. package/tsconfig.json +10 -5
  220. package/tsconfig.package.json +1 -1
  221. package/lib/stores/QueryBuilderTestUtils.d.ts.map +0 -1
  222. package/lib/stores/QueryBuilderTestUtils.js.map +0 -1
  223. package/lib/stores/QueryBuilderValueSpecificationProcessor.d.ts +0 -56
  224. package/lib/stores/QueryBuilderValueSpecificationProcessor.d.ts.map +0 -1
  225. package/lib/stores/QueryBuilderValueSpecificationProcessor.js +0 -548
  226. package/lib/stores/QueryBuilderValueSpecificationProcessor.js.map +0 -1
  227. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationProcessor.d.ts.map +0 -1
  228. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationProcessor.js.map +0 -1
  229. package/lib/stores/filter/QueryBuilderValueSpecificationBuilder.d.ts.map +0 -1
  230. package/lib/stores/filter/QueryBuilderValueSpecificationBuilder.js.map +0 -1
  231. package/src/stores/QueryBuilderValueSpecificationProcessor.ts +0 -1254
@@ -15,16 +15,18 @@
15
15
  */
16
16
 
17
17
  import {
18
- type LambdaFunctionInstanceValue,
18
+ LambdaFunctionInstanceValue,
19
19
  AbstractPropertyExpression,
20
20
  extractElementNameFromPath,
21
21
  PrimitiveInstanceValue,
22
22
  matchFunctionName,
23
23
  VariableExpression,
24
24
  FunctionExpression,
25
+ type SimpleFunctionExpression,
25
26
  } from '@finos/legend-graph';
26
27
  import {
27
28
  assertTrue,
29
+ assertType,
28
30
  guaranteeIsString,
29
31
  guaranteeNonNullable,
30
32
  guaranteeType,
@@ -32,7 +34,6 @@ import {
32
34
  } from '@finos/legend-shared';
33
35
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../QueryBuilder_Const.js';
34
36
  import type { QueryBuilderAggregateColumnState } from '../aggregation/QueryBuilderAggregationState.js';
35
- import { FETCH_STRUCTURE_MODE } from '../../QueryBuilderFetchStructureState.js';
36
37
  import type { QueryBuilderPostFilterOperator } from './QueryBuilderPostFilterOperator.js';
37
38
  import {
38
39
  type QueryBuilderPostFilterState,
@@ -48,13 +49,14 @@ import {
48
49
  QueryBuilderDerivationProjectionColumnState,
49
50
  } from '../QueryBuilderProjectionColumnState.js';
50
51
  import { toGroupOperation } from '../../../QueryBuilderGroupOperationHelper.js';
52
+ import { QueryBuilderProjectionState } from '../QueryBuilderProjectionState.js';
53
+ import type { QueryBuilderState } from '../../../QueryBuilderState.js';
51
54
 
52
55
  const findProjectionColumnState = (
53
56
  propertyExpression: AbstractPropertyExpression,
54
57
  postFilterState: QueryBuilderPostFilterState,
55
58
  ): QueryBuilderProjectionColumnState | QueryBuilderAggregateColumnState => {
56
- const fetchStructureState =
57
- postFilterState.projectionState.fetchStructureState;
59
+ const projectionState = postFilterState.projectionState;
58
60
  const properyExpressionName = propertyExpression.func.name;
59
61
  assertTrue(
60
62
  Object.values(TDS_COLUMN_GETTER).includes(
@@ -75,8 +77,8 @@ const findProjectionColumnState = (
75
77
  'Can`t process TDS column expression: Column should be a string primitive instance value',
76
78
  );
77
79
  const columnStates = [
78
- ...fetchStructureState.projectionState.aggregationState.columns,
79
- ...fetchStructureState.projectionState.columns,
80
+ ...projectionState.aggregationState.columns,
81
+ ...projectionState.columns,
80
82
  ];
81
83
  const columnState = guaranteeNonNullable(
82
84
  columnStates.find((c) => c.columnName === columnName),
@@ -180,7 +182,7 @@ export const buildPostFilterConditionState = (
180
182
  return postConditionState;
181
183
  };
182
184
 
183
- const processPostFilterExpression = (
185
+ const processPostFilterTree = (
184
186
  expression: FunctionExpression,
185
187
  postFilterState: QueryBuilderPostFilterState,
186
188
  parentPostFilterNodeId: string | undefined,
@@ -189,10 +191,10 @@ const processPostFilterExpression = (
189
191
  ? postFilterState.getNode(parentPostFilterNodeId)
190
192
  : undefined;
191
193
  if (
192
- [
194
+ matchFunctionName(expression.functionName, [
193
195
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.AND,
194
196
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.OR,
195
- ].some((fn) => matchFunctionName(expression.functionName, fn))
197
+ ])
196
198
  ) {
197
199
  const groupNode = new QueryBuilderPostFilterTreeGroupNodeData(
198
200
  parentPostFilterNodeId,
@@ -200,7 +202,7 @@ const processPostFilterExpression = (
200
202
  );
201
203
  postFilterState.nodes.set(groupNode.id, groupNode);
202
204
  expression.parametersValues.forEach((postFilterExpression) =>
203
- processPostFilterExpression(
205
+ processPostFilterTree(
204
206
  guaranteeType(
205
207
  postFilterExpression,
206
208
  FunctionExpression,
@@ -235,43 +237,61 @@ const processPostFilterExpression = (
235
237
  }
236
238
  };
237
239
 
238
- export const processPostFilterLambda = (
239
- postFilterLambda: LambdaFunctionInstanceValue,
240
- postFilterState: QueryBuilderPostFilterState,
240
+ export const processTDSPostFilterExpression = (
241
+ expression: SimpleFunctionExpression,
242
+ queryBuilderState: QueryBuilderState,
241
243
  ): void => {
242
- const fetchStructureState =
243
- postFilterState.projectionState.fetchStructureState;
244
- assertTrue(
245
- fetchStructureState.fetchStructureMode === FETCH_STRUCTURE_MODE.PROJECTION,
246
- `Can't process post-filter lambda: post-filter lambda must use projection fetch structure`,
247
- );
248
- assertTrue(
249
- Boolean(fetchStructureState.projectionState.columns.length),
250
- `Can't process post-filter lambda: post-filter lambda must have at least one projection column `,
251
- );
252
- const lambdaFunc = guaranteeNonNullable(
253
- postFilterLambda.values[0],
254
- `Can't process post-filter lambda: post-filter lambda function is missing`,
255
- );
256
- assertTrue(
257
- lambdaFunc.expressionSequence.length === 1,
258
- `Can't process post-filter lambda: only support post-filter lambda body with 1 expression`,
259
- );
260
- const rootExpression = guaranteeType(
261
- lambdaFunc.expressionSequence[0],
262
- FunctionExpression,
263
- `Can't process post-filter lambda: only support post-filter lambda body of type 'FunctionExpression'`,
264
- );
265
- assertTrue(
266
- lambdaFunc.functionType.parameters.length === 1,
267
- `Can't process post-filter lambda: only support post-filter lambda with 1 parameter`,
268
- );
269
- postFilterState.setLambdaParameterName(
270
- guaranteeType(
271
- lambdaFunc.functionType.parameters[0],
272
- VariableExpression,
273
- `Can't process post-filter lambda: only support filter() lambda with 1 parameter of type 'VariableExpression'`,
274
- ).name,
275
- );
276
- processPostFilterExpression(rootExpression, postFilterState, undefined);
244
+ if (
245
+ queryBuilderState.fetchStructureState.implementation instanceof
246
+ QueryBuilderProjectionState
247
+ ) {
248
+ const projectionState =
249
+ queryBuilderState.fetchStructureState.implementation;
250
+ const postFilterState = projectionState.postFilterState;
251
+ const fetchStructureState = projectionState.fetchStructureState;
252
+ const postFilterLambda = expression.parametersValues[1];
253
+ assertType(
254
+ postFilterLambda,
255
+ LambdaFunctionInstanceValue,
256
+ `Can't process post-filter expression: expects argument #1 to be a lambda function`,
257
+ );
258
+
259
+ assertType(
260
+ fetchStructureState.implementation,
261
+ QueryBuilderProjectionState,
262
+ `Can't process post-filter lambda: post-filter lambda must use projection fetch structure`,
263
+ );
264
+ assertTrue(
265
+ Boolean(projectionState.columns.length),
266
+ `Can't process post-filter lambda: post-filter lambda must have at least one projection column `,
267
+ );
268
+ const lambdaFunc = guaranteeNonNullable(
269
+ postFilterLambda.values[0],
270
+ `Can't process post-filter lambda: post-filter lambda function is missing`,
271
+ );
272
+ assertTrue(
273
+ lambdaFunc.expressionSequence.length === 1,
274
+ `Can't process post-filter lambda: only support post-filter lambda body with 1 expression`,
275
+ );
276
+ const rootExpression = guaranteeType(
277
+ lambdaFunc.expressionSequence[0],
278
+ FunctionExpression,
279
+ `Can't process post-filter lambda: only support post-filter lambda body of type 'FunctionExpression'`,
280
+ );
281
+ assertTrue(
282
+ lambdaFunc.functionType.parameters.length === 1,
283
+ `Can't process post-filter lambda: only support post-filter lambda with 1 parameter`,
284
+ );
285
+ postFilterState.setLambdaParameterName(
286
+ guaranteeType(
287
+ lambdaFunc.functionType.parameters[0],
288
+ VariableExpression,
289
+ `Can't process post-filter lambda: only support filter() lambda with 1 parameter of type 'VariableExpression'`,
290
+ ).name,
291
+ );
292
+ processPostFilterTree(rootExpression, postFilterState, undefined);
293
+
294
+ projectionState.setShowPostFilterPanel(true);
295
+ postFilterState.simplifyTree();
296
+ }
277
297
  };
@@ -21,15 +21,10 @@ import {
21
21
  type LambdaFunction,
22
22
  type ValueSpecification,
23
23
  } from '@finos/legend-graph';
24
- import {
25
- assertTrue,
26
- guaranteeNonNullable,
27
- isNonNullable,
28
- } from '@finos/legend-shared';
24
+ import { guaranteeNonNullable, isNonNullable } from '@finos/legend-shared';
29
25
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../QueryBuilder_Const.js';
30
26
  import { fromGroupOperation } from '../../../QueryBuilderGroupOperationHelper.js';
31
27
  import { buildGenericLambdaFunctionInstanceValue } from '../../../QueryBuilderValueSpecificationHelper.js';
32
- import { FETCH_STRUCTURE_MODE } from '../../QueryBuilderFetchStructureState.js';
33
28
  import {
34
29
  QueryBuilderPostFilterTreeConditionNodeData,
35
30
  QueryBuilderPostFilterTreeGroupNodeData,
@@ -105,11 +100,6 @@ export const appendPostFilter = (
105
100
  ) {
106
101
  return lambda;
107
102
  }
108
- assertTrue(
109
- postFilterState.projectionState.fetchStructureState.fetchStructureMode ===
110
- FETCH_STRUCTURE_MODE.PROJECTION,
111
- 'Can only apply post-filter while fetching projection columns',
112
- );
113
103
  const multiplicityOne =
114
104
  postFilterState.projectionState.queryBuilderState.graphManagerState.graph.getTypicalMultiplicity(
115
105
  TYPICAL_MULTIPLICITY_TYPE.ONE,
@@ -28,7 +28,7 @@ import {
28
28
  } from '@finos/legend-shared';
29
29
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../QueryBuilder_Const.js';
30
30
  import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
31
- import { buildPostFilterConditionState } from '../QueryBuilderPostFilterValueSpecificationProcessor.js';
31
+ import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
32
32
  import type {
33
33
  PostFilterConditionState,
34
34
  QueryBuilderPostFilterState,
@@ -24,7 +24,7 @@ import {
24
24
  import { UnsupportedOperationError } from '@finos/legend-shared';
25
25
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../QueryBuilder_Const.js';
26
26
  import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
27
- import { buildPostFilterConditionState } from '../QueryBuilderPostFilterValueSpecificationProcessor.js';
27
+ import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
28
28
  import type {
29
29
  PostFilterConditionState,
30
30
  QueryBuilderPostFilterState,
@@ -37,7 +37,7 @@ import {
37
37
  } from '@finos/legend-shared';
38
38
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../QueryBuilder_Const.js';
39
39
  import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
40
- import { buildPostFilterConditionState } from '../QueryBuilderPostFilterValueSpecificationProcessor.js';
40
+ import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
41
41
  import type {
42
42
  PostFilterConditionState,
43
43
  QueryBuilderPostFilterState,
@@ -29,7 +29,7 @@ import {
29
29
  } from '@finos/legend-shared';
30
30
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../QueryBuilder_Const.js';
31
31
  import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
32
- import { buildPostFilterConditionState } from '../QueryBuilderPostFilterValueSpecificationProcessor.js';
32
+ import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
33
33
  import type {
34
34
  PostFilterConditionState,
35
35
  QueryBuilderPostFilterState,
@@ -22,7 +22,7 @@ import {
22
22
  SUPPORTED_FUNCTIONS,
23
23
  } from '@finos/legend-graph';
24
24
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../QueryBuilder_Const.js';
25
- import { buildPostFilterConditionState } from '../QueryBuilderPostFilterValueSpecificationProcessor.js';
25
+ import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
26
26
  import type {
27
27
  PostFilterConditionState,
28
28
  QueryBuilderPostFilterState,
@@ -30,7 +30,7 @@ import {
30
30
  import { guaranteeNonNullable } from '@finos/legend-shared';
31
31
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../QueryBuilder_Const.js';
32
32
  import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
33
- import { buildPostFilterConditionState } from '../QueryBuilderPostFilterValueSpecificationProcessor.js';
33
+ import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
34
34
  import type {
35
35
  PostFilterConditionState,
36
36
  QueryBuilderPostFilterState,
@@ -22,7 +22,7 @@ import {
22
22
  PRIMITIVE_TYPE,
23
23
  } from '@finos/legend-graph';
24
24
  import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
25
- import { buildPostFilterConditionState } from '../QueryBuilderPostFilterValueSpecificationProcessor.js';
25
+ import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
26
26
  import {
27
27
  type PostFilterConditionState,
28
28
  type QueryBuilderPostFilterState,
@@ -29,7 +29,7 @@ import {
29
29
  } from '@finos/legend-shared';
30
30
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../QueryBuilder_Const.js';
31
31
  import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
32
- import { buildPostFilterConditionState } from '../QueryBuilderPostFilterValueSpecificationProcessor.js';
32
+ import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
33
33
  import type {
34
34
  PostFilterConditionState,
35
35
  QueryBuilderPostFilterState,
@@ -22,7 +22,7 @@ import {
22
22
  SUPPORTED_FUNCTIONS,
23
23
  } from '@finos/legend-graph';
24
24
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../QueryBuilder_Const.js';
25
- import { buildPostFilterConditionState } from '../QueryBuilderPostFilterValueSpecificationProcessor.js';
25
+ import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
26
26
  import type {
27
27
  PostFilterConditionState,
28
28
  QueryBuilderPostFilterState,
@@ -25,7 +25,7 @@ import {
25
25
  import { UnsupportedOperationError } from '@finos/legend-shared';
26
26
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../QueryBuilder_Const.js';
27
27
  import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
28
- import { buildPostFilterConditionState } from '../QueryBuilderPostFilterValueSpecificationProcessor.js';
28
+ import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
29
29
  import type {
30
30
  PostFilterConditionState,
31
31
  QueryBuilderPostFilterState,
@@ -0,0 +1,155 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import {
18
+ AbstractPropertyExpression,
19
+ LambdaFunctionInstanceValue,
20
+ matchFunctionName,
21
+ SimpleFunctionExpression,
22
+ VariableExpression,
23
+ } from '@finos/legend-graph';
24
+ import {
25
+ assertTrue,
26
+ assertType,
27
+ guaranteeNonNullable,
28
+ guaranteeType,
29
+ returnUndefOnError,
30
+ UnsupportedOperationError,
31
+ } from '@finos/legend-shared';
32
+ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../QueryBuilder_Const.js';
33
+ import { toGroupOperation } from '../QueryBuilderGroupOperationHelper.js';
34
+ import type { QueryBuilderState } from '../QueryBuilderState.js';
35
+ import { validatePropertyExpressionChain } from '../QueryBuilderValueSpecificationHelper.js';
36
+ import {
37
+ type QueryBuilderFilterState,
38
+ QueryBuilderFilterTreeConditionNodeData,
39
+ QueryBuilderFilterTreeGroupNodeData,
40
+ } from './QueryBuilderFilterState.js';
41
+
42
+ const processFilterTree = (
43
+ expression: SimpleFunctionExpression,
44
+ filterState: QueryBuilderFilterState,
45
+ parentFilterNodeId: string | undefined,
46
+ ): void => {
47
+ const parentNode = parentFilterNodeId
48
+ ? filterState.getNode(parentFilterNodeId)
49
+ : undefined;
50
+ if (
51
+ matchFunctionName(expression.functionName, [
52
+ QUERY_BUILDER_SUPPORTED_FUNCTIONS.AND,
53
+ QUERY_BUILDER_SUPPORTED_FUNCTIONS.OR,
54
+ ])
55
+ ) {
56
+ const groupNode = new QueryBuilderFilterTreeGroupNodeData(
57
+ parentFilterNodeId,
58
+ toGroupOperation(expression.functionName),
59
+ );
60
+ filterState.nodes.set(groupNode.id, groupNode);
61
+ expression.parametersValues.forEach((filterExpression) =>
62
+ processFilterTree(
63
+ guaranteeType(
64
+ filterExpression,
65
+ SimpleFunctionExpression,
66
+ `Can't process filter group expression: each child expression must be a function expression`,
67
+ ),
68
+ filterState,
69
+ groupNode.id,
70
+ ),
71
+ );
72
+ filterState.addNodeFromNode(groupNode, parentNode);
73
+ } else {
74
+ const propertyExpression = expression.parametersValues[0];
75
+ if (propertyExpression instanceof AbstractPropertyExpression) {
76
+ const currentPropertyExpression = propertyExpression.parametersValues[0];
77
+ if (currentPropertyExpression instanceof AbstractPropertyExpression) {
78
+ validatePropertyExpressionChain(
79
+ currentPropertyExpression,
80
+ filterState.queryBuilderState.graphManagerState.graph,
81
+ );
82
+ }
83
+ }
84
+ for (const operator of filterState.operators) {
85
+ // NOTE: this allow plugin author to either return `undefined` or throw error
86
+ // if there is a problem with building the lambda. Either case, the plugin is
87
+ // considered as not supporting the lambda.
88
+ const filterConditionState = returnUndefOnError(() =>
89
+ operator.buildFilterConditionState(filterState, expression),
90
+ );
91
+ if (filterConditionState) {
92
+ filterState.addNodeFromNode(
93
+ new QueryBuilderFilterTreeConditionNodeData(
94
+ undefined,
95
+ filterConditionState,
96
+ ),
97
+ parentNode,
98
+ );
99
+ return;
100
+ }
101
+ }
102
+ throw new UnsupportedOperationError(
103
+ `Can't process filter() expression: no compatible filter operator processer available from plugins`,
104
+ );
105
+ }
106
+ };
107
+
108
+ export const processFilterExpression = (
109
+ expression: SimpleFunctionExpression,
110
+ queryBuilderState: QueryBuilderState,
111
+ ): void => {
112
+ const filterState = queryBuilderState.filterState;
113
+ const filterLambda = expression.parametersValues[1];
114
+ assertType(
115
+ filterLambda,
116
+ LambdaFunctionInstanceValue,
117
+ `Can't process filter() expression: filter() expects argument #1 to be a lambda function`,
118
+ );
119
+
120
+ const lambdaFunc = guaranteeNonNullable(
121
+ filterLambda.values[0],
122
+ `Can't process filter() lambda: filter() lambda function is missing`,
123
+ );
124
+ assertTrue(
125
+ lambdaFunc.expressionSequence.length === 1,
126
+ `Can't process filter() lambda: only support filter() lambda body with 1 expression`,
127
+ );
128
+ const rootExpression = guaranteeType(
129
+ lambdaFunc.expressionSequence[0],
130
+ SimpleFunctionExpression,
131
+ `Can't process filter() lambda: only support filter() lambda body with 1 expression`,
132
+ );
133
+
134
+ assertTrue(
135
+ lambdaFunc.functionType.parameters.length === 1,
136
+ `Can't process filter() lambda: only support filter() lambda with 1 parameter`,
137
+ );
138
+ filterState.setLambdaParameterName(
139
+ guaranteeType(
140
+ lambdaFunc.functionType.parameters[0],
141
+ VariableExpression,
142
+ `Can't process filter() lambda: only support filter() lambda with 1 parameter`,
143
+ ).name,
144
+ );
145
+
146
+ processFilterTree(rootExpression, filterState, undefined);
147
+
148
+ /**
149
+ * NOTE: Since group operations like and/or do not take more than 2 parameters, if there are
150
+ * more than 2 clauses in each group operations, then these clauses are converted into an
151
+ * unbalanced tree. However, this would look quite bad for UX, as such, we simplify the tree.
152
+ * After building the filter state.
153
+ */
154
+ filterState.simplifyTree();
155
+ };
@@ -36,8 +36,8 @@ import {
36
36
  } from '../QueryBuilderFilterState.js';
37
37
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../QueryBuilder_Const.js';
38
38
  import { buildGenericLambdaFunctionInstanceValue } from '../../QueryBuilderValueSpecificationHelper.js';
39
- import { buildPropertyExpressionChain } from '../../QueryBuilderValueSpecificationBuilder.js';
40
39
  import type { QueryBuilderFilterOperator } from '../QueryBuilderFilterOperator.js';
40
+ import { buildPropertyExpressionChain } from '../../QueryBuilderValueSpecificationBuilderHelper.js';
41
41
 
42
42
  const getPropertyExpressionChainVariable = (
43
43
  propertyExpression: AbstractPropertyExpression,
@@ -261,12 +261,12 @@ export const buildFilterConditionExpression = (
261
261
  */
262
262
  const buildFilterConditionStateWithExists = (
263
263
  filterState: QueryBuilderFilterState,
264
- precedingExpression: SimpleFunctionExpression,
264
+ parentExpression: SimpleFunctionExpression,
265
265
  operatorFunctionFullPath: string,
266
266
  ): [FilterConditionState | undefined, SimpleFunctionExpression | undefined] => {
267
267
  if (
268
268
  matchFunctionName(
269
- precedingExpression.functionName,
269
+ parentExpression.functionName,
270
270
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.EXISTS,
271
271
  )
272
272
  ) {
@@ -277,7 +277,7 @@ const buildFilterConditionStateWithExists = (
277
277
  // e.g. |Firm.all()->filter(x|$x.employees->exists(x_1|$x_1->subType(@Develper).id->exists(x_2|$x_2 == 1))
278
278
  // In the first exists() lambda, `$x_1->subType(@Develper).id` is an `AbstractPropertyExpression`.
279
279
  const existsLambdaExpressions: AbstractPropertyExpression[] = [];
280
- let mainFilterExpression: SimpleFunctionExpression = precedingExpression;
280
+ let mainFilterExpression: SimpleFunctionExpression = parentExpression;
281
281
  while (
282
282
  matchFunctionName(
283
283
  mainFilterExpression.functionName,
@@ -338,7 +338,7 @@ const buildFilterConditionStateWithExists = (
338
338
  TYPICAL_MULTIPLICITY_TYPE.ONE,
339
339
  );
340
340
  const initialPropertyExpression = guaranteeType(
341
- precedingExpression.parametersValues[0],
341
+ parentExpression.parametersValues[0],
342
342
  AbstractPropertyExpression,
343
343
  );
344
344
  let flattenedPropertyExpressionChain = new AbstractPropertyExpression(
package/tsconfig.json CHANGED
@@ -21,7 +21,7 @@
21
21
  "noImplicitOverride": true,
22
22
  "noUncheckedIndexedAccess": true,
23
23
  "exactOptionalPropertyTypes": true,
24
- "forceConsistentCasingInFileNames": true,
24
+ "forceConsistentCasingInFileNames": false,
25
25
  "outDir": "./lib",
26
26
  "tsBuildInfoFile": "./build/prod.tsbuildinfo",
27
27
  "rootDir": "./src",
@@ -59,12 +59,13 @@
59
59
  "./src/stores/QueryBuilderResultState.ts",
60
60
  "./src/stores/QueryBuilderSetupState.ts",
61
61
  "./src/stores/QueryBuilderState.ts",
62
- "./src/stores/QueryBuilderTestUtils.ts",
62
+ "./src/stores/QueryBuilderStateBuilder.ts",
63
+ "./src/stores/QueryBuilderStateTestUtils.ts",
63
64
  "./src/stores/QueryBuilderTypeaheadHelper.ts",
64
65
  "./src/stores/QueryBuilderUnsupportedState.ts",
65
66
  "./src/stores/QueryBuilderValueSpecificationBuilder.ts",
67
+ "./src/stores/QueryBuilderValueSpecificationBuilderHelper.ts",
66
68
  "./src/stores/QueryBuilderValueSpecificationHelper.ts",
67
- "./src/stores/QueryBuilderValueSpecificationProcessor.ts",
68
69
  "./src/stores/QueryEditorStore.ts",
69
70
  "./src/stores/QueryEditorStoreTestUtils.ts",
70
71
  "./src/stores/QueryParametersState.ts",
@@ -76,15 +77,18 @@
76
77
  "./src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts",
77
78
  "./src/stores/fetch-structure/QueryBuilderFetchStructureState.ts",
78
79
  "./src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts",
80
+ "./src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts",
79
81
  "./src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts",
80
82
  "./src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.ts",
81
83
  "./src/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.ts",
82
84
  "./src/stores/fetch-structure/projection/QueryBuilderProjectionState.ts",
85
+ "./src/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.ts",
83
86
  "./src/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.ts",
84
87
  "./src/stores/fetch-structure/projection/QueryResultSetModifierState.ts",
85
88
  "./src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.ts",
86
89
  "./src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperatorLoader.ts",
87
90
  "./src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.ts",
91
+ "./src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.ts",
88
92
  "./src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorHelper.ts",
89
93
  "./src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.ts",
90
94
  "./src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.ts",
@@ -99,8 +103,8 @@
99
103
  "./src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.ts",
100
104
  "./src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperatorLoader.ts",
101
105
  "./src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.ts",
106
+ "./src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.ts",
102
107
  "./src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.ts",
103
- "./src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationProcessor.ts",
104
108
  "./src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts",
105
109
  "./src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts",
106
110
  "./src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts",
@@ -115,7 +119,8 @@
115
119
  "./src/stores/filter/QueryBuilderFilterOperator.ts",
116
120
  "./src/stores/filter/QueryBuilderFilterOperatorLoader.ts",
117
121
  "./src/stores/filter/QueryBuilderFilterState.ts",
118
- "./src/stores/filter/QueryBuilderValueSpecificationBuilder.ts",
122
+ "./src/stores/filter/QueryBuilderFilterStateBuilder.ts",
123
+ "./src/stores/filter/QueryBuilderFilterValueSpecificationBuilder.ts",
119
124
  "./src/stores/filter/operators/QueryBuilderFilterOperatorHelper.ts",
120
125
  "./src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts",
121
126
  "./src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts",
@@ -21,7 +21,7 @@
21
21
  "noImplicitOverride": true,
22
22
  "noUncheckedIndexedAccess": true,
23
23
  "exactOptionalPropertyTypes": true,
24
- "forceConsistentCasingInFileNames": true,
24
+ "forceConsistentCasingInFileNames": false,
25
25
  "outDir": "./lib",
26
26
  "tsBuildInfoFile": "./build/package.tsbuildinfo",
27
27
  "rootDir": "./"
@@ -1 +0,0 @@
1
- {"version":3,"file":"QueryBuilderTestUtils.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderTestUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,qCAAqC,EAG3C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAKpD,OAAO,EACL,iBAAiB,EAElB,MAAM,wBAAwB,CAAC;AAGhC,eAAO,MAAM,2BAA2B,aAC5B,MAAM,EAAE,cACN,SAAS,GAAG,SAAS,qBAE7B;IACE,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,GACD,SAAS,0CAET,qCAAqC,GACrC,SAAS,KACZ,QAAQ,iBAAiB,CAgD3B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QueryBuilderTestUtils.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderTestUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAGL,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AACrG,OAAO,EACL,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,yCAAyC,EAAE,MAAM,gCAAgC,CAAC;AAE3F,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,EAC9C,QAAkB,EAClB,SAAiC,EACjC,gBAMa,EACb,qCAEa,EACe,EAAE;IAC9B,MAAM,aAAa,GAAG,wBAAwB,CAAC,MAAM,EAAE,CAAC;IACxD,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,+BAA+B,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAC5E,MAAM,gBAAgB,GAAG,6BAA6B,CACpD,yCAAyC,EAAE,EAC3C,wBAAwB,CAAC,MAAM,EAAE,CAClC,CAAC;IACF,MAAM,iBAAiB,GAAG,8BAA8B,CAAC,aAAa,CAAC,CAAC;IACxE,MAAM,4BAA4B,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IAChE,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,CAC7C,gBAAgB,EAChB,iBAAiB,EACjB,IAAI,wBAAwB,EAAE,CAC/B,CAAC;IACF,IAAI,SAAS,EAAE;QACb,iBAAiB,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;KACtD;IACD,IAAI,gBAAgB,EAAE;QACpB,MAAM,KAAK,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,KAAK,CAAC;QACxD,iBAAiB,CAAC,eAAe,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CACvD,gBAAgB,CAAC,MAAM,CACxB,CAAC;QACF,iBAAiB,CAAC,eAAe,CAAC,OAAO,GAAG,KAAK,CAAC,UAAU,CAC1D,gBAAgB,CAAC,OAAO,CACzB,CAAC;QACF,IAAI,gBAAgB,CAAC,OAAO,EAAE;YAC5B,iBAAiB,CAAC,eAAe,CAAC,YAAY,GAAG,KAAK,CAAC,UAAU,CAC/D,gBAAgB,CAAC,OAAO,CACzB,CAAC;SACH;KACF;IACD,IAAI,qCAAqC,EAAE;QACzC,IAAI;aACD,KAAK,CACJ,iBAAiB,CAAC,iBAAiB,CAAC,YAAY,EAChD,6BAA6B,CAC9B;aACA,iBAAiB,CAChB,iBAAiB,CAAC,iBAAiB,CAAC,YAAY,CAAC,uCAAuC,CACtF,qCAAqC,CACtC,CACF,CAAC;QAEJ,MAAM,UAAU,CACd,iBAAiB,CAAC,aAAa,CAAC,2BAA2B,EAAE,CAC9D,CAAC;KACH;IACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC"}