@finos/legend-query-builder 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/lib/components/QueryBuilder.d.ts.map +1 -1
  2. package/lib/components/QueryBuilder.js +14 -4
  3. package/lib/components/QueryBuilder.js.map +1 -1
  4. package/lib/components/QueryBuilderDiffPanel.d.ts +22 -0
  5. package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -0
  6. package/lib/components/QueryBuilderDiffPanel.js +103 -0
  7. package/lib/components/QueryBuilderDiffPanel.js.map +1 -0
  8. package/lib/components/QueryBuilderParametersPanel.js +2 -2
  9. package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
  10. package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
  11. package/lib/components/QueryBuilderResultPanel.js +8 -9
  12. package/lib/components/QueryBuilderResultPanel.js.map +1 -1
  13. package/lib/components/QueryBuilderSideBar.js +1 -1
  14. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  15. package/lib/components/ServiceQuerySetupUtils.d.ts +23 -0
  16. package/lib/components/ServiceQuerySetupUtils.d.ts.map +1 -0
  17. package/lib/components/ServiceQuerySetupUtils.js +25 -0
  18. package/lib/components/ServiceQuerySetupUtils.js.map +1 -0
  19. package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
  20. package/lib/components/explorer/QueryBuilderExplorerPanel.js +4 -10
  21. package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
  22. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
  23. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +8 -6
  24. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
  25. package/lib/components/explorer/{QueryBuilderMilestoneEditor.d.ts → QueryBuilderMilestoningEditor.d.ts} +1 -1
  26. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -0
  27. package/lib/components/explorer/{QueryBuilderMilestoneEditor.js → QueryBuilderMilestoningEditor.js} +9 -9
  28. package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -0
  29. package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
  30. package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +69 -61
  31. package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
  32. package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts.map +1 -1
  33. package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js +1 -3
  34. package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js.map +1 -1
  35. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  36. package/lib/components/filter/QueryBuilderFilterPanel.js +3 -7
  37. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  38. package/lib/components/shared/QueryBuilderPropertyInfoTooltip.d.ts.map +1 -1
  39. package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js +7 -2
  40. package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js.map +1 -1
  41. package/lib/graphManager/QueryBuilderHashUtils.d.ts +84 -0
  42. package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -0
  43. package/lib/graphManager/QueryBuilderHashUtils.js +91 -0
  44. package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -0
  45. package/lib/index.css +17 -1
  46. package/lib/index.css.map +1 -1
  47. package/lib/index.d.ts +3 -0
  48. package/lib/index.d.ts.map +1 -1
  49. package/lib/index.js +3 -0
  50. package/lib/index.js.map +1 -1
  51. package/lib/package.json +6 -4
  52. package/lib/stores/QueryBuilderChangeDetectionState.d.ts +26 -5
  53. package/lib/stores/QueryBuilderChangeDetectionState.d.ts.map +1 -1
  54. package/lib/stores/QueryBuilderChangeDetectionState.js +82 -10
  55. package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -1
  56. package/lib/stores/QueryBuilderConfig.d.ts +1 -0
  57. package/lib/stores/QueryBuilderConfig.d.ts.map +1 -1
  58. package/lib/stores/QueryBuilderConfig.js +1 -0
  59. package/lib/stores/QueryBuilderConfig.js.map +1 -1
  60. package/lib/stores/QueryBuilderMilestoningState.d.ts +3 -1
  61. package/lib/stores/QueryBuilderMilestoningState.d.ts.map +1 -1
  62. package/lib/stores/QueryBuilderMilestoningState.js +10 -0
  63. package/lib/stores/QueryBuilderMilestoningState.js.map +1 -1
  64. package/lib/stores/QueryBuilderParametersState.d.ts +3 -1
  65. package/lib/stores/QueryBuilderParametersState.d.ts.map +1 -1
  66. package/lib/stores/QueryBuilderParametersState.js +10 -1
  67. package/lib/stores/QueryBuilderParametersState.js.map +1 -1
  68. package/lib/stores/QueryBuilderPropertyEditorState.d.ts +5 -3
  69. package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
  70. package/lib/stores/QueryBuilderPropertyEditorState.js +15 -5
  71. package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
  72. package/lib/stores/QueryBuilderResultState.d.ts +5 -3
  73. package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
  74. package/lib/stores/QueryBuilderResultState.js +26 -6
  75. package/lib/stores/QueryBuilderResultState.js.map +1 -1
  76. package/lib/stores/QueryBuilderState.d.ts +3 -5
  77. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  78. package/lib/stores/QueryBuilderState.js +32 -22
  79. package/lib/stores/QueryBuilderState.js.map +1 -1
  80. package/lib/stores/QueryBuilderStateTestUtils.js +1 -1
  81. package/lib/stores/QueryBuilderStateTestUtils.js.map +1 -1
  82. package/lib/stores/QueryBuilderTextEditorState.js +1 -1
  83. package/lib/stores/QueryBuilderTextEditorState.js.map +1 -1
  84. package/lib/stores/QueryBuilderUnsupportedQueryState.d.ts +4 -2
  85. package/lib/stores/QueryBuilderUnsupportedQueryState.d.ts.map +1 -1
  86. package/lib/stores/QueryBuilderUnsupportedQueryState.js +10 -1
  87. package/lib/stores/QueryBuilderUnsupportedQueryState.js.map +1 -1
  88. package/lib/stores/ServiceInfo.d.ts +28 -0
  89. package/lib/stores/ServiceInfo.d.ts.map +1 -0
  90. package/lib/stores/ServiceInfo.js +34 -0
  91. package/lib/stores/ServiceInfo.js.map +1 -0
  92. package/lib/stores/explorer/QueryBuilderExplorerState.d.ts +6 -6
  93. package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
  94. package/lib/stores/explorer/QueryBuilderExplorerState.js +19 -14
  95. package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
  96. package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts +36 -17
  97. package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts.map +1 -1
  98. package/lib/stores/explorer/QueryBuilderPropertySearchState.js +203 -161
  99. package/lib/stores/explorer/QueryBuilderPropertySearchState.js.map +1 -1
  100. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +5 -3
  101. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
  102. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +1 -0
  103. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
  104. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts +1 -1
  105. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts.map +1 -1
  106. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js +3 -3
  107. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js.map +1 -1
  108. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +3 -1
  109. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
  110. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +9 -1
  111. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
  112. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts +7 -5
  113. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts.map +1 -1
  114. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +20 -5
  115. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
  116. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts +7 -4
  117. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
  118. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js +20 -5
  119. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js.map +1 -1
  120. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts +6 -5
  121. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts.map +1 -1
  122. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js +14 -9
  123. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js.map +1 -1
  124. package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.d.ts +6 -3
  125. package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.d.ts.map +1 -1
  126. package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.js +28 -5
  127. package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.js.map +1 -1
  128. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.d.ts +4 -1
  129. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.d.ts.map +1 -1
  130. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.js +7 -1
  131. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.js.map +1 -1
  132. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.d.ts +8 -5
  133. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.d.ts.map +1 -1
  134. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.js +24 -7
  135. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.js.map +1 -1
  136. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.d.ts +3 -1
  137. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.d.ts.map +1 -1
  138. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js +5 -0
  139. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js.map +1 -1
  140. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.d.ts +3 -1
  141. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.d.ts.map +1 -1
  142. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js +5 -0
  143. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js.map +1 -1
  144. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.d.ts +3 -1
  145. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.d.ts.map +1 -1
  146. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js +7 -0
  147. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js.map +1 -1
  148. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts +3 -1
  149. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts.map +1 -1
  150. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js +7 -1
  151. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js.map +1 -1
  152. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.d.ts +3 -1
  153. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.d.ts.map +1 -1
  154. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js +7 -1
  155. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js.map +1 -1
  156. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.d.ts +3 -1
  157. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.d.ts.map +1 -1
  158. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js +5 -0
  159. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js.map +1 -1
  160. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.d.ts +3 -1
  161. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.d.ts.map +1 -1
  162. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js +5 -0
  163. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js.map +1 -1
  164. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.d.ts +3 -1
  165. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.d.ts.map +1 -1
  166. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js +7 -0
  167. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js.map +1 -1
  168. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts +3 -1
  169. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts.map +1 -1
  170. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js +7 -0
  171. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js.map +1 -1
  172. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.d.ts +3 -1
  173. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.d.ts.map +1 -1
  174. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js +5 -0
  175. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js.map +1 -1
  176. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.d.ts +3 -1
  177. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.d.ts.map +1 -1
  178. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.js.map +1 -1
  179. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.d.ts +14 -8
  180. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
  181. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.js +54 -4
  182. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.js.map +1 -1
  183. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts +4 -1
  184. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -1
  185. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +12 -1
  186. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
  187. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts +4 -1
  188. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -1
  189. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +12 -1
  190. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
  191. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts +4 -1
  192. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -1
  193. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +10 -1
  194. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
  195. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts +3 -1
  196. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -1
  197. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +7 -1
  198. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
  199. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts +1 -0
  200. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts.map +1 -1
  201. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +7 -0
  202. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -1
  203. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts +4 -1
  204. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts.map +1 -1
  205. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js +10 -1
  206. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -1
  207. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts +4 -1
  208. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts.map +1 -1
  209. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +12 -0
  210. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -1
  211. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts +3 -1
  212. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -1
  213. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +7 -1
  214. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
  215. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts +3 -1
  216. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts.map +1 -1
  217. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +7 -0
  218. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -1
  219. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts +5 -2
  220. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -1
  221. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +12 -1
  222. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
  223. package/lib/stores/filter/QueryBuilderFilterOperator.d.ts +3 -1
  224. package/lib/stores/filter/QueryBuilderFilterOperator.d.ts.map +1 -1
  225. package/lib/stores/filter/QueryBuilderFilterOperator.js.map +1 -1
  226. package/lib/stores/filter/QueryBuilderFilterState.d.ts +14 -8
  227. package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
  228. package/lib/stores/filter/QueryBuilderFilterState.js +54 -9
  229. package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
  230. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts +4 -1
  231. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -1
  232. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +10 -1
  233. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -1
  234. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts +4 -1
  235. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -1
  236. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js +10 -1
  237. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -1
  238. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts +4 -1
  239. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -1
  240. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js +8 -1
  241. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +1 -1
  242. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts +3 -1
  243. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -1
  244. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js +7 -1
  245. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -1
  246. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts +3 -1
  247. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -1
  248. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js +7 -1
  249. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -1
  250. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts +4 -1
  251. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts.map +1 -1
  252. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js +8 -0
  253. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js.map +1 -1
  254. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts +4 -1
  255. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts.map +1 -1
  256. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js +10 -0
  257. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js.map +1 -1
  258. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts +3 -1
  259. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -1
  260. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js +5 -1
  261. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js.map +1 -1
  262. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts +3 -1
  263. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -1
  264. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js +7 -1
  265. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -1
  266. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts +4 -1
  267. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -1
  268. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js +10 -1
  269. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -1
  270. package/lib/stores/workflows/ServiceQueryBuilderState.d.ts.map +1 -1
  271. package/lib/stores/workflows/ServiceQueryBuilderState.js +15 -7
  272. package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
  273. package/package.json +12 -10
  274. package/src/components/QueryBuilder.tsx +41 -1
  275. package/src/components/QueryBuilderDiffPanel.tsx +222 -0
  276. package/src/components/QueryBuilderParametersPanel.tsx +2 -2
  277. package/src/components/QueryBuilderResultPanel.tsx +31 -18
  278. package/src/components/QueryBuilderSideBar.tsx +1 -1
  279. package/src/components/ServiceQuerySetupUtils.tsx +54 -0
  280. package/src/components/explorer/QueryBuilderExplorerPanel.tsx +5 -12
  281. package/src/components/explorer/QueryBuilderFunctionsExplorerPanel.tsx +24 -14
  282. package/src/components/explorer/{QueryBuilderMilestoneEditor.tsx → QueryBuilderMilestoningEditor.tsx} +12 -8
  283. package/src/components/explorer/QueryBuilderPropertySearchPanel.tsx +156 -145
  284. package/src/components/fetch-structure/QueryBuilderProjectionPanel.tsx +1 -5
  285. package/src/components/filter/QueryBuilderFilterPanel.tsx +3 -13
  286. package/src/components/shared/QueryBuilderPropertyInfoTooltip.tsx +22 -0
  287. package/src/graphManager/QueryBuilderHashUtils.ts +95 -0
  288. package/src/index.ts +3 -0
  289. package/src/stores/QueryBuilderChangeDetectionState.ts +112 -10
  290. package/src/stores/QueryBuilderConfig.ts +2 -0
  291. package/src/stores/QueryBuilderMilestoningState.ts +12 -1
  292. package/src/stores/QueryBuilderParametersState.ts +15 -2
  293. package/src/stores/QueryBuilderPropertyEditorState.ts +19 -7
  294. package/src/stores/QueryBuilderResultState.ts +30 -8
  295. package/src/stores/QueryBuilderState.ts +50 -37
  296. package/src/stores/QueryBuilderStateTestUtils.ts +1 -1
  297. package/src/stores/QueryBuilderTextEditorState.ts +1 -1
  298. package/src/stores/QueryBuilderUnsupportedQueryState.ts +13 -3
  299. package/src/stores/ServiceInfo.ts +52 -0
  300. package/src/stores/explorer/QueryBuilderExplorerState.ts +26 -30
  301. package/src/stores/explorer/QueryBuilderPropertySearchState.ts +259 -193
  302. package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +8 -3
  303. package/src/stores/fetch-structure/QueryBuilderFetchStructureState.ts +4 -4
  304. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +18 -2
  305. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +31 -6
  306. package/src/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.ts +34 -9
  307. package/src/stores/fetch-structure/projection/QueryBuilderProjectionState.ts +23 -16
  308. package/src/stores/fetch-structure/projection/QueryResultSetModifierState.ts +38 -8
  309. package/src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.ts +15 -2
  310. package/src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.ts +37 -12
  311. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.ts +10 -1
  312. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.ts +10 -1
  313. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.ts +12 -1
  314. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.ts +17 -2
  315. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.ts +17 -2
  316. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.ts +10 -1
  317. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.ts +10 -1
  318. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.ts +12 -1
  319. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.ts +12 -1
  320. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.ts +10 -1
  321. package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.ts +4 -2
  322. package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.ts +78 -10
  323. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +19 -1
  324. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +22 -2
  325. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +17 -1
  326. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +13 -1
  327. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +8 -0
  328. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +20 -2
  329. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +18 -1
  330. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +13 -1
  331. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +12 -1
  332. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +26 -3
  333. package/src/stores/filter/QueryBuilderFilterOperator.ts +4 -2
  334. package/src/stores/filter/QueryBuilderFilterState.ts +80 -22
  335. package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +20 -2
  336. package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +20 -2
  337. package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +18 -2
  338. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +16 -2
  339. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +16 -2
  340. package/src/stores/filter/operators/QueryBuilderFilterOperator_In.ts +14 -1
  341. package/src/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.ts +16 -1
  342. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +14 -2
  343. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +16 -2
  344. package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +20 -2
  345. package/src/stores/workflows/ServiceQueryBuilderState.ts +24 -9
  346. package/tsconfig.json +7 -2
  347. package/lib/components/explorer/QueryBuilderMilestoneEditor.d.ts.map +0 -1
  348. package/lib/components/explorer/QueryBuilderMilestoneEditor.js.map +0 -1
@@ -0,0 +1,95 @@
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
+ export enum QUERY_BUILDER_HASH_STRUCTURE {
18
+ // parameters state
19
+ PARAMETERS_STATE = 'PARAMETERS_STATE',
20
+
21
+ // projection state
22
+ AGGREGATE_OPERATOR_AVERAGE = 'AGGREGATE_OPERATOR_AVERAGE',
23
+ AGGREGATE_OPERATOR_COUNT = 'AGGREGATE_OPERATOR_COUNT',
24
+ AGGREGATE_OPERATOR_DISTINCT = 'AGGREGATE_OPERATOR_DISTINCT',
25
+ AGGREGATE_OPERATOR_DISTINCT_COUNT = 'AGGREGATE_OPERATOR_DISTINCT_COUNT',
26
+ AGGREGATE_OPERATOR_JOIN_STRING = 'AGGREGATE_OPERATOR_JOIN_STRING',
27
+ AGGREGATE_OPERATOR_MAX = 'AGGREGATE_OPERATOR_MAX',
28
+ AGGREGATE_OPERATOR_MIN = 'AGGREGATE_OPERATOR_MIN',
29
+ AGGREGATE_OPERATOR_STD_DEV_POPULATION = 'AGGREGATE_OPERATOR_STD_DEV_POPULATION',
30
+ AGGREGATE_OPERATOR_STD_DEV_SAMPLE = 'AGGREGATE_OPERATOR_STD_DEV_SAMPLE',
31
+ AGGREGATE_OPERATOR_SUM = 'AGGREGATE_OPERATOR_SUM',
32
+ AGGREGATE_COLUMN_STATE = 'AGGREGATE_COLUMN_STATE',
33
+ AGGREGATION_STATE = 'AGGREGATION_STATE',
34
+ SIMPLE_PROJECTION_COLUMN_STATE = 'SIMPLE_PROJECTION_COLUMN_STATE',
35
+ PROPERTY_EXPRESSION_STATE = 'PROPERTY_EXPRESSION_STATE',
36
+ DERIVATION_PROJECTION_COLUMN_STATE = 'DERIVATION_PROJECTION_COLUMN_STATE',
37
+ RESULT_SET_MODIFIER_STATE = 'RESULT_SET_MODIFIER_STATE',
38
+ SORT_COLUMN_STATE = 'SORT_COLUMN_STATE',
39
+ PROJECTION_STATE = 'PROJECTION_STATE',
40
+
41
+ // post-filter
42
+ POST_FILTER_TREE_GROUP_NODE_DATA = 'POST_FILTER_TREE_GROUP_NODE_DATA',
43
+ POST_FILTER_TREE_CONDIITION_NODE_DATA = 'POST_FILTER_TREE_CONDITION_NODE_DATA',
44
+ POST_FILTER_TREE_BLANK_CONDITION_NODE_DATA = 'POST_FILTER_TREE_BLANK_CONDITION_NODE_DATA',
45
+ POST_FILTER_CONDITION_STATE = 'POST_FILTER_CONDITION_STATE',
46
+ POST_FILTER_OPERATOR_CONTAIN = 'POST_FILTER_OPERATOR_CONTAIN',
47
+ POST_FILTER_OPERATOR_NOT_CONTAIN = 'POST_FILTER_OPERATOR_NOT_CONTAIN',
48
+ POST_FILTER_OPERATOR_END_WITH = 'POST_FILTER_OPERATOR_END_WITH',
49
+ POST_FILTER_OPERATOR_NOT_END_WITH = 'POST_FILTER_OPERATOR_NOT_END_WITH',
50
+ POST_FILTER_OPERATOR_EQUAL = 'POST_FILTER_OPERATOR_EQUAL',
51
+ POST_FILTER_OPERATOR_NOT_EQUAL = 'POST_FILTER_OPERATOR_NOT_EQUAL',
52
+ POST_FILTER_OPERATOR_GREATER_THAN = 'POST_FILTER_OPERATOR_GREATER_THAN',
53
+ POST_FILTER_OPERATOR_GREATER_THAN_EQUAL = 'POST_FILTER_OPERATOR_GREATER_THAN_EQUAL',
54
+ POST_FILTER_OPERATOR_IN = 'POST_FILTER_OPERATOR_IN',
55
+ POST_FILTER_OPERATOR_NOT_IN = 'POST_FILTER_OPERATOR_IN',
56
+ POST_FILTER_OPERATOR_IS_EMPTY = 'POST_FILTER_OPERATOR_IS_EMPTY',
57
+ POST_FILTER_OPERATOR_IS_NOT_EMPTY = 'POST_FILTER_OPERATOR_IS_NOT_EMPTY',
58
+ POST_FILTER_OPERATOR_LESS_THAN = 'POST_FILTER_OPERATOR_LESS_THAN',
59
+ POST_FILTER_OPERATOR_LESS_THAN_EQUAL = 'POST_FILTER_OPERATOR_LESS_THAN_EQUAL',
60
+ POST_FILTER_OPERATOR_START_WITH = 'POST_FILTER_OPERATOR_START_WITH',
61
+ POST_FILTER_OPERATOR_NOT_START_WITH = 'POST_FILTER_OPERATOR_NOT_START_WITH',
62
+ POST_FILTER_STATE = 'POST_FILTER_STATE',
63
+
64
+ // filter state
65
+ FILTER_TREE_GROUP_NODE_DATA = 'FILTER_TREE_GROUP_NODE_DATA',
66
+ FILTER_TREE_CONDIITION_NODE_DATA = 'FILTER_TREE_CONDITION_NODE_DATA',
67
+ FILTER_TREE_BLANK_CONDITION_NODE_DATA = 'FILTER_TREE_BLANK_CONDITION_NODE_DATA',
68
+ FILTER_CONDITION_STATE = 'FILTER_CONDITION_STATE',
69
+ FILTER_OPERATOR_CONTAIN = 'FILTER_OPERATOR_CONTAIN',
70
+ FILTER_OPERATOR_NOT_CONTAIN = 'FILTER_OPERATOR_NOT_CONTAIN',
71
+ FILTER_OPERATOR_END_WITH = 'FILTER_OPERATOR_END_WITH',
72
+ FILTER_OPERATOR_NOT_END_WITH = 'FILTER_OPERATOR_NOT_END_WITH',
73
+ FILTER_OPERATOR_EQUAL = 'FILTER_OPERATOR_EQUAL',
74
+ FILTER_OPERATOR_NOT_EQUAL = 'FILTER_OPERATOR_NOT_EQUAL',
75
+ FILTER_OPERATOR_GREATER_THAN = 'FILTER_OPERATOR_GREATER_THAN',
76
+ FILTER_OPERATOR_GREATER_THAN_EQUAL = 'FILTER_OPERATOR_GREATER_THAN_EQUAL',
77
+ FILTER_OPERATOR_IN = 'FILTER_OPERATOR_IN',
78
+ FILTER_OPERATOR_NOT_IN = 'FILTER_OPERATOR_IN',
79
+ FILTER_OPERATOR_IS_EMPTY = 'FILTER_OPERATOR_IS_EMPTY',
80
+ FILTER_OPERATOR_IS_NOT_EMPTY = 'FILTER_OPERATOR_IS_NOT_EMPTY',
81
+ FILTER_OPERATOR_LESS_THAN = 'FILTER_OPERATOR_LESS_THAN',
82
+ FILTER_OPERATOR_LESS_THAN_EQUAL = 'FILTER_OPERATOR_LESS_THAN_EQUAL',
83
+ FILTER_OPERATOR_START_WITH = 'FILTER_OPERATOR_START_WITH',
84
+ FILTER_OPERATOR_NOT_START_WITH = 'FILTER_OPERATOR_NOT_START_WITH',
85
+ FILTER_STATE = 'FILTER_STATE',
86
+
87
+ // graph fetch state
88
+ GRAPH_FETCH_STATE = 'GRAPH_FETCH_STATE',
89
+ GRAPH_FETCH_TREE_NODE_DATA = 'GRAPH_FETCH_TREE_NODE_DATA',
90
+
91
+ // general
92
+ MILESTONING_STATE = 'MILESTONING_STATE',
93
+ UNSUPPORTED_QUERY_STATE = 'UNSUPPORTED_QUERY_STATE',
94
+ QUERY_BUILDER_STATE = 'QUERY_BUILDER_STATE',
95
+ }
package/src/index.ts CHANGED
@@ -21,6 +21,7 @@ export { QUERY_BUILDER_TEST_ID } from './components//QueryBuilder_TestID.js';
21
21
  export { QueryBuilder } from './components//QueryBuilder.js';
22
22
  export { QueryBuilderState } from './stores//QueryBuilderState.js';
23
23
 
24
+ export { QueryBuilderPropertySearchState } from './stores/explorer/QueryBuilderPropertySearchState.js';
24
25
  export {
25
26
  QueryBuilderClassSelector,
26
27
  buildRuntimeValueOption,
@@ -36,3 +37,5 @@ export {
36
37
  export { getQueryBuilderGraphManagerExtension } from './graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtension.js';
37
38
  export type { ServiceExecutionAnalysisResult } from './graphManager/action/analytics/ServiceExecutionAnalysis.js';
38
39
  export type { MappingRuntimeCompatibilityAnalysisResult } from './graphManager/action/analytics/MappingRuntimeCompatibilityAnalysis.js';
40
+ export * from './stores/ServiceInfo.js';
41
+ export * from './components/ServiceQuerySetupUtils.js';
@@ -14,24 +14,126 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { RawLambda } from '@finos/legend-graph';
18
- import { hashObject } from '@finos/legend-shared';
17
+ import type { RawLambda } from '@finos/legend-graph';
18
+ import {
19
+ ActionState,
20
+ assertErrorThrown,
21
+ assertNonNullable,
22
+ type GeneratorFn,
23
+ } from '@finos/legend-shared';
24
+ import { action, computed, flow, makeObservable, observable } from 'mobx';
19
25
  import type { QueryBuilderState } from './QueryBuilderState.js';
20
26
 
27
+ export enum QueryBuilderDiffViewMode {
28
+ JSON = 'JSON',
29
+ GRAMMAR = 'Grammar',
30
+ }
31
+
32
+ export class QueryBuilderDiffViewState {
33
+ readonly changeDetectionState: QueryBuilderChangeDetectionState;
34
+ readonly initialQuery: RawLambda;
35
+ readonly currentQuery: RawLambda;
36
+
37
+ mode = QueryBuilderDiffViewMode.GRAMMAR;
38
+ initialQueryGrammarText?: string | undefined;
39
+ currentQueryGrammarText?: string | undefined;
40
+
41
+ constructor(
42
+ changeDetectionState: QueryBuilderChangeDetectionState,
43
+ initialQuery: RawLambda,
44
+ currentQuery: RawLambda,
45
+ ) {
46
+ makeObservable(this, {
47
+ mode: observable,
48
+ initialQueryGrammarText: observable,
49
+ currentQueryGrammarText: observable,
50
+ setMode: action,
51
+ generateGrammarDiff: flow,
52
+ });
53
+
54
+ this.changeDetectionState = changeDetectionState;
55
+ this.initialQuery = initialQuery;
56
+ this.currentQuery = currentQuery;
57
+ }
58
+
59
+ setMode(val: QueryBuilderDiffViewMode): void {
60
+ this.mode = val;
61
+ }
62
+
63
+ *generateGrammarDiff(): GeneratorFn<void> {
64
+ try {
65
+ this.initialQueryGrammarText =
66
+ (yield this.changeDetectionState.querybuilderState.graphManagerState.graphManager.lambdaToPureCode(
67
+ this.initialQuery,
68
+ true,
69
+ )) as string;
70
+ } catch (error) {
71
+ assertErrorThrown(error);
72
+ this.initialQueryGrammarText =
73
+ '/* Failed to transform grammar text, see JSON diff instead */';
74
+ }
75
+ try {
76
+ this.currentQueryGrammarText =
77
+ (yield this.changeDetectionState.querybuilderState.graphManagerState.graphManager.lambdaToPureCode(
78
+ this.currentQuery,
79
+ true,
80
+ )) as string;
81
+ } catch (error) {
82
+ assertErrorThrown(error);
83
+ this.currentQueryGrammarText =
84
+ '/* Failed to transform grammar text, see JSON diff instead */';
85
+ }
86
+ }
87
+ }
88
+
21
89
  export class QueryBuilderChangeDetectionState {
22
- querybuildState: QueryBuilderState;
23
- queryHashCode = hashObject(new RawLambda(undefined, undefined));
24
- isEnabled = false;
90
+ querybuilderState: QueryBuilderState;
91
+ initState = ActionState.create();
92
+ diffViewState?: QueryBuilderDiffViewState | undefined;
93
+ initialQuery?: RawLambda | undefined;
94
+ initialHashCode?: string | undefined;
25
95
 
26
96
  constructor(queryBuilderState: QueryBuilderState) {
27
- this.querybuildState = queryBuilderState;
97
+ makeObservable(this, {
98
+ diffViewState: observable,
99
+ initialHashCode: observable,
100
+ initialQuery: observable,
101
+ hasChanged: computed,
102
+ initialize: action,
103
+ showDiffViewPanel: action,
104
+ hideDiffViewPanel: action,
105
+ });
106
+
107
+ this.querybuilderState = queryBuilderState;
108
+ }
109
+
110
+ showDiffViewPanel(): void {
111
+ assertNonNullable(
112
+ this.initialQuery,
113
+ `Can't show changes: change detection is not properly initialized`,
114
+ );
115
+ this.diffViewState = new QueryBuilderDiffViewState(
116
+ this,
117
+ this.initialQuery,
118
+ this.querybuilderState.buildQuery(),
119
+ );
120
+ }
121
+
122
+ hideDiffViewPanel(): void {
123
+ this.diffViewState = undefined;
28
124
  }
29
125
 
30
- setQueryHashCode(val: string): void {
31
- this.queryHashCode = val;
126
+ get hasChanged(): boolean {
127
+ if (!this.initState.hasCompleted) {
128
+ return false;
129
+ }
130
+ return this.querybuilderState.hashCode !== this.initialHashCode;
32
131
  }
33
132
 
34
- setIsEnabled(val: boolean): void {
35
- this.isEnabled = val;
133
+ initialize(initialQuery: RawLambda): void {
134
+ this.initState.inProgress();
135
+ this.initialHashCode = this.querybuilderState.hashCode;
136
+ this.initialQuery = initialQuery;
137
+ this.initState.complete();
36
138
  }
37
139
  }
@@ -24,7 +24,9 @@ export const DEFAULT_VARIABLE_NAME = 'var';
24
24
  export const DEFAULT_POST_FILTER_LAMBDA_VARIABLE_NAME = 'row';
25
25
 
26
26
  export const QUERY_BUILDER_PROPERTY_SEARCH_MAX_DEPTH = 5;
27
+ export const QUERY_BUILDER_PROPERTY_SEARCH_MAX_NODES = 10000;
27
28
  export const QUERY_BUILDER_PROPERTY_SEARCH_RESULTS_LIMIT = 100;
29
+
28
30
  export enum QUERY_BUILDER_PROPERTY_SEARCH_TYPE {
29
31
  CLASS = 'CLASS',
30
32
  STRING = 'STRING',
@@ -28,10 +28,12 @@ import {
28
28
  VariableExpression,
29
29
  type ValueSpecification,
30
30
  } from '@finos/legend-graph';
31
+ import { type Hashable, hashArray } from '@finos/legend-shared';
31
32
  import { action, computed, makeObservable, observable } from 'mobx';
33
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../graphManager/QueryBuilderHashUtils.js';
32
34
  import type { QueryBuilderState } from './QueryBuilderState.js';
33
35
 
34
- export class QueryBuilderMilestoningState {
36
+ export class QueryBuilderMilestoningState implements Hashable {
35
37
  queryBuilderState: QueryBuilderState;
36
38
 
37
39
  showMilestoningEditor = false;
@@ -49,6 +51,7 @@ export class QueryBuilderMilestoningState {
49
51
  setProcessingDate: action,
50
52
  setBusinessDate: action,
51
53
  setShowMilestoningEditor: action,
54
+ hashCode: computed,
52
55
  });
53
56
 
54
57
  this.queryBuilderState = queryBuilderState;
@@ -161,4 +164,12 @@ export class QueryBuilderMilestoningState {
161
164
  }
162
165
  return milestoningParameter;
163
166
  }
167
+
168
+ get hashCode(): string {
169
+ return hashArray([
170
+ QUERY_BUILDER_HASH_STRUCTURE.MILESTONING_STATE,
171
+ this.businessDate ?? '',
172
+ this.processingDate ?? '',
173
+ ]);
174
+ }
164
175
  }
@@ -18,7 +18,9 @@ import {
18
18
  LambdaParametersState,
19
19
  type LambdaParameterState,
20
20
  } from '@finos/legend-application';
21
- import { observable, makeObservable, action } from 'mobx';
21
+ import { type Hashable, hashArray } from '@finos/legend-shared';
22
+ import { observable, makeObservable, action, override } from 'mobx';
23
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../graphManager/QueryBuilderHashUtils.js';
22
24
  import type { QueryBuilderState } from './QueryBuilderState.js';
23
25
 
24
26
  export const QUERY_BUILDER_PARAMETER_DND_TYPE = 'PARAMETER';
@@ -27,7 +29,10 @@ export interface QueryBuilderParameterDragSource {
27
29
  variable: LambdaParameterState;
28
30
  }
29
31
 
30
- export class QueryBuilderParametersState extends LambdaParametersState {
32
+ export class QueryBuilderParametersState
33
+ extends LambdaParametersState
34
+ implements Hashable
35
+ {
31
36
  selectedParameter: LambdaParameterState | undefined;
32
37
  queryBuilderState: QueryBuilderState;
33
38
 
@@ -41,11 +46,19 @@ export class QueryBuilderParametersState extends LambdaParametersState {
41
46
  setParameters: action,
42
47
  selectedParameter: observable,
43
48
  setSelectedParameter: action,
49
+ hashCode: override,
44
50
  });
45
51
 
46
52
  this.queryBuilderState = queryBuilderState;
47
53
  }
48
54
 
55
+ override get hashCode(): string {
56
+ return hashArray([
57
+ QUERY_BUILDER_HASH_STRUCTURE.PARAMETERS_STATE,
58
+ hashArray(this.parameterStates),
59
+ ]);
60
+ }
61
+
49
62
  setSelectedParameter(val: LambdaParameterState | undefined): void {
50
63
  this.selectedParameter = val;
51
64
  }
@@ -14,11 +14,13 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { action, makeAutoObservable } from 'mobx';
17
+ import { action, computed, makeObservable, observable } from 'mobx';
18
18
  import {
19
19
  getNullableFirstElement,
20
20
  guaranteeNonNullable,
21
21
  guaranteeType,
22
+ type Hashable,
23
+ hashArray,
22
24
  isCamelCase,
23
25
  prettyCamelCase,
24
26
  prettyCONSTName,
@@ -59,6 +61,7 @@ import type { QueryBuilderState } from './QueryBuilderState.js';
59
61
  import { functionExpression_setParametersValues } from '@finos/legend-application';
60
62
  import type { QueryBuilderMilestoningState } from './QueryBuilderMilestoningState.js';
61
63
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
64
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../graphManager/QueryBuilderHashUtils.js';
62
65
 
63
66
  export const getDerivedPropertyMilestoningSteoreotype = (
64
67
  property: DerivedProperty,
@@ -556,12 +559,11 @@ export class QueryBuilderDerivedPropertyExpressionState {
556
559
  }
557
560
  }
558
561
 
559
- export class QueryBuilderPropertyExpressionState {
560
- queryBuilderState: QueryBuilderState;
562
+ export class QueryBuilderPropertyExpressionState implements Hashable {
563
+ readonly queryBuilderState: QueryBuilderState;
564
+ readonly propertyExpression: AbstractPropertyExpression;
561
565
  path: string;
562
566
  title: string;
563
- readonly propertyExpression: AbstractPropertyExpression;
564
-
565
567
  isEditingDerivedPropertyExpression = false;
566
568
  // Since this property is a chain expression, some link of the chain can be
567
569
  // derived property, as such, we need to keep track of the derived properties state in an array
@@ -580,13 +582,16 @@ export class QueryBuilderPropertyExpressionState {
580
582
  queryBuilderState: QueryBuilderState,
581
583
  propertyExpression: AbstractPropertyExpression,
582
584
  ) {
583
- makeAutoObservable<
585
+ makeObservable<
584
586
  QueryBuilderPropertyExpressionState,
585
587
  'initDerivedPropertyExpressionStates'
586
588
  >(this, {
587
- queryBuilderState: false,
589
+ isEditingDerivedPropertyExpression: observable,
590
+ derivedPropertyExpressionStates: observable,
588
591
  setIsEditingDerivedProperty: action,
589
592
  initDerivedPropertyExpressionStates: action,
593
+ isValid: computed,
594
+ hashCode: computed,
590
595
  });
591
596
 
592
597
  this.queryBuilderState = queryBuilderState;
@@ -665,4 +670,11 @@ export class QueryBuilderPropertyExpressionState {
665
670
  this.requiresExistsHandling = requiresExistsHandling;
666
671
  this.derivedPropertyExpressionStates = result.slice().reverse();
667
672
  }
673
+
674
+ get hashCode(): string {
675
+ return hashArray([
676
+ QUERY_BUILDER_HASH_STRUCTURE.PROPERTY_EXPRESSION_STATE,
677
+ this.propertyExpression,
678
+ ]);
679
+ }
668
680
  }
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { action, makeAutoObservable } from 'mobx';
17
+ import { action, flow, makeObservable, observable } from 'mobx';
18
18
  import {
19
19
  type GeneratorFn,
20
20
  assertErrorThrown,
@@ -45,22 +45,35 @@ import {
45
45
  const DEFAULT_LIMIT = 1000;
46
46
 
47
47
  export class QueryBuilderResultState {
48
- queryBuilderState: QueryBuilderState;
49
- exportDataState = ActionState.create();
48
+ readonly queryBuilderState: QueryBuilderState;
49
+ readonly exportDataState = ActionState.create();
50
+ readonly executionPlanState: ExecutionPlanState;
51
+
50
52
  previewLimit = DEFAULT_LIMIT;
51
53
  isRunningQuery = false;
52
54
  isGeneratingPlan = false;
53
55
  executionResult?: ExecutionResult | undefined;
54
- executionPlanState: ExecutionPlanState;
55
56
  executionDuration?: number | undefined;
57
+ latestRunHashCode?: string | undefined;
56
58
  queryRunPromise: Promise<ExecutionResult> | undefined = undefined;
57
59
 
58
60
  constructor(queryBuilderState: QueryBuilderState) {
59
- makeAutoObservable(this, {
60
- queryBuilderState: false,
61
- executionPlanState: false,
61
+ makeObservable(this, {
62
+ executionResult: observable,
63
+ previewLimit: observable,
64
+ executionDuration: observable,
65
+ latestRunHashCode: observable,
66
+ queryRunPromise: observable,
67
+ isGeneratingPlan: observable,
68
+ isRunningQuery: observable,
62
69
  setIsRunningQuery: action,
63
70
  setExecutionResult: action,
71
+ setExecutionDuration: action,
72
+ setPreviewLimit: action,
73
+ setQueryRunPromise: action,
74
+ exportData: flow,
75
+ runQuery: flow,
76
+ generatePlan: flow,
64
77
  });
65
78
 
66
79
  this.queryBuilderState = queryBuilderState;
@@ -92,6 +105,13 @@ export class QueryBuilderResultState {
92
105
  this.queryRunPromise = promise;
93
106
  };
94
107
 
108
+ get checkForStaleResults(): boolean {
109
+ if (this.latestRunHashCode !== this.queryBuilderState.hashCode) {
110
+ return true;
111
+ }
112
+ return false;
113
+ }
114
+
95
115
  buildExecutionRawLambda(): RawLambda {
96
116
  let query: RawLambda;
97
117
  if (this.queryBuilderState.isQuerySupported) {
@@ -188,7 +208,8 @@ export class QueryBuilderResultState {
188
208
 
189
209
  *runQuery(): GeneratorFn<void> {
190
210
  try {
191
- this.isRunningQuery = true;
211
+ this.setIsRunningQuery(true);
212
+ const currentHashCode = this.queryBuilderState.hashCode;
192
213
  const mapping = guaranteeNonNullable(
193
214
  this.queryBuilderState.mapping,
194
215
  'Mapping is required to execute query',
@@ -210,6 +231,7 @@ export class QueryBuilderResultState {
210
231
  const result = (yield promise) as ExecutionResult;
211
232
  if (this.queryRunPromise === promise) {
212
233
  this.setExecutionResult(result);
234
+ this.latestRunHashCode = currentHashCode;
213
235
  this.setExecutionDuration(Date.now() - startTime);
214
236
  }
215
237
  } catch (error) {
@@ -23,6 +23,7 @@ import {
23
23
  guaranteeType,
24
24
  filterByType,
25
25
  ActionState,
26
+ hashArray,
26
27
  } from '@finos/legend-shared';
27
28
  import { QueryBuilderFilterState } from './filter/QueryBuilderFilterState.js';
28
29
  import { QueryBuilderFetchStructureState } from './fetch-structure/QueryBuilderFetchStructureState.js';
@@ -62,6 +63,7 @@ import type { QueryBuilderFilterOperator } from './filter/QueryBuilderFilterOper
62
63
  import { getQueryBuilderCoreFilterOperators } from './filter/QueryBuilderFilterOperatorLoader.js';
63
64
  import { QueryBuilderChangeDetectionState } from './QueryBuilderChangeDetectionState.js';
64
65
  import { QueryBuilderMilestoningState } from './QueryBuilderMilestoningState.js';
66
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../graphManager/QueryBuilderHashUtils.js';
65
67
 
66
68
  export abstract class QueryBuilderState {
67
69
  applicationStore: GenericLegendApplicationStore;
@@ -134,6 +136,7 @@ export abstract class QueryBuilderState {
134
136
  rebuildWithQuery: action,
135
137
  saveQuery: action,
136
138
  compileQuery: flow,
139
+ hashCode: computed,
137
140
  });
138
141
 
139
142
  this.applicationStore = applicationStore;
@@ -278,9 +281,39 @@ export abstract class QueryBuilderState {
278
281
  );
279
282
  }
280
283
 
281
- initializeWithQuery(rawLambda: RawLambda): void {
284
+ initializeWithQuery(query: RawLambda): void {
285
+ this.rebuildWithQuery(query);
286
+ this.changeDetectionState.initialize(query);
287
+ }
288
+
289
+ /**
290
+ * Process the provided query, and rebuild the query builder state.
291
+ */
292
+ rebuildWithQuery(query: RawLambda): void {
282
293
  try {
283
- this.rebuildWithQuery(rawLambda);
294
+ this.resetQueryResult();
295
+ this.resetQueryContent();
296
+
297
+ if (!isStubbed_RawLambda(query)) {
298
+ const valueSpec = observe_ValueSpecification(
299
+ this.graphManagerState.graphManager.buildValueSpecification(
300
+ this.graphManagerState.graphManager.serializeRawValueSpecification(
301
+ query,
302
+ ),
303
+ this.graphManagerState.graph,
304
+ ),
305
+ this.observableContext,
306
+ );
307
+ const compiledValueSpecification = guaranteeType(
308
+ valueSpec,
309
+ LambdaFunctionInstanceValue,
310
+ `Can't build query state: query builder only support lambda`,
311
+ );
312
+ processQueryLambdaFunction(
313
+ guaranteeNonNullable(compiledValueSpecification.values[0]),
314
+ this,
315
+ );
316
+ }
284
317
  if (this.parametersState.parameterStates.length > 0) {
285
318
  this.setShowParametersPanel(true);
286
319
  }
@@ -289,10 +322,10 @@ export abstract class QueryBuilderState {
289
322
  this.resetQueryContent();
290
323
  this.resetQueryResult();
291
324
  this.unsupportedQueryState.setLambdaError(error);
292
- this.unsupportedQueryState.setRawLambda(rawLambda);
325
+ this.unsupportedQueryState.setRawLambda(query);
293
326
  this.setClass(undefined);
294
327
  const parameters = buildLambdaVariableExpressions(
295
- rawLambda,
328
+ query,
296
329
  this.graphManagerState,
297
330
  )
298
331
  .map((param) =>
@@ -303,43 +336,12 @@ export abstract class QueryBuilderState {
303
336
  }
304
337
  }
305
338
 
306
- /**
307
- * Process the provided query, and rebuild the query builder state.
308
- *
309
- * @throws error if there is an issue building the compiled lambda or rebuilding the state.
310
- * consumers of function should handle the errors.
311
- */
312
- rebuildWithQuery(val: RawLambda): void {
313
- this.resetQueryResult();
314
- this.resetQueryContent();
315
- if (!isStubbed_RawLambda(val)) {
316
- const valueSpec = observe_ValueSpecification(
317
- this.graphManagerState.graphManager.buildValueSpecification(
318
- this.graphManagerState.graphManager.serializeRawValueSpecification(
319
- val,
320
- ),
321
- this.graphManagerState.graph,
322
- ),
323
- this.observableContext,
324
- );
325
- const compiledValueSpecification = guaranteeType(
326
- valueSpec,
327
- LambdaFunctionInstanceValue,
328
- `Can't build query state: query builder only support lambda`,
329
- );
330
- processQueryLambdaFunction(
331
- guaranteeNonNullable(compiledValueSpecification.values[0]),
332
- this,
333
- );
334
- }
335
- }
336
-
337
339
  async saveQuery(
338
340
  onSaveQuery: (lambda: RawLambda) => Promise<void>,
339
341
  ): Promise<void> {
340
342
  try {
341
- const rawLambda = this.buildQuery();
342
- await onSaveQuery(rawLambda);
343
+ const query = this.buildQuery();
344
+ await onSaveQuery(query);
343
345
  } catch (error) {
344
346
  assertErrorThrown(error);
345
347
  this.applicationStore.notifyError(`Can't save query: ${error.message}`);
@@ -450,6 +452,17 @@ export abstract class QueryBuilderState {
450
452
  basicState.runtimeValue = this.runtimeValue;
451
453
  return basicState;
452
454
  }
455
+
456
+ get hashCode(): string {
457
+ return hashArray([
458
+ QUERY_BUILDER_HASH_STRUCTURE.QUERY_BUILDER_STATE,
459
+ this.unsupportedQueryState,
460
+ this.milestoningState,
461
+ this.parametersState,
462
+ this.filterState,
463
+ this.fetchStructureState.implementation,
464
+ ]);
465
+ }
453
466
  }
454
467
 
455
468
  /**
@@ -61,7 +61,7 @@ export const TEST__setUpQueryBuilderState = async (
61
61
  graphManagerState,
62
62
  );
63
63
  if (rawLambda) {
64
- queryBuilderState.rebuildWithQuery(rawLambda);
64
+ queryBuilderState.initializeWithQuery(rawLambda);
65
65
  }
66
66
  if (executionContext) {
67
67
  const graph = queryBuilderState.graphManagerState.graph;
@@ -193,7 +193,7 @@ export class QueryBuilderTextEditorState extends LambdaEditorState {
193
193
  `Can't parse query. Please fix error before closing: ${this.parserError.message}`,
194
194
  );
195
195
  } else {
196
- this.queryBuilderState.initializeWithQuery(this.rawLambdaState.lambda);
196
+ this.queryBuilderState.rebuildWithQuery(this.rawLambdaState.lambda);
197
197
  this.setMode(undefined);
198
198
  }
199
199
  return;
@@ -14,12 +14,14 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { makeObservable, action, observable } from 'mobx';
17
+ import { makeObservable, action, observable, computed } from 'mobx';
18
+ import { type Hashable, hashArray } from '@finos/legend-shared';
18
19
  import type { QueryBuilderState } from './QueryBuilderState.js';
19
20
  import type { RawLambda } from '@finos/legend-graph';
21
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../graphManager/QueryBuilderHashUtils.js';
20
22
 
21
- export class QueryBuilderUnsupportedQueryState {
22
- queryBuilderState: QueryBuilderState;
23
+ export class QueryBuilderUnsupportedQueryState implements Hashable {
24
+ readonly queryBuilderState: QueryBuilderState;
23
25
  rawLambda?: RawLambda | undefined;
24
26
  lambdaError?: Error | undefined;
25
27
 
@@ -29,6 +31,7 @@ export class QueryBuilderUnsupportedQueryState {
29
31
  lambdaError: observable,
30
32
  setRawLambda: action,
31
33
  setLambdaError: action,
34
+ hashCode: computed,
32
35
  });
33
36
 
34
37
  this.queryBuilderState = queryBuilderState;
@@ -41,4 +44,11 @@ export class QueryBuilderUnsupportedQueryState {
41
44
  setLambdaError(val: Error | undefined): void {
42
45
  this.lambdaError = val;
43
46
  }
47
+
48
+ get hashCode(): string {
49
+ return hashArray([
50
+ QUERY_BUILDER_HASH_STRUCTURE.UNSUPPORTED_QUERY_STATE,
51
+ this.rawLambda ?? '',
52
+ ]);
53
+ }
44
54
  }