@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
@@ -13,161 +13,24 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { getNullableFirstElement, guaranteeNonNullable, guaranteeType, UnsupportedOperationError, } from '@finos/legend-shared';
17
- import { Class, Multiplicity, getMilestoneTemporalStereotype, INTERNAL__UnknownValueSpecification, V1_GraphTransformerContextBuilder, V1_serializeRawValueSpecification, V1_transformRawLambda, extractElementNameFromPath, InstanceValue, PackageableElementExplicitReference, CollectionInstanceValue, CORE_PURE_PATH, FunctionType, GenericType, GenericTypeExplicitReference, LambdaFunction, PrimitiveInstanceValue, PRIMITIVE_TYPE, RootGraphFetchTreeInstanceValue, SimpleFunctionExpression, TYPICAL_MULTIPLICITY_TYPE, MILESTONING_STEREOTYPE, AbstractPropertyExpression, DerivedProperty, INTERNAL__PropagatedValue, matchFunctionName, } from '@finos/legend-graph';
18
- import { isGraphFetchTreeDataEmpty } from './fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js';
19
- import { QueryBuilderDerivationProjectionColumnState, QueryBuilderSimpleProjectionColumnState, } from './fetch-structure/projection/QueryBuilderProjectionColumnState.js';
20
- import { buildGenericLambdaFunctionInstanceValue } from './QueryBuilderValueSpecificationHelper.js';
21
- import { getDerivedPropertyMilestoningSteoreotype } from './QueryBuilderPropertyEditorState.js';
22
- import { functionExpression_setParametersValues, propertyExpression_setParametersValue, buildParametersLetLambdaFunc, } from '@finos/legend-application';
16
+ import { guaranteeNonNullable } from '@finos/legend-shared';
17
+ import { getMilestoneTemporalStereotype, extractElementNameFromPath, InstanceValue, PackageableElementExplicitReference, CORE_PURE_PATH, FunctionType, GenericType, GenericTypeExplicitReference, LambdaFunction, SimpleFunctionExpression, TYPICAL_MULTIPLICITY_TYPE, MILESTONING_STEREOTYPE, } from '@finos/legend-graph';
18
+ import { buildParametersLetLambdaFunc } from '@finos/legend-application';
23
19
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../QueryBuilder_Const.js';
24
- import { FETCH_STRUCTURE_MODE } from './fetch-structure/QueryBuilderFetchStructureState.js';
25
- import { appendPostFilter } from './fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js';
26
- import { appendResultSetModifiers } from './fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js';
27
- import { buildFilterExpression } from './filter/QueryBuilderValueSpecificationBuilder.js';
28
- /**
29
- * Checks if the provided property expression match the criteria for default
30
- * date propagation so we know whether we need to fill in values for the parameter
31
- * or just propgate values from the parent's expression
32
- *
33
- * NOTE: this takes date propgation into account. See the table below for all
34
- * the combination:
35
- *
36
- * | [source] | | | | |
37
- * ----------------------------------------------------------------------
38
- * [target] | | NONE | PR_TMP | BI_TMP | BU_TMP |
39
- * ----------------------------------------------------------------------
40
- * | NONE | N.A. | PRD | PRD,BUD | BUD |
41
- * ----------------------------------------------------------------------
42
- * | PR_TMP | N.A. | X | PRD,BUD | BUD |
43
- * ----------------------------------------------------------------------
44
- * | BI_TMP | N.A. | X | X | X |
45
- * ----------------------------------------------------------------------
46
- * | BU_TMP | N.A. | PRD | PRD,BUD | X |
47
- * ----------------------------------------------------------------------
48
- *
49
- * Annotations:
50
- *
51
- * [source]: source temporal type
52
- * [target]: target temporal type
53
- *
54
- * PR_TMP : processing temporal
55
- * BI_TMP : bitemporal
56
- * BU_TMP : business temporal
57
- *
58
- * X : no default date propagated
59
- * PRD : default processing date is propagated
60
- * BUD : default business date is propgated
61
- */
62
- const isDefaultDatePropagationSupported = (currentPropertyExpression, queryBuilderState, prevPropertyExpression) => {
63
- const property = currentPropertyExpression.func;
64
- const graph = queryBuilderState.graphManagerState.graph;
65
- // Default date propagation is not supported for current expression when the previous property expression is a derived property.
66
- if (prevPropertyExpression &&
67
- prevPropertyExpression.func instanceof DerivedProperty &&
68
- prevPropertyExpression.func._OWNER.derivedProperties.includes(prevPropertyExpression.func)) {
69
- return false;
70
- }
71
- // Default date propagation is not supported for current expression when the milestonedParameterValues of
72
- // the previous property expression doesn't match with the global milestonedParameterValues
73
- if (prevPropertyExpression &&
74
- prevPropertyExpression.func.genericType.value.rawType instanceof Class) {
75
- const milestoningStereotype = getMilestoneTemporalStereotype(prevPropertyExpression.func.genericType.value.rawType, graph);
76
- if (milestoningStereotype &&
77
- !prevPropertyExpression.parametersValues
78
- .slice(1)
79
- .every((parameterValue) => parameterValue instanceof INTERNAL__PropagatedValue)) {
80
- return false;
81
- }
82
- }
83
- if (property.genericType.value.rawType instanceof Class) {
84
- // the stereotype of source class of current property expression.
85
- const sourceStereotype = property instanceof DerivedProperty
86
- ? getDerivedPropertyMilestoningSteoreotype(property, graph)
87
- : undefined;
88
- // Default date propagation is always supported if the source is `bitemporal`
89
- if (sourceStereotype === MILESTONING_STEREOTYPE.BITEMPORAL) {
90
- return true;
91
- }
92
- // the stereotype (if exists) of the generic type of current property expression.
93
- const targetStereotype = getMilestoneTemporalStereotype(property.genericType.value.rawType, graph);
94
- // Default date propagation is supported when stereotype of both source and target matches
95
- if (sourceStereotype && targetStereotype) {
96
- return sourceStereotype === targetStereotype;
97
- }
98
- }
99
- return false;
100
- };
101
- export const buildGetAllFunction = (_class, multiplicity) => {
20
+ import { buildFilterExpression } from './filter/QueryBuilderFilterValueSpecificationBuilder.js';
21
+ const buildGetAllFunction = (_class, multiplicity) => {
102
22
  const _func = new SimpleFunctionExpression(extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.GET_ALL), multiplicity);
103
23
  const classInstance = new InstanceValue(multiplicity, GenericTypeExplicitReference.create(new GenericType(_class)));
104
24
  classInstance.values[0] = PackageableElementExplicitReference.create(_class);
105
25
  _func.parametersValues.push(classInstance);
106
26
  return _func;
107
27
  };
108
- export const buildPropertyExpressionChain = (propertyExpression, queryBuilderState) => {
109
- const graph = queryBuilderState.graphManagerState.graph;
110
- const newPropertyExpression = new AbstractPropertyExpression('', graph.getTypicalMultiplicity(TYPICAL_MULTIPLICITY_TYPE.ONE));
111
- newPropertyExpression.func = propertyExpression.func;
112
- newPropertyExpression.parametersValues = propertyExpression.parametersValues;
113
- let nextExpression;
114
- let currentExpression = newPropertyExpression;
115
- while (currentExpression instanceof AbstractPropertyExpression) {
116
- nextExpression = getNullableFirstElement(currentExpression.parametersValues);
117
- if (nextExpression instanceof AbstractPropertyExpression) {
118
- const parameterValue = new AbstractPropertyExpression('', graph.getTypicalMultiplicity(TYPICAL_MULTIPLICITY_TYPE.ONE));
119
- parameterValue.func = nextExpression.func;
120
- parameterValue.parametersValues = nextExpression.parametersValues;
121
- nextExpression = parameterValue;
122
- currentExpression.parametersValues[0] = parameterValue;
123
- }
124
- if (currentExpression.func instanceof DerivedProperty) {
125
- const parameterValues = currentExpression.parametersValues.slice(1);
126
- parameterValues.forEach((parameterValue, index) => {
127
- if (parameterValue instanceof INTERNAL__PropagatedValue) {
128
- // Replace with argumentless derived property expression only when default date propagation is supported
129
- if (isDefaultDatePropagationSupported(guaranteeType(currentExpression, AbstractPropertyExpression), queryBuilderState, nextExpression instanceof AbstractPropertyExpression
130
- ? nextExpression
131
- : undefined)) {
132
- // NOTE: For `bitemporal` property check if the property expression has parameters which are not instance of
133
- // `INTERNAL_PropagatedValue` then pass the parameters as user explicitly changed values of either of the parameters.
134
- if ((index === 1 &&
135
- guaranteeType(currentExpression, AbstractPropertyExpression)
136
- .parametersValues.length === 3) ||
137
- (index === 0 &&
138
- guaranteeType(currentExpression, AbstractPropertyExpression)
139
- .parametersValues.length === 3 &&
140
- !(guaranteeType(currentExpression, AbstractPropertyExpression)
141
- .parametersValues[2] instanceof INTERNAL__PropagatedValue))) {
142
- propertyExpression_setParametersValue(guaranteeType(currentExpression, AbstractPropertyExpression), index + 1, parameterValue.getValue(), queryBuilderState.observableContext);
143
- }
144
- else {
145
- functionExpression_setParametersValues(guaranteeType(currentExpression, AbstractPropertyExpression), [
146
- guaranteeNonNullable(guaranteeType(currentExpression, AbstractPropertyExpression)
147
- .parametersValues[0]),
148
- ], queryBuilderState.observableContext);
149
- }
150
- }
151
- else {
152
- propertyExpression_setParametersValue(guaranteeType(currentExpression, AbstractPropertyExpression), index + 1, parameterValue.getValue(), queryBuilderState.observableContext);
153
- }
154
- }
155
- });
156
- }
157
- currentExpression = nextExpression;
158
- // Take care of chains of subtype (a pattern that is not useful, but we want to support and rectify)
159
- // $x.employees->subType(@Person)->subType(@Staff)
160
- while (currentExpression instanceof SimpleFunctionExpression &&
161
- matchFunctionName(currentExpression.functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE)) {
162
- currentExpression = getNullableFirstElement(currentExpression.parametersValues);
163
- }
164
- }
165
- return newPropertyExpression;
28
+ const buildFetchStructure = (fetchStructureState, lambdaFunction, options) => {
29
+ fetchStructureState.implementation.appendFetchStructure(lambdaFunction, options);
166
30
  };
167
31
  export const buildLambdaFunction = (queryBuilderState, options) => {
168
32
  const _class = guaranteeNonNullable(queryBuilderState.querySetupState._class, 'Class is required to build query');
169
33
  const multiplicityOne = queryBuilderState.graphManagerState.graph.getTypicalMultiplicity(TYPICAL_MULTIPLICITY_TYPE.ONE);
170
- const typeString = queryBuilderState.graphManagerState.graph.getPrimitiveType(PRIMITIVE_TYPE.STRING);
171
34
  const typeAny = queryBuilderState.graphManagerState.graph.getType(CORE_PURE_PATH.ANY);
172
35
  const lambdaFunction = new LambdaFunction(new FunctionType(typeAny, multiplicityOne));
173
36
  // build getAll()
@@ -193,185 +56,13 @@ export const buildLambdaFunction = (queryBuilderState, options) => {
193
56
  }
194
57
  }
195
58
  lambdaFunction.expressionSequence[0] = getAllFunction;
196
- // build filter()
59
+ // build filter
197
60
  const filterFunction = buildFilterExpression(queryBuilderState.filterState, getAllFunction);
198
61
  if (filterFunction) {
199
62
  lambdaFunction.expressionSequence[0] = filterFunction;
200
63
  }
201
- // build fetch structure
202
- switch (queryBuilderState.fetchStructureState.fetchStructureMode) {
203
- case FETCH_STRUCTURE_MODE.PROJECTION: {
204
- if (queryBuilderState.fetchStructureState.projectionState.aggregationState
205
- .columns.length) {
206
- // aggregation
207
- const groupByFunction = new SimpleFunctionExpression(extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY), multiplicityOne);
208
- const colLambdas = new CollectionInstanceValue(new Multiplicity(queryBuilderState.fetchStructureState.projectionState.columns
209
- .length -
210
- queryBuilderState.fetchStructureState.projectionState
211
- .aggregationState.columns.length, queryBuilderState.fetchStructureState.projectionState.columns
212
- .length -
213
- queryBuilderState.fetchStructureState.projectionState
214
- .aggregationState.columns.length));
215
- const aggregateLambdas = new CollectionInstanceValue(new Multiplicity(queryBuilderState.fetchStructureState.projectionState.aggregationState.columns.length, queryBuilderState.fetchStructureState.projectionState.aggregationState.columns.length));
216
- const colAliases = new CollectionInstanceValue(new Multiplicity(queryBuilderState.fetchStructureState.projectionState.columns.length, queryBuilderState.fetchStructureState.projectionState.columns.length));
217
- queryBuilderState.fetchStructureState.projectionState.columns.forEach((projectionColumnState) => {
218
- // column alias
219
- const colAlias = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(new GenericType(typeString)), multiplicityOne);
220
- colAlias.values.push(projectionColumnState.columnName);
221
- colAliases.values.push(colAlias);
222
- const aggregateColumnState = queryBuilderState.fetchStructureState.projectionState.aggregationState.columns.find((column) => column.projectionColumnState === projectionColumnState);
223
- // column projection
224
- let columnLambda;
225
- if (projectionColumnState instanceof
226
- QueryBuilderSimpleProjectionColumnState) {
227
- columnLambda = buildGenericLambdaFunctionInstanceValue(projectionColumnState.lambdaParameterName, [
228
- buildPropertyExpressionChain(projectionColumnState.propertyExpressionState
229
- .propertyExpression, projectionColumnState.propertyExpressionState
230
- .queryBuilderState),
231
- ], queryBuilderState.graphManagerState.graph);
232
- }
233
- else if (projectionColumnState instanceof
234
- QueryBuilderDerivationProjectionColumnState) {
235
- columnLambda = new INTERNAL__UnknownValueSpecification(V1_serializeRawValueSpecification(V1_transformRawLambda(projectionColumnState.lambda, new V1_GraphTransformerContextBuilder(
236
- // TODO?: do we need to include the plugins here?
237
- [])
238
- .withKeepSourceInformationFlag(Boolean(options?.keepSourceInformation))
239
- .build())));
240
- }
241
- else {
242
- throw new UnsupportedOperationError(`Can't build project() column expression: unsupported projection column state`, projectionColumnState);
243
- }
244
- // column aggregation
245
- if (aggregateColumnState) {
246
- const aggregateFunctionExpression = new SimpleFunctionExpression(extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_AGG), multiplicityOne);
247
- const aggregateLambda = buildGenericLambdaFunctionInstanceValue(aggregateColumnState.lambdaParameterName, [
248
- aggregateColumnState.operator.buildAggregateExpressionFromState(aggregateColumnState),
249
- ], aggregateColumnState.aggregationState.projectionState
250
- .queryBuilderState.graphManagerState.graph);
251
- aggregateFunctionExpression.parametersValues = [
252
- columnLambda,
253
- aggregateLambda,
254
- ];
255
- aggregateLambdas.values.push(aggregateFunctionExpression);
256
- }
257
- else {
258
- colLambdas.values.push(columnLambda);
259
- }
260
- });
261
- const expression = lambdaFunction.expressionSequence[0];
262
- groupByFunction.parametersValues = [
263
- expression,
264
- colLambdas,
265
- aggregateLambdas,
266
- colAliases,
267
- ];
268
- lambdaFunction.expressionSequence[0] = groupByFunction;
269
- }
270
- else if (queryBuilderState.fetchStructureState.projectionState.columns.length) {
271
- // projection
272
- const projectFunction = new SimpleFunctionExpression(extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT), multiplicityOne);
273
- const colLambdas = new CollectionInstanceValue(new Multiplicity(queryBuilderState.fetchStructureState.projectionState.columns.length, queryBuilderState.fetchStructureState.projectionState.columns.length));
274
- const colAliases = new CollectionInstanceValue(new Multiplicity(queryBuilderState.fetchStructureState.projectionState.columns.length, queryBuilderState.fetchStructureState.projectionState.columns.length));
275
- queryBuilderState.fetchStructureState.projectionState.columns.forEach((projectionColumnState) => {
276
- // column alias
277
- const colAlias = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(new GenericType(typeString)), multiplicityOne);
278
- colAlias.values.push(projectionColumnState.columnName);
279
- colAliases.values.push(colAlias);
280
- // column projection
281
- let columnLambda;
282
- if (projectionColumnState instanceof
283
- QueryBuilderSimpleProjectionColumnState) {
284
- columnLambda = buildGenericLambdaFunctionInstanceValue(projectionColumnState.lambdaParameterName, [
285
- buildPropertyExpressionChain(projectionColumnState.propertyExpressionState
286
- .propertyExpression, projectionColumnState.propertyExpressionState
287
- .queryBuilderState),
288
- ], queryBuilderState.graphManagerState.graph);
289
- }
290
- else if (projectionColumnState instanceof
291
- QueryBuilderDerivationProjectionColumnState) {
292
- columnLambda = new INTERNAL__UnknownValueSpecification(V1_serializeRawValueSpecification(V1_transformRawLambda(projectionColumnState.lambda, new V1_GraphTransformerContextBuilder(
293
- // TODO?: do we need to include the plugins here?
294
- [])
295
- .withKeepSourceInformationFlag(Boolean(options?.keepSourceInformation))
296
- .build())));
297
- }
298
- else {
299
- throw new UnsupportedOperationError(`Can't build project() column expression: unsupported projection column state`, projectionColumnState);
300
- }
301
- colLambdas.values.push(columnLambda);
302
- });
303
- const expression = lambdaFunction.expressionSequence[0];
304
- projectFunction.parametersValues = [expression, colLambdas, colAliases];
305
- lambdaFunction.expressionSequence[0] = projectFunction;
306
- }
307
- // build post-filter
308
- appendPostFilter(queryBuilderState.fetchStructureState.projectionState.postFilterState, lambdaFunction);
309
- // build result set modifiers
310
- appendResultSetModifiers(queryBuilderState.fetchStructureState.projectionState
311
- .resultSetModifierState, lambdaFunction, {
312
- overridingLimit: options?.isBuildingExecutionQuery
313
- ? queryBuilderState.resultState.previewLimit
314
- : undefined,
315
- });
316
- break;
317
- }
318
- case FETCH_STRUCTURE_MODE.GRAPH_FETCH: {
319
- // build fetch-structure
320
- if (queryBuilderState.fetchStructureState.graphFetchTreeState.treeData &&
321
- !isGraphFetchTreeDataEmpty(queryBuilderState.fetchStructureState.graphFetchTreeState.treeData)) {
322
- const graphFetchInstance = new RootGraphFetchTreeInstanceValue(multiplicityOne);
323
- graphFetchInstance.values = [
324
- queryBuilderState.fetchStructureState.graphFetchTreeState.treeData
325
- .tree,
326
- ];
327
- const serializeFunction = new SimpleFunctionExpression(extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.SERIALIZE), multiplicityOne);
328
- const graphFetchFunc = new SimpleFunctionExpression(queryBuilderState.fetchStructureState.graphFetchTreeState.isChecked
329
- ? extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.GRAPH_FETCH_CHECKED)
330
- : extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.GRAPH_FETCH), multiplicityOne);
331
- const expression = lambdaFunction.expressionSequence[0];
332
- graphFetchFunc.parametersValues = [expression, graphFetchInstance];
333
- serializeFunction.parametersValues = [
334
- graphFetchFunc,
335
- graphFetchInstance,
336
- ];
337
- lambdaFunction.expressionSequence[0] = serializeFunction;
338
- }
339
- // build result set modifier: i.e. preview limit
340
- if (options?.isBuildingExecutionQuery) {
341
- if (lambdaFunction.expressionSequence.length === 1) {
342
- const func = lambdaFunction.expressionSequence[0];
343
- if (func instanceof SimpleFunctionExpression) {
344
- if (matchFunctionName(func.functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.SERIALIZE)) {
345
- // NOTE: we have to separate the handling of `take()` for projection and
346
- // graph-fetch as the latter use `meta::pure::functions::collection::take()`
347
- // where the former uses `meta::pure::tds::take()`, therefore the placement
348
- // in the query are different. Also, note that because of the above distinction,
349
- // we won't support using `take()` as result set modifier operations for graph-fetch.
350
- // Result set modifier should only be used for projection for now.
351
- const limit = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(new GenericType(queryBuilderState.graphManagerState.graph.getPrimitiveType(PRIMITIVE_TYPE.INTEGER))), multiplicityOne);
352
- limit.values = [queryBuilderState.resultState.previewLimit];
353
- const takeFunction = new SimpleFunctionExpression(extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.TAKE), multiplicityOne);
354
- // NOTE: `take()` does not work on `graphFetch()` or `serialize()` so we will put it
355
- // right next to `all()`
356
- const serializeFunction = func;
357
- const graphFetchFunc = guaranteeType(serializeFunction.parametersValues[0], SimpleFunctionExpression);
358
- const getAllFunc = graphFetchFunc
359
- .parametersValues[0];
360
- takeFunction.parametersValues[0] = getAllFunc;
361
- takeFunction.parametersValues[1] = limit;
362
- graphFetchFunc.parametersValues = [
363
- takeFunction,
364
- graphFetchFunc.parametersValues[1],
365
- ];
366
- }
367
- }
368
- }
369
- }
370
- break;
371
- }
372
- default:
373
- break;
374
- }
64
+ // build fetch-structure
65
+ buildFetchStructure(queryBuilderState.fetchStructureState, lambdaFunction, options);
375
66
  // build parameters
376
67
  if (!queryBuilderState.mode.isParametersDisabled &&
377
68
  queryBuilderState.queryParametersState.parameterStates.length) {
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilderValueSpecificationBuilder.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,aAAa,EACb,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,KAAK,EACL,YAAY,EACZ,8BAA8B,EAC9B,mCAAmC,EACnC,iCAAiC,EACjC,iCAAiC,EACjC,qBAAqB,EACr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ACnB,CAAC;SACL;KACF;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
1
+ {"version":3,"file":"QueryBuilderValueSpecificationBuilder.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAGL,8BAA8B,EAC9B,0BAA0B,EAC1B,aAAa,EACb,mCAAmC,EACnC,cAAc,EACd,YAAY,EACZ,WAAW,EACX,4BAA4B,EAC5B,cAAc,EACd,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,iCAAiC,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAC;AAIhG,MAAM,mBAAmB,GAAG,CAC1B,MAAa,EACb,YAA0B,EACA,EAAE;IAC5B,MAAM,KAAK,GAAG,IAAI,wBAAwB,CACxC,0BAA0B,CAAC,iCAAiC,CAAC,OAAO,CAAC,EACrE,YAAY,CACb,CAAC;IACF,MAAM,aAAa,GAAG,IAAI,aAAa,CACrC,YAAY,EACZ,4BAA4B,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAC7D,CAAC;IACF,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,mCAAmC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7E,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAC1B,mBAAoD,EACpD,cAA8B,EAC9B,OAAqC,EAC/B,EAAE;IACR,mBAAmB,CAAC,cAAc,CAAC,oBAAo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,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACnB,CAAC;SACL;KACF;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
@@ -0,0 +1,27 @@
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
+ import { AbstractPropertyExpression, type ValueSpecification } from '@finos/legend-graph';
17
+ import type { QueryBuilderState } from './QueryBuilderState.js';
18
+ export declare const buildPropertyExpressionChain: (propertyExpression: AbstractPropertyExpression, queryBuilderState: QueryBuilderState) => ValueSpecification;
19
+ export declare type LambdaFunctionBuilderOption = {
20
+ /**
21
+ * Set queryBuilderState to `true` when we construct query for execution within the app.
22
+ * queryBuilderState will make the lambda function building process overrides several query values, such as the row limit.
23
+ */
24
+ isBuildingExecutionQuery?: boolean | undefined;
25
+ keepSourceInformation?: boolean | undefined;
26
+ };
27
+ //# sourceMappingURL=QueryBuilderValueSpecificationBuilderHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderValueSpecificationBuilderHelper.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilderHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EACL,0BAA0B,EAS1B,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;AAQ7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAkGhE,eAAO,MAAM,4BAA4B,uBACnB,0BAA0B,qBAC3B,iBAAiB,KACnC,kBAkGF,CAAC;AAEF,oBAAY,2BAA2B,GAAG;IACxC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/C,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7C,CAAC"}
@@ -0,0 +1,153 @@
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
+ import { functionExpression_setParametersValues, propertyExpression_setParametersValue, } from '@finos/legend-application';
17
+ import { AbstractPropertyExpression, Class, DerivedProperty, getMilestoneTemporalStereotype, INTERNAL__PropagatedValue, matchFunctionName, MILESTONING_STEREOTYPE, SimpleFunctionExpression, TYPICAL_MULTIPLICITY_TYPE, } from '@finos/legend-graph';
18
+ import { getNullableFirstElement, guaranteeNonNullable, guaranteeType, } from '@finos/legend-shared';
19
+ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../QueryBuilder_Const.js';
20
+ import { getDerivedPropertyMilestoningSteoreotype } from './QueryBuilderPropertyEditorState.js';
21
+ /**
22
+ * Checks if the provided property expression match the criteria for default
23
+ * date propagation so we know whether we need to fill in values for the parameter
24
+ * or just propgate values from the parent's expression
25
+ *
26
+ * NOTE: this takes date propgation into account. See the table below for all
27
+ * the combination:
28
+ *
29
+ * | [source] | | | | |
30
+ * ----------------------------------------------------------------------
31
+ * [target] | | NONE | PR_TMP | BI_TMP | BU_TMP |
32
+ * ----------------------------------------------------------------------
33
+ * | NONE | N.A. | PRD | PRD,BUD | BUD |
34
+ * ----------------------------------------------------------------------
35
+ * | PR_TMP | N.A. | X | PRD,BUD | BUD |
36
+ * ----------------------------------------------------------------------
37
+ * | BI_TMP | N.A. | X | X | X |
38
+ * ----------------------------------------------------------------------
39
+ * | BU_TMP | N.A. | PRD | PRD,BUD | X |
40
+ * ----------------------------------------------------------------------
41
+ *
42
+ * Annotations:
43
+ *
44
+ * [source]: source temporal type
45
+ * [target]: target temporal type
46
+ *
47
+ * PR_TMP : processing temporal
48
+ * BI_TMP : bitemporal
49
+ * BU_TMP : business temporal
50
+ *
51
+ * X : no default date propagated
52
+ * PRD : default processing date is propagated
53
+ * BUD : default business date is propgated
54
+ */
55
+ const isDefaultDatePropagationSupported = (currentPropertyExpression, queryBuilderState, prevPropertyExpression) => {
56
+ const property = currentPropertyExpression.func;
57
+ const graph = queryBuilderState.graphManagerState.graph;
58
+ // Default date propagation is not supported for current expression when the previous property expression is a derived property.
59
+ if (prevPropertyExpression &&
60
+ prevPropertyExpression.func instanceof DerivedProperty &&
61
+ prevPropertyExpression.func._OWNER.derivedProperties.includes(prevPropertyExpression.func)) {
62
+ return false;
63
+ }
64
+ // Default date propagation is not supported for current expression when the milestonedParameterValues of
65
+ // the previous property expression doesn't match with the global milestonedParameterValues
66
+ if (prevPropertyExpression &&
67
+ prevPropertyExpression.func.genericType.value.rawType instanceof Class) {
68
+ const milestoningStereotype = getMilestoneTemporalStereotype(prevPropertyExpression.func.genericType.value.rawType, graph);
69
+ if (milestoningStereotype &&
70
+ !prevPropertyExpression.parametersValues
71
+ .slice(1)
72
+ .every((parameterValue) => parameterValue instanceof INTERNAL__PropagatedValue)) {
73
+ return false;
74
+ }
75
+ }
76
+ if (property.genericType.value.rawType instanceof Class) {
77
+ // the stereotype of source class of current property expression.
78
+ const sourceStereotype = property instanceof DerivedProperty
79
+ ? getDerivedPropertyMilestoningSteoreotype(property, graph)
80
+ : undefined;
81
+ // Default date propagation is always supported if the source is `bitemporal`
82
+ if (sourceStereotype === MILESTONING_STEREOTYPE.BITEMPORAL) {
83
+ return true;
84
+ }
85
+ // the stereotype (if exists) of the generic type of current property expression.
86
+ const targetStereotype = getMilestoneTemporalStereotype(property.genericType.value.rawType, graph);
87
+ // Default date propagation is supported when stereotype of both source and target matches
88
+ if (sourceStereotype && targetStereotype) {
89
+ return sourceStereotype === targetStereotype;
90
+ }
91
+ }
92
+ return false;
93
+ };
94
+ export const buildPropertyExpressionChain = (propertyExpression, queryBuilderState) => {
95
+ const graph = queryBuilderState.graphManagerState.graph;
96
+ const newPropertyExpression = new AbstractPropertyExpression('', graph.getTypicalMultiplicity(TYPICAL_MULTIPLICITY_TYPE.ONE));
97
+ newPropertyExpression.func = propertyExpression.func;
98
+ newPropertyExpression.parametersValues = propertyExpression.parametersValues;
99
+ let nextExpression;
100
+ let currentExpression = newPropertyExpression;
101
+ while (currentExpression instanceof AbstractPropertyExpression) {
102
+ nextExpression = getNullableFirstElement(currentExpression.parametersValues);
103
+ if (nextExpression instanceof AbstractPropertyExpression) {
104
+ const parameterValue = new AbstractPropertyExpression('', graph.getTypicalMultiplicity(TYPICAL_MULTIPLICITY_TYPE.ONE));
105
+ parameterValue.func = nextExpression.func;
106
+ parameterValue.parametersValues = nextExpression.parametersValues;
107
+ nextExpression = parameterValue;
108
+ currentExpression.parametersValues[0] = parameterValue;
109
+ }
110
+ if (currentExpression.func instanceof DerivedProperty) {
111
+ const parameterValues = currentExpression.parametersValues.slice(1);
112
+ parameterValues.forEach((parameterValue, index) => {
113
+ if (parameterValue instanceof INTERNAL__PropagatedValue) {
114
+ // Replace with argumentless derived property expression only when default date propagation is supported
115
+ if (isDefaultDatePropagationSupported(guaranteeType(currentExpression, AbstractPropertyExpression), queryBuilderState, nextExpression instanceof AbstractPropertyExpression
116
+ ? nextExpression
117
+ : undefined)) {
118
+ // NOTE: For `bitemporal` property check if the property expression has parameters which are not instance of
119
+ // `INTERNAL_PropagatedValue` then pass the parameters as user explicitly changed values of either of the parameters.
120
+ if ((index === 1 &&
121
+ guaranteeType(currentExpression, AbstractPropertyExpression)
122
+ .parametersValues.length === 3) ||
123
+ (index === 0 &&
124
+ guaranteeType(currentExpression, AbstractPropertyExpression)
125
+ .parametersValues.length === 3 &&
126
+ !(guaranteeType(currentExpression, AbstractPropertyExpression)
127
+ .parametersValues[2] instanceof INTERNAL__PropagatedValue))) {
128
+ propertyExpression_setParametersValue(guaranteeType(currentExpression, AbstractPropertyExpression), index + 1, parameterValue.getValue(), queryBuilderState.observableContext);
129
+ }
130
+ else {
131
+ functionExpression_setParametersValues(guaranteeType(currentExpression, AbstractPropertyExpression), [
132
+ guaranteeNonNullable(guaranteeType(currentExpression, AbstractPropertyExpression)
133
+ .parametersValues[0]),
134
+ ], queryBuilderState.observableContext);
135
+ }
136
+ }
137
+ else {
138
+ propertyExpression_setParametersValue(guaranteeType(currentExpression, AbstractPropertyExpression), index + 1, parameterValue.getValue(), queryBuilderState.observableContext);
139
+ }
140
+ }
141
+ });
142
+ }
143
+ currentExpression = nextExpression;
144
+ // Take care of chains of subtype (a pattern that is not useful, but we want to support and rectify)
145
+ // $x.employees->subType(@Person)->subType(@Staff)
146
+ while (currentExpression instanceof SimpleFunctionExpression &&
147
+ matchFunctionName(currentExpression.functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE)) {
148
+ currentExpression = getNullableFirstElement(currentExpression.parametersValues);
149
+ }
150
+ }
151
+ return newPropertyExpression;
152
+ };
153
+ //# sourceMappingURL=QueryBuilderValueSpecificationBuilderHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderValueSpecificationBuilderHelper.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilderHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,sCAAsC,EACtC,qCAAqC,GACtC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,0BAA0B,EAC1B,KAAK,EACL,eAAe,EACf,8BAA8B,EAC9B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