@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
@@ -0,0 +1,222 @@
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
+ EDITOR_LANGUAGE,
19
+ EDITOR_THEME,
20
+ TAB_SIZE,
21
+ useApplicationStore,
22
+ } from '@finos/legend-application';
23
+ import { useResizeDetector } from 'react-resize-detector';
24
+ import {
25
+ baseTextEditorSettings,
26
+ clsx,
27
+ Dialog,
28
+ disableEditorHotKeys,
29
+ disposeDiffEditor,
30
+ } from '@finos/legend-art';
31
+ import { observer } from 'mobx-react-lite';
32
+ import { editor as monacoEditorAPI } from 'monaco-editor';
33
+ import { useEffect, useRef, useState } from 'react';
34
+ import {
35
+ type QueryBuilderDiffViewState,
36
+ QueryBuilderDiffViewMode,
37
+ } from '../stores/QueryBuilderChangeDetectionState.js';
38
+ import { prettyCONSTName } from '@finos/legend-shared';
39
+ import { pruneSourceInformation } from '@finos/legend-graph';
40
+
41
+ const TextDiffView = observer(
42
+ (props: {
43
+ language: EDITOR_LANGUAGE;
44
+ from?: string | undefined;
45
+ to?: string | undefined;
46
+ }) => {
47
+ const { from, to, language } = props;
48
+ const applicationStore = useApplicationStore();
49
+ const [editor, setEditor] =
50
+ useState<monacoEditorAPI.IStandaloneDiffEditor>();
51
+ const editorRef = useRef<HTMLDivElement>(null);
52
+ const originalText = from ?? '';
53
+ const modifiedText = to ?? '';
54
+
55
+ const { ref, width, height } = useResizeDetector<HTMLDivElement>();
56
+
57
+ useEffect(() => {
58
+ if (width !== undefined && height !== undefined) {
59
+ editor?.layout({ width, height });
60
+ }
61
+ }, [editor, width, height]);
62
+
63
+ useEffect(() => {
64
+ if (!editor && editorRef.current) {
65
+ const element = editorRef.current;
66
+ const _editor = monacoEditorAPI.createDiffEditor(element, {
67
+ ...baseTextEditorSettings,
68
+ theme: applicationStore.TEMPORARY__isLightThemeEnabled
69
+ ? EDITOR_THEME.TEMPORARY__VSCODE_LIGHT
70
+ : EDITOR_THEME.LEGEND,
71
+ readOnly: true,
72
+ wordWrap: 'on',
73
+ });
74
+ disableEditorHotKeys(_editor);
75
+ setEditor(_editor);
76
+ }
77
+ }, [applicationStore, editor]);
78
+
79
+ if (editor) {
80
+ const originalModel = monacoEditorAPI.createModel(originalText, language);
81
+ const modifiedModel = monacoEditorAPI.createModel(modifiedText, language);
82
+ editor.setModel({
83
+ original: originalModel,
84
+ modified: modifiedModel,
85
+ });
86
+ }
87
+
88
+ useEffect(
89
+ () => (): void => {
90
+ if (editor) {
91
+ disposeDiffEditor(editor);
92
+ }
93
+ },
94
+ [editor],
95
+ ); // dispose editor
96
+
97
+ return (
98
+ <div ref={ref} className="text-editor__container">
99
+ <div className="text-editor__body" ref={editorRef} />
100
+ </div>
101
+ );
102
+ },
103
+ );
104
+
105
+ export const QueryBuilderDiffViewPanel = observer(
106
+ (props: { diffViewState: QueryBuilderDiffViewState }) => {
107
+ const { diffViewState } = props;
108
+ const fromGrammarText = diffViewState.initialQueryGrammarText;
109
+ const toGrammarText = diffViewState.currentQueryGrammarText;
110
+
111
+ // actions
112
+ const onChangeMode =
113
+ (mode: QueryBuilderDiffViewMode): (() => void) =>
114
+ (): void => {
115
+ diffViewState.setMode(mode);
116
+ };
117
+ const close = (): void =>
118
+ diffViewState.changeDetectionState.hideDiffViewPanel();
119
+
120
+ useEffect(() => {
121
+ diffViewState.generateGrammarDiff();
122
+ }, [diffViewState]);
123
+
124
+ return (
125
+ <Dialog
126
+ open={Boolean(diffViewState)}
127
+ onClose={close}
128
+ classes={{
129
+ root: 'editor-modal__root-container',
130
+ container: 'editor-modal__container',
131
+ paper: 'editor-modal__content',
132
+ }}
133
+ >
134
+ <div
135
+ className={clsx(
136
+ 'modal modal--dark editor-modal query-builder-text-mode__modal',
137
+ )}
138
+ >
139
+ <div className="query-builder__diff-panel">
140
+ <div className="query-builder__diff-panel__header">
141
+ {Object.values(QueryBuilderDiffViewMode).map((mode) => (
142
+ <button
143
+ onClick={onChangeMode(mode)}
144
+ className={clsx('query-builder__diff-panel__mode', {
145
+ 'query-builder__diff-panel__mode--selected':
146
+ mode === diffViewState.mode,
147
+ })}
148
+ key={mode}
149
+ >
150
+ {prettyCONSTName(mode)}
151
+ </button>
152
+ ))}
153
+ </div>
154
+ <div className="query-builder__diff-panel__content">
155
+ {diffViewState.mode === QueryBuilderDiffViewMode.GRAMMAR && (
156
+ <TextDiffView
157
+ language={EDITOR_LANGUAGE.PURE}
158
+ from={fromGrammarText}
159
+ to={toGrammarText}
160
+ />
161
+ )}
162
+ {diffViewState.mode === QueryBuilderDiffViewMode.JSON && (
163
+ <TextDiffView
164
+ language={EDITOR_LANGUAGE.JSON}
165
+ from={JSON.stringify(
166
+ {
167
+ parameters: diffViewState.initialQuery.parameters
168
+ ? pruneSourceInformation(
169
+ diffViewState.initialQuery.parameters as Record<
170
+ PropertyKey,
171
+ unknown
172
+ >,
173
+ )
174
+ : undefined,
175
+ body: diffViewState.initialQuery.body
176
+ ? pruneSourceInformation(
177
+ diffViewState.initialQuery.body as Record<
178
+ PropertyKey,
179
+ unknown
180
+ >,
181
+ )
182
+ : undefined,
183
+ },
184
+ null,
185
+ TAB_SIZE,
186
+ )}
187
+ to={JSON.stringify(
188
+ {
189
+ parameters: diffViewState.currentQuery.parameters
190
+ ? pruneSourceInformation(
191
+ diffViewState.currentQuery.parameters as Record<
192
+ PropertyKey,
193
+ unknown
194
+ >,
195
+ )
196
+ : undefined,
197
+ body: diffViewState.currentQuery.body
198
+ ? pruneSourceInformation(
199
+ diffViewState.currentQuery.body as Record<
200
+ PropertyKey,
201
+ unknown
202
+ >,
203
+ )
204
+ : undefined,
205
+ },
206
+ null,
207
+ TAB_SIZE,
208
+ )}
209
+ />
210
+ )}
211
+ </div>
212
+ <div className="query-builder__diff-panel__actions">
213
+ <button className="btn btn--dark" onClick={close}>
214
+ Close
215
+ </button>
216
+ </div>
217
+ </div>
218
+ </div>
219
+ </Dialog>
220
+ );
221
+ },
222
+ );
@@ -131,13 +131,13 @@ const VariableExpressionEditor = observer(
131
131
  if (
132
132
  value === MULTIPLICITY_INFINITE ||
133
133
  value === '' ||
134
- !isNaN(parseInt(value))
134
+ !isNaN(parseInt(value, 10))
135
135
  ) {
136
136
  lambdaParameterState.changeMultiplicity(
137
137
  multiplity.lowerBound,
138
138
  value === MULTIPLICITY_INFINITE || value === ''
139
139
  ? undefined
140
- : parseInt(value),
140
+ : parseInt(value, 10),
141
141
  );
142
142
  setUppBound(value);
143
143
  }
@@ -26,6 +26,8 @@ import {
26
26
  ContextMenu,
27
27
  clsx,
28
28
  PauseCircleIcon,
29
+ ExclamationTriangleIcon,
30
+ PanelContent,
29
31
  } from '@finos/legend-art';
30
32
  import { observer } from 'mobx-react-lite';
31
33
  import { flowResult } from 'mobx';
@@ -325,7 +327,9 @@ const QueryBuilderGridResult = observer(
325
327
  ) : null
326
328
  }
327
329
  disabled={
328
- !(fetchStructureImplementation instanceof QueryBuilderProjectionState)
330
+ !(
331
+ fetchStructureImplementation instanceof QueryBuilderProjectionState
332
+ ) || !queryBuilderState.isQuerySupported
329
333
  }
330
334
  menuProps={{ elevation: 7 }}
331
335
  key={executionResult._UUID}
@@ -374,20 +378,18 @@ const QueryBuilderResultValues = observer(
374
378
  isReadOnly={true}
375
379
  />
376
380
  );
377
- } else {
378
- const executionResultString = JSON.stringify(
379
- extractExecutionResultValues(executionResult),
380
- null,
381
- TAB_SIZE,
382
- );
383
- return (
384
- <TextInputEditor
385
- language={EDITOR_LANGUAGE.JSON}
386
- inputValue={executionResultString}
387
- isReadOnly={true}
388
- />
389
- );
390
381
  }
382
+ return (
383
+ <TextInputEditor
384
+ language={EDITOR_LANGUAGE.JSON}
385
+ inputValue={JSON.stringify(
386
+ extractExecutionResultValues(executionResult),
387
+ null,
388
+ TAB_SIZE,
389
+ )}
390
+ isReadOnly={true}
391
+ />
392
+ );
391
393
  },
392
394
  );
393
395
 
@@ -475,10 +477,12 @@ export const QueryBuilderResultPanel = observer(
475
477
  };
476
478
  const allowSettingPreviewLimit = queryBuilderState.isQuerySupported;
477
479
  const resultSetSize = (result: ExecutionResult | undefined): string =>
478
- result && result instanceof TdsExecutionResult
479
- ? `${
480
- result.result.rows.length
481
- } row(s) in ${resultState.executionDuration?.toString()} ms`
480
+ result
481
+ ? result instanceof TdsExecutionResult
482
+ ? `${
483
+ result.result.rows.length
484
+ } row(s) in ${resultState.executionDuration?.toString()} ms`
485
+ : `run in ${resultState.executionDuration?.toString()} ms`
482
486
  : '';
483
487
 
484
488
  return (
@@ -489,6 +493,16 @@ export const QueryBuilderResultPanel = observer(
489
493
  <div className="query-builder__result__analytics">
490
494
  {resultSetSize(executionResult)}
491
495
  </div>
496
+ {executionResult && resultState.checkForStaleResults && (
497
+ <div className="query-builder__result__stale-status">
498
+ <div className="query-builder__result__stale-status__icon">
499
+ <ExclamationTriangleIcon />
500
+ </div>
501
+ <div className="query-builder__result__stale-status__label">
502
+ Preview data might be stale
503
+ </div>
504
+ </div>
505
+ )}
492
506
  </div>
493
507
  <div className="panel__header__actions query-builder__result__header__actions">
494
508
  {allowSettingPreviewLimit && (
@@ -609,7 +623,7 @@ export const QueryBuilderResultPanel = observer(
609
623
  </DropdownMenu>
610
624
  </div>
611
625
  </div>
612
- <div className="panel__content">
626
+ <PanelContent>
613
627
  <PanelLoadingIndicator
614
628
  isLoading={
615
629
  resultState.isRunningQuery ||
@@ -630,7 +644,7 @@ export const QueryBuilderResultPanel = observer(
630
644
  />
631
645
  </div>
632
646
  )}
633
- </div>
647
+ </PanelContent>
634
648
  <ExecutionPlanViewer
635
649
  executionPlanState={resultState.executionPlanState}
636
650
  />
@@ -49,7 +49,7 @@ import {
49
49
  buildElementOption,
50
50
  useApplicationStore,
51
51
  } from '@finos/legend-application';
52
- import { MilestoningParametersEditor } from './explorer/QueryBuilderMilestoneEditor.js';
52
+ import { MilestoningParametersEditor } from './explorer/QueryBuilderMilestoningEditor.js';
53
53
 
54
54
  const getParameterValue = (
55
55
  parameter: ValueSpecification | undefined,
@@ -22,6 +22,9 @@ import {
22
22
  ResizablePanelGroup,
23
23
  ResizablePanel,
24
24
  ResizablePanelSplitter,
25
+ Panel,
26
+ PanelContent,
27
+ PanelHeader,
25
28
  } from '@finos/legend-art';
26
29
  import { QueryBuilderSidebar } from './QueryBuilderSideBar.js';
27
30
  import { QueryBuilderParametersPanel } from './QueryBuilderParametersPanel.js';
@@ -39,13 +42,9 @@ const QueryBuilderUnsupportedQueryEditPanel = observer(
39
42
  QueryBuilderTextEditorMode.TEXT,
40
43
  );
41
44
  return (
42
- <div className="panel">
43
- <div className="panel__header">
44
- <div className="panel__header__title">
45
- <div className="panel__header__title__label">content</div>
46
- </div>
47
- </div>
48
- <div className="panel__content">
45
+ <Panel>
46
+ <PanelHeader title="content" />
47
+ <PanelContent>
49
48
  <BlankPanelContent>
50
49
  <div className="query-builder__unsupported-view__main">
51
50
  <div className="query-builder__unsupported-view__summary">{`Can't display query in form mode${errorMessage}`}</div>
@@ -57,8 +56,8 @@ const QueryBuilderUnsupportedQueryEditPanel = observer(
57
56
  </button>
58
57
  </div>
59
58
  </BlankPanelContent>
60
- </div>
61
- </div>
59
+ </PanelContent>
60
+ </Panel>
62
61
  );
63
62
  },
64
63
  );
@@ -0,0 +1,23 @@
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 type { LightQuery } from '@finos/legend-graph';
18
+
19
+ export type QueryOption = { label: string; value: LightQuery };
20
+ export const buildQueryOption = (query: LightQuery): QueryOption => ({
21
+ label: query.name,
22
+ value: query,
23
+ });
@@ -0,0 +1,54 @@
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 { generateGAVCoordinates } from '@finos/legend-storage';
18
+ import type { ServiceInfo } from '../stores/ServiceInfo.js';
19
+
20
+ export type ServiceOption = { label: string; value: ServiceInfo };
21
+ export const buildServiceOption = (value: ServiceInfo): ServiceOption => ({
22
+ label: value.name,
23
+ value,
24
+ });
25
+
26
+ export const formatServiceOptionLabel = (
27
+ option: ServiceOption,
28
+ ): React.ReactNode => (
29
+ <div
30
+ className="query-setup__service-option"
31
+ title={`${option.label} - ${option.value.urlPattern ?? ''} - ${
32
+ option.value.path
33
+ } - ${generateGAVCoordinates(
34
+ option.value.groupId,
35
+ option.value.artifactId,
36
+ option.value.versionId,
37
+ )}`}
38
+ >
39
+ <div className="query-setup__service-option__label">{option.label}</div>
40
+ <div className="query-setup__service-option__path">{option.value.path}</div>
41
+ <div className="query-setup__service-option__pattern">
42
+ {option.value.urlPattern ?? 'no pattern'}
43
+ </div>
44
+ <div className="query-setup__service-option__gav">
45
+ {option.value.groupId && option.value.artifactId
46
+ ? generateGAVCoordinates(
47
+ option.value.groupId,
48
+ option.value.artifactId,
49
+ option.value.versionId,
50
+ )
51
+ : null}
52
+ </div>
53
+ </div>
54
+ );
@@ -264,9 +264,6 @@ const QueryBuilderExplorerContextMenu = observer(
264
264
  }
265
265
  >(function QueryBuilderExplorerContextMenu(props, ref) {
266
266
  const { queryBuilderState, openNode, node } = props;
267
- const applicationStore = useApplicationStore();
268
- const viewType = (): void =>
269
- applicationStore.notifyUnsupportedFeature('View Type');
270
267
  const addNodeToFetchStructure = (): void =>
271
268
  queryBuilderState.fetchStructureState.fetchProperty(node);
272
269
  const addNodeChildrenToFetchStructure = (): void => {
@@ -305,7 +302,6 @@ const QueryBuilderExplorerContextMenu = observer(
305
302
  Add Properties to Fetch Structure
306
303
  </MenuContentItem>
307
304
  )}
308
- <MenuContentItem onClick={viewType}>View Type</MenuContentItem>
309
305
  </MenuContent>
310
306
  );
311
307
  }),
@@ -411,10 +407,6 @@ const QueryBuilderExplorerTreeNodeContainer = observer(
411
407
  }
412
408
  };
413
409
  // context menu
414
- const showContextMenu =
415
- node instanceof QueryBuilderExplorerTreeRootNodeData ||
416
- (node instanceof QueryBuilderExplorerTreePropertyNodeData &&
417
- !(node.type instanceof PrimitiveType));
418
410
  const onContextMenuOpen = (): void => setIsSelectedFromContextMenu(true);
419
411
  const onContextMenuClose = (): void => setIsSelectedFromContextMenu(false);
420
412
  const previewData = (): void => {
@@ -442,7 +434,10 @@ const QueryBuilderExplorerTreeNodeContainer = observer(
442
434
  node={node}
443
435
  />
444
436
  }
445
- disabled={!showContextMenu || queryBuilderState.backdrop}
437
+ disabled={
438
+ !(node instanceof QueryBuilderExplorerTreePropertyNodeData) ||
439
+ queryBuilderState.backdrop
440
+ }
446
441
  menuProps={{ elevation: 7 }}
447
442
  onOpen={onContextMenuOpen}
448
443
  onClose={onContextMenuClose}
@@ -789,9 +784,7 @@ export const QueryBuilderExplorerPanel = observer(
789
784
  if (explorerState.treeData) {
790
785
  if (!propertySearchPanelState.isSearchPanelOpen) {
791
786
  propertySearchPanelState.setIsSearchPanelOpen(true);
792
- if (!propertySearchPanelState.allMappedPropertyNodes.length) {
793
- propertySearchPanelState.fetchAllPropertyNodes();
794
- }
787
+ propertySearchPanelState.initialize();
795
788
  } else {
796
789
  propertySearchPanelState.setIsSearchPanelOpen(false);
797
790
  }
@@ -56,6 +56,8 @@ import {
56
56
  Package,
57
57
  ROOT_PACKAGE_NAME,
58
58
  getMultiplicityDescription,
59
+ CORE_PURE_PATH,
60
+ PURE_DOC_TAG,
59
61
  } from '@finos/legend-graph';
60
62
  import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
61
63
 
@@ -71,6 +73,15 @@ const QueryBuilderFunctionInfoTooltip: React.FC<{
71
73
  placement?: TooltipPlacement | undefined;
72
74
  }> = (props) => {
73
75
  const { element, children, placement } = props;
76
+ const documentation = element.taggedValues
77
+ .filter(
78
+ (taggedValue) =>
79
+ taggedValue.tag.ownerReference.value.path ===
80
+ CORE_PURE_PATH.PROFILE_DOC &&
81
+ taggedValue.tag.value.value === PURE_DOC_TAG,
82
+ )
83
+ .map((taggedValue) => taggedValue.value);
84
+
74
85
  return (
75
86
  <Tooltip
76
87
  arrow={true}
@@ -100,25 +111,24 @@ const QueryBuilderFunctionInfoTooltip: React.FC<{
100
111
  <div className="query-builder__tooltip__item__value">
101
112
  {element.parameters
102
113
  .map(
103
- (t) =>
104
- `${t.name}: ${
105
- t.type.value.name
106
- }${getMultiplicityDescription(t.multiplicity)}`,
114
+ (param) =>
115
+ `${param.name}: ${
116
+ param.type.value.name
117
+ }${getMultiplicityDescription(param.multiplicity)}`,
107
118
  )
108
119
  .join('; ')}
109
120
  </div>
110
121
  </div>
111
- <div className="query-builder__tooltip__item">
112
- <div className="query-builder__tooltip__item__label">
113
- Documentation
114
- </div>
115
- <div className="query-builder__tooltip__item__value">
116
- {element.taggedValues
117
- .filter((t) => t.tag.value._OWNER.name === 'doc')
118
- .map((t) => t.value)
119
- .join('; ')}
122
+ {Boolean(documentation.length) && (
123
+ <div className="query-builder__tooltip__item">
124
+ <div className="query-builder__tooltip__item__label">
125
+ Documentation
126
+ </div>
127
+ <div className="query-builder__tooltip__item__value">
128
+ {documentation.join('\n\n')}
129
+ </div>
120
130
  </div>
121
- </div>
131
+ )}
122
132
  <div className="query-builder__tooltip__item">
123
133
  <div className="query-builder__tooltip__item__label">
124
134
  Return Type
@@ -145,7 +145,7 @@ const MilestoningParameterEditor = observer(
145
145
  },
146
146
  );
147
147
 
148
- const BiTemporalMilestoneEditor = observer(
148
+ const BiTemporalMilestoningEditor = observer(
149
149
  (props: { queryBuilderState: QueryBuilderState }) => {
150
150
  const { queryBuilderState } = props;
151
151
  return (
@@ -173,7 +173,7 @@ const BiTemporalMilestoneEditor = observer(
173
173
  },
174
174
  );
175
175
 
176
- const BusinessTemporalMilestoneEditor = observer(
176
+ const BusinessTemporalMilestoningEditor = observer(
177
177
  (props: { queryBuilderState: QueryBuilderState }) => {
178
178
  const { queryBuilderState } = props;
179
179
  return (
@@ -191,7 +191,7 @@ const BusinessTemporalMilestoneEditor = observer(
191
191
  },
192
192
  );
193
193
 
194
- const ProcessingTemporalMilestoneEditor = observer(
194
+ const ProcessingTemporalMilestoningEditor = observer(
195
195
  (props: { queryBuilderState: QueryBuilderState }) => {
196
196
  const { queryBuilderState } = props;
197
197
  return (
@@ -209,7 +209,7 @@ const ProcessingTemporalMilestoneEditor = observer(
209
209
  },
210
210
  );
211
211
 
212
- const TemporalMilestoneEditor: React.FC<{
212
+ const TemporalMilestoningEditor: React.FC<{
213
213
  queryBuilderState: QueryBuilderState;
214
214
  }> = (props) => {
215
215
  const { queryBuilderState } = props;
@@ -218,14 +218,18 @@ const TemporalMilestoneEditor: React.FC<{
218
218
  queryBuilderState.milestoningState.processingDate &&
219
219
  queryBuilderState.milestoningState.businessDate
220
220
  ) {
221
- return <BiTemporalMilestoneEditor queryBuilderState={queryBuilderState} />;
221
+ return (
222
+ <BiTemporalMilestoningEditor queryBuilderState={queryBuilderState} />
223
+ );
222
224
  } else if (queryBuilderState.milestoningState.businessDate) {
223
225
  return (
224
- <BusinessTemporalMilestoneEditor queryBuilderState={queryBuilderState} />
226
+ <BusinessTemporalMilestoningEditor
227
+ queryBuilderState={queryBuilderState}
228
+ />
225
229
  );
226
230
  } else if (queryBuilderState.milestoningState.processingDate) {
227
231
  return (
228
- <ProcessingTemporalMilestoneEditor
232
+ <ProcessingTemporalMilestoningEditor
229
233
  queryBuilderState={queryBuilderState}
230
234
  />
231
235
  );
@@ -256,7 +260,7 @@ export const MilestoningParametersEditor = observer(
256
260
  <div className="modal__title">Milestoning Parameters</div>
257
261
  </div>
258
262
  <div className="modal__body query-builder__parameters__modal__body">
259
- <TemporalMilestoneEditor queryBuilderState={queryBuilderState} />
263
+ <TemporalMilestoningEditor queryBuilderState={queryBuilderState} />
260
264
  <div className="panel__content__form__section__header__label">
261
265
  List of compatible milestoning parameters
262
266
  </div>