@finos/legend-query-builder 0.0.2 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (392) hide show
  1. package/lib/components/QueryBuilder.d.ts +1 -0
  2. package/lib/components/QueryBuilder.d.ts.map +1 -1
  3. package/lib/components/QueryBuilder.js +14 -4
  4. package/lib/components/QueryBuilder.js.map +1 -1
  5. package/lib/components/QueryBuilderDiffPanel.d.ts +23 -0
  6. package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -0
  7. package/lib/components/QueryBuilderDiffPanel.js +103 -0
  8. package/lib/components/QueryBuilderDiffPanel.js.map +1 -0
  9. package/lib/components/QueryBuilderParametersPanel.d.ts +1 -0
  10. package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
  11. package/lib/components/QueryBuilderParametersPanel.js +2 -2
  12. package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
  13. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +1 -0
  14. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
  15. package/lib/components/QueryBuilderResultPanel.d.ts +1 -0
  16. package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
  17. package/lib/components/QueryBuilderResultPanel.js +9 -10
  18. package/lib/components/QueryBuilderResultPanel.js.map +1 -1
  19. package/lib/components/QueryBuilderSideBar.d.ts +1 -0
  20. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  21. package/lib/components/QueryBuilderSideBar.js +1 -1
  22. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  23. package/lib/components/QueryBuilderTextEditor.d.ts +1 -0
  24. package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
  25. package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +1 -0
  26. package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -1
  27. package/lib/components/QueryBuilderUnsupportedQueryEditor.js +2 -2
  28. package/lib/components/QueryBuilderUnsupportedQueryEditor.js.map +1 -1
  29. package/lib/components/QuerySetupUtils.d.ts +22 -0
  30. package/lib/components/QuerySetupUtils.d.ts.map +1 -0
  31. package/lib/components/QuerySetupUtils.js +20 -0
  32. package/lib/components/QuerySetupUtils.js.map +1 -0
  33. package/lib/components/ServiceQuerySetupUtils.d.ts +23 -0
  34. package/lib/components/ServiceQuerySetupUtils.d.ts.map +1 -0
  35. package/lib/components/ServiceQuerySetupUtils.js +25 -0
  36. package/lib/components/ServiceQuerySetupUtils.js.map +1 -0
  37. package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
  38. package/lib/components/explorer/QueryBuilderExplorerPanel.js +4 -10
  39. package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
  40. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +1 -0
  41. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
  42. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +8 -6
  43. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
  44. package/lib/components/explorer/{QueryBuilderMilestoneEditor.d.ts → QueryBuilderMilestoningEditor.d.ts} +2 -1
  45. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -0
  46. package/lib/components/explorer/{QueryBuilderMilestoneEditor.js → QueryBuilderMilestoningEditor.js} +9 -9
  47. package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -0
  48. package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +1 -0
  49. package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
  50. package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +69 -61
  51. package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
  52. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +1 -0
  53. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
  54. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js +3 -3
  55. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js.map +1 -1
  56. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +1 -0
  57. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
  58. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +1 -0
  59. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  60. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +3 -3
  61. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  62. package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts +1 -0
  63. package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts.map +1 -1
  64. package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js +3 -5
  65. package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js.map +1 -1
  66. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +1 -0
  67. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  68. package/lib/components/filter/QueryBuilderFilterPanel.d.ts +1 -0
  69. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  70. package/lib/components/filter/QueryBuilderFilterPanel.js +5 -9
  71. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  72. package/lib/components/shared/QueryBuilderLambdaEditor.d.ts +1 -0
  73. package/lib/components/shared/QueryBuilderLambdaEditor.d.ts.map +1 -1
  74. package/lib/components/shared/QueryBuilderPropertyInfoTooltip.d.ts.map +1 -1
  75. package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js +7 -2
  76. package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js.map +1 -1
  77. package/lib/graphManager/QueryBuilderHashUtils.d.ts +84 -0
  78. package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -0
  79. package/lib/graphManager/QueryBuilderHashUtils.js +91 -0
  80. package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -0
  81. package/lib/index.css +17 -1
  82. package/lib/index.css.map +1 -1
  83. package/lib/index.d.ts +4 -0
  84. package/lib/index.d.ts.map +1 -1
  85. package/lib/index.js +4 -0
  86. package/lib/index.js.map +1 -1
  87. package/lib/package.json +11 -9
  88. package/lib/stores/QueryBuilderChangeDetectionState.d.ts +27 -5
  89. package/lib/stores/QueryBuilderChangeDetectionState.d.ts.map +1 -1
  90. package/lib/stores/QueryBuilderChangeDetectionState.js +106 -10
  91. package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -1
  92. package/lib/stores/QueryBuilderConfig.d.ts +1 -0
  93. package/lib/stores/QueryBuilderConfig.d.ts.map +1 -1
  94. package/lib/stores/QueryBuilderConfig.js +1 -0
  95. package/lib/stores/QueryBuilderConfig.js.map +1 -1
  96. package/lib/stores/QueryBuilderMilestoningState.d.ts +3 -1
  97. package/lib/stores/QueryBuilderMilestoningState.d.ts.map +1 -1
  98. package/lib/stores/QueryBuilderMilestoningState.js +10 -0
  99. package/lib/stores/QueryBuilderMilestoningState.js.map +1 -1
  100. package/lib/stores/QueryBuilderParametersState.d.ts +4 -2
  101. package/lib/stores/QueryBuilderParametersState.d.ts.map +1 -1
  102. package/lib/stores/QueryBuilderParametersState.js +11 -2
  103. package/lib/stores/QueryBuilderParametersState.js.map +1 -1
  104. package/lib/stores/QueryBuilderPropertyEditorState.d.ts +5 -3
  105. package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
  106. package/lib/stores/QueryBuilderPropertyEditorState.js +15 -5
  107. package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
  108. package/lib/stores/QueryBuilderResultState.d.ts +5 -3
  109. package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
  110. package/lib/stores/QueryBuilderResultState.js +26 -6
  111. package/lib/stores/QueryBuilderResultState.js.map +1 -1
  112. package/lib/stores/QueryBuilderState.d.ts +3 -5
  113. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  114. package/lib/stores/QueryBuilderState.js +32 -22
  115. package/lib/stores/QueryBuilderState.js.map +1 -1
  116. package/lib/stores/QueryBuilderStateTestUtils.js +1 -1
  117. package/lib/stores/QueryBuilderStateTestUtils.js.map +1 -1
  118. package/lib/stores/QueryBuilderTextEditorState.js +1 -1
  119. package/lib/stores/QueryBuilderTextEditorState.js.map +1 -1
  120. package/lib/stores/QueryBuilderTypeaheadHelper.d.ts.map +1 -1
  121. package/lib/stores/QueryBuilderTypeaheadHelper.js +3 -4
  122. package/lib/stores/QueryBuilderTypeaheadHelper.js.map +1 -1
  123. package/lib/stores/QueryBuilderUnsupportedQueryState.d.ts +4 -2
  124. package/lib/stores/QueryBuilderUnsupportedQueryState.d.ts.map +1 -1
  125. package/lib/stores/QueryBuilderUnsupportedQueryState.js +10 -1
  126. package/lib/stores/QueryBuilderUnsupportedQueryState.js.map +1 -1
  127. package/lib/stores/ServiceInfo.d.ts +28 -0
  128. package/lib/stores/ServiceInfo.d.ts.map +1 -0
  129. package/lib/stores/ServiceInfo.js +34 -0
  130. package/lib/stores/ServiceInfo.js.map +1 -0
  131. package/lib/stores/explorer/QueryBuilderExplorerState.d.ts +6 -6
  132. package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
  133. package/lib/stores/explorer/QueryBuilderExplorerState.js +19 -14
  134. package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
  135. package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts +36 -17
  136. package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts.map +1 -1
  137. package/lib/stores/explorer/QueryBuilderPropertySearchState.js +203 -161
  138. package/lib/stores/explorer/QueryBuilderPropertySearchState.js.map +1 -1
  139. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +5 -3
  140. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
  141. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +1 -0
  142. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
  143. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts +1 -1
  144. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts.map +1 -1
  145. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js +3 -3
  146. package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js.map +1 -1
  147. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +3 -1
  148. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
  149. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +9 -1
  150. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
  151. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts +7 -5
  152. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts.map +1 -1
  153. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +20 -5
  154. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
  155. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts +7 -4
  156. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
  157. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js +20 -5
  158. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js.map +1 -1
  159. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts +6 -5
  160. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts.map +1 -1
  161. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js +14 -9
  162. package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js.map +1 -1
  163. package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.d.ts +6 -3
  164. package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.d.ts.map +1 -1
  165. package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.js +28 -5
  166. package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.js.map +1 -1
  167. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.d.ts +4 -1
  168. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.d.ts.map +1 -1
  169. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.js +7 -1
  170. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.js.map +1 -1
  171. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.d.ts +8 -5
  172. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.d.ts.map +1 -1
  173. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.js +24 -7
  174. package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.js.map +1 -1
  175. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.d.ts +3 -1
  176. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.d.ts.map +1 -1
  177. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js +5 -0
  178. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js.map +1 -1
  179. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.d.ts +3 -1
  180. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.d.ts.map +1 -1
  181. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js +5 -0
  182. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js.map +1 -1
  183. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.d.ts +3 -1
  184. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.d.ts.map +1 -1
  185. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js +7 -0
  186. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js.map +1 -1
  187. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts +3 -1
  188. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts.map +1 -1
  189. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js +7 -1
  190. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js.map +1 -1
  191. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.d.ts +3 -1
  192. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.d.ts.map +1 -1
  193. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js +7 -1
  194. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js.map +1 -1
  195. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.d.ts +3 -1
  196. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.d.ts.map +1 -1
  197. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js +5 -0
  198. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js.map +1 -1
  199. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.d.ts +3 -1
  200. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.d.ts.map +1 -1
  201. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js +5 -0
  202. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js.map +1 -1
  203. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.d.ts +3 -1
  204. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.d.ts.map +1 -1
  205. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js +7 -0
  206. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js.map +1 -1
  207. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts +3 -1
  208. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts.map +1 -1
  209. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js +7 -0
  210. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js.map +1 -1
  211. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.d.ts +3 -1
  212. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.d.ts.map +1 -1
  213. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js +5 -0
  214. package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js.map +1 -1
  215. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.d.ts +3 -1
  216. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.d.ts.map +1 -1
  217. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.js.map +1 -1
  218. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.d.ts +14 -8
  219. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
  220. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.js +54 -4
  221. package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.js.map +1 -1
  222. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts +4 -1
  223. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -1
  224. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +12 -1
  225. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
  226. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts +4 -1
  227. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -1
  228. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +12 -1
  229. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
  230. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts +4 -1
  231. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -1
  232. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +10 -1
  233. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
  234. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts +3 -1
  235. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -1
  236. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +7 -1
  237. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
  238. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts +1 -0
  239. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts.map +1 -1
  240. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +7 -0
  241. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -1
  242. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts +4 -1
  243. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts.map +1 -1
  244. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js +10 -1
  245. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -1
  246. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts +4 -1
  247. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts.map +1 -1
  248. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +12 -0
  249. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -1
  250. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts +3 -1
  251. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -1
  252. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +7 -1
  253. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
  254. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts +3 -1
  255. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts.map +1 -1
  256. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +7 -0
  257. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -1
  258. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts +5 -2
  259. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -1
  260. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +12 -1
  261. package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
  262. package/lib/stores/filter/QueryBuilderFilterOperator.d.ts +3 -1
  263. package/lib/stores/filter/QueryBuilderFilterOperator.d.ts.map +1 -1
  264. package/lib/stores/filter/QueryBuilderFilterOperator.js.map +1 -1
  265. package/lib/stores/filter/QueryBuilderFilterState.d.ts +14 -8
  266. package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
  267. package/lib/stores/filter/QueryBuilderFilterState.js +54 -9
  268. package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
  269. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts +4 -1
  270. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -1
  271. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +10 -1
  272. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -1
  273. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts +4 -1
  274. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -1
  275. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js +10 -1
  276. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -1
  277. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts +4 -1
  278. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -1
  279. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js +8 -1
  280. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +1 -1
  281. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts +3 -1
  282. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -1
  283. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js +7 -1
  284. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -1
  285. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts +3 -1
  286. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -1
  287. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js +7 -1
  288. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -1
  289. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts +4 -1
  290. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts.map +1 -1
  291. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js +8 -0
  292. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js.map +1 -1
  293. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts +4 -1
  294. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts.map +1 -1
  295. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js +10 -0
  296. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js.map +1 -1
  297. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts +3 -1
  298. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -1
  299. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js +5 -1
  300. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js.map +1 -1
  301. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts +3 -1
  302. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -1
  303. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js +7 -1
  304. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -1
  305. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts +4 -1
  306. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -1
  307. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js +10 -1
  308. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -1
  309. package/lib/stores/workflows/ServiceQueryBuilderState.d.ts.map +1 -1
  310. package/lib/stores/workflows/ServiceQueryBuilderState.js +15 -7
  311. package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
  312. package/package.json +17 -15
  313. package/src/components/QueryBuilder.tsx +41 -1
  314. package/src/components/QueryBuilderDiffPanel.tsx +222 -0
  315. package/src/components/QueryBuilderParametersPanel.tsx +2 -2
  316. package/src/components/QueryBuilderResultPanel.tsx +34 -20
  317. package/src/components/QueryBuilderSideBar.tsx +1 -1
  318. package/src/components/QueryBuilderUnsupportedQueryEditor.tsx +8 -9
  319. package/src/components/QuerySetupUtils.ts +23 -0
  320. package/src/components/ServiceQuerySetupUtils.tsx +54 -0
  321. package/src/components/explorer/QueryBuilderExplorerPanel.tsx +5 -12
  322. package/src/components/explorer/QueryBuilderFunctionsExplorerPanel.tsx +24 -14
  323. package/src/components/explorer/{QueryBuilderMilestoneEditor.tsx → QueryBuilderMilestoningEditor.tsx} +12 -8
  324. package/src/components/explorer/QueryBuilderPropertySearchPanel.tsx +156 -145
  325. package/src/components/fetch-structure/QueryBuilderFetchStructurePanel.tsx +10 -5
  326. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +5 -4
  327. package/src/components/fetch-structure/QueryBuilderProjectionPanel.tsx +4 -7
  328. package/src/components/filter/QueryBuilderFilterPanel.tsx +6 -15
  329. package/src/components/shared/QueryBuilderPropertyInfoTooltip.tsx +22 -0
  330. package/src/graphManager/QueryBuilderHashUtils.ts +95 -0
  331. package/src/index.ts +4 -0
  332. package/src/stores/QueryBuilderChangeDetectionState.ts +143 -10
  333. package/src/stores/QueryBuilderConfig.ts +2 -0
  334. package/src/stores/QueryBuilderMilestoningState.ts +12 -1
  335. package/src/stores/QueryBuilderParametersState.ts +18 -3
  336. package/src/stores/QueryBuilderPropertyEditorState.ts +19 -7
  337. package/src/stores/QueryBuilderResultState.ts +30 -8
  338. package/src/stores/QueryBuilderState.ts +50 -37
  339. package/src/stores/QueryBuilderStateTestUtils.ts +1 -1
  340. package/src/stores/QueryBuilderTextEditorState.ts +1 -1
  341. package/src/stores/QueryBuilderTypeaheadHelper.ts +6 -5
  342. package/src/stores/QueryBuilderUnsupportedQueryState.ts +13 -3
  343. package/src/stores/ServiceInfo.ts +52 -0
  344. package/src/stores/explorer/QueryBuilderExplorerState.ts +26 -30
  345. package/src/stores/explorer/QueryBuilderPropertySearchState.ts +259 -193
  346. package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +8 -3
  347. package/src/stores/fetch-structure/QueryBuilderFetchStructureState.ts +4 -4
  348. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +18 -2
  349. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +31 -6
  350. package/src/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.ts +34 -9
  351. package/src/stores/fetch-structure/projection/QueryBuilderProjectionState.ts +23 -16
  352. package/src/stores/fetch-structure/projection/QueryResultSetModifierState.ts +38 -8
  353. package/src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.ts +15 -2
  354. package/src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.ts +37 -12
  355. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.ts +10 -1
  356. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.ts +10 -1
  357. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.ts +12 -1
  358. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.ts +17 -2
  359. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.ts +17 -2
  360. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.ts +10 -1
  361. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.ts +10 -1
  362. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.ts +12 -1
  363. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.ts +12 -1
  364. package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.ts +10 -1
  365. package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.ts +4 -2
  366. package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.ts +78 -10
  367. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +19 -1
  368. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +22 -2
  369. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +17 -1
  370. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +13 -1
  371. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +8 -0
  372. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +20 -2
  373. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +18 -1
  374. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +13 -1
  375. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +12 -1
  376. package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +26 -3
  377. package/src/stores/filter/QueryBuilderFilterOperator.ts +4 -2
  378. package/src/stores/filter/QueryBuilderFilterState.ts +80 -22
  379. package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +20 -2
  380. package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +20 -2
  381. package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +18 -2
  382. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +16 -2
  383. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +16 -2
  384. package/src/stores/filter/operators/QueryBuilderFilterOperator_In.ts +14 -1
  385. package/src/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.ts +16 -1
  386. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +14 -2
  387. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +16 -2
  388. package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +20 -2
  389. package/src/stores/workflows/ServiceQueryBuilderState.ts +24 -9
  390. package/tsconfig.json +8 -2
  391. package/lib/components/explorer/QueryBuilderMilestoneEditor.d.ts.map +0 -1
  392. package/lib/components/explorer/QueryBuilderMilestoneEditor.js.map +0 -1
@@ -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;
@@ -36,9 +36,10 @@ import {
36
36
  } from './fetch-structure/projection/QueryBuilderProjectionColumnState.js';
37
37
  import type { QueryBuilderState } from './QueryBuilderState.js';
38
38
  import { QueryBuilderProjectionState } from './fetch-structure/projection/QueryBuilderProjectionState.js';
39
-
40
- const TYPEAHEAD_TAKE_LIMIT = 10;
41
- const START_LENGTH = 3;
39
+ import {
40
+ DEFAULT_TYPEAHEAD_SEARCH_LIMIT,
41
+ DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH,
42
+ } from '@finos/legend-application';
42
43
 
43
44
  const initializeQueryBuilderState = (
44
45
  queryBuilderState: QueryBuilderState,
@@ -49,7 +50,7 @@ const initializeQueryBuilderState = (
49
50
  QueryBuilderProjectionState,
50
51
  );
51
52
  projectionState.resultSetModifierState.distinct = true;
52
- projectionState.resultSetModifierState.limit = TYPEAHEAD_TAKE_LIMIT;
53
+ projectionState.resultSetModifierState.limit = DEFAULT_TYPEAHEAD_SEARCH_LIMIT;
53
54
  return builderState;
54
55
  };
55
56
 
@@ -142,7 +143,7 @@ export const performTypeahead = (
142
143
  switch (_type.path) {
143
144
  case PRIMITIVE_TYPE.STRING: {
144
145
  const value = val.values[0] as string;
145
- return value.length >= START_LENGTH;
146
+ return value.length >= DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH;
146
147
  }
147
148
  default:
148
149
  return false;
@@ -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
  }
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import {
18
+ MASTER_SNAPSHOT_ALIAS,
19
+ SNAPSHOT_VERSION_ALIAS,
20
+ type StoredEntity,
21
+ } from '@finos/legend-server-depot';
22
+ import { isString } from '@finos/legend-shared';
23
+ import { type Entity, extractEntityNameFromPath } from '@finos/legend-storage';
24
+
25
+ export interface ServiceInfo {
26
+ groupId: string;
27
+ artifactId: string;
28
+ versionId: string;
29
+ path: string;
30
+ name: string;
31
+ entity: Entity;
32
+ urlPattern?: string | undefined;
33
+ }
34
+
35
+ export const extractServiceInfo = (
36
+ storedEntity: StoredEntity,
37
+ ): ServiceInfo => ({
38
+ groupId: storedEntity.groupId,
39
+ artifactId: storedEntity.artifactId,
40
+ versionId:
41
+ storedEntity.versionId === MASTER_SNAPSHOT_ALIAS
42
+ ? SNAPSHOT_VERSION_ALIAS
43
+ : storedEntity.versionId,
44
+ path: storedEntity.entity.path,
45
+ name: extractEntityNameFromPath(storedEntity.entity.path),
46
+ entity: storedEntity.entity,
47
+ // NOTE: we don't want to assert the existence of this field even when it
48
+ // is required in the specification of service to avoid throwing error here
49
+ urlPattern: isString(storedEntity.entity.content.pattern)
50
+ ? storedEntity.entity.content.pattern
51
+ : undefined,
52
+ });
@@ -26,7 +26,6 @@ import {
26
26
  } from '@finos/legend-shared';
27
27
  import {
28
28
  type AbstractProperty,
29
- type PureModel,
30
29
  type Type,
31
30
  type MappingModelCoverageAnalysisResult,
32
31
  type EnumMappedProperty,
@@ -60,14 +59,7 @@ import {
60
59
  getAllSubclasses,
61
60
  } from '@finos/legend-graph';
62
61
  import type { QueryBuilderState } from '../QueryBuilderState.js';
63
- import {
64
- action,
65
- flow,
66
- flowResult,
67
- makeAutoObservable,
68
- makeObservable,
69
- observable,
70
- } from 'mobx';
62
+ import { action, flow, flowResult, makeObservable, observable } from 'mobx';
71
63
  import { DEFAULT_LAMBDA_VARIABLE_NAME } from '../QueryBuilderConfig.js';
72
64
  import {
73
65
  buildNonNumericPreviewDataQuery,
@@ -198,14 +190,17 @@ export class QueryBuilderExplorerTreeSubTypeNodeData extends QueryBuilderExplore
198
190
  }
199
191
 
200
192
  export const buildPropertyExpressionFromExplorerTreeNodeData = (
201
- treeData: TreeData<QueryBuilderExplorerTreeNodeData>,
202
193
  node: QueryBuilderExplorerTreePropertyNodeData,
203
- graph: PureModel,
204
- allMappedPropertyNodes: QueryBuilderExplorerTreeNodeData[],
194
+ explorerState: QueryBuilderExplorerState,
205
195
  ): AbstractPropertyExpression => {
206
- const multiplicityOne = graph.getTypicalMultiplicity(
207
- TYPICAL_MULTIPLICITY_TYPE.ONE,
208
- );
196
+ const treeData = explorerState.nonNullableTreeData;
197
+ const propertySearchIndexedTreeNodes =
198
+ explorerState.propertySearchState.indexedExplorerTreeNodes;
199
+
200
+ const multiplicityOne =
201
+ explorerState.queryBuilderState.graphManagerState.graph.getTypicalMultiplicity(
202
+ TYPICAL_MULTIPLICITY_TYPE.ONE,
203
+ );
209
204
  const projectionColumnLambdaVariable = new VariableExpression(
210
205
  DEFAULT_LAMBDA_VARIABLE_NAME,
211
206
  multiplicityOne,
@@ -219,13 +214,13 @@ export const buildPropertyExpressionFromExplorerTreeNodeData = (
219
214
  propertyExpression;
220
215
  let parentNode =
221
216
  treeData.nodes.get(node.parentId) ??
222
- allMappedPropertyNodes.find((n) => n.id === node.parentId);
217
+ propertySearchIndexedTreeNodes.find((n) => n.id === node.parentId);
223
218
  let currentNode: QueryBuilderExplorerTreeNodeData = node;
224
219
  while (
225
220
  parentNode instanceof QueryBuilderExplorerTreePropertyNodeData ||
226
221
  parentNode instanceof QueryBuilderExplorerTreeSubTypeNodeData
227
222
  ) {
228
- // NOTE: here, we deliverately simplify subtypes chain
223
+ // NOTE: here, we deliberately simplify subtypes chain
229
224
  // $x.employees->subType(@Person)->subType(@Staff).department will be simplified to $x.employees->subType(@Staff).department
230
225
  if (
231
226
  parentNode instanceof QueryBuilderExplorerTreeSubTypeNodeData &&
@@ -270,7 +265,7 @@ export const buildPropertyExpressionFromExplorerTreeNodeData = (
270
265
  (currentNode instanceof QueryBuilderExplorerTreePropertyNodeData ||
271
266
  currentNode instanceof QueryBuilderExplorerTreeSubTypeNodeData)
272
267
  ) {
273
- for (const propertyNode of allMappedPropertyNodes) {
268
+ for (const propertyNode of propertySearchIndexedTreeNodes) {
274
269
  if (propertyNode.id === currentNode.parentId) {
275
270
  parentNode = propertyNode;
276
271
  break;
@@ -566,8 +561,10 @@ export class QueryBuilderExplorerPreviewDataState {
566
561
  previewData?: QueryBuilderPreviewData | undefined;
567
562
 
568
563
  constructor() {
569
- makeAutoObservable(this, {
564
+ makeObservable(this, {
570
565
  previewData: observable.ref,
566
+ isGeneratingPreviewData: observable,
567
+ propertyName: observable,
571
568
  setPropertyName: action,
572
569
  setIsGeneratingPreviewData: action,
573
570
  setPreviewData: action,
@@ -588,30 +585,31 @@ export class QueryBuilderExplorerPreviewDataState {
588
585
  }
589
586
 
590
587
  export class QueryBuilderExplorerState {
591
- queryBuilderState: QueryBuilderState;
592
- previewDataState = new QueryBuilderExplorerPreviewDataState();
588
+ readonly queryBuilderState: QueryBuilderState;
589
+ readonly previewDataState = new QueryBuilderExplorerPreviewDataState();
590
+ readonly propertySearchState: QueryBuilderPropertySearchState;
593
591
  treeData?: TreeData<QueryBuilderExplorerTreeNodeData> | undefined;
594
592
  humanizePropertyName = true;
595
593
  showUnmappedProperties = false;
596
594
  highlightUsedProperties = true;
597
- propertySearchState: QueryBuilderPropertySearchState;
598
- mappingModelCoverageAnalysisResult?: MappingModelCoverageAnalysisResult;
599
595
  mappingModelCoverageAnalysisState = ActionState.create();
596
+ mappingModelCoverageAnalysisResult?: MappingModelCoverageAnalysisResult;
600
597
 
601
598
  constructor(queryBuilderState: QueryBuilderState) {
602
- makeAutoObservable(this, {
603
- queryBuilderState: false,
604
- previewDataState: false,
599
+ makeObservable(this, {
605
600
  treeData: observable.ref,
601
+ humanizePropertyName: observable,
602
+ showUnmappedProperties: observable,
606
603
  highlightUsedProperties: observable,
604
+ mappingModelCoverageAnalysisResult: observable,
607
605
  setTreeData: action,
608
606
  refreshTree: action,
609
607
  refreshTreeData: action,
610
608
  setHumanizePropertyName: action,
611
609
  setShowUnmappedProperties: action,
612
- previewData: flow,
613
610
  setHighlightUsedProperties: action,
614
611
  analyzeMappingModelCoverage: flow,
612
+ previewData: flow,
615
613
  });
616
614
 
617
615
  this.queryBuilderState = queryBuilderState;
@@ -711,10 +709,8 @@ export class QueryBuilderExplorerState {
711
709
  this.previewDataState.setPropertyName(node.property.name);
712
710
  this.previewDataState.setIsGeneratingPreviewData(true);
713
711
  const propertyExpression = buildPropertyExpressionFromExplorerTreeNodeData(
714
- this.nonNullableTreeData,
715
712
  node,
716
- this.queryBuilderState.graphManagerState.graph,
717
- this.propertySearchState.allMappedPropertyNodes,
713
+ this,
718
714
  );
719
715
  const propertyType = node.property.genericType.value.rawType;
720
716
  try {