@finos/legend-query-builder 0.1.2 → 0.2.1

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,77 @@
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 { CollectionInstanceValue, DATE_FORMAT, DATE_TIME_FORMAT, Enumeration, EnumValueExplicitReference, EnumValueInstanceValue, GenericType, GenericTypeExplicitReference, getEnumValue, PrimitiveInstanceValue, PrimitiveType, PRIMITIVE_TYPE, TYPICAL_MULTIPLICITY_TYPE, } from '@finos/legend-graph';
17
+ import { Randomizer } from '@finos/legend-shared';
18
+ import { addDays, format } from 'date-fns';
19
+ import { instanceValue_setValues } from './ValueSpecificationModifierHelper.js';
20
+ const createMockPrimitiveProperty = (primitiveType, propertyName) => {
21
+ const randomizer = new Randomizer();
22
+ switch (primitiveType.name) {
23
+ case PRIMITIVE_TYPE.BOOLEAN:
24
+ return randomizer.getRandomItemInCollection([true, false]) ?? true;
25
+ case PRIMITIVE_TYPE.FLOAT:
26
+ return randomizer.getRandomFloat();
27
+ case PRIMITIVE_TYPE.DECIMAL:
28
+ return randomizer.getRandomDouble();
29
+ case PRIMITIVE_TYPE.NUMBER:
30
+ case PRIMITIVE_TYPE.INTEGER:
31
+ return randomizer.getRandomWholeNumber(100);
32
+ // NOTE that `Date` is the umbrella type that comprises `StrictDate` and `DateTime`, but for simplicity, we will generate `Date` as `StrictDate`
33
+ case PRIMITIVE_TYPE.DATE:
34
+ case PRIMITIVE_TYPE.STRICTDATE:
35
+ return format(randomizer.getRandomDate(new Date(Date.now()), addDays(Date.now(), 100)), DATE_FORMAT);
36
+ case PRIMITIVE_TYPE.DATETIME:
37
+ return format(randomizer.getRandomDate(new Date(Date.now()), addDays(Date.now(), 100)), DATE_TIME_FORMAT);
38
+ case PRIMITIVE_TYPE.STRING:
39
+ default:
40
+ return `${propertyName} ${randomizer.getRandomWholeNumber(100)}`;
41
+ }
42
+ };
43
+ export const createMockEnumerationProperty = (enumeration) => new Randomizer().getRandomItemInCollection(enumeration.values)?.name ?? '';
44
+ export const buildPrimitiveInstanceValue = (graph, type, value) => {
45
+ const multiplicityOne = graph.getTypicalMultiplicity(TYPICAL_MULTIPLICITY_TYPE.ONE);
46
+ const instance = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(new GenericType(graph.getPrimitiveType(type))), multiplicityOne);
47
+ instanceValue_setValues(instance, [value]);
48
+ return instance;
49
+ };
50
+ export const generateVariableExpressionMockValue = (parameter, graph) => {
51
+ const varType = parameter.genericType?.value.rawType;
52
+ const multiplicity = parameter.multiplicity;
53
+ if ((!multiplicity.upperBound || multiplicity.upperBound > 1) && varType) {
54
+ return new CollectionInstanceValue(multiplicity, GenericTypeExplicitReference.create(new GenericType(varType)));
55
+ }
56
+ if (varType instanceof PrimitiveType) {
57
+ const primitiveInstanceValue = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(varType.name === PRIMITIVE_TYPE.DATE
58
+ ? new GenericType(graph.getPrimitiveType(PRIMITIVE_TYPE.STRICTDATE))
59
+ : new GenericType(varType)), multiplicity);
60
+ instanceValue_setValues(primitiveInstanceValue, [
61
+ createMockPrimitiveProperty(varType, parameter.name === '' ? 'myVar' : parameter.name),
62
+ ]);
63
+ return primitiveInstanceValue;
64
+ }
65
+ else if (varType instanceof Enumeration) {
66
+ const enumValueInstance = new EnumValueInstanceValue(GenericTypeExplicitReference.create(new GenericType(varType)), multiplicity);
67
+ const mock = createMockEnumerationProperty(varType);
68
+ if (mock !== '') {
69
+ instanceValue_setValues(enumValueInstance, [
70
+ EnumValueExplicitReference.create(getEnumValue(varType, mock)),
71
+ ]);
72
+ }
73
+ return enumValueInstance;
74
+ }
75
+ return undefined;
76
+ };
77
+ //# sourceMappingURL=ValueSpecificationEditorHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ValueSpecificationEditorHelper.js","sourceRoot":"","sources":["../../../src/stores/shared/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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 { type Multiplicity, type FunctionExpression, type ValueSpecification, type ObserverContext, type VariableExpression, type InstanceValue, type GraphFetchTree, type AbstractPropertyExpression, type GenericTypeReference, type SimpleFunctionExpression, type PackageableElementReference, type Function, type LambdaFunction, type FunctionType, type CollectionInstanceValue, type PropertyReference } from '@finos/legend-graph';
17
+ export declare const valueSpecification_setGenericType: (target: ValueSpecification, val: GenericTypeReference | undefined) => void;
18
+ export declare const valueSpecification_setMultiplicity: (target: ValueSpecification, val: Multiplicity) => void;
19
+ export declare const simpleFunctionExpression_setFunc: (target: SimpleFunctionExpression, val: PackageableElementReference<Function> | undefined) => void;
20
+ export declare const functionExpression_setParametersValues: (target: FunctionExpression, val: ValueSpecification[], context: ObserverContext) => void;
21
+ export declare const functionExpression_setParameterValue: (target: FunctionExpression, val: ValueSpecification, idx: number, context: ObserverContext) => void;
22
+ export declare const functionExpression_addParameterValue: (target: FunctionExpression, val: ValueSpecification, context: ObserverContext) => void;
23
+ export declare const propertyExpression_setFunc: (target: AbstractPropertyExpression, val: PropertyReference) => void;
24
+ export declare const variableExpression_setName: (target: VariableExpression, val: string) => void;
25
+ export declare const collectionInstanceValue_setValues: (target: CollectionInstanceValue, val: ValueSpecification[], observableContext: ObserverContext) => void;
26
+ export declare const instanceValue_setValue: (target: InstanceValue, val: unknown, idx: number) => void;
27
+ export declare const instanceValue_setValues: (target: InstanceValue, val: unknown[]) => void;
28
+ export declare const graphFetchTree_addSubTree: (target: GraphFetchTree, val: GraphFetchTree) => void;
29
+ export declare const graphFetchTree_removeSubTree: (target: GraphFetchTree, val: GraphFetchTree) => void;
30
+ export declare const lambdaFunction_setExpressionSequence: (target: LambdaFunction, val: ValueSpecification[], observableContext: ObserverContext) => void;
31
+ export declare const lambdaFunction_setExpression: (target: LambdaFunction, val: ValueSpecification, idx: number, observableContext: ObserverContext) => void;
32
+ export declare const functionType_setParameters: (target: FunctionType, val: VariableExpression[]) => void;
33
+ //# sourceMappingURL=ValueSpecificationModifierHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ValueSpecificationModifierHelper.d.ts","sourceRoot":"","sources":["../../../src/stores/shared/ValueSpecificationModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAI7B,eAAO,MAAM,iCAAiC,WACnC,kBAAkB,OAAO,oBAAoB,GAAG,SAAS,KAAG,IAGtE,CAAC;AAEF,eAAO,MAAM,kCAAkC,WACpC,kBAAkB,OAAO,YAAY,KAAG,IAGlD,CAAC;AAEF,eAAO,MAAM,gCAAgC,WAEjC,wBAAwB,OAE3B,4BAA4B,QAAQ,CAAC,GAAG,SAAS,KACrD,IAGJ,CAAC;AAEF,eAAO,MAAM,sCAAsC,WAEvC,kBAAkB,OACrB,kBAAkB,EAAE,WAChB,eAAe,KACvB,IAKJ,CAAC;AAEF,eAAO,MAAM,oCAAoC,WAErC,kBAAkB,OACrB,kBAAkB,OAClB,MAAM,WACF,eAAe,KACvB,IAGJ,CAAC;AAEF,eAAO,MAAM,oCAAoC,WAErC,kBAAkB,OACrB,kBAAkB,WACd,eAAe,KACvB,IAGJ,CAAC;AAEF,eAAO,MAAM,0BAA0B,WAC5B,0BAA0B,OAAO,iBAAiB,KAAG,IAG/D,CAAC;AAEF,eAAO,MAAM,0BAA0B,WAC5B,kBAAkB,OAAO,MAAM,KAAG,IAG5C,CAAC;AAEF,eAAO,MAAM,iCAAiC,WAElC,uBAAuB,OAC1B,kBAAkB,EAAE,qBACN,eAAe,SAMrC,CAAC;AAEF,eAAO,MAAM,sBAAsB,WACxB,aAAa,OAAO,OAAO,OAAO,MAAM,SAGlD,CAAC;AAEF,eAAO,MAAM,uBAAuB,WACzB,aAAa,OAAO,OAAO,EAAE,SAKvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,WAC3B,cAAc,OAAO,cAAc,KAAG,IAGhD,CAAC;AAEF,eAAO,MAAM,4BAA4B,WAC9B,cAAc,OAAO,cAAc,KAAG,IAGhD,CAAC;AAEF,eAAO,MAAM,oCAAoC,WAErC,cAAc,OACjB,kBAAkB,EAAE,qBACN,eAAe,SAMrC,CAAC;AAEF,eAAO,MAAM,4BAA4B,WAE7B,cAAc,OACjB,kBAAkB,OAClB,MAAM,qBACQ,eAAe,SAOrC,CAAC;AAEF,eAAO,MAAM,0BAA0B,WAC5B,YAAY,OAAO,kBAAkB,EAAE,SAGjD,CAAC"}
@@ -0,0 +1,71 @@
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 { observe_ValueSpecification, observe_GenericTypeReference, observe_PackageableElementReference, observe_VariableExpression, } from '@finos/legend-graph';
17
+ import { addUniqueEntry, deleteEntry } from '@finos/legend-shared';
18
+ import { action } from 'mobx';
19
+ export const valueSpecification_setGenericType = action((target, val) => {
20
+ target.genericType = val ? observe_GenericTypeReference(val) : undefined;
21
+ });
22
+ export const valueSpecification_setMultiplicity = action((target, val) => {
23
+ target.multiplicity = val;
24
+ });
25
+ export const simpleFunctionExpression_setFunc = action((target,
26
+ // eslint-disable-next-line @typescript-eslint/ban-types
27
+ val) => {
28
+ target.func = val ? observe_PackageableElementReference(val) : undefined;
29
+ });
30
+ export const functionExpression_setParametersValues = action((target, val, context) => {
31
+ target.parametersValues = val.map((v) => observe_ValueSpecification(v, context));
32
+ });
33
+ export const functionExpression_setParameterValue = action((target, val, idx, context) => {
34
+ target.parametersValues[idx] = observe_ValueSpecification(val, context);
35
+ });
36
+ export const functionExpression_addParameterValue = action((target, val, context) => {
37
+ target.parametersValues.push(observe_ValueSpecification(val, context));
38
+ });
39
+ export const propertyExpression_setFunc = action((target, val) => {
40
+ target.func = val;
41
+ });
42
+ export const variableExpression_setName = action((target, val) => {
43
+ target.name = val;
44
+ });
45
+ export const collectionInstanceValue_setValues = action((target, val, observableContext) => {
46
+ target.values = val.map((v) => observe_ValueSpecification(v, observableContext));
47
+ });
48
+ export const instanceValue_setValue = action((target, val, idx) => {
49
+ target.values[idx] = val;
50
+ });
51
+ export const instanceValue_setValues = action((target, val) => {
52
+ // TODO?: do we have to observe the values here?
53
+ // we might need to do so when we refactor collection value
54
+ target.values = val;
55
+ });
56
+ export const graphFetchTree_addSubTree = action((target, val) => {
57
+ addUniqueEntry(target.subTrees, val);
58
+ });
59
+ export const graphFetchTree_removeSubTree = action((target, val) => {
60
+ deleteEntry(target.subTrees, val);
61
+ });
62
+ export const lambdaFunction_setExpressionSequence = action((target, val, observableContext) => {
63
+ target.expressionSequence = val.map((v) => observe_ValueSpecification(v, observableContext));
64
+ });
65
+ export const lambdaFunction_setExpression = action((target, val, idx, observableContext) => {
66
+ target.expressionSequence[idx] = observe_ValueSpecification(val, observableContext);
67
+ });
68
+ export const functionType_setParameters = action((target, val) => {
69
+ target.parameters = val.map((v) => observe_VariableExpression(v));
70
+ });
71
+ //# sourceMappingURL=ValueSpecificationModifierHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ValueSpecificationModifierHelper.js","sourceRoot":"","sources":["../../../src/stores/shared/ValueSpecificationModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAiBL,0BAA0B,EAC1B,4BAA4B,EAC5B,mCAAmC,EACnC,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,MAAM,CAAC,MAAM,iCAAiC,GAAG,MAAM,CACrD,CAAC,MAA0B,EAAE,GAAqC,EAAQ,EAAE;IAC1E,MAAM,CAAC,WAAW,GAAG,GAAG,CAAC,CAAC,CAAC,4BAA4B,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3E,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,MAAM,CACtD,CAAC,MAA0B,EAAE,GAAiB,EAAQ,EAAE;IACtD,MAAM,CAAC,YAAY,GAAG,GAAG,CAAC;AAC5B,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,MAAM,CACpD,CACE,MAAgC;AAChC,wDAAwD;AACxD,GAAsD,EAChD,EAAE;IACR,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,mCAAmC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3E,CAAC,CACF,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iBAAiB,CAClB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAC9C,CAAC,MAAoB,EAAE,GAAyB,EAAE,EAAE;IAClD,MAAM,CAAC,UAAU,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC,CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-query-builder",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "description": "Legend query builder core",
5
5
  "keywords": [
6
6
  "legend",
@@ -41,38 +41,35 @@
41
41
  "test:watch": "jest --watch"
42
42
  },
43
43
  "dependencies": {
44
- "@ag-grid-community/client-side-row-model": "28.1.1",
45
- "@ag-grid-community/core": "28.1.1",
46
- "@ag-grid-community/react": "28.1.1",
47
- "@finos/legend-application": "8.0.2",
48
- "@finos/legend-art": "3.3.0",
49
- "@finos/legend-graph": "17.0.1",
50
- "@finos/legend-server-depot": "4.1.0",
51
- "@finos/legend-shared": "6.1.3",
52
- "@finos/legend-storage": "3.0.12",
44
+ "@ag-grid-community/client-side-row-model": "28.2.0",
45
+ "@ag-grid-community/core": "28.2.0",
46
+ "@ag-grid-community/react": "28.2.0",
47
+ "@finos/legend-application": "9.0.1",
48
+ "@finos/legend-art": "4.0.1",
49
+ "@finos/legend-graph": "18.0.1",
50
+ "@finos/legend-server-depot": "4.1.1",
51
+ "@finos/legend-shared": "6.1.4",
52
+ "@finos/legend-storage": "3.0.13",
53
53
  "@testing-library/react": "13.4.0",
54
+ "@types/papaparse": "5.3.5",
54
55
  "@types/react": "18.0.21",
55
56
  "@types/react-dom": "18.0.6",
56
- "@types/react-router-dom": "5.3.3",
57
57
  "date-fns": "2.29.3",
58
- "history": "5.3.0",
59
58
  "mobx": "6.6.2",
60
59
  "mobx-react-lite": "3.4.0",
61
60
  "monaco-editor": "0.34.0",
61
+ "papaparse": "5.3.2",
62
62
  "react": "18.2.0",
63
63
  "react-dnd": "16.0.1",
64
64
  "react-dom": "18.2.0",
65
65
  "react-hotkeys": "2.0.0",
66
- "react-resize-detector": "7.1.2",
67
- "react-router": "5.3.4",
68
- "react-router-dom": "5.3.4",
69
66
  "serializr": "2.0.5"
70
67
  },
71
68
  "devDependencies": {
72
- "@finos/legend-dev-utils": "2.0.19",
69
+ "@finos/legend-dev-utils": "2.0.20",
73
70
  "@jest/globals": "29.1.2",
74
71
  "cross-env": "7.0.3",
75
- "eslint": "8.24.0",
72
+ "eslint": "8.25.0",
76
73
  "jest": "29.1.2",
77
74
  "npm-run-all": "4.1.5",
78
75
  "rimraf": "3.0.2",
@@ -296,7 +296,10 @@ export const QueryBuilder = observer(
296
296
  </div>
297
297
  </div>
298
298
  <GlobalHotKeys keyMap={keyMap} handlers={handlers}>
299
- <Backdrop className="backdrop" open={queryBuilderState.backdrop} />
299
+ <Backdrop
300
+ className="backdrop"
301
+ open={queryBuilderState.showBackdrop}
302
+ />
300
303
  <div className="query-builder__content">
301
304
  <div className="query-builder__activity-bar">
302
305
  <div className="query-builder__activity-bar__items"></div>
@@ -16,8 +16,6 @@
16
16
 
17
17
  import { jest } from '@jest/globals';
18
18
  import { type RenderResult, render, waitFor } from '@testing-library/react';
19
- import { Router } from 'react-router';
20
- import { createMemoryHistory } from 'history';
21
19
  import { Log } from '@finos/legend-shared';
22
20
  import {
23
21
  type RawMappingModelCoverageAnalysisResult,
@@ -34,6 +32,8 @@ import {
34
32
  WebApplicationNavigator,
35
33
  TEST__provideMockedWebApplicationNavigator,
36
34
  LegendApplicationComponentFrameworkProvider,
35
+ Router,
36
+ createMemoryHistory,
37
37
  } from '@finos/legend-application';
38
38
  import type { Entity } from '@finos/legend-storage';
39
39
  import { QueryBuilder } from './QueryBuilder.js';
@@ -20,13 +20,13 @@ import {
20
20
  TAB_SIZE,
21
21
  useApplicationStore,
22
22
  } from '@finos/legend-application';
23
- import { useResizeDetector } from 'react-resize-detector';
24
23
  import {
25
24
  baseTextEditorSettings,
26
25
  clsx,
27
26
  Dialog,
28
27
  disableEditorHotKeys,
29
28
  disposeDiffEditor,
29
+ useResizeDetector,
30
30
  } from '@finos/legend-art';
31
31
  import { observer } from 'mobx-react-lite';
32
32
  import { editor as monacoEditorAPI } from 'monaco-editor';
@@ -45,15 +45,15 @@ import {
45
45
  import {
46
46
  type PackageableElementOption,
47
47
  buildElementOption,
48
- variableExpression_setName,
49
- LambdaParameterState,
50
- LambdaParameterValuesEditor,
51
48
  getPackageableElementOptionFormatter,
52
49
  useApplicationStore,
53
50
  } from '@finos/legend-application';
54
51
  import { useDrag } from 'react-dnd';
55
52
  import { generateEnumerableNameFromToken } from '@finos/legend-shared';
56
53
  import { DEFAULT_VARIABLE_NAME } from '../stores/QueryBuilderConfig.js';
54
+ import { variableExpression_setName } from '../stores/shared/ValueSpecificationModifierHelper.js';
55
+ import { LambdaParameterState } from '../stores/shared/LambdaParameterState.js';
56
+ import { LambdaParameterValuesEditor } from './shared/LambdaParameterValuesEditor.js';
57
57
 
58
58
  const VariableExpressionEditor = observer(
59
59
  (props: {
@@ -114,6 +114,7 @@ const VariableExpressionEditor = observer(
114
114
  event,
115
115
  ) => {
116
116
  lambdaParameterState.changeMultiplicity(
117
+ varState,
117
118
  parseInt(event.target.value),
118
119
  multiplity.upperBound,
119
120
  );
@@ -133,6 +134,7 @@ const VariableExpressionEditor = observer(
133
134
  !isNaN(parseInt(value, 10))
134
135
  ) {
135
136
  lambdaParameterState.changeMultiplicity(
137
+ varState,
136
138
  multiplity.lowerBound,
137
139
  value === MULTIPLICITY_INFINITE || value === ''
138
140
  ? undefined
@@ -182,7 +184,7 @@ const VariableExpressionEditor = observer(
182
184
  spellCheck={false}
183
185
  value={varState.name}
184
186
  onChange={changeVariableName}
185
- placeholder={`Parameter name`}
187
+ placeholder="Parameter name"
186
188
  validationErrorMessage={validationMessage}
187
189
  />
188
190
  </div>
@@ -418,9 +420,8 @@ export const QueryBuilderParametersPanel = observer(
418
420
  )}
419
421
  {queryParameterState.parameterValuesEditorState.showModal && (
420
422
  <LambdaParameterValuesEditor
421
- graph={
422
- queryParameterState.queryBuilderState.graphManagerState.graph
423
- }
423
+ graph={queryBuilderState.graphManagerState.graph}
424
+ observerContext={queryBuilderState.observableContext}
424
425
  lambdaParametersState={queryParameterState}
425
426
  />
426
427
  )}
@@ -52,10 +52,8 @@ import {
52
52
  isSuperType,
53
53
  } from '@finos/legend-graph';
54
54
  import { guaranteeNonNullable } from '@finos/legend-shared';
55
- import {
56
- propertyExpression_setParametersValue,
57
- BasicValueSpecificationEditor,
58
- } from '@finos/legend-application';
55
+ import { BasicValueSpecificationEditor } from './shared/BasicValueSpecificationEditor.js';
56
+ import { functionExpression_setParameterValue } from '../stores/shared/ValueSpecificationModifierHelper.js';
59
57
 
60
58
  const DerivedPropertyParameterValueEditor = observer(
61
59
  (props: {
@@ -71,10 +69,10 @@ const DerivedPropertyParameterValueEditor = observer(
71
69
  ).value.rawType;
72
70
  const handleDrop = useCallback(
73
71
  (item: QueryBuilderParameterDragSource): void => {
74
- propertyExpression_setParametersValue(
72
+ functionExpression_setParameterValue(
75
73
  derivedPropertyExpressionState.propertyExpression,
76
- idx + 1,
77
74
  item.variable.parameter,
75
+ idx + 1,
78
76
  derivedPropertyExpressionState.queryBuilderState.observableContext,
79
77
  );
80
78
  },
@@ -108,9 +106,8 @@ const DerivedPropertyParameterValueEditor = observer(
108
106
  [handleDrop],
109
107
  );
110
108
  const resetParameterValue = (): void => {
111
- propertyExpression_setParametersValue(
109
+ functionExpression_setParameterValue(
112
110
  derivedPropertyExpressionState.propertyExpression,
113
- idx + 1,
114
111
  generateMilestonedPropertyParameterValue(
115
112
  derivedPropertyExpressionState,
116
113
  idx,
@@ -120,6 +117,7 @@ const DerivedPropertyParameterValueEditor = observer(
120
117
  derivedPropertyExpressionState.queryBuilderState.graphManagerState
121
118
  .graph,
122
119
  ),
120
+ idx + 1,
123
121
  derivedPropertyExpressionState.queryBuilderState.observableContext,
124
122
  );
125
123
  };
@@ -142,15 +140,19 @@ const DerivedPropertyParameterValueEditor = observer(
142
140
  derivedPropertyExpressionState.parameterValues[idx],
143
141
  )}
144
142
  setValueSpecification={(val: ValueSpecification): void => {
145
- propertyExpression_setParametersValue(
143
+ functionExpression_setParameterValue(
146
144
  derivedPropertyExpressionState.propertyExpression,
147
- idx + 1,
148
145
  val,
146
+ idx + 1,
149
147
  derivedPropertyExpressionState.queryBuilderState
150
148
  .observableContext,
151
149
  );
152
150
  }}
153
151
  graph={graph}
152
+ obseverContext={
153
+ derivedPropertyExpressionState.queryBuilderState
154
+ .observableContext
155
+ }
154
156
  typeCheckOption={{
155
157
  expectedType: parameterType,
156
158
  match:
@@ -273,7 +275,8 @@ export const QueryBuilderPropertyExpressionBadge = observer(
273
275
  }) => {
274
276
  const { propertyExpressionState, onPropertyExpressionChange } = props;
275
277
  const type =
276
- propertyExpressionState.propertyExpression.func.genericType.value.rawType;
278
+ propertyExpressionState.propertyExpression.func.value.genericType.value
279
+ .rawType;
277
280
  const hasDerivedPropertyInExpression = Boolean(
278
281
  propertyExpressionState.derivedPropertyExpressionStates.length,
279
282
  );
@@ -359,7 +362,7 @@ export const QueryBuilderPropertyExpressionBadge = observer(
359
362
  propertyExpressionState={propertyExpressionState}
360
363
  />
361
364
  <QueryBuilderPropertyInfoTooltip
362
- property={propertyExpressionState.propertyExpression.func}
365
+ property={propertyExpressionState.propertyExpression.func.value}
363
366
  path={getPropertyPath(propertyExpressionState.propertyExpression)}
364
367
  isMapped={true}
365
368
  placement="bottom-end"
@@ -48,9 +48,6 @@ import {
48
48
  ActionAlertType,
49
49
  EDITOR_LANGUAGE,
50
50
  ExecutionPlanViewer,
51
- instanceValue_changeValue,
52
- instanceValue_changeValues,
53
- PARAMETER_SUBMIT_ACTION,
54
51
  TAB_SIZE,
55
52
  TextInputEditor,
56
53
  useApplicationStore,
@@ -81,6 +78,11 @@ import {
81
78
  } from '../stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js';
82
79
  import type { QueryBuilderPostFilterOperator } from '../stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.js';
83
80
  import { QueryBuilderProjectionState } from '../stores/fetch-structure/projection/QueryBuilderProjectionState.js';
81
+ import {
82
+ instanceValue_setValue,
83
+ instanceValue_setValues,
84
+ } from '../stores/shared/ValueSpecificationModifierHelper.js';
85
+ import { PARAMETER_SUBMIT_ACTION } from '../stores/shared/LambdaParameterState.js';
84
86
 
85
87
  const QueryBuilderGridResultContextMenu = observer(
86
88
  forwardRef<
@@ -135,7 +137,7 @@ const QueryBuilderGridResultContextMenu = observer(
135
137
  conditionValue: InstanceValue,
136
138
  ): void => {
137
139
  if (event?.value !== null) {
138
- instanceValue_changeValue(
140
+ instanceValue_setValue(
139
141
  conditionValue,
140
142
  conditionValue instanceof EnumValueInstanceValue
141
143
  ? EnumValueExplicitReference.create(
@@ -223,7 +225,7 @@ const QueryBuilderGridResultContextMenu = observer(
223
225
  conditionState.changeOperator(
224
226
  isFilterBy ? postFilterInOperator : postFilterNotInOperator,
225
227
  );
226
- instanceValue_changeValues(conditionState.value as InstanceValue, [
228
+ instanceValue_setValues(conditionState.value as InstanceValue, [
227
229
  currentValueSpecificaton,
228
230
  newValueSpecification,
229
231
  ]);
@@ -245,7 +247,7 @@ const QueryBuilderGridResultContextMenu = observer(
245
247
  isFilterBy ? postFilterEqualOperator : postFilterNotEqualOperator
246
248
  ).getDefaultFilterConditionValue(conditionState);
247
249
  updateFilterConditionValue(newValueSpecification as InstanceValue);
248
- instanceValue_changeValues(conditionState.value as InstanceValue, [
250
+ instanceValue_setValues(conditionState.value as InstanceValue, [
249
251
  ...(conditionState.value as InstanceValue).values,
250
252
  newValueSpecification,
251
253
  ]);
@@ -38,7 +38,7 @@ export const QueryBuilderTextEditor = observer(
38
38
  const discardChanges = (): void => {
39
39
  queryBuilderState.textEditorState.setMode(undefined);
40
40
  // force close the backdrop just in case changes are discarded when there are grammar issues
41
- queryBuilderState.setBackdrop(false);
41
+ queryBuilderState.setShowBackdrop(false);
42
42
  };
43
43
  const mode = queryTextEditorState.mode;
44
44
  useEffect(() => {
@@ -83,7 +83,7 @@ export const QueryBuilderTextEditor = observer(
83
83
  >
84
84
  {mode === QueryBuilderTextEditorMode.TEXT && (
85
85
  <QueryBuilderLambdaEditor
86
- className={'query-builder-text-mode__lambda-editor'}
86
+ className="query-builder-text-mode__lambda-editor"
87
87
  disabled={queryTextEditorState.isConvertingLambdaToString}
88
88
  queryBuilderState={queryBuilderState}
89
89
  lambdaEditorState={queryTextEditorState}
@@ -15,6 +15,8 @@
15
15
  */
16
16
 
17
17
  export enum QUERY_BUILDER_TEST_ID {
18
+ LAMBDA_EDITOR__EDITOR_INPUT = 'lambda-editor__editor__input',
19
+
18
20
  QUERY_BUILDER = 'query__builder',
19
21
  QUERY_BUILDER_SETUP = 'query__builder__setup',
20
22
  QUERY_BUILDER_PROJECTION = 'query__builder__projection',
@@ -436,7 +436,7 @@ const QueryBuilderExplorerTreeNodeContainer = observer(
436
436
  }
437
437
  disabled={
438
438
  !(node instanceof QueryBuilderExplorerTreePropertyNodeData) ||
439
- queryBuilderState.backdrop
439
+ queryBuilderState.showBackdrop
440
440
  }
441
441
  menuProps={{ elevation: 7 }}
442
442
  onOpen={onContextMenuOpen}
@@ -801,7 +801,7 @@ export const QueryBuilderExplorerPanel = observer(
801
801
  <div
802
802
  data-testid={QUERY_BUILDER_TEST_ID.QUERY_BUILDER_EXPLORER}
803
803
  className={clsx('panel query-builder__explorer', {
804
- backdrop__element: queryBuilderState.backdrop,
804
+ backdrop__element: queryBuilderState.showBackdrop,
805
805
  })}
806
806
  >
807
807
  <div className="panel__header">
@@ -36,7 +36,8 @@ import { useDrop } from 'react-dnd';
36
36
  import { VariableExpressionViewer } from '../QueryBuilderParametersPanel.js';
37
37
  import { Dialog, PanelEntryDropZonePlaceholder } from '@finos/legend-art';
38
38
  import { generateDefaultValueForPrimitiveType } from '../../stores/QueryBuilderValueSpecificationHelper.js';
39
- import { BasicValueSpecificationEditor } from '@finos/legend-application';
39
+ import { BasicValueSpecificationEditor } from '../shared/BasicValueSpecificationEditor.js';
40
+ import { instanceValue_setValues } from '../../stores/shared/ValueSpecificationModifierHelper.js';
40
41
 
41
42
  const MilestoningParameterEditor = observer(
42
43
  (props: {
@@ -106,9 +107,9 @@ const MilestoningParameterEditor = observer(
106
107
  ),
107
108
  queryBuilderState.observableContext,
108
109
  );
109
- parameter.values = [
110
+ instanceValue_setValues(parameter, [
110
111
  generateDefaultValueForPrimitiveType(PRIMITIVE_TYPE.STRICTDATE),
111
- ];
112
+ ]);
112
113
  if (stereotype === MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL) {
113
114
  queryBuilderState.milestoningState.setBusinessDate(parameter);
114
115
  } else {
@@ -126,6 +127,7 @@ const MilestoningParameterEditor = observer(
126
127
  <BasicValueSpecificationEditor
127
128
  valueSpecification={milestoningParameter}
128
129
  graph={queryBuilderState.graphManagerState.graph}
130
+ obseverContext={queryBuilderState.observableContext}
129
131
  setValueSpecification={(val: ValueSpecification): void =>
130
132
  stereotype === MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL
131
133
  ? queryBuilderState.milestoningState.setBusinessDate(val)
@@ -14,10 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import {
18
- useApplicationStore,
19
- BasicValueSpecificationEditor,
20
- } from '@finos/legend-application';
17
+ import { useApplicationStore } from '@finos/legend-application';
21
18
  import {
22
19
  type TreeNodeContainerProps,
23
20
  type TreeNodeViewProps,
@@ -101,6 +98,7 @@ import { QUERY_BUILDER_TEST_ID } from '../QueryBuilder_TestID.js';
101
98
  import { isTypeCompatibleForAssignment } from '../../stores/QueryBuilderValueSpecificationHelper.js';
102
99
  import { QUERY_BUILDER_GROUP_OPERATION } from '../../stores/QueryBuilderGroupOperationHelper.js';
103
100
  import { QueryBuilderProjectionState } from '../../stores/fetch-structure/projection/QueryBuilderProjectionState.js';
101
+ import { BasicValueSpecificationEditor } from '../shared/BasicValueSpecificationEditor.js';
104
102
 
105
103
  const QueryBuilderPostFilterConditionContextMenu = observer(
106
104
  forwardRef<
@@ -506,6 +504,10 @@ const QueryBuilderPostFilterConditionEditor = observer(
506
504
  valueSpecification={node.condition.value}
507
505
  setValueSpecification={changeValueSpecification}
508
506
  graph={graph}
507
+ obseverContext={
508
+ node.condition.postFilterState.projectionState
509
+ .queryBuilderState.observableContext
510
+ }
509
511
  typeCheckOption={{
510
512
  expectedType: guaranteeNonNullable(
511
513
  node.condition.columnState.getReturnType(),
@@ -99,7 +99,7 @@ const ColumnSortEditor = observer(
99
99
  className="query-builder__projection__options__sort__remove-btn btn--dark btn--caution"
100
100
  onClick={deleteColumnSort}
101
101
  tabIndex={-1}
102
- title={'Remove'}
102
+ title="Remove"
103
103
  >
104
104
  <TimesIcon />
105
105
  </button>