@finos/legend-query-builder 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (329) hide show
  1. package/lib/components/QueryBuilder.d.ts.map +1 -1
  2. package/lib/components/QueryBuilder.js +1 -1
  3. package/lib/components/QueryBuilder.js.map +1 -1
  4. package/lib/components/QueryBuilderComponentTestUtils.d.ts.map +1 -1
  5. package/lib/components/QueryBuilderComponentTestUtils.js +1 -3
  6. package/lib/components/QueryBuilderComponentTestUtils.js.map +1 -1
  7. package/lib/components/QueryBuilderDiffPanel.js +1 -2
  8. package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
  9. package/lib/components/QueryBuilderParametersPanel.d.ts +1 -1
  10. package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
  11. package/lib/components/QueryBuilderParametersPanel.js +8 -5
  12. package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
  13. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
  14. package/lib/components/QueryBuilderPropertyExpressionEditor.js +11 -8
  15. package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
  16. package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
  17. package/lib/components/QueryBuilderResultPanel.js +6 -4
  18. package/lib/components/QueryBuilderResultPanel.js.map +1 -1
  19. package/lib/components/QueryBuilderTextEditor.js +2 -2
  20. package/lib/components/QueryBuilderTextEditor.js.map +1 -1
  21. package/lib/components/QueryBuilder_TestID.d.ts +1 -0
  22. package/lib/components/QueryBuilder_TestID.d.ts.map +1 -1
  23. package/lib/components/QueryBuilder_TestID.js +1 -0
  24. package/lib/components/QueryBuilder_TestID.js.map +1 -1
  25. package/lib/components/explorer/QueryBuilderExplorerPanel.js +2 -2
  26. package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
  27. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
  28. package/lib/components/explorer/QueryBuilderMilestoningEditor.js +5 -4
  29. package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
  30. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  31. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +4 -2
  32. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  33. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +1 -1
  34. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  35. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  36. package/lib/components/filter/QueryBuilderFilterPanel.js +7 -4
  37. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  38. package/lib/components/shared/BasicValueSpecificationEditor.d.ts +53 -0
  39. package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -0
  40. package/lib/components/shared/BasicValueSpecificationEditor.js +323 -0
  41. package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -0
  42. package/lib/components/shared/CustomDatePicker.d.ts +39 -0
  43. package/lib/components/shared/CustomDatePicker.d.ts.map +1 -0
  44. package/lib/components/shared/CustomDatePicker.js +622 -0
  45. package/lib/components/shared/CustomDatePicker.js.map +1 -0
  46. package/lib/components/shared/LambdaEditor.d.ts +92 -0
  47. package/lib/components/shared/LambdaEditor.d.ts.map +1 -0
  48. package/lib/components/shared/LambdaEditor.js +432 -0
  49. package/lib/components/shared/LambdaEditor.js.map +1 -0
  50. package/lib/{graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.d.ts → components/shared/LambdaParameterValuesEditor.d.ts} +11 -3
  51. package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -0
  52. package/lib/components/shared/LambdaParameterValuesEditor.js +52 -0
  53. package/lib/components/shared/LambdaParameterValuesEditor.js.map +1 -0
  54. package/lib/components/shared/QueryBuilderLambdaEditor.d.ts +1 -1
  55. package/lib/components/shared/QueryBuilderLambdaEditor.d.ts.map +1 -1
  56. package/lib/components/shared/QueryBuilderLambdaEditor.js +3 -2
  57. package/lib/components/shared/QueryBuilderLambdaEditor.js.map +1 -1
  58. package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts.map +1 -1
  59. package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js +1 -2
  60. package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -1
  61. package/lib/graphManager/protocol/pure/v1/{V1_QueryBuilder_FunctionExpressionBuilder.d.ts → V1_QueryValueSpecificationBuilderHelper.d.ts} +3 -2
  62. package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -0
  63. package/lib/graphManager/protocol/pure/v1/{V1_QueryBuilder_FunctionExpressionBuilder.js → V1_QueryValueSpecificationBuilderHelper.js} +3 -2
  64. package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js.map +1 -0
  65. package/lib/index.css +2 -2
  66. package/lib/index.css.map +1 -1
  67. package/lib/index.d.ts +7 -0
  68. package/lib/index.d.ts.map +1 -1
  69. package/lib/index.js +8 -0
  70. package/lib/index.js.map +1 -1
  71. package/lib/package.json +7 -10
  72. package/lib/stores/QueryBuilderMilestoningState.d.ts.map +1 -1
  73. package/lib/stores/QueryBuilderMilestoningState.js +6 -6
  74. package/lib/stores/QueryBuilderMilestoningState.js.map +1 -1
  75. package/lib/stores/QueryBuilderParametersState.d.ts +1 -1
  76. package/lib/stores/QueryBuilderParametersState.d.ts.map +1 -1
  77. package/lib/stores/QueryBuilderParametersState.js +1 -1
  78. package/lib/stores/QueryBuilderParametersState.js.map +1 -1
  79. package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
  80. package/lib/stores/QueryBuilderPropertyEditorState.js +35 -38
  81. package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
  82. package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
  83. package/lib/stores/QueryBuilderResultState.js +2 -1
  84. package/lib/stores/QueryBuilderResultState.js.map +1 -1
  85. package/lib/stores/QueryBuilderState.d.ts +2 -2
  86. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  87. package/lib/stores/QueryBuilderState.js +5 -5
  88. package/lib/stores/QueryBuilderState.js.map +1 -1
  89. package/lib/stores/QueryBuilderStateBuilder.js +1 -1
  90. package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
  91. package/lib/stores/QueryBuilderTextEditorState.d.ts +1 -1
  92. package/lib/stores/QueryBuilderTextEditorState.d.ts.map +1 -1
  93. package/lib/stores/QueryBuilderTextEditorState.js +2 -1
  94. package/lib/stores/QueryBuilderTextEditorState.js.map +1 -1
  95. package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
  96. package/lib/stores/QueryBuilderValueSpecificationBuilder.js +2 -2
  97. package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
  98. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -1
  99. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +23 -20
  100. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -1
  101. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +1 -1
  102. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
  103. package/lib/stores/QueryBuilderValueSpecificationHelper.js +10 -9
  104. package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
  105. package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
  106. package/lib/stores/explorer/QueryBuilderExplorerState.js +4 -3
  107. package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
  108. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +1 -1
  109. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
  110. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +1 -1
  111. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
  112. package/lib/stores/fetch-structure/graph-fetch/{QueryBuilderGraphFetchValueSpecificationBuilder.d.ts → QueryBuilderGraphFetchTreeValueSpecificationBuilder.d.ts} +1 -1
  113. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeValueSpecificationBuilder.d.ts.map +1 -0
  114. package/lib/stores/fetch-structure/graph-fetch/{QueryBuilderGraphFetchValueSpecificationBuilder.js → QueryBuilderGraphFetchTreeValueSpecificationBuilder.js} +1 -1
  115. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeValueSpecificationBuilder.js.map +1 -0
  116. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts +1 -1
  117. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
  118. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js +3 -3
  119. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js.map +1 -1
  120. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js +1 -1
  121. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js.map +1 -1
  122. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.js +4 -4
  123. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
  124. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
  125. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js +6 -6
  126. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
  127. package/lib/stores/fetch-structure/projection/aggregation/operators/{QueryBuilderAggregateOperatorHelper.d.ts → QueryBuilderAggregateOperatorValueSpecificationBuilder.d.ts} +2 -2
  128. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorValueSpecificationBuilder.d.ts.map +1 -0
  129. package/lib/stores/fetch-structure/projection/aggregation/operators/{QueryBuilderAggregateOperatorHelper.js → QueryBuilderAggregateOperatorValueSpecificationBuilder.js} +2 -2
  130. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorValueSpecificationBuilder.js.map +1 -0
  131. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js +3 -3
  132. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js.map +1 -1
  133. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js +3 -3
  134. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js.map +1 -1
  135. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js +3 -3
  136. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js.map +1 -1
  137. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js +1 -1
  138. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js.map +1 -1
  139. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js +1 -1
  140. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js.map +1 -1
  141. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js +5 -5
  142. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js.map +1 -1
  143. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js +5 -5
  144. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js.map +1 -1
  145. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js +3 -3
  146. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js.map +1 -1
  147. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js +3 -3
  148. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js.map +1 -1
  149. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js +3 -3
  150. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js.map +1 -1
  151. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.js +2 -2
  152. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -1
  153. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.d.ts +1 -1
  154. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.d.ts.map +1 -1
  155. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js +10 -10
  156. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js.map +1 -1
  157. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts +1 -4
  158. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts.map +1 -1
  159. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +3 -46
  160. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
  161. package/{src/graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.ts → lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.d.ts} +5 -13
  162. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.d.ts.map +1 -0
  163. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js +61 -0
  164. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js.map +1 -0
  165. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -1
  166. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +5 -4
  167. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
  168. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -1
  169. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +5 -4
  170. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
  171. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -1
  172. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +10 -8
  173. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
  174. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -1
  175. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +5 -4
  176. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
  177. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +3 -3
  178. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -1
  179. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js +3 -3
  180. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -1
  181. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +1 -1
  182. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -1
  183. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -1
  184. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +5 -4
  185. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
  186. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +3 -3
  187. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -1
  188. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -1
  189. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +5 -4
  190. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
  191. package/lib/stores/filter/operators/{QueryBuilderFilterOperatorHelper.d.ts → QueryBuilderFilterOperatorValueSpecificationBuilder.d.ts} +1 -1
  192. package/lib/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.d.ts.map +1 -0
  193. package/lib/stores/filter/operators/{QueryBuilderFilterOperatorHelper.js → QueryBuilderFilterOperatorValueSpecificationBuilder.js} +11 -13
  194. package/lib/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.js.map +1 -0
  195. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -1
  196. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +7 -6
  197. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -1
  198. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -1
  199. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js +7 -6
  200. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -1
  201. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -1
  202. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js +13 -11
  203. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +1 -1
  204. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -1
  205. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js +8 -7
  206. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -1
  207. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -1
  208. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js +8 -7
  209. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -1
  210. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js +6 -6
  211. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js.map +1 -1
  212. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js +4 -4
  213. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js.map +1 -1
  214. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -1
  215. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js +8 -7
  216. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js.map +1 -1
  217. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -1
  218. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js +8 -7
  219. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -1
  220. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -1
  221. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js +7 -6
  222. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -1
  223. package/lib/stores/shared/LambdaEditorState.d.ts +40 -0
  224. package/lib/stores/shared/LambdaEditorState.d.ts.map +1 -0
  225. package/lib/stores/shared/LambdaEditorState.js +81 -0
  226. package/lib/stores/shared/LambdaEditorState.js.map +1 -0
  227. package/lib/stores/shared/LambdaParameterState.d.ts +62 -0
  228. package/lib/stores/shared/LambdaParameterState.d.ts.map +1 -0
  229. package/lib/stores/shared/LambdaParameterState.js +157 -0
  230. package/lib/stores/shared/LambdaParameterState.js.map +1 -0
  231. package/lib/{graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.js → stores/shared/ValueSpecificationEditorHelper.d.ts} +5 -3
  232. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -0
  233. package/lib/stores/shared/ValueSpecificationEditorHelper.js +77 -0
  234. package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -0
  235. package/lib/stores/shared/ValueSpecificationModifierHelper.d.ts +33 -0
  236. package/lib/stores/shared/ValueSpecificationModifierHelper.d.ts.map +1 -0
  237. package/lib/stores/shared/ValueSpecificationModifierHelper.js +71 -0
  238. package/lib/stores/shared/ValueSpecificationModifierHelper.js.map +1 -0
  239. package/package.json +14 -17
  240. package/src/components/QueryBuilder.tsx +4 -1
  241. package/src/components/QueryBuilderComponentTestUtils.tsx +2 -2
  242. package/src/components/QueryBuilderDiffPanel.tsx +1 -1
  243. package/src/components/QueryBuilderParametersPanel.tsx +8 -7
  244. package/src/components/QueryBuilderPropertyExpressionEditor.tsx +15 -12
  245. package/src/components/QueryBuilderResultPanel.tsx +8 -6
  246. package/src/components/QueryBuilderTextEditor.tsx +2 -2
  247. package/src/components/QueryBuilder_TestID.ts +2 -0
  248. package/src/components/explorer/QueryBuilderExplorerPanel.tsx +2 -2
  249. package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +5 -3
  250. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +6 -4
  251. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +1 -1
  252. package/src/components/filter/QueryBuilderFilterPanel.tsx +9 -6
  253. package/src/components/shared/BasicValueSpecificationEditor.tsx +837 -0
  254. package/src/components/shared/CustomDatePicker.tsx +1363 -0
  255. package/src/components/shared/LambdaEditor.tsx +858 -0
  256. package/src/components/shared/LambdaParameterValuesEditor.tsx +121 -0
  257. package/src/components/shared/QueryBuilderLambdaEditor.tsx +5 -5
  258. package/src/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +2 -2
  259. package/src/graphManager/protocol/pure/v1/{V1_QueryBuilder_FunctionExpressionBuilder.ts → V1_QueryValueSpecificationBuilderHelper.ts} +9 -1
  260. package/src/index.ts +11 -0
  261. package/src/stores/QueryBuilderMilestoningState.ts +7 -7
  262. package/src/stores/QueryBuilderParametersState.ts +4 -4
  263. package/src/stores/QueryBuilderPropertyEditorState.ts +49 -56
  264. package/src/stores/QueryBuilderResultState.ts +2 -4
  265. package/src/stores/QueryBuilderState.ts +5 -5
  266. package/src/stores/QueryBuilderStateBuilder.ts +1 -1
  267. package/src/stores/QueryBuilderTextEditorState.ts +2 -1
  268. package/src/stores/QueryBuilderValueSpecificationBuilder.ts +5 -2
  269. package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +30 -42
  270. package/src/stores/QueryBuilderValueSpecificationHelper.ts +13 -8
  271. package/src/stores/explorer/QueryBuilderExplorerState.ts +12 -2
  272. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +1 -1
  273. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +3 -3
  274. package/src/stores/fetch-structure/graph-fetch/{QueryBuilderGraphFetchValueSpecificationBuilder.ts → QueryBuilderGraphFetchTreeValueSpecificationBuilder.ts} +0 -1
  275. package/src/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.ts +3 -3
  276. package/src/stores/fetch-structure/projection/QueryBuilderProjectionState.ts +1 -1
  277. package/src/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.ts +4 -4
  278. package/src/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +6 -9
  279. package/src/stores/fetch-structure/projection/aggregation/operators/{QueryBuilderAggregateOperatorHelper.ts → QueryBuilderAggregateOperatorValueSpecificationBuilder.ts} +1 -1
  280. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.ts +3 -3
  281. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.ts +3 -3
  282. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.ts +3 -3
  283. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.ts +1 -1
  284. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.ts +1 -1
  285. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.ts +5 -5
  286. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.ts +5 -5
  287. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.ts +3 -3
  288. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.ts +3 -3
  289. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.ts +3 -3
  290. package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.ts +2 -2
  291. package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.ts +12 -10
  292. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +2 -86
  293. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.ts +104 -0
  294. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +3 -3
  295. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +3 -3
  296. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +8 -7
  297. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +4 -4
  298. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +3 -3
  299. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +2 -2
  300. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +1 -1
  301. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +4 -4
  302. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +3 -3
  303. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +3 -3
  304. package/src/stores/filter/operators/{QueryBuilderFilterOperatorHelper.ts → QueryBuilderFilterOperatorValueSpecificationBuilder.ts} +10 -11
  305. package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +5 -5
  306. package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +5 -5
  307. package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +11 -10
  308. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +7 -7
  309. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +7 -7
  310. package/src/stores/filter/operators/QueryBuilderFilterOperator_In.ts +5 -5
  311. package/src/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.ts +3 -3
  312. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +7 -7
  313. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +7 -7
  314. package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +5 -5
  315. package/src/stores/shared/LambdaEditorState.ts +118 -0
  316. package/src/stores/shared/LambdaParameterState.ts +259 -0
  317. package/src/stores/shared/ValueSpecificationEditorHelper.ts +143 -0
  318. package/src/stores/shared/ValueSpecificationModifierHelper.ts +177 -0
  319. package/tsconfig.json +14 -7
  320. package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_FunctionExpressionBuilder.d.ts.map +0 -1
  321. package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_FunctionExpressionBuilder.js.map +0 -1
  322. package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.d.ts.map +0 -1
  323. package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.js.map +0 -1
  324. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.d.ts.map +0 -1
  325. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.js.map +0 -1
  326. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorHelper.d.ts.map +0 -1
  327. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorHelper.js.map +0 -1
  328. package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.d.ts.map +0 -1
  329. package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.js.map +0 -1
@@ -0,0 +1,121 @@
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 { useApplicationStore } from '@finos/legend-application';
18
+ import { Dialog } from '@finos/legend-art';
19
+ import {
20
+ type PureModel,
21
+ type ValueSpecification,
22
+ PRIMITIVE_TYPE,
23
+ type ObserverContext,
24
+ } from '@finos/legend-graph';
25
+ import { prettyCONSTName } from '@finos/legend-shared';
26
+ import { observer } from 'mobx-react-lite';
27
+ import type { LambdaParametersState } from '../../stores/shared/LambdaParameterState.js';
28
+ import { BasicValueSpecificationEditor } from './BasicValueSpecificationEditor.js';
29
+
30
+ // TODO we may want to further componentize this by removing the dialog wrapper
31
+ export const LambdaParameterValuesEditor = observer(
32
+ (props: {
33
+ graph: PureModel;
34
+ observerContext: ObserverContext;
35
+ lambdaParametersState: LambdaParametersState;
36
+ }) => {
37
+ const { lambdaParametersState, graph, observerContext } = props;
38
+ const valuesEdtiorState = lambdaParametersState.parameterValuesEditorState;
39
+ const close = (): void => valuesEdtiorState.close();
40
+ const applicationStore = useApplicationStore();
41
+ const submitAction = valuesEdtiorState.submitAction;
42
+ const submit = applicationStore.guardUnhandledError(async () => {
43
+ if (submitAction) {
44
+ close();
45
+ await submitAction.handler();
46
+ }
47
+ });
48
+ return (
49
+ <Dialog
50
+ open={Boolean(valuesEdtiorState.showModal)}
51
+ onClose={close}
52
+ classes={{
53
+ root: 'editor-modal__root-container',
54
+ container: 'editor-modal__container',
55
+ paper: 'editor-modal__content',
56
+ }}
57
+ >
58
+ <div className="modal modal--dark editor-modal lambda-parameter-values__modal">
59
+ <div className="modal__header">
60
+ <div className="modal__title">Set Parameter Values</div>
61
+ </div>
62
+ <div className="modal__body lambda-parameter-values__modal__body">
63
+ {lambdaParametersState.parameterStates.map((paramState) => {
64
+ const stringType = graph.getPrimitiveType(PRIMITIVE_TYPE.STRING);
65
+ const variableType = paramState.variableType ?? stringType;
66
+ return (
67
+ <div
68
+ key={paramState.uuid}
69
+ className="panel__content__form__section"
70
+ >
71
+ <div className="lambda-parameter-values__value__label">
72
+ <div className="lambda-parameter-values__value__label__name">
73
+ {paramState.parameter.name}
74
+ </div>
75
+ <div className="lambda-parameter-values__value__label__type">
76
+ {variableType.name}
77
+ </div>
78
+ </div>
79
+ {paramState.value && (
80
+ <BasicValueSpecificationEditor
81
+ valueSpecification={paramState.value}
82
+ setValueSpecification={(
83
+ val: ValueSpecification,
84
+ ): void => {
85
+ paramState.setValue(val);
86
+ }}
87
+ graph={graph}
88
+ obseverContext={observerContext}
89
+ typeCheckOption={{
90
+ expectedType: variableType,
91
+ match:
92
+ variableType ===
93
+ graph.getPrimitiveType(PRIMITIVE_TYPE.DATETIME),
94
+ }}
95
+ className="query-builder__parameters__value__editor"
96
+ resetValue={(): void => paramState.mockParameterValue()}
97
+ />
98
+ )}
99
+ </div>
100
+ );
101
+ })}
102
+ </div>
103
+ <div className="modal__footer">
104
+ {submitAction && (
105
+ <button
106
+ className="btn modal__footer__close-btn"
107
+ title={submitAction.label}
108
+ onClick={submit}
109
+ >
110
+ {prettyCONSTName(submitAction.label)}
111
+ </button>
112
+ )}
113
+ <button className="btn modal__footer__close-btn" onClick={close}>
114
+ Close
115
+ </button>
116
+ </div>
117
+ </div>
118
+ </Dialog>
119
+ );
120
+ },
121
+ );
@@ -20,12 +20,12 @@ import { type IKeyboardEvent, KeyCode } from 'monaco-editor';
20
20
  import { useCallback, useMemo } from 'react';
21
21
  import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
22
22
  import type { Type } from '@finos/legend-graph';
23
+ import { useApplicationStore } from '@finos/legend-application';
24
+ import type { LambdaEditorState } from '../../stores/shared/LambdaEditorState.js';
23
25
  import {
24
- useApplicationStore,
25
- LambdaEditor,
26
- type LambdaEditorState,
27
26
  type LambdaEditorOnKeyDownEventHandler,
28
- } from '@finos/legend-application';
27
+ LambdaEditor,
28
+ } from './LambdaEditor.js';
29
29
 
30
30
  export const QueryBuilderLambdaEditor = observer(
31
31
  (props: {
@@ -67,7 +67,7 @@ export const QueryBuilderLambdaEditor = observer(
67
67
  } = props;
68
68
  const applicationStore = useApplicationStore();
69
69
  const backdropSetter = useCallback(
70
- (val: boolean) => queryBuilderState.setBackdrop(val),
70
+ (val: boolean) => queryBuilderState.setShowBackdrop(val),
71
71
  [queryBuilderState],
72
72
  );
73
73
  const onKeyDownEventHandlers: LambdaEditorOnKeyDownEventHandler[] = useMemo(
@@ -21,7 +21,8 @@ import {
21
21
  V1_buildGetAllFunctionExpression,
22
22
  V1_buildGroupByFunctionExpression,
23
23
  V1_buildProjectFunctionExpression,
24
- } from './v1/V1_QueryBuilder_FunctionExpressionBuilder.js';
24
+ V1_buildSubTypePropertyExpressionTypeInference,
25
+ } from './v1/V1_QueryValueSpecificationBuilderHelper.js';
25
26
  import {
26
27
  type V1_GraphBuilderContext,
27
28
  type V1_ProcessingContext,
@@ -36,7 +37,6 @@ import {
36
37
  extractElementNameFromPath,
37
38
  V1_buildGenericFunctionExpression,
38
39
  } from '@finos/legend-graph';
39
- import { V1_buildSubTypePropertyExpressionTypeInference } from './v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.js';
40
40
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../QueryBuilderSupportedFunctions.js';
41
41
 
42
42
  export class QueryBuilder_PureProtocolProcessorPlugin extends PureProtocolProcessorPlugin {
@@ -28,6 +28,7 @@ import {
28
28
  type V1_ValueSpecification,
29
29
  type ValueSpecification,
30
30
  type SimpleFunctionExpression,
31
+ type Type,
31
32
  V1_buildBaseSimpleFunctionExpression,
32
33
  V1_buildGenericFunctionExpression,
33
34
  extractElementNameFromPath,
@@ -239,7 +240,7 @@ export const V1_buildExistsFunctionExpression = (
239
240
  precedingExpression.genericType = guaranteeType(
240
241
  precedingExpression,
241
242
  AbstractPropertyExpression,
242
- ).func.genericType;
243
+ ).func.value.genericType;
243
244
  const lambda = parameters[1];
244
245
  if (lambda instanceof V1_Lambda) {
245
246
  lambda.parameters.forEach((variable): void => {
@@ -568,3 +569,10 @@ export const V1_buildGroupByFunctionExpression = (
568
569
  );
569
570
  return [expression, processedParams];
570
571
  };
572
+
573
+ export const V1_buildSubTypePropertyExpressionTypeInference = (
574
+ inferredVariable: SimpleFunctionExpression,
575
+ ): Type | undefined =>
576
+ inferredVariable.parametersValues.filter(
577
+ (param) => param instanceof InstanceValue,
578
+ )[0]?.genericType?.value.rawType;
package/src/index.ts CHANGED
@@ -40,3 +40,14 @@ export type { MappingRuntimeCompatibilityAnalysisResult } from './graphManager/a
40
40
  export * from './stores/ServiceInfo.js';
41
41
  export * from './components/ServiceQuerySetupUtils.js';
42
42
  export * from './components/QuerySetupUtils.js';
43
+
44
+ // ------------------------------------------- Shared components -------------------------------------------
45
+
46
+ export * from './components/shared/LambdaEditor.js';
47
+ export * from './components/shared/BasicValueSpecificationEditor.js';
48
+ export * from './components/shared/LambdaParameterValuesEditor.js';
49
+
50
+ export { LambdaEditorState } from './stores/shared/LambdaEditorState.js';
51
+ export * from './stores/shared/LambdaParameterState.js';
52
+ export * from './stores/shared/ValueSpecificationModifierHelper.js';
53
+ export * from './stores/shared/ValueSpecificationEditorHelper.js';
@@ -14,10 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { LambdaParameterState } from '@finos/legend-application';
18
17
  import {
19
- DEFAULT_BUSINESS_DATE_MILESTONING_PARAMETER_NAME,
20
- DEFAULT_PROCESSING_DATE_MILESTONING_PARAMETER_NAME,
18
+ BUSINESS_DATE_MILESTONING_PROPERTY_NAME,
19
+ PROCESSING_DATE_MILESTONING_PROPERTY_NAME,
21
20
  GenericType,
22
21
  GenericTypeExplicitReference,
23
22
  getMilestoneTemporalStereotype,
@@ -32,6 +31,7 @@ import { type Hashable, hashArray } from '@finos/legend-shared';
32
31
  import { action, computed, makeObservable, observable } from 'mobx';
33
32
  import { QUERY_BUILDER_HASH_STRUCTURE } from '../graphManager/QueryBuilderHashUtils.js';
34
33
  import type { QueryBuilderState } from './QueryBuilderState.js';
34
+ import { LambdaParameterState } from './shared/LambdaParameterState.js';
35
35
 
36
36
  export class QueryBuilderMilestoningState implements Hashable {
37
37
  queryBuilderState: QueryBuilderState;
@@ -70,7 +70,7 @@ export class QueryBuilderMilestoningState implements Hashable {
70
70
  case MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL: {
71
71
  this.setBusinessDate(
72
72
  this.buildMilestoningParameter(
73
- DEFAULT_BUSINESS_DATE_MILESTONING_PARAMETER_NAME,
73
+ BUSINESS_DATE_MILESTONING_PROPERTY_NAME,
74
74
  ),
75
75
  );
76
76
  break;
@@ -78,7 +78,7 @@ export class QueryBuilderMilestoningState implements Hashable {
78
78
  case MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL: {
79
79
  this.setProcessingDate(
80
80
  this.buildMilestoningParameter(
81
- DEFAULT_PROCESSING_DATE_MILESTONING_PARAMETER_NAME,
81
+ PROCESSING_DATE_MILESTONING_PROPERTY_NAME,
82
82
  ),
83
83
  );
84
84
  break;
@@ -86,12 +86,12 @@ export class QueryBuilderMilestoningState implements Hashable {
86
86
  case MILESTONING_STEREOTYPE.BITEMPORAL: {
87
87
  this.setProcessingDate(
88
88
  this.buildMilestoningParameter(
89
- DEFAULT_PROCESSING_DATE_MILESTONING_PARAMETER_NAME,
89
+ PROCESSING_DATE_MILESTONING_PROPERTY_NAME,
90
90
  ),
91
91
  );
92
92
  this.setBusinessDate(
93
93
  this.buildMilestoningParameter(
94
- DEFAULT_BUSINESS_DATE_MILESTONING_PARAMETER_NAME,
94
+ BUSINESS_DATE_MILESTONING_PROPERTY_NAME,
95
95
  ),
96
96
  );
97
97
  break;
@@ -14,14 +14,14 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import {
18
- LambdaParametersState,
19
- type LambdaParameterState,
20
- } from '@finos/legend-application';
21
17
  import { type Hashable, hashArray } from '@finos/legend-shared';
22
18
  import { observable, makeObservable, action, override } from 'mobx';
23
19
  import { QUERY_BUILDER_HASH_STRUCTURE } from '../graphManager/QueryBuilderHashUtils.js';
24
20
  import type { QueryBuilderState } from './QueryBuilderState.js';
21
+ import {
22
+ type LambdaParameterState,
23
+ LambdaParametersState,
24
+ } from './shared/LambdaParameterState.js';
25
25
 
26
26
  export const QUERY_BUILDER_PARAMETER_DND_TYPE = 'PARAMETER';
27
27
 
@@ -50,18 +50,23 @@ import {
50
50
  observe_AbstractPropertyExpression,
51
51
  GenericTypeExplicitReference,
52
52
  GenericType,
53
- DEFAULT_BUSINESS_DATE_MILESTONING_PARAMETER_NAME,
54
- DEFAULT_PROCESSING_DATE_MILESTONING_PARAMETER_NAME,
53
+ BUSINESS_DATE_MILESTONING_PROPERTY_NAME,
54
+ PROCESSING_DATE_MILESTONING_PROPERTY_NAME,
55
55
  INTERNAL__PropagatedValue,
56
56
  Association,
57
57
  getGeneratedMilestonedPropertiesForAssociation,
58
+ PropertyExplicitReference,
58
59
  } from '@finos/legend-graph';
59
60
  import { generateDefaultValueForPrimitiveType } from './QueryBuilderValueSpecificationHelper.js';
60
61
  import type { QueryBuilderState } from './QueryBuilderState.js';
61
- import { functionExpression_setParametersValues } from '@finos/legend-application';
62
62
  import type { QueryBuilderMilestoningState } from './QueryBuilderMilestoningState.js';
63
63
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
64
64
  import { QUERY_BUILDER_HASH_STRUCTURE } from '../graphManager/QueryBuilderHashUtils.js';
65
+ import {
66
+ propertyExpression_setFunc,
67
+ functionExpression_setParametersValues,
68
+ instanceValue_setValues,
69
+ } from './shared/ValueSpecificationModifierHelper.js';
65
70
 
66
71
  export const getDerivedPropertyMilestoningSteoreotype = (
67
72
  property: DerivedProperty,
@@ -168,13 +173,13 @@ export const generateMilestonedPropertyParameterValue = (
168
173
  derivedPropertyExpressionState.queryBuilderState.graphManagerState.graph,
169
174
  );
170
175
  const temporalTarget =
171
- derivedPropertyExpressionState.propertyExpression.func.genericType.value
172
- .rawType instanceof Class &&
173
- derivedPropertyExpressionState.propertyExpression.func._OWNER
176
+ derivedPropertyExpressionState.propertyExpression.func.value.genericType
177
+ .value.rawType instanceof Class &&
178
+ derivedPropertyExpressionState.propertyExpression.func.value._OWNER
174
179
  ._generatedMilestonedProperties.length !== 0
175
180
  ? getMilestoneTemporalStereotype(
176
- derivedPropertyExpressionState.propertyExpression.func.genericType
177
- .value.rawType,
181
+ derivedPropertyExpressionState.propertyExpression.func.value
182
+ .genericType.value.rawType,
178
183
  derivedPropertyExpressionState.queryBuilderState.graphManagerState
179
184
  .graph,
180
185
  )
@@ -213,31 +218,27 @@ export const generateMilestonedPropertyParameterValue = (
213
218
  if (!milestoningState.businessDate) {
214
219
  milestoningState.setBusinessDate(
215
220
  derivedPropertyExpressionState.queryBuilderState.milestoningState.buildMilestoningParameter(
216
- DEFAULT_BUSINESS_DATE_MILESTONING_PARAMETER_NAME,
221
+ BUSINESS_DATE_MILESTONING_PROPERTY_NAME,
217
222
  ),
218
223
  );
219
224
  }
220
- const parameter = new INTERNAL__PropagatedValue(
221
- derivedPropertyExpressionState.queryBuilderState.graphManagerState.graph.getTypicalMultiplicity(
222
- TYPICAL_MULTIPLICITY_TYPE.ONE,
223
- ),
225
+ const parameter = new INTERNAL__PropagatedValue(() =>
226
+ guaranteeNonNullable(milestoningState.businessDate),
224
227
  );
225
- parameter.getValue = (): ValueSpecification =>
226
- guaranteeNonNullable(milestoningState.businessDate);
227
228
  return parameter;
228
229
  }
229
230
  case MILESTONING_STEREOTYPE.BITEMPORAL: {
230
231
  if (!milestoningState.processingDate) {
231
232
  milestoningState.setProcessingDate(
232
233
  derivedPropertyExpressionState.queryBuilderState.milestoningState.buildMilestoningParameter(
233
- DEFAULT_PROCESSING_DATE_MILESTONING_PARAMETER_NAME,
234
+ PROCESSING_DATE_MILESTONING_PROPERTY_NAME,
234
235
  ),
235
236
  );
236
237
  }
237
238
  if (!milestoningState.businessDate) {
238
239
  milestoningState.setBusinessDate(
239
240
  derivedPropertyExpressionState.queryBuilderState.milestoningState.buildMilestoningParameter(
240
- DEFAULT_BUSINESS_DATE_MILESTONING_PARAMETER_NAME,
241
+ BUSINESS_DATE_MILESTONING_PROPERTY_NAME,
241
242
  ),
242
243
  );
243
244
  }
@@ -252,13 +253,9 @@ export const generateMilestonedPropertyParameterValue = (
252
253
  AbstractPropertyExpression,
253
254
  ).parametersValues[1];
254
255
  }
255
- const parameter = new INTERNAL__PropagatedValue(
256
- derivedPropertyExpressionState.queryBuilderState.graphManagerState.graph.getTypicalMultiplicity(
257
- TYPICAL_MULTIPLICITY_TYPE.ONE,
258
- ),
256
+ const parameter = new INTERNAL__PropagatedValue(() =>
257
+ guaranteeNonNullable(milestoningState.processingDate),
259
258
  );
260
- parameter.getValue = (): ValueSpecification =>
261
- guaranteeNonNullable(milestoningState.processingDate);
262
259
  return parameter;
263
260
  } else {
264
261
  if (
@@ -276,13 +273,9 @@ export const generateMilestonedPropertyParameterValue = (
276
273
  AbstractPropertyExpression,
277
274
  ).parametersValues[1];
278
275
  }
279
- const parameter = new INTERNAL__PropagatedValue(
280
- derivedPropertyExpressionState.queryBuilderState.graphManagerState.graph.getTypicalMultiplicity(
281
- TYPICAL_MULTIPLICITY_TYPE.ONE,
282
- ),
276
+ const parameter = new INTERNAL__PropagatedValue(() =>
277
+ guaranteeNonNullable(milestoningState.businessDate),
283
278
  );
284
- parameter.getValue = (): ValueSpecification =>
285
- guaranteeNonNullable(milestoningState.businessDate);
286
279
  return parameter;
287
280
  }
288
281
  }
@@ -290,17 +283,13 @@ export const generateMilestonedPropertyParameterValue = (
290
283
  if (!milestoningState.processingDate) {
291
284
  milestoningState.setProcessingDate(
292
285
  derivedPropertyExpressionState.queryBuilderState.milestoningState.buildMilestoningParameter(
293
- DEFAULT_PROCESSING_DATE_MILESTONING_PARAMETER_NAME,
286
+ PROCESSING_DATE_MILESTONING_PROPERTY_NAME,
294
287
  ),
295
288
  );
296
289
  }
297
- const parameter = new INTERNAL__PropagatedValue(
298
- derivedPropertyExpressionState.queryBuilderState.graphManagerState.graph.getTypicalMultiplicity(
299
- TYPICAL_MULTIPLICITY_TYPE.ONE,
300
- ),
290
+ const parameter = new INTERNAL__PropagatedValue(() =>
291
+ guaranteeNonNullable(milestoningState.processingDate),
301
292
  );
302
- parameter.getValue = (): ValueSpecification =>
303
- guaranteeNonNullable(milestoningState.processingDate);
304
293
  return parameter;
305
294
  }
306
295
  default:
@@ -315,7 +304,7 @@ export const getPropertyChainName = (
315
304
  const propertyNameDecorator = humanizePropertyName
316
305
  ? prettyPropertyName
317
306
  : (val: string): string => val;
318
- const chunks = [propertyNameDecorator(propertyExpression.func.name)];
307
+ const chunks = [propertyNameDecorator(propertyExpression.func.value.name)];
319
308
  let currentExpression: ValueSpecification | undefined = propertyExpression;
320
309
  while (currentExpression instanceof AbstractPropertyExpression) {
321
310
  currentExpression = getNullableFirstElement(
@@ -341,7 +330,7 @@ export const getPropertyChainName = (
341
330
  );
342
331
  }
343
332
  if (currentExpression instanceof AbstractPropertyExpression) {
344
- chunks.unshift(propertyNameDecorator(currentExpression.func.name));
333
+ chunks.unshift(propertyNameDecorator(currentExpression.func.value.name));
345
334
  }
346
335
  }
347
336
  const processedChunks: string[] = [];
@@ -367,14 +356,14 @@ export const getPropertyChainName = (
367
356
  export const getPropertyPath = (
368
357
  propertyExpression: AbstractPropertyExpression,
369
358
  ): string => {
370
- const propertyNameChain = [propertyExpression.func.name];
359
+ const propertyNameChain = [propertyExpression.func.value.name];
371
360
  let currentExpression: ValueSpecification | undefined = propertyExpression;
372
361
  while (currentExpression instanceof AbstractPropertyExpression) {
373
362
  currentExpression = getNullableFirstElement(
374
363
  currentExpression.parametersValues,
375
364
  );
376
365
  if (currentExpression instanceof AbstractPropertyExpression) {
377
- propertyNameChain.unshift(currentExpression.func.name);
366
+ propertyNameChain.unshift(currentExpression.func.value.name);
378
367
  }
379
368
  }
380
369
  return propertyNameChain.join('.');
@@ -416,9 +405,9 @@ export const generateValueSpecificationForParameter = (
416
405
  parameter.multiplicity,
417
406
  );
418
407
  if (type.name !== PRIMITIVE_TYPE.LATESTDATE) {
419
- primitiveInstanceValue.values = [
408
+ instanceValue_setValues(primitiveInstanceValue, [
420
409
  generateDefaultValueForPrimitiveType(type.name as PRIMITIVE_TYPE),
421
- ];
410
+ ]);
422
411
  }
423
412
  return primitiveInstanceValue;
424
413
  } else if (type instanceof Enumeration) {
@@ -430,7 +419,7 @@ export const generateValueSpecificationForParameter = (
430
419
  const enumValueRef = EnumValueExplicitReference.create(
431
420
  type.values[0] as Enum,
432
421
  );
433
- enumValueInstanceValue.values = [enumValueRef];
422
+ instanceValue_setValues(enumValueInstanceValue, [enumValueRef]);
434
423
  }
435
424
  return enumValueInstanceValue;
436
425
  }
@@ -506,7 +495,7 @@ export class QueryBuilderDerivedPropertyExpressionState {
506
495
  );
507
496
  this.queryBuilderState = queryBuilderState;
508
497
  this.derivedProperty = guaranteeType(
509
- propertyExpression.func,
498
+ propertyExpression.func.value,
510
499
  DerivedProperty,
511
500
  );
512
501
  // build the parameters of the derived properties
@@ -525,7 +514,7 @@ export class QueryBuilderDerivedPropertyExpressionState {
525
514
  }
526
515
 
527
516
  get property(): AbstractProperty {
528
- return this.propertyExpression.func;
517
+ return this.propertyExpression.func.value;
529
518
  }
530
519
 
531
520
  get parameterValues(): ValueSpecification[] {
@@ -620,29 +609,33 @@ export class QueryBuilderPropertyExpressionState implements Hashable {
620
609
  while (currentExpression instanceof AbstractPropertyExpression) {
621
610
  // Check if the property chain can results in column that have multiple values
622
611
  if (
623
- currentExpression.func.multiplicity.upperBound === undefined ||
624
- currentExpression.func.multiplicity.upperBound > 1
612
+ currentExpression.func.value.multiplicity.upperBound === undefined ||
613
+ currentExpression.func.value.multiplicity.upperBound > 1
625
614
  ) {
626
615
  requiresExistsHandling = true;
627
616
  }
628
617
  // check if the property is milestoned
629
618
  if (
630
- currentExpression.func.genericType.value.rawType instanceof Class &&
631
- currentExpression.func._OWNER._generatedMilestonedProperties.length !==
632
- 0
619
+ currentExpression.func.value.genericType.value.rawType instanceof
620
+ Class &&
621
+ currentExpression.func.value._OWNER._generatedMilestonedProperties
622
+ .length !== 0
633
623
  ) {
634
- const name = currentExpression.func.name;
635
- const func =
636
- currentExpression.func._OWNER._generatedMilestonedProperties.find(
624
+ const name = currentExpression.func.value.name;
625
+ const property =
626
+ currentExpression.func.value._OWNER._generatedMilestonedProperties.find(
637
627
  (e) => e.name === name,
638
628
  );
639
- if (func) {
640
- currentExpression.func = func;
629
+ if (property) {
630
+ propertyExpression_setFunc(
631
+ currentExpression,
632
+ PropertyExplicitReference.create(property),
633
+ );
641
634
  }
642
635
  }
643
636
 
644
637
  // Create states to hold derived properties' parameters and arguments for editing
645
- if (currentExpression.func instanceof DerivedProperty) {
638
+ if (currentExpression.func.value instanceof DerivedProperty) {
646
639
  const derivedPropertyExpressionState =
647
640
  new QueryBuilderDerivedPropertyExpressionState(
648
641
  this.queryBuilderState,
@@ -37,10 +37,8 @@ import {
37
37
  buildRawLambdaFromLambdaFunction,
38
38
  } from '@finos/legend-graph';
39
39
  import { buildLambdaFunction } from './QueryBuilderValueSpecificationBuilder.js';
40
- import {
41
- buildParametersLetLambdaFunc,
42
- ExecutionPlanState,
43
- } from '@finos/legend-application';
40
+ import { ExecutionPlanState } from '@finos/legend-application';
41
+ import { buildParametersLetLambdaFunc } from './shared/LambdaParameterState.js';
44
42
 
45
43
  const DEFAULT_LIMIT = 1000;
46
44
 
@@ -84,7 +84,7 @@ export abstract class QueryBuilderState {
84
84
  observableContext: ObserverContext;
85
85
 
86
86
  queryCompileState = ActionState.create();
87
- backdrop = false;
87
+ showBackdrop = false;
88
88
  showFunctionsExplorerPanel = false;
89
89
  showParametersPanel = false;
90
90
 
@@ -109,7 +109,7 @@ export abstract class QueryBuilderState {
109
109
  resultState: observable,
110
110
  textEditorState: observable,
111
111
  unsupportedQueryState: observable,
112
- backdrop: observable,
112
+ showBackdrop: observable,
113
113
  showFunctionsExplorerPanel: observable,
114
114
  showParametersPanel: observable,
115
115
  changeDetectionState: observable,
@@ -121,7 +121,7 @@ export abstract class QueryBuilderState {
121
121
  isQuerySupported: computed,
122
122
  validationIssues: computed,
123
123
 
124
- setBackdrop: action,
124
+ setShowBackdrop: action,
125
125
  setShowFunctionsExplorerPanel: action,
126
126
  setShowParametersPanel: action,
127
127
  setClass: action,
@@ -185,8 +185,8 @@ export abstract class QueryBuilderState {
185
185
  return true;
186
186
  }
187
187
 
188
- setBackdrop(val: boolean): void {
189
- this.backdrop = val;
188
+ setShowBackdrop(val: boolean): void {
189
+ this.showBackdrop = val;
190
190
  }
191
191
 
192
192
  setShowFunctionsExplorerPanel(val: boolean): void {
@@ -50,7 +50,6 @@ import {
50
50
  type ValueSpecification,
51
51
  } from '@finos/legend-graph';
52
52
  import { processTDSPostFilterExpression } from './fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.js';
53
- import { LambdaParameterState } from '@finos/legend-application';
54
53
  import { processFilterExpression } from './filter/QueryBuilderFilterStateBuilder.js';
55
54
  import {
56
55
  processTDSAggregateExpression,
@@ -70,6 +69,7 @@ import {
70
69
  processTDSTakeExpression,
71
70
  } from './fetch-structure/projection/QueryBuilderProjectionStateBuilder.js';
72
71
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
72
+ import { LambdaParameterState } from './shared/LambdaParameterState.js';
73
73
 
74
74
  const processGetAllExpression = (
75
75
  expression: SimpleFunctionExpression,
@@ -29,7 +29,8 @@ import {
29
29
  } from '@finos/legend-shared';
30
30
  import { observable, action, flow, makeObservable, flowResult } from 'mobx';
31
31
  import type { QueryBuilderState } from './QueryBuilderState.js';
32
- import { LambdaEditorState, TAB_SIZE } from '@finos/legend-application';
32
+ import { TAB_SIZE } from '@finos/legend-application';
33
+ import { LambdaEditorState } from './shared/LambdaEditorState.js';
33
34
 
34
35
  export class QueryBuilderRawLambdaState {
35
36
  lambda: RawLambda;
@@ -32,11 +32,11 @@ import {
32
32
  MILESTONING_STEREOTYPE,
33
33
  } from '@finos/legend-graph';
34
34
  import type { QueryBuilderState } from './QueryBuilderState.js';
35
- import { buildParametersLetLambdaFunc } from '@finos/legend-application';
36
35
  import { buildFilterExpression } from './filter/QueryBuilderFilterValueSpecificationBuilder.js';
37
36
  import type { LambdaFunctionBuilderOption } from './QueryBuilderValueSpecificationBuilderHelper.js';
38
37
  import type { QueryBuilderFetchStructureState } from './fetch-structure/QueryBuilderFetchStructureState.js';
39
38
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
39
+ import { buildParametersLetLambdaFunc } from './shared/LambdaParameterState.js';
40
40
 
41
41
  const buildGetAllFunction = (
42
42
  _class: Class,
@@ -82,7 +82,10 @@ export const buildLambdaFunction = (
82
82
  CORE_PURE_PATH.ANY,
83
83
  );
84
84
  const lambdaFunction = new LambdaFunction(
85
- new FunctionType(typeAny, multiplicityOne),
85
+ new FunctionType(
86
+ PackageableElementExplicitReference.create(typeAny),
87
+ multiplicityOne,
88
+ ),
86
89
  );
87
90
 
88
91
  // build getAll()