@finos/legend-query-builder 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. package/lib/components/QueryBuilder.d.ts +0 -1
  2. package/lib/components/QueryBuilder.d.ts.map +1 -1
  3. package/lib/components/QueryBuilder.js +42 -9
  4. package/lib/components/QueryBuilder.js.map +1 -1
  5. package/lib/components/QueryBuilderComponentTestUtils.d.ts.map +1 -1
  6. package/lib/components/QueryBuilderComponentTestUtils.js +2 -5
  7. package/lib/components/QueryBuilderComponentTestUtils.js.map +1 -1
  8. package/lib/components/QueryBuilderDiffPanel.d.ts +0 -1
  9. package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
  10. package/lib/components/QueryBuilderDiffPanel.js +2 -2
  11. package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
  12. package/lib/components/QueryBuilderParametersPanel.d.ts +0 -1
  13. package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
  14. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +0 -1
  15. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
  16. package/lib/components/QueryBuilderResultPanel.d.ts +0 -1
  17. package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
  18. package/lib/components/QueryBuilderResultPanel.js +3 -3
  19. package/lib/components/QueryBuilderSideBar.d.ts +0 -1
  20. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  21. package/lib/components/QueryBuilderSideBar.js +2 -1
  22. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  23. package/lib/components/QueryBuilderTextEditor.d.ts +0 -1
  24. package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
  25. package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +0 -1
  26. package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -1
  27. package/lib/components/QueryBuilder_TestID.d.ts +1 -0
  28. package/lib/components/QueryBuilder_TestID.d.ts.map +1 -1
  29. package/lib/components/QueryBuilder_TestID.js +1 -0
  30. package/lib/components/QueryBuilder_TestID.js.map +1 -1
  31. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +0 -1
  32. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
  33. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts +0 -1
  34. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
  35. package/lib/components/explorer/QueryBuilderMilestoningEditor.js +2 -2
  36. package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
  37. package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +0 -1
  38. package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
  39. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +0 -1
  40. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
  41. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +0 -1
  42. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
  43. package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.d.ts +22 -0
  44. package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.d.ts.map +1 -0
  45. package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.js +363 -0
  46. package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.js.map +1 -0
  47. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +0 -1
  48. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  49. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +21 -53
  50. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  51. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts +22 -0
  52. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts.map +1 -0
  53. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +32 -0
  54. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -0
  55. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +0 -1
  56. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  57. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +2 -1
  58. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  59. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.d.ts +27 -0
  60. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.d.ts.map +1 -0
  61. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js +61 -0
  62. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js.map +1 -0
  63. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +0 -1
  64. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  65. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +4 -13
  66. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  67. package/lib/components/filter/QueryBuilderFilterPanel.d.ts +0 -1
  68. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  69. package/lib/components/shared/LambdaEditor.d.ts +0 -1
  70. package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
  71. package/lib/components/shared/LambdaEditor.js +23 -7
  72. package/lib/components/shared/LambdaEditor.js.map +1 -1
  73. package/lib/components/shared/LambdaParameterValuesEditor.d.ts +0 -1
  74. package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -1
  75. package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -1
  76. package/lib/components/workflows/ServiceQueryBuilder.js +5 -1
  77. package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
  78. package/lib/graphManager/QueryBuilderHashUtils.d.ts +14 -0
  79. package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -1
  80. package/lib/graphManager/QueryBuilderHashUtils.js +15 -0
  81. package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -1
  82. package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts +7 -1
  83. package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts.map +1 -1
  84. package/lib/graphManager/QueryBuilderSupportedFunctions.js +7 -0
  85. package/lib/graphManager/QueryBuilderSupportedFunctions.js.map +1 -1
  86. package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts.map +1 -1
  87. package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js +4 -1
  88. package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -1
  89. package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts +1 -0
  90. package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -1
  91. package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js +50 -0
  92. package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js.map +1 -1
  93. package/lib/index.css +2 -2
  94. package/lib/index.css.map +1 -1
  95. package/lib/package.json +6 -6
  96. package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
  97. package/lib/stores/QueryBuilderStateBuilder.js +7 -1
  98. package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
  99. package/lib/stores/QueryBuilderStateTestUtils.d.ts.map +1 -1
  100. package/lib/stores/QueryBuilderStateTestUtils.js +2 -4
  101. package/lib/stores/QueryBuilderStateTestUtils.js.map +1 -1
  102. package/lib/stores/QueryBuilderTypeaheadHelper.js +2 -2
  103. package/lib/stores/explorer/QueryBuilderExplorerState.js +3 -3
  104. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +1 -0
  105. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
  106. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +3 -0
  107. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
  108. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
  109. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +2 -1
  110. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
  111. package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.d.ts +24 -0
  112. package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.d.ts.map +1 -0
  113. package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.js +20 -0
  114. package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.js.map +1 -0
  115. package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.d.ts +23 -0
  116. package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.d.ts.map +1 -0
  117. package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.js +41 -0
  118. package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.js.map +1 -0
  119. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +11 -0
  120. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
  121. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +44 -1
  122. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  123. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts +2 -2
  124. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts.map +1 -1
  125. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js +2 -2
  126. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js.map +1 -1
  127. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.js +1 -1
  128. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts +4 -4
  129. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts.map +1 -1
  130. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js +8 -7
  131. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js.map +1 -1
  132. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.d.ts +18 -0
  133. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.d.ts.map +1 -0
  134. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.js +36 -0
  135. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.js.map +1 -0
  136. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.d.ts +91 -0
  137. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.d.ts.map +1 -0
  138. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.js +272 -0
  139. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.js.map +1 -0
  140. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.d.ts +19 -0
  141. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.d.ts.map +1 -0
  142. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.js +100 -0
  143. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.js.map +1 -0
  144. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.d.ts +19 -0
  145. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.d.ts.map +1 -0
  146. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.js +83 -0
  147. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.js.map +1 -0
  148. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.d.ts +29 -0
  149. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.d.ts.map +1 -0
  150. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.js +30 -0
  151. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.js.map +1 -0
  152. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.d.ts +25 -0
  153. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.d.ts.map +1 -0
  154. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.js +50 -0
  155. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.js.map +1 -0
  156. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.d.ts +25 -0
  157. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.d.ts.map +1 -0
  158. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.js +51 -0
  159. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.js.map +1 -0
  160. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.d.ts +25 -0
  161. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.d.ts.map +1 -0
  162. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.js +50 -0
  163. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.js.map +1 -0
  164. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.d.ts +25 -0
  165. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.d.ts.map +1 -0
  166. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.js +50 -0
  167. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.js.map +1 -0
  168. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.d.ts +25 -0
  169. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.d.ts.map +1 -0
  170. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.js +51 -0
  171. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.js.map +1 -0
  172. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.d.ts +24 -0
  173. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.d.ts.map +1 -0
  174. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.js +48 -0
  175. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.js.map +1 -0
  176. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.d.ts +24 -0
  177. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.d.ts.map +1 -0
  178. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.js +48 -0
  179. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.js.map +1 -0
  180. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.d.ts +24 -0
  181. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.d.ts.map +1 -0
  182. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.js +48 -0
  183. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.js.map +1 -0
  184. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.d.ts +24 -0
  185. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.d.ts.map +1 -0
  186. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.js +48 -0
  187. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.js.map +1 -0
  188. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.d.ts +1 -1
  189. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.js +2 -2
  190. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +6 -4
  191. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
  192. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +14 -3
  193. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
  194. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.d.ts.map +1 -1
  195. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js +8 -11
  196. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -1
  197. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts +2 -2
  198. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts.map +1 -1
  199. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +5 -1
  200. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
  201. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js +4 -4
  202. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +1 -1
  203. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +1 -1
  204. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +3 -3
  205. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +3 -3
  206. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +1 -1
  207. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js +2 -2
  208. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts +2 -2
  209. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +3 -3
  210. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +3 -3
  211. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +1 -1
  212. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +1 -1
  213. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts +4 -6
  214. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
  215. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js +6 -5
  216. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js.map +1 -1
  217. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
  218. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +1 -0
  219. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
  220. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
  221. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +6 -3
  222. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
  223. package/lib/stores/filter/QueryBuilderFilterState.d.ts +2 -0
  224. package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
  225. package/lib/stores/filter/QueryBuilderFilterState.js +6 -0
  226. package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
  227. package/package.json +13 -13
  228. package/src/components/QueryBuilder.tsx +110 -35
  229. package/src/components/QueryBuilderComponentTestUtils.tsx +9 -11
  230. package/src/components/QueryBuilderDiffPanel.tsx +2 -2
  231. package/src/components/QueryBuilderResultPanel.tsx +4 -4
  232. package/src/components/QueryBuilderSideBar.tsx +4 -1
  233. package/src/components/QueryBuilder_TestID.ts +1 -0
  234. package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +2 -3
  235. package/src/components/fetch-structure/QueryBuilderOlapGroupByPanel.tsx +1140 -0
  236. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +31 -106
  237. package/src/components/fetch-structure/QueryBuilderPostTDSPanel.tsx +69 -0
  238. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +4 -1
  239. package/src/components/fetch-structure/QueryBuilderTDSComponentHelper.tsx +118 -0
  240. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +4 -23
  241. package/src/components/shared/LambdaEditor.tsx +25 -22
  242. package/src/components/workflows/ServiceQueryBuilder.tsx +10 -2
  243. package/src/graphManager/QueryBuilderHashUtils.ts +16 -0
  244. package/src/graphManager/QueryBuilderSupportedFunctions.ts +7 -0
  245. package/src/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +14 -0
  246. package/src/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts +129 -0
  247. package/src/stores/QueryBuilderStateBuilder.ts +14 -1
  248. package/src/stores/QueryBuilderStateTestUtils.ts +9 -13
  249. package/src/stores/QueryBuilderTypeaheadHelper.ts +2 -2
  250. package/src/stores/explorer/QueryBuilderExplorerState.ts +3 -3
  251. package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +4 -0
  252. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +2 -1
  253. package/src/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.ts +28 -0
  254. package/src/stores/fetch-structure/tds/QueryBuilderTDSHelper.ts +79 -0
  255. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +68 -1
  256. package/src/stores/fetch-structure/tds/QueryResultSetModifierState.ts +2 -2
  257. package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.ts +1 -1
  258. package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.ts +11 -9
  259. package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.ts +39 -0
  260. package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.ts +377 -0
  261. package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.ts +237 -0
  262. package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.ts +148 -0
  263. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.ts +43 -0
  264. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.ts +56 -0
  265. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.ts +57 -0
  266. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.ts +56 -0
  267. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.ts +56 -0
  268. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.ts +57 -0
  269. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.ts +54 -0
  270. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.ts +54 -0
  271. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.ts +54 -0
  272. package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.ts +54 -0
  273. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.ts +2 -2
  274. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +22 -10
  275. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.ts +11 -19
  276. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +8 -7
  277. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.ts +4 -4
  278. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +1 -1
  279. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +1 -1
  280. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +3 -3
  281. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +3 -3
  282. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +1 -1
  283. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +2 -2
  284. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +3 -3
  285. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +3 -3
  286. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +1 -1
  287. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +1 -1
  288. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.ts +9 -11
  289. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +1 -0
  290. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +8 -4
  291. package/src/stores/filter/QueryBuilderFilterState.ts +7 -0
  292. package/tsconfig.json +19 -0
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilderGraphFetchTreePanel.d.ts","sourceRoot":"","sources":["../../../src/components/fetch-structure/QueryBuilderGraphFetchTreePanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAoBH,OAAO,EACL,KAAK,8BAA8B,EAIpC,MAAM,4EAA4E,CAAC;AAKpF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,6EAA6E,CAAC;AA4FnI,eAAO,MAAM,kCAAkC;qBAE1B,+BAA+B;cACtC,8BAA8B;2BACjB,8BAA8B,KAAK,IAAI;gBAClD,OAAO;;;CAkEtB,CAAC;AAEF,eAAO,MAAM,+BAA+B,WAClC;IAAE,mBAAmB,EAAE,+BAA+B,CAAA;CAAE;;CAiEjE,CAAC"}
1
+ {"version":3,"file":"QueryBuilderGraphFetchTreePanel.d.ts","sourceRoot":"","sources":["../../../src/components/fetch-structure/QueryBuilderGraphFetchTreePanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAoBH,OAAO,EACL,KAAK,8BAA8B,EAIpC,MAAM,4EAA4E,CAAC;AAKpF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,6EAA6E,CAAC;AA4FnI,eAAO,MAAM,kCAAkC;qBAE1B,+BAA+B;cACtC,8BAA8B;2BACjB,8BAA8B,KAAK,IAAI;gBAClD,OAAO;;;CAkEtB,CAAC;AAEF,eAAO,MAAM,+BAA+B,WAClC;IAAE,mBAAmB,EAAE,+BAA+B,CAAA;CAAE;;CAiEjE,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { type QueryBuilderOlapGroupByState } from '../../stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.js';
17
+ export declare const QueryBuilderOlapGroupByPanel: ((props: {
18
+ olapGroupByState: QueryBuilderOlapGroupByState;
19
+ }) => JSX.Element) & {
20
+ displayName: string;
21
+ };
22
+ //# sourceMappingURL=QueryBuilderOlapGroupByPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderOlapGroupByPanel.d.ts","sourceRoot":"","sources":["../../../src/components/fetch-structure/QueryBuilderOlapGroupByPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgCH,OAAO,EACL,KAAK,4BAA4B,EAOlC,MAAM,8EAA8E,CAAC;AA48BtF,eAAO,MAAM,4BAA4B,WAC/B;IAAE,gBAAgB,EAAE,4BAA4B,CAAA;CAAE;;CAgH3D,CAAC"}
@@ -0,0 +1,363 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2020-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { useApplicationStore } from '@finos/legend-application';
18
+ import { PlusIcon, PanelContent, PanelDropZone, BlankPanelPlaceholder, DropdownMenu, InputWithInlineValidation, MenuContent, MenuContentItem, SigmaIcon, CaretDownIcon, clsx, PanelEntryDropZonePlaceholder, ContextMenu, VerticalDragHandleIcon, TimesIcon, useDragPreviewLayer, SortIcon, Dialog, CustomSelectorInput, WindowIcon, BasePopover, EditIcon, } from '@finos/legend-art';
19
+ import { assertErrorThrown, guaranteeNonNullable } from '@finos/legend-shared';
20
+ import { observer } from 'mobx-react-lite';
21
+ import { forwardRef, useCallback, useRef, useState } from 'react';
22
+ import { useDrag, useDrop } from 'react-dnd';
23
+ import { QueryBuilderOlapGroupByColumnState, QueryBuilderTDSOlapRankOperatorState, QueryBuilderTDSOlapAggreationOperatorState, QUERY_BUILDER_OLAP_COLUMN_DND_TYPE, } from '../../stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.js';
24
+ import { QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE } from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
25
+ import { COLUMN_SORT_TYPE } from '../../stores/fetch-structure/tds/QueryResultSetModifierState.js';
26
+ import { QUERY_BUILDER_TEST_ID } from '../QueryBuilder_TestID.js';
27
+ // helpers
28
+ const createOlapColumnState = (columnState, tdsState) => {
29
+ const operator = tdsState.olapGroupByState.operators.filter((o) => o.isColumnAggregator() &&
30
+ o.isCompatibleWithType(columnState.getColumnType()))[0];
31
+ const nonColoperator = guaranteeNonNullable(tdsState.olapGroupByState.operators.filter((o) => !o.isColumnAggregator())[0]);
32
+ if (operator) {
33
+ const opState = new QueryBuilderTDSOlapAggreationOperatorState(tdsState.olapGroupByState, operator, columnState);
34
+ return new QueryBuilderOlapGroupByColumnState(tdsState.olapGroupByState, [], undefined, opState, `${operator.getLabel()} ${columnState.columnName}`);
35
+ }
36
+ else {
37
+ return new QueryBuilderOlapGroupByColumnState(tdsState.olapGroupByState, [columnState], undefined, new QueryBuilderTDSOlapRankOperatorState(tdsState.olapGroupByState, nonColoperator), `${nonColoperator.getLabel()} ${columnState.columnName}`);
38
+ }
39
+ };
40
+ const QueryBuilderOlapGroupByColumnContextMenu = observer(forwardRef(function QueryBuilderOlapGroupByColumnContextMenu(props, ref) {
41
+ const { columnState } = props;
42
+ const editColumn = () => columnState.olapState.setEditColumn(columnState);
43
+ const removeColumn = () => columnState.olapState.removeColumn(columnState);
44
+ return (_jsxs(MenuContent, { ref: ref, children: [_jsx(MenuContentItem, { onClick: editColumn, children: "Open Editor" }), _jsx(MenuContentItem, { onClick: removeColumn, children: "Remove" })] }));
45
+ }));
46
+ const TDSColumnSelectorEditor = observer((props) => {
47
+ const { tdsColOptions, colValue, setColumn, deleteColumn } = props;
48
+ const applicationStore = useApplicationStore();
49
+ const options = tdsColOptions.map((col) => ({
50
+ label: col.columnName,
51
+ value: col,
52
+ }));
53
+ const value = {
54
+ label: colValue.columnName,
55
+ value: colValue,
56
+ };
57
+ const onChange = (val) => {
58
+ if (val !== null) {
59
+ setColumn(val.value);
60
+ }
61
+ };
62
+ const removeColumn = () => deleteColumn(colValue);
63
+ return (_jsxs("div", { className: "panel__content__form__section__list__item query-builder__projection__options__sort", children: [_jsx(CustomSelectorInput, { className: "query-builder__projection__options__sort__dropdown", options: options, disabled: options.length < 1, onChange: onChange, value: value, darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled }), _jsx("button", { className: "query-builder__olap__tds__column__remove-btn btn--dark btn--caution", onClick: removeColumn, tabIndex: -1, title: "Remove", children: _jsx(TimesIcon, {}) })] }));
64
+ });
65
+ const QueryBuilderOlapColumnModalEditor = observer((props) => {
66
+ const { olapGroupByState, olapColumnState } = props;
67
+ const createNewOlap = !olapGroupByState.olapColumns.includes(olapColumnState);
68
+ const tdsState = olapGroupByState.tdsState;
69
+ const applicationStore = useApplicationStore();
70
+ const close = () => {
71
+ olapGroupByState.setEditColumn(undefined);
72
+ };
73
+ const isDuplicatedColumnName = createNewOlap
74
+ ? olapGroupByState.tdsState.tdsColumns
75
+ .map((c) => c.columnName)
76
+ .includes(olapColumnState.columnName)
77
+ : olapGroupByState.tdsState.isDuplicateColumn(olapColumnState);
78
+ const windowOptions = createNewOlap
79
+ ? tdsState.tdsColumns
80
+ : olapColumnState.possibleReferencedColumns;
81
+ const windowOptionsLabels = windowOptions.map((w) => ({
82
+ label: w.columnName,
83
+ value: w,
84
+ }));
85
+ // column Name
86
+ const changeColumnName = (event) => olapColumnState.setColumnName(event.target.value);
87
+ // operator
88
+ const operators = olapGroupByState.operators;
89
+ const operationState = olapColumnState.operationState;
90
+ const olapOpColumn = operationState instanceof QueryBuilderTDSOlapAggreationOperatorState
91
+ ? operationState.columnState
92
+ : undefined;
93
+ const changeOperatorCol = (val) => {
94
+ if (operationState instanceof QueryBuilderTDSOlapAggreationOperatorState) {
95
+ if (val !== null) {
96
+ operationState.setColumnState(val.value);
97
+ }
98
+ }
99
+ };
100
+ const changeOperator = (olapOp) => () => {
101
+ olapColumnState.changeOperator(olapOp);
102
+ };
103
+ // window
104
+ const addOptions = windowOptions.filter((e) => !olapColumnState.windowColumns.includes(e));
105
+ const create = () => {
106
+ olapGroupByState.addOlapColumn(olapColumnState);
107
+ close();
108
+ };
109
+ const addWindowValue = () => {
110
+ if (addOptions.length > 0) {
111
+ olapColumnState.addWindow(guaranteeNonNullable(addOptions[0]));
112
+ }
113
+ };
114
+ // sortby
115
+ const sortByState = olapColumnState.sortByState;
116
+ const changeSortBy = (sortOp) => () => {
117
+ olapColumnState.changeSortBy(sortOp);
118
+ };
119
+ const changeSortCol = (val) => {
120
+ if (sortByState) {
121
+ if (val !== null) {
122
+ sortByState.setColumnState(val.value);
123
+ }
124
+ }
125
+ };
126
+ return (_jsx(Dialog, { open: Boolean(olapGroupByState.editColumn), onClose: close, classes: {
127
+ root: 'editor-modal__root-container',
128
+ container: 'editor-modal__container',
129
+ paper: 'editor-modal__content',
130
+ }, children: _jsxs("div", { className: "modal modal--dark query-builder__olap__modal", children: [_jsx("div", { className: "modal__header", children: _jsx("div", { className: "modal__title", children: createNewOlap
131
+ ? 'Create OLAP GroupBy Column'
132
+ : 'Update OLAP GroupByColumn' }) }), _jsxs("div", { className: "query-builder__olap__modal__body", children: [_jsxs("div", { className: "panel__content__form__section", children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "OLAP Column Name" }), _jsx("div", { className: "panel__content__form__section__header__prompt", children: "Name of OLAP Column that will be part of TDS Result" }), _jsx(InputWithInlineValidation, { className: "query-builder__olap__column__name__input input-group__input", spellCheck: false, value: olapColumnState.columnName, onChange: changeColumnName, validationErrorMessage: isDuplicatedColumnName ? 'Duplicated column' : undefined })] }), _jsxs("div", { className: "panel__content__form__section", children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "OLAP Operator" }), _jsx("div", { className: "panel__content__form__section__header__prompt", children: "OLAP aggregation function to apply and column if required by function" }), _jsx("div", { className: "panel__content__form__section__list", children: _jsx("div", { className: "panel__content__form__section__list__items", children: _jsxs("div", { className: "query-builder__olap__column__operation__operator", children: [_jsx("div", { className: clsx('query-builder__olap__column__operation__operator__label', {
133
+ 'query-builder__olap__column__operation__operator__label__agg': !olapOpColumn,
134
+ }), children: operationState.operator.getLabel() }), olapOpColumn && (_jsx("div", { className: "panel__content__form__section__list__item query-builder__olap__tds__column__options", children: _jsx(CustomSelectorInput, { className: "query-builder__olap__tds__column__dropdown", options: windowOptionsLabels, disabled: windowOptionsLabels.length < 1, onChange: changeOperatorCol, value: {
135
+ value: olapOpColumn,
136
+ label: olapOpColumn.columnName,
137
+ }, darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled }) })), _jsxs(DropdownMenu, { className: "query-builder__olap__column__operation__operator__dropdown", disabled: !operators.length, content: _jsx(MenuContent, { children: operators.map((op) => (_jsx(MenuContentItem, { className: "query-builder__olap__column__operation__operator__dropdown__option", onClick: changeOperator(op), children: op.getLabel() }, op.uuid))) }), menuProps: {
138
+ anchorOrigin: {
139
+ vertical: 'bottom',
140
+ horizontal: 'left',
141
+ },
142
+ transformOrigin: {
143
+ vertical: 'top',
144
+ horizontal: 'left',
145
+ },
146
+ elevation: 7,
147
+ }, children: [_jsx("button", { className: "query-builder__olap__column__operation__operator__badge", tabIndex: -1, title: "Choose OLAP GroupBy Operator...", children: _jsx(SigmaIcon, {}) }), _jsx("button", { className: "query-builder__olap__column__operation__operator__dropdown__trigger", tabIndex: -1, title: "Choose OLAP GroupBy Operator...", children: _jsx(CaretDownIcon, {}) })] })] }) }) })] }), _jsxs("div", { className: "panel__content__form__section", children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Window Columns" }), _jsx("div", { className: "panel__content__form__section__header__prompt", children: "Represents the window of columns that will partition the rows for which to apply the aggragte function" }), _jsxs("div", { className: "panel__content__form__section__list", children: [_jsx("div", { className: "panel__content__form__section__list__items", children: olapColumnState.windowColumns.map((value, idx) => (_jsx(TDSColumnSelectorEditor, { colValue: value, setColumn: (v) => olapColumnState.changeWindow(v, idx), deleteColumn: (v) => olapColumnState.deleteWindow(v), tdsColOptions: windowOptions }, value.uuid))) }), _jsx("div", { className: "panel__content__form__section__list__new-item__add", children: _jsx("button", { className: "panel__content__form__section__list__new-item__add-btn btn btn--dark", disabled: !addOptions.length, onClick: addWindowValue, tabIndex: -1, children: "Add Value" }) })] })] }), _jsxs("div", { className: "panel__content__form__section", children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Sort By" }), _jsx("div", { className: "panel__content__form__section__header__prompt", children: "Orders by the designated column" }), _jsx("div", { className: "panel__content__form__section__header__prompt" }), _jsx("div", { className: "panel__content__form__section__list", children: _jsxs("div", { className: "query-builder__olap__column__sortby__operator", children: [sortByState && (_jsx("div", { className: "query-builder__olap__column__sortby__operator__label", children: sortByState.sortType.toLowerCase() })), sortByState && (_jsx("div", { className: "panel__content__form__section__list__item query-builder__olap__tds__column__options", children: _jsx(CustomSelectorInput, { className: "query-builder__olap__tds__column__dropdown", options: windowOptionsLabels, disabled: windowOptionsLabels.length < 1, onChange: changeSortCol, value: {
148
+ value: sortByState.columnState,
149
+ label: sortByState.columnState.columnName,
150
+ }, darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled }) })), !sortByState && (_jsx("div", { className: "query-builder__olap__column__sortby__none", children: "(none)" })), _jsxs(DropdownMenu, { className: "query-builder__olap__column__sortby__operator__dropdown", content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { className: "query-builder__olap__column__sortby__operator__dropdown__option", onClick: changeSortBy(undefined), children: "(none)" }, "none"), Object.values(COLUMN_SORT_TYPE).map((op) => (_jsx(MenuContentItem, { className: "query-builder__olap__column__sortby__operator__dropdown__option", onClick: changeSortBy(op), children: op.toLowerCase() }, op)))] }), menuProps: {
151
+ anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
152
+ transformOrigin: { vertical: 'top', horizontal: 'left' },
153
+ elevation: 7,
154
+ }, children: [_jsx("button", { className: clsx('query-builder__olap__column__sortby__operator__badge', {
155
+ 'query-builder__olap__column__sortby__operator__badge--activated': Boolean(sortByState),
156
+ }), tabIndex: -1, title: "Choose OLAP SortBy Operator...", children: _jsx(SortIcon, {}) }), _jsx("button", { className: "query-builder__olap__column__sortby__operator__dropdown__trigger", tabIndex: -1, title: "Choose OLAP SortBy Operator...", children: _jsx(CaretDownIcon, {}) })] })] }) })] })] }), _jsx("div", { className: "modal__footer", children: createNewOlap ? (_jsx("button", { className: "btn modal__footer__close-btn", onClick: create, children: "Create" })) : (_jsx("button", { className: "btn modal__footer__close-btn", onClick: close, children: "Close" })) })] }) }));
157
+ });
158
+ const TDSColumnReferenceEditor = observer((props) => {
159
+ const { handleChange, tdsColumn } = props;
160
+ const handleDrop = useCallback((item) => {
161
+ handleChange(item.columnState);
162
+ }, [handleChange]);
163
+ const [{ isDragOver }, dropOpConnector] = useDrop(() => ({
164
+ accept: [
165
+ QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
166
+ QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
167
+ ],
168
+ drop: (item, monitor) => {
169
+ if (!monitor.didDrop()) {
170
+ handleDrop(item);
171
+ }
172
+ },
173
+ collect: (monitor) => ({
174
+ isDragOver: monitor.isOver({ shallow: true }),
175
+ }),
176
+ }), [handleDrop]);
177
+ return (_jsx("div", { className: "query-builder__olap__tds__column", children: _jsx("div", { ref: dropOpConnector, className: "query-builder__olap__tds__column-badge", children: _jsx(PanelEntryDropZonePlaceholder, { showPlaceholder: isDragOver, label: "Change Column", className: "query-builder__dnd__placeholder", children: _jsx("div", { className: "query-builder__olap__tds__column-badge__content", children: _jsx("div", { className: "query-builder__olap__tds__column-badge__property", title: `${tdsColumn.columnName}`, children: tdsColumn.columnName }) }) }) }) }));
178
+ });
179
+ const QueryBuilderOlapGroupByColumnEditor = observer((props) => {
180
+ const { olapColumnState } = props;
181
+ const olapState = olapColumnState.olapState;
182
+ const tdsState = olapState.tdsState;
183
+ const operators = olapState.operators;
184
+ // state
185
+ const ref = useRef(null);
186
+ const [anchorEl, setAnchorEl] = useState(null);
187
+ const [isSelectedFromContextMenu, setIsSelectedFromContextMenu] = useState(false);
188
+ const openWindowPopover = (event) => {
189
+ setAnchorEl(event.currentTarget);
190
+ };
191
+ const closeWindowPopover = () => {
192
+ setAnchorEl(null);
193
+ };
194
+ const onContextMenuOpen = () => setIsSelectedFromContextMenu(true);
195
+ const onContextMenuClose = () => setIsSelectedFromContextMenu(false);
196
+ // column Name
197
+ const changeColumnName = (event) => olapColumnState.setColumnName(event.target.value);
198
+ const isDuplicatedColumnName = tdsState.isDuplicateColumn(olapColumnState);
199
+ // window columns
200
+ const windowOptions = olapColumnState.possibleReferencedColumns;
201
+ const addWindowOptions = windowOptions.filter((e) => !olapColumnState.windowColumns.includes(e));
202
+ const addWindowValue = () => {
203
+ if (addWindowOptions.length > 0) {
204
+ olapColumnState.addWindow(guaranteeNonNullable(addWindowOptions[0]));
205
+ }
206
+ };
207
+ // operator
208
+ const operationState = olapColumnState.operationState;
209
+ const aggregateColumn = operationState instanceof QueryBuilderTDSOlapAggreationOperatorState
210
+ ? operationState.columnState
211
+ : undefined;
212
+ const changeOperator = (olapOp) => () => {
213
+ olapColumnState.changeOperator(olapOp);
214
+ };
215
+ // sortby
216
+ const sortByState = olapColumnState.sortByState;
217
+ const changeSortBy = (sortOp) => () => {
218
+ olapColumnState.changeSortBy(sortOp);
219
+ };
220
+ // action
221
+ const isRemovalDisabled = olapState.tdsState.isColumnInUse(olapColumnState);
222
+ const removeColumn = () => {
223
+ olapColumnState.olapState.removeColumn(olapColumnState);
224
+ };
225
+ const editoColumn = () => {
226
+ olapState.setEditColumn(olapColumnState);
227
+ };
228
+ // Drag and Drop
229
+ const handleHover = useCallback((item, monitor) => {
230
+ const dragIndex = tdsState.olapGroupByState.olapColumns.findIndex((e) => e === item.columnState);
231
+ const hoverIndex = tdsState.olapGroupByState.olapColumns.findIndex((e) => e === olapColumnState);
232
+ if (dragIndex === -1 || hoverIndex === -1 || dragIndex === hoverIndex) {
233
+ return;
234
+ }
235
+ // move the item being hovered on when the dragged item position is beyond the its middle point
236
+ const hoverBoundingReact = ref.current?.getBoundingClientRect();
237
+ const distanceThreshold = ((hoverBoundingReact?.bottom ?? 0) - (hoverBoundingReact?.top ?? 0)) /
238
+ 2;
239
+ const dragDistance = (monitor.getClientOffset()?.y ?? 0) - (hoverBoundingReact?.top ?? 0);
240
+ if (dragIndex < hoverIndex && dragDistance < distanceThreshold) {
241
+ return;
242
+ }
243
+ if (dragIndex > hoverIndex && dragDistance > distanceThreshold) {
244
+ return;
245
+ }
246
+ olapState.moveColumn(dragIndex, hoverIndex);
247
+ }, [olapColumnState, olapState, tdsState.olapGroupByState.olapColumns]);
248
+ const [, dropConnector] = useDrop(() => ({
249
+ accept: [QUERY_BUILDER_OLAP_COLUMN_DND_TYPE],
250
+ hover: (item, monitor) => handleHover(item, monitor),
251
+ }), [handleHover]);
252
+ const [{ olapColumnBeingDragged }, dragConnector, dragPreviewConnector] = useDrag(() => ({
253
+ type: QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
254
+ item: () => ({
255
+ columnState: olapColumnState,
256
+ }),
257
+ collect: (monitor) => ({
258
+ /**
259
+ * @workaround typings - https://github.com/react-dnd/react-dnd/pull/3484
260
+ */
261
+ olapColumnBeingDragged:
262
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
263
+ monitor.getItem()
264
+ ?.columnState,
265
+ }),
266
+ }), [olapColumnState]);
267
+ const isBeingDragged = olapColumnState === olapColumnBeingDragged;
268
+ dragConnector(dropConnector(ref));
269
+ useDragPreviewLayer(dragPreviewConnector);
270
+ const handleOpDrop = (val) => {
271
+ if (operationState instanceof QueryBuilderTDSOlapAggreationOperatorState) {
272
+ operationState.setColumnState(val);
273
+ }
274
+ };
275
+ const handleSortDrop = (val) => {
276
+ if (sortByState) {
277
+ sortByState.setColumnState(val);
278
+ }
279
+ };
280
+ const handleWindowDrop = useCallback((item) => {
281
+ const colState = item.columnState;
282
+ if (olapColumnState.possibleReferencedColumns.includes(colState) &&
283
+ !olapColumnState.windowColumns.includes(colState)) {
284
+ olapColumnState.addWindow(colState);
285
+ }
286
+ }, [olapColumnState]);
287
+ const [{ isDragOver }, dropOpConnector] = useDrop(() => ({
288
+ accept: [
289
+ QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
290
+ QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
291
+ ],
292
+ drop: (item, monitor) => {
293
+ if (!monitor.didDrop()) {
294
+ handleWindowDrop(item);
295
+ }
296
+ },
297
+ collect: (monitor) => ({
298
+ isDragOver: monitor.isOver({ shallow: true }),
299
+ }),
300
+ }), [handleWindowDrop]);
301
+ return (_jsx("div", { ref: ref, className: "query-builder__olap__column", children: _jsx(PanelEntryDropZonePlaceholder, { showPlaceholder: isBeingDragged, className: "query-builder__dnd__placeholder", children: _jsxs(ContextMenu, { content: _jsx(QueryBuilderOlapGroupByColumnContextMenu, { columnState: olapColumnState }), className: clsx('query-builder__olap__column__context-menu', {
302
+ 'query-builder__olap__column--selected-from-context-menu': isSelectedFromContextMenu,
303
+ }), menuProps: { elevation: 7 }, onOpen: onContextMenuOpen, onClose: onContextMenuClose, children: [_jsx("div", { className: "query-builder__olap__column__drag-handle__container", children: _jsx("div", { className: "query-builder__olap__column__drag-handle", children: _jsx(VerticalDragHandleIcon, {}) }) }), _jsx("div", { className: "query-builder__olap__column__operation", children: _jsxs("div", { className: "query-builder__olap__column__operation__operator", children: [_jsx("div", { className: clsx('query-builder__olap__column__operation__operator__label', {
304
+ 'query-builder__olap__column__operation__operator__label__agg': !aggregateColumn,
305
+ }), children: operationState.operator.getLabel() }), aggregateColumn && (_jsx(TDSColumnReferenceEditor, { tdsColumn: aggregateColumn, handleChange: handleOpDrop })), _jsxs(DropdownMenu, { className: "query-builder__olap__column__operation__operator__dropdown", disabled: !operators.length, content: _jsx(MenuContent, { children: operators.map((op) => (_jsx(MenuContentItem, { className: "query-builder__olap__column__operation__operator__dropdown__option", onClick: changeOperator(op), children: op.getLabel() }, op.uuid))) }), menuProps: {
306
+ anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
307
+ transformOrigin: { vertical: 'top', horizontal: 'left' },
308
+ elevation: 7,
309
+ }, children: [_jsx("button", { className: "query-builder__olap__column__operation__operator__badge", tabIndex: -1, title: "Choose OLAP GroupBy Operator...", children: _jsx(SigmaIcon, {}) }), _jsx("button", { className: "query-builder__olap__column__operation__operator__dropdown__trigger", tabIndex: -1, title: "Choose OLAP GroupBy Operator...", children: _jsx(CaretDownIcon, {}) })] })] }) }), _jsxs("div", { className: "query-builder__olap__column__window", children: [_jsx("button", { ref: dropOpConnector, title: "Click to edit or drag and drop columns", onClick: openWindowPopover, className: "query-builder__olap__column__window__content", children: _jsxs(PanelEntryDropZonePlaceholder, { showPlaceholder: isDragOver, label: "Add", className: "query-builder__dnd__placeholder", children: [_jsxs("div", { title: `${olapColumnState.windowColumns.length} columns partitioned`, className: "query-builder__olap__column__window__content__label", children: ["(", olapColumnState.windowColumns.length, ")"] }), _jsx("div", { className: clsx('query-builder__olap__column__window__operator__badge'), tabIndex: -1, title: "Edit window columns...", children: _jsx(WindowIcon, {}) })] }) }), _jsx(BasePopover, { open: Boolean(anchorEl), anchorEl: anchorEl, onClose: closeWindowPopover, anchorOrigin: {
310
+ vertical: 'bottom',
311
+ horizontal: 'center',
312
+ }, transformOrigin: {
313
+ vertical: 'top',
314
+ horizontal: 'center',
315
+ }, children: _jsx("div", { className: "query-builder__olap__column__window__popover", children: _jsxs("div", { className: "panel__content__form__section__list", children: [_jsx("div", { className: "panel__content__form__section__list__items", children: olapColumnState.windowColumns.map((value, idx) => (_jsx(TDSColumnSelectorEditor, { colValue: value, setColumn: (v) => olapColumnState.changeWindow(v, idx), deleteColumn: (v) => olapColumnState.deleteWindow(v), tdsColOptions: windowOptions }, value.uuid))) }), _jsx("div", { className: "panel__content__form__section__list__new-item__add", children: _jsx("button", { className: "panel__content__form__section__list__new-item__add-btn btn btn--dark", disabled: !addWindowOptions.length, onClick: addWindowValue, tabIndex: -1, children: "Add Value" }) })] }) }) })] }), _jsx("div", { className: "query-builder__olap__column__sortby", children: _jsxs("div", { className: "query-builder__olap__column__sortby__operator", children: [sortByState && (_jsx("div", { className: "query-builder__olap__column__sortby__operator__label", children: sortByState.sortType.toLowerCase() })), sortByState && (_jsx(TDSColumnReferenceEditor, { tdsColumn: sortByState.columnState, handleChange: handleSortDrop })), !sortByState && (_jsx("div", { className: "query-builder__olap__column__sortby__none", children: "(none)" })), _jsxs(DropdownMenu, { className: "query-builder__olap__column__sortby__operator__dropdown", content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { className: "query-builder__olap__column__sortby__operator__dropdown__option", onClick: changeSortBy(undefined), children: "(none)" }, "none"), Object.values(COLUMN_SORT_TYPE).map((op) => (_jsx(MenuContentItem, { className: "query-builder__olap__column__sortby__operator__dropdown__option", onClick: changeSortBy(op), children: op.toLowerCase() }, op)))] }), menuProps: {
316
+ anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
317
+ transformOrigin: { vertical: 'top', horizontal: 'left' },
318
+ elevation: 7,
319
+ }, children: [_jsx("button", { className: clsx('query-builder__olap__column__sortby__operator__badge', {
320
+ 'query-builder__olap__column__sortby__operator__badge--activated': Boolean(sortByState),
321
+ }), tabIndex: -1, title: "Choose OLAP SortBy Operator...", children: _jsx(SortIcon, {}) }), _jsx("button", { className: "query-builder__olap__column__sortby__operator__dropdown__trigger", tabIndex: -1, title: "Choose OLAP SortBy Operator...", children: _jsx(CaretDownIcon, {}) })] })] }) }), _jsx("div", { className: "query-builder__olap__column__name", children: _jsx(InputWithInlineValidation, { className: "query-builder__olap__column__name__input input-group__input", spellCheck: false, value: olapColumnState.columnName, onChange: changeColumnName, validationErrorMessage: isDuplicatedColumnName ? 'Duplicated column' : undefined }) }), _jsxs("div", { className: "query-builder__olap__column__actions", children: [_jsx("button", { className: "query-builder__olap__column__action", tabIndex: -1, onClick: editoColumn, children: _jsx(EditIcon, {}) }), _jsx("button", { className: "query-builder__olap__column__action", tabIndex: -1, onClick: removeColumn, disabled: isRemovalDisabled, title: isRemovalDisabled
322
+ ? "This column is used in the post filter and can't be removed"
323
+ : 'Remove', children: _jsx(TimesIcon, {}) })] })] }) }) }));
324
+ });
325
+ export const QueryBuilderOlapGroupByPanel = observer((props) => {
326
+ const { olapGroupByState } = props;
327
+ const applicationStore = useApplicationStore();
328
+ const createOlapGroupBy = () => {
329
+ const col = olapGroupByState.tdsState.tdsColumns[0];
330
+ if (col) {
331
+ const newOlapState = createOlapColumnState(col, olapGroupByState.tdsState);
332
+ olapGroupByState.setEditColumn(newOlapState);
333
+ }
334
+ };
335
+ // Drag and Drop
336
+ const handleDrop = useCallback(async (item) => {
337
+ try {
338
+ const newOlapState = createOlapColumnState(item.columnState, olapGroupByState.tdsState);
339
+ olapGroupByState.addOlapColumn(newOlapState);
340
+ }
341
+ catch (error) {
342
+ assertErrorThrown(error);
343
+ applicationStore.notifyError(error.message);
344
+ return;
345
+ }
346
+ }, [applicationStore, olapGroupByState]);
347
+ const [{ isDragOver }, dropTargetConnector] = useDrop(() => ({
348
+ accept: [
349
+ QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
350
+ QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
351
+ ],
352
+ drop: (item, monitor) => {
353
+ if (!monitor.didDrop()) {
354
+ handleDrop(item).catch(applicationStore.alertUnhandledError);
355
+ } // prevent drop event propagation to accomondate for nested DnD
356
+ },
357
+ collect: (monitor) => ({
358
+ isDragOver: monitor.isOver({ shallow: true }),
359
+ }),
360
+ }), [applicationStore, handleDrop]);
361
+ return (_jsx("div", { "data-testid": QUERY_BUILDER_TEST_ID.QUERY_BUILDER_OLAP_GROUPBY, className: "panel", children: _jsxs("div", { "data-testid": QUERY_BUILDER_TEST_ID.QUERY_BUILDER_OLAP_GROUPBY, className: "panel", children: [_jsxs("div", { className: "panel__header", children: [_jsx("div", { className: "panel__header__title", children: _jsx("div", { className: "panel__header__title__label", children: "OLAP" }) }), _jsx("div", { className: "panel__header__actions", children: _jsx("button", { className: "panel__header__action", onClick: createOlapGroupBy, disabled: !olapGroupByState.tdsState.tdsColumns.length, tabIndex: -1, title: "Create OLAP GroupBy Column", children: _jsx(PlusIcon, {}) }) })] }), _jsx(PanelContent, { children: _jsxs(PanelDropZone, { isDragOver: isDragOver, dropTargetConnector: dropTargetConnector, children: [olapGroupByState.isEmpty && (_jsx(BlankPanelPlaceholder, { text: "Add OLAP GroupBy Column", tooltipText: "Drag and drop columns here" })), !olapGroupByState.isEmpty && (_jsx("div", { "data-testid": QUERY_BUILDER_TEST_ID.QUERY_BUILDER_TDS, className: "query-builder__olap__columns", children: olapGroupByState.olapColumns.map((col) => (_jsx(QueryBuilderOlapGroupByColumnEditor, { olapColumnState: col }, col.uuid))) }))] }) }), olapGroupByState.editColumn && (_jsx(QueryBuilderOlapColumnModalEditor, { olapGroupByState: olapGroupByState, olapColumnState: olapGroupByState.editColumn }))] }) }));
362
+ });
363
+ //# sourceMappingURL=QueryBuilderOlapGroupByPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderOlapGroupByPanel.js","sourceRoot":"","sources":["../../../src/components/fetch-structure/QueryBuilderOlapGroupByPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,yBAAyB,EACzB,WAAW,EACX,eAAe,EACf,SAAS,EACT,aAAa,EACb,IAAI,EACJ,6BAA6B,EAC7B,WAAW,EACX,sBAAsB,EACtB,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,MAAM,EACN,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,QAAQ,GACT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,iBA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,CAAC,gBAAgB,CAAC,OAAO,IAAI,CAC5B,6BACe,qBAAqB,CAAC,iBAAiB,EACpD,SAAS,EAAC,8BAA8B,YAEvC,gBAAgB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACzC,KAAC,mCAAmC,IAClC,eAAe,EAAE,GAAG,IACf,GAAG,CAAC,IAAI,CACb,CACH,CAAC,GACE,CACP,IACa,GACH,EACd,gBAAgB,CAAC,UAAU,IAAI,CAC9B,KAAC,iCAAiC,IAChC,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,gBAAgB,CAAC,UAAU,GAC5C,CACH,IACG,GACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -13,7 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- /// <reference types="react" resolution-mode="require"/>
17
16
  import { PostFilterConditionState } from '../../stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js';
18
17
  import { type QueryBuilderProjectionColumnState } from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
19
18
  import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilderPostFilterPanel.d.ts","sourceRoot":"","sources":["../../../src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AA6DH,OAAO,EAGL,wBAAwB,EAMzB,MAAM,6EAA6E,CAAC;AACrF,OAAO,EACL,KAAK,iCAAiC,EAIvC,MAAM,kFAAkF,CAAC;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAiM3E,eAAO,MAAM,uBAAuB;8BAEN,wBAAwB;kCAEnC,iCAAiC,KAC3C,QAAQ,IAAI,CAAC;;;CAsErB,CAAC;AA8rBF,eAAO,MAAM,2BAA2B,WAC9B;IAAE,iBAAiB,EAAE,iBAAiB,CAAA;CAAE;;CAgCjD,CAAC"}
1
+ {"version":3,"file":"QueryBuilderPostFilterPanel.d.ts","sourceRoot":"","sources":["../../../src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAkDH,OAAO,EAGL,wBAAwB,EAMzB,MAAM,6EAA6E,CAAC;AACrF,OAAO,EACL,KAAK,iCAAiC,EAIvC,MAAM,kFAAkF,CAAC;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAqH3E,eAAO,MAAM,uBAAuB;8BAEN,wBAAwB;kCAEnC,iCAAiC,KAC3C,QAAQ,IAAI,CAAC;;;CAyErB,CAAC;AAusBF,eAAO,MAAM,2BAA2B,WAC9B;IAAE,iBAAiB,EAAE,iBAAiB,CAAA;CAAE;;CAgCjD,CAAC"}
@@ -15,14 +15,13 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
15
15
  * limitations under the License.
16
16
  */
17
17
  import { useApplicationStore } from '@finos/legend-application';
18
- import { BlankPanelPlaceholder, CaretDownIcon, ChevronDownIcon, ChevronRightIcon, ClickAwayListener, clsx, ContextMenu, DropdownMenu, FilledTriangleIcon, MenuContent, MenuContentItem, TimesIcon, PlusIcon, ExpandIcon, CompressIcon, CircleIcon, BrushIcon, NewFolderIcon, PlusCircleIcon, InfoCircleIcon, Tooltip, StringTypeIcon, ToggleIcon, HashtagIcon, ClockIcon, PanelDropZone, DragPreviewLayer, PanelEntryDropZonePlaceholder, useDragPreviewLayer, BlankPanelContent, PanelContent, } from '@finos/legend-art';
19
- import { Class, Enumeration, PrimitiveType, PRIMITIVE_TYPE, getMultiplicityDescription, } from '@finos/legend-graph';
20
- import { assertErrorThrown, guaranteeNonNullable, returnUndefOnError, debounce, } from '@finos/legend-shared';
18
+ import { BlankPanelPlaceholder, CaretDownIcon, ChevronDownIcon, ChevronRightIcon, ClickAwayListener, clsx, ContextMenu, DropdownMenu, FilledTriangleIcon, MenuContent, MenuContentItem, TimesIcon, PlusIcon, ExpandIcon, CompressIcon, CircleIcon, BrushIcon, NewFolderIcon, PlusCircleIcon, InfoCircleIcon, PanelDropZone, DragPreviewLayer, PanelEntryDropZonePlaceholder, useDragPreviewLayer, BlankPanelContent, PanelContent, } from '@finos/legend-art';
19
+ import { Class, Enumeration, PrimitiveType, } from '@finos/legend-graph';
20
+ import { assertErrorThrown, guaranteeNonNullable, debounce, } from '@finos/legend-shared';
21
21
  import { flowResult } from 'mobx';
22
22
  import { observer } from 'mobx-react-lite';
23
23
  import { forwardRef, useCallback, useMemo, useRef, useState } from 'react';
24
24
  import { useDrop, useDrag } from 'react-dnd';
25
- import { getColumnMultiplicity } from '../../stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js';
26
25
  import { QueryBuilderAggregateColumnState } from '../../stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js';
27
26
  import { PostFilterConditionState, QueryBuilderPostFilterTreeConditionNodeData, QueryBuilderPostFilterTreeGroupNodeData, QUERY_BUILDER_POST_FILTER_DND_TYPE, QueryBuilderPostFilterTreeBlankConditionNodeData, } from '../../stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js';
28
27
  import { QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE, QueryBuilderDerivationProjectionColumnState, } from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
@@ -32,6 +31,8 @@ import { isTypeCompatibleForAssignment } from '../../stores/QueryBuilderValueSpe
32
31
  import { QUERY_BUILDER_GROUP_OPERATION } from '../../stores/QueryBuilderGroupOperationHelper.js';
33
32
  import { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
34
33
  import { BasicValueSpecificationEditor } from '../shared/BasicValueSpecificationEditor.js';
34
+ import { QueryBuilderColumnInfoTooltip, renderPropertyTypeIcon, } from './QueryBuilderTDSComponentHelper.js';
35
+ import { QUERY_BUILDER_OLAP_COLUMN_DND_TYPE, } from '../../stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.js';
35
36
  const QueryBuilderPostFilterConditionContextMenu = observer(forwardRef(function QueryBuilderPostFilterConditionContextMenu(props, ref) {
36
37
  const { tdsState, node } = props;
37
38
  const postFilterState = tdsState.postFilterState;
@@ -63,53 +64,16 @@ const QueryBuilderPostFilterGroupConditionEditor = observer((props) => {
63
64
  'query-builder-post-filter-tree__group-node--or': node.groupOperation === QUERY_BUILDER_GROUP_OPERATION.OR,
64
65
  }), title: "Switch Operation", onClick: switchOperation, children: [_jsx("div", { className: "query-builder-post-filter-tree__group-node__label", children: node.groupOperation }), _jsx("button", { className: "query-builder-post-filter-tree__group-node__action", children: _jsx(FilledTriangleIcon, {}) })] }) }) }));
65
66
  });
66
- const renderPropertyTypeIcon = (type) => {
67
- if (type instanceof PrimitiveType) {
68
- if (type.name === PRIMITIVE_TYPE.STRING) {
69
- return _jsx(StringTypeIcon, { className: "query-builder-column-badge__icon" });
70
- }
71
- else if (type.name === PRIMITIVE_TYPE.BOOLEAN) {
72
- return _jsx(ToggleIcon, { className: "query-builder-column-badge__icon" });
73
- }
74
- else if (type.name === PRIMITIVE_TYPE.NUMBER ||
75
- type.name === PRIMITIVE_TYPE.INTEGER ||
76
- type.name === PRIMITIVE_TYPE.FLOAT ||
77
- type.name === PRIMITIVE_TYPE.DECIMAL) {
78
- return _jsx(HashtagIcon, { className: "query-builder-column-badge__icon" });
79
- }
80
- else if (type.name === PRIMITIVE_TYPE.DATE ||
81
- type.name === PRIMITIVE_TYPE.DATETIME ||
82
- type.name === PRIMITIVE_TYPE.STRICTDATE) {
83
- return _jsx(ClockIcon, { className: "query-builder-column-badge__icon" });
84
- }
85
- }
86
- else if (type instanceof Enumeration) {
87
- return _jsx("div", { className: "icon query-builder-column-badge__icon", children: "E" });
88
- }
89
- return null;
90
- };
91
- const QueryBuilderColumnInfoTooltip = (props) => {
92
- const { columnState, placement, children } = props;
93
- const type = columnState.getReturnType();
94
- const multiplicity = returnUndefOnError(() => getColumnMultiplicity(columnState));
95
- return (_jsx(Tooltip, { arrow: true, ...(placement !== undefined ? { placement } : {}), classes: {
96
- tooltip: 'query-builder__tooltip',
97
- arrow: 'query-builder__tooltip__arrow',
98
- tooltipPlacementRight: 'query-builder__tooltip--right',
99
- }, TransitionProps: {
100
- // disable transition
101
- // NOTE: somehow, this is the only workaround we have, if for example
102
- // we set `appear = true`, the tooltip will jump out of position
103
- timeout: 0,
104
- }, title: _jsxs("div", { className: "query-builder__tooltip__content", children: [_jsxs("div", { className: "query-builder__tooltip__item", children: [_jsx("div", { className: "query-builder__tooltip__item__label", children: "Name" }), _jsx("div", { className: "query-builder__tooltip__item__value", children: columnState.columnName })] }), _jsxs("div", { className: "query-builder__tooltip__item", children: [_jsx("div", { className: "query-builder__tooltip__item__label", children: "Type" }), _jsx("div", { className: "query-builder__tooltip__item__value", children: type?.path })] }), multiplicity && (_jsxs("div", { className: "query-builder__tooltip__item", children: [_jsx("div", { className: "query-builder__tooltip__item__label", children: "Multiplicity" }), _jsx("div", { className: "query-builder__tooltip__item__value", children: getMultiplicityDescription(multiplicity) })] }))] }), children: children }));
105
- };
106
67
  export const QueryBuilderColumnBadge = observer((props) => {
107
68
  const { postFilterConditionState, onColumnChange } = props;
108
69
  const applicationStore = useApplicationStore();
109
- const type = postFilterConditionState.columnState.getReturnType();
70
+ const type = postFilterConditionState.columnState.getColumnType();
110
71
  const handleDrop = useCallback((item) => onColumnChange(item.columnState), [onColumnChange]);
111
72
  const [{ isDragOver }, dropConnector] = useDrop(() => ({
112
- accept: [QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE],
73
+ accept: [
74
+ QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
75
+ QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
76
+ ],
113
77
  drop: (item, monitor) => {
114
78
  if (!monitor.didDrop()) {
115
79
  handleDrop(item).catch(applicationStore.alertUnhandledError);
@@ -142,7 +106,7 @@ const QueryBuilderPostFilterConditionEditor = observer((props) => {
142
106
  // Drag and Drop on filter condition value
143
107
  const handleDrop = useCallback((item) => {
144
108
  const parameterType = item.variable.parameter.genericType?.value.rawType;
145
- const conditionValueType = node.condition.columnState.getReturnType();
109
+ const conditionValueType = node.condition.columnState.getColumnType();
146
110
  if (conditionValueType &&
147
111
  isTypeCompatibleForAssignment(parameterType, conditionValueType)) {
148
112
  node.condition.setValue(item.variable.parameter);
@@ -184,7 +148,7 @@ const QueryBuilderPostFilterConditionEditor = observer((props) => {
184
148
  elevation: 7,
185
149
  }, children: [_jsx("div", { className: "query-builder-post-filter-tree__condition-node__operator__label", children: node.condition.operator.getLabel() }), _jsx("div", { className: "query-builder-post-filter-tree__condition-node__operator__dropdown__trigger", children: _jsx(CaretDownIcon, {}) })] }), node.condition.value && (_jsx("div", { ref: dropConnector, className: "query-builder-post-filter-tree__condition-node__value", children: _jsx(PanelEntryDropZonePlaceholder, { showPlaceholder: isFilterValueDragOver, label: "Change Filter Value", className: "query-builder__dnd__placeholder", children: _jsx(BasicValueSpecificationEditor, { valueSpecification: node.condition.value, setValueSpecification: changeValueSpecification, graph: graph, obseverContext: node.condition.postFilterState.tdsState.queryBuilderState
186
150
  .observableContext, typeCheckOption: {
187
- expectedType: guaranteeNonNullable(node.condition.columnState.getReturnType()),
151
+ expectedType: guaranteeNonNullable(node.condition.columnState.getColumnType()),
188
152
  }, resetValue: resetNode, selectorConfig: selectorConfig }) }) }))] }) }) }));
189
153
  });
190
154
  const QueryBuilderPostFilterBlankConditionEditor = observer((props) => {
@@ -203,9 +167,9 @@ const QueryBuilderPostFilterTreeNodeContainer = observer((props) => {
203
167
  const toggleExpandNode = () => node.setIsOpen(!node.isOpen);
204
168
  const removeNode = () => postFilterState.removeNodeAndPruneBranch(node);
205
169
  const handleDrop = useCallback((item, type) => {
206
- if (type === QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE) {
207
- const columnState = item
208
- .columnState;
170
+ if (type === QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE ||
171
+ type === QUERY_BUILDER_OLAP_COLUMN_DND_TYPE) {
172
+ const columnState = item.columnState;
209
173
  let conditionState;
210
174
  try {
211
175
  conditionState = new PostFilterConditionState(postFilterState, columnState, undefined, undefined);
@@ -231,6 +195,7 @@ const QueryBuilderPostFilterTreeNodeContainer = observer((props) => {
231
195
  accept: [
232
196
  ...Object.values(QUERY_BUILDER_POST_FILTER_DND_TYPE),
233
197
  QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
198
+ QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
234
199
  ],
235
200
  drop: (item, monitor) => {
236
201
  if (!monitor.didDrop()) {
@@ -354,11 +319,14 @@ const QueryBuilderPostFilterPanelContent = observer((props) => {
354
319
  postFilterState.addNodeFromNode(new QueryBuilderPostFilterTreeConditionNodeData(undefined, postFilterConditionState), undefined);
355
320
  }, [applicationStore, postFilterState, tdsState.aggregationState.columns]);
356
321
  const [{ isDragOver }, dropTargetConnector] = useDrop(() => ({
357
- accept: [QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE],
322
+ accept: [
323
+ QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
324
+ QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
325
+ ],
358
326
  drop: (item, monitor) => {
359
327
  if (!monitor.didDrop()) {
360
328
  handleDrop(item).catch(applicationStore.alertUnhandledError);
361
- } // prevent drop event propagation to accomondate for nested DnD
329
+ }
362
330
  },
363
331
  collect: (monitor) => ({
364
332
  isDragOver: monitor.isOver({ shallow: true }),